Repository: xthebat/optolithium Branch: master Commit: b3b38a93fdcf Files: 671 Total size: 7.1 MB Directory structure: gitextract_kvc5fbke/ ├── .hgignore ├── COPYRIGHT ├── LICENSE.TXT ├── OptolithiumC/ │ ├── CMakeLists.txt │ ├── FindFFTW.cmake │ ├── FindNumPy.cmake │ ├── clipper.i │ ├── examples/ │ │ ├── aerial_image_various_source_shapes.py │ │ └── resist_images_and_contours.py │ ├── include/ │ │ ├── opl_capi.h │ │ ├── opl_contours.h │ │ ├── opl_conv.h │ │ ├── opl_eikonal.h │ │ ├── opl_fft.h │ │ ├── opl_geometry.h │ │ ├── opl_interp.h │ │ ├── opl_iter.h │ │ ├── opl_log.h │ │ ├── opl_misc.h │ │ ├── opl_physc.h │ │ ├── opl_sim.h │ │ └── optolithium.h │ ├── libs/ │ │ ├── armadillo/ │ │ │ ├── include/ │ │ │ │ ├── armadillo │ │ │ │ └── armadillo_bits/ │ │ │ │ ├── BaseCube_bones.hpp │ │ │ │ ├── BaseCube_meat.hpp │ │ │ │ ├── Base_bones.hpp │ │ │ │ ├── Base_meat.hpp │ │ │ │ ├── Col_bones.hpp │ │ │ │ ├── Col_meat.hpp │ │ │ │ ├── Cube_bones.hpp │ │ │ │ ├── Cube_meat.hpp │ │ │ │ ├── GenCube_bones.hpp │ │ │ │ ├── GenCube_meat.hpp │ │ │ │ ├── Gen_bones.hpp │ │ │ │ ├── Gen_meat.hpp │ │ │ │ ├── GlueCube_bones.hpp │ │ │ │ ├── GlueCube_meat.hpp │ │ │ │ ├── Glue_bones.hpp │ │ │ │ ├── Glue_meat.hpp │ │ │ │ ├── Mat_bones.hpp │ │ │ │ ├── Mat_meat.hpp │ │ │ │ ├── OpCube_bones.hpp │ │ │ │ ├── OpCube_meat.hpp │ │ │ │ ├── Op_bones.hpp │ │ │ │ ├── Op_meat.hpp │ │ │ │ ├── Proxy.hpp │ │ │ │ ├── ProxyCube.hpp │ │ │ │ ├── Row_bones.hpp │ │ │ │ ├── Row_meat.hpp │ │ │ │ ├── SizeCube_bones.hpp │ │ │ │ ├── SizeCube_meat.hpp │ │ │ │ ├── SizeMat_bones.hpp │ │ │ │ ├── SizeMat_meat.hpp │ │ │ │ ├── SpBase_bones.hpp │ │ │ │ ├── SpBase_meat.hpp │ │ │ │ ├── SpCol_bones.hpp │ │ │ │ ├── SpCol_meat.hpp │ │ │ │ ├── SpGlue_bones.hpp │ │ │ │ ├── SpGlue_meat.hpp │ │ │ │ ├── SpMat_bones.hpp │ │ │ │ ├── SpMat_iterators_meat.hpp │ │ │ │ ├── SpMat_meat.hpp │ │ │ │ ├── SpOp_bones.hpp │ │ │ │ ├── SpOp_meat.hpp │ │ │ │ ├── SpProxy.hpp │ │ │ │ ├── SpRow_bones.hpp │ │ │ │ ├── SpRow_meat.hpp │ │ │ │ ├── SpSubview_bones.hpp │ │ │ │ ├── SpSubview_iterators_meat.hpp │ │ │ │ ├── SpSubview_meat.hpp │ │ │ │ ├── SpValProxy_bones.hpp │ │ │ │ ├── SpValProxy_meat.hpp │ │ │ │ ├── access.hpp │ │ │ │ ├── arma_boost.hpp │ │ │ │ ├── arma_cmath.hpp │ │ │ │ ├── arma_config.hpp │ │ │ │ ├── arma_ostream_bones.hpp │ │ │ │ ├── arma_ostream_meat.hpp │ │ │ │ ├── arma_rng.hpp │ │ │ │ ├── arma_rng_cxx11.hpp │ │ │ │ ├── arma_rng_cxx98.hpp │ │ │ │ ├── arma_static_check.hpp │ │ │ │ ├── arma_version.hpp │ │ │ │ ├── arpack_bones.hpp │ │ │ │ ├── arpack_wrapper.hpp │ │ │ │ ├── arrayops_bones.hpp │ │ │ │ ├── arrayops_meat.hpp │ │ │ │ ├── atlas_bones.hpp │ │ │ │ ├── atlas_wrapper.hpp │ │ │ │ ├── auxlib_bones.hpp │ │ │ │ ├── auxlib_meat.hpp │ │ │ │ ├── blas_bones.hpp │ │ │ │ ├── blas_wrapper.hpp │ │ │ │ ├── compiler_setup.hpp │ │ │ │ ├── compiler_setup_post.hpp │ │ │ │ ├── cond_rel_bones.hpp │ │ │ │ ├── cond_rel_meat.hpp │ │ │ │ ├── config.hpp │ │ │ │ ├── config.hpp.cmake │ │ │ │ ├── constants.hpp │ │ │ │ ├── constants_compat.hpp │ │ │ │ ├── debug.hpp │ │ │ │ ├── diagmat_proxy.hpp │ │ │ │ ├── diagview_bones.hpp │ │ │ │ ├── diagview_meat.hpp │ │ │ │ ├── diskio_bones.hpp │ │ │ │ ├── diskio_meat.hpp │ │ │ │ ├── distr_param.hpp │ │ │ │ ├── eGlueCube_bones.hpp │ │ │ │ ├── eGlueCube_meat.hpp │ │ │ │ ├── eGlue_bones.hpp │ │ │ │ ├── eGlue_meat.hpp │ │ │ │ ├── eOpCube_bones.hpp │ │ │ │ ├── eOpCube_meat.hpp │ │ │ │ ├── eOp_bones.hpp │ │ │ │ ├── eOp_meat.hpp │ │ │ │ ├── eglue_core_bones.hpp │ │ │ │ ├── eglue_core_meat.hpp │ │ │ │ ├── eop_aux.hpp │ │ │ │ ├── eop_core_bones.hpp │ │ │ │ ├── eop_core_meat.hpp │ │ │ │ ├── fft_engine.hpp │ │ │ │ ├── field_bones.hpp │ │ │ │ ├── field_meat.hpp │ │ │ │ ├── fn_accu.hpp │ │ │ │ ├── fn_all.hpp │ │ │ │ ├── fn_any.hpp │ │ │ │ ├── fn_as_scalar.hpp │ │ │ │ ├── fn_chol.hpp │ │ │ │ ├── fn_clamp.hpp │ │ │ │ ├── fn_cond.hpp │ │ │ │ ├── fn_conv.hpp │ │ │ │ ├── fn_conv_to.hpp │ │ │ │ ├── fn_cor.hpp │ │ │ │ ├── fn_cov.hpp │ │ │ │ ├── fn_cross.hpp │ │ │ │ ├── fn_cumsum.hpp │ │ │ │ ├── fn_det.hpp │ │ │ │ ├── fn_diagmat.hpp │ │ │ │ ├── fn_diagvec.hpp │ │ │ │ ├── fn_dot.hpp │ │ │ │ ├── fn_eig_gen.hpp │ │ │ │ ├── fn_eig_pair.hpp │ │ │ │ ├── fn_eig_sym.hpp │ │ │ │ ├── fn_eigs_gen.hpp │ │ │ │ ├── fn_eigs_sym.hpp │ │ │ │ ├── fn_elem.hpp │ │ │ │ ├── fn_eps.hpp │ │ │ │ ├── fn_expmat.hpp │ │ │ │ ├── fn_eye.hpp │ │ │ │ ├── fn_fft.hpp │ │ │ │ ├── fn_fft2.hpp │ │ │ │ ├── fn_find.hpp │ │ │ │ ├── fn_flip.hpp │ │ │ │ ├── fn_hist.hpp │ │ │ │ ├── fn_histc.hpp │ │ │ │ ├── fn_inplace_strans.hpp │ │ │ │ ├── fn_inplace_trans.hpp │ │ │ │ ├── fn_interp1.hpp │ │ │ │ ├── fn_inv.hpp │ │ │ │ ├── fn_join.hpp │ │ │ │ ├── fn_kron.hpp │ │ │ │ ├── fn_log_det.hpp │ │ │ │ ├── fn_lu.hpp │ │ │ │ ├── fn_max.hpp │ │ │ │ ├── fn_mean.hpp │ │ │ │ ├── fn_median.hpp │ │ │ │ ├── fn_min.hpp │ │ │ │ ├── fn_misc.hpp │ │ │ │ ├── fn_n_unique.hpp │ │ │ │ ├── fn_nonzeros.hpp │ │ │ │ ├── fn_norm.hpp │ │ │ │ ├── fn_norm_sparse.hpp │ │ │ │ ├── fn_normalise.hpp │ │ │ │ ├── fn_numel.hpp │ │ │ │ ├── fn_ones.hpp │ │ │ │ ├── fn_pinv.hpp │ │ │ │ ├── fn_princomp.hpp │ │ │ │ ├── fn_prod.hpp │ │ │ │ ├── fn_qr.hpp │ │ │ │ ├── fn_qz.hpp │ │ │ │ ├── fn_randg.hpp │ │ │ │ ├── fn_randi.hpp │ │ │ │ ├── fn_randn.hpp │ │ │ │ ├── fn_randu.hpp │ │ │ │ ├── fn_rank.hpp │ │ │ │ ├── fn_repmat.hpp │ │ │ │ ├── fn_reshape.hpp │ │ │ │ ├── fn_resize.hpp │ │ │ │ ├── fn_shuffle.hpp │ │ │ │ ├── fn_size.hpp │ │ │ │ ├── fn_solve.hpp │ │ │ │ ├── fn_sort.hpp │ │ │ │ ├── fn_sort_index.hpp │ │ │ │ ├── fn_speye.hpp │ │ │ │ ├── fn_spones.hpp │ │ │ │ ├── fn_sprandn.hpp │ │ │ │ ├── fn_sprandu.hpp │ │ │ │ ├── fn_spsolve.hpp │ │ │ │ ├── fn_stddev.hpp │ │ │ │ ├── fn_strans.hpp │ │ │ │ ├── fn_sum.hpp │ │ │ │ ├── fn_svd.hpp │ │ │ │ ├── fn_svds.hpp │ │ │ │ ├── fn_syl_lyap.hpp │ │ │ │ ├── fn_symmat.hpp │ │ │ │ ├── fn_toeplitz.hpp │ │ │ │ ├── fn_trace.hpp │ │ │ │ ├── fn_trans.hpp │ │ │ │ ├── fn_trig.hpp │ │ │ │ ├── fn_trimat.hpp │ │ │ │ ├── fn_trunc_exp.hpp │ │ │ │ ├── fn_trunc_log.hpp │ │ │ │ ├── fn_unique.hpp │ │ │ │ ├── fn_var.hpp │ │ │ │ ├── fn_vectorise.hpp │ │ │ │ ├── fn_zeros.hpp │ │ │ │ ├── forward_bones.hpp │ │ │ │ ├── glue_conv_bones.hpp │ │ │ │ ├── glue_conv_meat.hpp │ │ │ │ ├── glue_cor_bones.hpp │ │ │ │ ├── glue_cor_meat.hpp │ │ │ │ ├── glue_cov_bones.hpp │ │ │ │ ├── glue_cov_meat.hpp │ │ │ │ ├── glue_cross_bones.hpp │ │ │ │ ├── glue_cross_meat.hpp │ │ │ │ ├── glue_hist_bones.hpp │ │ │ │ ├── glue_hist_meat.hpp │ │ │ │ ├── glue_histc_bones.hpp │ │ │ │ ├── glue_histc_meat.hpp │ │ │ │ ├── glue_join_bones.hpp │ │ │ │ ├── glue_join_meat.hpp │ │ │ │ ├── glue_kron_bones.hpp │ │ │ │ ├── glue_kron_meat.hpp │ │ │ │ ├── glue_max_bones.hpp │ │ │ │ ├── glue_max_meat.hpp │ │ │ │ ├── glue_min_bones.hpp │ │ │ │ ├── glue_min_meat.hpp │ │ │ │ ├── glue_mixed_bones.hpp │ │ │ │ ├── glue_mixed_meat.hpp │ │ │ │ ├── glue_relational_bones.hpp │ │ │ │ ├── glue_relational_meat.hpp │ │ │ │ ├── glue_solve_bones.hpp │ │ │ │ ├── glue_solve_meat.hpp │ │ │ │ ├── glue_times_bones.hpp │ │ │ │ ├── glue_times_meat.hpp │ │ │ │ ├── glue_toeplitz_bones.hpp │ │ │ │ ├── glue_toeplitz_meat.hpp │ │ │ │ ├── gmm_diag_bones.hpp │ │ │ │ ├── gmm_diag_meat.hpp │ │ │ │ ├── gmm_misc_bones.hpp │ │ │ │ ├── gmm_misc_meat.hpp │ │ │ │ ├── hdf5_bones.hpp │ │ │ │ ├── hdf5_misc.hpp │ │ │ │ ├── include_atlas.hpp │ │ │ │ ├── include_hdf5.hpp │ │ │ │ ├── include_superlu.hpp │ │ │ │ ├── injector_bones.hpp │ │ │ │ ├── injector_meat.hpp │ │ │ │ ├── lapack_bones.hpp │ │ │ │ ├── lapack_wrapper.hpp │ │ │ │ ├── memory.hpp │ │ │ │ ├── mtGlueCube_bones.hpp │ │ │ │ ├── mtGlueCube_meat.hpp │ │ │ │ ├── mtGlue_bones.hpp │ │ │ │ ├── mtGlue_meat.hpp │ │ │ │ ├── mtOpCube_bones.hpp │ │ │ │ ├── mtOpCube_meat.hpp │ │ │ │ ├── mtOp_bones.hpp │ │ │ │ ├── mtOp_meat.hpp │ │ │ │ ├── mtSpOp_bones.hpp │ │ │ │ ├── mtSpOp_meat.hpp │ │ │ │ ├── mul_gemm.hpp │ │ │ │ ├── mul_gemm_mixed.hpp │ │ │ │ ├── mul_gemv.hpp │ │ │ │ ├── mul_herk.hpp │ │ │ │ ├── mul_syrk.hpp │ │ │ │ ├── op_all_bones.hpp │ │ │ │ ├── op_all_meat.hpp │ │ │ │ ├── op_any_bones.hpp │ │ │ │ ├── op_any_meat.hpp │ │ │ │ ├── op_chol_bones.hpp │ │ │ │ ├── op_chol_meat.hpp │ │ │ │ ├── op_clamp_bones.hpp │ │ │ │ ├── op_clamp_meat.hpp │ │ │ │ ├── op_cor_bones.hpp │ │ │ │ ├── op_cor_meat.hpp │ │ │ │ ├── op_cov_bones.hpp │ │ │ │ ├── op_cov_meat.hpp │ │ │ │ ├── op_cumsum_bones.hpp │ │ │ │ ├── op_cumsum_meat.hpp │ │ │ │ ├── op_cx_scalar_bones.hpp │ │ │ │ ├── op_cx_scalar_meat.hpp │ │ │ │ ├── op_diagmat_bones.hpp │ │ │ │ ├── op_diagmat_meat.hpp │ │ │ │ ├── op_diagvec_bones.hpp │ │ │ │ ├── op_diagvec_meat.hpp │ │ │ │ ├── op_dot_bones.hpp │ │ │ │ ├── op_dot_meat.hpp │ │ │ │ ├── op_dotext_bones.hpp │ │ │ │ ├── op_dotext_meat.hpp │ │ │ │ ├── op_expmat_bones.hpp │ │ │ │ ├── op_expmat_meat.hpp │ │ │ │ ├── op_fft_bones.hpp │ │ │ │ ├── op_fft_meat.hpp │ │ │ │ ├── op_find_bones.hpp │ │ │ │ ├── op_find_meat.hpp │ │ │ │ ├── op_flip_bones.hpp │ │ │ │ ├── op_flip_meat.hpp │ │ │ │ ├── op_hist_bones.hpp │ │ │ │ ├── op_hist_meat.hpp │ │ │ │ ├── op_htrans_bones.hpp │ │ │ │ ├── op_htrans_meat.hpp │ │ │ │ ├── op_inv_bones.hpp │ │ │ │ ├── op_inv_meat.hpp │ │ │ │ ├── op_max_bones.hpp │ │ │ │ ├── op_max_meat.hpp │ │ │ │ ├── op_mean_bones.hpp │ │ │ │ ├── op_mean_meat.hpp │ │ │ │ ├── op_median_bones.hpp │ │ │ │ ├── op_median_meat.hpp │ │ │ │ ├── op_min_bones.hpp │ │ │ │ ├── op_min_meat.hpp │ │ │ │ ├── op_misc_bones.hpp │ │ │ │ ├── op_misc_meat.hpp │ │ │ │ ├── op_nonzeros_bones.hpp │ │ │ │ ├── op_nonzeros_meat.hpp │ │ │ │ ├── op_normalise_bones.hpp │ │ │ │ ├── op_normalise_meat.hpp │ │ │ │ ├── op_pinv_bones.hpp │ │ │ │ ├── op_pinv_meat.hpp │ │ │ │ ├── op_princomp_bones.hpp │ │ │ │ ├── op_princomp_meat.hpp │ │ │ │ ├── op_prod_bones.hpp │ │ │ │ ├── op_prod_meat.hpp │ │ │ │ ├── op_relational_bones.hpp │ │ │ │ ├── op_relational_meat.hpp │ │ │ │ ├── op_repmat_bones.hpp │ │ │ │ ├── op_repmat_meat.hpp │ │ │ │ ├── op_reshape_bones.hpp │ │ │ │ ├── op_reshape_meat.hpp │ │ │ │ ├── op_resize_bones.hpp │ │ │ │ ├── op_resize_meat.hpp │ │ │ │ ├── op_shuffle_bones.hpp │ │ │ │ ├── op_shuffle_meat.hpp │ │ │ │ ├── op_sort_bones.hpp │ │ │ │ ├── op_sort_index_bones.hpp │ │ │ │ ├── op_sort_index_meat.hpp │ │ │ │ ├── op_sort_meat.hpp │ │ │ │ ├── op_stddev_bones.hpp │ │ │ │ ├── op_stddev_meat.hpp │ │ │ │ ├── op_strans_bones.hpp │ │ │ │ ├── op_strans_meat.hpp │ │ │ │ ├── op_sum_bones.hpp │ │ │ │ ├── op_sum_meat.hpp │ │ │ │ ├── op_symmat_bones.hpp │ │ │ │ ├── op_symmat_meat.hpp │ │ │ │ ├── op_toeplitz_bones.hpp │ │ │ │ ├── op_toeplitz_meat.hpp │ │ │ │ ├── op_trimat_bones.hpp │ │ │ │ ├── op_trimat_meat.hpp │ │ │ │ ├── op_unique_bones.hpp │ │ │ │ ├── op_unique_meat.hpp │ │ │ │ ├── op_var_bones.hpp │ │ │ │ ├── op_var_meat.hpp │ │ │ │ ├── op_vectorise_bones.hpp │ │ │ │ ├── op_vectorise_meat.hpp │ │ │ │ ├── operator_cube_div.hpp │ │ │ │ ├── operator_cube_minus.hpp │ │ │ │ ├── operator_cube_plus.hpp │ │ │ │ ├── operator_cube_relational.hpp │ │ │ │ ├── operator_cube_schur.hpp │ │ │ │ ├── operator_cube_times.hpp │ │ │ │ ├── operator_div.hpp │ │ │ │ ├── operator_minus.hpp │ │ │ │ ├── operator_ostream.hpp │ │ │ │ ├── operator_plus.hpp │ │ │ │ ├── operator_relational.hpp │ │ │ │ ├── operator_schur.hpp │ │ │ │ ├── operator_times.hpp │ │ │ │ ├── podarray_bones.hpp │ │ │ │ ├── podarray_meat.hpp │ │ │ │ ├── promote_type.hpp │ │ │ │ ├── restrictors.hpp │ │ │ │ ├── running_stat_bones.hpp │ │ │ │ ├── running_stat_meat.hpp │ │ │ │ ├── running_stat_vec_bones.hpp │ │ │ │ ├── running_stat_vec_meat.hpp │ │ │ │ ├── sp_auxlib_bones.hpp │ │ │ │ ├── sp_auxlib_meat.hpp │ │ │ │ ├── span.hpp │ │ │ │ ├── spdiagview_bones.hpp │ │ │ │ ├── spdiagview_meat.hpp │ │ │ │ ├── spglue_join_bones.hpp │ │ │ │ ├── spglue_join_meat.hpp │ │ │ │ ├── spglue_minus_bones.hpp │ │ │ │ ├── spglue_minus_meat.hpp │ │ │ │ ├── spglue_plus_bones.hpp │ │ │ │ ├── spglue_plus_meat.hpp │ │ │ │ ├── spglue_times_bones.hpp │ │ │ │ ├── spglue_times_meat.hpp │ │ │ │ ├── spop_htrans_bones.hpp │ │ │ │ ├── spop_htrans_meat.hpp │ │ │ │ ├── spop_max_bones.hpp │ │ │ │ ├── spop_max_meat.hpp │ │ │ │ ├── spop_mean_bones.hpp │ │ │ │ ├── spop_mean_meat.hpp │ │ │ │ ├── spop_min_bones.hpp │ │ │ │ ├── spop_min_meat.hpp │ │ │ │ ├── spop_misc_bones.hpp │ │ │ │ ├── spop_misc_meat.hpp │ │ │ │ ├── spop_strans_bones.hpp │ │ │ │ ├── spop_strans_meat.hpp │ │ │ │ ├── spop_sum_bones.hpp │ │ │ │ ├── spop_sum_meat.hpp │ │ │ │ ├── spop_var_bones.hpp │ │ │ │ ├── spop_var_meat.hpp │ │ │ │ ├── strip.hpp │ │ │ │ ├── subview_bones.hpp │ │ │ │ ├── subview_cube_bones.hpp │ │ │ │ ├── subview_cube_meat.hpp │ │ │ │ ├── subview_each_bones.hpp │ │ │ │ ├── subview_each_meat.hpp │ │ │ │ ├── subview_elem1_bones.hpp │ │ │ │ ├── subview_elem1_meat.hpp │ │ │ │ ├── subview_elem2_bones.hpp │ │ │ │ ├── subview_elem2_meat.hpp │ │ │ │ ├── subview_field_bones.hpp │ │ │ │ ├── subview_field_meat.hpp │ │ │ │ ├── subview_meat.hpp │ │ │ │ ├── superlu_bones.hpp │ │ │ │ ├── superlu_wrapper.hpp │ │ │ │ ├── traits.hpp │ │ │ │ ├── typedef_elem.hpp │ │ │ │ ├── typedef_elem_check.hpp │ │ │ │ ├── typedef_mat.hpp │ │ │ │ ├── typedef_mat_fixed.hpp │ │ │ │ ├── unwrap.hpp │ │ │ │ ├── unwrap_cube.hpp │ │ │ │ ├── unwrap_spmat.hpp │ │ │ │ ├── upgrade_val.hpp │ │ │ │ ├── wall_clock_bones.hpp │ │ │ │ ├── wall_clock_meat.hpp │ │ │ │ ├── xtrans_mat_bones.hpp │ │ │ │ ├── xtrans_mat_meat.hpp │ │ │ │ ├── xvec_htrans_bones.hpp │ │ │ │ └── xvec_htrans_meat.hpp │ │ │ └── src/ │ │ │ └── wrapper.cpp │ │ ├── armanpy/ │ │ │ ├── example/ │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── FindNumPy.cmake │ │ │ │ ├── example.cpp │ │ │ │ ├── example.hpp │ │ │ │ ├── example.i │ │ │ │ └── example.py │ │ │ └── include/ │ │ │ ├── armanpy.hpp │ │ │ ├── armanpy.i │ │ │ ├── armanpy_1d.i │ │ │ ├── armanpy_2d.i │ │ │ ├── armanpy_3d.i │ │ │ └── numpy.i │ │ ├── clipper/ │ │ │ ├── CMakeLists.txt │ │ │ ├── include/ │ │ │ │ └── clipper.hpp │ │ │ └── src/ │ │ │ └── clipper.cpp │ │ ├── easylogging/ │ │ │ └── easylogging++.h │ │ ├── eikonal/ │ │ │ ├── CMakeLists.txt │ │ │ ├── include/ │ │ │ │ ├── FMM_API.h │ │ │ │ ├── FMM_Config2d.h │ │ │ │ ├── FMM_Config3d.h │ │ │ │ ├── FMM_Core.h │ │ │ │ ├── FMM_Heap.h │ │ │ │ └── FMM_Macros.h │ │ │ └── src/ │ │ │ ├── FMM_Core.c │ │ │ ├── FMM_Heap.c │ │ │ ├── FMM_eikonal2d.c │ │ │ └── FMM_eikonal3d.c │ │ ├── fftw3-win32/ │ │ │ ├── fftw3.f │ │ │ ├── fftw3.f03 │ │ │ ├── fftw3.h │ │ │ ├── fftw3l.f03 │ │ │ ├── fftw3q.f03 │ │ │ ├── libfftw3-3.def │ │ │ ├── libfftw3.a │ │ │ ├── libfftw3f-3.def │ │ │ └── libfftw3l-3.def │ │ ├── fourier/ │ │ │ ├── CMakeLists.txt │ │ │ ├── include/ │ │ │ │ ├── basics.h │ │ │ │ ├── fourier.h │ │ │ │ └── primes.h │ │ │ ├── src/ │ │ │ │ ├── check.c │ │ │ │ ├── fourier.c │ │ │ │ └── primes.c │ │ │ └── tools/ │ │ │ └── generate_twiddles.m │ │ └── kissfft/ │ │ ├── CMakeLists.txt │ │ ├── include/ │ │ │ ├── _kiss_fft_guts.h │ │ │ ├── kiss_fft.h │ │ │ └── kiss_fftnd.h │ │ └── src/ │ │ ├── kiss_fft.c │ │ └── kiss_fftnd.c │ ├── optolithiumc.i │ ├── plugins/ │ │ ├── CMakeLists.txt │ │ └── src/ │ │ ├── dev_models/ │ │ │ ├── enhanced.c │ │ │ ├── enhanced_notch.c │ │ │ ├── mack.c │ │ │ ├── notch.c │ │ │ └── notch_depth.c │ │ ├── masks/ │ │ │ ├── fiveBarLine.c │ │ │ ├── line1D.c │ │ │ ├── line1D_SRAF.c │ │ │ └── space1D.c │ │ ├── pupil_filters/ │ │ │ └── central_obscuration.c │ │ └── source_shapes/ │ │ ├── annular.c │ │ ├── coherent.c │ │ └── convenient.c │ └── src/ │ ├── opl_capi.cpp │ ├── opl_contours.cpp │ ├── opl_geometry.cpp │ ├── opl_interp.cpp │ ├── opl_log.cpp │ └── opl_sim.cpp ├── OptolithiumGui/ │ ├── auxmath.py │ ├── config.py │ ├── core.py │ ├── database/ │ │ ├── Enum.py │ │ ├── __init__.py │ │ ├── base.py │ │ ├── common.py │ │ ├── dbparser.py │ │ ├── orm.py │ │ └── settings.py │ ├── helpers.py │ ├── info.py │ ├── main.py │ ├── matplotlibrc │ ├── metrics.py │ ├── mpl-data/ │ │ ├── fonts/ │ │ │ ├── afm/ │ │ │ │ ├── cmex10.afm │ │ │ │ ├── cmmi10.afm │ │ │ │ ├── cmr10.afm │ │ │ │ ├── cmsy10.afm │ │ │ │ ├── cmtt10.afm │ │ │ │ ├── pagd8a.afm │ │ │ │ ├── pagdo8a.afm │ │ │ │ ├── pagk8a.afm │ │ │ │ ├── pagko8a.afm │ │ │ │ ├── pbkd8a.afm │ │ │ │ ├── pbkdi8a.afm │ │ │ │ ├── pbkl8a.afm │ │ │ │ ├── pbkli8a.afm │ │ │ │ ├── pcrb8a.afm │ │ │ │ ├── pcrbo8a.afm │ │ │ │ ├── pcrr8a.afm │ │ │ │ ├── pcrro8a.afm │ │ │ │ ├── phvb8a.afm │ │ │ │ ├── phvb8an.afm │ │ │ │ ├── phvbo8a.afm │ │ │ │ ├── phvbo8an.afm │ │ │ │ ├── phvl8a.afm │ │ │ │ ├── phvlo8a.afm │ │ │ │ ├── phvr8a.afm │ │ │ │ ├── phvr8an.afm │ │ │ │ ├── phvro8a.afm │ │ │ │ ├── phvro8an.afm │ │ │ │ ├── pncb8a.afm │ │ │ │ ├── pncbi8a.afm │ │ │ │ ├── pncr8a.afm │ │ │ │ ├── pncri8a.afm │ │ │ │ ├── pplb8a.afm │ │ │ │ ├── pplbi8a.afm │ │ │ │ ├── pplr8a.afm │ │ │ │ ├── pplri8a.afm │ │ │ │ ├── psyr.afm │ │ │ │ ├── ptmb8a.afm │ │ │ │ ├── ptmbi8a.afm │ │ │ │ ├── ptmr8a.afm │ │ │ │ ├── ptmri8a.afm │ │ │ │ ├── putb8a.afm │ │ │ │ ├── putbi8a.afm │ │ │ │ ├── putr8a.afm │ │ │ │ ├── putri8a.afm │ │ │ │ ├── pzcmi8a.afm │ │ │ │ └── pzdr.afm │ │ │ ├── pdfcorefonts/ │ │ │ │ ├── Courier-Bold.afm │ │ │ │ ├── Courier-BoldOblique.afm │ │ │ │ ├── Courier-Oblique.afm │ │ │ │ ├── Courier.afm │ │ │ │ ├── Helvetica-Bold.afm │ │ │ │ ├── Helvetica-BoldOblique.afm │ │ │ │ ├── Helvetica-Oblique.afm │ │ │ │ ├── Helvetica.afm │ │ │ │ ├── Symbol.afm │ │ │ │ ├── Times-Bold.afm │ │ │ │ ├── Times-BoldItalic.afm │ │ │ │ ├── Times-Italic.afm │ │ │ │ ├── Times-Roman.afm │ │ │ │ └── ZapfDingbats.afm │ │ │ └── ttf/ │ │ │ └── LICENSE_STIX │ │ ├── images/ │ │ │ ├── back.ppm │ │ │ ├── back.xpm │ │ │ ├── filesave.ppm │ │ │ ├── filesave.xpm │ │ │ ├── forward.ppm │ │ │ ├── forward.xpm │ │ │ ├── hand.ppm │ │ │ ├── hand.xpm │ │ │ ├── home.ppm │ │ │ ├── home.xpm │ │ │ ├── move.ppm │ │ │ ├── move.xpm │ │ │ ├── stock_close.ppm │ │ │ ├── stock_close.xpm │ │ │ ├── stock_down.ppm │ │ │ ├── stock_down.xpm │ │ │ ├── stock_left.ppm │ │ │ ├── stock_left.xpm │ │ │ ├── stock_refresh.ppm │ │ │ ├── stock_refresh.xpm │ │ │ ├── stock_right.ppm │ │ │ ├── stock_right.xpm │ │ │ ├── stock_save_as.ppm │ │ │ ├── stock_save_as.xpm │ │ │ ├── stock_up.ppm │ │ │ ├── stock_up.xpm │ │ │ ├── stock_zoom-in.ppm │ │ │ ├── stock_zoom-in.xpm │ │ │ ├── stock_zoom-out.ppm │ │ │ ├── stock_zoom-out.xpm │ │ │ ├── subplots.ppm │ │ │ ├── subplots.xpm │ │ │ ├── zoom_to_rect.ppm │ │ │ └── zoom_to_rect.xpm │ │ └── lineprops.glade │ ├── options/ │ │ ├── __init__.py │ │ ├── common.py │ │ └── structures.py │ ├── optolithium.py │ ├── pcpi.py │ ├── physc.py │ ├── plugins.py │ ├── qt.py │ ├── resources.py │ ├── setup.py │ ├── share/ │ │ ├── data/ │ │ │ ├── Air-Vacuum.MAT │ │ │ ├── Si Dioxide.MAT │ │ │ ├── Si Nitride.MAT │ │ │ ├── Silicon.MAT │ │ │ ├── a-Polysilicon.MAT │ │ │ ├── fivebar.MSK │ │ │ └── i-line.res │ │ └── misc/ │ │ ├── magic │ │ └── magic.mgc │ ├── views/ │ │ ├── __init__.py │ │ ├── appconfig.py │ │ ├── common.py │ │ ├── controls.py │ │ ├── dbview.py │ │ ├── development.py │ │ ├── diffraction.py │ │ ├── exposure.py │ │ ├── imaging.py │ │ ├── mask.py │ │ ├── metrology.py │ │ ├── numerics.py │ │ ├── peb.py │ │ ├── resist.py │ │ ├── sets.py │ │ ├── simulations.py │ │ ├── summary.py │ │ └── wafer.py │ └── xhtml/ │ └── report.xhtml ├── README.md └── installer/ ├── GPL-V2.rtf └── Optolithium.aip ================================================ FILE CONTENTS ================================================ ================================================ FILE: .hgignore ================================================ syntax: glob OptolithiumGui/icons/.DS_Store OptolithiumGui/database/.DS_Store .DS_Store OptolithiumC/.idea/* OptolithiumC/.settings/* OptolithiumC/.cproject OptolithiumC/.project OptolithiumGui/.idea/* OptolithiumGui/.project OptolithiumC/build/* OptolithiumC/CMakeFiles/* OptolithiumC/plugins/CMakeFiles/* OptolithiumC/plugins/build/* OptolithiumGui/_clipper.so OptolithiumGui/_optolithiumc.so OptolithiumC/plugins/cmake_install.cmake OptolithiumC/plugins/Makefile OptolithiumC/liboptolithiumc.a OptolithiumC/cmake_install.cmake OptolithiumGui/clipper.py OptolithiumC/CMakeCache.txt OptolithiumC/Makefile OptolithiumGui/optolithiumc.py OptolithiumGui/*.pyc OptolithiumGui/database/*.pyc OptolithiumGui/options/*.pyc OptolithiumGui/views/*.pyc OptolithiumC/libs/clipper/CMakeFiles/* OptolithiumC/libs/eikonal/CMakeFiles/* OptolithiumC/libs/kissfft/CMakeFiles/* OptolithiumC/install_manifest.txt OptolithiumC/libs/clipper/Makefile OptolithiumC/libs/clipper/cmake_install.cmake OptolithiumC/libs/clipper/libpolyclipping.a OptolithiumC/libs/eikonal/Makefile OptolithiumC/libs/eikonal/cmake_install.cmake OptolithiumC/libs/eikonal/libeikonal.a OptolithiumC/libs/kissfft/Makefile OptolithiumC/libs/kissfft/cmake_install.cmake OptolithiumC/libs/kissfft/libkissfft.a OptolithiumGui/logs/myeasylog.log OptolithiumGui/test/* OptolithiumC/libs/fourier/CMakeFiles/* OptolithiumC/libs/fourier/libfourier.a OptolithiumC/libs/fourier/cmake_install.cmake OptolithiumC/libs/fourier/Makefile OptolithiumC/libs/fourier/check OptolithiumGui/logs/* OptolithiumGui/plugins/dev_models/*.dylib OptolithiumGui/plugins/masks/*.dylib OptolithiumGui/plugins/source_shapes/*.dylib OptolithiumGui/plugins/pupil_filters/*.dylib OptolithiumGui/*.db OptolithiumC/plugins/*.dll OptolithiumC/plugins/*.dll.a OptolithiumGui/build/* OptolithiumGui/plugins/* OptolithiumGui/_optolithiumc.pyd OptolithiumGui/_clipper.pyd OptolithiumC/_optolithiumc.pyd OptolithiumC/_clipper.pyd installer/Optolithium-cache/* installer/Optolithium-SetupFiles/* ================================================ FILE: COPYRIGHT ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ ================================================ FILE: LICENSE.TXT ================================================ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program 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 2 of the License, or (at your option) any later version. This program 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 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. ================================================ FILE: OptolithiumC/CMakeLists.txt ================================================ PROJECT("optolithiumc") CMAKE_MINIMUM_REQUIRED(VERSION 2.8) CMAKE_POLICY(SET CMP0015 NEW) SET(CMAKE_USE_RELATIVE_PATHS ON) SET(CMAKE_SKIP_RPATH TRUE) SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) SET(OPTOLITHIUMGUI_DIR "${CMAKE_HOME_DIRECTORY}/../OptolithiumGui") SET(CMAKE_MODULE_PATH "${CMAKE_HOME_DIRECTORY}") # SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${OPTOLITHIUMGUI_DIR}") # SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${OPTOLITHIUMGUI_DIR}") SET(OPTOLITHIUMC_DIR "src") SET(LIBRARIES_DIR "libs") SET(OPTOLITHIUMC_USE_FFTW_LIBRARY "ON") # SET(OPTOLITHIUMC_USE_KISSFFT_LIBRARY "ON") # SET(OPTOLITHIUMC_USE_FOURIER_LIBRARY "ON") SET(EIKONAL_DIR "${LIBRARIES_DIR}/eikonal") SET(CLIPPER_DIR "${LIBRARIES_DIR}/clipper") SET(KISSFFT_DIR "${LIBRARIES_DIR}/kissfft") SET(FOURIER_DIR "${LIBRARIES_DIR}/fourier") ADD_DEFINITIONS(-DARMA_NO_DEBUG) ADD_DEFINITIONS(-D_ELPP_DISABLE_PERFORMANCE_TRACKING) ADD_DEFINITIONS(-D__NO_MINGW_LFS) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include cmath -std=gnu++11 -Wall") SET(ARMADILLO_INCLUDE_DIR "${LIBRARIES_DIR}/armadillo/include/") SET(ARMANPY_INCLUDE_DIR "${LIBRARIES_DIR}/armanpy/include") SET(EASYLOGGING_INCLUDE_DIR "${LIBRARIES_DIR}/easylogging") SET(EIKONAL_INCLUDE_DIR "${EIKONAL_DIR}/include") SET(CLIPPER_INCLUDE_DIR "${CLIPPER_DIR}/include") SET(CMAKE_BUILD_TYPE "Release") FIND_PACKAGE(Threads REQUIRED) FIND_PACKAGE(SWIG REQUIRED) FIND_PACKAGE(PythonLibs 2.7 REQUIRED) FIND_PACKAGE(NumPy REQUIRED) IF (DEFINED OPTOLITHIUMC_USE_FFTW_LIBRARY) IF (WIN32) SET(FFTW_DIR "${LIBRARIES_DIR}/fftw3-win32") INCLUDE_DIRECTORIES(${FFTW_DIR}) ELSE() FIND_PACKAGE(FFTW REQUIRED) INCLUDE_DIRECTORIES("${FFTW_INCLUDES}") ENDIF() ELSEIF (DEFINED OPTOLITHIUMC_USE_KISSFFT_LIBRARY) ADD_SUBDIRECTORY(${KISSFFT_DIR}) INCLUDE_DIRECTORIES("${KISSFFT_DIR}/include") ELSEIF (DEFINED OPTOLITHIUMC_USE_FOURIER_LIBRARY) ADD_SUBDIRECTORY(${FOURIER_DIR}) INCLUDE_DIRECTORIES("${FOURIER_DIR}/include") ENDIF() INCLUDE("${SWIG_USE_FILE}") INCLUDE_DIRECTORIES("include") INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}") INCLUDE_DIRECTORIES("${PYTHON_INCLUDE_DIR}") INCLUDE_DIRECTORIES("${ARMADILLO_INCLUDE_DIR}") INCLUDE_DIRECTORIES("${ARMANPY_INCLUDE_DIR}") INCLUDE_DIRECTORIES("${NUMPY_INCLUDE_DIRS}") INCLUDE_DIRECTORIES("${EASYLOGGING_INCLUDE_DIR}") INCLUDE_DIRECTORIES("${EIKONAL_INCLUDE_DIR}") INCLUDE_DIRECTORIES("${CLIPPER_INCLUDE_DIR}") ADD_SUBDIRECTORY("${EIKONAL_DIR}") ADD_SUBDIRECTORY("${CLIPPER_DIR}") ADD_SUBDIRECTORY("plugins") # build the optolithiumc library ADD_LIBRARY(optolithiumc STATIC "${OPTOLITHIUMC_DIR}/opl_log.cpp" "${OPTOLITHIUMC_DIR}/opl_geometry.cpp" "${OPTOLITHIUMC_DIR}/opl_contours.cpp" "${OPTOLITHIUMC_DIR}/opl_interp.cpp" "${OPTOLITHIUMC_DIR}/opl_capi.cpp" "${OPTOLITHIUMC_DIR}/opl_sim.cpp" ) LINK_DIRECTORIES("${CLIPPER_DIR}") TARGET_LINK_LIBRARIES(optolithiumc "eikonal") IF (DEFINED OPTOLITHIUMC_USE_FFTW_LIBRARY) IF (WIN32) LINK_DIRECTORIES("${FFTW_DIR}") TARGET_LINK_LIBRARIES(optolithiumc "fftw3") ELSE() TARGET_LINK_LIBRARIES(optolithiumc ${FFTW_LIBRARIES}) ENDIF() ADD_DEFINITIONS(-DOPTOLITHIUMC_USE_FFTW_LIBRARY) ELSEIF (DEFINED OPTOLITHIUMC_USE_KISSFFT_LIBRARY) TARGET_LINK_LIBRARIES(optolithiumc "kissfft") ADD_DEFINITIONS(-DOPTOLITHIUMC_USE_KISSFFT_LIBRARY) ELSEIF (DEFINED OPTOLITHIUMC_USE_FOURIER_LIBRARY) TARGET_LINK_LIBRARIES(optolithiumc "fourier") ADD_DEFINITIONS(-DOPTOLITHIUMC_USE_FOURIER_LIBRARY) ENDIF() # Swig shall but all stuff to the same directory where the *.so or *.pyd are placed SET(CMAKE_SWIG_OUTDIR "${CMAKE_HOME_DIRECTORY}/build/") # Set up the swig wrapper for optolithiumc SET_SOURCE_FILES_PROPERTIES(optolithiumc.i PROPERTIES CPLUSPLUS ON) SET_SOURCE_FILES_PROPERTIES(optolithiumc.i PROPERTIES SWIG_FLAGS "-ignoremissing;-w509") SWIG_ADD_MODULE(optolithiumc python optolithiumc.i) SWIG_LINK_LIBRARIES(optolithiumc optolithiumc ${PYTHON_LIBRARIES}) # Set up the swig wrapper for clipper SET_SOURCE_FILES_PROPERTIES(clipper.i PROPERTIES CPLUSPLUS ON) SET_SOURCE_FILES_PROPERTIES(clipper.i PROPERTIES SWIG_FLAGS "-ignoremissing;-w509") SWIG_ADD_MODULE(clipper python clipper.i) SWIG_LINK_LIBRARIES(clipper polyclipping ${PYTHON_LIBRARIES}) # Install stage INSTALL(FILES "${CMAKE_SWIG_OUTDIR}/optolithiumc.py" DESTINATION "${OPTOLITHIUMGUI_DIR}") INSTALL(FILES "${CMAKE_SWIG_OUTDIR}/clipper.py" DESTINATION "${OPTOLITHIUMGUI_DIR}") INSTALL(TARGETS _optolithiumc _clipper LIBRARY DESTINATION "${OPTOLITHIUMGUI_DIR}") INSTALL(TARGETS _optolithiumc _clipper LIBRARY DESTINATION "${CMAKE_HOME_DIRECTORY}/build") # ADD_CUSTOM_COMMAND(TARGET _optolithiumc PRE_BUILD # COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_HOME_DIRECTORY}/build/optolithiumcPYTHON_wrap.cxx # COMMAND ${CMAKE_COMMAND} -E remove "${OPTOLITHIUMGUI_DIR}/optolithiumc.py" # ) # ADD_CUSTOM_COMMAND(TARGET _clipper PRE_BUILD # COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_HOME_DIRECTORY}/build/clipperPYTHON_wrap.cxx # COMMAND ${CMAKE_COMMAND} -E remove "${OPTOLITHIUMGUI_DIR}/clipper.py" # ) ================================================ FILE: OptolithiumC/FindFFTW.cmake ================================================ # - Find FFTW # Find the native FFTW includes and library # # FFTW_INCLUDES - where to find fftw3.h # FFTW_LIBRARIES - List of libraries when using FFTW. # FFTW_FOUND - True if FFTW found. if (FFTW_INCLUDES) # Already in cache, be silent set (FFTW_FIND_QUIETLY TRUE ) endif (FFTW_INCLUDES) find_path (FFTW_INCLUDES fftw3.h) find_library (FFTW_LIBRARIES NAMES fftw3) # handle the QUIETLY and REQUIRED arguments and set FFTW_FOUND to TRUE if # all listed variables are TRUE include (FindPackageHandleStandardArgs) find_package_handle_standard_args (FFTW DEFAULT_MSG FFTW_LIBRARIES FFTW_INCLUDES) mark_as_advanced (FFTW_LIBRARIES FFTW_INCLUDES) ================================================ FILE: OptolithiumC/FindNumPy.cmake ================================================ # - Find the NumPy libraries # This module finds if NumPy is installed, and sets the following variables # indicating where it is. # # TODO: Update to provide the libraries and paths for linking npymath lib. # # NUMPY_FOUND - was NumPy found # NUMPY_VERSION - the version of NumPy found as a string # NUMPY_VERSION_MAJOR - the major version number of NumPy # NUMPY_VERSION_MINOR - the minor version number of NumPy # NUMPY_VERSION_PATCH - the patch version number of NumPy # NUMPY_VERSION_DECIMAL - e.g. version 1.6.1 is 10601 # NUMPY_INCLUDE_DIRS - path to the NumPy include files #============================================================================ # Copyright 2012 Continuum Analytics, Inc. # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. # #============================================================================ # Finding NumPy involves calling the Python interpreter if(NumPy_FIND_REQUIRED) find_package(PythonInterp REQUIRED) else() find_package(PythonInterp) endif() if(NOT PYTHONINTERP_FOUND) set(NUMPY_FOUND FALSE) return() endif() execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import numpy as n; print(n.__version__); print(n.get_include());" RESULT_VARIABLE _NUMPY_SEARCH_SUCCESS OUTPUT_VARIABLE _NUMPY_VALUES_OUTPUT ERROR_VARIABLE _NUMPY_ERROR_VALUE OUTPUT_STRIP_TRAILING_WHITESPACE) if(NOT _NUMPY_SEARCH_SUCCESS MATCHES 0) if(NumPy_FIND_REQUIRED) message(FATAL_ERROR "NumPy import failure:\n${_NUMPY_ERROR_VALUE}") endif() set(NUMPY_FOUND FALSE) return() endif() # Convert the process output into a list string(REGEX REPLACE ";" "\\\\;" _NUMPY_VALUES ${_NUMPY_VALUES_OUTPUT}) string(REGEX REPLACE "\n" ";" _NUMPY_VALUES ${_NUMPY_VALUES}) # Just in case there is unexpected output from the Python command. list(GET _NUMPY_VALUES -2 NUMPY_VERSION) list(GET _NUMPY_VALUES -1 NUMPY_INCLUDE_DIRS) string(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" _VER_CHECK "${NUMPY_VERSION}") if("${_VER_CHECK}" STREQUAL "") # The output from Python was unexpected. Raise an error always # here, because we found NumPy, but it appears to be corrupted somehow. message(FATAL_ERROR "Requested version and include path from NumPy, got instead:\n${_NUMPY_VALUES_OUTPUT}\n") return() endif() # Make sure all directory separators are '/' string(REGEX REPLACE "\\\\" "/" NUMPY_INCLUDE_DIRS ${NUMPY_INCLUDE_DIRS}) # Get the major and minor version numbers string(REGEX REPLACE "\\." ";" _NUMPY_VERSION_LIST ${NUMPY_VERSION}) list(GET _NUMPY_VERSION_LIST 0 NUMPY_VERSION_MAJOR) list(GET _NUMPY_VERSION_LIST 1 NUMPY_VERSION_MINOR) list(GET _NUMPY_VERSION_LIST 2 NUMPY_VERSION_PATCH) string(REGEX MATCH "[0-9]*" NUMPY_VERSION_PATCH ${NUMPY_VERSION_PATCH}) math(EXPR NUMPY_VERSION_DECIMAL "(${NUMPY_VERSION_MAJOR} * 10000) + (${NUMPY_VERSION_MINOR} * 100) + ${NUMPY_VERSION_PATCH}") find_package_message(NUMPY "Found NumPy: version \"${NUMPY_VERSION}\" ${NUMPY_INCLUDE_DIRS}" "${NUMPY_INCLUDE_DIRS}${NUMPY_VERSION}") set(NUMPY_FOUND TRUE) ================================================ FILE: OptolithiumC/clipper.i ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ %module clipper %{ #include "clipper.hpp" %} %include %include "clipper.hpp" %template(Path) std::vector; %template(Paths) std::vector; namespace ClipperLib { %pythoncode %{ def merge(polygons, fillType=pftNonZero): result = Paths() c = Clipper(); # c.ForceSimple = True for polygon in polygons: path = Path([IntPoint(*p) for p in polygon]) c.AddPath(path, ptSubject, True); c.Execute(ctUnion, result, fillType, fillType) return [[(point.X, point.Y) for point in polygon] for polygon in polygons] %} } ================================================ FILE: OptolithiumC/examples/aerial_image_various_source_shapes.py ================================================ __author__ = 'OlaPsema' import optolithiumc as oplc import numpy as np import matplotlib.pyplot as plt def get_quasar_source_shape_model(x, y, sigma_in, sigma_out, blade_angle): xv, yv = np.meshgrid(x, y) if blade_angle <= 90.: blade_angle = (90. + blade_angle) / 2. cond3 = np.abs(yv) <= np.abs(np.tan(np.deg2rad(blade_angle)) * x) cond4 = np.abs(xv) <= np.abs(np.tan(np.deg2rad(blade_angle)) * np.transpose(np.array([y]))) else: cond3 = cond4 = 1 cond1 = ((xv - 0.) ** 2 + (yv - 0.) ** 2) <= sigma_out ** 2 cond2 = ((xv - 0.) ** 2 + (yv - 0.) ** 2) >= sigma_in ** 2 val = np.array(cond1 & cond2 & cond3 & cond4, dtype=float) plt.imshow(val) plt.show() val = np.asfortranarray(val / np.sum(val)) return val def get_conventional_coherent_source_shape_model(step, x, y): xv, yv = np.meshgrid(x, y) val = np.array(((xv - 0.) ** 2 + (yv - 0.) ** 2) <= (step / 10.) ** 2, dtype=float) plt.imshow(val) plt.show() return np.asfortranarray(val) def get_conventional_partially_coherent_source_shape_model(x, y, sigma): xv, yv = np.meshgrid(x, y) cond = ((xv - 0.) ** 2 + (yv - 0.) ** 2) <= sigma ** 2 val = np.array(cond, dtype=float) plt.imshow(val) plt.show() val = np.asfortranarray(val / np.sum(val)) return val def get_annular_source_shape_model(x, y, sigma_in, sigma_out): xv, yv = np.meshgrid(x, y) cond1 = ((xv - 0.) ** 2 + (yv - 0.) ** 2) <= sigma_out ** 2 cond2 = ((xv - 0.) ** 2 + (yv - 0.) ** 2) >= sigma_in ** 2 val = np.array(cond1 & cond2, dtype=float) plt.imshow(val) plt.show() val = np.asfortranarray(val / np.sum(val)) return val def get_dipole_source_shape_model(x, y, center_sigma, radius_sigma): xv, yv = np.meshgrid(x, y) cond1 = ((xv - center_sigma) ** 2 + (yv - 0.) ** 2) <= radius_sigma ** 2 cond2 = ((xv + center_sigma) ** 2 + (yv - 0.) ** 2) <= radius_sigma ** 2 val = np.array(cond1 | cond2, dtype=float) plt.imshow(val) plt.show() val = np.asfortranarray(val / np.sum(val)) return val def get_monopole_source_shape_model(x, y, center_x, center_y, radius_sigma): xv, yv = np.meshgrid(x, y) cond1 = ((xv - center_x) ** 2 + (yv + center_y) ** 2) <= radius_sigma ** 2 val = np.array(cond1, dtype=float) plt.imshow(val) plt.show() val = np.asfortranarray(val / np.sum(val)) return val def get_quadrupole_source_shape_model(x, y, center_sigma, radius_sigma, geometry_type): xv, yv = np.meshgrid(x, y) if geometry_type == 1: center_sigma = center_sigma * np.sqrt(1. / 2.) cond1 = ((xv - center_sigma) ** 2 + (yv - center_sigma) ** 2) <= radius_sigma ** 2 cond2 = ((xv - center_sigma) ** 2 + (yv + center_sigma) ** 2) <= radius_sigma ** 2 cond3 = ((xv + center_sigma) ** 2 + (yv - center_sigma) ** 2) <= radius_sigma ** 2 cond4 = ((xv + center_sigma) ** 2 + (yv + center_sigma) ** 2) <= radius_sigma ** 2 else: cond1 = ((xv - center_sigma) ** 2 + (yv - 0.) ** 2) <= radius_sigma ** 2 cond2 = ((xv + center_sigma) ** 2 + (yv + 0.) ** 2) <= radius_sigma ** 2 cond3 = ((xv - 0.) ** 2 + (yv - center_sigma) ** 2) <= radius_sigma ** 2 cond4 = ((xv - 0.) ** 2 + (yv + center_sigma) ** 2) <= radius_sigma ** 2 val = np.array(cond1 | cond2 | cond3 | cond4, dtype=float) plt.imshow(val) plt.show() val = np.asfortranarray(val / np.sum(val)) return val def get_shrinc_source_shape_model(x, y, sigma_out, stripe_width): xv, yv = np.meshgrid(x, y) cond1 = ((xv - 0.) ** 2 + (yv - 0.) ** 2) <= sigma_out ** 2 cond2 = np.abs(yv) >= stripe_width/2. cond3 = np.abs(xv) >= stripe_width/2. val = np.array(cond1 & cond2 & cond3, dtype=float) plt.imshow(val) plt.show() val = np.asfortranarray(val / np.sum(val)) return val def get_square_source_shape_model(x, y, half_width_sigma): xv, yv = np.meshgrid(x, y) cond1 = np.abs(yv) <= half_width_sigma cond2 = np.abs(xv) <= half_width_sigma val = np.array(cond1 & cond2, dtype=float) plt.imshow(val) plt.show() val = np.asfortranarray(val / np.sum(val)) return val class AerialImage(object): def __init__(self): # setting pattern properties: # example: pattern with 1 feature _I_ self.featureWidth = 240. # nm self.pitch = 600. # nm self.featureTransmittance = 0. # from 0. to 1. self.maskTransmittance = 1. # from 0. to 1. self.featurePhase = 0. self.maskPhase = 0. self.wavelength = 365.0 # nanometers self.numericalAperture = 0.9 self.reductionRatio = 1.0 self.flare = 0. self.immersion = 0. self.focus = 0. self.nominalDose = 145 # mJ/cm^2 self.correctable = 0.5 self.sourceStep = 0.01 self.maskStep = 5. self.sourceShapeType = 6 # 1 - conventional coherent # 3 - conventional partially coherent # 4 - dipole # 5 - monopole # 6 - quadrupole # 7 - quasar # 8 - shrinc # 9 - square # 10 - annular self.aerial_image_formation() def source_shape_model_choice(self, x, y): if self.sourceShapeType == 1: return get_conventional_coherent_source_shape_model(self.sourceStep, x, y) elif self.sourceShapeType == 3: return get_conventional_partially_coherent_source_shape_model(x, y, sigma=0.5) elif self.sourceShapeType == 4: return get_dipole_source_shape_model(x, y, center_sigma=0.5, radius_sigma=0.3) elif self.sourceShapeType == 5: return get_monopole_source_shape_model(x, y, center_x=0.5, center_y=0.3, radius_sigma=0.2) elif self.sourceShapeType == 6: # types: # 1 - Normal (90deg) # 2 - Cross (45deg) return get_quadrupole_source_shape_model(x, y, center_sigma=0.5, radius_sigma=0.2, geometry_type=1) elif self.sourceShapeType == 7: return get_quasar_source_shape_model(x, y, sigma_in=0.4, sigma_out=0.8, blade_angle=60.) elif self.sourceShapeType == 8: return get_shrinc_source_shape_model(x, y, sigma_out=0.8, stripe_width=0.2) elif self.sourceShapeType == 9: return get_square_source_shape_model(x, y, half_width_sigma=0.5) elif self.sourceShapeType == 10: return get_annular_source_shape_model(x, y, sigma_in=0.4, sigma_out=0.8) else: raise ValueError("Wrong source shape id") def aerial_image_formation(self): core_logging = oplc.OptolithiumCoreLog() core_logging.set_verbose_level(0) # feature formation point1 = oplc.Point2d(-self.featureWidth / 2., 0.) point2 = oplc.Point2d(self.featureWidth / 2., 0.) points_array = oplc.Points2dArray((point1, point2)) region = oplc.Region(points_array, self.featureTransmittance, self.featurePhase) region_array = (region, ) # repeatable part formation point1 = oplc.Point2d(-self.pitch / 2., 0.) point2 = oplc.Point2d(self.pitch / 2., 0.) box = oplc.Box(point1, point2, self.maskTransmittance, self.maskPhase) # mask formation mask = oplc.Mask(region_array, box) # source calculation points_count = int(2 / self.sourceStep) + 1 nx, ny = (points_count, points_count) x = np.linspace(-1, 1, nx) y = np.linspace(-1, 1, ny) x = np.round(x/self.sourceStep)*self.sourceStep y = np.round(y/self.sourceStep)*self.sourceStep values = self.source_shape_model_choice(x, y) source_shape_model_sheet = oplc.SourceShapeModelSheet(x, y, values) source_shape = oplc.SourceShape(source_shape_model_sheet, self.sourceStep, self.sourceStep) pupil_filter_model = oplc.PupilFilterModelEmpty() imaging_tool = oplc.ImagingTool(source_shape, pupil_filter_model, self.wavelength, self.numericalAperture, self.reductionRatio, self.flare, self.immersion) diffraction = oplc.diffraction(imaging_tool, mask) exposure = oplc.Exposure(self.focus, self.nominalDose, self.correctable) optical_transfer_function = oplc.OpticalTransferFunction(imaging_tool, exposure, None) aerial_image = oplc.aerial_image(diffraction, optical_transfer_function, self.maskStep) plt.plot(aerial_image.x, aerial_image.values[0]) plt.show() with open("results.txt", 'w') as f: for i in range(len(aerial_image.x)): f.write('%f' % aerial_image.x[i]) f.write("\t") f.write('%f' % aerial_image.values[0][i]) f.write("\n") def main(): AerialImage() if __name__ == "__main__": main() ================================================ FILE: OptolithiumC/examples/resist_images_and_contours.py ================================================ __author__ = 'OlaPsema' import optolithiumc as oplc import numpy as np import matplotlib.pyplot as plt def get_quasar_source_shape_model(x, y, sigma_in, sigma_out, blade_angle): xv, yv = np.meshgrid(x, y) if blade_angle <= 90.: blade_angle = (90. + blade_angle) / 2. cond3 = np.abs(yv) <= np.abs(np.tan(np.deg2rad(blade_angle)) * x) cond4 = np.abs(xv) <= np.abs(np.tan(np.deg2rad(blade_angle)) * np.transpose(np.array([y]))) else: cond3 = cond4 = 1 cond1 = ((xv - 0.) ** 2 + (yv - 0.) ** 2) <= sigma_out ** 2 cond2 = ((xv - 0.) ** 2 + (yv - 0.) ** 2) >= sigma_in ** 2 val = np.array(cond1 & cond2 & cond3 & cond4, dtype=float) plt.imshow(val) plt.show() val = np.asfortranarray(val / np.sum(val)) return val def get_conventional_coherent_source_shape_model(step, x, y): xv, yv = np.meshgrid(x, y) val = np.array(((xv - 0.) ** 2 + (yv - 0.) ** 2) <= (step / 10.) ** 2, dtype=float) plt.imshow(val) plt.show() return np.asfortranarray(val) def get_conventional_partially_coherent_source_shape_model(x, y, sigma): xv, yv = np.meshgrid(x, y) cond = ((xv - 0.) ** 2 + (yv - 0.) ** 2) <= sigma ** 2 val = np.array(cond, dtype=float) plt.imshow(val) plt.show() val = np.asfortranarray(val / np.sum(val)) return val def get_annular_source_shape_model(x, y, sigma_in, sigma_out): xv, yv = np.meshgrid(x, y) cond1 = ((xv - 0.) ** 2 + (yv - 0.) ** 2) <= sigma_out ** 2 cond2 = ((xv - 0.) ** 2 + (yv - 0.) ** 2) >= sigma_in ** 2 val = np.array(cond1 & cond2, dtype=float) plt.imshow(val) plt.show() val = np.asfortranarray(val / np.sum(val)) return val def get_dipole_source_shape_model(x, y, center_sigma, radius_sigma): xv, yv = np.meshgrid(x, y) cond1 = ((xv - center_sigma) ** 2 + (yv - 0.) ** 2) <= radius_sigma ** 2 cond2 = ((xv + center_sigma) ** 2 + (yv - 0.) ** 2) <= radius_sigma ** 2 val = np.array(cond1 | cond2, dtype=float) plt.imshow(val) plt.show() val = np.asfortranarray(val / np.sum(val)) return val def get_monopole_source_shape_model(x, y, center_x, center_y, radius_sigma): xv, yv = np.meshgrid(x, y) cond1 = ((xv - center_x) ** 2 + (yv + center_y) ** 2) <= radius_sigma ** 2 val = np.array(cond1, dtype=float) plt.imshow(val) plt.show() val = np.asfortranarray(val / np.sum(val)) return val def get_quadrupole_source_shape_model(x, y, center_sigma, radius_sigma, geometry_type): xv, yv = np.meshgrid(x, y) if geometry_type == 1: center_sigma = center_sigma * np.sqrt(1. / 2.) cond1 = ((xv - center_sigma) ** 2 + (yv - center_sigma) ** 2) <= radius_sigma ** 2 cond2 = ((xv - center_sigma) ** 2 + (yv + center_sigma) ** 2) <= radius_sigma ** 2 cond3 = ((xv + center_sigma) ** 2 + (yv - center_sigma) ** 2) <= radius_sigma ** 2 cond4 = ((xv + center_sigma) ** 2 + (yv + center_sigma) ** 2) <= radius_sigma ** 2 else: cond1 = ((xv - center_sigma) ** 2 + (yv - 0.) ** 2) <= radius_sigma ** 2 cond2 = ((xv + center_sigma) ** 2 + (yv + 0.) ** 2) <= radius_sigma ** 2 cond3 = ((xv - 0.) ** 2 + (yv - center_sigma) ** 2) <= radius_sigma ** 2 cond4 = ((xv - 0.) ** 2 + (yv + center_sigma) ** 2) <= radius_sigma ** 2 val = np.array(cond1 | cond2 | cond3 | cond4, dtype=float) plt.imshow(val) plt.show() val = np.asfortranarray(val / np.sum(val)) return val def get_shrinc_source_shape_model(x, y, sigma_out, stripe_width): xv, yv = np.meshgrid(x, y) cond1 = ((xv - 0.) ** 2 + (yv - 0.) ** 2) <= sigma_out ** 2 cond2 = np.abs(yv) >= stripe_width / 2. cond3 = np.abs(xv) >= stripe_width / 2. val = np.array(cond1 & cond2 & cond3, dtype=float) plt.imshow(val) plt.show() val = np.asfortranarray(val / np.sum(val)) return val def get_square_source_shape_model(x, y, half_width_sigma): xv, yv = np.meshgrid(x, y) cond1 = np.abs(yv) <= half_width_sigma cond2 = np.abs(xv) <= half_width_sigma val = np.array(cond1 & cond2, dtype=float) plt.imshow(val) plt.show() val = np.asfortranarray(val / np.sum(val)) return val class ResistImagesAndContours(object): def __init__(self): self.featureWidth = 240. # nm self.pitch = 600. # nm self.featureTransmittance = 0. # from 0. to 1. self.maskTransmittance = 1. # from 0. to 1. self.featurePhase = 0. self.maskPhase = 0. self.wavelength = 365.0 # nanometers self.numericalAperture = 0.9 self.reductionRatio = 1.0 self.flare = 0. self.immersion = 0. self.focus = 0. self.nominalDose = 145 # mJ/cm^2 self.correctable = 0.5 self.resistThickness = 600. self.stepZ = 5. self.sourceStep = 0.05 self.maskStep = 5. self.a = 0. # exposure-dependent absorption of resist self.b = 0.81 # exposure-independent absorption of resist self.c = 0.008 # rate of absorption change or bleaching rate self.n = 1.835 # refractive index (exposed and unexposed) self.ea = 33.5 # PEB acid diffusivity activation energy self.ln_ar = 45. # PEB acid diffusivity Ln(Ar) self.substrateRefractiveIndexReal = 6.49 self.substrateRefractiveIndexImage = 2.6 self.barcThickness = 172. self.barcRefractiveIndexReal = 1.81 self.barcRefractiveIndexImage = 0.34 self.environmentRefractiveIndexReal = 1. self.environmentRefractiveIndexImage = 0. self.pac = np.linspace(0., 1., np.int(self.pitch / self.maskStep)) # relative inhibitor concentration = (inhibitor concentration)/(initial inhibitor concentration) self.pn = 2 max_development_rate = 100 # nm/s min_development_rate = 0.1 # nm/s self.rate = max_development_rate * np.power((1 - self.pac), self.pn) + min_development_rate # development rate self.sourceShapeType = 3 # 1 - conventional coherent # 3 - conventional partially coherent # 4 - dipole # 5 - monopole # 6 - quadrupole # 7 - quasar # 8 - shrinc # 9 - square # 10 - annular self.image_formation() def source_shape_model_choice(self, x, y): if self.sourceShapeType == 1: return get_conventional_coherent_source_shape_model(self.sourceStep, x, y) elif self.sourceShapeType == 3: return get_conventional_partially_coherent_source_shape_model(x, y, sigma=0.9) elif self.sourceShapeType == 4: return get_dipole_source_shape_model(x, y, center_sigma=0.5, radius_sigma=0.3) elif self.sourceShapeType == 5: return get_monopole_source_shape_model(x, y, center_x=0.5, center_y=0.3, radius_sigma=0.2) elif self.sourceShapeType == 6: # types: # 1 - Normal (90deg) # 2 - Cross (45deg) return get_quadrupole_source_shape_model(x, y, center_sigma=0.5, radius_sigma=0.2, geometry_type=1) elif self.sourceShapeType == 7: return get_quasar_source_shape_model(x, y, sigma_in=0.4, sigma_out=0.8, blade_angle=60.) elif self.sourceShapeType == 8: return get_shrinc_source_shape_model(x, y, sigma_out=0.8, stripe_width=0.2) elif self.sourceShapeType == 9: return get_square_source_shape_model(x, y, half_width_sigma=0.5) elif self.sourceShapeType == 10: return get_annular_source_shape_model(x, y, sigma_in=0.4, sigma_out=0.8) else: raise ValueError("Wrong source shape id") def image_formation(self): core_logging = oplc.OptolithiumCoreLog() core_logging.set_verbose_level(0) # feature formation point1 = oplc.Point2d(-self.featureWidth / 2., 0.) point2 = oplc.Point2d(self.featureWidth / 2., 0.) points_array = oplc.Points2dArray((point1, point2)) region = oplc.Region(points_array, self.featureTransmittance, self.featurePhase) region_array = (region, ) # repeatable part formation point1 = oplc.Point2d(-self.pitch / 2., 0.) point2 = oplc.Point2d(self.pitch / 2., 0.) box = oplc.Box(point1, point2, self.maskTransmittance, self.maskPhase) # mask formation mask = oplc.Mask(region_array, box) # source calculation points_count = int(2 / self.sourceStep) + 1 nx, ny = (points_count, points_count) x = np.linspace(-1, 1, nx) y = np.linspace(-1, 1, ny) x = np.round(x / self.sourceStep) * self.sourceStep y = np.round(y / self.sourceStep) * self.sourceStep values = self.source_shape_model_choice(x, y) source_shape_model_sheet = oplc.SourceShapeModelSheet(x, y, values) source_shape = oplc.SourceShape(source_shape_model_sheet, self.sourceStep, self.sourceStep) pupil_filter_model = oplc.PupilFilterModelEmpty() imaging_tool = oplc.ImagingTool(source_shape, pupil_filter_model, self.wavelength, self.numericalAperture, self.reductionRatio, self.flare, self.immersion) diffraction = oplc.diffraction(imaging_tool, mask) exposure = oplc.Exposure(self.focus, self.nominalDose, self.correctable) exposure_resist_model = oplc.ExposureResistModel(self.wavelength, self.a, self.b, self.c, self.n) peb_resist_model = oplc.PebResistModel(self.ea, self.ln_ar) rate_model = oplc.ResistRateModelSheet(self.pac, self.rate) plt.plot(self.pac, self.rate) plt.show() # wafer stack formation substrate_layer = oplc.ConstantWaferLayer(oplc.SUBSTRATE_LAYER, self.substrateRefractiveIndexReal, self.substrateRefractiveIndexImage) resist_layer = oplc.ResistWaferLayer(self.resistThickness, exposure_resist_model, peb_resist_model, rate_model) barc_layer = oplc.ConstantWaferLayer(oplc.MATERIAL_LAYER, self.barcThickness, self.barcRefractiveIndexReal, self.barcRefractiveIndexImage) environment_layer = oplc.ConstantWaferLayer(oplc.ENVIRONMENT_LAYER, self.environmentRefractiveIndexReal, self.environmentRefractiveIndexImage) wafer_stack = oplc.WaferStack() wafer_stack.push(substrate_layer) wafer_stack.push(barc_layer) wafer_stack.push(resist_layer) wafer_stack.push(environment_layer) optical_transfer_function = oplc.OpticalTransferFunction(imaging_tool, exposure, wafer_stack) image_in_resist = oplc.image_in_resist(diffraction, optical_transfer_function, self.maskStep, self.stepZ) fig, ax = plt.subplots(figsize=(6, 6)) tmp = np.rot90(image_in_resist.values[0]) with open("resultsImageInResist.txt", 'w') as f: for i in range(len(tmp)): for j in range(len(tmp[i])): f.write('%f\t' % tmp[i][j]) f.write("\n") ax.imshow(tmp, interpolation='none', extent=[-self.pitch / 2, self.pitch / 2., 0, self.resistThickness]) ax.set_aspect("equal") plt.show() latent_image = oplc.latent_image(image_in_resist, resist_layer, exposure) fig, ax = plt.subplots(figsize=(6, 6)) tmp = np.rot90((latent_image.values[0])) with open("resultsLatentImage.txt", 'w') as f: for i in range(len(tmp)): for j in range(len(tmp[i])): f.write('%f\t' % tmp[i][j]) f.write("\n") ax.imshow(tmp, interpolation='none', extent=[-self.pitch / 2, self.pitch / 2., 0, self.resistThickness]) ax.set_aspect("equal") plt.show() time_contours = oplc.develop_time_contours(latent_image, resist_layer) tmp = np.rot90((time_contours.values[0])) with open("resultsTimeContours.txt", 'w') as f: for i in range(len(tmp)): for j in range(len(tmp[i])): f.write('%f\t' % tmp[i][j]) f.write("\n") fig, ax = plt.subplots(figsize=(6, 6)) ax.imshow(tmp, interpolation='none', extent=[-self.pitch / 2., self.pitch / 2., 0, self.resistThickness]) ax.set_aspect("equal") plt.show() def main(): ResistImagesAndContours() if __name__ == "__main__": main() ================================================ FILE: OptolithiumC/include/opl_capi.h ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #ifndef OPTOLITHIUMC_HPP_ #define OPTOLITHIUMC_HPP_ #include #include #if !defined( SWIG ) // SWIG should not see #include as it can not handle it #include #endif #include "opl_geometry.h" #include "opl_interp.h" #include "opl_contours.h" #include "opl_physc.h" #include "opl_misc.h" #include "optolithium.h" #define OPTOLITHIUM_CORE_VERSION "0.7a" namespace oplc { using namespace geometry; //using namespace std::literals::complex_literals; const arma::cx_double j = arma::cx_double(0.0, 1.0); inline arma::cx_double _etransmit(double transmit, double phase) { return std::sqrt(transmit) * std::exp(j*phase*M_PI/180.0); } typedef enum { // z y x X_1D = 1, // 0 0 1 Y_1D = 2, // 0 1 0 XY_2D = 3, // 0 1 1 XZ_2D = 5, // 1 0 1 YZ_2D = 6, // 1 1 0 XYZ_3D = 7, // 1 1 1 } resist_volume_type_t; typedef enum { RESIST_VOLUME = 0, RESIST_PROFILE = 1, } resist_simulations_t; class AbstractResistSimulations { protected: // Each coordinate values data std::shared_ptr _x; std::shared_ptr _y; std::shared_ptr _z; double _stepx; double _stepy; double _stepz; public: virtual resist_simulations_t type(void) const = 0; virtual ~AbstractResistSimulations(void) { } std::shared_ptr x(void) const; std::shared_ptr y(void) const; std::shared_ptr z(void) const; double x(uint32_t k) const; double y(uint32_t k) const; double z(uint32_t k) const; bool has_x(void) const; bool has_y(void) const; bool has_z(void) const; double stepx(void) const; double stepy(void) const; double stepz(void) const; resist_volume_type_t axes(void) const; }; typedef std::shared_ptr SharedAbstractResistSimulations; class ResistVolume : public AbstractResistSimulations { private: // Values being calculated std::shared_ptr _values; inline static double _calc_lateral_step(double mask_pitch, double desired_step) { if (mask_pitch == 0.0 || desired_step == 0.0) { return 0.0; } else { int32_t n = static_cast(ceil(mask_pitch/desired_step)); if (mask_pitch/static_cast(n-1) > desired_step) { n += (n % 2) ? 2 : 1; } return mask_pitch/static_cast(n-1); } } inline static double _calc_normal_step(double thickness, double desired_step) { if (thickness == 0.0 || desired_step == 0.0) { return 0.0; } else { double tmp = thickness / desired_step; if (tmp - round(tmp) != 0.0) { return thickness/ceil(tmp + 1); } else { return desired_step; } } } // Offset required to make lateral counts odd inline static uint32_t _get_count(double size, double step, uint32_t offset=0) { if (size == 0.0 || step == 0.0) { return 1; } else { return static_cast(ceil(size/step)+offset); } } inline static void _init_vector(arma::vec& vec, double start, double step) { for (uint32_t k = 0; k < vec.n_elem; k++) { vec(k) = k * step + start; } } public: // Cached input data const RectangleGeometry boundary; const double thickness; const double desired_stepxy; const double desired_stepz; // Initialization for 2D/3D cases (e.g. Image in Resist, Latent Image, PAC, Development Rates) ResistVolume(const RectangleGeometry& boundary, double thickness, double desired_stepxy, double desired_stepz); // Initialization for 1D/2D cases (e.g. for AerialImage) ResistVolume(const RectangleGeometry& boundary, double desired_step); ResistVolume(const ResistVolume& other, bool copydata=false); std::shared_ptr values(void) const; double& value(uint32_t u, uint32_t v=0, uint32_t k=0) const; resist_simulations_t type(void) const; }; typedef std::shared_ptr SharedResistVolume; class ResistProfile : public AbstractResistSimulations { private: ArrayOfSharedPolygons _polygons; public: ResistProfile(SharedResistVolume volume, double level); ArrayOfSharedPolygons polygons(void) const; resist_simulations_t type(void) const; }; typedef std::shared_ptr SharedResistProfile; class AbstractMaskGeometry : public virtual AbstractGeometry { protected: double _transmittance; double _phase; public: AbstractMaskGeometry(double transmittance, double phase) : _transmittance(transmittance), _phase(phase) { } double transmittance(void) const; double phase(void) const; bool is_mask(void) const; // Effective transmittance of the region arma::cx_double etransmit(void); bool operator==(const AbstractGeometry& other) const; }; class Region : public AbstractMaskGeometry, public PolygonGeometry { public: Region(const ArrayOfSharedPoints2d &points, double transmittance, double phase) : AbstractMaskGeometry(transmittance, phase), PolygonGeometry(points) { } Region(const Region& other) : AbstractMaskGeometry(other._transmittance, other._phase), PolygonGeometry(other) { } bool operator==(const AbstractGeometry& other) const { return AbstractMaskGeometry::operator ==(other) && PolygonGeometry::operator ==(other); } }; class Box : public AbstractMaskGeometry, public RectangleGeometry { public: Box(const Point2d& lb, const Point2d& rt, double transmittance, double phase) : AbstractMaskGeometry(transmittance, phase), RectangleGeometry(lb, rt) { } Box(ArrayOfSharedPoints2d points, double transmittance, double phase) : Box(*points[0], *points[1], transmittance, phase) { } Box(const Box& other) : Box(other.left_bottom(), other.right_top(), other._transmittance, other._phase) { } bool operator==(const AbstractGeometry& other) const { return AbstractMaskGeometry::operator ==(other) && RectangleGeometry::operator ==(other); } }; typedef std::shared_ptr SharedAbstractMaskGeometry; typedef std::vector ArrayOfSharedAbstractMaskGeometry; typedef std::shared_ptr SharedRegion; typedef std::shared_ptr ConstSharedRegion; typedef std::vector ArrayOfSharedRegions; typedef std::shared_ptr SharedBox; typedef std::shared_ptr ConstSharedBox; class Mask: public Iterable::Interface { protected: SharedBox _boundary; ArrayOfSharedRegions _regions; Sizes _sizes; // Correct mask region according to diffraction calculation requirements static SharedRegion _make_region(ConstSharedRegion region, const Point2d& center_offset); public: SharedRegion at(uint32_t index) const; uint32_t length(void) const; Mask(const ArrayOfSharedRegions& regions, SharedBox boundary); Mask(const Mask& other); SharedBox boundary(void) const; Sizes pitch(void) const; bool is_opaque(void) const; bool is_clear(void) const; bool is_bad(void) const; bool is_1d(void) const; bool operator==(const Mask& other) const; }; typedef std::shared_ptr SharedMask; typedef enum { PLUGIN_MODEL_TYPE = 0, SHEET_MODEL_TYPE = 1, EMPTY_MODEL_TYPE = 2 } common_model_type_t; class AbstractSourceShapeModel { public: const common_model_type_t type; AbstractSourceShapeModel(common_model_type_t type) : type(type) { } virtual ~AbstractSourceShapeModel(void) { }; virtual double calculate(double sx, double sy) const = 0; virtual bool operator==(const AbstractSourceShapeModel& other) const = 0; }; class SourceShapeModelPlugin : public AbstractSourceShapeModel { private: const source_shape_expr_t _expression; const std::vector _args; const void *_pargs; public: SourceShapeModelPlugin(source_shape_expr_t expression, std::vector args); double calculate(double sx, double sy) const; bool operator==(const AbstractSourceShapeModel& other) const; }; class SourceShapeModelSheet : public AbstractSourceShapeModel { private: const interp::LinearInterpolation2d _interp; public: // armanpy not support pass arrays by shared_ptr SourceShapeModelSheet(const arma::vec& sx, const arma::vec& sy, const arma::mat& intensity); double calculate(double sx, double sy) const; bool operator==(const AbstractSourceShapeModel& other) const; }; class AbstractResistRateModel { public: const common_model_type_t type; AbstractResistRateModel(common_model_type_t type) : type(type) { } virtual ~AbstractResistRateModel(void) { }; virtual double calculate(double pac, double depth=0.0) const = 0; virtual bool operator==(const AbstractResistRateModel& other) const = 0; }; class ResistRateModelExpression : public AbstractResistRateModel { private: const rate_model_expr_t _expression; const std::vector _args; const void *_pargs; public: ResistRateModelExpression(rate_model_expr_t expression, std::vector args); double calculate(double pac, double depth=0.0) const; bool operator==(const AbstractResistRateModel& other) const; }; class ResistRateModelDepthSheet : public AbstractResistRateModel { private: const interp::LinearInterpolation2d _interp; public: // armanpy not support pass arrays by shared_ptr ResistRateModelDepthSheet(const arma::vec& pac, const arma::vec& depth, const arma::mat& rate); double calculate(double pac, double depth=0.0) const; bool operator==(const AbstractResistRateModel& other) const; }; class ResistRateModelSheet : public AbstractResistRateModel { private: const interp::LinearInterpolation1d _interp; public: // armanpy not support pass arrays by shared_ptr ResistRateModelSheet(const arma::vec& pac, const arma::vec& rate); double calculate(double pac, double depth=0.0) const; bool operator==(const AbstractResistRateModel& other) const; }; class AbstractPupilFilterModel { public: const common_model_type_t type; AbstractPupilFilterModel(common_model_type_t type) : type(type) { } virtual ~AbstractPupilFilterModel(void) { }; virtual arma::cx_double calculate(double sx, double sy) const = 0; virtual bool operator==(const AbstractPupilFilterModel& other) const = 0; }; class PupilFilterModelPlugin : public AbstractPupilFilterModel { private: const pupil_filter_expr_t _expression; const std::vector _args; const void *_pargs; public: PupilFilterModelPlugin(pupil_filter_expr_t expression, std::vector args); arma::cx_double calculate(double sx, double sy) const; bool operator==(const AbstractPupilFilterModel& other) const; }; class PupilFilterModelSheet : public AbstractPupilFilterModel { private: interp::LinearInterpolation2d _interp_real; interp::LinearInterpolation2d _interp_imag; public: // armanpy not support pass arrays by shared_ptr PupilFilterModelSheet(const arma::vec& sx, const arma::vec& sy, const arma::cx_mat& coef); arma::cx_double calculate(double sx, double sy) const; bool operator==(const AbstractPupilFilterModel& other) const; }; class PupilFilterModelEmpty : public AbstractPupilFilterModel { public: PupilFilterModelEmpty(void); arma::cx_double calculate(double sx, double sy) const; bool operator==(const AbstractPupilFilterModel& other) const; }; typedef std::shared_ptr SharedAbstractResistRateModel; typedef std::shared_ptr ConstSharedAbstractResistRateModel; typedef std::shared_ptr SharedResistRateModelExpression; typedef std::shared_ptr SharedResistRateModelSheet; typedef std::shared_ptr SharedAbstractSourceShapeModel; typedef std::shared_ptr ConstSharedAbstractSourceShapeModel; typedef std::shared_ptr SharedSourceShapePlugin; typedef std::shared_ptr SharedSourceShapeSheet; typedef std::shared_ptr SharedAbstractPupilFilterModel; typedef std::shared_ptr ConstSharedAbstractPupilFilterModel; typedef std::shared_ptr SharedPupilFilterPlugin; typedef std::shared_ptr SharedPupilFilterSheet; class SourceShape { private: // Direction cosine limit in any direction for the source shape static constexpr double _clim = 1.0; // Simulation's model of the source shape either function or data grid SharedAbstractSourceShapeModel _model; // Simulation's step by x and y axis double _stepx; double _stepy; std::shared_ptr _values; std::shared_ptr _kx; std::shared_ptr _ky; std::shared_ptr _cx; std::shared_ptr _cy; // Non-zeros item's indexes std::shared_ptr _non_zeros; // Non-zeros limits of the source shape double _sx_min; double _sx_max; double _sy_min; double _sy_max; static void _init_vectors(std::shared_ptr &k, std::shared_ptr &dcos, double step); static std::shared_ptr _init_values( const arma::vec &cx, const arma::vec &cy, SharedAbstractSourceShapeModel model); static std::shared_ptr _get_non_zeros_indexes(const arma::mat &values); static void _get_limits(double &sx_min, double &sx_max, double &sy_min, double &sy_max, std::shared_ptr non_zeros, std::shared_ptr cx, std::shared_ptr cy); public: SourceShape(SharedAbstractSourceShapeModel model, double stepx, double stepy); std::shared_ptr values(void) const; double value(uint32_t r, uint32_t c) const; double cx(uint32_t i) const; double cy(uint32_t i) const; std::shared_ptr cx(void) const; std::shared_ptr cy(void) const; std::shared_ptr non_zeros(void) const; double sx_min(void) const; double sx_max(void) const; double sy_min(void) const; double sy_max(void) const; bool operator==(const SourceShape& other) const; }; typedef std::shared_ptr SharedSourceShape; typedef std::shared_ptr ConstSharedSourceShape; class ImagingTool { private: SharedSourceShape _source_shape; SharedAbstractPupilFilterModel _pupil_filter_model; double _reduction_ratio; double _squared_reduction_ratio; double _flare; double _immersion; public: const double wavelength; const double numeric_aperture; ImagingTool(SharedSourceShape source_shape, SharedAbstractPupilFilterModel pupil_filter_model, double wavelength, double numeric_aperture, double reduction_ratio, double flare, double immersion); SharedSourceShape source_shape(void) const; arma::cx_double filter(double cx, double cy) const; double reduction(double cx, double cy, arma::cx_double environment_refraction=physc::air_nk) const; void flare(SharedResistVolume intensity) const; bool operator==(const ImagingTool& other) const; }; typedef std::shared_ptr SharedImagingTool; typedef std::shared_ptr ConstSharedImagingTool; class Exposure { public: const double focus; const double nominal_dose; const double correctable; Exposure(double focus, double nominal_dose, double correctable); arma::cx_double defocus(double cx, double cy, double wvl) const; double dose(void) const; bool operator==(const Exposure& other) const; }; typedef std::shared_ptr SharedExposure; typedef std::shared_ptr ConstSharedExposure; inline bool within_circle(double dx, double dy, double r) { double adx = std::abs(dx); double ady = std::abs(dy); if (adx + ady <= r) { return true; } else if (adx > r || ady > r) { return false; } else if (adx*adx + ady*ady <= r*r) { return true; } else { return false; } } inline bool within_circle(double x, double y, double cx, double cy, double r) { return within_circle(x - cx, y - cy, r); } class Diffraction { private: // Diffraction orders values std::shared_ptr _values; // Diffraction orders spatial frequencies arrays std::shared_ptr _frqx; std::shared_ptr _frqy; // Diffraction orders indexes std::shared_ptr _kx; std::shared_ptr _ky; // Direction cosines matrix and vectors std::shared_ptr _cxy; std::shared_ptr _cx; std::shared_ptr _cy; inline static void _init_vectors(arma::s32_vec& k, arma::vec& frq, arma::vec& dcos, double pitch, double wavelength, std::pair limits) { if (pitch == 0.0) { k(0) = 0; frq(0) = 0.0; dcos(0) = 0.0; } else { int32_t k_min = limits.first; // int32_t k_max = limits.second; // int32_t median = static_cast(round(static_cast(k_max - k_min)/2.0)); // VLOG(4) << "k_min = " << k_min << " k_max = " << k_max << " median = " << median; for (uint32_t i = 0; i < k.n_elem; i++) { k(i) = k_min + i; frq(i) = k(i) / pitch; dcos(i) = frq(i) * wavelength; } } } inline static void _init_cosines(arma::mat& cxy, arma::vec& cx, arma::vec& cy) { for (uint32_t c = 0; c < cx.n_elem; c++) { for (uint32_t r = 0; r < cy.n_elem; r++) { cxy(r, c) = sqrt(cx(c)*cx(c) + cy(r)*cy(r)); } } } // Calculate total size of the diffraction array taking account source shape tilt // median - center point of the diffraction pattern belong axis // na - numeric aperture // wvl - wavelength // pitch - mask pitch for specified direction // cs_min/cx_max - minimum/maximum value of direction cosine in source shape // coordinate system where intensity is not zero inline static std::pair _calc_size( double na, double wvl, double pitch, double cs_min, double cs_max) { if (cs_min > cs_max) { std::ostringstream error_msg; error_msg << "Maximum direction cosine of source shape must be greater than minimum value: " << "Max = " << cs_max << " Min = " << cs_min; throw std::invalid_argument(error_msg.str()); } int32_t k_min = static_cast(-floor(na*(1.0-cs_min)/wvl*pitch)); int32_t k_max = static_cast(floor(na*(1.0+cs_max)/wvl*pitch)); return std::pair(k_min, k_max); } template inline static std::shared_ptr _select_axis(uint32_t axis, std::shared_ptr x, std::shared_ptr y) { if (axis == DIM_1D_X) { return x; } else if (axis == DIM_1D_Y) { return y; } else { throw std::runtime_error("Can't get using axis from non-1D storage"); } } void _add_1d_region(SharedAbstractMaskGeometry region, arma::cx_double factor); static arma::cx_double _calc_2d_region(SharedAbstractMaskGeometry region, int32_t kx, int32_t ky, double frqx, double frqy); void _add_2d_region(SharedAbstractMaskGeometry region, arma::cx_double factor); public: // Corresponding source shape data ConstSharedSourceShape source_shape; // Corresponding mask pitch (it's hard linked with spatial frequencies step = 1/pitch) const Sizes pitch; const Box boundary; // Required to pass diffraction points over the objective lens at the corners const double numeric_aperture; const double wavelength; Diffraction(SharedMask mask, SharedImagingTool imaging_tool); // Return direction cosines for given axis std::shared_ptr c(uint32_t axis) const; // Return diffraction terms order number for given axis std::shared_ptr k(uint32_t axis) const; // Return spatial frequencies for given axis std::shared_ptr frq(uint32_t axis) const; // Return plane waves of diffraction pattern values std::shared_ptr values(void) const; arma::cx_double value(uint32_t r, uint32_t c) const; // Return absolute value of direction cosines std::shared_ptr cxy(void) const; // Return direction cosine belong to x-axis std::shared_ptr cx(void) const; double cx(uint32_t i) const; // Return direction cosine belong to y-axis std::shared_ptr cy(void) const; double cy(uint32_t i) const; // Return spatial frequencies belong to x-axis std::shared_ptr frqx(void) const; // Return spatial frequencies belong to y-axis std::shared_ptr frqy(void) const; // Return diffraction terms order numbers belong x-axis std::shared_ptr kx(void) const; int32_t kx(uint32_t i) const; // Return diffraction terms order numbers belong y-axis std::shared_ptr ky(void) const; int32_t ky(uint32_t i) const; void add_region(SharedAbstractMaskGeometry region, arma::cx_double factor); }; typedef std::shared_ptr SharedDiffraction; typedef std::shared_ptr ConstSharedDiffraction; typedef enum { ENVIRONMENT_LAYER = 0, RESIST_LAYER = 1, MATERIAL_LAYER = 2, SUBSTRATE_LAYER = 3 } layer_type_t; class AbstractWaferLayer { public: const layer_type_t type; const double thickness; AbstractWaferLayer(layer_type_t layer_type, double thickness) : type(layer_type), thickness(thickness) { } virtual ~AbstractWaferLayer(void) { }; // 0 < m < 1 - for resist layer current PAC value, for others layer should be ignored virtual arma::cx_double refraction(double wavelength, double m=1.0) const = 0; bool is_environment(void) const; bool is_resist(void) const; bool is_material(void) const; bool is_substrate(void) const; arma::cx_double effective_refraction(arma::cx_double incident_angle, double wavelength) const; // WARNING: valid only for zero order arma::cx_double internal_transmit(double wavelength, double power=1.0) const; // Can be used for others d.ords arma::cx_double internal_transmit(arma::cx_double incident_angle, double dz, double wavelength) const; std::string str(void) const; virtual bool operator==(const AbstractWaferLayer& other) const = 0; }; class StandardWaferLayer : public AbstractWaferLayer { private: interp::LinearInterpolation1d _refraction_real; interp::LinearInterpolation1d _refraction_imag; public: StandardWaferLayer(layer_type_t layer_type, double thickness, const arma::vec& wavelength, const arma::vec& refraction_real, const arma::vec& refraction_imag); StandardWaferLayer(layer_type_t layer_type, const arma::vec& wavelength, const arma::vec& refraction_real, const arma::vec& refraction_imag) : StandardWaferLayer(layer_type, NAN, wavelength, refraction_real, refraction_imag) { }; arma::cx_double refraction(double wavelength, double m=1.0) const; bool operator==(const AbstractWaferLayer& other) const; }; class ConstantWaferLayer : public AbstractWaferLayer { private: arma::cx_double _refraction; public: ConstantWaferLayer(layer_type_t layer_type, double thickness, double real, double imag); ConstantWaferLayer(layer_type_t layer_type, double real, double imag) : ConstantWaferLayer(layer_type, NAN, real, imag) { } arma::cx_double refraction(double wavelength=0.0, double m=1.0) const; bool operator==(const AbstractWaferLayer& other) const; }; class ExposureResistModel { public: const double wavelength; // Dill model constants const double a; const double b; const double c; // Real refractive index const double n; ExposureResistModel(double wavelength, double a, double b, double c, double n) : wavelength(wavelength), a(a), b(b), c(c), n(n) { } arma::cx_double refraction(double m=1.0) const; bool operator==(const ExposureResistModel& other) const; }; typedef std::shared_ptr SharedExposureResistModel; typedef std::shared_ptr ConstSharedExposureResistModel; class PostExposureBake { public: const double time; const double temp; PostExposureBake(double time, double temp) : time(time), temp(temp) { } }; typedef std::shared_ptr SharedPostExposureBake; typedef std::shared_ptr ConstSharedPostExposureBake; class PebResistModel { public: const double ea; const double ln_ar; PebResistModel(double ea, double ln_ar) : ea(ea), ln_ar(ln_ar) { } double diffusivity(double temp) const; double diffusion_length(double temp, double time) const; arma::vec kernel(SharedPostExposureBake peb, double step) const; bool operator==(const PebResistModel& other) const; }; typedef std::shared_ptr SharedPebResistModel; typedef std::shared_ptr ConstSharedPebResistModel; class ResistWaferLayer : public AbstractWaferLayer { public: const ConstSharedExposureResistModel exposure; const ConstSharedPebResistModel peb; const ConstSharedAbstractResistRateModel rate; ResistWaferLayer(double thickness, SharedExposureResistModel exposure_model, SharedPebResistModel peb_model, SharedAbstractResistRateModel rate_model) : AbstractWaferLayer(RESIST_LAYER, thickness), exposure(exposure_model), peb(peb_model), rate(rate_model) { } arma::cx_double refraction(double wavelength, double m=1.0) const; bool operator==(const AbstractWaferLayer& other) const; }; typedef std::shared_ptr SharedAbstractWaferLayer; typedef std::shared_ptr SharedStandardWaferLayer; typedef std::shared_ptr SharedResistWaferLayer; typedef std::shared_ptr SharedConstantWaferLayer; typedef std::vector ArrayOfSharedAbstractWaferLayers; class WaferStack { private: ArrayOfSharedAbstractWaferLayers _layers; SharedAbstractWaferLayer _resist; SharedAbstractWaferLayer _substrate; SharedAbstractWaferLayer _environment; std::map, std::shared_ptr> _cached_top_reflections; std::map, std::shared_ptr> _cached_bottom_reflections; double _cached_wavelength; static inline arma::cx_double _angle(arma::cx_double incident_angle, arma::cx_double top_refraction, arma::cx_double bottom_refraction) { return std::asin(top_refraction / bottom_refraction * std::sin(incident_angle)); } static inline arma::cx_double _reflection(arma::cx_double top_refraction, arma::cx_double bottom_refraction) { return (top_refraction - bottom_refraction) / (top_refraction + bottom_refraction); } static inline arma::cx_double _transmittance(arma::cx_double top_refraction, arma::cx_double bottom_refraction) { return 2.0 * top_refraction / (top_refraction + bottom_refraction); } // Calculate refractive indexes between layers (for all layers in the stack) arma::cx_vec _calc_refractive_indexes(double cxy, double wavelength); // Calculate effective reflection for all stack from top to bottom // (reflection with taking account of all top layers) std::shared_ptr _calc_effective_top_reflections(double cxy, double wavelength); // Return cached value or calculate std::shared_ptr effective_top_reflection(double cx, double cy, double wavelength); // Calculate effective reflection for all stack from bottom to top // (reflection with taking account of all bottom layers) std::shared_ptr _calc_effective_bottom_reflections(double cxy, double wavelength); // Return cached value or calculate std::shared_ptr effective_bottom_reflection(double cx, double cy, double wavelength); public: WaferStack(void); WaferStack(ArrayOfSharedAbstractWaferLayers layers); void push(SharedAbstractWaferLayer layer); bool is_ok(void); SharedAbstractWaferLayer operator[](int32_t i) const; SharedAbstractWaferLayer environment(void) const; SharedAbstractWaferLayer resist(void) const; SharedAbstractWaferLayer substrate(void) const; uint32_t index_of(SharedAbstractWaferLayer layer) const; std::complex reflectivity(uint32_t indx, double wavelength); // This routine only suitable for the stack where resist is the SECOND layer! std::complex standing_waves(double cx, double cy, double dz, double wavelength); bool operator==(const WaferStack& other) const; }; typedef std::shared_ptr SharedWaferStack; typedef std::shared_ptr ConstSharedWaferStack; class Development { public: const double time; Development(double time) : time(time) { } }; typedef std::shared_ptr SharedDevelopment; typedef std::shared_ptr ConstSharedDevelopment; class OpticalTransferFunction { private: ConstSharedImagingTool _imaging_tool; ConstSharedExposure _exposure; // This object is not constant because when calculating it change it internal precalculated values SharedWaferStack _wafer_stack; const double _wavelength; const double _numeric_aperture; // std::map, arma::cx_double> _cached_data; public: OpticalTransferFunction(SharedImagingTool imaging_tool, SharedExposure exposure=nullptr, SharedWaferStack wafer_stack=nullptr) : _imaging_tool(imaging_tool), _exposure(exposure), _wafer_stack(wafer_stack), _wavelength(imaging_tool->wavelength), _numeric_aperture(imaging_tool->numeric_aperture) { } // Calculate optical transfer function value for given direction cosines values cx, cy // and given offset from the resist top dz. arma::cx_double calc(double cx, double cy, double dz=0.0); ConstSharedImagingTool imaging_tool(void) const; ConstSharedExposure exposure(void) const; ConstSharedWaferStack wafer_stack(void) const; }; typedef std::shared_ptr SharedOpticalTransferFunction; // WARNING: !!! REQUIRED OTHERWISE SWIG NOT INCLUDE ARMANPY.I !!! class Example { private: arma::imat m; public: Example(int rows, int cols) { m = arma::randi(rows, cols, arma::distr_param(0, 100)); }; arma::imat get(void) { return m; }; // THIS METHOD MUST EXISTS void set(const arma::imat& m) { this->m = m; }; void set(int v, int r, int c) { this->m(r, c) = v; } void rnd(unsigned s) { this->m.randn(s,s); }; std::shared_ptr get_sptr(void) { std::shared_ptr p(new arma::imat(m)); return p; }; void modify(arma::imat& A, unsigned rows, unsigned cols) { A.resize( rows, cols ); A.randn( rows, cols ); for( unsigned r = 0; r < rows; r++) { for( unsigned c = 0; c < cols; c++) { A(r, c) = 10.0*r+c; } } }; arma::imat reshape(int rows, int cols) const { return arma::reshape(this->m, rows, cols); } arma::imat rot90(void) const { return misc::rot90(this->m); } }; } // namespace oplc #endif /* OPTOLITHIUMC_HPP_ */ ================================================ FILE: OptolithiumC/include/opl_contours.h ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for non-commercial usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #ifndef OPL_CONTOURS_H_ #define OPL_CONTOURS_H_ #if !defined( SWIG ) // SWIG should not see #include as it can not handle it #include #endif #include "opl_log.h" #include "opl_geometry.h" #include "opl_interp.h" namespace contours { using namespace geometry; typedef std::shared_ptr SharedArrayOfSharedPoints; class _ContourEngine { private: typedef arma::Mat CharMat; std::shared_ptr _x; std::shared_ptr _y; std::shared_ptr _values; CharMat _marks; std::list _contours_list; ArrayOfSharedPolygons _polygons; void _mark_facets(double lvl, int32_t sign); void _drawcn(double lvl, int32_t r, int32_t c, Point2d ct, uint8_t start_edge, bool first); void _calculate_level_lines(double level); void _erase_contour(SharedArrayOfSharedPoints contour); void _extract_polygons(void); public: _ContourEngine(const arma::vec& x, const arma::vec& y, const arma::mat& values, double level, bool negative=false); ArrayOfSharedPolygons polygons(void) const; }; class _SurfaceCell; class _SurfaceEngine { private: friend class _SurfaceCell; const arma::vec& _x; const arma::vec& _y; const arma::vec& _z; const arma::cube& _values; const double _level; const int32_t _negative; ArrayOfSharedTriangles3d _triangles; ArrayOfSharedPoints3d _verteces; // Lookup tables used in the construction of the isosurface. static const uint32_t edgeTable[256]; static const int32_t triTable[256][16]; static const uint32_t indexes_p[12]; static const uint32_t indexes_q[12]; // Calculate table lookup index from those vertices which are below the isolevel. static uint32_t _calculate_table_index(const _SurfaceCell& cell, double level, int32_t negative); static ArrayOfSharedPoints3d _calculate_vertices(const _SurfaceCell& cell, uint32_t edge_code, double level); void _process_verteces(ArrayOfSharedPoints3d verteces, const int32_t tri_codes[]); static inline Point3d _linear_interp3d(double lvl, const Point3d& p, const Point3d& q, double v1, double v2) { double k = (lvl - v1) / (v2 - v1); return p + k * (q - p); } public: _SurfaceEngine(const arma::vec& x, const arma::vec& y, const arma::vec& z, const arma::cube& values, const double level, const int32_t negative); SharedSurface3d surface(void) const; }; class _SurfaceCell { public: std::vector points; std::vector values; inline void _get_level(const _SurfaceEngine* se, Point3d& p, double& v, uint32_t r, uint32_t c, uint32_t s) { if (r >= se->_y.n_elem || c >= se->_x.n_elem || s >= se->_z.n_elem) { p = Point3d(); v = -1.0; } else { p = Point3d(se->_x(c), se->_y(r), se->_z(s)); v = se->_values(r, c, s); } } _SurfaceCell(const _SurfaceEngine* se, uint32_t r, uint32_t c, uint32_t s) { this->points.resize(8); this->values.resize(8); _get_level(se, this->points[0], this->values[0], r , c , s); _get_level(se, this->points[1], this->values[1], r+1, c , s); _get_level(se, this->points[2], this->values[2], r+1, c+1, s); _get_level(se, this->points[3], this->values[3], r , c+1, s); _get_level(se, this->points[4], this->values[4], r , c , s+1); _get_level(se, this->points[5], this->values[5], r+1, c , s+1); _get_level(se, this->points[6], this->values[6], r+1, c+1, s+1); _get_level(se, this->points[7], this->values[7], r , c+1, s+1); } std::string str(void) const { std::ostringstream result; result << "{\n"; for (uint32_t k = 0; k < 8; k++) { result << "\t" << this->points[k].str() << " -> " << this->values[k] << "\n"; } result << "}"; return result.str(); } }; ArrayOfSharedPolygons contours(const arma::vec& x, const arma::vec& y, const arma::mat& values, double level, bool negative=false); SharedSurface3d isosurface(const arma::vec& x, const arma::vec& y, const arma::vec& z, const arma::cube& values, double level, bool negative); } #endif /* OPL_CONTOURS_H_ */ ================================================ FILE: OptolithiumC/include/opl_conv.h ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for non-commercial usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #ifndef OPL_CONV_H_ #define OPL_CONV_H_ #if !defined( SWIG ) // SWIG should not see #include as it can not handle it #include #endif namespace conv { typedef enum { SYMMETRIC = 0, CIRCULAR = 1 } conv1d_type_t; template inline void _symmetric_conv1d(_ArrayType& result, const _ArrayType& array, const arma::vec& kernel) { // Symmetric convolution help // | | // 0 1 2 1 0 1 2 1 0 // 0 1 2 3 4 3 2 1 0 // -4 -3 -2 -1 0 1 2 3 4 if (array.n_elem > 1) { const double n_elem = static_cast(kernel.n_elem); const int32_t kmin = -static_cast(std::floor(n_elem/2.0)); // LOG(INFO) << "Array size = " << array.n_elem << " Centered kernel min index = " << kmin; // Make symmetric convolution. Indexes reflected from boundary for (int32_t i = 0; i < static_cast(array.n_elem); i++) { double sum = 0; for (int32_t s = kmin, k = 0; k < static_cast(kernel.n_elem); s++, k++) { uint32_t v; const int32_t w = abs(i + s), c = array.n_elem; if (w >= c) { const uint8_t is_fall = (w/(c-1))%2; if (is_fall) { v = (c-1) - w % (c-1); } else { v = w % (c-1); } } else { v = w; } // LOG(INFO) << "i = " << i << " s = " << s << // " array(" << v << ") = " << array(v) << // " kernel(" << k << ") = " << kernel(k); sum += array(v) * kernel(k); } result(i) = sum; } } else if (array.n_elem == 1) { result(0) = array(0); // LOG(INFO) << "Array size = 1 -> input: " << array(0) << " result: " << result(0); } } template inline void _circular_conv1d(_ArrayType& result, const _ArrayType& array, const arma::vec& kernel) { // Circular convolution help for vertical stage // | | // 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 // 0 1 2 3 4 3 2 1 0 // -4 -3 -2 -1 0 1 2 3 4 if (array.n_elem > 1) { const double n_elem = static_cast(kernel.n_elem); const int32_t kmin = -static_cast(std::floor(n_elem/2.0)); // LOG(INFO) << "Array size = " << array.n_elem << " Centered kernel min index = " << kmin; // Make circular convolution for (int32_t i = 0; i < static_cast(array.n_elem); i++) { double sum = 0; for (int32_t s = kmin, k = 0; k < static_cast(kernel.n_elem); s++, k++) { const uint32_t v = (array.n_elem + i + s) % array.n_elem; // LOG(INFO) << "i = " << i << " s = " << s << // " array(" << v << ") = " << array(v) << // " kernel(" << k << ") = " << kernel(k); sum += array(v) * kernel(k); } result(i) = sum; } } else if (array.n_elem == 1) { result(0) = array(0); // LOG(INFO) << "Array size = 1 -> input: " << array(0) << " result: " << result(0); } } inline arma::rowvec conv1d(const arma::rowvec& array, const arma::vec& kernel, conv1d_type_t type) { arma::rowvec result = arma::rowvec(array.n_elem); if (type == CIRCULAR) { _circular_conv1d(result, array, kernel); } else if (type == SYMMETRIC) { _symmetric_conv1d(result, array, kernel); } else { throw std::invalid_argument("Convolution type can be only SYMMETRIC or CIRCULAR"); } return result; } inline arma::colvec conv1d(const arma::colvec& array, const arma::vec& kernel, conv1d_type_t type) { arma::colvec result = arma::colvec(array.n_elem); if (type == CIRCULAR) { _circular_conv1d(result, array, kernel); } else if (type == SYMMETRIC) { _symmetric_conv1d(result, array, kernel); } else { throw std::invalid_argument("Convolution type can be only SYMMETRIC or CIRCULAR"); } return result; } inline arma::cube conv1d(const arma::cube& array, const arma::vec& kernel, conv1d_type_t type) { if ((array.n_rows == 1 && array.n_cols == 1) || (array.n_rows == 1 && array.n_slices == 1) || (array.n_cols == 1 && array.n_slices == 1)) { arma::cube result = arma::cube(array.n_rows, array.n_cols, array.n_slices); if (type == CIRCULAR) { _circular_conv1d(result, array, kernel); } else if (type == SYMMETRIC) { _symmetric_conv1d(result, array, kernel); } else { throw std::invalid_argument("Convolution type can be only SYMMETRIC or CIRCULAR"); } return result; } else { throw std::invalid_argument("One dimension circular convolution can be performed only on vectors"); } } } #endif /* OPL_CONV_H_ */ ================================================ FILE: OptolithiumC/include/opl_eikonal.h ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #ifndef OPL_EIKONAL_H_ #define OPL_EIKONAL_H_ #if !defined( SWIG ) // SWIG should not see #include as it can not handle it #include #include #endif namespace eikonal { void _chk_eikonal_status(int status) { if (status != LSM_FMM_ERR_SUCCESS) { std::string error_string; if (status == LSM_FMM_ERR_FMM_DATA_CREATION_ERROR) { error_string = "Data creation error"; } else if (status == LSM_FMM_ERR_INVALID_SPATIAL_DISCRETIZATION_ORDER) { error_string = "Invalid spatial discretization order"; } else { error_string = "General error"; } throw std::runtime_error("Solving eikonal failed: " + error_string); } } // result must contain initial state void solve2d(arma::mat& result, const arma::mat& rates, double row_step, double col_step) { const int sizes[2] = { static_cast(rates.n_rows), static_cast(rates.n_cols) }; const double grid[2] = { col_step, row_step }; const int derivative_order = 2; double *mask = nullptr; double *phi = reinterpret_cast(&result(0, 0)); const double *speed = reinterpret_cast(&rates(0, 0)); int status = solveEikonalEquation2d(phi, speed, mask, derivative_order, sizes, grid); _chk_eikonal_status(status); } // result must contain initial state void solve3d(arma::cube& result, const arma::cube& rates, double row_step, double col_step, double slice_step) { int sizes[3] = { static_cast(rates.n_rows), static_cast(rates.n_cols), static_cast(rates.n_slices) }; double grid[3] = { row_step, col_step, slice_step }; int derivative_order = 2; double *mask = nullptr; double *phi = reinterpret_cast(&result(0, 0, 0)); const double *speed = reinterpret_cast(&rates(0, 0, 0)); int status = solveEikonalEquation3d(phi, speed, mask, derivative_order, sizes, grid); _chk_eikonal_status(status); } } #endif /* OPL_EIKONAL_H_ */ ================================================ FILE: OptolithiumC/include/opl_fft.h ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include "opl_log.h" #include #if !defined(SWIG) // SWIG should not see #include as it can not handle it #include #endif #if defined(OPTOLITHIUMC_USE_FFTW_LIBRARY) #include #elif defined(OPTOLITHIUMC_USE_KISSFFT_LIBRARY) #include #include #elif defined(OPTOLITHIUMC_USE_FOURIER_LIBRARY) #include #else #error "OPTOLITHIUMC_USE_KISSFFT_LIBRARY or OPTOLITHIUMC_USE_FFTW_LIBRARY must be set!" #endif namespace fft { enum direction_t {FFT_BACKWARD, FFT_FORWARD}; class TransformInterface2d { public: // TransformInterface2d(arma::cx_mat &array, direction_t dir, int32_t n_times=-1) { } virtual void execute(void) = 0; virtual ~TransformInterface2d() { }; }; #if defined(OPTOLITHIUMC_USE_FFTW_LIBRARY) #define FFTW_METHOD_THRESHOLD 100 typedef fftw_plan fft_plan_t; class FFTW2d { private: fft_plan_t _plan; fftw_complex *_raw_ptr; public: FFTW2d(arma::cx_mat &array, direction_t dir, int32_t n_times = -1) { int fftw_dir = (dir == FFT_FORWARD) ? FFTW_FORWARD : FFTW_BACKWARD; this->_raw_ptr = reinterpret_cast(&array(0, 0)); {TIMED_SCOPE(aerial_image_fftw_plan, "Create fftw transform plan"); const uint32_t method = (uint32_t) (n_times > FFTW_METHOD_THRESHOLD ? FFTW_MEASURE : FFTW_ESTIMATE); this->_plan = fftw_plan_dft_2d(array.n_cols, array.n_rows, this->_raw_ptr, this->_raw_ptr, fftw_dir, method); } } ~FFTW2d() { fftw_destroy_plan(this->_plan); } void execute(void) { {TIMED_SCOPE(aerial_image_timer_fftw, "FFTW calculation done"); fftw_execute(this->_plan); } } }; typedef FFTW2d FFT2d; #elif defined(OPTOLITHIUMC_USE_KISSFFT_LIBRARY) class KissFFT2d : public TransformInterface2d { private: kiss_fftnd_cfg _cfg; kiss_fft_cpx *_out_buf; kiss_fft_cpx *_raw_ptr; uint32_t _buf_size; uint32_t _n_elem; public: KissFFT2d(arma::cx_mat &array, direction_t dir, int32_t n_times = -1) { printf("n_cols = %d, n_rows = %d\n", array.n_cols, array.n_rows); const int ndims = 2; const int dims[2] = {static_cast(array.n_cols), static_cast(array.n_rows)}; // const int dims[2] = {static_cast(array.n_rows), static_cast(array.n_cols)}; int is_inverse = (dir == FFT_BACKWARD) ? 1 : 0; this->_raw_ptr = reinterpret_cast(&array(0, 0)); // this->_n_elem = array.n_cols * array.n_rows; // this->_buf_size = static_cast(this->_n_elem*sizeof(kiss_fft_cpx)); // this->_out_buf = static_cast(malloc(this->_buf_size)); this->_cfg = kiss_fftnd_alloc(dims, ndims, is_inverse, NULL, NULL); } ~KissFFT2d() { kiss_fft_free(this->_cfg); free(this->_out_buf); } void execute(void) { {TIMED_SCOPE(aerial_image_timer_fftw, "KissFFT calculation done"); // printf("================================================================\n"); // kiss_fft_cpx zero; // zero.r = 0.0; // zero.i = 0.0; // kiss_fft_cpx tmp = this->_raw_ptr[0]; // this->_raw_ptr[0] = this->_raw_ptr[159]; // this->_raw_ptr[1] = tmp; // this->_raw_ptr[159] = tmp; // this->_raw_ptr[158] = zero; // memcpy(this->_out_buf, this->_raw_ptr, this->_buf_size); // for (uint32_t k = 0; k < this->_n_elem; k++) { // printf("v[%d] = %.5f %.5fi\n", k, this->_out_buf[k].r, this->_out_buf[k].i); // } // memset(this->_out_buf, 0, this->_buf_size); kiss_fftnd(this->_cfg, this->_raw_ptr, this->_raw_ptr); // for (uint32_t k = 0; k < this->_n_elem; k++) { // this->_out_buf[k].r /= this->_n_elem; // this->_out_buf[k].i /= this->_n_elem; // } // printf("--------------------------------------------------------------\n"); // // for (uint32_t k = 0; k < this->_n_elem; k++) { // printf("v[%d] = %.5f %.5fi\n", k, this->_out_buf[k].r, this->_out_buf[k].i); // } // memcpy(this->_raw_ptr, this->_out_buf, this->_buf_size); } } }; typedef KissFFT2d FFT2d; #elif defined(OPTOLITHIUMC_USE_FOURIER_LIBRARY) class Fourier2d { private: fft_plan_t* _plan; fft_complex_t * _raw_ptr; public: Fourier2d(arma::cx_mat &array, direction_t dir, int32_t n_times = -1) { int fft_dir = (dir == FFT_FORWARD) ? FFT_LITHO_FORWARD : FFT_LITHO_BACKWARD; this->_raw_ptr = reinterpret_cast(&array(0, 0)); this->_plan = fft_plan_create_2d( array.n_rows, array.n_cols, this->_raw_ptr, this->_raw_ptr, fft_dir, FFT_USE_CACHE | FFT_USE_RADIX2_TABLE); } ~Fourier2d() { fft_plan_destroy(this->_plan); } void execute(void) { {TIMED_SCOPE(aerial_image_timer_fftw, "FFT calculation done"); fft_execute_2d(this->_plan); } } }; typedef Fourier2d FFT2d; #endif } ================================================ FILE: OptolithiumC/include/opl_geometry.h ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #ifndef OPL_GEOMETRY_H_ #define OPL_GEOMETRY_H_ #include #include #include #include #include #include "opl_log.h" #include "opl_iter.h" #if !defined( SWIG ) // SWIG should not see #include as it can not handle it #include #endif #if !defined(M_PI) && !defined(SWIG) // Shit C++11 standard where not defined in math but this constant defined #define M_E 2.7182818284590452354 #define M_LOG2E 1.4426950408889634074 #define M_LOG10E 0.43429448190325182765 #define M_LN2 0.69314718055994530942 #define M_LN10 2.30258509299404568402 #define M_PI 3.14159265358979323846 #define M_PI_2 1.57079632679489661923 #define M_PI_4 0.78539816339744830962 #define M_1_PI 0.31830988618379067154 #define M_2_PI 0.63661977236758134308 #define M_2_SQRTPI 1.12837916709551257390 #define M_SQRT2 1.41421356237309504880 #define M_SQRT1_2 0.70710678118654752440 #endif namespace geometry { typedef enum { LEFT = 0, RIGHT = 1, BEYOND = 2, BEHIND = 3, BETWEEN = 4, ORIGIN = 5, DESTINATION = 6, } classify_type_t; typedef enum { COLLINEAR = 0, PARALLEL = 1, SKEW = 2, SKEW_NO_CROSS = 3, SKEW_CROSS =4, } cross_type_t; typedef enum { CW = 1, CCW = -1, } rotation_type_t; typedef enum { DIM_1D_X = 0, DIM_1D_Y = 1, DIM_2D = 2 } dimension_t; typedef enum { GEOMETRY_POLYGON = 0, GEOMETRY_BOX = 1 } geometry_t; #define DEFAULT_CLASSIFY_PRECISION 1e-2 class Edge2d; class Point2d { public: double x; double y; Point2d(double x=0.0, double y=0.0) : x(x), y(y) { } Point2d(const Point2d& other) : x(other.x), y(other.y) { } Point2d operator+(const Point2d& p) const; Point2d operator+(double s) const; Point2d operator-(const Point2d& p) const; Point2d operator-(double s) const; double& operator[](uint32_t i); double operator[](uint32_t i) const; bool operator==(const Point2d& p) const; bool operator!=(const Point2d& p) const; bool operator<(const Point2d& p) const; bool operator>(const Point2d& p) const; Point2d& operator+=(const Point2d& rhs); Point2d& operator-=(const Point2d& rhs); Point2d& abs(void); classify_type_t classify(const Point2d& p0, const Point2d& p1, double precision=DEFAULT_CLASSIFY_PRECISION) const; classify_type_t classify(const Edge2d&, double precision=DEFAULT_CLASSIFY_PRECISION) const; double polar_angle(void) const; double length(void) const; Point2d normal_intersect(const Edge2d&) const; double distance(const Edge2d&) const; void transform(int32_t sign, double mag, double angle); std::string str(void) const; }; Point2d operator* (double s, const Point2d& p); Point2d operator/ (const Point2d& p, double s); double dot(const Point2d& p, const Point2d& q); typedef Point2d Sizes; class Edge2d { public: Point2d org; Point2d dst; Edge2d(double org_x, double org_y, double dst_x, double dst_y) : org(Point2d(org_x, org_y)), dst(Point2d(dst_x, dst_y)) { } Edge2d(const Point2d& org, const Point2d& dst) : org(org), dst(dst) { } Edge2d& rot(rotation_type_t dir=CCW); Edge2d& flip(void); cross_type_t intersect(const Edge2d& e, double &t) const; // Return intersection point between 'this' edge and edge represented as 't' value (line direction) Point2d point(double t) const; // Return intersection point between 'this' edge and given edge 'e' Point2d point(const Edge2d& e) const; cross_type_t cross_type(const Edge2d& e) const; bool is_vertical(void) const; bool is_horizontal(void) const; double dx(void) const; double dy(void) const; Sizes sizes(void) const; double length(void) const; double slope(void) const; double y(double x) const; // Calculate the area of trapezoid between this edge, y-axis and two horizontal lines. double area(void) const; std::string str(void) const; bool operator==(const Edge2d& other) const; }; typedef std::shared_ptr SharedPoint2d; typedef std::vector ArrayOfSharedPoints2d; typedef std::shared_ptr SharedEdge2d; typedef std::shared_ptr ConstSharedEdge2d; typedef std::vector ArrayOfSharedEdges2d; class AbstractGeometry : public Iterable::Interface { protected: ArrayOfSharedEdges2d _edges; dimension_t _axis; public: virtual geometry_t type(void) const = 0; virtual bool operator==(const AbstractGeometry &other) const = 0; virtual std::string str(void) const = 0; virtual bool is_mask(void) const { return false; } SharedEdge2d at(uint32_t index) const; uint32_t length(void) const; double signed_area(void) const; virtual bool set_bypass(rotation_type_t direction); dimension_t axis(void) const; }; typedef std::shared_ptr SharedAbstractGeomtery; typedef std::vector ArrayOfSharedAbstractGeomtery; class PolygonGeometry : public virtual AbstractGeometry { public: // Check whether input points represent one dimensional polygon static bool is_1d_possible(const ArrayOfSharedPoints2d &points); static bool is_2d_possible(const ArrayOfSharedPoints2d &points); PolygonGeometry(const ArrayOfSharedPoints2d &points); PolygonGeometry(const PolygonGeometry& other); bool clean(void); geometry_t type(void) const; bool operator==(const AbstractGeometry &other) const; std::string str(void) const; }; typedef std::shared_ptr SharedPolygon; typedef std::vector ArrayOfSharedPolygons; class RectangleGeometry : public virtual AbstractGeometry { private: Edge2d _diag; Sizes _sizes; public: RectangleGeometry(const Point2d& lb, const Point2d& rt); RectangleGeometry(ArrayOfSharedPoints2d points); RectangleGeometry(const RectangleGeometry& other); Point2d left_bottom(void) const; Point2d right_top(void) const; Edge2d diag(void) const; Sizes sizes(void) const; bool set_bypass(rotation_type_t direction); geometry_t type(void) const; bool operator==(const AbstractGeometry& other) const; std::string str(void) const; }; class Point3d { public: double x; double y; double z; Point3d(double x=0.0, double y=0.0, double z=0.0) : x(x), y(y), z(z) { } Point3d(const Point3d& other) : x(other.x), y(other.y), z(other.z) { } Point3d operator+(const Point3d& p) const; Point3d operator+(double s) const; Point3d operator-(const Point3d& p) const; Point3d operator-(double s) const; double& operator[](uint32_t i); double operator[](uint32_t i) const; bool operator==(const Point3d& p) const; bool operator!=(const Point3d& p) const; bool operator<(const Point3d& p) const; bool operator>(const Point3d& p) const; Point3d& operator+=(const Point3d& rhs); Point3d& operator-=(const Point3d& rhs); Point3d& abs(void); double length(void) const; std::string str(void) const; }; Point3d operator* (double s, const Point3d& p); Point3d operator/ (const Point3d& p, double s); double dot(const Point3d& p, const Point3d& q); typedef std::shared_ptr SharedPoint3d; typedef std::shared_ptr ConstSharedPoint3d; typedef std::vector ArrayOfSharedPoints3d; class Edge3d { public: Point3d org; Point3d dst; Edge3d(double org_x, double org_y, double org_z, double dst_x, double dst_y, double dst_z) : org(Point3d(org_x, org_y, org_z)), dst(Point3d(dst_x, dst_y, dst_z)) { } Edge3d(const Point3d& org, const Point3d& dst) : org(org), dst(dst) { } double length(void) const; std::string str(void) const; bool operator==(const Edge3d& other) const; }; double dot(const Edge3d& p, const Edge3d& q); Point3d cross(const Edge3d& p, const Edge3d& q); typedef std::shared_ptr SharedEdge3d; typedef std::vector ArrayOfSharedEdges3d; class Triangle3d : public Iterable::Interface { private: SharedPoint3d _a, _b, _c; public: Triangle3d(SharedPoint3d a, SharedPoint3d b, SharedPoint3d c) : _a(a), _b(b), _c(c) { } Triangle3d(const Point3d& a, const Point3d& b, const Point3d& c); uint32_t length(void) const { return 3; } bool operator==(const Triangle3d &other) const; std::string str(void) const; SharedPoint3d at(uint32_t index) const; Point3d& operator[](uint32_t i); Point3d operator[](uint32_t i) const; SharedPoint3d normal(void) const; SharedPoint3d a(void) const { return this->_a; } SharedPoint3d b(void) const { return this->_b; } SharedPoint3d c(void) const { return this->_c; } }; typedef std::shared_ptr SharedTriangle3d; typedef std::vector ArrayOfSharedTriangles3d; class Surface3d { private: bool _is_finalized; ArrayOfSharedPoints3d _points; ArrayOfSharedTriangles3d _triangles; std::shared_ptr _x; std::shared_ptr _y; std::shared_ptr _z; public: Surface3d() { this->_is_finalized = false; }; Surface3d(ArrayOfSharedPoints3d points, ArrayOfSharedTriangles3d triangles); bool add_point(SharedPoint3d point) { if (!this->_is_finalized) { this->_points.push_back(point); return true; } else { return false; } } bool add_triangle(SharedTriangle3d triangle) { if (!this->_is_finalized) { this->_triangles.push_back(triangle); return true; } else { return false; } } void generate_xyz(void); ArrayOfSharedPoints3d points(void) const; ArrayOfSharedTriangles3d triangles(void) const; std::shared_ptr x(void) const; std::shared_ptr y(void) const; std::shared_ptr z(void) const; }; typedef std::shared_ptr SharedSurface3d; } #endif /* OPL_GEOMETRY_H_ */ ================================================ FILE: OptolithiumC/include/opl_interp.h ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #ifndef OPL_INTERP_H_ #define OPL_INTERP_H_ #include #if !defined( SWIG ) // SWIG should not see #include as it can not handle it #include #endif namespace interp { typedef std::shared_ptr ConstVector; typedef std::shared_ptr ConstMatrix; typedef std::shared_ptr Vector; class LinearInterpolation1d { private: ConstVector _px; // Input array x ConstVector _py; // Input array y - values Vector _b; // Additive coefficient of line Vector _s; // Slope of line double _fill; public: LinearInterpolation1d(void) : _fill(0.0) { }; LinearInterpolation1d(ConstVector px, ConstVector py, double fill=0.0); double interpolate(double xi) const; std::shared_ptr interpolate(const arma::vec& xi) const; std::shared_ptr x(void) const { return this->_px; } std::shared_ptr y(void) const { return this->_py; } bool operator==(const LinearInterpolation1d& other) const; }; typedef std::shared_ptr SharedLinearInterpolation1d; class LinearInterpolation2d { private: ConstVector _px; ConstVector _py; ConstMatrix _values; double _fill; SharedLinearInterpolation1d _xlastinterp1; std::vector _yinterp1; public: LinearInterpolation2d(void) : _fill(0.0) { }; LinearInterpolation2d(ConstVector px, ConstVector py, ConstMatrix values, double fill=0.0); double interpolate(double xi, double yi) const; std::shared_ptr interpolate(const arma::vec& xi, const arma::vec& yi) const; std::shared_ptr x(void) const { return this->_px; } std::shared_ptr y(void) const { return this->_py; } std::shared_ptr values(void) const { return this->_values; } bool operator==(const LinearInterpolation2d& other) const; }; typedef std::shared_ptr SharedLinearInterpolation2d; } #endif /* OPL_INTERP_H_ */ ================================================ FILE: OptolithiumC/include/opl_iter.h ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #ifndef ITERABLE_H_ #define ITERABLE_H_ #include #include namespace Iterable { inline uint32_t indx(int32_t k, int32_t len) { return static_cast((k < 0) ? (len + k) % len : k % len); } template class Interface; template class Iterator { private: uint32_t _pos; const Interface *_container; public: Iterator(const Interface* p_vec, uint32_t pos): _pos(pos), _container(p_vec){ } uint32_t pos(void) const { return this->_pos; } // these three methods form the basis of an iterator for use with a range-based for loop bool operator!= (const Iterator& other) const { return this->_pos != other._pos; } object_t operator*(void) const { return this->_container->at(indx(this->_pos, this->_container->length())); } const Iterator& operator++ () { ++_pos; // although not strictly necessary for a range-based for loop // following the normal convention of returning a value from // operator++ is a good idea. return *this; } Iterator begin(void) const { return this->_container->begin(); } Iterator end(void) const { return this->_container->end(); } Iterator next(void) const { return Iterator(this->_container, indx(this->_pos+1, this->_container->length())); } Iterator prev(void) const { return Iterator(this->_container, indx(this->_pos-1, this->_container->length())); } }; template class Interface { public: virtual ~Interface() {}; virtual Iterator begin(void) const { return Iterator(this, 0); } virtual Iterator end(void) const { return Iterator(this, this->length()); } virtual object_t front(void) const { return this->at(0); } virtual object_t back(void) const { return this->at(this->length()-1); } virtual object_t at(uint32_t index) const = 0; virtual uint32_t length(void) const = 0; }; } #endif /* ITERABLE_H_ */ ================================================ FILE: OptolithiumC/include/opl_log.h ================================================ /* * opl_log.h * * Created on: Jul 22, 2014 * Author: batman */ #ifndef OPL_LOG_H_ #define OPL_LOG_H_ #include class OptolithiumCoreLog { public: OptolithiumCoreLog(void); virtual ~OptolithiumCoreLog(void); void set_verbose_level(int level); void log(const std::string &message); void vlog(const std::string &message, int level=4); }; #endif /* OPL_LOG_H_ */ ================================================ FILE: OptolithiumC/include/opl_misc.h ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #ifndef OPL_MISC_H_ #define OPL_MISC_H_ #if !defined(SWIG) namespace misc { inline void swap(double& a, double& b) { double tmp = b; b = a; a = tmp; } inline double round_to(double value, double precision) { return round(value / precision) * precision; } template inline bool safe_vector_equal( const std::vector>& v1, const std::vector>& v2) { return v1.size() == v2.size() && std::equal(v1.begin(), v1.end(), v2.begin(), [] (const std::shared_ptr& a, const std::shared_ptr& b) -> bool {return *a == *b;}); } // Rotate arma::mat counter-clockwise template inline cls rot90(cls array) { cls result = cls(array.n_cols, array.n_rows); for (uint32_t r = 0; r < array.n_rows; r++) { for (uint32_t c = 0; c < array.n_cols; c++) { result(array.n_cols - c - 1, r) = array(r, c); } } return result; } } #endif #endif /* OPL_MISC_H_ */ ================================================ FILE: OptolithiumC/include/opl_physc.h ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #ifndef OPL_PHYSC_H_ #define OPL_PHYSC_H_ #include namespace physc { // Ideal gas constant (kcal/K/mol) constexpr double R = 1.987204118e-3; // Absolute zero temperature (C) constexpr double T0 = -273.15; // Refractive index in air constexpr std::complex air_nk = std::complex(1.0002926, 0.0); // Speed of Light (m/s) constexpr double c = 299792458; } #endif /* OPL_PHYSC_H_ */ ================================================ FILE: OptolithiumC/include/opl_sim.h ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #ifndef OPL_SIM_H_ #define OPL_SIM_H_ #include "opl_capi.h" using namespace oplc; SharedDiffraction diffraction(SharedImagingTool imaging_tools, SharedMask mask); SharedResistVolume aerial_image(SharedDiffraction diffraction, SharedOpticalTransferFunction otf, double stepxy); SharedResistVolume image_in_resist(SharedDiffraction diffraction, SharedOpticalTransferFunction otf, double stepxy, double stepz); SharedResistVolume latent_image(SharedResistVolume image_in_resist, SharedResistWaferLayer resist, SharedExposure exposure); SharedResistVolume peb_latent_image(SharedResistVolume latent_image, SharedResistWaferLayer resist, SharedPostExposureBake peb); SharedResistVolume develop_time_contours(SharedResistVolume peb_latent_image, SharedResistWaferLayer resist); SharedResistProfile resist_profile(SharedResistVolume develop_times, SharedDevelopment development); #endif /* OPL_SIM_H_ */ ================================================ FILE: OptolithiumC/include/optolithium.h ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #ifndef OPTOLITHIUM_SDK_H_ #define OPTOLITHIUM_SDK_H_ #include #include #include #include #if defined _WIN32 || defined __CYGWIN__ #ifdef __GNUC__ #define DLL_PUBLIC __attribute__ ((dllexport)) #else #define DLL_PUBLIC __declspec(dllexport) // Note: actually gcc seems to also supports this syntax. #endif #define DLL_LOCAL #else #if __GNUC__ >= 4 #define DLL_PUBLIC __attribute__ ((visibility ("default"))) #define DLL_LOCAL __attribute__ ((visibility ("hidden"))) #else #define DLL_PUBLIC #define DLL_LOCAL #endif #endif #ifdef __cplusplus extern "C" { #endif // Plugin type description typedef enum { PLUGIN_MASK = 0, PLUGIN_DEVELOPMENT_MODEL = 1, PLUGIN_SOURCE_SHAPE = 2, PLUGIN_ILLUMINATION = 3, PLUGIN_MATERIAL = 4, PLUGIN_PUPIL_FILTER = 5, } plugin_type_t; // Plugin entry point type: this structure must export each shared library to being plugin typedef struct { plugin_type_t plugin_type; const void* plugin_entry; } plugin_descriptor_t; #define INT(value) (int[]){value} #define DBL(value) (double[]){value} typedef struct { const char *name; double defv; double *min; double *max; } standard_plugin_arg_t; // ==================================================================================================================== // Development model plugin descriptions types // ==================================================================================================================== typedef double (*rate_model_expr_t)(double pac, double depth, const void *args); typedef standard_plugin_arg_t dev_model_arg_t; typedef struct { const int *prolith_id; const char *name; const char *desc; rate_model_expr_t expression; const int args_count; const dev_model_arg_t (*args)[]; } dev_model_t; // ==================================================================================================================== // Mask plugin descriptions types // ==================================================================================================================== typedef enum { MASK_TYPE_1D = 1, MASK_TYPE_2D = 2 } mask_type_t; typedef struct { double x; double y; } mask_point_t; typedef struct { double transmittance; double phase; int length; mask_point_t *points; } mask_region_t; typedef struct { mask_region_t boundary; int regions_count; mask_region_t *regions; } mask_t; typedef int (*mask_create_t)(mask_t *mask, void *parameters); typedef standard_plugin_arg_t mask_parameter_t; typedef struct { const char *name; const char *desc; const mask_type_t type; mask_create_t create; const int parameters_count; const mask_parameter_t (*parameters)[]; } mask_plugin_t; // ==================================================================================================================== // Source shape plugin interface // ==================================================================================================================== typedef double (*source_shape_expr_t)(double sx, double sy, const void *args); typedef standard_plugin_arg_t source_shape_arg_t; typedef struct { const char *name; const char *desc; source_shape_expr_t expression; const int args_count; const source_shape_arg_t (*args)[]; } source_shape_plugin_t; // ==================================================================================================================== // Pupil filter plugin interface // ==================================================================================================================== typedef double _Complex (*pupil_filter_expr_t)(double cx, double cy, const void *args); typedef standard_plugin_arg_t pupil_filter_arg_t; typedef struct { const char *name; const char *desc; pupil_filter_expr_t expression; const int args_count; const pupil_filter_arg_t (*args)[]; } pupil_filter_plugin_t; #ifdef __cplusplus } #endif #endif /*OPTOLITHIUM_SDK_H_*/ ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifndef ARMA_INCLUDES #define ARMA_INCLUDES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if ( defined(__unix__) || defined(__unix) || defined(_POSIX_C_SOURCE) || (defined(__APPLE__) && defined(__MACH__)) ) && !defined(_WIN32) #include #endif #if (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)) #include #endif #if (__cplusplus >= 201103L) || defined(__GXX_EXPERIMENTAL_CXX0X__) #undef ARMA_USE_CXX11 #define ARMA_USE_CXX11 #endif #include "armadillo_bits/config.hpp" #include "armadillo_bits/compiler_setup.hpp" #if defined(ARMA_USE_CXX11) #include #include #include #if !defined(ARMA_DONT_USE_CXX11_CHRONO) #include #endif #endif #if defined(ARMA_USE_TBB_ALLOC) #include #endif #if defined(ARMA_USE_MKL_ALLOC) #include #endif #if !defined(ARMA_USE_CXX11) #if defined(ARMA_HAVE_TR1) #include #include #endif #endif #include "armadillo_bits/include_atlas.hpp" #include "armadillo_bits/include_hdf5.hpp" #include "armadillo_bits/include_superlu.hpp" #if defined(_OPENMP) #include #endif //! \namespace arma namespace for Armadillo classes and functions namespace arma { // preliminaries #include "armadillo_bits/forward_bones.hpp" #include "armadillo_bits/arma_static_check.hpp" #include "armadillo_bits/typedef_elem.hpp" #include "armadillo_bits/typedef_elem_check.hpp" #include "armadillo_bits/typedef_mat.hpp" #include "armadillo_bits/arma_boost.hpp" #include "armadillo_bits/arma_version.hpp" #include "armadillo_bits/arma_config.hpp" #include "armadillo_bits/traits.hpp" #include "armadillo_bits/promote_type.hpp" #include "armadillo_bits/upgrade_val.hpp" #include "armadillo_bits/restrictors.hpp" #include "armadillo_bits/access.hpp" #include "armadillo_bits/span.hpp" #include "armadillo_bits/distr_param.hpp" #include "armadillo_bits/constants.hpp" #include "armadillo_bits/constants_compat.hpp" #ifdef ARMA_RNG_ALT #include ARMA_INCFILE_WRAP(ARMA_RNG_ALT) #else #include "armadillo_bits/arma_rng_cxx98.hpp" #endif #include "armadillo_bits/arma_rng_cxx11.hpp" #include "armadillo_bits/arma_rng.hpp" // // class prototypes #include "armadillo_bits/Base_bones.hpp" #include "armadillo_bits/BaseCube_bones.hpp" #include "armadillo_bits/SpBase_bones.hpp" #include "armadillo_bits/blas_bones.hpp" #include "armadillo_bits/lapack_bones.hpp" #include "armadillo_bits/atlas_bones.hpp" #include "armadillo_bits/arpack_bones.hpp" #include "armadillo_bits/superlu_bones.hpp" #include "armadillo_bits/hdf5_bones.hpp" #include "armadillo_bits/blas_wrapper.hpp" #include "armadillo_bits/lapack_wrapper.hpp" #include "armadillo_bits/atlas_wrapper.hpp" #include "armadillo_bits/arpack_wrapper.hpp" #include "armadillo_bits/superlu_wrapper.hpp" #include "armadillo_bits/cond_rel_bones.hpp" #include "armadillo_bits/arrayops_bones.hpp" #include "armadillo_bits/podarray_bones.hpp" #include "armadillo_bits/auxlib_bones.hpp" #include "armadillo_bits/sp_auxlib_bones.hpp" #include "armadillo_bits/injector_bones.hpp" #include "armadillo_bits/Mat_bones.hpp" #include "armadillo_bits/Col_bones.hpp" #include "armadillo_bits/Row_bones.hpp" #include "armadillo_bits/Cube_bones.hpp" #include "armadillo_bits/xvec_htrans_bones.hpp" #include "armadillo_bits/xtrans_mat_bones.hpp" #include "armadillo_bits/SizeMat_bones.hpp" #include "armadillo_bits/SizeCube_bones.hpp" #include "armadillo_bits/SpValProxy_bones.hpp" #include "armadillo_bits/SpMat_bones.hpp" #include "armadillo_bits/SpCol_bones.hpp" #include "armadillo_bits/SpRow_bones.hpp" #include "armadillo_bits/SpSubview_bones.hpp" #include "armadillo_bits/spdiagview_bones.hpp" #include "armadillo_bits/typedef_mat_fixed.hpp" #include "armadillo_bits/field_bones.hpp" #include "armadillo_bits/subview_bones.hpp" #include "armadillo_bits/subview_elem1_bones.hpp" #include "armadillo_bits/subview_elem2_bones.hpp" #include "armadillo_bits/subview_field_bones.hpp" #include "armadillo_bits/subview_cube_bones.hpp" #include "armadillo_bits/diagview_bones.hpp" #include "armadillo_bits/subview_each_bones.hpp" #include "armadillo_bits/diskio_bones.hpp" #include "armadillo_bits/wall_clock_bones.hpp" #include "armadillo_bits/running_stat_bones.hpp" #include "armadillo_bits/running_stat_vec_bones.hpp" #include "armadillo_bits/Op_bones.hpp" #include "armadillo_bits/OpCube_bones.hpp" #include "armadillo_bits/SpOp_bones.hpp" #include "armadillo_bits/eOp_bones.hpp" #include "armadillo_bits/eOpCube_bones.hpp" #include "armadillo_bits/mtOp_bones.hpp" #include "armadillo_bits/mtOpCube_bones.hpp" #include "armadillo_bits/mtSpOp_bones.hpp" #include "armadillo_bits/Glue_bones.hpp" #include "armadillo_bits/eGlue_bones.hpp" #include "armadillo_bits/mtGlue_bones.hpp" #include "armadillo_bits/SpGlue_bones.hpp" #include "armadillo_bits/GlueCube_bones.hpp" #include "armadillo_bits/eGlueCube_bones.hpp" #include "armadillo_bits/mtGlueCube_bones.hpp" #include "armadillo_bits/eop_core_bones.hpp" #include "armadillo_bits/eglue_core_bones.hpp" #include "armadillo_bits/Gen_bones.hpp" #include "armadillo_bits/GenCube_bones.hpp" #include "armadillo_bits/op_diagmat_bones.hpp" #include "armadillo_bits/op_diagvec_bones.hpp" #include "armadillo_bits/op_dot_bones.hpp" #include "armadillo_bits/op_inv_bones.hpp" #include "armadillo_bits/op_htrans_bones.hpp" #include "armadillo_bits/op_max_bones.hpp" #include "armadillo_bits/op_min_bones.hpp" #include "armadillo_bits/op_mean_bones.hpp" #include "armadillo_bits/op_median_bones.hpp" #include "armadillo_bits/op_sort_bones.hpp" #include "armadillo_bits/op_sort_index_bones.hpp" #include "armadillo_bits/op_sum_bones.hpp" #include "armadillo_bits/op_stddev_bones.hpp" #include "armadillo_bits/op_strans_bones.hpp" #include "armadillo_bits/op_var_bones.hpp" #include "armadillo_bits/op_repmat_bones.hpp" #include "armadillo_bits/op_reshape_bones.hpp" #include "armadillo_bits/op_vectorise_bones.hpp" #include "armadillo_bits/op_resize_bones.hpp" #include "armadillo_bits/op_cov_bones.hpp" #include "armadillo_bits/op_cor_bones.hpp" #include "armadillo_bits/op_shuffle_bones.hpp" #include "armadillo_bits/op_prod_bones.hpp" #include "armadillo_bits/op_pinv_bones.hpp" #include "armadillo_bits/op_dotext_bones.hpp" #include "armadillo_bits/op_flip_bones.hpp" #include "armadillo_bits/op_princomp_bones.hpp" #include "armadillo_bits/op_misc_bones.hpp" #include "armadillo_bits/op_relational_bones.hpp" #include "armadillo_bits/op_find_bones.hpp" #include "armadillo_bits/op_chol_bones.hpp" #include "armadillo_bits/op_cx_scalar_bones.hpp" #include "armadillo_bits/op_trimat_bones.hpp" #include "armadillo_bits/op_cumsum_bones.hpp" #include "armadillo_bits/op_symmat_bones.hpp" #include "armadillo_bits/op_hist_bones.hpp" #include "armadillo_bits/op_unique_bones.hpp" #include "armadillo_bits/op_toeplitz_bones.hpp" #include "armadillo_bits/op_fft_bones.hpp" #include "armadillo_bits/op_any_bones.hpp" #include "armadillo_bits/op_all_bones.hpp" #include "armadillo_bits/op_normalise_bones.hpp" #include "armadillo_bits/op_clamp_bones.hpp" #include "armadillo_bits/op_expmat_bones.hpp" #include "armadillo_bits/op_nonzeros_bones.hpp" #include "armadillo_bits/glue_times_bones.hpp" #include "armadillo_bits/glue_mixed_bones.hpp" #include "armadillo_bits/glue_cov_bones.hpp" #include "armadillo_bits/glue_cor_bones.hpp" #include "armadillo_bits/glue_kron_bones.hpp" #include "armadillo_bits/glue_cross_bones.hpp" #include "armadillo_bits/glue_join_bones.hpp" #include "armadillo_bits/glue_relational_bones.hpp" #include "armadillo_bits/glue_solve_bones.hpp" #include "armadillo_bits/glue_conv_bones.hpp" #include "armadillo_bits/glue_toeplitz_bones.hpp" #include "armadillo_bits/glue_hist_bones.hpp" #include "armadillo_bits/glue_histc_bones.hpp" #include "armadillo_bits/glue_max_bones.hpp" #include "armadillo_bits/glue_min_bones.hpp" #include "armadillo_bits/spop_max_bones.hpp" #include "armadillo_bits/spop_min_bones.hpp" #include "armadillo_bits/spop_sum_bones.hpp" #include "armadillo_bits/spop_strans_bones.hpp" #include "armadillo_bits/spop_htrans_bones.hpp" #include "armadillo_bits/spop_misc_bones.hpp" #include "armadillo_bits/spop_mean_bones.hpp" #include "armadillo_bits/spop_var_bones.hpp" #include "armadillo_bits/spglue_plus_bones.hpp" #include "armadillo_bits/spglue_minus_bones.hpp" #include "armadillo_bits/spglue_times_bones.hpp" #include "armadillo_bits/spglue_join_bones.hpp" // // low-level debugging and memory handling functions #include "armadillo_bits/debug.hpp" #include "armadillo_bits/memory.hpp" // // wrappers for various cmath functions #include "armadillo_bits/arma_cmath.hpp" // // classes that underlay metaprogramming #include "armadillo_bits/unwrap.hpp" #include "armadillo_bits/unwrap_cube.hpp" #include "armadillo_bits/unwrap_spmat.hpp" #include "armadillo_bits/Proxy.hpp" #include "armadillo_bits/ProxyCube.hpp" #include "armadillo_bits/SpProxy.hpp" #include "armadillo_bits/diagmat_proxy.hpp" #include "armadillo_bits/strip.hpp" #include "armadillo_bits/Op_meat.hpp" #include "armadillo_bits/OpCube_meat.hpp" #include "armadillo_bits/SpOp_meat.hpp" #include "armadillo_bits/mtOp_meat.hpp" #include "armadillo_bits/mtOpCube_meat.hpp" #include "armadillo_bits/mtSpOp_meat.hpp" #include "armadillo_bits/Glue_meat.hpp" #include "armadillo_bits/GlueCube_meat.hpp" #include "armadillo_bits/SpGlue_meat.hpp" #include "armadillo_bits/eop_aux.hpp" #include "armadillo_bits/eOp_meat.hpp" #include "armadillo_bits/eOpCube_meat.hpp" #include "armadillo_bits/eGlue_meat.hpp" #include "armadillo_bits/eGlueCube_meat.hpp" #include "armadillo_bits/mtGlue_meat.hpp" #include "armadillo_bits/mtGlueCube_meat.hpp" #include "armadillo_bits/Base_meat.hpp" #include "armadillo_bits/BaseCube_meat.hpp" #include "armadillo_bits/SpBase_meat.hpp" #include "armadillo_bits/Gen_meat.hpp" #include "armadillo_bits/GenCube_meat.hpp" // // ostream #include "armadillo_bits/arma_ostream_bones.hpp" #include "armadillo_bits/arma_ostream_meat.hpp" // // n_unique, which is used by some sparse operators #include "armadillo_bits/fn_n_unique.hpp" // // operators #include "armadillo_bits/operator_plus.hpp" #include "armadillo_bits/operator_minus.hpp" #include "armadillo_bits/operator_times.hpp" #include "armadillo_bits/operator_schur.hpp" #include "armadillo_bits/operator_div.hpp" #include "armadillo_bits/operator_relational.hpp" #include "armadillo_bits/operator_cube_plus.hpp" #include "armadillo_bits/operator_cube_minus.hpp" #include "armadillo_bits/operator_cube_times.hpp" #include "armadillo_bits/operator_cube_schur.hpp" #include "armadillo_bits/operator_cube_div.hpp" #include "armadillo_bits/operator_cube_relational.hpp" #include "armadillo_bits/operator_ostream.hpp" // // user accessible functions // the order of the fn_*.hpp include files matters, // as some files require functionality given in preceding files #include "armadillo_bits/fn_conv_to.hpp" #include "armadillo_bits/fn_min.hpp" #include "armadillo_bits/fn_max.hpp" #include "armadillo_bits/fn_accu.hpp" #include "armadillo_bits/fn_sum.hpp" #include "armadillo_bits/fn_diagmat.hpp" #include "armadillo_bits/fn_diagvec.hpp" #include "armadillo_bits/fn_inv.hpp" #include "armadillo_bits/fn_trace.hpp" #include "armadillo_bits/fn_trans.hpp" #include "armadillo_bits/fn_det.hpp" #include "armadillo_bits/fn_log_det.hpp" #include "armadillo_bits/fn_eig_sym.hpp" #include "armadillo_bits/fn_eig_gen.hpp" #include "armadillo_bits/fn_eig_pair.hpp" #include "armadillo_bits/fn_lu.hpp" #include "armadillo_bits/fn_zeros.hpp" #include "armadillo_bits/fn_ones.hpp" #include "armadillo_bits/fn_eye.hpp" #include "armadillo_bits/fn_misc.hpp" #include "armadillo_bits/fn_find.hpp" #include "armadillo_bits/fn_elem.hpp" #include "armadillo_bits/fn_norm.hpp" #include "armadillo_bits/fn_dot.hpp" #include "armadillo_bits/fn_randu.hpp" #include "armadillo_bits/fn_randn.hpp" #include "armadillo_bits/fn_trig.hpp" #include "armadillo_bits/fn_mean.hpp" #include "armadillo_bits/fn_median.hpp" #include "armadillo_bits/fn_stddev.hpp" #include "armadillo_bits/fn_var.hpp" #include "armadillo_bits/fn_sort.hpp" #include "armadillo_bits/fn_sort_index.hpp" #include "armadillo_bits/fn_strans.hpp" #include "armadillo_bits/fn_chol.hpp" #include "armadillo_bits/fn_qr.hpp" #include "armadillo_bits/fn_svd.hpp" #include "armadillo_bits/fn_solve.hpp" #include "armadillo_bits/fn_repmat.hpp" #include "armadillo_bits/fn_reshape.hpp" #include "armadillo_bits/fn_vectorise.hpp" #include "armadillo_bits/fn_resize.hpp" #include "armadillo_bits/fn_cov.hpp" #include "armadillo_bits/fn_cor.hpp" #include "armadillo_bits/fn_shuffle.hpp" #include "armadillo_bits/fn_prod.hpp" #include "armadillo_bits/fn_eps.hpp" #include "armadillo_bits/fn_pinv.hpp" #include "armadillo_bits/fn_rank.hpp" #include "armadillo_bits/fn_kron.hpp" #include "armadillo_bits/fn_flip.hpp" #include "armadillo_bits/fn_as_scalar.hpp" #include "armadillo_bits/fn_princomp.hpp" #include "armadillo_bits/fn_cross.hpp" #include "armadillo_bits/fn_join.hpp" #include "armadillo_bits/fn_conv.hpp" #include "armadillo_bits/fn_trunc_exp.hpp" #include "armadillo_bits/fn_trunc_log.hpp" #include "armadillo_bits/fn_toeplitz.hpp" #include "armadillo_bits/fn_trimat.hpp" #include "armadillo_bits/fn_cumsum.hpp" #include "armadillo_bits/fn_symmat.hpp" #include "armadillo_bits/fn_syl_lyap.hpp" #include "armadillo_bits/fn_hist.hpp" #include "armadillo_bits/fn_histc.hpp" #include "armadillo_bits/fn_unique.hpp" #include "armadillo_bits/fn_fft.hpp" #include "armadillo_bits/fn_fft2.hpp" #include "armadillo_bits/fn_any.hpp" #include "armadillo_bits/fn_all.hpp" #include "armadillo_bits/fn_size.hpp" #include "armadillo_bits/fn_numel.hpp" #include "armadillo_bits/fn_inplace_strans.hpp" #include "armadillo_bits/fn_inplace_trans.hpp" #include "armadillo_bits/fn_randi.hpp" #include "armadillo_bits/fn_randg.hpp" #include "armadillo_bits/fn_cond.hpp" #include "armadillo_bits/fn_normalise.hpp" #include "armadillo_bits/fn_clamp.hpp" #include "armadillo_bits/fn_expmat.hpp" #include "armadillo_bits/fn_nonzeros.hpp" #include "armadillo_bits/fn_interp1.hpp" #include "armadillo_bits/fn_qz.hpp" #include "armadillo_bits/fn_speye.hpp" #include "armadillo_bits/fn_spones.hpp" #include "armadillo_bits/fn_sprandn.hpp" #include "armadillo_bits/fn_sprandu.hpp" #include "armadillo_bits/fn_eigs_sym.hpp" #include "armadillo_bits/fn_eigs_gen.hpp" #include "armadillo_bits/fn_norm_sparse.hpp" #include "armadillo_bits/fn_spsolve.hpp" #include "armadillo_bits/fn_svds.hpp" // // misc stuff #include "armadillo_bits/hdf5_misc.hpp" #include "armadillo_bits/fft_engine.hpp" #if !defined(ARMA_BAD_COMPILER) #include "armadillo_bits/gmm_misc_bones.hpp" #include "armadillo_bits/gmm_misc_meat.hpp" #include "armadillo_bits/gmm_diag_bones.hpp" #include "armadillo_bits/gmm_diag_meat.hpp" #endif // // classes implementing various forms of dense matrix multiplication #include "armadillo_bits/mul_gemv.hpp" #include "armadillo_bits/mul_gemm.hpp" #include "armadillo_bits/mul_gemm_mixed.hpp" #include "armadillo_bits/mul_syrk.hpp" #include "armadillo_bits/mul_herk.hpp" // // class meat #include "armadillo_bits/eop_core_meat.hpp" #include "armadillo_bits/eglue_core_meat.hpp" #include "armadillo_bits/cond_rel_meat.hpp" #include "armadillo_bits/arrayops_meat.hpp" #include "armadillo_bits/podarray_meat.hpp" #include "armadillo_bits/auxlib_meat.hpp" #include "armadillo_bits/sp_auxlib_meat.hpp" #include "armadillo_bits/injector_meat.hpp" #include "armadillo_bits/Mat_meat.hpp" #include "armadillo_bits/Col_meat.hpp" #include "armadillo_bits/Row_meat.hpp" #include "armadillo_bits/Cube_meat.hpp" #include "armadillo_bits/xvec_htrans_meat.hpp" #include "armadillo_bits/xtrans_mat_meat.hpp" #include "armadillo_bits/SizeMat_meat.hpp" #include "armadillo_bits/SizeCube_meat.hpp" #include "armadillo_bits/field_meat.hpp" #include "armadillo_bits/subview_meat.hpp" #include "armadillo_bits/subview_elem1_meat.hpp" #include "armadillo_bits/subview_elem2_meat.hpp" #include "armadillo_bits/subview_field_meat.hpp" #include "armadillo_bits/subview_cube_meat.hpp" #include "armadillo_bits/diagview_meat.hpp" #include "armadillo_bits/subview_each_meat.hpp" #include "armadillo_bits/SpValProxy_meat.hpp" #include "armadillo_bits/SpMat_meat.hpp" #include "armadillo_bits/SpMat_iterators_meat.hpp" #include "armadillo_bits/SpCol_meat.hpp" #include "armadillo_bits/SpRow_meat.hpp" #include "armadillo_bits/SpSubview_meat.hpp" #include "armadillo_bits/SpSubview_iterators_meat.hpp" #include "armadillo_bits/spdiagview_meat.hpp" #include "armadillo_bits/diskio_meat.hpp" #include "armadillo_bits/wall_clock_meat.hpp" #include "armadillo_bits/running_stat_meat.hpp" #include "armadillo_bits/running_stat_vec_meat.hpp" #include "armadillo_bits/op_diagmat_meat.hpp" #include "armadillo_bits/op_diagvec_meat.hpp" #include "armadillo_bits/op_dot_meat.hpp" #include "armadillo_bits/op_inv_meat.hpp" #include "armadillo_bits/op_htrans_meat.hpp" #include "armadillo_bits/op_max_meat.hpp" #include "armadillo_bits/op_min_meat.hpp" #include "armadillo_bits/op_mean_meat.hpp" #include "armadillo_bits/op_median_meat.hpp" #include "armadillo_bits/op_sort_meat.hpp" #include "armadillo_bits/op_sort_index_meat.hpp" #include "armadillo_bits/op_sum_meat.hpp" #include "armadillo_bits/op_stddev_meat.hpp" #include "armadillo_bits/op_strans_meat.hpp" #include "armadillo_bits/op_var_meat.hpp" #include "armadillo_bits/op_repmat_meat.hpp" #include "armadillo_bits/op_reshape_meat.hpp" #include "armadillo_bits/op_vectorise_meat.hpp" #include "armadillo_bits/op_resize_meat.hpp" #include "armadillo_bits/op_cov_meat.hpp" #include "armadillo_bits/op_cor_meat.hpp" #include "armadillo_bits/op_shuffle_meat.hpp" #include "armadillo_bits/op_prod_meat.hpp" #include "armadillo_bits/op_pinv_meat.hpp" #include "armadillo_bits/op_dotext_meat.hpp" #include "armadillo_bits/op_flip_meat.hpp" #include "armadillo_bits/op_princomp_meat.hpp" #include "armadillo_bits/op_misc_meat.hpp" #include "armadillo_bits/op_relational_meat.hpp" #include "armadillo_bits/op_find_meat.hpp" #include "armadillo_bits/op_chol_meat.hpp" #include "armadillo_bits/op_cx_scalar_meat.hpp" #include "armadillo_bits/op_trimat_meat.hpp" #include "armadillo_bits/op_cumsum_meat.hpp" #include "armadillo_bits/op_symmat_meat.hpp" #include "armadillo_bits/op_hist_meat.hpp" #include "armadillo_bits/op_unique_meat.hpp" #include "armadillo_bits/op_toeplitz_meat.hpp" #include "armadillo_bits/op_fft_meat.hpp" #include "armadillo_bits/op_any_meat.hpp" #include "armadillo_bits/op_all_meat.hpp" #include "armadillo_bits/op_normalise_meat.hpp" #include "armadillo_bits/op_clamp_meat.hpp" #include "armadillo_bits/op_expmat_meat.hpp" #include "armadillo_bits/op_nonzeros_meat.hpp" #include "armadillo_bits/glue_times_meat.hpp" #include "armadillo_bits/glue_mixed_meat.hpp" #include "armadillo_bits/glue_cov_meat.hpp" #include "armadillo_bits/glue_cor_meat.hpp" #include "armadillo_bits/glue_kron_meat.hpp" #include "armadillo_bits/glue_cross_meat.hpp" #include "armadillo_bits/glue_join_meat.hpp" #include "armadillo_bits/glue_relational_meat.hpp" #include "armadillo_bits/glue_solve_meat.hpp" #include "armadillo_bits/glue_conv_meat.hpp" #include "armadillo_bits/glue_toeplitz_meat.hpp" #include "armadillo_bits/glue_hist_meat.hpp" #include "armadillo_bits/glue_histc_meat.hpp" #include "armadillo_bits/glue_max_meat.hpp" #include "armadillo_bits/glue_min_meat.hpp" #include "armadillo_bits/spop_max_meat.hpp" #include "armadillo_bits/spop_min_meat.hpp" #include "armadillo_bits/spop_sum_meat.hpp" #include "armadillo_bits/spop_strans_meat.hpp" #include "armadillo_bits/spop_htrans_meat.hpp" #include "armadillo_bits/spop_misc_meat.hpp" #include "armadillo_bits/spop_mean_meat.hpp" #include "armadillo_bits/spop_var_meat.hpp" #include "armadillo_bits/spglue_plus_meat.hpp" #include "armadillo_bits/spglue_minus_meat.hpp" #include "armadillo_bits/spglue_times_meat.hpp" #include "armadillo_bits/spglue_join_meat.hpp" } #include "armadillo_bits/compiler_setup_post.hpp" #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/BaseCube_bones.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup BaseCube //! @{ template struct BaseCube_eval_Cube { arma_inline const derived& eval() const; }; template struct BaseCube_eval_expr { arma_inline Cube eval() const; //!< force the immediate evaluation of a delayed expression }; template struct BaseCube_eval {}; template struct BaseCube_eval { typedef BaseCube_eval_Cube result; }; template struct BaseCube_eval { typedef BaseCube_eval_expr result; }; //! Analog of the Base class, intended for cubes template struct BaseCube : public BaseCube_eval::value>::result { arma_inline const derived& get_ref() const; inline void print(const std::string extra_text = "") const; inline void print(std::ostream& user_stream, const std::string extra_text = "") const; inline void raw_print(const std::string extra_text = "") const; inline void raw_print(std::ostream& user_stream, const std::string extra_text = "") const; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/BaseCube_meat.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup BaseCube //! @{ template arma_inline const derived& BaseCube::get_ref() const { return static_cast(*this); } template inline void BaseCube::print(const std::string extra_text) const { const unwrap_cube tmp( (*this).get_ref() ); tmp.M.impl_print(extra_text); } template inline void BaseCube::print(std::ostream& user_stream, const std::string extra_text) const { const unwrap_cube tmp( (*this).get_ref() ); tmp.M.impl_print(user_stream, extra_text); } template inline void BaseCube::raw_print(const std::string extra_text) const { const unwrap_cube tmp( (*this).get_ref() ); tmp.M.impl_raw_print(extra_text); } template inline void BaseCube::raw_print(std::ostream& user_stream, const std::string extra_text) const { const unwrap_cube tmp( (*this).get_ref() ); tmp.M.impl_raw_print(user_stream, extra_text); } // // extra functions defined in BaseCube_eval_Cube template arma_inline const derived& BaseCube_eval_Cube::eval() const { arma_extra_debug_sigprint(); return static_cast(*this); } // // extra functions defined in BaseCube_eval_expr template arma_inline Cube BaseCube_eval_expr::eval() const { arma_extra_debug_sigprint(); return Cube( static_cast(*this) ); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Base_bones.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Base //! @{ template struct Base_inv_yes { arma_inline const Op i(const bool slow = false) const; //!< matrix inverse arma_inline const Op i(const char* method ) const; //!< matrix inverse }; template struct Base_inv_no { }; template struct Base_inv {}; template struct Base_inv { typedef Base_inv_yes result; }; template struct Base_inv { typedef Base_inv_no result; }; template struct Base_eval_Mat { arma_inline const derived& eval() const; }; template struct Base_eval_expr { arma_inline Mat eval() const; //!< force the immediate evaluation of a delayed expression }; template struct Base_eval {}; template struct Base_eval { typedef Base_eval_Mat result; }; template struct Base_eval { typedef Base_eval_expr result; }; template struct Base_trans_cx { arma_inline const Op t() const; arma_inline const Op ht() const; arma_inline const Op st() const; // simple transpose: no complex conjugates }; template struct Base_trans_default { arma_inline const Op t() const; arma_inline const Op ht() const; arma_inline const Op st() const; // return op_htrans instead of op_strans, as it's handled better by matrix multiplication code }; template struct Base_trans {}; template struct Base_trans { typedef Base_trans_cx result; }; template struct Base_trans { typedef Base_trans_default result; }; //! Class for static polymorphism, modelled after the "Curiously Recurring Template Pattern" (CRTP). //! Used for type-safe downcasting in functions that restrict their input(s) to be classes that are //! derived from Base (e.g. Mat, Op, Glue, diagview, subview). //! A Base object can be converted to a Mat object by the unwrap class. template struct Base : public Base_inv::value>::result , public Base_eval::value>::result , public Base_trans::value>::result { arma_inline const derived& get_ref() const; inline void print(const std::string extra_text = "") const; inline void print(std::ostream& user_stream, const std::string extra_text = "") const; inline void raw_print(const std::string extra_text = "") const; inline void raw_print(std::ostream& user_stream, const std::string extra_text = "") const; inline arma_warn_unused elem_type min() const; inline arma_warn_unused elem_type max() const; inline elem_type min(uword& index_of_min_val) const; inline elem_type max(uword& index_of_max_val) const; inline elem_type min(uword& row_of_min_val, uword& col_of_min_val) const; inline elem_type max(uword& row_of_max_val, uword& col_of_max_val) const; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Base_meat.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Base //! @{ template arma_inline const derived& Base::get_ref() const { return static_cast(*this); } template inline void Base::print(const std::string extra_text) const { const Proxy P( (*this).get_ref() ); const quasi_unwrap< typename Proxy::stored_type > tmp(P.Q); tmp.M.impl_print(extra_text); } template inline void Base::print(std::ostream& user_stream, const std::string extra_text) const { const Proxy P( (*this).get_ref() ); const quasi_unwrap< typename Proxy::stored_type > tmp(P.Q); tmp.M.impl_print(user_stream, extra_text); } template inline void Base::raw_print(const std::string extra_text) const { const Proxy P( (*this).get_ref() ); const quasi_unwrap< typename Proxy::stored_type > tmp(P.Q); tmp.M.impl_raw_print(extra_text); } template inline void Base::raw_print(std::ostream& user_stream, const std::string extra_text) const { const Proxy P( (*this).get_ref() ); const quasi_unwrap< typename Proxy::stored_type > tmp(P.Q); tmp.M.impl_raw_print(user_stream, extra_text); } template inline arma_warn_unused elem_type Base::min() const { return op_min::min( (*this).get_ref() ); } template inline arma_warn_unused elem_type Base::max() const { return op_max::max( (*this).get_ref() ); } template inline elem_type Base::min(uword& index_of_min_val) const { const Proxy P( (*this).get_ref() ); return op_min::min_with_index(P, index_of_min_val); } template inline elem_type Base::max(uword& index_of_max_val) const { const Proxy P( (*this).get_ref() ); return op_max::max_with_index(P, index_of_max_val); } template inline elem_type Base::min(uword& row_of_min_val, uword& col_of_min_val) const { const Proxy P( (*this).get_ref() ); uword index; const elem_type val = op_min::min_with_index(P, index); const uword local_n_rows = P.get_n_rows(); row_of_min_val = index % local_n_rows; col_of_min_val = index / local_n_rows; return val; } template inline elem_type Base::max(uword& row_of_max_val, uword& col_of_max_val) const { const Proxy P( (*this).get_ref() ); uword index; const elem_type val = op_max::max_with_index(P, index); const uword local_n_rows = P.get_n_rows(); row_of_max_val = index % local_n_rows; col_of_max_val = index / local_n_rows; return val; } // // extra functions defined in Base_inv_yes template arma_inline const Op Base_inv_yes::i(const bool slow) const { return Op( static_cast(*this), ((slow == false) ? 0 : 1), 0 ); } template arma_inline const Op Base_inv_yes::i(const char* method) const { const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'f')), "Base::i(): unknown method specified" ); return Op( static_cast(*this), ((sig == 'f') ? 0 : 1), 0 ); } // // extra functions defined in Base_eval_Mat template arma_inline const derived& Base_eval_Mat::eval() const { arma_extra_debug_sigprint(); return static_cast(*this); } // // extra functions defined in Base_eval_expr template arma_inline Mat Base_eval_expr::eval() const { arma_extra_debug_sigprint(); return Mat( static_cast(*this) ); } // // extra functions defined in Base_trans_cx template arma_inline const Op Base_trans_cx::t() const { return Op( static_cast(*this) ); } template arma_inline const Op Base_trans_cx::ht() const { return Op( static_cast(*this) ); } template arma_inline const Op Base_trans_cx::st() const { return Op( static_cast(*this) ); } // // extra functions defined in Base_trans_default template arma_inline const Op Base_trans_default::t() const { return Op( static_cast(*this) ); } template arma_inline const Op Base_trans_default::ht() const { return Op( static_cast(*this) ); } template arma_inline const Op Base_trans_default::st() const { return Op( static_cast(*this) ); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Col_bones.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Col //! @{ //! Class for column vectors (matrices with only one column) template class Col : public Mat { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_col = true; static const bool is_row = false; inline Col(); inline Col(const Col& X); inline explicit Col(const uword n_elem); inline Col(const uword in_rows, const uword in_cols); template inline Col(const uword n_elem, const fill::fill_class& f); template inline Col(const uword in_rows, const uword in_cols, const fill::fill_class& f); inline Col(const char* text); inline const Col& operator=(const char* text); inline Col(const std::string& text); inline const Col& operator=(const std::string& text); inline Col(const std::vector& x); inline const Col& operator=(const std::vector& x); #if defined(ARMA_USE_CXX11) inline Col(const std::initializer_list& list); inline const Col& operator=(const std::initializer_list& list); inline Col(Col&& m); inline const Col& operator=(Col&& m); #endif inline explicit Col(const SpCol& X); inline const Col& operator=(const eT val); inline const Col& operator=(const Col& m); template inline Col(const Base& X); template inline const Col& operator=(const Base& X); inline Col( eT* aux_mem, const uword aux_length, const bool copy_aux_mem = true, const bool strict = true); inline Col(const eT* aux_mem, const uword aux_length); template inline explicit Col(const Base& A, const Base& B); template inline Col(const BaseCube& X); template inline const Col& operator=(const BaseCube& X); inline Col(const subview_cube& X); inline const Col& operator=(const subview_cube& X); inline mat_injector operator<<(const eT val); arma_inline const Op,op_htrans> t() const; arma_inline const Op,op_htrans> ht() const; arma_inline const Op,op_strans> st() const; arma_inline subview_col row(const uword row_num); arma_inline const subview_col row(const uword row_num) const; using Mat::rows; using Mat::operator(); arma_inline subview_col rows(const uword in_row1, const uword in_row2); arma_inline const subview_col rows(const uword in_row1, const uword in_row2) const; arma_inline subview_col subvec(const uword in_row1, const uword in_row2); arma_inline const subview_col subvec(const uword in_row1, const uword in_row2) const; arma_inline subview_col rows(const span& row_span); arma_inline const subview_col rows(const span& row_span) const; arma_inline subview_col subvec(const span& row_span); arma_inline const subview_col subvec(const span& row_span) const; arma_inline subview_col operator()(const span& row_span); arma_inline const subview_col operator()(const span& row_span) const; arma_inline subview_col head(const uword N); arma_inline const subview_col head(const uword N) const; arma_inline subview_col tail(const uword N); arma_inline const subview_col tail(const uword N) const; arma_inline subview_col head_rows(const uword N); arma_inline const subview_col head_rows(const uword N) const; arma_inline subview_col tail_rows(const uword N); arma_inline const subview_col tail_rows(const uword N) const; inline void shed_row (const uword row_num); inline void shed_rows(const uword in_row1, const uword in_row2); inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero = true); template inline void insert_rows(const uword row_num, const Base& X); arma_inline arma_warn_unused eT& at(const uword i); arma_inline arma_warn_unused const eT& at(const uword i) const; arma_inline arma_warn_unused eT& at(const uword in_row, const uword in_col); arma_inline arma_warn_unused const eT& at(const uword in_row, const uword in_col) const; typedef eT* row_iterator; typedef const eT* const_row_iterator; inline row_iterator begin_row(const uword row_num); inline const_row_iterator begin_row(const uword row_num) const; inline row_iterator end_row (const uword row_num); inline const_row_iterator end_row (const uword row_num) const; template class fixed; protected: inline Col(const arma_fixed_indicator&, const uword in_n_elem, const eT* in_mem); public: #ifdef ARMA_EXTRA_COL_PROTO #include ARMA_INCFILE_WRAP(ARMA_EXTRA_COL_PROTO) #endif }; template template class Col::fixed : public Col { private: static const bool use_extra = (fixed_n_elem > arma_config::mat_prealloc); arma_align_mem eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ]; arma_inline void change_to_row(); public: typedef fixed Col_fixed_type; typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_col = true; static const bool is_row = false; static const uword n_rows = fixed_n_elem; static const uword n_cols = 1; static const uword n_elem = fixed_n_elem; arma_inline fixed(); arma_inline fixed(const fixed& X); inline fixed(const subview_cube& X); template inline fixed(const fill::fill_class& f); template inline fixed(const Base& A); template inline fixed(const Base& A, const Base& B); inline fixed(const eT* aux_mem); inline fixed(const char* text); inline fixed(const std::string& text); template inline const Col& operator=(const Base& A); inline const Col& operator=(const eT val); inline const Col& operator=(const char* text); inline const Col& operator=(const std::string& text); inline const Col& operator=(const subview_cube& X); using Col::operator(); #if defined(ARMA_USE_CXX11) inline fixed(const std::initializer_list& list); inline const Col& operator=(const std::initializer_list& list); #endif arma_inline const Col& operator=(const fixed& X); #if defined(ARMA_GOOD_COMPILER) template inline const Col& operator=(const eOp& X); template inline const Col& operator=(const eGlue& X); #endif arma_inline const Op< Col_fixed_type, op_htrans > t() const; arma_inline const Op< Col_fixed_type, op_htrans > ht() const; arma_inline const Op< Col_fixed_type, op_strans > st() const; arma_inline arma_warn_unused const eT& at_alt (const uword i) const; arma_inline arma_warn_unused eT& operator[] (const uword i); arma_inline arma_warn_unused const eT& operator[] (const uword i) const; arma_inline arma_warn_unused eT& at (const uword i); arma_inline arma_warn_unused const eT& at (const uword i) const; arma_inline arma_warn_unused eT& operator() (const uword i); arma_inline arma_warn_unused const eT& operator() (const uword i) const; arma_inline arma_warn_unused eT& at (const uword in_row, const uword in_col); arma_inline arma_warn_unused const eT& at (const uword in_row, const uword in_col) const; arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col); arma_inline arma_warn_unused const eT& operator() (const uword in_row, const uword in_col) const; arma_inline arma_warn_unused eT* memptr(); arma_inline arma_warn_unused const eT* memptr() const; arma_hot inline const Col& fill(const eT val); arma_hot inline const Col& zeros(); arma_hot inline const Col& ones(); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Col_meat.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Col //! @{ //! construct an empty column vector template inline Col::Col() : Mat(arma_vec_indicator(), 1) { arma_extra_debug_sigprint(); } template inline Col::Col(const Col& X) : Mat(arma_vec_indicator(), X.n_elem, 1, 1) { arma_extra_debug_sigprint(); arrayops::copy((*this).memptr(), X.memptr(), X.n_elem); } //! construct a column vector with the specified number of n_elem template inline Col::Col(const uword in_n_elem) : Mat(arma_vec_indicator(), in_n_elem, 1, 1) { arma_extra_debug_sigprint(); } template inline Col::Col(const uword in_n_rows, const uword in_n_cols) : Mat(arma_vec_indicator(), 0, 0, 1) { arma_extra_debug_sigprint(); Mat::init_warm(in_n_rows, in_n_cols); } template template inline Col::Col(const uword in_n_elem, const fill::fill_class& f) : Mat(arma_vec_indicator(), in_n_elem, 1, 1) { arma_extra_debug_sigprint(); (*this).fill(f); } template template inline Col::Col(const uword in_n_rows, const uword in_n_cols, const fill::fill_class& f) : Mat(arma_vec_indicator(), 0, 0, 1) { arma_extra_debug_sigprint(); Mat::init_warm(in_n_rows, in_n_cols); (*this).fill(f); } //! construct a column vector from specified text template inline Col::Col(const char* text) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 2; Mat::operator=(text); std::swap( access::rw(Mat::n_rows), access::rw(Mat::n_cols) ); access::rw(Mat::vec_state) = 1; } //! construct a column vector from specified text template inline const Col& Col::operator=(const char* text) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 2; Mat::operator=(text); std::swap( access::rw(Mat::n_rows), access::rw(Mat::n_cols) ); access::rw(Mat::vec_state) = 1; return *this; } //! construct a column vector from specified text template inline Col::Col(const std::string& text) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 2; Mat::operator=(text); std::swap( access::rw(Mat::n_rows), access::rw(Mat::n_cols) ); access::rw(Mat::vec_state) = 1; } //! construct a column vector from specified text template inline const Col& Col::operator=(const std::string& text) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 2; Mat::operator=(text); std::swap( access::rw(Mat::n_rows), access::rw(Mat::n_cols) ); access::rw(Mat::vec_state) = 1; return *this; } //! create a column vector from std::vector template inline Col::Col(const std::vector& x) : Mat(arma_vec_indicator(), uword(x.size()), 1, 1) { arma_extra_debug_sigprint_this(this); if(x.size() > 0) { arrayops::copy( Mat::memptr(), &(x[0]), uword(x.size()) ); } } //! create a column vector from std::vector template inline const Col& Col::operator=(const std::vector& x) { arma_extra_debug_sigprint(); Mat::init_warm(uword(x.size()), 1); if(x.size() > 0) { arrayops::copy( Mat::memptr(), &(x[0]), uword(x.size()) ); } return *this; } #if defined(ARMA_USE_CXX11) template inline Col::Col(const std::initializer_list& list) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 2; Mat::operator=(list); std::swap( access::rw(Mat::n_rows), access::rw(Mat::n_cols) ); access::rw(Mat::vec_state) = 1; } template inline const Col& Col::operator=(const std::initializer_list& list) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 2; Mat::operator=(list); std::swap( access::rw(Mat::n_rows), access::rw(Mat::n_cols) ); access::rw(Mat::vec_state) = 1; return *this; } template inline Col::Col(Col&& X) : Mat(arma_vec_indicator(), 1) { arma_extra_debug_sigprint(arma_boost::format("this = %x X = %x") % this % &X); access::rw(Mat::n_rows) = X.n_rows; access::rw(Mat::n_cols) = 1; access::rw(Mat::n_elem) = X.n_elem; if( ((X.mem_state == 0) && (X.n_elem > arma_config::mat_prealloc)) || (X.mem_state == 1) || (X.mem_state == 2) ) { access::rw(Mat::mem_state) = X.mem_state; access::rw(Mat::mem) = X.mem; access::rw(X.n_rows) = 0; access::rw(X.n_cols) = 1; access::rw(X.n_elem) = 0; access::rw(X.mem_state) = 0; access::rw(X.mem) = 0; } else { (*this).init_cold(); arrayops::copy( (*this).memptr(), X.mem, X.n_elem ); if( (X.mem_state == 0) && (X.n_elem <= arma_config::mat_prealloc) ) { access::rw(X.n_rows) = 0; access::rw(X.n_cols) = 1; access::rw(X.n_elem) = 0; access::rw(X.mem) = 0; } } } template inline const Col& Col::operator=(Col&& X) { arma_extra_debug_sigprint(arma_boost::format("this = %x X = %x") % this % &X); (*this).steal_mem(X); if( (X.mem_state == 0) && (X.n_elem <= arma_config::mat_prealloc) && (this != &X) ) { access::rw(X.n_rows) = 0; access::rw(X.n_cols) = 1; access::rw(X.n_elem) = 0; access::rw(X.mem) = 0; } return *this; } #endif template inline Col::Col(const SpCol& X) : Mat(arma_vec_indicator(), X.n_elem, 1, 1) { arma_extra_debug_sigprint_this(this); arrayops::inplace_set(Mat::memptr(), eT(0), X.n_elem); for(typename SpCol::const_iterator it = X.begin(); it != X.end(); ++it) { at(it.row()) = (*it); } } template inline const Col& Col::operator=(const eT val) { arma_extra_debug_sigprint(); Mat::operator=(val); return *this; } template inline const Col& Col::operator=(const Col& X) { arma_extra_debug_sigprint(); Mat::operator=(X); return *this; } template template inline Col::Col(const Base& X) : Mat(arma_vec_indicator(), 1) { arma_extra_debug_sigprint(); Mat::operator=(X.get_ref()); } template template inline const Col& Col::operator=(const Base& X) { arma_extra_debug_sigprint(); Mat::operator=(X.get_ref()); return *this; } //! construct a column vector from a given auxiliary array of eTs template inline Col::Col(eT* aux_mem, const uword aux_length, const bool copy_aux_mem, const bool strict) : Mat(aux_mem, aux_length, 1, copy_aux_mem, strict) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 1; } //! construct a column vector from a given auxiliary array of eTs template inline Col::Col(const eT* aux_mem, const uword aux_length) : Mat(aux_mem, aux_length, 1) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 1; } template template inline Col::Col ( const Base::pod_type, T1>& A, const Base::pod_type, T2>& B ) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 1; Mat::init(A,B); } template template inline Col::Col(const BaseCube& X) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 1; Mat::operator=(X); } template template inline const Col& Col::operator=(const BaseCube& X) { arma_extra_debug_sigprint(); Mat::operator=(X); return *this; } template inline Col::Col(const subview_cube& X) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 1; Mat::operator=(X); } template inline const Col& Col::operator=(const subview_cube& X) { arma_extra_debug_sigprint(); Mat::operator=(X); return *this; } template inline mat_injector< Col > Col::operator<<(const eT val) { return mat_injector< Col >(*this, val); } template arma_inline const Op,op_htrans> Col::t() const { return Op,op_htrans>(*this); } template arma_inline const Op,op_htrans> Col::ht() const { return Op,op_htrans>(*this); } template arma_inline const Op,op_strans> Col::st() const { return Op,op_strans>(*this); } template arma_inline subview_col Col::row(const uword in_row1) { arma_extra_debug_sigprint(); arma_debug_check( (in_row1 >= Mat::n_rows), "Col::row(): indices out of bounds or incorrectly used"); return subview_col(*this, 0, in_row1, 1); } template arma_inline const subview_col Col::row(const uword in_row1) const { arma_extra_debug_sigprint(); arma_debug_check( (in_row1 >= Mat::n_rows), "Col::row(): indices out of bounds or incorrectly used"); return subview_col(*this, 0, in_row1, 1); } template arma_inline subview_col Col::rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat::n_rows) ), "Col::rows(): indices out of bounds or incorrectly used"); const uword subview_n_rows = in_row2 - in_row1 + 1; return subview_col(*this, 0, in_row1, subview_n_rows); } template arma_inline const subview_col Col::rows(const uword in_row1, const uword in_row2) const { arma_extra_debug_sigprint(); arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat::n_rows) ), "Col::rows(): indices out of bounds or incorrectly used"); const uword subview_n_rows = in_row2 - in_row1 + 1; return subview_col(*this, 0, in_row1, subview_n_rows); } template arma_inline subview_col Col::subvec(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat::n_rows) ), "Col::subvec(): indices out of bounds or incorrectly used"); const uword subview_n_rows = in_row2 - in_row1 + 1; return subview_col(*this, 0, in_row1, subview_n_rows); } template arma_inline const subview_col Col::subvec(const uword in_row1, const uword in_row2) const { arma_extra_debug_sigprint(); arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat::n_rows) ), "Col::subvec(): indices out of bounds or incorrectly used"); const uword subview_n_rows = in_row2 - in_row1 + 1; return subview_col(*this, 0, in_row1, subview_n_rows); } template arma_inline subview_col Col::rows(const span& row_span) { arma_extra_debug_sigprint(); return subvec(row_span); } template arma_inline const subview_col Col::rows(const span& row_span) const { arma_extra_debug_sigprint(); return subvec(row_span); } template arma_inline subview_col Col::subvec(const span& row_span) { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const uword local_n_rows = Mat::n_rows; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword subvec_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; arma_debug_check( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ), "Col::subvec(): indices out of bounds or incorrectly used"); return subview_col(*this, 0, in_row1, subvec_n_rows); } template arma_inline const subview_col Col::subvec(const span& row_span) const { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const uword local_n_rows = Mat::n_rows; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword subvec_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; arma_debug_check( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ), "Col::subvec(): indices out of bounds or incorrectly used"); return subview_col(*this, 0, in_row1, subvec_n_rows); } template arma_inline subview_col Col::operator()(const span& row_span) { arma_extra_debug_sigprint(); return subvec(row_span); } template arma_inline const subview_col Col::operator()(const span& row_span) const { arma_extra_debug_sigprint(); return subvec(row_span); } template arma_inline subview_col Col::head(const uword N) { arma_extra_debug_sigprint(); arma_debug_check( (N > Mat::n_rows), "Col::head(): size out of bounds"); return subview_col(*this, 0, 0, N); } template arma_inline const subview_col Col::head(const uword N) const { arma_extra_debug_sigprint(); arma_debug_check( (N > Mat::n_rows), "Col::head(): size out of bounds"); return subview_col(*this, 0, 0, N); } template arma_inline subview_col Col::tail(const uword N) { arma_extra_debug_sigprint(); arma_debug_check( (N > Mat::n_rows), "Col::tail(): size out of bounds"); const uword start_row = Mat::n_rows - N; return subview_col(*this, 0, start_row, N); } template arma_inline const subview_col Col::tail(const uword N) const { arma_extra_debug_sigprint(); arma_debug_check( (N > Mat::n_rows), "Col::tail(): size out of bounds"); const uword start_row = Mat::n_rows - N; return subview_col(*this, 0, start_row, N); } template arma_inline subview_col Col::head_rows(const uword N) { arma_extra_debug_sigprint(); return (*this).head(N); } template arma_inline const subview_col Col::head_rows(const uword N) const { arma_extra_debug_sigprint(); return (*this).head(N); } template arma_inline subview_col Col::tail_rows(const uword N) { arma_extra_debug_sigprint(); return (*this).tail(N); } template arma_inline const subview_col Col::tail_rows(const uword N) const { arma_extra_debug_sigprint(); return (*this).tail(N); } //! remove specified row template inline void Col::shed_row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check( row_num >= Mat::n_rows, "Col::shed_row(): index out of bounds"); shed_rows(row_num, row_num); } //! remove specified rows template inline void Col::shed_rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_row2 >= Mat::n_rows), "Col::shed_rows(): indices out of bounds or incorrectly used" ); const uword n_keep_front = in_row1; const uword n_keep_back = Mat::n_rows - (in_row2 + 1); Col X(n_keep_front + n_keep_back); eT* X_mem = X.memptr(); const eT* t_mem = (*this).memptr(); if(n_keep_front > 0) { arrayops::copy( X_mem, t_mem, n_keep_front ); } if(n_keep_back > 0) { arrayops::copy( &(X_mem[n_keep_front]), &(t_mem[in_row2+1]), n_keep_back); } Mat::steal_mem(X); } //! insert N rows at the specified row position, //! optionally setting the elements of the inserted rows to zero template inline void Col::insert_rows(const uword row_num, const uword N, const bool set_to_zero) { arma_extra_debug_sigprint(); const uword t_n_rows = Mat::n_rows; const uword A_n_rows = row_num; const uword B_n_rows = t_n_rows - row_num; // insertion at row_num == n_rows is in effect an append operation arma_debug_check( (row_num > t_n_rows), "Col::insert_rows(): index out of bounds"); if(N > 0) { Col out(t_n_rows + N); eT* out_mem = out.memptr(); const eT* t_mem = (*this).memptr(); if(A_n_rows > 0) { arrayops::copy( out_mem, t_mem, A_n_rows ); } if(B_n_rows > 0) { arrayops::copy( &(out_mem[row_num + N]), &(t_mem[row_num]), B_n_rows ); } if(set_to_zero == true) { arrayops::inplace_set( &(out_mem[row_num]), eT(0), N ); } Mat::steal_mem(out); } } //! insert the given object at the specified row position; //! the given object must have one column template template inline void Col::insert_rows(const uword row_num, const Base& X) { arma_extra_debug_sigprint(); Mat::insert_rows(row_num, X); } template arma_inline arma_warn_unused eT& Col::at(const uword i) { return access::rw(Mat::mem[i]); } template arma_inline arma_warn_unused const eT& Col::at(const uword i) const { return Mat::mem[i]; } template arma_inline arma_warn_unused eT& Col::at(const uword in_row, const uword) { return access::rw( Mat::mem[in_row] ); } template arma_inline arma_warn_unused const eT& Col::at(const uword in_row, const uword) const { return Mat::mem[in_row]; } template inline typename Col::row_iterator Col::begin_row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check( (row_num >= Mat::n_rows), "Col::begin_row(): index out of bounds"); return Mat::memptr() + row_num; } template inline typename Col::const_row_iterator Col::begin_row(const uword row_num) const { arma_extra_debug_sigprint(); arma_debug_check( (row_num >= Mat::n_rows), "Col::begin_row(): index out of bounds"); return Mat::memptr() + row_num; } template inline typename Col::row_iterator Col::end_row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check( (row_num >= Mat::n_rows), "Col::end_row(): index out of bounds"); return Mat::memptr() + row_num + 1; } template inline typename Col::const_row_iterator Col::end_row(const uword row_num) const { arma_extra_debug_sigprint(); arma_debug_check( (row_num >= Mat::n_rows), "Col::end_row(): index out of bounds"); return Mat::memptr() + row_num + 1; } template template arma_inline void Col::fixed::change_to_row() { arma_extra_debug_sigprint(); access::rw(Mat::n_cols) = fixed_n_elem; access::rw(Mat::n_rows) = 1; } template template arma_inline Col::fixed::fixed() : Col( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); } template template arma_inline Col::fixed::fixed(const fixed& X) : Col( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); eT* dest = (use_extra) ? mem_local_extra : Mat::mem_local; const eT* src = (use_extra) ? X.mem_local_extra : X.mem_local; arrayops::copy( dest, src, fixed_n_elem ); } template template inline Col::fixed::fixed(const subview_cube& X) : Col( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); Col::operator=(X); } template template template inline Col::fixed::fixed(const fill::fill_class&) : Col( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); if(is_same_type::yes) (*this).zeros(); if(is_same_type::yes) (*this).ones(); if(is_same_type::yes) (*this).eye(); if(is_same_type::yes) (*this).randu(); if(is_same_type::yes) (*this).randn(); } template template template inline Col::fixed::fixed(const Base& A) : Col( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); Col::operator=(A.get_ref()); } template template template inline Col::fixed::fixed(const Base& A, const Base& B) : Col( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); Col::init(A,B); } template template inline Col::fixed::fixed(const eT* aux_mem) : Col( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); eT* dest = (use_extra) ? mem_local_extra : Mat::mem_local; arrayops::copy( dest, aux_mem, fixed_n_elem ); } //! NOTE: this function relies on //! Col::operator=(text), to change vec_state as well as swapping n_rows and n_cols, //! and Mat::init(), to check that the given vector will not have a different size than fixed_n_elem. template template inline Col::fixed::fixed(const char* text) : Col( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); change_to_row(); Col::operator=(text); } //! NOTE: this function relies on //! Col::operator=(text), to change vec_state as well as swapping n_rows and n_cols, //! and Mat::init(), to check that the given vector will not have a different size than fixed_n_elem. template template inline Col::fixed::fixed(const std::string& text) : Col( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); change_to_row(); Col::operator=(text); } template template template const Col& Col::fixed::operator=(const Base& A) { arma_extra_debug_sigprint(); Col::operator=(A.get_ref()); return *this; } template template const Col& Col::fixed::operator=(const eT val) { arma_extra_debug_sigprint(); Col::operator=(val); return *this; } template template const Col& Col::fixed::operator=(const char* text) { arma_extra_debug_sigprint(); change_to_row(); Col::operator=(text); return *this; } template template const Col& Col::fixed::operator=(const std::string& text) { arma_extra_debug_sigprint(); change_to_row(); Col::operator=(text); return *this; } template template const Col& Col::fixed::operator=(const subview_cube& X) { arma_extra_debug_sigprint(); Col::operator=(X); return *this; } #if defined(ARMA_USE_CXX11) template template inline Col::fixed::fixed(const std::initializer_list& list) : Col( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); (*this).operator=(list); } template template inline const Col& Col::fixed::operator=(const std::initializer_list& list) { arma_extra_debug_sigprint(); const uword N = uword(list.size()); arma_debug_check( (N > fixed_n_elem), "Col::fixed: initialiser list is too long" ); eT* this_mem = (*this).memptr(); arrayops::copy( this_mem, list.begin(), N ); for(uword iq=N; iq < fixed_n_elem; ++iq) { this_mem[iq] = eT(0); } return *this; } #endif template template arma_inline const Col& Col::fixed::operator=(const fixed& X) { arma_extra_debug_sigprint(); if(this != &X) { eT* dest = (use_extra) ? mem_local_extra : Mat::mem_local; const eT* src = (use_extra) ? X.mem_local_extra : X.mem_local; arrayops::copy( dest, src, fixed_n_elem ); } return *this; } #if defined(ARMA_GOOD_COMPILER) template template template inline const Col& Col::fixed::operator=(const eOp& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const bool bad_alias = (eOp::proxy_type::has_subview && X.P.is_alias(*this)); if(bad_alias == false) { arma_debug_assert_same_size(fixed_n_elem, uword(1), X.get_n_rows(), X.get_n_cols(), "Col::fixed::operator="); eop_type::apply(*this, X); } else { arma_extra_debug_print("bad_alias = true"); Col tmp(X); (*this) = tmp; } return *this; } template template template inline const Col& Col::fixed::operator=(const eGlue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); const bool bad_alias = ( (eGlue::proxy1_type::has_subview && X.P1.is_alias(*this)) || (eGlue::proxy2_type::has_subview && X.P2.is_alias(*this)) ); if(bad_alias == false) { arma_debug_assert_same_size(fixed_n_elem, uword(1), X.get_n_rows(), X.get_n_cols(), "Col::fixed::operator="); eglue_type::apply(*this, X); } else { arma_extra_debug_print("bad_alias = true"); Col tmp(X); (*this) = tmp; } return *this; } #endif template template arma_inline const Op< typename Col::template fixed::Col_fixed_type, op_htrans > Col::fixed::t() const { return Op< typename Col::template fixed::Col_fixed_type, op_htrans >(*this); } template template arma_inline const Op< typename Col::template fixed::Col_fixed_type, op_htrans > Col::fixed::ht() const { return Op< typename Col::template fixed::Col_fixed_type, op_htrans >(*this); } template template arma_inline const Op< typename Col::template fixed::Col_fixed_type, op_strans > Col::fixed::st() const { return Op< typename Col::template fixed::Col_fixed_type, op_strans >(*this); } template template arma_inline arma_warn_unused const eT& Col::fixed::at_alt(const uword ii) const { #if defined(ARMA_HAVE_ALIGNED_ATTRIBUTE) return (use_extra) ? mem_local_extra[ii] : Mat::mem_local[ii]; #else const eT* mem_aligned = (use_extra) ? mem_local_extra : Mat::mem_local; memory::mark_as_aligned(mem_aligned); return mem_aligned[ii]; #endif } template template arma_inline arma_warn_unused eT& Col::fixed::operator[] (const uword ii) { return (use_extra) ? mem_local_extra[ii] : Mat::mem_local[ii]; } template template arma_inline arma_warn_unused const eT& Col::fixed::operator[] (const uword ii) const { return (use_extra) ? mem_local_extra[ii] : Mat::mem_local[ii]; } template template arma_inline arma_warn_unused eT& Col::fixed::at(const uword ii) { return (use_extra) ? mem_local_extra[ii] : Mat::mem_local[ii]; } template template arma_inline arma_warn_unused const eT& Col::fixed::at(const uword ii) const { return (use_extra) ? mem_local_extra[ii] : Mat::mem_local[ii]; } template template arma_inline arma_warn_unused eT& Col::fixed::operator() (const uword ii) { arma_debug_check( (ii >= fixed_n_elem), "Col::operator(): index out of bounds"); return (use_extra) ? mem_local_extra[ii] : Mat::mem_local[ii]; } template template arma_inline arma_warn_unused const eT& Col::fixed::operator() (const uword ii) const { arma_debug_check( (ii >= fixed_n_elem), "Col::operator(): index out of bounds"); return (use_extra) ? mem_local_extra[ii] : Mat::mem_local[ii]; } template template arma_inline arma_warn_unused eT& Col::fixed::at(const uword in_row, const uword) { return (use_extra) ? mem_local_extra[in_row] : Mat::mem_local[in_row]; } template template arma_inline arma_warn_unused const eT& Col::fixed::at(const uword in_row, const uword) const { return (use_extra) ? mem_local_extra[in_row] : Mat::mem_local[in_row]; } template template arma_inline arma_warn_unused eT& Col::fixed::operator() (const uword in_row, const uword in_col) { arma_debug_check( ((in_row >= fixed_n_elem) || (in_col > 0)), "Col::operator(): index out of bounds" ); return (use_extra) ? mem_local_extra[in_row] : Mat::mem_local[in_row]; } template template arma_inline arma_warn_unused const eT& Col::fixed::operator() (const uword in_row, const uword in_col) const { arma_debug_check( ((in_row >= fixed_n_elem) || (in_col > 0)), "Col::operator(): index out of bounds" ); return (use_extra) ? mem_local_extra[in_row] : Mat::mem_local[in_row]; } template template arma_inline arma_warn_unused eT* Col::fixed::memptr() { return (use_extra) ? mem_local_extra : Mat::mem_local; } template template arma_inline arma_warn_unused const eT* Col::fixed::memptr() const { return (use_extra) ? mem_local_extra : Mat::mem_local; } template template arma_hot inline const Col& Col::fixed::fill(const eT val) { arma_extra_debug_sigprint(); eT* mem_use = (use_extra) ? &(mem_local_extra[0]) : &(Mat::mem_local[0]); arrayops::inplace_set_fixed( mem_use, val ); return *this; } template template arma_hot inline const Col& Col::fixed::zeros() { arma_extra_debug_sigprint(); eT* mem_use = (use_extra) ? &(mem_local_extra[0]) : &(Mat::mem_local[0]); arrayops::inplace_set_fixed( mem_use, eT(0) ); return *this; } template template arma_hot inline const Col& Col::fixed::ones() { arma_extra_debug_sigprint(); eT* mem_use = (use_extra) ? &(mem_local_extra[0]) : &(Mat::mem_local[0]); arrayops::inplace_set_fixed( mem_use, eT(1) ); return *this; } template inline Col::Col(const arma_fixed_indicator&, const uword in_n_elem, const eT* in_mem) : Mat(arma_fixed_indicator(), in_n_elem, 1, 1, in_mem) { arma_extra_debug_sigprint_this(this); } #ifdef ARMA_EXTRA_COL_MEAT #include ARMA_INCFILE_WRAP(ARMA_EXTRA_COL_MEAT) #endif //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Cube_bones.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Cube //! @{ struct Cube_prealloc { static const uword mat_ptrs_size = 4; static const uword mem_n_elem = 64; }; //! Dense cube class template class Cube : public BaseCube< eT, Cube > { public: typedef eT elem_type; //!< the type of elements stored in the cube typedef typename get_pod_type::result pod_type; //!< if eT is non-complex, pod_type is same as eT. otherwise, pod_type is the underlying type used by std::complex const uword n_rows; //!< number of rows in each slice (read-only) const uword n_cols; //!< number of columns in each slice (read-only) const uword n_elem_slice; //!< number of elements in each slice (read-only) const uword n_slices; //!< number of slices in the cube (read-only) const uword n_elem; //!< number of elements in the cube (read-only) const uword mem_state; // mem_state = 0: normal cube that can be resized; // mem_state = 1: use auxiliary memory until change in the number of elements is requested; // mem_state = 2: use auxiliary memory and don't allow the number of elements to be changed; // mem_state = 3: fixed size (e.g. via template based size specification). arma_aligned const Mat** const mat_ptrs; //!< WARNING: DO NOT USE! mat_ptrs will be private in version 6.0 arma_aligned const eT* const mem; //!< pointer to the memory used by the cube (memory is read-only) protected: arma_align_mem Mat* mat_ptrs_local[ Cube_prealloc::mat_ptrs_size ]; arma_align_mem eT mem_local[ Cube_prealloc::mem_n_elem ]; public: inline ~Cube(); inline Cube(); inline Cube(const uword in_rows, const uword in_cols, const uword in_slices); template inline Cube(const uword in_rows, const uword in_cols, const uword in_slices, const fill::fill_class& f); #if defined(ARMA_USE_CXX11) inline Cube(Cube&& m); inline const Cube& operator=(Cube&& m); #endif inline Cube( eT* aux_mem, const uword aux_n_rows, const uword aux_n_cols, const uword aux_n_slices, const bool copy_aux_mem = true, const bool strict = true, const bool prealloc_mat = true); inline Cube(const eT* aux_mem, const uword aux_n_rows, const uword aux_n_cols, const uword aux_n_slices); arma_inline const Cube& operator=(const eT val); arma_inline const Cube& operator+=(const eT val); arma_inline const Cube& operator-=(const eT val); arma_inline const Cube& operator*=(const eT val); arma_inline const Cube& operator/=(const eT val); inline Cube(const Cube& m); inline const Cube& operator=(const Cube& m); inline const Cube& operator+=(const Cube& m); inline const Cube& operator-=(const Cube& m); inline const Cube& operator%=(const Cube& m); inline const Cube& operator/=(const Cube& m); template inline explicit Cube(const BaseCube& A, const BaseCube& B); inline Cube(const subview_cube& X); inline const Cube& operator=(const subview_cube& X); inline const Cube& operator+=(const subview_cube& X); inline const Cube& operator-=(const subview_cube& X); inline const Cube& operator%=(const subview_cube& X); inline const Cube& operator/=(const subview_cube& X); arma_inline Mat& slice(const uword in_slice); arma_inline const Mat& slice(const uword in_slice) const; arma_inline subview_cube slices(const uword in_slice1, const uword in_slice2); arma_inline const subview_cube slices(const uword in_slice1, const uword in_slice2) const; arma_inline subview_cube subcube(const uword in_row1, const uword in_col1, const uword in_slice1, const uword in_row2, const uword in_col2, const uword in_slice2); arma_inline const subview_cube subcube(const uword in_row1, const uword in_col1, const uword in_slice1, const uword in_row2, const uword in_col2, const uword in_slice2) const; inline subview_cube subcube(const uword in_row1, const uword in_col1, const uword in_slice1, const SizeCube& s); inline const subview_cube subcube(const uword in_row1, const uword in_col1, const uword in_slice1, const SizeCube& s) const; inline subview_cube subcube(const span& row_span, const span& col_span, const span& slice_span); inline const subview_cube subcube(const span& row_span, const span& col_span, const span& slice_span) const; inline subview_cube operator()(const span& row_span, const span& col_span, const span& slice_span); inline const subview_cube operator()(const span& row_span, const span& col_span, const span& slice_span) const; inline subview_cube operator()(const uword in_row1, const uword in_col1, const uword in_slice1, const SizeCube& s); inline const subview_cube operator()(const uword in_row1, const uword in_col1, const uword in_slice1, const SizeCube& s) const; arma_inline subview_cube tube(const uword in_row1, const uword in_col1); arma_inline const subview_cube tube(const uword in_row1, const uword in_col1) const; arma_inline subview_cube tube(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2); arma_inline const subview_cube tube(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) const; arma_inline subview_cube tube(const uword in_row1, const uword in_col1, const SizeMat& s); arma_inline const subview_cube tube(const uword in_row1, const uword in_col1, const SizeMat& s) const; inline subview_cube tube(const span& row_span, const span& col_span); inline const subview_cube tube(const span& row_span, const span& col_span) const; template arma_inline subview_elem1 elem(const Base& a); template arma_inline const subview_elem1 elem(const Base& a) const; template arma_inline subview_elem1 operator()(const Base& a); template arma_inline const subview_elem1 operator()(const Base& a) const; inline void shed_slice(const uword slice_num); inline void shed_slices(const uword in_slice1, const uword in_slice2); inline void insert_slices(const uword slice_num, const uword N, const bool set_to_zero = true); template inline void insert_slices(const uword row_num, const BaseCube& X); template inline Cube(const GenCube& X); template inline const Cube& operator=(const GenCube& X); template inline const Cube& operator+=(const GenCube& X); template inline const Cube& operator-=(const GenCube& X); template inline const Cube& operator%=(const GenCube& X); template inline const Cube& operator/=(const GenCube& X); template inline Cube(const OpCube& X); template inline const Cube& operator=(const OpCube& X); template inline const Cube& operator+=(const OpCube& X); template inline const Cube& operator-=(const OpCube& X); template inline const Cube& operator%=(const OpCube& X); template inline const Cube& operator/=(const OpCube& X); template inline Cube(const eOpCube& X); template inline const Cube& operator=(const eOpCube& X); template inline const Cube& operator+=(const eOpCube& X); template inline const Cube& operator-=(const eOpCube& X); template inline const Cube& operator%=(const eOpCube& X); template inline const Cube& operator/=(const eOpCube& X); template inline Cube(const mtOpCube& X); template inline const Cube& operator=(const mtOpCube& X); template inline const Cube& operator+=(const mtOpCube& X); template inline const Cube& operator-=(const mtOpCube& X); template inline const Cube& operator%=(const mtOpCube& X); template inline const Cube& operator/=(const mtOpCube& X); template inline Cube(const GlueCube& X); template inline const Cube& operator=(const GlueCube& X); template inline const Cube& operator+=(const GlueCube& X); template inline const Cube& operator-=(const GlueCube& X); template inline const Cube& operator%=(const GlueCube& X); template inline const Cube& operator/=(const GlueCube& X); template inline Cube(const eGlueCube& X); template inline const Cube& operator=(const eGlueCube& X); template inline const Cube& operator+=(const eGlueCube& X); template inline const Cube& operator-=(const eGlueCube& X); template inline const Cube& operator%=(const eGlueCube& X); template inline const Cube& operator/=(const eGlueCube& X); template inline Cube(const mtGlueCube& X); template inline const Cube& operator=(const mtGlueCube& X); template inline const Cube& operator+=(const mtGlueCube& X); template inline const Cube& operator-=(const mtGlueCube& X); template inline const Cube& operator%=(const mtGlueCube& X); template inline const Cube& operator/=(const mtGlueCube& X); arma_inline arma_warn_unused const eT& at_alt (const uword i) const; arma_inline arma_warn_unused eT& operator[] (const uword i); arma_inline arma_warn_unused const eT& operator[] (const uword i) const; arma_inline arma_warn_unused eT& at(const uword i); arma_inline arma_warn_unused const eT& at(const uword i) const; arma_inline arma_warn_unused eT& operator() (const uword i); arma_inline arma_warn_unused const eT& operator() (const uword i) const; arma_inline arma_warn_unused eT& at (const uword in_row, const uword in_col, const uword in_slice); arma_inline arma_warn_unused const eT& at (const uword in_row, const uword in_col, const uword in_slice) const; arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col, const uword in_slice); arma_inline arma_warn_unused const eT& operator() (const uword in_row, const uword in_col, const uword in_slice) const; arma_inline const Cube& operator++(); arma_inline void operator++(int); arma_inline const Cube& operator--(); arma_inline void operator--(int); arma_inline arma_warn_unused bool is_finite() const; arma_inline arma_warn_unused bool is_empty() const; inline arma_warn_unused bool has_inf() const; inline arma_warn_unused bool has_nan() const; arma_inline arma_warn_unused bool in_range(const uword i) const; arma_inline arma_warn_unused bool in_range(const span& x) const; arma_inline arma_warn_unused bool in_range(const uword in_row, const uword in_col, const uword in_slice) const; inline arma_warn_unused bool in_range(const span& row_span, const span& col_span, const span& slice_span) const; inline arma_warn_unused bool in_range(const uword in_row, const uword in_col, const uword in_slice, const SizeCube& s) const; arma_inline arma_warn_unused eT* memptr(); arma_inline arma_warn_unused const eT* memptr() const; arma_inline arma_warn_unused eT* slice_memptr(const uword slice); arma_inline arma_warn_unused const eT* slice_memptr(const uword slice) const; arma_inline arma_warn_unused eT* slice_colptr(const uword in_slice, const uword in_col); arma_inline arma_warn_unused const eT* slice_colptr(const uword in_slice, const uword in_col) const; inline void impl_print(const std::string& extra_text) const; inline void impl_print(std::ostream& user_stream, const std::string& extra_text) const; inline void impl_raw_print(const std::string& extra_text) const; inline void impl_raw_print(std::ostream& user_stream, const std::string& extra_text) const; inline void set_size(const uword in_rows, const uword in_cols, const uword in_slices); inline void reshape(const uword in_rows, const uword in_cols, const uword in_slices, const uword dim = 0); inline void resize(const uword in_rows, const uword in_cols, const uword in_slices); template inline void copy_size(const Cube& m); template inline const Cube& transform(functor F); template inline const Cube& imbue(functor F); inline const Cube& fill(const eT val); inline const Cube& zeros(); inline const Cube& zeros(const uword in_rows, const uword in_cols, const uword in_slices); inline const Cube& ones(); inline const Cube& ones(const uword in_rows, const uword in_cols, const uword in_slices); inline const Cube& randu(); inline const Cube& randu(const uword in_rows, const uword in_cols, const uword in_slices); inline const Cube& randn(); inline const Cube& randn(const uword in_rows, const uword in_cols, const uword in_slices); inline void reset(); template inline void set_real(const BaseCube& X); template inline void set_imag(const BaseCube& X); inline arma_warn_unused eT min() const; inline arma_warn_unused eT max() const; inline eT min(uword& index_of_min_val) const; inline eT max(uword& index_of_max_val) const; inline eT min(uword& row_of_min_val, uword& col_of_min_val, uword& slice_of_min_val) const; inline eT max(uword& row_of_max_val, uword& col_of_max_val, uword& slice_of_max_val) const; inline bool save(const std::string name, const file_type type = arma_binary, const bool print_status = true) const; inline bool save( std::ostream& os, const file_type type = arma_binary, const bool print_status = true) const; inline bool load(const std::string name, const file_type type = auto_detect, const bool print_status = true); inline bool load( std::istream& is, const file_type type = auto_detect, const bool print_status = true); inline bool quiet_save(const std::string name, const file_type type = arma_binary) const; inline bool quiet_save( std::ostream& os, const file_type type = arma_binary) const; inline bool quiet_load(const std::string name, const file_type type = auto_detect); inline bool quiet_load( std::istream& is, const file_type type = auto_detect); // iterators typedef eT* iterator; typedef const eT* const_iterator; typedef eT* slice_iterator; typedef const eT* const_slice_iterator; inline iterator begin(); inline const_iterator begin() const; inline const_iterator cbegin() const; inline iterator end(); inline const_iterator end() const; inline const_iterator cend() const; inline slice_iterator begin_slice(const uword slice_num); inline const_slice_iterator begin_slice(const uword slice_num) const; inline slice_iterator end_slice(const uword slice_num); inline const_slice_iterator end_slice(const uword slice_num) const; inline void clear(); inline bool empty() const; inline uword size() const; inline void swap(Cube& B); inline void steal_mem(Cube& X); //!< don't use this unless you're writing code internal to Armadillo template class fixed; protected: inline void init_cold(const bool prealloc_mat = true); inline void init_warm(const uword in_rows, const uword in_cols, const uword in_slices); template inline void init(const BaseCube& A, const BaseCube& B); inline void delete_mat(); inline void create_mat(const bool prealloc_mat = true); friend class glue_join; friend class op_reshape; friend class op_resize; public: #ifdef ARMA_EXTRA_CUBE_PROTO #include ARMA_INCFILE_WRAP(ARMA_EXTRA_CUBE_PROTO) #endif }; template template class Cube::fixed : public Cube { private: static const uword fixed_n_elem = fixed_n_rows * fixed_n_cols * fixed_n_slices; static const uword fixed_n_elem_slice = fixed_n_rows * fixed_n_cols; static const bool use_extra = (fixed_n_elem > Cube_prealloc::mem_n_elem); arma_aligned Mat* mat_ptrs_local_extra[ (fixed_n_slices > Cube_prealloc::mat_ptrs_size) ? fixed_n_slices : 1 ]; arma_align_mem eT mem_local_extra [ use_extra ? fixed_n_elem : 1 ]; arma_inline void mem_setup(); public: inline fixed(); inline fixed(const fixed& X); template inline fixed(const fill::fill_class& f); template inline fixed(const BaseCube& A); template inline fixed(const BaseCube& A, const BaseCube& B); using Cube::operator=; using Cube::operator(); inline const Cube& operator=(const fixed& X); arma_inline arma_warn_unused eT& operator[] (const uword i); arma_inline arma_warn_unused const eT& operator[] (const uword i) const; arma_inline arma_warn_unused eT& at (const uword i); arma_inline arma_warn_unused const eT& at (const uword i) const; arma_inline arma_warn_unused eT& operator() (const uword i); arma_inline arma_warn_unused const eT& operator() (const uword i) const; arma_inline arma_warn_unused eT& at (const uword in_row, const uword in_col, const uword in_slice); arma_inline arma_warn_unused const eT& at (const uword in_row, const uword in_col, const uword in_slice) const; arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col, const uword in_slice); arma_inline arma_warn_unused const eT& operator() (const uword in_row, const uword in_col, const uword in_slice) const; }; class Cube_aux { public: template arma_inline static void prefix_pp(Cube& x); template arma_inline static void prefix_pp(Cube< std::complex >& x); template arma_inline static void postfix_pp(Cube& x); template arma_inline static void postfix_pp(Cube< std::complex >& x); template arma_inline static void prefix_mm(Cube& x); template arma_inline static void prefix_mm(Cube< std::complex >& x); template arma_inline static void postfix_mm(Cube& x); template arma_inline static void postfix_mm(Cube< std::complex >& x); template inline static void set_real(Cube& out, const BaseCube& X); template inline static void set_imag(Cube& out, const BaseCube& X); template inline static void set_real(Cube< std::complex >& out, const BaseCube< T,T1>& X); template inline static void set_imag(Cube< std::complex >& out, const BaseCube< T,T1>& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Cube_meat.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Cube //! @{ template inline Cube::~Cube() { arma_extra_debug_sigprint_this(this); delete_mat(); if(mem_state == 0) { if(n_elem > Cube_prealloc::mem_n_elem) { memory::release( access::rw(mem) ); } } if(arma_config::debug == true) { // try to expose buggy user code that accesses deleted objects access::rw(mat_ptrs) = 0; access::rw(mem) = 0; } arma_type_check(( is_supported_elem_type::value == false )); } template inline Cube::Cube() : n_rows(0) , n_cols(0) , n_elem_slice(0) , n_slices(0) , n_elem(0) , mem_state(0) , mat_ptrs(0) , mem() { arma_extra_debug_sigprint_this(this); } //! construct the cube to have user specified dimensions template inline Cube::Cube(const uword in_n_rows, const uword in_n_cols, const uword in_n_slices) : n_rows(in_n_rows) , n_cols(in_n_cols) , n_elem_slice(in_n_rows*in_n_cols) , n_slices(in_n_slices) , n_elem(in_n_rows*in_n_cols*in_n_slices) , mem_state(0) , mat_ptrs(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); } //! construct the cube to have user specified dimensions and fill with specified pattern template template inline Cube::Cube(const uword in_n_rows, const uword in_n_cols, const uword in_n_slices, const fill::fill_class&) : n_rows(in_n_rows) , n_cols(in_n_cols) , n_elem_slice(in_n_rows*in_n_cols) , n_slices(in_n_slices) , n_elem(in_n_rows*in_n_cols*in_n_slices) , mem_state(0) , mat_ptrs(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); if(is_same_type::yes) (*this).zeros(); if(is_same_type::yes) (*this).ones(); if(is_same_type::yes) (*this).randu(); if(is_same_type::yes) (*this).randn(); if(is_same_type::yes) { arma_debug_check(true, "Cube::Cube(): unsupported fill type"); } } #if defined(ARMA_USE_CXX11) template inline Cube::Cube(Cube&& in_cube) : n_rows(0) , n_cols(0) , n_elem_slice(0) , n_slices(0) , n_elem(0) , mem_state(0) , mat_ptrs(0) , mem() { arma_extra_debug_sigprint_this(this); arma_extra_debug_sigprint(arma_boost::format("this = %x in_cube = %x") % this % &in_cube); (*this).steal_mem(in_cube); } template inline const Cube& Cube::operator=(Cube&& in_cube) { arma_extra_debug_sigprint(arma_boost::format("this = %x in_cube = %x") % this % &in_cube); (*this).steal_mem(in_cube); return *this; } #endif template inline void Cube::init_cold(const bool prealloc_mat) { arma_extra_debug_sigprint( arma_boost::format("n_rows = %d, n_cols = %d, n_slices = %d") % n_rows % n_cols % n_slices ); #if (defined(ARMA_USE_CXX11) || defined(ARMA_64BIT_WORD)) const char* error_message = "Cube::init(): requested size is too large"; #else const char* error_message = "Cube::init(): requested size is too large; suggest to compile in C++11 mode or enable ARMA_64BIT_WORD"; #endif arma_debug_check ( ( ( (n_rows > 0x0FFF) || (n_cols > 0x0FFF) || (n_slices > 0xFF) ) ? ( (double(n_rows) * double(n_cols) * double(n_slices)) > double(ARMA_MAX_UWORD) ) : false ), error_message ); if(n_elem <= Cube_prealloc::mem_n_elem) { arma_extra_debug_print("Cube::init(): using local memory"); access::rw(mem) = mem_local; } else { arma_extra_debug_print("Cube::init(): allocating memory"); access::rw(mem) = memory::acquire(n_elem); } if(n_elem == 0) { access::rw(n_rows) = 0; access::rw(n_cols) = 0; access::rw(n_elem_slice) = 0; access::rw(n_slices) = 0; } else { create_mat(prealloc_mat); } } //! internal cube construction; if the requested size is small enough, memory from the stack is used. //! otherwise memory is allocated via 'new' template inline void Cube::init_warm(const uword in_n_rows, const uword in_n_cols, const uword in_n_slices) { arma_extra_debug_sigprint( arma_boost::format("in_n_rows = %d, in_n_cols = %d, in_n_slices = %d") % in_n_rows % in_n_cols % in_n_slices ); if( (n_rows == in_n_rows) && (n_cols == in_n_cols) && (n_slices == in_n_slices) ) { return; } const uword t_mem_state = mem_state; bool err_state = false; char* err_msg = 0; arma_debug_set_error ( err_state, err_msg, (t_mem_state == 3), "Cube::init(): size is fixed and hence cannot be changed" ); #if (defined(ARMA_USE_CXX11) || defined(ARMA_64BIT_WORD)) const char* error_message = "Cube::init(): requested size is too large"; #else const char* error_message = "Cube::init(): requested size is too large; suggest to compile in C++11 mode or enable ARMA_64BIT_WORD"; #endif arma_debug_set_error ( err_state, err_msg, ( ( (in_n_rows > 0x0FFF) || (in_n_cols > 0x0FFF) || (in_n_slices > 0xFF) ) ? ( (double(in_n_rows) * double(in_n_cols) * double(in_n_slices)) > double(ARMA_MAX_UWORD) ) : false ), error_message ); arma_debug_check(err_state, err_msg); const uword old_n_elem = n_elem; const uword new_n_elem = in_n_rows * in_n_cols * in_n_slices; if(old_n_elem == new_n_elem) { delete_mat(); if(new_n_elem > 0) { access::rw(n_rows) = in_n_rows; access::rw(n_cols) = in_n_cols; access::rw(n_elem_slice) = in_n_rows*in_n_cols; access::rw(n_slices) = in_n_slices; create_mat(); } } else { arma_debug_check( (t_mem_state == 2), "Cube::init(): requested size is not compatible with the size of auxiliary memory" ); delete_mat(); if(t_mem_state == 0) { if(n_elem > Cube_prealloc::mem_n_elem ) { arma_extra_debug_print("Cube::init(): freeing memory"); memory::release( access::rw(mem) ); } } access::rw(mem_state) = 0; if(new_n_elem <= Cube_prealloc::mem_n_elem) { arma_extra_debug_print("Cube::init(): using local memory"); access::rw(mem) = mem_local; } else { arma_extra_debug_print("Cube::init(): allocating memory"); access::rw(mem) = memory::acquire(new_n_elem); } if(new_n_elem > 0) { access::rw(n_rows) = in_n_rows; access::rw(n_cols) = in_n_cols; access::rw(n_elem_slice) = in_n_rows*in_n_cols; access::rw(n_slices) = in_n_slices; access::rw(n_elem) = new_n_elem; create_mat(); } } if(new_n_elem == 0) { access::rw(n_rows) = 0; access::rw(n_cols) = 0; access::rw(n_elem_slice) = 0; access::rw(n_slices) = 0; access::rw(n_elem) = 0; } } //! for constructing a complex cube out of two non-complex cubes template template inline void Cube::init ( const BaseCube::pod_type,T1>& X, const BaseCube::pod_type,T2>& Y ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type T; arma_type_check(( is_complex::value == false )); //!< compile-time abort if eT is not std::complex arma_type_check(( is_complex< T>::value == true )); //!< compile-time abort if T is std::complex arma_type_check(( is_same_type< std::complex, eT >::no )); //!< compile-time abort if types are not compatible const ProxyCube PX(X.get_ref()); const ProxyCube PY(Y.get_ref()); arma_debug_assert_same_size(PX, PY, "Cube()"); const uword local_n_rows = PX.get_n_rows(); const uword local_n_cols = PX.get_n_cols(); const uword local_n_slices = PX.get_n_slices(); init_warm(local_n_rows, local_n_cols, local_n_slices); eT* out_mem = (*this).memptr(); const bool prefer_at_accessor = ( ProxyCube::prefer_at_accessor || ProxyCube::prefer_at_accessor ); if(prefer_at_accessor == false) { typedef typename ProxyCube::ea_type ea_type1; typedef typename ProxyCube::ea_type ea_type2; const uword N = n_elem; ea_type1 A = PX.get_ea(); ea_type2 B = PY.get_ea(); for(uword i=0; i(A[i], B[i]); } } else { for(uword uslice = 0; uslice < local_n_slices; ++uslice) for(uword ucol = 0; ucol < local_n_cols; ++ucol ) for(uword urow = 0; urow < local_n_rows; ++urow ) { *out_mem = std::complex( PX.at(urow,ucol,uslice), PY.at(urow,ucol,uslice) ); out_mem++; } } } template inline void Cube::delete_mat() { arma_extra_debug_sigprint(); if(mat_ptrs != NULL) { for(uword uslice = 0; uslice < n_slices; ++uslice) { if(mat_ptrs[uslice] != NULL) { delete access::rw(mat_ptrs[uslice]); } } if(mem_state <= 2) { if(n_slices > Cube_prealloc::mat_ptrs_size) { delete [] mat_ptrs; } } } } template inline void Cube::create_mat(const bool prealloc_mat) { arma_extra_debug_sigprint(); if(mem_state <= 2) { if(n_slices <= Cube_prealloc::mat_ptrs_size) { access::rw(mat_ptrs) = const_cast< const Mat** >(mat_ptrs_local); } else { access::rw(mat_ptrs) = new(std::nothrow) const Mat*[n_slices]; arma_check_bad_alloc( (mat_ptrs == 0), "Cube::create_mat(): out of memory" ); } } for(uword uslice = 0; uslice < n_slices; ++uslice) { mat_ptrs[uslice] = prealloc_mat ? new Mat('j', slice_memptr(uslice), n_rows, n_cols) : NULL; } } //! Set the cube to be equal to the specified scalar. //! NOTE: the size of the cube will be 1x1x1 template arma_inline const Cube& Cube::operator=(const eT val) { arma_extra_debug_sigprint(); init_warm(1,1,1); access::rw(mem[0]) = val; return *this; } //! In-place addition of a scalar to all elements of the cube template arma_inline const Cube& Cube::operator+=(const eT val) { arma_extra_debug_sigprint(); arrayops::inplace_plus( memptr(), val, n_elem ); return *this; } //! In-place subtraction of a scalar from all elements of the cube template arma_inline const Cube& Cube::operator-=(const eT val) { arma_extra_debug_sigprint(); arrayops::inplace_minus( memptr(), val, n_elem ); return *this; } //! In-place multiplication of all elements of the cube with a scalar template arma_inline const Cube& Cube::operator*=(const eT val) { arma_extra_debug_sigprint(); arrayops::inplace_mul( memptr(), val, n_elem ); return *this; } //! In-place division of all elements of the cube with a scalar template arma_inline const Cube& Cube::operator/=(const eT val) { arma_extra_debug_sigprint(); arrayops::inplace_div( memptr(), val, n_elem ); return *this; } //! construct a cube from a given cube template inline Cube::Cube(const Cube& x) : n_rows(x.n_rows) , n_cols(x.n_cols) , n_elem_slice(x.n_elem_slice) , n_slices(x.n_slices) , n_elem(x.n_elem) , mem_state(0) , mat_ptrs(0) , mem() { arma_extra_debug_sigprint_this(this); arma_extra_debug_sigprint(arma_boost::format("this = %x in_cube = %x") % this % &x); init_cold(); arrayops::copy( memptr(), x.mem, n_elem ); } //! construct a cube from a given cube template inline const Cube& Cube::operator=(const Cube& x) { arma_extra_debug_sigprint(arma_boost::format("this = %x in_cube = %x") % this % &x); if(this != &x) { init_warm(x.n_rows, x.n_cols, x.n_slices); arrayops::copy( memptr(), x.mem, n_elem ); } return *this; } //! construct a cube from a given auxiliary array of eTs. //! if copy_aux_mem is true, new memory is allocated and the array is copied. //! if copy_aux_mem is false, the auxiliary array is used directly (without allocating memory and copying). //! note that in the latter case //! the default is to copy the array. template inline Cube::Cube(eT* aux_mem, const uword aux_n_rows, const uword aux_n_cols, const uword aux_n_slices, const bool copy_aux_mem, const bool strict, const bool prealloc_mat) : n_rows ( aux_n_rows ) , n_cols ( aux_n_cols ) , n_elem_slice( aux_n_rows*aux_n_cols ) , n_slices ( aux_n_slices ) , n_elem ( aux_n_rows*aux_n_cols*aux_n_slices ) , mem_state ( copy_aux_mem ? 0 : (strict ? 2 : 1) ) , mat_ptrs ( 0 ) , mem ( copy_aux_mem ? 0 : aux_mem ) { arma_extra_debug_sigprint_this(this); if(copy_aux_mem == true) { init_cold(prealloc_mat); arrayops::copy( memptr(), aux_mem, n_elem ); } else { create_mat(prealloc_mat); } } //! construct a cube from a given auxiliary read-only array of eTs. //! the array is copied. template inline Cube::Cube(const eT* aux_mem, const uword aux_n_rows, const uword aux_n_cols, const uword aux_n_slices) : n_rows(aux_n_rows) , n_cols(aux_n_cols) , n_elem_slice(aux_n_rows*aux_n_cols) , n_slices(aux_n_slices) , n_elem(aux_n_rows*aux_n_cols*aux_n_slices) , mem_state(0) , mat_ptrs(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); arrayops::copy( memptr(), aux_mem, n_elem ); } //! in-place cube addition template inline const Cube& Cube::operator+=(const Cube& m) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(*this, m, "addition"); arrayops::inplace_plus( memptr(), m.memptr(), n_elem ); return *this; } //! in-place cube subtraction template inline const Cube& Cube::operator-=(const Cube& m) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(*this, m, "subtraction"); arrayops::inplace_minus( memptr(), m.memptr(), n_elem ); return *this; } //! in-place element-wise cube multiplication template inline const Cube& Cube::operator%=(const Cube& m) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(*this, m, "element-wise multiplication"); arrayops::inplace_mul( memptr(), m.memptr(), n_elem ); return *this; } //! in-place element-wise cube division template inline const Cube& Cube::operator/=(const Cube& m) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(*this, m, "element-wise division"); arrayops::inplace_div( memptr(), m.memptr(), n_elem ); return *this; } //! for constructing a complex cube out of two non-complex cubes template template inline Cube::Cube ( const BaseCube::pod_type,T1>& A, const BaseCube::pod_type,T2>& B ) : n_rows(0) , n_cols(0) , n_elem_slice(0) , n_slices(0) , n_elem(0) , mem_state(0) , mat_ptrs(0) , mem() { arma_extra_debug_sigprint_this(this); init(A,B); } //! construct a cube from a subview_cube instance (e.g. construct a cube from a delayed subcube operation) template inline Cube::Cube(const subview_cube& X) : n_rows(X.n_rows) , n_cols(X.n_cols) , n_elem_slice(X.n_elem_slice) , n_slices(X.n_slices) , n_elem(X.n_elem) , mem_state(0) , mat_ptrs(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); subview_cube::extract(*this, X); } //! construct a cube from a subview_cube instance (e.g. construct a cube from a delayed subcube operation) template inline const Cube& Cube::operator=(const subview_cube& X) { arma_extra_debug_sigprint(); const bool alias = (this == &(X.m)); if(alias == false) { init_warm(X.n_rows, X.n_cols, X.n_slices); subview_cube::extract(*this, X); } else { Cube tmp(X); steal_mem(tmp); } return *this; } //! in-place cube addition (using a subcube on the right-hand-side) template inline const Cube& Cube::operator+=(const subview_cube& X) { arma_extra_debug_sigprint(); subview_cube::plus_inplace(*this, X); return *this; } //! in-place cube subtraction (using a subcube on the right-hand-side) template inline const Cube& Cube::operator-=(const subview_cube& X) { arma_extra_debug_sigprint(); subview_cube::minus_inplace(*this, X); return *this; } //! in-place element-wise cube mutiplication (using a subcube on the right-hand-side) template inline const Cube& Cube::operator%=(const subview_cube& X) { arma_extra_debug_sigprint(); subview_cube::schur_inplace(*this, X); return *this; } //! in-place element-wise cube division (using a subcube on the right-hand-side) template inline const Cube& Cube::operator/=(const subview_cube& X) { arma_extra_debug_sigprint(); subview_cube::div_inplace(*this, X); return *this; } //! provide the reference to the matrix representing a single slice template arma_inline Mat& Cube::slice(const uword in_slice) { arma_extra_debug_sigprint(); arma_debug_check( (in_slice >= n_slices), "Cube::slice(): index out of bounds" ); if(mat_ptrs[in_slice] == NULL) { mat_ptrs[in_slice] = new Mat('j', slice_memptr(in_slice), n_rows, n_cols); } return const_cast< Mat& >( *(mat_ptrs[in_slice]) ); } //! provide the reference to the matrix representing a single slice template arma_inline const Mat& Cube::slice(const uword in_slice) const { arma_extra_debug_sigprint(); arma_debug_check( (in_slice >= n_slices), "Cube::slice(): index out of bounds" ); if(mat_ptrs[in_slice] == NULL) { mat_ptrs[in_slice] = new Mat('j', slice_memptr(in_slice), n_rows, n_cols); } return *(mat_ptrs[in_slice]); } //! creation of subview_cube (subcube comprised of specified slices) template arma_inline subview_cube Cube::slices(const uword in_slice1, const uword in_slice2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_slice1 > in_slice2) || (in_slice2 >= n_slices), "Cube::slices(): indices out of bounds or incorrectly used" ); const uword subcube_n_slices = in_slice2 - in_slice1 + 1; return subview_cube(*this, 0, 0, in_slice1, n_rows, n_cols, subcube_n_slices); } //! creation of subview_cube (subcube comprised of specified slices) template arma_inline const subview_cube Cube::slices(const uword in_slice1, const uword in_slice2) const { arma_extra_debug_sigprint(); arma_debug_check ( (in_slice1 > in_slice2) || (in_slice2 >= n_slices), "Cube::rows(): indices out of bounds or incorrectly used" ); const uword subcube_n_slices = in_slice2 - in_slice1 + 1; return subview_cube(*this, 0, 0, in_slice1, n_rows, n_cols, subcube_n_slices); } //! creation of subview_cube (generic subcube) template arma_inline subview_cube Cube::subcube(const uword in_row1, const uword in_col1, const uword in_slice1, const uword in_row2, const uword in_col2, const uword in_slice2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_col1 > in_col2) || (in_slice1 > in_slice2) || (in_row2 >= n_rows) || (in_col2 >= n_cols) || (in_slice2 >= n_slices), "Cube::subcube(): indices out of bounds or incorrectly used" ); const uword subcube_n_rows = in_row2 - in_row1 + 1; const uword subcube_n_cols = in_col2 - in_col1 + 1; const uword subcube_n_slices = in_slice2 - in_slice1 + 1; return subview_cube(*this, in_row1, in_col1, in_slice1, subcube_n_rows, subcube_n_cols, subcube_n_slices); } //! creation of subview_cube (generic subcube) template arma_inline const subview_cube Cube::subcube(const uword in_row1, const uword in_col1, const uword in_slice1, const uword in_row2, const uword in_col2, const uword in_slice2) const { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_col1 > in_col2) || (in_slice1 > in_slice2) || (in_row2 >= n_rows) || (in_col2 >= n_cols) || (in_slice2 >= n_slices), "Cube::subcube(): indices out of bounds or incorrectly used" ); const uword subcube_n_rows = in_row2 - in_row1 + 1; const uword subcube_n_cols = in_col2 - in_col1 + 1; const uword subcube_n_slices = in_slice2 - in_slice1 + 1; return subview_cube(*this, in_row1, in_col1, in_slice1, subcube_n_rows, subcube_n_cols, subcube_n_slices); } //! creation of subview_cube (generic subcube) template inline subview_cube Cube::subcube(const uword in_row1, const uword in_col1, const uword in_slice1, const SizeCube& s) { arma_extra_debug_sigprint(); const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; const uword l_n_slices = n_slices; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; const uword s_n_slices = s.n_slices; arma_debug_check ( ( in_row1 >= l_n_rows) || ( in_col1 >= l_n_cols) || ( in_slice1 >= l_n_slices) || ((in_row1 + s_n_rows) > l_n_rows) || ((in_col1 + s_n_cols) > l_n_cols) || ((in_slice1 + s_n_slices) > l_n_slices), "Cube::subcube(): indices or size out of bounds" ); return subview_cube(*this, in_row1, in_col1, in_slice1, s_n_rows, s_n_cols, s_n_slices); } //! creation of subview_cube (generic subcube) template inline const subview_cube Cube::subcube(const uword in_row1, const uword in_col1, const uword in_slice1, const SizeCube& s) const { arma_extra_debug_sigprint(); const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; const uword l_n_slices = n_slices; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; const uword s_n_slices = s.n_slices; arma_debug_check ( ( in_row1 >= l_n_rows) || ( in_col1 >= l_n_cols) || ( in_slice1 >= l_n_slices) || ((in_row1 + s_n_rows) > l_n_rows) || ((in_col1 + s_n_cols) > l_n_cols) || ((in_slice1 + s_n_slices) > l_n_slices), "Cube::subcube(): indices or size out of bounds" ); return subview_cube(*this, in_row1, in_col1, in_slice1, s_n_rows, s_n_cols, s_n_slices); } //! creation of subview_cube (generic subcube) template inline subview_cube Cube::subcube(const span& row_span, const span& col_span, const span& slice_span) { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const bool col_all = col_span.whole; const bool slice_all = slice_span.whole; const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword subcube_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword subcube_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; const uword in_slice1 = slice_all ? 0 : slice_span.a; const uword in_slice2 = slice_span.b; const uword subcube_n_slices = slice_all ? local_n_slices : in_slice2 - in_slice1 + 1; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) || ( slice_all ? false : ((in_slice1 > in_slice2) || (in_slice2 >= local_n_slices)) ) , "Cube::subcube(): indices out of bounds or incorrectly used" ); return subview_cube(*this, in_row1, in_col1, in_slice1, subcube_n_rows, subcube_n_cols, subcube_n_slices); } //! creation of subview_cube (generic subcube) template inline const subview_cube Cube::subcube(const span& row_span, const span& col_span, const span& slice_span) const { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const bool col_all = col_span.whole; const bool slice_all = slice_span.whole; const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword subcube_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword subcube_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; const uword in_slice1 = slice_all ? 0 : slice_span.a; const uword in_slice2 = slice_span.b; const uword subcube_n_slices = slice_all ? local_n_slices : in_slice2 - in_slice1 + 1; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) || ( slice_all ? false : ((in_slice1 > in_slice2) || (in_slice2 >= local_n_slices)) ) , "Cube::subcube(): indices out of bounds or incorrectly used" ); return subview_cube(*this, in_row1, in_col1, in_slice1, subcube_n_rows, subcube_n_cols, subcube_n_slices); } template inline subview_cube Cube::operator()(const span& row_span, const span& col_span, const span& slice_span) { arma_extra_debug_sigprint(); return (*this).subcube(row_span, col_span, slice_span); } template inline const subview_cube Cube::operator()(const span& row_span, const span& col_span, const span& slice_span) const { arma_extra_debug_sigprint(); return (*this).subcube(row_span, col_span, slice_span); } template inline subview_cube Cube::operator()(const uword in_row1, const uword in_col1, const uword in_slice1, const SizeCube& s) { arma_extra_debug_sigprint(); return (*this).subcube(in_row1, in_col1, in_slice1, s); } template inline const subview_cube Cube::operator()(const uword in_row1, const uword in_col1, const uword in_slice1, const SizeCube& s) const { arma_extra_debug_sigprint(); return (*this).subcube(in_row1, in_col1, in_slice1, s); } template arma_inline subview_cube Cube::tube(const uword in_row1, const uword in_col1) { arma_extra_debug_sigprint(); arma_debug_check ( ((in_row1 >= n_rows) || (in_col1 >= n_cols)), "Cube::tube(): indices out of bounds" ); return subview_cube(*this, in_row1, in_col1, 0, 1, 1, n_slices); } template arma_inline const subview_cube Cube::tube(const uword in_row1, const uword in_col1) const { arma_extra_debug_sigprint(); arma_debug_check ( ((in_row1 >= n_rows) || (in_col1 >= n_cols)), "Cube::tube(): indices out of bounds" ); return subview_cube(*this, in_row1, in_col1, 0, 1, 1, n_slices); } template arma_inline subview_cube Cube::tube(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_col1 > in_col2) || (in_row2 >= n_rows) || (in_col2 >= n_cols), "Cube::tube(): indices out of bounds or incorrectly used" ); const uword subcube_n_rows = in_row2 - in_row1 + 1; const uword subcube_n_cols = in_col2 - in_col1 + 1; return subview_cube(*this, in_row1, in_col1, 0, subcube_n_rows, subcube_n_cols, n_slices); } template arma_inline const subview_cube Cube::tube(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) const { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_col1 > in_col2) || (in_row2 >= n_rows) || (in_col2 >= n_cols), "Cube::tube(): indices out of bounds or incorrectly used" ); const uword subcube_n_rows = in_row2 - in_row1 + 1; const uword subcube_n_cols = in_col2 - in_col1 + 1; return subview_cube(*this, in_row1, in_col1, 0, subcube_n_rows, subcube_n_cols, n_slices); } template arma_inline subview_cube Cube::tube(const uword in_row1, const uword in_col1, const SizeMat& s) { arma_extra_debug_sigprint(); const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; arma_debug_check ( ((in_row1 >= l_n_rows) || (in_col1 >= l_n_cols) || ((in_row1 + s_n_rows) > l_n_rows) || ((in_col1 + s_n_cols) > l_n_cols)), "Cube::tube(): indices or size out of bounds" ); return subview_cube(*this, in_row1, in_col1, 0, s_n_rows, s_n_cols, n_slices); } template arma_inline const subview_cube Cube::tube(const uword in_row1, const uword in_col1, const SizeMat& s) const { arma_extra_debug_sigprint(); const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; arma_debug_check ( ((in_row1 >= l_n_rows) || (in_col1 >= l_n_cols) || ((in_row1 + s_n_rows) > l_n_rows) || ((in_col1 + s_n_cols) > l_n_cols)), "Cube::tube(): indices or size out of bounds" ); return subview_cube(*this, in_row1, in_col1, 0, s_n_rows, s_n_cols, n_slices); } template inline subview_cube Cube::tube(const span& row_span, const span& col_span) { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const bool col_all = col_span.whole; const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword subcube_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword subcube_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "Cube::tube(): indices out of bounds or incorrectly used" ); return subview_cube(*this, in_row1, in_col1, 0, subcube_n_rows, subcube_n_cols, n_slices); } template inline const subview_cube Cube::tube(const span& row_span, const span& col_span) const { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const bool col_all = col_span.whole; const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword subcube_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword subcube_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "Cube::tube(): indices out of bounds or incorrectly used" ); return subview_cube(*this, in_row1, in_col1, 0, subcube_n_rows, subcube_n_cols, n_slices); } template template arma_inline subview_elem1 Cube::elem(const Base& a) { arma_extra_debug_sigprint(); return subview_elem1(*this, a); } template template arma_inline const subview_elem1 Cube::elem(const Base& a) const { arma_extra_debug_sigprint(); return subview_elem1(*this, a); } template template arma_inline subview_elem1 Cube::operator()(const Base& a) { arma_extra_debug_sigprint(); return subview_elem1(*this, a); } template template arma_inline const subview_elem1 Cube::operator()(const Base& a) const { arma_extra_debug_sigprint(); return subview_elem1(*this, a); } //! remove specified slice template inline void Cube::shed_slice(const uword slice_num) { arma_extra_debug_sigprint(); arma_debug_check( slice_num >= n_slices, "Cube::shed_slice(): index out of bounds"); shed_slices(slice_num, slice_num); } //! remove specified slices template inline void Cube::shed_slices(const uword in_slice1, const uword in_slice2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_slice1 > in_slice2) || (in_slice2 >= n_slices), "Cube::shed_slices(): indices out of bounds or incorrectly used" ); const uword n_keep_front = in_slice1; const uword n_keep_back = n_slices - (in_slice2 + 1); Cube X(n_rows, n_cols, n_keep_front + n_keep_back); if(n_keep_front > 0) { X.slices( 0, (n_keep_front-1) ) = slices( 0, (in_slice1-1) ); } if(n_keep_back > 0) { X.slices( n_keep_front, (n_keep_front+n_keep_back-1) ) = slices( (in_slice2+1), (n_slices-1) ); } steal_mem(X); } //! insert N slices at the specified slice position, //! optionally setting the elements of the inserted slices to zero template inline void Cube::insert_slices(const uword slice_num, const uword N, const bool set_to_zero) { arma_extra_debug_sigprint(); const uword t_n_slices = n_slices; const uword A_n_slices = slice_num; const uword B_n_slices = t_n_slices - slice_num; // insertion at slice_num == n_slices is in effect an append operation arma_debug_check( (slice_num > t_n_slices), "Cube::insert_slices(): index out of bounds"); if(N > 0) { Cube out(n_rows, n_cols, t_n_slices + N); if(A_n_slices > 0) { out.slices(0, A_n_slices-1) = slices(0, A_n_slices-1); } if(B_n_slices > 0) { out.slices(slice_num + N, t_n_slices + N - 1) = slices(slice_num, t_n_slices-1); } if(set_to_zero == true) { //out.slices(slice_num, slice_num + N - 1).zeros(); for(uword i=slice_num; i < (slice_num + N); ++i) { out.slice(i).zeros(); } } steal_mem(out); } } //! insert the given object at the specified slice position; //! the given object must have the same number of rows and columns as the cube template template inline void Cube::insert_slices(const uword slice_num, const BaseCube& X) { arma_extra_debug_sigprint(); const unwrap_cube tmp(X.get_ref()); const Cube& C = tmp.M; const uword N = C.n_slices; const uword t_n_slices = n_slices; const uword A_n_slices = slice_num; const uword B_n_slices = t_n_slices - slice_num; // insertion at slice_num == n_slices is in effect an append operation arma_debug_check( (slice_num > t_n_slices), "Cube::insert_slices(): index out of bounds"); arma_debug_check ( ( (C.n_rows != n_rows) || (C.n_cols != n_cols) ), "Cube::insert_slices(): given object has incompatible dimensions" ); if(N > 0) { Cube out(n_rows, n_cols, t_n_slices + N); if(A_n_slices > 0) { out.slices(0, A_n_slices-1) = slices(0, A_n_slices-1); } if(B_n_slices > 0) { out.slices(slice_num + N, t_n_slices + N - 1) = slices(slice_num, t_n_slices - 1); } out.slices(slice_num, slice_num + N - 1) = C; steal_mem(out); } } //! create a cube from OpCube, i.e. run the previously delayed unary operations template template inline Cube::Cube(const GenCube& X) : n_rows(X.n_rows) , n_cols(X.n_cols) , n_elem_slice(X.n_rows*X.n_cols) , n_slices(X.n_slices) , n_elem(X.n_rows*X.n_cols*X.n_slices) , mem_state(0) , mat_ptrs(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); X.apply(*this); } template template inline const Cube& Cube::operator=(const GenCube& X) { arma_extra_debug_sigprint(); init_warm(X.n_rows, X.n_cols, X.n_slices); X.apply(*this); return *this; } template template inline const Cube& Cube::operator+=(const GenCube& X) { arma_extra_debug_sigprint(); X.apply_inplace_plus(*this); return *this; } template template inline const Cube& Cube::operator-=(const GenCube& X) { arma_extra_debug_sigprint(); X.apply_inplace_minus(*this); return *this; } template template inline const Cube& Cube::operator%=(const GenCube& X) { arma_extra_debug_sigprint(); X.apply_inplace_schur(*this); return *this; } template template inline const Cube& Cube::operator/=(const GenCube& X) { arma_extra_debug_sigprint(); X.apply_inplace_div(*this); return *this; } //! create a cube from OpCube, i.e. run the previously delayed unary operations template template inline Cube::Cube(const OpCube& X) : n_rows(0) , n_cols(0) , n_elem_slice(0) , n_slices(0) , n_elem(0) , mem_state(0) , mat_ptrs(0) , mem() { arma_extra_debug_sigprint_this(this); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); op_type::apply(*this, X); } //! create a cube from OpCube, i.e. run the previously delayed unary operations template template inline const Cube& Cube::operator=(const OpCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); op_type::apply(*this, X); return *this; } //! in-place cube addition, with the right-hand-side operand having delayed operations template template inline const Cube& Cube::operator+=(const OpCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const Cube m(X); return (*this).operator+=(m); } //! in-place cube subtraction, with the right-hand-side operand having delayed operations template template inline const Cube& Cube::operator-=(const OpCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const Cube m(X); return (*this).operator-=(m); } //! in-place cube element-wise multiplication, with the right-hand-side operand having delayed operations template template inline const Cube& Cube::operator%=(const OpCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const Cube m(X); return (*this).operator%=(m); } //! in-place cube element-wise division, with the right-hand-side operand having delayed operations template template inline const Cube& Cube::operator/=(const OpCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const Cube m(X); return (*this).operator/=(m); } //! create a cube from eOpCube, i.e. run the previously delayed unary operations template template inline Cube::Cube(const eOpCube& X) : n_rows(X.get_n_rows()) , n_cols(X.get_n_cols()) , n_elem_slice(X.get_n_elem_slice()) , n_slices(X.get_n_slices()) , n_elem(X.get_n_elem()) , mem_state(0) , mat_ptrs(0) , mem() { arma_extra_debug_sigprint_this(this); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); init_cold(); eop_type::apply(*this, X); } //! create a cube from eOpCube, i.e. run the previously delayed unary operations template template inline const Cube& Cube::operator=(const eOpCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const bool bad_alias = ( X.P.has_subview && X.P.is_alias(*this) ); if(bad_alias == false) { init_warm(X.get_n_rows(), X.get_n_cols(), X.get_n_slices()); eop_type::apply(*this, X); } else { Cube tmp(X); steal_mem(tmp); } return *this; } //! in-place cube addition, with the right-hand-side operand having delayed operations template template inline const Cube& Cube::operator+=(const eOpCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); eop_type::apply_inplace_plus(*this, X); return *this; } //! in-place cube subtraction, with the right-hand-side operand having delayed operations template template inline const Cube& Cube::operator-=(const eOpCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); eop_type::apply_inplace_minus(*this, X); return *this; } //! in-place cube element-wise multiplication, with the right-hand-side operand having delayed operations template template inline const Cube& Cube::operator%=(const eOpCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); eop_type::apply_inplace_schur(*this, X); return *this; } //! in-place cube element-wise division, with the right-hand-side operand having delayed operations template template inline const Cube& Cube::operator/=(const eOpCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); eop_type::apply_inplace_div(*this, X); return *this; } //! EXPERIMENTAL template template inline Cube::Cube(const mtOpCube& X) : n_rows(0) , n_cols(0) , n_elem_slice(0) , n_slices(0) , n_elem(0) , mem_state(0) , mat_ptrs(0) , mem() { arma_extra_debug_sigprint_this(this); op_type::apply(*this, X); } //! EXPERIMENTAL template template inline const Cube& Cube::operator=(const mtOpCube& X) { arma_extra_debug_sigprint(); op_type::apply(*this, X); return *this; } //! EXPERIMENTAL template template inline const Cube& Cube::operator+=(const mtOpCube& X) { arma_extra_debug_sigprint(); const Cube m(X); return (*this).operator+=(m); } //! EXPERIMENTAL template template inline const Cube& Cube::operator-=(const mtOpCube& X) { arma_extra_debug_sigprint(); const Cube m(X); return (*this).operator-=(m); } //! EXPERIMENTAL template template inline const Cube& Cube::operator%=(const mtOpCube& X) { arma_extra_debug_sigprint(); const Cube m(X); return (*this).operator%=(m); } //! EXPERIMENTAL template template inline const Cube& Cube::operator/=(const mtOpCube& X) { arma_extra_debug_sigprint(); const Cube m(X); return (*this).operator/=(m); } //! create a cube from Glue, i.e. run the previously delayed binary operations template template inline Cube::Cube(const GlueCube& X) : n_rows(0) , n_cols(0) , n_elem_slice(0) , n_slices(0) , n_elem(0) , mem_state(0) , mat_ptrs(0) , mem() { arma_extra_debug_sigprint_this(this); this->operator=(X); } //! create a cube from Glue, i.e. run the previously delayed binary operations template template inline const Cube& Cube::operator=(const GlueCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); glue_type::apply(*this, X); return *this; } //! in-place cube addition, with the right-hand-side operands having delayed operations template template inline const Cube& Cube::operator+=(const GlueCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); const Cube m(X); return (*this).operator+=(m); } //! in-place cube subtraction, with the right-hand-side operands having delayed operations template template inline const Cube& Cube::operator-=(const GlueCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); const Cube m(X); return (*this).operator-=(m); } //! in-place cube element-wise multiplication, with the right-hand-side operands having delayed operations template template inline const Cube& Cube::operator%=(const GlueCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); const Cube m(X); return (*this).operator%=(m); } //! in-place cube element-wise division, with the right-hand-side operands having delayed operations template template inline const Cube& Cube::operator/=(const GlueCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); const Cube m(X); return (*this).operator/=(m); } //! create a cube from eGlue, i.e. run the previously delayed binary operations template template inline Cube::Cube(const eGlueCube& X) : n_rows(X.get_n_rows()) , n_cols(X.get_n_cols()) , n_elem_slice(X.get_n_elem_slice()) , n_slices(X.get_n_slices()) , n_elem(X.get_n_elem()) , mem_state(0) , mat_ptrs(0) , mem() { arma_extra_debug_sigprint_this(this); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); init_cold(); eglue_type::apply(*this, X); } //! create a cube from Glue, i.e. run the previously delayed binary operations template template inline const Cube& Cube::operator=(const eGlueCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); const bool bad_alias = ( (X.P1.has_subview && X.P1.is_alias(*this)) || (X.P2.has_subview && X.P2.is_alias(*this)) ); if(bad_alias == false) { init_warm(X.get_n_rows(), X.get_n_cols(), X.get_n_slices()); eglue_type::apply(*this, X); } else { Cube tmp(X); steal_mem(tmp); } return *this; } //! in-place cube addition, with the right-hand-side operands having delayed operations template template inline const Cube& Cube::operator+=(const eGlueCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); eglue_type::apply_inplace_plus(*this, X); return *this; } //! in-place cube subtraction, with the right-hand-side operands having delayed operations template template inline const Cube& Cube::operator-=(const eGlueCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); eglue_type::apply_inplace_minus(*this, X); return *this; } //! in-place cube element-wise multiplication, with the right-hand-side operands having delayed operations template template inline const Cube& Cube::operator%=(const eGlueCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); eglue_type::apply_inplace_schur(*this, X); return *this; } //! in-place cube element-wise division, with the right-hand-side operands having delayed operations template template inline const Cube& Cube::operator/=(const eGlueCube& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); eglue_type::apply_inplace_div(*this, X); return *this; } //! EXPERIMENTAL template template inline Cube::Cube(const mtGlueCube& X) : n_rows(0) , n_cols(0) , n_elem_slice(0) , n_slices(0) , n_elem(0) , mem_state(0) , mat_ptrs(0) , mem() { arma_extra_debug_sigprint_this(this); glue_type::apply(*this, X); } //! EXPERIMENTAL template template inline const Cube& Cube::operator=(const mtGlueCube& X) { arma_extra_debug_sigprint(); glue_type::apply(*this, X); return *this; } //! EXPERIMENTAL template template inline const Cube& Cube::operator+=(const mtGlueCube& X) { arma_extra_debug_sigprint(); const Cube m(X); return (*this).operator+=(m); } //! EXPERIMENTAL template template inline const Cube& Cube::operator-=(const mtGlueCube& X) { arma_extra_debug_sigprint(); const Cube m(X); return (*this).operator-=(m); } //! EXPERIMENTAL template template inline const Cube& Cube::operator%=(const mtGlueCube& X) { arma_extra_debug_sigprint(); const Cube m(X); return (*this).operator%=(m); } //! EXPERIMENTAL template template inline const Cube& Cube::operator/=(const mtGlueCube& X) { arma_extra_debug_sigprint(); const Cube m(X); return (*this).operator/=(m); } //! linear element accessor (treats the cube as a vector); no bounds check; assumes memory is aligned template arma_inline arma_warn_unused const eT& Cube::at_alt(const uword i) const { const eT* mem_aligned = mem; memory::mark_as_aligned(mem_aligned); return mem_aligned[i]; } //! linear element accessor (treats the cube as a vector); bounds checking not done when ARMA_NO_DEBUG is defined template arma_inline arma_warn_unused eT& Cube::operator() (const uword i) { arma_debug_check( (i >= n_elem), "Cube::operator(): index out of bounds"); return access::rw(mem[i]); } //! linear element accessor (treats the cube as a vector); bounds checking not done when ARMA_NO_DEBUG is defined template arma_inline arma_warn_unused const eT& Cube::operator() (const uword i) const { arma_debug_check( (i >= n_elem), "Cube::operator(): index out of bounds"); return mem[i]; } //! linear element accessor (treats the cube as a vector); no bounds check. template arma_inline arma_warn_unused eT& Cube::operator[] (const uword i) { return access::rw(mem[i]); } //! linear element accessor (treats the cube as a vector); no bounds check template arma_inline arma_warn_unused const eT& Cube::operator[] (const uword i) const { return mem[i]; } //! linear element accessor (treats the cube as a vector); no bounds check. template arma_inline arma_warn_unused eT& Cube::at(const uword i) { return access::rw(mem[i]); } //! linear element accessor (treats the cube as a vector); no bounds check template arma_inline arma_warn_unused const eT& Cube::at(const uword i) const { return mem[i]; } //! element accessor; bounds checking not done when ARMA_NO_DEBUG is defined template arma_inline arma_warn_unused eT& Cube::operator() (const uword in_row, const uword in_col, const uword in_slice) { arma_debug_check ( (in_row >= n_rows) || (in_col >= n_cols) || (in_slice >= n_slices) , "Cube::operator(): index out of bounds" ); return access::rw(mem[in_slice*n_elem_slice + in_col*n_rows + in_row]); } //! element accessor; bounds checking not done when ARMA_NO_DEBUG is defined template arma_inline arma_warn_unused const eT& Cube::operator() (const uword in_row, const uword in_col, const uword in_slice) const { arma_debug_check ( (in_row >= n_rows) || (in_col >= n_cols) || (in_slice >= n_slices) , "Cube::operator(): index out of bounds" ); return mem[in_slice*n_elem_slice + in_col*n_rows + in_row]; } //! element accessor; no bounds check template arma_inline arma_warn_unused eT& Cube::at(const uword in_row, const uword in_col, const uword in_slice) { return access::rw( mem[in_slice*n_elem_slice + in_col*n_rows + in_row] ); } //! element accessor; no bounds check template arma_inline arma_warn_unused const eT& Cube::at(const uword in_row, const uword in_col, const uword in_slice) const { return mem[in_slice*n_elem_slice + in_col*n_rows + in_row]; } //! prefix ++ template arma_inline const Cube& Cube::operator++() { Cube_aux::prefix_pp(*this); return *this; } //! postfix ++ (must not return the object by reference) template arma_inline void Cube::operator++(int) { Cube_aux::postfix_pp(*this); } //! prefix -- template arma_inline const Cube& Cube::operator--() { Cube_aux::prefix_mm(*this); return *this; } //! postfix -- (must not return the object by reference) template arma_inline void Cube::operator--(int) { Cube_aux::postfix_mm(*this); } //! returns true if all of the elements are finite template arma_inline arma_warn_unused bool Cube::is_finite() const { return arrayops::is_finite( memptr(), n_elem ); } //! returns true if the cube has no elements template arma_inline arma_warn_unused bool Cube::is_empty() const { return (n_elem == 0); } template inline arma_warn_unused bool Cube::has_inf() const { arma_extra_debug_sigprint(); return arrayops::has_inf( memptr(), n_elem ); } template inline arma_warn_unused bool Cube::has_nan() const { arma_extra_debug_sigprint(); return arrayops::has_nan( memptr(), n_elem ); } //! returns true if the given index is currently in range template arma_inline arma_warn_unused bool Cube::in_range(const uword i) const { return (i < n_elem); } //! returns true if the given start and end indices are currently in range template arma_inline arma_warn_unused bool Cube::in_range(const span& x) const { arma_extra_debug_sigprint(); if(x.whole == true) { return true; } else { const uword a = x.a; const uword b = x.b; return ( (a <= b) && (b < n_elem) ); } } //! returns true if the given location is currently in range template arma_inline arma_warn_unused bool Cube::in_range(const uword in_row, const uword in_col, const uword in_slice) const { return ( (in_row < n_rows) && (in_col < n_cols) && (in_slice < n_slices) ); } template inline arma_warn_unused bool Cube::in_range(const span& row_span, const span& col_span, const span& slice_span) const { arma_extra_debug_sigprint(); const uword in_row1 = row_span.a; const uword in_row2 = row_span.b; const uword in_col1 = col_span.a; const uword in_col2 = col_span.b; const uword in_slice1 = slice_span.a; const uword in_slice2 = slice_span.b; const bool rows_ok = row_span.whole ? true : ( (in_row1 <= in_row2) && (in_row2 < n_rows) ); const bool cols_ok = col_span.whole ? true : ( (in_col1 <= in_col2) && (in_col2 < n_cols) ); const bool slices_ok = slice_span.whole ? true : ( (in_slice1 <= in_slice2) && (in_slice2 < n_slices) ); return ( (rows_ok == true) && (cols_ok == true) && (slices_ok == true) ); } template inline arma_warn_unused bool Cube::in_range(const uword in_row, const uword in_col, const uword in_slice, const SizeCube& s) const { const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; const uword l_n_slices = n_slices; if( ( in_row >= l_n_rows) || ( in_col >= l_n_cols) || ( in_slice >= l_n_slices) || ((in_row + s.n_rows) > l_n_rows) || ((in_col + s.n_cols) > l_n_cols) || ((in_slice + s.n_slices) > l_n_slices) ) { return false; } else { return true; } } //! returns a pointer to array of eTs used by the cube template arma_inline arma_warn_unused eT* Cube::memptr() { return const_cast(mem); } //! returns a pointer to array of eTs used by the cube template arma_inline arma_warn_unused const eT* Cube::memptr() const { return mem; } //! returns a pointer to array of eTs used by the specified slice in the cube template arma_inline arma_warn_unused eT* Cube::slice_memptr(const uword uslice) { return const_cast( &mem[ uslice*n_elem_slice ] ); } //! returns a pointer to array of eTs used by the specified slice in the cube template arma_inline arma_warn_unused const eT* Cube::slice_memptr(const uword uslice) const { return &mem[ uslice*n_elem_slice ]; } //! returns a pointer to array of eTs used by the specified slice in the cube template arma_inline arma_warn_unused eT* Cube::slice_colptr(const uword uslice, const uword col) { return const_cast( &mem[ uslice*n_elem_slice + col*n_rows] ); } //! returns a pointer to array of eTs used by the specified slice in the cube template arma_inline arma_warn_unused const eT* Cube::slice_colptr(const uword uslice, const uword col) const { return &mem[ uslice*n_elem_slice + col*n_rows ]; } //! print contents of the cube (to the cout stream), //! optionally preceding with a user specified line of text. //! the precision and cell width are modified. //! on return, the stream's state are restored to their original values. template inline void Cube::impl_print(const std::string& extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { ARMA_DEFAULT_OSTREAM << extra_text << '\n'; } arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this, true); } //! print contents of the cube to a user specified stream, //! optionally preceding with a user specified line of text. //! the precision and cell width are modified. //! on return, the stream's state are restored to their original values. template inline void Cube::impl_print(std::ostream& user_stream, const std::string& extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { user_stream << extra_text << '\n'; } arma_ostream::print(user_stream, *this, true); } //! print contents of the cube (to the cout stream), //! optionally preceding with a user specified line of text. //! the stream's state are used as is and are not modified //! (i.e. the precision and cell width are not modified). template inline void Cube::impl_raw_print(const std::string& extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { ARMA_DEFAULT_OSTREAM << extra_text << '\n'; } arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this, false); } //! print contents of the cube to a user specified stream, //! optionally preceding with a user specified line of text. //! the stream's state are used as is and are not modified. //! (i.e. the precision and cell width are not modified). template inline void Cube::impl_raw_print(std::ostream& user_stream, const std::string& extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { user_stream << extra_text << '\n'; } arma_ostream::print(user_stream, *this, false); } //! change the cube to have user specified dimensions (data is not preserved) template inline void Cube::set_size(const uword in_n_rows, const uword in_n_cols, const uword in_n_slices) { arma_extra_debug_sigprint(); init_warm(in_n_rows, in_n_cols, in_n_slices); } //! change the cube to have user specified dimensions (data is preserved) template inline void Cube::reshape(const uword in_rows, const uword in_cols, const uword in_slices, const uword dim) { arma_extra_debug_sigprint(); *this = arma::reshape(*this, in_rows, in_cols, in_slices, dim); } //! change the cube to have user specified dimensions (data is preserved) template inline void Cube::resize(const uword in_rows, const uword in_cols, const uword in_slices) { arma_extra_debug_sigprint(); *this = arma::resize(*this, in_rows, in_cols, in_slices); } //! change the cube (without preserving data) to have the same dimensions as the given cube template template inline void Cube::copy_size(const Cube& m) { arma_extra_debug_sigprint(); init_warm(m.n_rows, m.n_cols, m.n_slices); } //! transform each element in the cube using a functor template template inline const Cube& Cube::transform(functor F) { arma_extra_debug_sigprint(); eT* out_mem = memptr(); const uword N = n_elem; uword ii, jj; for(ii=0, jj=1; jj < N; ii+=2, jj+=2) { eT tmp_ii = out_mem[ii]; eT tmp_jj = out_mem[jj]; tmp_ii = eT( F(tmp_ii) ); tmp_jj = eT( F(tmp_jj) ); out_mem[ii] = tmp_ii; out_mem[jj] = tmp_jj; } if(ii < N) { out_mem[ii] = eT( F(out_mem[ii]) ); } return *this; } //! imbue (fill) the cube with values provided by a functor template template inline const Cube& Cube::imbue(functor F) { arma_extra_debug_sigprint(); eT* out_mem = memptr(); const uword N = n_elem; uword ii, jj; for(ii=0, jj=1; jj < N; ii+=2, jj+=2) { const eT tmp_ii = eT( F() ); const eT tmp_jj = eT( F() ); out_mem[ii] = tmp_ii; out_mem[jj] = tmp_jj; } if(ii < N) { out_mem[ii] = eT( F() ); } return *this; } //! fill the cube with the specified value template inline const Cube& Cube::fill(const eT val) { arma_extra_debug_sigprint(); arrayops::inplace_set( memptr(), val, n_elem ); return *this; } template inline const Cube& Cube::zeros() { arma_extra_debug_sigprint(); arrayops::fill_zeros(memptr(), n_elem); return *this; } template inline const Cube& Cube::zeros(const uword in_rows, const uword in_cols, const uword in_slices) { arma_extra_debug_sigprint(); set_size(in_rows, in_cols, in_slices); return (*this).zeros(); } template inline const Cube& Cube::ones() { arma_extra_debug_sigprint(); return (*this).fill(eT(1)); } template inline const Cube& Cube::ones(const uword in_rows, const uword in_cols, const uword in_slices) { arma_extra_debug_sigprint(); set_size(in_rows, in_cols, in_slices); return (*this).fill(eT(1)); } template inline const Cube& Cube::randu() { arma_extra_debug_sigprint(); arma_rng::randu::fill( memptr(), n_elem ); return *this; } template inline const Cube& Cube::randu(const uword in_rows, const uword in_cols, const uword in_slices) { arma_extra_debug_sigprint(); set_size(in_rows, in_cols, in_slices); return (*this).randu(); } template inline const Cube& Cube::randn() { arma_extra_debug_sigprint(); arma_rng::randn::fill( memptr(), n_elem ); return *this; } template inline const Cube& Cube::randn(const uword in_rows, const uword in_cols, const uword in_slices) { arma_extra_debug_sigprint(); set_size(in_rows, in_cols, in_slices); return (*this).randn(); } template inline void Cube::reset() { arma_extra_debug_sigprint(); init_warm(0,0,0); } template template inline void Cube::set_real(const BaseCube::pod_type,T1>& X) { arma_extra_debug_sigprint(); Cube_aux::set_real(*this, X); } template template inline void Cube::set_imag(const BaseCube::pod_type,T1>& X) { arma_extra_debug_sigprint(); Cube_aux::set_imag(*this, X); } template inline arma_warn_unused eT Cube::min() const { arma_extra_debug_sigprint(); if(n_elem == 0) { arma_debug_check(true, "Cube::min(): object has no elements"); return Datum::nan; } return op_min::direct_min(memptr(), n_elem); } template inline arma_warn_unused eT Cube::max() const { arma_extra_debug_sigprint(); if(n_elem == 0) { arma_debug_check(true, "Cube::max(): object has no elements"); return Datum::nan; } return op_max::direct_max(memptr(), n_elem); } template inline eT Cube::min(uword& index_of_min_val) const { arma_extra_debug_sigprint(); if(n_elem == 0) { arma_debug_check(true, "Cube::min(): object has no elements"); return Datum::nan; } return op_min::direct_min(memptr(), n_elem, index_of_min_val); } template inline eT Cube::max(uword& index_of_max_val) const { arma_extra_debug_sigprint(); if(n_elem == 0) { arma_debug_check(true, "Cube::max(): object has no elements"); return Datum::nan; } return op_max::direct_max(memptr(), n_elem, index_of_max_val); } template inline eT Cube::min(uword& row_of_min_val, uword& col_of_min_val, uword& slice_of_min_val) const { arma_extra_debug_sigprint(); if(n_elem == 0) { arma_debug_check(true, "Cube::min(): object has no elements"); return Datum::nan; } uword i; eT val = op_min::direct_min(memptr(), n_elem, i); const uword in_slice = i / n_elem_slice; const uword offset = in_slice * n_elem_slice; const uword j = i - offset; row_of_min_val = j % n_rows; col_of_min_val = j / n_rows; slice_of_min_val = in_slice; return val; } template inline eT Cube::max(uword& row_of_max_val, uword& col_of_max_val, uword& slice_of_max_val) const { arma_extra_debug_sigprint(); if(n_elem == 0) { arma_debug_check(true, "Cube::max(): object has no elements"); return Datum::nan; } uword i; eT val = op_max::direct_max(memptr(), n_elem, i); const uword in_slice = i / n_elem_slice; const uword offset = in_slice * n_elem_slice; const uword j = i - offset; row_of_max_val = j % n_rows; col_of_max_val = j / n_rows; slice_of_max_val = in_slice; return val; } //! save the cube to a file template inline bool Cube::save(const std::string name, const file_type type, const bool print_status) const { arma_extra_debug_sigprint(); bool save_okay; switch(type) { case raw_ascii: save_okay = diskio::save_raw_ascii(*this, name); break; case arma_ascii: save_okay = diskio::save_arma_ascii(*this, name); break; case raw_binary: save_okay = diskio::save_raw_binary(*this, name); break; case arma_binary: save_okay = diskio::save_arma_binary(*this, name); break; case ppm_binary: save_okay = diskio::save_ppm_binary(*this, name); break; case hdf5_binary: save_okay = diskio::save_hdf5_binary(*this, name); break; default: arma_warn(print_status, "Cube::save(): unsupported file type"); save_okay = false; } arma_warn( (print_status && (save_okay == false)), "Cube::save(): couldn't write to ", name); return save_okay; } //! save the cube to a stream template inline bool Cube::save(std::ostream& os, const file_type type, const bool print_status) const { arma_extra_debug_sigprint(); bool save_okay; switch(type) { case raw_ascii: save_okay = diskio::save_raw_ascii(*this, os); break; case arma_ascii: save_okay = diskio::save_arma_ascii(*this, os); break; case raw_binary: save_okay = diskio::save_raw_binary(*this, os); break; case arma_binary: save_okay = diskio::save_arma_binary(*this, os); break; case ppm_binary: save_okay = diskio::save_ppm_binary(*this, os); break; default: arma_warn(print_status, "Cube::save(): unsupported file type"); save_okay = false; } arma_warn( (print_status && (save_okay == false)), "Cube::save(): couldn't write to given stream"); return save_okay; } //! load a cube from a file template inline bool Cube::load(const std::string name, const file_type type, const bool print_status) { arma_extra_debug_sigprint(); bool load_okay; std::string err_msg; switch(type) { case auto_detect: load_okay = diskio::load_auto_detect(*this, name, err_msg); break; case raw_ascii: load_okay = diskio::load_raw_ascii(*this, name, err_msg); break; case arma_ascii: load_okay = diskio::load_arma_ascii(*this, name, err_msg); break; case raw_binary: load_okay = diskio::load_raw_binary(*this, name, err_msg); break; case arma_binary: load_okay = diskio::load_arma_binary(*this, name, err_msg); break; case ppm_binary: load_okay = diskio::load_ppm_binary(*this, name, err_msg); break; case hdf5_binary: load_okay = diskio::load_hdf5_binary(*this, name, err_msg); break; default: arma_warn(print_status, "Cube::load(): unsupported file type"); load_okay = false; } if( (print_status == true) && (load_okay == false) ) { if(err_msg.length() > 0) { arma_warn(true, "Cube::load(): ", err_msg, name); } else { arma_warn(true, "Cube::load(): couldn't read ", name); } } if(load_okay == false) { (*this).reset(); } return load_okay; } //! load a cube from a stream template inline bool Cube::load(std::istream& is, const file_type type, const bool print_status) { arma_extra_debug_sigprint(); bool load_okay; std::string err_msg; switch(type) { case auto_detect: load_okay = diskio::load_auto_detect(*this, is, err_msg); break; case raw_ascii: load_okay = diskio::load_raw_ascii(*this, is, err_msg); break; case arma_ascii: load_okay = diskio::load_arma_ascii(*this, is, err_msg); break; case raw_binary: load_okay = diskio::load_raw_binary(*this, is, err_msg); break; case arma_binary: load_okay = diskio::load_arma_binary(*this, is, err_msg); break; case ppm_binary: load_okay = diskio::load_ppm_binary(*this, is, err_msg); break; default: arma_warn(print_status, "Cube::load(): unsupported file type"); load_okay = false; } if( (print_status == true) && (load_okay == false) ) { if(err_msg.length() > 0) { arma_warn(true, "Cube::load(): ", err_msg, "the given stream"); } else { arma_warn(true, "Cube::load(): couldn't load from the given stream"); } } if(load_okay == false) { (*this).reset(); } return load_okay; } //! save the cube to a file, without printing any error messages template inline bool Cube::quiet_save(const std::string name, const file_type type) const { arma_extra_debug_sigprint(); return (*this).save(name, type, false); } //! save the cube to a stream, without printing any error messages template inline bool Cube::quiet_save(std::ostream& os, const file_type type) const { arma_extra_debug_sigprint(); return (*this).save(os, type, false); } //! load a cube from a file, without printing any error messages template inline bool Cube::quiet_load(const std::string name, const file_type type) { arma_extra_debug_sigprint(); return (*this).load(name, type, false); } //! load a cube from a stream, without printing any error messages template inline bool Cube::quiet_load(std::istream& is, const file_type type) { arma_extra_debug_sigprint(); return (*this).load(is, type, false); } template inline typename Cube::iterator Cube::begin() { arma_extra_debug_sigprint(); return memptr(); } template inline typename Cube::const_iterator Cube::begin() const { arma_extra_debug_sigprint(); return memptr(); } template inline typename Cube::const_iterator Cube::cbegin() const { arma_extra_debug_sigprint(); return memptr(); } template inline typename Cube::iterator Cube::end() { arma_extra_debug_sigprint(); return memptr() + n_elem; } template inline typename Cube::const_iterator Cube::end() const { arma_extra_debug_sigprint(); return memptr() + n_elem; } template inline typename Cube::const_iterator Cube::cend() const { arma_extra_debug_sigprint(); return memptr() + n_elem; } template inline typename Cube::slice_iterator Cube::begin_slice(const uword slice_num) { arma_extra_debug_sigprint(); arma_debug_check( (slice_num >= n_slices), "begin_slice(): index out of bounds"); return slice_memptr(slice_num); } template inline typename Cube::const_slice_iterator Cube::begin_slice(const uword slice_num) const { arma_extra_debug_sigprint(); arma_debug_check( (slice_num >= n_slices), "begin_slice(): index out of bounds"); return slice_memptr(slice_num); } template inline typename Cube::slice_iterator Cube::end_slice(const uword slice_num) { arma_extra_debug_sigprint(); arma_debug_check( (slice_num >= n_slices), "end_slice(): index out of bounds"); return slice_memptr(slice_num) + n_elem_slice; } template inline typename Cube::const_slice_iterator Cube::end_slice(const uword slice_num) const { arma_extra_debug_sigprint(); arma_debug_check( (slice_num >= n_slices), "end_slice(): index out of bounds"); return slice_memptr(slice_num) + n_elem_slice; } //! resets this cube to an empty matrix template inline void Cube::clear() { reset(); } //! returns true if the cube has no elements template inline bool Cube::empty() const { return (n_elem == 0); } //! returns the number of elements in this cube template inline uword Cube::size() const { return n_elem; } template inline void Cube::swap(Cube& B) { Cube& A = (*this); arma_extra_debug_sigprint(arma_boost::format("A = %x B = %x") % &A % &B); if( (A.mem_state == 0) && (B.mem_state == 0) && (A.n_elem > Cube_prealloc::mem_n_elem) && (B.n_elem > Cube_prealloc::mem_n_elem) ) { A.delete_mat(); B.delete_mat(); std::swap( access::rw(A.n_rows), access::rw(B.n_rows) ); std::swap( access::rw(A.n_cols), access::rw(B.n_cols) ); std::swap( access::rw(A.n_elem_slice), access::rw(B.n_elem_slice) ); std::swap( access::rw(A.n_slices), access::rw(B.n_slices) ); std::swap( access::rw(A.n_elem), access::rw(B.n_elem) ); std::swap( access::rw(A.mem), access::rw(B.mem) ); A.create_mat(); B.create_mat(); } else if( (A.mem_state == 0) && (B.mem_state == 0) && (A.n_elem <= Cube_prealloc::mem_n_elem) && (B.n_elem <= Cube_prealloc::mem_n_elem) ) { A.delete_mat(); B.delete_mat(); std::swap( access::rw(A.n_rows), access::rw(B.n_rows) ); std::swap( access::rw(A.n_cols), access::rw(B.n_cols) ); std::swap( access::rw(A.n_elem_slice), access::rw(B.n_elem_slice) ); std::swap( access::rw(A.n_slices), access::rw(B.n_slices) ); std::swap( access::rw(A.n_elem), access::rw(B.n_elem) ); const uword N = (std::max)(A.n_elem, B.n_elem); eT* A_mem = A.memptr(); eT* B_mem = B.memptr(); for(uword i=0; i C = A; A.steal_mem(B); B.steal_mem(C); } else { Cube C = B; B.steal_mem(A); A.steal_mem(C); } } } //! try to steal the memory from a given cube; //! if memory can't be stolen, copy the given cube template inline void Cube::steal_mem(Cube& x) { arma_extra_debug_sigprint(); if(this != &x) { if( (mem_state <= 1) && ( ((x.mem_state == 0) && (x.n_elem > Cube_prealloc::mem_n_elem)) || (x.mem_state == 1) ) ) { reset(); const uword x_n_slices = x.n_slices; access::rw(n_rows) = x.n_rows; access::rw(n_cols) = x.n_cols; access::rw(n_elem_slice) = x.n_elem_slice; access::rw(n_slices) = x_n_slices; access::rw(n_elem) = x.n_elem; access::rw(mem_state) = x.mem_state; access::rw(mem) = x.mem; if(x_n_slices > Cube_prealloc::mat_ptrs_size) { access::rw( mat_ptrs) = x.mat_ptrs; access::rw(x.mat_ptrs) = 0; } else { access::rw(mat_ptrs) = const_cast< const Mat** >(mat_ptrs_local); for(uword i=0; i < x_n_slices; ++i) { mat_ptrs[i] = x.mat_ptrs[i]; x.mat_ptrs[i] = 0; } } access::rw(x.n_rows) = 0; access::rw(x.n_cols) = 0; access::rw(x.n_elem_slice) = 0; access::rw(x.n_slices) = 0; access::rw(x.n_elem) = 0; access::rw(x.mem_state) = 0; access::rw(x.mem) = 0; } else { (*this).operator=(x); } } } // // Cube::fixed template template arma_inline void Cube::fixed::mem_setup() { arma_extra_debug_sigprint(); if(fixed_n_elem > 0) { access::rw(Cube::n_rows) = fixed_n_rows; access::rw(Cube::n_cols) = fixed_n_cols; access::rw(Cube::n_elem_slice) = fixed_n_rows * fixed_n_cols; access::rw(Cube::n_slices) = fixed_n_slices; access::rw(Cube::n_elem) = fixed_n_elem; access::rw(Cube::mem_state) = 3; access::rw(Cube::mat_ptrs) = const_cast< const Mat** >( \ (fixed_n_slices > Cube_prealloc::mat_ptrs_size) ? mat_ptrs_local_extra : mat_ptrs_local ); access::rw(Cube::mem) = (fixed_n_elem > Cube_prealloc::mem_n_elem) ? mem_local_extra : mem_local; create_mat(); } else { access::rw(Cube::n_rows) = 0; access::rw(Cube::n_cols) = 0; access::rw(Cube::n_elem_slice) = 0; access::rw(Cube::n_slices) = 0; access::rw(Cube::n_elem) = 0; access::rw(Cube::mem_state) = 3; access::rw(Cube::mat_ptrs) = 0; access::rw(Cube::mem) = 0; } } template template inline Cube::fixed::fixed() { arma_extra_debug_sigprint_this(this); mem_setup(); } template template inline Cube::fixed::fixed(const fixed& X) { arma_extra_debug_sigprint_this(this); mem_setup(); eT* dest = (use_extra) ? mem_local_extra : mem_local; const eT* src = (use_extra) ? X.mem_local_extra : X.mem_local; arrayops::copy( dest, src, fixed_n_elem ); } template template template inline Cube::fixed::fixed(const fill::fill_class&) { arma_extra_debug_sigprint_this(this); mem_setup(); if(is_same_type::yes) (*this).zeros(); if(is_same_type::yes) (*this).ones(); if(is_same_type::yes) (*this).randu(); if(is_same_type::yes) (*this).randn(); if(is_same_type::yes) { arma_debug_check(true, "Cube::fixed::fixed(): unsupported fill type"); } } template template template inline Cube::fixed::fixed(const BaseCube& A) { arma_extra_debug_sigprint_this(this); mem_setup(); Cube::operator=(A.get_ref()); } template template template inline Cube::fixed::fixed(const BaseCube& A, const BaseCube& B) { arma_extra_debug_sigprint_this(this); mem_setup(); Cube::init(A,B); } template template inline const Cube& Cube::fixed::operator=(const fixed& X) { arma_extra_debug_sigprint(); eT* dest = (use_extra) ? mem_local_extra : mem_local; const eT* src = (use_extra) ? X.mem_local_extra : X.mem_local; arrayops::copy( dest, src, fixed_n_elem ); return *this; } template template arma_inline arma_warn_unused eT& Cube::fixed::operator[] (const uword i) { return (use_extra) ? mem_local_extra[i] : mem_local[i]; } template template arma_inline arma_warn_unused const eT& Cube::fixed::operator[] (const uword i) const { return (use_extra) ? mem_local_extra[i] : mem_local[i]; } template template arma_inline arma_warn_unused eT& Cube::fixed::at(const uword i) { return (use_extra) ? mem_local_extra[i] : mem_local[i]; } template template arma_inline arma_warn_unused const eT& Cube::fixed::at(const uword i) const { return (use_extra) ? mem_local_extra[i] : mem_local[i]; } template template arma_inline arma_warn_unused eT& Cube::fixed::operator() (const uword i) { arma_debug_check( (i >= fixed_n_elem), "Cube::operator(): index out of bounds"); return (use_extra) ? mem_local_extra[i] : mem_local[i]; } template template arma_inline arma_warn_unused const eT& Cube::fixed::operator() (const uword i) const { arma_debug_check( (i >= fixed_n_elem), "Cube::operator(): index out of bounds"); return (use_extra) ? mem_local_extra[i] : mem_local[i]; } template template arma_inline arma_warn_unused eT& Cube::fixed::at(const uword in_row, const uword in_col, const uword in_slice) { const uword i = in_slice*fixed_n_elem_slice + in_col*fixed_n_rows + in_row; return (use_extra) ? mem_local_extra[i] : mem_local[i]; } template template arma_inline arma_warn_unused const eT& Cube::fixed::at(const uword in_row, const uword in_col, const uword in_slice) const { const uword i = in_slice*fixed_n_elem_slice + in_col*fixed_n_rows + in_row; return (use_extra) ? mem_local_extra[i] : mem_local[i]; } template template arma_inline arma_warn_unused eT& Cube::fixed::operator() (const uword in_row, const uword in_col, const uword in_slice) { arma_debug_check ( (in_row >= fixed_n_rows ) || (in_col >= fixed_n_cols ) || (in_slice >= fixed_n_slices) , "operator(): index out of bounds" ); const uword i = in_slice*fixed_n_elem_slice + in_col*fixed_n_rows + in_row; return (use_extra) ? mem_local_extra[i] : mem_local[i]; } template template arma_inline arma_warn_unused const eT& Cube::fixed::operator() (const uword in_row, const uword in_col, const uword in_slice) const { arma_debug_check ( (in_row >= fixed_n_rows ) || (in_col >= fixed_n_cols ) || (in_slice >= fixed_n_slices) , "Cube::operator(): index out of bounds" ); const uword i = in_slice*fixed_n_elem_slice + in_col*fixed_n_rows + in_row; return (use_extra) ? mem_local_extra[i] : mem_local[i]; } // // Cube_aux //! prefix ++ template arma_inline void Cube_aux::prefix_pp(Cube& x) { eT* memptr = x.memptr(); const uword n_elem = x.n_elem; uword i,j; for(i=0, j=1; j arma_inline void Cube_aux::prefix_pp(Cube< std::complex >& x) { x += T(1); } //! postfix ++ template arma_inline void Cube_aux::postfix_pp(Cube& x) { eT* memptr = x.memptr(); const uword n_elem = x.n_elem; uword i,j; for(i=0, j=1; j arma_inline void Cube_aux::postfix_pp(Cube< std::complex >& x) { x += T(1); } //! prefix -- template arma_inline void Cube_aux::prefix_mm(Cube& x) { eT* memptr = x.memptr(); const uword n_elem = x.n_elem; uword i,j; for(i=0, j=1; j arma_inline void Cube_aux::prefix_mm(Cube< std::complex >& x) { x -= T(1); } //! postfix -- template arma_inline void Cube_aux::postfix_mm(Cube& x) { eT* memptr = x.memptr(); const uword n_elem = x.n_elem; uword i,j; for(i=0, j=1; j arma_inline void Cube_aux::postfix_mm(Cube< std::complex >& x) { x -= T(1); } template inline void Cube_aux::set_real(Cube& out, const BaseCube& X) { arma_extra_debug_sigprint(); const unwrap_cube tmp(X.get_ref()); const Cube& A = tmp.M; arma_debug_assert_same_size( out, A, "Cube::set_real()" ); out = A; } template inline void Cube_aux::set_imag(Cube&, const BaseCube&) { arma_extra_debug_sigprint(); } template inline void Cube_aux::set_real(Cube< std::complex >& out, const BaseCube& X) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const ProxyCube P(X.get_ref()); const uword local_n_rows = P.get_n_rows(); const uword local_n_cols = P.get_n_cols(); const uword local_n_slices = P.get_n_slices(); arma_debug_assert_same_size ( out.n_rows, out.n_cols, out.n_slices, local_n_rows, local_n_cols, local_n_slices, "Cube::set_real()" ); eT* out_mem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { typedef typename ProxyCube::ea_type ea_type; ea_type A = P.get_ea(); const uword N = out.n_elem; for(uword i=0; i( A[i], out_mem[i].imag() ); } } else { for(uword slice = 0; slice < local_n_slices; ++slice) for(uword col = 0; col < local_n_cols; ++col ) for(uword row = 0; row < local_n_rows; ++row ) { (*out_mem) = std::complex( P.at(row,col,slice), (*out_mem).imag() ); out_mem++; } } } template inline void Cube_aux::set_imag(Cube< std::complex >& out, const BaseCube& X) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const ProxyCube P(X.get_ref()); const uword local_n_rows = P.get_n_rows(); const uword local_n_cols = P.get_n_cols(); const uword local_n_slices = P.get_n_slices(); arma_debug_assert_same_size ( out.n_rows, out.n_cols, out.n_slices, local_n_rows, local_n_cols, local_n_slices, "Cube::set_imag()" ); eT* out_mem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { typedef typename ProxyCube::ea_type ea_type; ea_type A = P.get_ea(); const uword N = out.n_elem; for(uword i=0; i( out_mem[i].real(), A[i] ); } } else { for(uword slice = 0; slice < local_n_slices; ++slice) for(uword col = 0; col < local_n_cols; ++col ) for(uword row = 0; row < local_n_rows; ++row ) { (*out_mem) = std::complex( (*out_mem).real(), P.at(row,col,slice) ); out_mem++; } } } #ifdef ARMA_EXTRA_CUBE_MEAT #include ARMA_INCFILE_WRAP(ARMA_EXTRA_CUBE_MEAT) #endif //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/GenCube_bones.hpp ================================================ // Copyright (C) 2011-2013 Conrad Sanderson // Copyright (C) 2011-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup GenCube //! @{ //! support class for generator functions (eg. zeros, randu, randn, ...) template class GenCube : public BaseCube > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool prefer_at_accessor = false; static const bool is_simple = (is_same_type::value) || (is_same_type::value); arma_aligned const uword n_rows; arma_aligned const uword n_cols; arma_aligned const uword n_slices; arma_inline GenCube(const uword in_n_rows, const uword in_n_cols, const uword in_n_slices); arma_inline ~GenCube(); arma_inline static eT generate(); arma_inline eT operator[] (const uword i) const; arma_inline eT at (const uword row, const uword col, const uword slice) const; arma_inline eT at_alt (const uword i) const; inline void apply (Cube& out) const; inline void apply_inplace_plus (Cube& out) const; inline void apply_inplace_minus(Cube& out) const; inline void apply_inplace_schur(Cube& out) const; inline void apply_inplace_div (Cube& out) const; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/GenCube_meat.hpp ================================================ // Copyright (C) 2011-2013 Conrad Sanderson // Copyright (C) 2011-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Gen //! @{ template arma_inline GenCube::GenCube(const uword in_n_rows, const uword in_n_cols, const uword in_n_slices) : n_rows (in_n_rows ) , n_cols (in_n_cols ) , n_slices(in_n_slices) { arma_extra_debug_sigprint(); } template arma_inline GenCube::~GenCube() { arma_extra_debug_sigprint(); } template arma_inline eT GenCube::generate() { if(is_same_type::yes) { return eT(1); } else if(is_same_type::yes) { return eT(0); } else if(is_same_type::yes) { return eT(arma_rng::randu()); } else if(is_same_type::yes) { return eT(arma_rng::randn()); } else { return eT(); } } template arma_inline eT GenCube::operator[](const uword) const { return GenCube::generate(); } template arma_inline eT GenCube::at(const uword, const uword, const uword) const { return GenCube::generate(); } template arma_inline eT GenCube::at_alt(const uword) const { return GenCube::generate(); } template inline void GenCube::apply(Cube& out) const { arma_extra_debug_sigprint(); // NOTE: we're assuming that the cube has already been set to the correct size; // this is done by either the Cube contructor or operator=() if(is_same_type::yes) { out.ones(); } else if(is_same_type::yes) { out.zeros(); } else if(is_same_type::yes) { out.randu(); } else if(is_same_type::yes) { out.randn(); } } template inline void GenCube::apply_inplace_plus(Cube& out) const { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out.n_rows, out.n_cols, out.n_slices, n_rows, n_cols, n_slices, "addition"); eT* out_mem = out.memptr(); const uword n_elem = out.n_elem; uword i,j; for(i=0, j=1; j::generate(); const eT tmp_j = GenCube::generate(); out_mem[i] += tmp_i; out_mem[j] += tmp_j; } if(i < n_elem) { out_mem[i] += GenCube::generate(); } } template inline void GenCube::apply_inplace_minus(Cube& out) const { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out.n_rows, out.n_cols, out.n_slices, n_rows, n_cols, n_slices, "subtraction"); eT* out_mem = out.memptr(); const uword n_elem = out.n_elem; uword i,j; for(i=0, j=1; j::generate(); const eT tmp_j = GenCube::generate(); out_mem[i] -= tmp_i; out_mem[j] -= tmp_j; } if(i < n_elem) { out_mem[i] -= GenCube::generate(); } } template inline void GenCube::apply_inplace_schur(Cube& out) const { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out.n_rows, out.n_cols, out.n_slices, n_rows, n_cols, n_slices, "element-wise multiplication"); eT* out_mem = out.memptr(); const uword n_elem = out.n_elem; uword i,j; for(i=0, j=1; j::generate(); const eT tmp_j = GenCube::generate(); out_mem[i] *= tmp_i; out_mem[j] *= tmp_j; } if(i < n_elem) { out_mem[i] *= GenCube::generate(); } } template inline void GenCube::apply_inplace_div(Cube& out) const { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out.n_rows, out.n_cols, out.n_slices, n_rows, n_cols, n_slices, "element-wise division"); eT* out_mem = out.memptr(); const uword n_elem = out.n_elem; uword i,j; for(i=0, j=1; j::generate(); const eT tmp_j = GenCube::generate(); out_mem[i] /= tmp_i; out_mem[j] /= tmp_j; } if(i < n_elem) { out_mem[i] /= GenCube::generate(); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Gen_bones.hpp ================================================ // Copyright (C) 2011-2014 Conrad Sanderson // Copyright (C) 2011-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Gen //! @{ //! support class for generator functions (eg. zeros, randu, randn, ...) template class Gen : public Base > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; static const bool prefer_at_accessor = (is_same_type::value) ? true : false; static const bool is_simple = (is_same_type::value) || (is_same_type::value); static const bool is_row = T1::is_row; static const bool is_col = T1::is_col; arma_aligned const uword n_rows; arma_aligned const uword n_cols; arma_inline Gen(const uword in_n_rows, const uword in_n_cols); arma_inline ~Gen(); arma_inline static elem_type generate(); arma_inline elem_type operator[] (const uword ii) const; arma_inline elem_type at (const uword row, const uword col) const; arma_inline elem_type at_alt (const uword ii) const; inline void apply (Mat& out) const; inline void apply_inplace_plus (Mat& out) const; inline void apply_inplace_minus(Mat& out) const; inline void apply_inplace_schur(Mat& out) const; inline void apply_inplace_div (Mat& out) const; inline void apply(subview& out) const; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Gen_meat.hpp ================================================ // Copyright (C) 2011-2014 Conrad Sanderson // Copyright (C) 2011-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Gen //! @{ template arma_inline Gen::Gen(const uword in_n_rows, const uword in_n_cols) : n_rows(in_n_rows) , n_cols(in_n_cols) { arma_extra_debug_sigprint(); } template arma_inline Gen::~Gen() { arma_extra_debug_sigprint(); } template arma_inline typename T1::elem_type Gen::generate() { typedef typename T1::elem_type eT; if(is_same_type::yes) { return eT(1); } else if(is_same_type::yes) { return eT(0); } else if(is_same_type::yes) { return eT(arma_rng::randu()); } else if(is_same_type::yes) { return eT(arma_rng::randn()); } else { return eT(); } } template arma_inline typename T1::elem_type Gen::operator[](const uword ii) const { typedef typename T1::elem_type eT; if(is_same_type::yes) { return ((ii % n_rows) == (ii / n_rows)) ? eT(1) : eT(0); } else { return Gen::generate(); } } template arma_inline typename T1::elem_type Gen::at(const uword row, const uword col) const { typedef typename T1::elem_type eT; if(is_same_type::yes) { return (row == col) ? eT(1) : eT(0); } else { return Gen::generate(); } } template arma_inline typename T1::elem_type Gen::at_alt(const uword ii) const { return operator[](ii); } template inline void Gen::apply(Mat& out) const { arma_extra_debug_sigprint(); // NOTE: we're assuming that the matrix has already been set to the correct size; // this is done by either the Mat contructor or operator=() if(is_same_type::yes) { out.eye(); } else if(is_same_type::yes) { out.ones(); } else if(is_same_type::yes) { out.zeros(); } else if(is_same_type::yes) { out.randu(); } else if(is_same_type::yes) { out.randn(); } } template inline void Gen::apply_inplace_plus(Mat& out) const { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "addition"); typedef typename T1::elem_type eT; if(is_same_type::yes) { const uword N = (std::min)(n_rows, n_cols); for(uword iq=0; iq < N; ++iq) { out.at(iq,iq) += eT(1); } } else { eT* out_mem = out.memptr(); const uword n_elem = out.n_elem; uword iq,jq; for(iq=0, jq=1; jq < n_elem; iq+=2, jq+=2) { const eT tmp_i = Gen::generate(); const eT tmp_j = Gen::generate(); out_mem[iq] += tmp_i; out_mem[jq] += tmp_j; } if(iq < n_elem) { out_mem[iq] += Gen::generate(); } } } template inline void Gen::apply_inplace_minus(Mat& out) const { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "subtraction"); typedef typename T1::elem_type eT; if(is_same_type::yes) { const uword N = (std::min)(n_rows, n_cols); for(uword iq=0; iq < N; ++iq) { out.at(iq,iq) -= eT(1); } } else { eT* out_mem = out.memptr(); const uword n_elem = out.n_elem; uword iq,jq; for(iq=0, jq=1; jq < n_elem; iq+=2, jq+=2) { const eT tmp_i = Gen::generate(); const eT tmp_j = Gen::generate(); out_mem[iq] -= tmp_i; out_mem[jq] -= tmp_j; } if(iq < n_elem) { out_mem[iq] -= Gen::generate(); } } } template inline void Gen::apply_inplace_schur(Mat& out) const { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "element-wise multiplication"); typedef typename T1::elem_type eT; if(is_same_type::yes) { const uword N = (std::min)(n_rows, n_cols); for(uword iq=0; iq < N; ++iq) { for(uword row=0; row < iq; ++row) { out.at(row,iq) = eT(0); } for(uword row=iq+1; row < n_rows; ++row) { out.at(row,iq) = eT(0); } } } else { eT* out_mem = out.memptr(); const uword n_elem = out.n_elem; uword iq,jq; for(iq=0, jq=1; jq < n_elem; iq+=2, jq+=2) { const eT tmp_i = Gen::generate(); const eT tmp_j = Gen::generate(); out_mem[iq] *= tmp_i; out_mem[jq] *= tmp_j; } if(iq < n_elem) { out_mem[iq] *= Gen::generate(); } } } template inline void Gen::apply_inplace_div(Mat& out) const { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "element-wise division"); typedef typename T1::elem_type eT; if(is_same_type::yes) { const uword N = (std::min)(n_rows, n_cols); for(uword iq=0; iq < N; ++iq) { const eT zero = eT(0); for(uword row=0; row < iq; ++row) { out.at(row,iq) /= zero; } for(uword row=iq+1; row < n_rows; ++row) { out.at(row,iq) /= zero; } } } else { eT* out_mem = out.memptr(); const uword n_elem = out.n_elem; uword iq,jq; for(iq=0, jq=1; jq < n_elem; iq+=2, jq+=2) { const eT tmp_i = Gen::generate(); const eT tmp_j = Gen::generate(); out_mem[iq] /= tmp_i; out_mem[jq] /= tmp_j; } if(iq < n_elem) { out_mem[iq] /= Gen::generate(); } } } template inline void Gen::apply(subview& out) const { arma_extra_debug_sigprint(); // NOTE: we're assuming that the submatrix has the same dimensions as the Gen object // this is checked by subview::operator=() if(is_same_type::yes) { out.eye(); } else if(is_same_type::yes) { out.ones(); } else if(is_same_type::yes) { out.zeros(); } else if(is_same_type::yes) { out.randu(); } else if(is_same_type::yes) { out.randn(); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/GlueCube_bones.hpp ================================================ // Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup GlueCube //! @{ //! analog of the Glue class, intended for Cube objects template class GlueCube : public BaseCube > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; arma_inline GlueCube(const BaseCube& in_A, const BaseCube& in_B); arma_inline ~GlueCube(); const T1& A; //!< first operand const T2& B; //!< second operand }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/GlueCube_meat.hpp ================================================ // Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup GlueCube //! @{ template inline GlueCube::GlueCube(const BaseCube& in_A, const BaseCube& in_B) : A(in_A.get_ref()) , B(in_B.get_ref()) { arma_extra_debug_sigprint(); } template inline GlueCube::~GlueCube() { arma_extra_debug_sigprint(); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Glue_bones.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Glue //! @{ //! Class for storing data required for delayed binary operations, //! such as the operands (e.g. two matrices) and the binary operator (e.g. addition). //! The operands are stored as references (which can be optimised away), //! while the operator is "stored" through the template definition (glue_type). //! The operands can be 'Mat', 'Row', 'Col', 'Op', and 'Glue'. //! Note that as 'Glue' can be one of the operands, more than two matrices can be stored. //! //! For example, we could have: Glue //! //! Another example is: Glue< Op, Op, glue_times > template class Glue : public Base > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = (is_same_type::value) ? T1::is_row : false; static const bool is_col = (is_same_type::value) ? T2::is_col : false; arma_inline Glue(const T1& in_A, const T2& in_B); arma_inline Glue(const T1& in_A, const T2& in_B, const uword in_aux_uword); arma_inline ~Glue(); const T1& A; //!< first operand const T2& B; //!< second operand uword aux_uword; //!< storage of auxiliary data, uword format }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Glue_meat.hpp ================================================ // Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Glue //! @{ template inline Glue::Glue(const T1& in_A, const T2& in_B) : A(in_A) , B(in_B) { arma_extra_debug_sigprint(); } template inline Glue::Glue(const T1& in_A, const T2& in_B, const uword in_aux_uword) : A(in_A) , B(in_B) , aux_uword(in_aux_uword) { arma_extra_debug_sigprint(); } template inline Glue::~Glue() { arma_extra_debug_sigprint(); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Mat_bones.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // Copyright (C) 2012-2014 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Mat //! @{ //! Dense matrix class template class Mat : public Base< eT, Mat > { public: typedef eT elem_type; //!< the type of elements stored in the matrix typedef typename get_pod_type::result pod_type; //!< if eT is non-complex, pod_type is same as eT. otherwise, pod_type is the underlying type used by std::complex const uword n_rows; //!< number of rows in the matrix (read-only) const uword n_cols; //!< number of columns in the matrix (read-only) const uword n_elem; //!< number of elements in the matrix (read-only) const uhword vec_state; //!< 0: matrix layout; 1: column vector layout; 2: row vector layout const uhword mem_state; // mem_state = 0: normal matrix that can be resized; // mem_state = 1: use auxiliary memory until change in the number of elements is requested; // mem_state = 2: use auxiliary memory and don't allow the number of elements to be changed; // mem_state = 3: fixed size (e.g. via template based size specification). arma_aligned const eT* const mem; //!< pointer to the memory used by the matrix (memory is read-only) protected: arma_align_mem eT mem_local[ arma_config::mat_prealloc ]; public: static const bool is_col = false; static const bool is_row = false; inline ~Mat(); inline Mat(); inline Mat(const uword in_rows, const uword in_cols); template inline Mat(const uword in_rows, const uword in_cols, const fill::fill_class& f); inline Mat(const char* text); inline const Mat& operator=(const char* text); inline Mat(const std::string& text); inline const Mat& operator=(const std::string& text); inline Mat(const std::vector& x); inline const Mat& operator=(const std::vector& x); #if defined(ARMA_USE_CXX11) inline Mat(const std::initializer_list& list); inline const Mat& operator=(const std::initializer_list& list); inline Mat(const std::initializer_list< std::initializer_list >& list); inline const Mat& operator=(const std::initializer_list< std::initializer_list >& list); inline Mat(Mat&& m); inline const Mat& operator=(Mat&& m); #endif inline Mat( eT* aux_mem, const uword aux_n_rows, const uword aux_n_cols, const bool copy_aux_mem = true, const bool strict = true); inline Mat(const eT* aux_mem, const uword aux_n_rows, const uword aux_n_cols); arma_inline const Mat& operator=(const eT val); arma_inline const Mat& operator+=(const eT val); arma_inline const Mat& operator-=(const eT val); arma_inline const Mat& operator*=(const eT val); arma_inline const Mat& operator/=(const eT val); inline Mat(const Mat& m); inline const Mat& operator=(const Mat& m); inline const Mat& operator+=(const Mat& m); inline const Mat& operator-=(const Mat& m); inline const Mat& operator*=(const Mat& m); inline const Mat& operator%=(const Mat& m); inline const Mat& operator/=(const Mat& m); template inline Mat(const BaseCube& X); template inline const Mat& operator=(const BaseCube& X); template inline const Mat& operator+=(const BaseCube& X); template inline const Mat& operator-=(const BaseCube& X); template inline const Mat& operator*=(const BaseCube& X); template inline const Mat& operator%=(const BaseCube& X); template inline const Mat& operator/=(const BaseCube& X); template inline explicit Mat(const Base& A, const Base& B); inline Mat(const subview& X); inline const Mat& operator=(const subview& X); inline const Mat& operator+=(const subview& X); inline const Mat& operator-=(const subview& X); inline const Mat& operator*=(const subview& X); inline const Mat& operator%=(const subview& X); inline const Mat& operator/=(const subview& X); inline Mat(const subview_row_strans& X); // subview_row_strans can only be generated by the Proxy class inline Mat(const subview_row_htrans& X); // subview_row_htrans can only be generated by the Proxy class inline Mat(const xvec_htrans& X); // xvec_htrans can only be generated by the Proxy class template inline Mat(const xtrans_mat& X); // xtrans_mat can only be generated by the Proxy class inline Mat(const subview_cube& X); inline const Mat& operator=(const subview_cube& X); inline const Mat& operator+=(const subview_cube& X); inline const Mat& operator-=(const subview_cube& X); inline const Mat& operator*=(const subview_cube& X); inline const Mat& operator%=(const subview_cube& X); inline const Mat& operator/=(const subview_cube& X); inline Mat(const diagview& X); inline const Mat& operator=(const diagview& X); inline const Mat& operator+=(const diagview& X); inline const Mat& operator-=(const diagview& X); inline const Mat& operator*=(const diagview& X); inline const Mat& operator%=(const diagview& X); inline const Mat& operator/=(const diagview& X); inline Mat(const spdiagview& X); inline const Mat& operator=(const spdiagview& X); inline const Mat& operator+=(const spdiagview& X); inline const Mat& operator-=(const spdiagview& X); inline const Mat& operator*=(const spdiagview& X); inline const Mat& operator%=(const spdiagview& X); inline const Mat& operator/=(const spdiagview& X); template inline Mat(const subview_elem1& X); template inline const Mat& operator= (const subview_elem1& X); template inline const Mat& operator+=(const subview_elem1& X); template inline const Mat& operator-=(const subview_elem1& X); template inline const Mat& operator*=(const subview_elem1& X); template inline const Mat& operator%=(const subview_elem1& X); template inline const Mat& operator/=(const subview_elem1& X); template inline Mat(const subview_elem2& X); template inline const Mat& operator= (const subview_elem2& X); template inline const Mat& operator+=(const subview_elem2& X); template inline const Mat& operator-=(const subview_elem2& X); template inline const Mat& operator*=(const subview_elem2& X); template inline const Mat& operator%=(const subview_elem2& X); template inline const Mat& operator/=(const subview_elem2& X); // Operators on sparse matrices (and subviews) template inline explicit Mat(const SpBase& m); template inline const Mat& operator=(const SpBase& m); template inline const Mat& operator+=(const SpBase& m); template inline const Mat& operator-=(const SpBase& m); template inline const Mat& operator*=(const SpBase& m); template inline const Mat& operator%=(const SpBase& m); template inline const Mat& operator/=(const SpBase& m); inline mat_injector operator<<(const eT val); inline mat_injector operator<<(const injector_end_of_row<>& x); arma_inline subview_row row(const uword row_num); arma_inline const subview_row row(const uword row_num) const; inline subview_row operator()(const uword row_num, const span& col_span); inline const subview_row operator()(const uword row_num, const span& col_span) const; arma_inline subview_col col(const uword col_num); arma_inline const subview_col col(const uword col_num) const; inline subview_col operator()(const span& row_span, const uword col_num); inline const subview_col operator()(const span& row_span, const uword col_num) const; inline Col unsafe_col(const uword col_num); inline const Col unsafe_col(const uword col_num) const; arma_inline subview rows(const uword in_row1, const uword in_row2); arma_inline const subview rows(const uword in_row1, const uword in_row2) const; arma_inline subview cols(const uword in_col1, const uword in_col2); arma_inline const subview cols(const uword in_col1, const uword in_col2) const; inline subview rows(const span& row_span); inline const subview rows(const span& row_span) const; arma_inline subview cols(const span& col_span); arma_inline const subview cols(const span& col_span) const; arma_inline subview submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2); arma_inline const subview submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) const; arma_inline subview submat(const uword in_row1, const uword in_col1, const SizeMat& s); arma_inline const subview submat(const uword in_row1, const uword in_col1, const SizeMat& s) const; inline subview submat (const span& row_span, const span& col_span); inline const subview submat (const span& row_span, const span& col_span) const; inline subview operator()(const span& row_span, const span& col_span); inline const subview operator()(const span& row_span, const span& col_span) const; inline subview operator()(const uword in_row1, const uword in_col1, const SizeMat& s); inline const subview operator()(const uword in_row1, const uword in_col1, const SizeMat& s) const; inline subview head_rows(const uword N); inline const subview head_rows(const uword N) const; inline subview tail_rows(const uword N); inline const subview tail_rows(const uword N) const; inline subview head_cols(const uword N); inline const subview head_cols(const uword N) const; inline subview tail_cols(const uword N); inline const subview tail_cols(const uword N) const; template arma_inline subview_elem1 elem(const Base& a); template arma_inline const subview_elem1 elem(const Base& a) const; template arma_inline subview_elem1 operator()(const Base& a); template arma_inline const subview_elem1 operator()(const Base& a) const; template arma_inline subview_elem2 elem(const Base& ri, const Base& ci); template arma_inline const subview_elem2 elem(const Base& ri, const Base& ci) const; template arma_inline subview_elem2 submat(const Base& ri, const Base& ci); template arma_inline const subview_elem2 submat(const Base& ri, const Base& ci) const; template arma_inline subview_elem2 operator()(const Base& ri, const Base& ci); template arma_inline const subview_elem2 operator()(const Base& ri, const Base& ci) const; template arma_inline subview_elem2 rows(const Base& ri); template arma_inline const subview_elem2 rows(const Base& ri) const; template arma_inline subview_elem2 cols(const Base& ci); template arma_inline const subview_elem2 cols(const Base& ci) const; arma_inline subview_each1< Mat, 0 > each_col(); arma_inline subview_each1< Mat, 1 > each_row(); template inline subview_each2< Mat, 0, T1 > each_col(const Base& indices); template inline subview_each2< Mat, 1, T1 > each_row(const Base& indices); arma_inline diagview diag(const sword in_id = 0); arma_inline const diagview diag(const sword in_id = 0) const; inline void swap_rows(const uword in_row1, const uword in_row2); inline void swap_cols(const uword in_col1, const uword in_col2); inline void shed_row(const uword row_num); inline void shed_col(const uword col_num); inline void shed_rows(const uword in_row1, const uword in_row2); inline void shed_cols(const uword in_col1, const uword in_col2); inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero = true); inline void insert_cols(const uword col_num, const uword N, const bool set_to_zero = true); template inline void insert_rows(const uword row_num, const Base& X); template inline void insert_cols(const uword col_num, const Base& X); template inline Mat(const Gen& X); template inline const Mat& operator=(const Gen& X); template inline const Mat& operator+=(const Gen& X); template inline const Mat& operator-=(const Gen& X); template inline const Mat& operator*=(const Gen& X); template inline const Mat& operator%=(const Gen& X); template inline const Mat& operator/=(const Gen& X); template inline Mat(const Op& X); template inline const Mat& operator=(const Op& X); template inline const Mat& operator+=(const Op& X); template inline const Mat& operator-=(const Op& X); template inline const Mat& operator*=(const Op& X); template inline const Mat& operator%=(const Op& X); template inline const Mat& operator/=(const Op& X); template inline Mat(const eOp& X); template inline const Mat& operator=(const eOp& X); template inline const Mat& operator+=(const eOp& X); template inline const Mat& operator-=(const eOp& X); template inline const Mat& operator*=(const eOp& X); template inline const Mat& operator%=(const eOp& X); template inline const Mat& operator/=(const eOp& X); template inline Mat(const mtOp& X); template inline const Mat& operator=(const mtOp& X); template inline const Mat& operator+=(const mtOp& X); template inline const Mat& operator-=(const mtOp& X); template inline const Mat& operator*=(const mtOp& X); template inline const Mat& operator%=(const mtOp& X); template inline const Mat& operator/=(const mtOp& X); template inline Mat(const Glue& X); template inline const Mat& operator=(const Glue& X); template inline const Mat& operator+=(const Glue& X); template inline const Mat& operator-=(const Glue& X); template inline const Mat& operator*=(const Glue& X); template inline const Mat& operator%=(const Glue& X); template inline const Mat& operator/=(const Glue& X); template inline const Mat& operator+=(const Glue& X); template inline const Mat& operator-=(const Glue& X); template inline Mat(const eGlue& X); template inline const Mat& operator=(const eGlue& X); template inline const Mat& operator+=(const eGlue& X); template inline const Mat& operator-=(const eGlue& X); template inline const Mat& operator*=(const eGlue& X); template inline const Mat& operator%=(const eGlue& X); template inline const Mat& operator/=(const eGlue& X); template inline Mat(const mtGlue& X); template inline const Mat& operator=(const mtGlue& X); template inline const Mat& operator+=(const mtGlue& X); template inline const Mat& operator-=(const mtGlue& X); template inline const Mat& operator*=(const mtGlue& X); template inline const Mat& operator%=(const mtGlue& X); template inline const Mat& operator/=(const mtGlue& X); arma_inline arma_warn_unused const eT& at_alt (const uword ii) const; arma_inline arma_warn_unused eT& operator[] (const uword ii); arma_inline arma_warn_unused const eT& operator[] (const uword ii) const; arma_inline arma_warn_unused eT& at (const uword ii); arma_inline arma_warn_unused const eT& at (const uword ii) const; arma_inline arma_warn_unused eT& operator() (const uword ii); arma_inline arma_warn_unused const eT& operator() (const uword ii) const; arma_inline arma_warn_unused eT& at (const uword in_row, const uword in_col); arma_inline arma_warn_unused const eT& at (const uword in_row, const uword in_col) const; arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col); arma_inline arma_warn_unused const eT& operator() (const uword in_row, const uword in_col) const; arma_inline const Mat& operator++(); arma_inline void operator++(int); arma_inline const Mat& operator--(); arma_inline void operator--(int); arma_inline arma_warn_unused bool is_empty() const; arma_inline arma_warn_unused bool is_vec() const; arma_inline arma_warn_unused bool is_rowvec() const; arma_inline arma_warn_unused bool is_colvec() const; arma_inline arma_warn_unused bool is_square() const; inline arma_warn_unused bool is_finite() const; inline arma_warn_unused bool has_inf() const; inline arma_warn_unused bool has_nan() const; inline arma_warn_unused bool is_sorted(const char* direction = "ascend") const; inline arma_warn_unused bool is_sorted(const char* direction, const uword dim) const; arma_inline arma_warn_unused bool in_range(const uword ii) const; arma_inline arma_warn_unused bool in_range(const span& x ) const; arma_inline arma_warn_unused bool in_range(const uword in_row, const uword in_col) const; arma_inline arma_warn_unused bool in_range(const span& row_span, const uword in_col) const; arma_inline arma_warn_unused bool in_range(const uword in_row, const span& col_span) const; arma_inline arma_warn_unused bool in_range(const span& row_span, const span& col_span) const; arma_inline arma_warn_unused bool in_range(const uword in_row, const uword in_col, const SizeMat& s) const; arma_inline arma_warn_unused eT* colptr(const uword in_col); arma_inline arma_warn_unused const eT* colptr(const uword in_col) const; arma_inline arma_warn_unused eT* memptr(); arma_inline arma_warn_unused const eT* memptr() const; inline void impl_print(const std::string& extra_text) const; inline void impl_print(std::ostream& user_stream, const std::string& extra_text) const; inline void impl_raw_print(const std::string& extra_text) const; inline void impl_raw_print(std::ostream& user_stream, const std::string& extra_text) const; template inline void copy_size(const Base& X); inline void set_size(const uword in_elem); inline void set_size(const uword in_rows, const uword in_cols); inline void resize(const uword in_elem); inline void resize(const uword in_rows, const uword in_cols); inline void reshape(const uword in_rows, const uword in_cols); inline void reshape(const uword in_rows, const uword in_cols, const uword dim); template inline const Mat& transform(functor F); template inline const Mat& imbue(functor F); arma_hot inline const Mat& fill(const eT val); template arma_hot inline const Mat& fill(const fill::fill_class& f); inline const Mat& zeros(); inline const Mat& zeros(const uword in_elem); inline const Mat& zeros(const uword in_rows, const uword in_cols); inline const Mat& ones(); inline const Mat& ones(const uword in_elem); inline const Mat& ones(const uword in_rows, const uword in_cols); inline const Mat& randu(); inline const Mat& randu(const uword in_elem); inline const Mat& randu(const uword in_rows, const uword in_cols); inline const Mat& randn(); inline const Mat& randn(const uword in_elem); inline const Mat& randn(const uword in_rows, const uword in_cols); inline const Mat& eye(); inline const Mat& eye(const uword in_rows, const uword in_cols); inline void reset(); template inline void set_real(const Base& X); template inline void set_imag(const Base& X); inline arma_warn_unused eT min() const; inline arma_warn_unused eT max() const; inline eT min(uword& index_of_min_val) const; inline eT max(uword& index_of_max_val) const; inline eT min(uword& row_of_min_val, uword& col_of_min_val) const; inline eT max(uword& row_of_max_val, uword& col_of_max_val) const; inline bool save(const std::string name, const file_type type = arma_binary, const bool print_status = true) const; inline bool save( std::ostream& os, const file_type type = arma_binary, const bool print_status = true) const; inline bool load(const std::string name, const file_type type = auto_detect, const bool print_status = true); inline bool load( std::istream& is, const file_type type = auto_detect, const bool print_status = true); inline bool quiet_save(const std::string name, const file_type type = arma_binary) const; inline bool quiet_save( std::ostream& os, const file_type type = arma_binary) const; inline bool quiet_load(const std::string name, const file_type type = auto_detect); inline bool quiet_load( std::istream& is, const file_type type = auto_detect); // for container-like functionality typedef eT value_type; typedef uword size_type; typedef eT* iterator; typedef const eT* const_iterator; typedef eT* col_iterator; typedef const eT* const_col_iterator; class row_iterator { public: inline row_iterator(Mat& in_M, const uword in_row); inline eT& operator* (); inline row_iterator& operator++(); inline void operator++(int); inline row_iterator& operator--(); inline void operator--(int); inline bool operator!=(const row_iterator& X) const; inline bool operator==(const row_iterator& X) const; arma_aligned Mat& M; arma_aligned uword row; arma_aligned uword col; }; class const_row_iterator { public: const_row_iterator(const Mat& in_M, const uword in_row); const_row_iterator(const row_iterator& X); inline eT operator*() const; inline const_row_iterator& operator++(); inline void operator++(int); inline const_row_iterator& operator--(); inline void operator--(int); inline bool operator!=(const const_row_iterator& X) const; inline bool operator==(const const_row_iterator& X) const; arma_aligned const Mat& M; arma_aligned uword row; arma_aligned uword col; }; class const_row_col_iterator; class row_col_iterator { public: inline row_col_iterator(); inline row_col_iterator(const row_col_iterator& in_it); inline row_col_iterator(Mat& in_M, const uword row = 0, const uword col = 0); inline arma_hot eT& operator*(); inline arma_hot row_col_iterator& operator++(); inline arma_hot row_col_iterator operator++(int); inline arma_hot row_col_iterator& operator--(); inline arma_hot row_col_iterator operator--(int); inline uword row() const; inline uword col() const; inline arma_hot bool operator==(const row_col_iterator& rhs) const; inline arma_hot bool operator!=(const row_col_iterator& rhs) const; inline arma_hot bool operator==(const const_row_col_iterator& rhs) const; inline arma_hot bool operator!=(const const_row_col_iterator& rhs) const; // So that we satisfy the STL iterator types. typedef std::bidirectional_iterator_tag iterator_category; typedef eT value_type; typedef uword difference_type; // not certain on this one typedef const eT* pointer; typedef const eT& reference; arma_aligned Mat* M; arma_aligned eT* current_pos; arma_aligned uword internal_col; arma_aligned uword internal_row; }; class const_row_col_iterator { public: inline const_row_col_iterator(); inline const_row_col_iterator(const row_col_iterator& in_it); inline const_row_col_iterator(const const_row_col_iterator& in_it); inline const_row_col_iterator(const Mat& in_M, const uword row = 0, const uword col = 0); inline arma_hot const eT& operator*() const; inline arma_hot const_row_col_iterator& operator++(); inline arma_hot const_row_col_iterator operator++(int); inline arma_hot const_row_col_iterator& operator--(); inline arma_hot const_row_col_iterator operator--(int); inline uword row() const; inline uword col() const; inline arma_hot bool operator==(const const_row_col_iterator& rhs) const; inline arma_hot bool operator!=(const const_row_col_iterator& rhs) const; inline arma_hot bool operator==(const row_col_iterator& rhs) const; inline arma_hot bool operator!=(const row_col_iterator& rhs) const; // So that we satisfy the STL iterator types. typedef std::bidirectional_iterator_tag iterator_category; typedef eT value_type; typedef uword difference_type; // not certain on this one typedef const eT* pointer; typedef const eT& reference; arma_aligned const Mat* M; arma_aligned const eT* current_pos; arma_aligned uword internal_col; arma_aligned uword internal_row; }; inline iterator begin(); inline const_iterator begin() const; inline const_iterator cbegin() const; inline iterator end(); inline const_iterator end() const; inline const_iterator cend() const; inline col_iterator begin_col(const uword col_num); inline const_col_iterator begin_col(const uword col_num) const; inline col_iterator end_col (const uword col_num); inline const_col_iterator end_col (const uword col_num) const; inline row_iterator begin_row(const uword row_num); inline const_row_iterator begin_row(const uword row_num) const; inline row_iterator end_row (const uword row_num); inline const_row_iterator end_row (const uword row_num) const; inline row_col_iterator begin_row_col(); inline const_row_col_iterator begin_row_col() const; inline row_col_iterator end_row_col(); inline const_row_col_iterator end_row_col() const; inline void clear(); inline bool empty() const; inline uword size() const; inline void swap(Mat& B); inline void steal_mem(Mat& X); //!< don't use this unless you're writing code internal to Armadillo inline void steal_mem_col(Mat& X, const uword max_n_rows); template class fixed; protected: inline void init_cold(); inline void init_warm(uword in_rows, uword in_cols); inline void init(const std::string& text); #if defined(ARMA_USE_CXX11) inline void init(const std::initializer_list& list); inline void init(const std::initializer_list< std::initializer_list >& list); #endif template inline void init(const Base& A, const Base& B); inline Mat(const char junk, const eT* aux_mem, const uword aux_n_rows, const uword aux_n_cols); inline Mat(const arma_vec_indicator&, const uhword in_vec_state); inline Mat(const arma_vec_indicator&, const uword in_n_rows, const uword in_n_cols, const uhword in_vec_state); inline Mat(const arma_fixed_indicator&, const uword in_n_rows, const uword in_n_cols, const uhword in_vec_state, const eT* in_mem); friend class Cube; friend class glue_join; friend class op_strans; friend class op_htrans; friend class op_resize; public: #ifdef ARMA_EXTRA_MAT_PROTO #include ARMA_INCFILE_WRAP(ARMA_EXTRA_MAT_PROTO) #endif }; template template class Mat::fixed : public Mat { private: static const uword fixed_n_elem = fixed_n_rows * fixed_n_cols; static const bool use_extra = (fixed_n_elem > arma_config::mat_prealloc); arma_align_mem eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ]; public: typedef fixed Mat_fixed_type; typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_col = (fixed_n_cols == 1) ? true : false; static const bool is_row = (fixed_n_rows == 1) ? true : false; static const uword n_rows = fixed_n_rows; static const uword n_cols = fixed_n_cols; static const uword n_elem = fixed_n_elem; arma_inline fixed(); arma_inline fixed(const fixed& X); template inline fixed(const fill::fill_class& f); template inline fixed(const Base& A); template inline fixed(const Base& A, const Base& B); inline fixed(const eT* aux_mem); inline fixed(const char* text); inline fixed(const std::string& text); using Mat::operator=; using Mat::operator(); #if defined(ARMA_USE_CXX11) inline fixed(const std::initializer_list& list); inline const Mat& operator=(const std::initializer_list& list); inline fixed(const std::initializer_list< std::initializer_list >& list); inline const Mat& operator=(const std::initializer_list< std::initializer_list >& list); #endif arma_inline const Mat& operator=(const fixed& X); #if defined(ARMA_GOOD_COMPILER) template inline const Mat& operator=(const eOp& X); template inline const Mat& operator=(const eGlue& X); #endif arma_inline const Op< Mat_fixed_type, op_htrans > t() const; arma_inline const Op< Mat_fixed_type, op_htrans > ht() const; arma_inline const Op< Mat_fixed_type, op_strans > st() const; arma_inline arma_warn_unused const eT& at_alt (const uword i) const; arma_inline arma_warn_unused eT& operator[] (const uword i); arma_inline arma_warn_unused const eT& operator[] (const uword i) const; arma_inline arma_warn_unused eT& at (const uword i); arma_inline arma_warn_unused const eT& at (const uword i) const; arma_inline arma_warn_unused eT& operator() (const uword i); arma_inline arma_warn_unused const eT& operator() (const uword i) const; arma_inline arma_warn_unused eT& at (const uword in_row, const uword in_col); arma_inline arma_warn_unused const eT& at (const uword in_row, const uword in_col) const; arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col); arma_inline arma_warn_unused const eT& operator() (const uword in_row, const uword in_col) const; arma_inline arma_warn_unused eT* colptr(const uword in_col); arma_inline arma_warn_unused const eT* colptr(const uword in_col) const; arma_inline arma_warn_unused eT* memptr(); arma_inline arma_warn_unused const eT* memptr() const; arma_inline arma_warn_unused bool is_vec() const; arma_hot inline const Mat& fill(const eT val); arma_hot inline const Mat& zeros(); arma_hot inline const Mat& ones(); }; class Mat_aux { public: template arma_inline static void prefix_pp(Mat& x); template arma_inline static void prefix_pp(Mat< std::complex >& x); template arma_inline static void postfix_pp(Mat& x); template arma_inline static void postfix_pp(Mat< std::complex >& x); template arma_inline static void prefix_mm(Mat& x); template arma_inline static void prefix_mm(Mat< std::complex >& x); template arma_inline static void postfix_mm(Mat& x); template arma_inline static void postfix_mm(Mat< std::complex >& x); template inline static void set_real(Mat& out, const Base& X); template inline static void set_real(Mat< std::complex >& out, const Base< T,T1>& X); template inline static void set_imag(Mat& out, const Base& X); template inline static void set_imag(Mat< std::complex >& out, const Base< T,T1>& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Mat_meat.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // Copyright (C) 2012-2014 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Mat //! @{ template inline Mat::~Mat() { arma_extra_debug_sigprint_this(this); if(mem_state == 0) { if(n_elem > arma_config::mat_prealloc) { memory::release( access::rw(mem) ); } } if(arma_config::debug == true) { // try to expose buggy user code that accesses deleted objects access::rw(mem) = 0; } arma_type_check(( is_supported_elem_type::value == false )); } template inline Mat::Mat() : n_rows(0) , n_cols(0) , n_elem(0) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); } //! construct the matrix to have user specified dimensions template inline Mat::Mat(const uword in_n_rows, const uword in_n_cols) : n_rows(in_n_rows) , n_cols(in_n_cols) , n_elem(in_n_rows*in_n_cols) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); } //! construct the matrix to have user specified dimensions and fill with specified pattern template template inline Mat::Mat(const uword in_n_rows, const uword in_n_cols, const fill::fill_class& f) : n_rows(in_n_rows) , n_cols(in_n_cols) , n_elem(in_n_rows*in_n_cols) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); (*this).fill(f); } //! constructor used by Row and Col classes template inline Mat::Mat(const arma_vec_indicator&, const uhword in_vec_state) : n_rows( (in_vec_state == 2) ? 1 : 0 ) , n_cols( (in_vec_state == 1) ? 1 : 0 ) , n_elem(0) , vec_state(in_vec_state) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); } //! constructor used by Row and Col classes template inline Mat::Mat(const arma_vec_indicator&, const uword in_n_rows, const uword in_n_cols, const uhword in_vec_state) : n_rows(in_n_rows) , n_cols(in_n_cols) , n_elem(in_n_rows*in_n_cols) , vec_state(in_vec_state) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); } template inline Mat::Mat(const arma_fixed_indicator&, const uword in_n_rows, const uword in_n_cols, const uhword in_vec_state, const eT* in_mem) : n_rows (in_n_rows) , n_cols (in_n_cols) , n_elem (in_n_rows*in_n_cols) , vec_state (in_vec_state) , mem_state (3) , mem (in_mem) { arma_extra_debug_sigprint_this(this); } template inline void Mat::init_cold() { arma_extra_debug_sigprint( arma_boost::format("n_rows = %d, n_cols = %d") % n_rows % n_cols ); // ensure that n_elem can hold the result of (n_rows * n_cols) #if (defined(ARMA_USE_CXX11) || defined(ARMA_64BIT_WORD)) const char* error_message = "Mat::init(): requested size is too large"; #else const char* error_message = "Mat::init(): requested size is too large; suggest to compile in C++11 mode or enable ARMA_64BIT_WORD"; #endif arma_debug_check ( ( ( (n_rows > ARMA_MAX_UHWORD) || (n_cols > ARMA_MAX_UHWORD) ) ? ( (double(n_rows) * double(n_cols)) > double(ARMA_MAX_UWORD) ) : false ), error_message ); if(n_elem <= arma_config::mat_prealloc) { arma_extra_debug_print("Mat::init(): using local memory"); access::rw(mem) = mem_local; } else { arma_extra_debug_print("Mat::init(): allocating memory"); access::rw(mem) = memory::acquire(n_elem); } } //! internal matrix construction; if the requested size is small enough, memory from the stack is used. otherwise memory is allocated via 'new' template inline void Mat::init_warm(uword in_n_rows, uword in_n_cols) { arma_extra_debug_sigprint( arma_boost::format("in_n_rows = %d, in_n_cols = %d") % in_n_rows % in_n_cols ); if( (n_rows == in_n_rows) && (n_cols == in_n_cols) ) { return; } bool err_state = false; char* err_msg = 0; const uhword t_vec_state = vec_state; const uhword t_mem_state = mem_state; arma_debug_set_error ( err_state, err_msg, (t_mem_state == 3), "Mat::init(): size is fixed and hence cannot be changed" ); if(t_vec_state > 0) { if( (in_n_rows == 0) && (in_n_cols == 0) ) { if(t_vec_state == 1) { in_n_cols = 1; } else if(t_vec_state == 2) { in_n_rows = 1; } } else { if(t_vec_state == 1) { arma_debug_set_error ( err_state, err_msg, (in_n_cols != 1), "Mat::init(): requested size is not compatible with column vector layout" ); } else if(t_vec_state == 2) { arma_debug_set_error ( err_state, err_msg, (in_n_rows != 1), "Mat::init(): requested size is not compatible with row vector layout" ); } } } // ensure that n_elem can hold the result of (n_rows * n_cols) #if (defined(ARMA_USE_CXX11) || defined(ARMA_64BIT_WORD)) const char* error_message = "Mat::init(): requested size is too large"; #else const char* error_message = "Mat::init(): requested size is too large; suggest to compile in C++11 mode or enable ARMA_64BIT_WORD"; #endif arma_debug_set_error ( err_state, err_msg, ( ( (in_n_rows > ARMA_MAX_UHWORD) || (in_n_cols > ARMA_MAX_UHWORD) ) ? ( (double(in_n_rows) * double(in_n_cols)) > double(ARMA_MAX_UWORD) ) : false ), error_message ); arma_debug_check(err_state, err_msg); const uword old_n_elem = n_elem; const uword new_n_elem = in_n_rows * in_n_cols; if(old_n_elem == new_n_elem) { arma_extra_debug_print("Mat::init(): reusing memory"); access::rw(n_rows) = in_n_rows; access::rw(n_cols) = in_n_cols; } else { arma_debug_check ( (t_mem_state == 2), "Mat::init(): mismatch between size of auxiliary memory and requested size" ); if(t_mem_state == 0) { if(old_n_elem > arma_config::mat_prealloc) { arma_extra_debug_print("Mat::init(): freeing memory"); memory::release( access::rw(mem) ); } } if(new_n_elem <= arma_config::mat_prealloc) { arma_extra_debug_print("Mat::init(): using local memory"); access::rw(mem) = mem_local; } else { arma_extra_debug_print("Mat::init(): allocating memory"); access::rw(mem) = memory::acquire(new_n_elem); } access::rw(n_rows) = in_n_rows; access::rw(n_cols) = in_n_cols; access::rw(n_elem) = new_n_elem; access::rw(mem_state) = 0; } } //! create the matrix from a textual description template inline Mat::Mat(const char* text) : n_rows(0) , n_cols(0) , n_elem(0) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init( std::string(text) ); } //! create the matrix from a textual description template inline const Mat& Mat::operator=(const char* text) { arma_extra_debug_sigprint(); init( std::string(text) ); return *this; } //! create the matrix from a textual description template inline Mat::Mat(const std::string& text) : n_rows(0) , n_cols(0) , n_elem(0) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init(text); } //! create the matrix from a textual description template inline const Mat& Mat::operator=(const std::string& text) { arma_extra_debug_sigprint(); init(text); return *this; } //! internal function to create the matrix from a textual description template inline void Mat::init(const std::string& text_orig) { arma_extra_debug_sigprint(); const bool replace_commas = (is_cx::yes) ? false : ( text_orig.find(',') != std::string::npos ); std::string text_mod; if(replace_commas) { text_mod = text_orig; std::replace(text_mod.begin(), text_mod.end(), ',', ' '); } const std::string& text = (replace_commas) ? text_mod : text_orig; // // work out the size uword t_n_rows = 0; uword t_n_cols = 0; bool t_n_cols_found = false; std::string token; std::string::size_type line_start = 0; std::string::size_type line_end = 0; std::stringstream line_stream; while( line_start < text.length() ) { line_end = text.find(';', line_start); if(line_end == std::string::npos) { line_end = text.length()-1; } std::string::size_type line_len = line_end - line_start + 1; line_stream.clear(); line_stream.str( text.substr(line_start,line_len) ); uword line_n_cols = 0; while(line_stream >> token) { ++line_n_cols; } if(line_n_cols > 0) { if(t_n_cols_found == false) { t_n_cols = line_n_cols; t_n_cols_found = true; } else { arma_check( (line_n_cols != t_n_cols), "Mat::init(): inconsistent number of columns in given string"); } ++t_n_rows; } line_start = line_end+1; } Mat& x = *this; x.set_size(t_n_rows, t_n_cols); line_start = 0; line_end = 0; uword urow = 0; while( line_start < text.length() ) { line_end = text.find(';', line_start); if(line_end == std::string::npos) { line_end = text.length()-1; } std::string::size_type line_len = line_end - line_start + 1; line_stream.clear(); line_stream.str( text.substr(line_start,line_len) ); // uword ucol = 0; // while(line_stream >> token) // { // x.at(urow,ucol) = strtod(token.c_str(), 0); // ++ucol; // } uword ucol = 0; eT val; while(line_stream >> val) { x(urow,ucol) = val; ++ucol; } ++urow; line_start = line_end+1; } } //! create the matrix from std::vector template inline Mat::Mat(const std::vector& x) : n_rows(uword(x.size())) , n_cols(1) , n_elem(uword(x.size())) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); if(n_elem > 0) { arrayops::copy( memptr(), &(x[0]), n_elem ); } } //! create the matrix from std::vector template inline const Mat& Mat::operator=(const std::vector& x) { arma_extra_debug_sigprint(); init_warm(uword(x.size()), 1); if(x.size() > 0) { arrayops::copy( memptr(), &(x[0]), uword(x.size()) ); } return *this; } #if defined(ARMA_USE_CXX11) template inline Mat::Mat(const std::initializer_list& list) : n_rows(0) , n_cols(0) , n_elem(0) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init(list); } template inline const Mat& Mat::operator=(const std::initializer_list& list) { arma_extra_debug_sigprint(); init(list); return *this; } template inline Mat::Mat(const std::initializer_list< std::initializer_list >& list) : n_rows(0) , n_cols(0) , n_elem(0) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init(list); } template inline const Mat& Mat::operator=(const std::initializer_list< std::initializer_list >& list) { arma_extra_debug_sigprint(); init(list); return *this; } template inline Mat::Mat(Mat&& X) : n_rows (X.n_rows) , n_cols (X.n_cols) , n_elem (X.n_elem) , vec_state(0 ) , mem_state(0 ) , mem ( ) { arma_extra_debug_sigprint(arma_boost::format("this = %x X = %x") % this % &X); if( ((X.mem_state == 0) && (X.n_elem > arma_config::mat_prealloc)) || (X.mem_state == 1) || (X.mem_state == 2) ) { access::rw(mem_state) = X.mem_state; access::rw(mem) = X.mem; access::rw(X.n_rows) = 0; access::rw(X.n_cols) = 0; access::rw(X.n_elem) = 0; access::rw(X.mem_state) = 0; access::rw(X.mem) = 0; } else { init_cold(); arrayops::copy( memptr(), X.mem, X.n_elem ); if( (X.mem_state == 0) && (X.n_elem <= arma_config::mat_prealloc) ) { access::rw(X.n_rows) = 0; access::rw(X.n_cols) = 0; access::rw(X.n_elem) = 0; access::rw(X.mem) = 0; } } } template inline const Mat& Mat::operator=(Mat&& X) { arma_extra_debug_sigprint(arma_boost::format("this = %x X = %x") % this % &X); (*this).steal_mem(X); if( (X.mem_state == 0) && (X.n_elem <= arma_config::mat_prealloc) && (this != &X) ) { access::rw(X.n_rows) = 0; access::rw(X.n_cols) = 0; access::rw(X.n_elem) = 0; access::rw(X.mem) = 0; } return *this; } #endif //! Set the matrix to be equal to the specified scalar. //! NOTE: the size of the matrix will be 1x1 template arma_inline const Mat& Mat::operator=(const eT val) { arma_extra_debug_sigprint(); init_warm(1,1); access::rw(mem[0]) = val; return *this; } //! In-place addition of a scalar to all elements of the matrix template arma_inline const Mat& Mat::operator+=(const eT val) { arma_extra_debug_sigprint(); arrayops::inplace_plus( memptr(), val, n_elem ); return *this; } //! In-place subtraction of a scalar from all elements of the matrix template arma_inline const Mat& Mat::operator-=(const eT val) { arma_extra_debug_sigprint(); arrayops::inplace_minus( memptr(), val, n_elem ); return *this; } //! In-place multiplication of all elements of the matrix with a scalar template arma_inline const Mat& Mat::operator*=(const eT val) { arma_extra_debug_sigprint(); arrayops::inplace_mul( memptr(), val, n_elem ); return *this; } //! In-place division of all elements of the matrix with a scalar template arma_inline const Mat& Mat::operator/=(const eT val) { arma_extra_debug_sigprint(); arrayops::inplace_div( memptr(), val, n_elem ); return *this; } //! construct a matrix from a given matrix template inline Mat::Mat(const Mat& in_mat) : n_rows(in_mat.n_rows) , n_cols(in_mat.n_cols) , n_elem(in_mat.n_elem) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint(arma_boost::format("this = %x in_mat = %x") % this % &in_mat); init_cold(); arrayops::copy( memptr(), in_mat.mem, in_mat.n_elem ); } //! construct a matrix from a given matrix template inline const Mat& Mat::operator=(const Mat& in_mat) { arma_extra_debug_sigprint(arma_boost::format("this = %x in_mat = %x") % this % &in_mat); if(this != &in_mat) { init_warm(in_mat.n_rows, in_mat.n_cols); arrayops::copy( memptr(), in_mat.mem, in_mat.n_elem ); } return *this; } #if defined(ARMA_USE_CXX11) template inline void Mat::init(const std::initializer_list& list) { arma_extra_debug_sigprint(); const uword N = uword(list.size()); set_size(1, N); arrayops::copy( memptr(), list.begin(), N ); } template inline void Mat::init(const std::initializer_list< std::initializer_list >& list) { arma_extra_debug_sigprint(); uword x_n_rows = uword(list.size()); uword x_n_cols = 0; bool x_n_cols_found = false; auto it = list.begin(); auto it_end = list.end(); for(; it != it_end; ++it) { if(x_n_cols_found == false) { x_n_cols = (*it).size(); x_n_cols_found = true; } else { arma_check( ((*it).size() != x_n_cols), "Mat::init(): inconsistent number of columns in initialiser list" ); } } Mat& t = (*this); if(t.mem_state == 3) { arma_debug_check( ((x_n_rows != t.n_rows) || (x_n_cols != t.n_cols)), "Mat::init(): size mismatch between fixed size matrix and initialiser list" ); } else { t.set_size(x_n_rows, x_n_cols); } uword row_num = 0; auto row_it = list.begin(); auto row_it_end = list.end(); for(; row_it != row_it_end; ++row_it) { uword col_num = 0; auto col_it = (*row_it).begin(); auto col_it_end = (*row_it).end(); for(; col_it != col_it_end; ++col_it) { t.at(row_num, col_num) = (*col_it); ++col_num; } ++row_num; } } #endif //! for constructing a complex matrix out of two non-complex matrices template template inline void Mat::init ( const Base::pod_type, T1>& X, const Base::pod_type, T2>& Y ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type T; arma_type_check(( is_complex::value == false )); //!< compile-time abort if eT is not std::complex arma_type_check(( is_complex< T>::value == true )); //!< compile-time abort if T is std::complex arma_type_check(( is_same_type< std::complex, eT >::no )); //!< compile-time abort if types are not compatible const Proxy PX(X.get_ref()); const Proxy PY(Y.get_ref()); arma_debug_assert_same_size(PX, PY, "Mat()"); const uword local_n_rows = PX.get_n_rows(); const uword local_n_cols = PX.get_n_cols(); init_warm(local_n_rows, local_n_cols); eT* out_mem = (*this).memptr(); const bool prefer_at_accessor = ( Proxy::prefer_at_accessor || Proxy::prefer_at_accessor ); if(prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type1; typedef typename Proxy::ea_type ea_type2; const uword N = n_elem; ea_type1 A = PX.get_ea(); ea_type2 B = PY.get_ea(); for(uword ii=0; ii < N; ++ii) { out_mem[ii] = std::complex(A[ii], B[ii]); } } else { for(uword ucol=0; ucol < local_n_cols; ++ucol) for(uword urow=0; urow < local_n_rows; ++urow) { *out_mem = std::complex(PX.at(urow,ucol), PY.at(urow,ucol)); out_mem++; } } } //! swap the contents of this matrix, denoted as matrix A, with given matrix B template inline void Mat::swap(Mat& B) { Mat& A = (*this); arma_extra_debug_sigprint(arma_boost::format("A = %x B = %x") % &A % &B); bool layout_ok = false; if(A.vec_state == B.vec_state) { layout_ok = true; } else { const uhword A_vec_state = A.vec_state; const uhword B_vec_state = B.vec_state; const bool A_absorbs_B = (A_vec_state == 0) || ( (A_vec_state == 1) && (B.n_cols == 1) ) || ( (A_vec_state == 2) && (B.n_rows == 1) ); const bool B_absorbs_A = (B_vec_state == 0) || ( (B_vec_state == 1) && (A.n_cols == 1) ) || ( (B_vec_state == 2) && (A.n_rows == 1) ); layout_ok = A_absorbs_B && B_absorbs_A; } const uhword A_mem_state = A.mem_state; const uhword B_mem_state = B.mem_state; if( (A_mem_state == 0) && (B_mem_state == 0) && layout_ok ) { const uword A_n_elem = A.n_elem; const uword B_n_elem = B.n_elem; const bool A_use_local_mem = (A_n_elem <= arma_config::mat_prealloc); const bool B_use_local_mem = (B_n_elem <= arma_config::mat_prealloc); if( (A_use_local_mem == false) && (B_use_local_mem == false) ) { std::swap( access::rw(A.mem), access::rw(B.mem) ); } else if( (A_use_local_mem == true) && (B_use_local_mem == true) ) { eT* A_mem_local = &(A.mem_local[0]); eT* B_mem_local = &(B.mem_local[0]); access::rw(A.mem) = A_mem_local; access::rw(B.mem) = B_mem_local; const uword N = (std::max)(A_n_elem, B_n_elem); for(uword ii=0; ii < N; ++ii) { std::swap( A_mem_local[ii], B_mem_local[ii] ); } } else if( (A_use_local_mem == true) && (B_use_local_mem == false) ) { eT* A_mem_local = &(A.mem_local[0]); eT* B_mem_local = &(B.mem_local[0]); arrayops::copy(B_mem_local, A_mem_local, A_n_elem); access::rw(A.mem) = B.mem; access::rw(B.mem) = B_mem_local; } else if( (A_use_local_mem == false) && (B_use_local_mem == true) ) { eT* A_mem_local = &(A.mem_local[0]); eT* B_mem_local = &(B.mem_local[0]); arrayops::copy(A_mem_local, B_mem_local, B_n_elem); access::rw(B.mem) = A.mem; access::rw(A.mem) = A_mem_local; } std::swap( access::rw(A.n_rows), access::rw(B.n_rows) ); std::swap( access::rw(A.n_cols), access::rw(B.n_cols) ); std::swap( access::rw(A.n_elem), access::rw(B.n_elem) ); } else if( (A_mem_state <= 2) && (B_mem_state <= 2) && (A.n_elem == B.n_elem) && layout_ok ) { std::swap( access::rw(A.n_rows), access::rw(B.n_rows) ); std::swap( access::rw(A.n_cols), access::rw(B.n_cols) ); const uword N = A.n_elem; eT* A_mem = A.memptr(); eT* B_mem = B.memptr(); for(uword ii=0; ii < N; ++ii) { std::swap(A_mem[ii], B_mem[ii]); } } else if( (A.n_rows == B.n_rows) && (A.n_cols == B.n_cols) ) { const uword N = A.n_elem; eT* A_mem = A.memptr(); eT* B_mem = B.memptr(); for(uword ii=0; ii < N; ++ii) { std::swap(A_mem[ii], B_mem[ii]); } } else { // generic swap to handle remaining cases if(A.n_elem <= B.n_elem) { Mat C = A; A.steal_mem(B); B.steal_mem(C); } else { Mat C = B; B.steal_mem(A); A.steal_mem(C); } } } //! try to steal the memory from a given matrix; //! if memory can't be stolen, copy the given matrix template inline void Mat::steal_mem(Mat& x) { arma_extra_debug_sigprint(); if(this != &x) { const uword x_n_rows = x.n_rows; const uword x_n_cols = x.n_cols; const uword x_n_elem = x.n_elem; const uhword x_vec_state = x.vec_state; const uhword x_mem_state = x.mem_state; const uhword t_vec_state = vec_state; const uhword t_mem_state = mem_state; bool layout_ok = false; if(t_vec_state == x_vec_state) { layout_ok = true; } else { if( (t_vec_state == 1) && (x_n_cols == 1) ) { layout_ok = true; } if( (t_vec_state == 2) && (x_n_rows == 1) ) { layout_ok = true; } } if( (t_mem_state <= 1) && ( ((x_mem_state == 0) && (x_n_elem > arma_config::mat_prealloc)) || (x_mem_state == 1) ) && layout_ok ) { reset(); access::rw(n_rows) = x_n_rows; access::rw(n_cols) = x_n_cols; access::rw(n_elem) = x_n_elem; access::rw(mem_state) = x_mem_state; access::rw(mem) = x.mem; access::rw(x.n_rows) = 0; access::rw(x.n_cols) = 0; access::rw(x.n_elem) = 0; access::rw(x.mem_state) = 0; access::rw(x.mem) = 0; } else { (*this).operator=(x); } } } template inline void Mat::steal_mem_col(Mat& x, const uword max_n_rows) { arma_extra_debug_sigprint(); const uword x_n_elem = x.n_elem; const uhword x_mem_state = x.mem_state; const uhword t_vec_state = vec_state; const uhword t_mem_state = mem_state; const uword alt_n_rows = (std::min)(x.n_rows, max_n_rows); if((x_n_elem == 0) || (alt_n_rows == 0)) { (*this).set_size(0,1); return; } if( (this != &x) && (t_vec_state <= 1) && (t_mem_state <= 1) && (x_mem_state <= 1) ) { if( (x_mem_state == 0) && ((x_n_elem <= arma_config::mat_prealloc) || (alt_n_rows <= arma_config::mat_prealloc)) ) { (*this).set_size(alt_n_rows, uword(1)); arrayops::copy( (*this).memptr(), x.memptr(), alt_n_rows ); } else { reset(); access::rw(n_rows) = alt_n_rows; access::rw(n_cols) = 1; access::rw(n_elem) = alt_n_rows; access::rw(mem_state) = x_mem_state; access::rw(mem) = x.mem; access::rw(x.n_rows) = 0; access::rw(x.n_cols) = 0; access::rw(x.n_elem) = 0; access::rw(x.mem_state) = 0; access::rw(x.mem) = 0; } } else { Mat tmp(alt_n_rows, 1); arrayops::copy( tmp.memptr(), x.memptr(), alt_n_rows ); steal_mem(tmp); } } //! construct a matrix from a given auxiliary array of eTs. //! if copy_aux_mem is true, new memory is allocated and the array is copied. //! if copy_aux_mem is false, the auxiliary array is used directly (without allocating memory and copying). //! the default is to copy the array. template inline Mat::Mat(eT* aux_mem, const uword aux_n_rows, const uword aux_n_cols, const bool copy_aux_mem, const bool strict) : n_rows ( aux_n_rows ) , n_cols ( aux_n_cols ) , n_elem ( aux_n_rows*aux_n_cols ) , vec_state( 0 ) , mem_state( copy_aux_mem ? 0 : ( strict ? 2 : 1 ) ) , mem ( copy_aux_mem ? 0 : aux_mem ) { arma_extra_debug_sigprint_this(this); if(copy_aux_mem == true) { init_cold(); arrayops::copy( memptr(), aux_mem, n_elem ); } } //! construct a matrix from a given auxiliary read-only array of eTs. //! the array is copied. template inline Mat::Mat(const eT* aux_mem, const uword aux_n_rows, const uword aux_n_cols) : n_rows(aux_n_rows) , n_cols(aux_n_cols) , n_elem(aux_n_rows*aux_n_cols) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); arrayops::copy( memptr(), aux_mem, n_elem ); } //! DANGEROUS! Construct a temporary matrix, using auxiliary memory. //! This constructor is NOT intended for usage by user code. //! Its sole purpose is to be used by the Cube class. template inline Mat::Mat(const char junk, const eT* aux_mem, const uword aux_n_rows, const uword aux_n_cols) : n_rows (aux_n_rows ) , n_cols (aux_n_cols ) , n_elem (aux_n_rows*aux_n_cols) , vec_state(0 ) , mem_state(3 ) , mem (aux_mem ) { arma_extra_debug_sigprint_this(this); arma_ignore(junk); } //! in-place matrix addition template inline const Mat& Mat::operator+=(const Mat& m) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(*this, m, "addition"); arrayops::inplace_plus( memptr(), m.memptr(), n_elem ); return *this; } //! in-place matrix subtraction template inline const Mat& Mat::operator-=(const Mat& m) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(*this, m, "subtraction"); arrayops::inplace_minus( memptr(), m.memptr(), n_elem ); return *this; } //! in-place matrix multiplication template inline const Mat& Mat::operator*=(const Mat& m) { arma_extra_debug_sigprint(); glue_times::apply_inplace(*this, m); return *this; } //! in-place element-wise matrix multiplication template inline const Mat& Mat::operator%=(const Mat& m) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(*this, m, "element-wise multiplication"); arrayops::inplace_mul( memptr(), m.memptr(), n_elem ); return *this; } //! in-place element-wise matrix division template inline const Mat& Mat::operator/=(const Mat& m) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(*this, m, "element-wise division"); arrayops::inplace_div( memptr(), m.memptr(), n_elem ); return *this; } template template inline Mat::Mat(const BaseCube& X) : n_rows(0) , n_cols(0) , n_elem(0) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); (*this).operator=(X); } template template inline const Mat& Mat::operator=(const BaseCube& X) { arma_extra_debug_sigprint(); Mat& out = *this; const unwrap_cube tmp(X.get_ref()); const Cube& in = tmp.M; arma_debug_assert_cube_as_mat(out, in, "copy into matrix", false); const uword in_n_rows = in.n_rows; const uword in_n_cols = in.n_cols; const uword in_n_slices = in.n_slices; const uword out_vec_state = out.vec_state; if(in_n_slices == 1) { out.set_size(in_n_rows, in_n_cols); for(uword ucol=0; ucol < in_n_cols; ++ucol) { arrayops::copy( out.colptr(ucol), in.slice_colptr(0, ucol), in_n_rows ); } } else { if(out_vec_state == 0) { if(in_n_cols == 1) { out.set_size(in_n_rows, in_n_slices); for(uword i=0; i < in_n_slices; ++i) { arrayops::copy( out.colptr(i), in.slice_colptr(i, 0), in_n_rows ); } } else if(in_n_rows == 1) { out.set_size(in_n_cols, in_n_slices); for(uword slice=0; slice < in_n_slices; ++slice) { eT* out_colptr = out.colptr(slice); uword i,j; for(i=0, j=1; j < in_n_cols; i+=2, j+=2) { const eT tmp_i = in.at(0, i, slice); const eT tmp_j = in.at(0, j, slice); out_colptr[i] = tmp_i; out_colptr[j] = tmp_j; } if(i < in_n_cols) { out_colptr[i] = in.at(0, i, slice); } } } } else { out.set_size(in_n_slices); eT* out_mem = out.memptr(); for(uword i=0; i template inline const Mat& Mat::operator+=(const BaseCube& X) { arma_extra_debug_sigprint(); Mat& out = *this; const unwrap_cube tmp(X.get_ref()); const Cube& in = tmp.M; arma_debug_assert_cube_as_mat(out, in, "addition", true); const uword in_n_rows = in.n_rows; const uword in_n_cols = in.n_cols; const uword in_n_slices = in.n_slices; const uword out_n_rows = out.n_rows; const uword out_n_cols = out.n_cols; const uword out_vec_state = out.vec_state; if(in_n_slices == 1) { for(uword ucol=0; ucol < in_n_cols; ++ucol) { arrayops::inplace_plus( out.colptr(ucol), in.slice_colptr(0, ucol), in_n_rows ); } } else { if(out_vec_state == 0) { if( (in_n_rows == out_n_rows) && (in_n_cols == 1) && (in_n_slices == out_n_cols) ) { for(uword i=0; i < in_n_slices; ++i) { arrayops::inplace_plus( out.colptr(i), in.slice_colptr(i, 0), in_n_rows ); } } else if( (in_n_rows == 1) && (in_n_cols == out_n_rows) && (in_n_slices == out_n_cols) ) { for(uword slice=0; slice < in_n_slices; ++slice) { eT* out_colptr = out.colptr(slice); uword i,j; for(i=0, j=1; j < in_n_cols; i+=2, j+=2) { const eT tmp_i = in.at(0, i, slice); const eT tmp_j = in.at(0, j, slice); out_colptr[i] += tmp_i; out_colptr[j] += tmp_j; } if(i < in_n_cols) { out_colptr[i] += in.at(0, i, slice); } } } } else { eT* out_mem = out.memptr(); for(uword i=0; i template inline const Mat& Mat::operator-=(const BaseCube& X) { arma_extra_debug_sigprint(); Mat& out = *this; const unwrap_cube tmp(X.get_ref()); const Cube& in = tmp.M; arma_debug_assert_cube_as_mat(out, in, "subtraction", true); const uword in_n_rows = in.n_rows; const uword in_n_cols = in.n_cols; const uword in_n_slices = in.n_slices; const uword out_n_rows = out.n_rows; const uword out_n_cols = out.n_cols; const uword out_vec_state = out.vec_state; if(in_n_slices == 1) { for(uword ucol=0; ucol < in_n_cols; ++ucol) { arrayops::inplace_minus( out.colptr(ucol), in.slice_colptr(0, ucol), in_n_rows ); } } else { if(out_vec_state == 0) { if( (in_n_rows == out_n_rows) && (in_n_cols == 1) && (in_n_slices == out_n_cols) ) { for(uword i=0; i < in_n_slices; ++i) { arrayops::inplace_minus( out.colptr(i), in.slice_colptr(i, 0), in_n_rows ); } } else if( (in_n_rows == 1) && (in_n_cols == out_n_rows) && (in_n_slices == out_n_cols) ) { for(uword slice=0; slice < in_n_slices; ++slice) { eT* out_colptr = out.colptr(slice); uword i,j; for(i=0, j=1; j < in_n_cols; i+=2, j+=2) { const eT tmp_i = in.at(0, i, slice); const eT tmp_j = in.at(0, j, slice); out_colptr[i] -= tmp_i; out_colptr[j] -= tmp_j; } if(i < in_n_cols) { out_colptr[i] -= in.at(0, i, slice); } } } } else { eT* out_mem = out.memptr(); for(uword i=0; i template inline const Mat& Mat::operator*=(const BaseCube& X) { arma_extra_debug_sigprint(); const Mat B(X); (*this).operator*=(B); return *this; } template template inline const Mat& Mat::operator%=(const BaseCube& X) { arma_extra_debug_sigprint(); Mat& out = *this; const unwrap_cube tmp(X.get_ref()); const Cube& in = tmp.M; arma_debug_assert_cube_as_mat(out, in, "element-wise multiplication", true); const uword in_n_rows = in.n_rows; const uword in_n_cols = in.n_cols; const uword in_n_slices = in.n_slices; const uword out_n_rows = out.n_rows; const uword out_n_cols = out.n_cols; const uword out_vec_state = out.vec_state; if(in_n_slices == 1) { for(uword ucol=0; ucol < in_n_cols; ++ucol) { arrayops::inplace_mul( out.colptr(ucol), in.slice_colptr(0, ucol), in_n_rows ); } } else { if(out_vec_state == 0) { if( (in_n_rows == out_n_rows) && (in_n_cols == 1) && (in_n_slices == out_n_cols) ) { for(uword i=0; i < in_n_slices; ++i) { arrayops::inplace_mul( out.colptr(i), in.slice_colptr(i, 0), in_n_rows ); } } else if( (in_n_rows == 1) && (in_n_cols == out_n_rows) && (in_n_slices == out_n_cols) ) { for(uword slice=0; slice < in_n_slices; ++slice) { eT* out_colptr = out.colptr(slice); uword i,j; for(i=0, j=1; j < in_n_cols; i+=2, j+=2) { const eT tmp_i = in.at(0, i, slice); const eT tmp_j = in.at(0, j, slice); out_colptr[i] *= tmp_i; out_colptr[j] *= tmp_j; } if(i < in_n_cols) { out_colptr[i] *= in.at(0, i, slice); } } } } else { eT* out_mem = out.memptr(); for(uword i=0; i template inline const Mat& Mat::operator/=(const BaseCube& X) { arma_extra_debug_sigprint(); Mat& out = *this; const unwrap_cube tmp(X.get_ref()); const Cube& in = tmp.M; arma_debug_assert_cube_as_mat(out, in, "element-wise division", true); const uword in_n_rows = in.n_rows; const uword in_n_cols = in.n_cols; const uword in_n_slices = in.n_slices; const uword out_n_rows = out.n_rows; const uword out_n_cols = out.n_cols; const uword out_vec_state = out.vec_state; if(in_n_slices == 1) { for(uword ucol=0; ucol < in_n_cols; ++ucol) { arrayops::inplace_div( out.colptr(ucol), in.slice_colptr(0, ucol), in_n_rows ); } } else { if(out_vec_state == 0) { if( (in_n_rows == out_n_rows) && (in_n_cols == 1) && (in_n_slices == out_n_cols) ) { for(uword i=0; i < in_n_slices; ++i) { arrayops::inplace_div( out.colptr(i), in.slice_colptr(i, 0), in_n_rows ); } } else if( (in_n_rows == 1) && (in_n_cols == out_n_rows) && (in_n_slices == out_n_cols) ) { for(uword slice=0; slice < in_n_slices; ++slice) { eT* out_colptr = out.colptr(slice); uword i,j; for(i=0, j=1; j < in_n_cols; i+=2, j+=2) { const eT tmp_i = in.at(0, i, slice); const eT tmp_j = in.at(0, j, slice); out_colptr[i] /= tmp_i; out_colptr[j] /= tmp_j; } if(i < in_n_cols) { out_colptr[i] /= in.at(0, i, slice); } } } } else { eT* out_mem = out.memptr(); for(uword i=0; i template inline Mat::Mat ( const Base::pod_type,T1>& A, const Base::pod_type,T2>& B ) : n_rows(0) , n_cols(0) , n_elem(0) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init(A,B); } //! construct a matrix from subview (e.g. construct a matrix from a delayed submatrix operation) template inline Mat::Mat(const subview& X) : n_rows(X.n_rows) , n_cols(X.n_cols) , n_elem(X.n_elem) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); subview::extract(*this, X); } //! construct a matrix from subview (e.g. construct a matrix from a delayed submatrix operation) template inline const Mat& Mat::operator=(const subview& X) { arma_extra_debug_sigprint(); const bool alias = (this == &(X.m)); if(alias == false) { init_warm(X.n_rows, X.n_cols); subview::extract(*this, X); } else { Mat tmp(X); steal_mem(tmp); } return *this; } //! in-place matrix addition (using a submatrix on the right-hand-side) template inline const Mat& Mat::operator+=(const subview& X) { arma_extra_debug_sigprint(); subview::plus_inplace(*this, X); return *this; } //! in-place matrix subtraction (using a submatrix on the right-hand-side) template inline const Mat& Mat::operator-=(const subview& X) { arma_extra_debug_sigprint(); subview::minus_inplace(*this, X); return *this; } //! in-place matrix mutiplication (using a submatrix on the right-hand-side) template inline const Mat& Mat::operator*=(const subview& X) { arma_extra_debug_sigprint(); glue_times::apply_inplace(*this, X); return *this; } //! in-place element-wise matrix mutiplication (using a submatrix on the right-hand-side) template inline const Mat& Mat::operator%=(const subview& X) { arma_extra_debug_sigprint(); subview::schur_inplace(*this, X); return *this; } //! in-place element-wise matrix division (using a submatrix on the right-hand-side) template inline const Mat& Mat::operator/=(const subview& X) { arma_extra_debug_sigprint(); subview::div_inplace(*this, X); return *this; } template inline Mat::Mat(const subview_row_strans& X) : n_rows(X.n_rows) , n_cols(X.n_cols) , n_elem(X.n_elem) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); X.extract(*this); } template inline Mat::Mat(const subview_row_htrans& X) : n_rows(X.n_rows) , n_cols(X.n_cols) , n_elem(X.n_elem) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); X.extract(*this); } template inline Mat::Mat(const xvec_htrans& X) : n_rows(X.n_rows) , n_cols(X.n_cols) , n_elem(X.n_elem) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); X.extract(*this); } template template inline Mat::Mat(const xtrans_mat& X) : n_rows(X.n_rows) , n_cols(X.n_cols) , n_elem(X.n_elem) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); X.extract(*this); } //! construct a matrix from a subview_cube instance template inline Mat::Mat(const subview_cube& x) : n_rows(0) , n_cols(0) , n_elem(0) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); this->operator=(x); } //! construct a matrix from a subview_cube instance template inline const Mat& Mat::operator=(const subview_cube& X) { arma_extra_debug_sigprint(); subview_cube::extract(*this, X); return *this; } //! in-place matrix addition (using a single-slice subcube on the right-hand-side) template inline const Mat& Mat::operator+=(const subview_cube& X) { arma_extra_debug_sigprint(); subview_cube::plus_inplace(*this, X); return *this; } //! in-place matrix subtraction (using a single-slice subcube on the right-hand-side) template inline const Mat& Mat::operator-=(const subview_cube& X) { arma_extra_debug_sigprint(); subview_cube::minus_inplace(*this, X); return *this; } //! in-place matrix mutiplication (using a single-slice subcube on the right-hand-side) template inline const Mat& Mat::operator*=(const subview_cube& X) { arma_extra_debug_sigprint(); const Mat tmp(X); glue_times::apply_inplace(*this, tmp); return *this; } //! in-place element-wise matrix mutiplication (using a single-slice subcube on the right-hand-side) template inline const Mat& Mat::operator%=(const subview_cube& X) { arma_extra_debug_sigprint(); subview_cube::schur_inplace(*this, X); return *this; } //! in-place element-wise matrix division (using a single-slice subcube on the right-hand-side) template inline const Mat& Mat::operator/=(const subview_cube& X) { arma_extra_debug_sigprint(); subview_cube::div_inplace(*this, X); return *this; } //! construct a matrix from diagview (e.g. construct a matrix from a delayed diag operation) template inline Mat::Mat(const diagview& X) : n_rows(X.n_rows) , n_cols(X.n_cols) , n_elem(X.n_elem) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); diagview::extract(*this, X); } //! construct a matrix from diagview (e.g. construct a matrix from a delayed diag operation) template inline const Mat& Mat::operator=(const diagview& X) { arma_extra_debug_sigprint(); const bool alias = (this == &(X.m)); if(alias == false) { init_warm(X.n_rows, X.n_cols); diagview::extract(*this, X); } else { Mat tmp(X); steal_mem(tmp); } return *this; } //! in-place matrix addition (using a diagview on the right-hand-side) template inline const Mat& Mat::operator+=(const diagview& X) { arma_extra_debug_sigprint(); diagview::plus_inplace(*this, X); return *this; } //! in-place matrix subtraction (using a diagview on the right-hand-side) template inline const Mat& Mat::operator-=(const diagview& X) { arma_extra_debug_sigprint(); diagview::minus_inplace(*this, X); return *this; } //! in-place matrix mutiplication (using a diagview on the right-hand-side) template inline const Mat& Mat::operator*=(const diagview& X) { arma_extra_debug_sigprint(); glue_times::apply_inplace(*this, X); return *this; } //! in-place element-wise matrix mutiplication (using a diagview on the right-hand-side) template inline const Mat& Mat::operator%=(const diagview& X) { arma_extra_debug_sigprint(); diagview::schur_inplace(*this, X); return *this; } //! in-place element-wise matrix division (using a diagview on the right-hand-side) template inline const Mat& Mat::operator/=(const diagview& X) { arma_extra_debug_sigprint(); diagview::div_inplace(*this, X); return *this; } template inline Mat::Mat(const spdiagview& X) : n_rows(X.n_rows) , n_cols(X.n_cols) , n_elem(X.n_elem) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); init_cold(); spdiagview::extract(*this, X); } template inline const Mat& Mat::operator=(const spdiagview& X) { arma_extra_debug_sigprint(); init_warm(X.n_rows, X.n_cols); spdiagview::extract(*this, X); return *this; } template inline const Mat& Mat::operator+=(const spdiagview& X) { arma_extra_debug_sigprint(); const Mat tmp(X); (*this).operator+=(tmp); return *this; } template inline const Mat& Mat::operator-=(const spdiagview& X) { arma_extra_debug_sigprint(); const Mat tmp(X); (*this).operator-=(tmp); return *this; } template inline const Mat& Mat::operator*=(const spdiagview& X) { arma_extra_debug_sigprint(); const Mat tmp(X); (*this).operator*=(tmp); return *this; } template inline const Mat& Mat::operator%=(const spdiagview& X) { arma_extra_debug_sigprint(); const Mat tmp(X); (*this).operator%=(tmp); return *this; } template inline const Mat& Mat::operator/=(const spdiagview& X) { arma_extra_debug_sigprint(); const Mat tmp(X); (*this).operator/=(tmp); return *this; } template template inline Mat::Mat(const subview_elem1& X) : n_rows(0) , n_cols(0) , n_elem(0) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); this->operator=(X); } template template inline const Mat& Mat::operator=(const subview_elem1& X) { arma_extra_debug_sigprint(); subview_elem1::extract(*this, X); return *this; } template template inline const Mat& Mat::operator+=(const subview_elem1& X) { arma_extra_debug_sigprint(); subview_elem1::plus_inplace(*this, X); return *this; } template template inline const Mat& Mat::operator-=(const subview_elem1& X) { arma_extra_debug_sigprint(); subview_elem1::minus_inplace(*this, X); return *this; } template template inline const Mat& Mat::operator*=(const subview_elem1& X) { arma_extra_debug_sigprint(); glue_times::apply_inplace(*this, X); return *this; } template template inline const Mat& Mat::operator%=(const subview_elem1& X) { arma_extra_debug_sigprint(); subview_elem1::schur_inplace(*this, X); return *this; } template template inline const Mat& Mat::operator/=(const subview_elem1& X) { arma_extra_debug_sigprint(); subview_elem1::div_inplace(*this, X); return *this; } template template inline Mat::Mat(const subview_elem2& X) : n_rows(0) , n_cols(0) , n_elem(0) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); this->operator=(X); } template template inline const Mat& Mat::operator=(const subview_elem2& X) { arma_extra_debug_sigprint(); subview_elem2::extract(*this, X); return *this; } template template inline const Mat& Mat::operator+=(const subview_elem2& X) { arma_extra_debug_sigprint(); subview_elem2::plus_inplace(*this, X); return *this; } template template inline const Mat& Mat::operator-=(const subview_elem2& X) { arma_extra_debug_sigprint(); subview_elem2::minus_inplace(*this, X); return *this; } template template inline const Mat& Mat::operator*=(const subview_elem2& X) { arma_extra_debug_sigprint(); glue_times::apply_inplace(*this, X); return *this; } template template inline const Mat& Mat::operator%=(const subview_elem2& X) { arma_extra_debug_sigprint(); subview_elem2::schur_inplace(*this, X); return *this; } template template inline const Mat& Mat::operator/=(const subview_elem2& X) { arma_extra_debug_sigprint(); subview_elem2::div_inplace(*this, X); return *this; } template template inline Mat::Mat(const SpBase& m) : n_rows(0) , n_cols(0) , n_elem(0) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); const SpProxy p(m.get_ref()); access::rw(n_rows) = p.get_n_rows(); access::rw(n_cols) = p.get_n_cols(); access::rw(n_elem) = p.get_n_elem(); init_cold(); zeros(); typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); while(it != it_end) { at(it.row(), it.col()) = (*it); ++it; } } template template inline const Mat& Mat::operator=(const SpBase& m) { arma_extra_debug_sigprint(); const SpProxy p(m.get_ref()); init_warm(p.get_n_rows(), p.get_n_cols()); zeros(); typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); while(it != it_end) { at(it.row(), it.col()) = (*it); ++it; } return *this; } template template inline const Mat& Mat::operator+=(const SpBase& m) { arma_extra_debug_sigprint(); const SpProxy p(m.get_ref()); arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "addition"); typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); while(it != it_end) { at(it.row(), it.col()) += (*it); ++it; } return *this; } template template inline const Mat& Mat::operator-=(const SpBase& m) { arma_extra_debug_sigprint(); const SpProxy p(m.get_ref()); arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "subtraction"); typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); while(it != it_end) { at(it.row(), it.col()) -= (*it); ++it; } return *this; } template template inline const Mat& Mat::operator*=(const SpBase& m) { arma_extra_debug_sigprint(); Mat z = (*this) * m.get_ref(); steal_mem(z); return *this; } template template inline const Mat& Mat::operator%=(const SpBase& m) { arma_extra_debug_sigprint(); const SpProxy p(m.get_ref()); arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "element-wise multiplication"); typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); // We have to zero everything that isn't being used. arrayops::inplace_set(memptr(), eT(0), (it.col() * n_rows) + it.row()); while(it != it_end) { const uword cur_loc = (it.col() * n_rows) + it.row(); access::rw(mem[cur_loc]) *= (*it); ++it; const uword next_loc = (it == it_end) ? (p.get_n_cols() * n_rows) : (it.col() * n_rows) + it.row(); arrayops::inplace_set(memptr() + cur_loc + 1, eT(0), (next_loc - cur_loc - 1)); } return *this; } template template inline const Mat& Mat::operator/=(const SpBase& m) { arma_extra_debug_sigprint(); const SpProxy p(m.get_ref()); arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "element-wise division"); // If you use this method, you are probably stupid or misguided, but for completeness it is implemented. // Unfortunately the best way to do this is loop over every element. for(uword c = 0; c < n_cols; ++c) for(uword r = 0; r < n_rows; ++r) { at(r, c) /= p.at(r, c); } return *this; } template inline mat_injector< Mat > Mat::operator<<(const eT val) { return mat_injector< Mat >(*this, val); } template inline mat_injector< Mat > Mat::operator<<(const injector_end_of_row<>& x) { return mat_injector< Mat >(*this, x); } //! creation of subview (row vector) template arma_inline subview_row Mat::row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check( row_num >= n_rows, "Mat::row(): index out of bounds" ); return subview_row(*this, row_num); } //! creation of subview (row vector) template arma_inline const subview_row Mat::row(const uword row_num) const { arma_extra_debug_sigprint(); arma_debug_check( row_num >= n_rows, "Mat::row(): index out of bounds" ); return subview_row(*this, row_num); } template inline subview_row Mat::operator()(const uword row_num, const span& col_span) { arma_extra_debug_sigprint(); const bool col_all = col_span.whole; const uword local_n_cols = n_cols; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword submat_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check ( (row_num >= n_rows) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "Mat::operator(): indices out of bounds or incorrectly used" ); return subview_row(*this, row_num, in_col1, submat_n_cols); } template inline const subview_row Mat::operator()(const uword row_num, const span& col_span) const { arma_extra_debug_sigprint(); const bool col_all = col_span.whole; const uword local_n_cols = n_cols; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword submat_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check ( (row_num >= n_rows) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "Mat::operator(): indices out of bounds or incorrectly used" ); return subview_row(*this, row_num, in_col1, submat_n_cols); } //! creation of subview (column vector) template arma_inline subview_col Mat::col(const uword col_num) { arma_extra_debug_sigprint(); arma_debug_check( col_num >= n_cols, "Mat::col(): index out of bounds"); return subview_col(*this, col_num); } //! creation of subview (column vector) template arma_inline const subview_col Mat::col(const uword col_num) const { arma_extra_debug_sigprint(); arma_debug_check( col_num >= n_cols, "Mat::col(): index out of bounds"); return subview_col(*this, col_num); } template inline subview_col Mat::operator()(const span& row_span, const uword col_num) { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const uword local_n_rows = n_rows; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword submat_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; arma_debug_check ( (col_num >= n_cols) || ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) , "Mat::operator(): indices out of bounds or incorrectly used" ); return subview_col(*this, col_num, in_row1, submat_n_rows); } template inline const subview_col Mat::operator()(const span& row_span, const uword col_num) const { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const uword local_n_rows = n_rows; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword submat_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; arma_debug_check ( (col_num >= n_cols) || ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) , "Mat::operator(): indices out of bounds or incorrectly used" ); return subview_col(*this, col_num, in_row1, submat_n_rows); } //! create a Col object which uses memory from an existing matrix object. //! this approach is currently not alias safe //! and does not take into account that the parent matrix object could be deleted. //! if deleted memory is accessed by the created Col object, //! it will cause memory corruption and/or a crash template inline Col Mat::unsafe_col(const uword col_num) { arma_extra_debug_sigprint(); arma_debug_check( col_num >= n_cols, "Mat::unsafe_col(): index out of bounds"); return Col(colptr(col_num), n_rows, false, true); } //! create a Col object which uses memory from an existing matrix object. //! this approach is currently not alias safe //! and does not take into account that the parent matrix object could be deleted. //! if deleted memory is accessed by the created Col object, //! it will cause memory corruption and/or a crash template inline const Col Mat::unsafe_col(const uword col_num) const { arma_extra_debug_sigprint(); arma_debug_check( col_num >= n_cols, "Mat::unsafe_col(): index out of bounds"); typedef const Col out_type; return out_type(const_cast(colptr(col_num)), n_rows, false, true); } //! creation of subview (submatrix comprised of specified row vectors) template arma_inline subview Mat::rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_row2 >= n_rows), "Mat::rows(): indices out of bounds or incorrectly used" ); const uword subview_n_rows = in_row2 - in_row1 + 1; return subview(*this, in_row1, 0, subview_n_rows, n_cols ); } //! creation of subview (submatrix comprised of specified row vectors) template arma_inline const subview Mat::rows(const uword in_row1, const uword in_row2) const { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_row2 >= n_rows), "Mat::rows(): indices out of bounds or incorrectly used" ); const uword subview_n_rows = in_row2 - in_row1 + 1; return subview(*this, in_row1, 0, subview_n_rows, n_cols ); } //! creation of subview (submatrix comprised of specified column vectors) template arma_inline subview Mat::cols(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_col1 > in_col2) || (in_col2 >= n_cols), "Mat::cols(): indices out of bounds or incorrectly used" ); const uword subview_n_cols = in_col2 - in_col1 + 1; return subview(*this, 0, in_col1, n_rows, subview_n_cols); } //! creation of subview (submatrix comprised of specified column vectors) template arma_inline const subview Mat::cols(const uword in_col1, const uword in_col2) const { arma_extra_debug_sigprint(); arma_debug_check ( (in_col1 > in_col2) || (in_col2 >= n_cols), "Mat::cols(): indices out of bounds or incorrectly used" ); const uword subview_n_cols = in_col2 - in_col1 + 1; return subview(*this, 0, in_col1, n_rows, subview_n_cols); } //! creation of subview (submatrix comprised of specified row vectors) template inline subview Mat::rows(const span& row_span) { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const uword local_n_rows = n_rows; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword submat_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) , "Mat::rows(): indices out of bounds or incorrectly used" ); return subview(*this, in_row1, 0, submat_n_rows, n_cols); } //! creation of subview (submatrix comprised of specified row vectors) template inline const subview Mat::rows(const span& row_span) const { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const uword local_n_rows = n_rows; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword submat_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) , "Mat::rows(): indices out of bounds or incorrectly used" ); return subview(*this, in_row1, 0, submat_n_rows, n_cols); } //! creation of subview (submatrix comprised of specified column vectors) template arma_inline subview Mat::cols(const span& col_span) { arma_extra_debug_sigprint(); const bool col_all = col_span.whole; const uword local_n_cols = n_cols; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword submat_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check ( ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "Mat::cols(): indices out of bounds or incorrectly used" ); return subview(*this, 0, in_col1, n_rows, submat_n_cols); } //! creation of subview (submatrix comprised of specified column vectors) template arma_inline const subview Mat::cols(const span& col_span) const { arma_extra_debug_sigprint(); const bool col_all = col_span.whole; const uword local_n_cols = n_cols; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword submat_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check ( ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "Mat::cols(): indices out of bounds or incorrectly used" ); return subview(*this, 0, in_col1, n_rows, submat_n_cols); } //! creation of subview (submatrix) template arma_inline subview Mat::submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_col1 > in_col2) || (in_row2 >= n_rows) || (in_col2 >= n_cols), "Mat::submat(): indices out of bounds or incorrectly used" ); const uword subview_n_rows = in_row2 - in_row1 + 1; const uword subview_n_cols = in_col2 - in_col1 + 1; return subview(*this, in_row1, in_col1, subview_n_rows, subview_n_cols); } //! creation of subview (generic submatrix) template arma_inline const subview Mat::submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) const { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_col1 > in_col2) || (in_row2 >= n_rows) || (in_col2 >= n_cols), "Mat::submat(): indices out of bounds or incorrectly used" ); const uword subview_n_rows = in_row2 - in_row1 + 1; const uword subview_n_cols = in_col2 - in_col1 + 1; return subview(*this, in_row1, in_col1, subview_n_rows, subview_n_cols); } //! creation of subview (submatrix) template arma_inline subview Mat::submat(const uword in_row1, const uword in_col1, const SizeMat& s) { arma_extra_debug_sigprint(); const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; arma_debug_check ( ((in_row1 >= l_n_rows) || (in_col1 >= l_n_cols) || ((in_row1 + s_n_rows) > l_n_rows) || ((in_col1 + s_n_cols) > l_n_cols)), "Mat::submat(): indices or size out of bounds" ); return subview(*this, in_row1, in_col1, s_n_rows, s_n_cols); } //! creation of subview (submatrix) template arma_inline const subview Mat::submat(const uword in_row1, const uword in_col1, const SizeMat& s) const { arma_extra_debug_sigprint(); const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; arma_debug_check ( ((in_row1 >= l_n_rows) || (in_col1 >= l_n_cols) || ((in_row1 + s_n_rows) > l_n_rows) || ((in_col1 + s_n_cols) > l_n_cols)), "Mat::submat(): indices or size out of bounds" ); return subview(*this, in_row1, in_col1, s_n_rows, s_n_cols); } //! creation of subview (submatrix) template inline subview Mat::submat(const span& row_span, const span& col_span) { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const bool col_all = col_span.whole; const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword submat_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword submat_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "Mat::submat(): indices out of bounds or incorrectly used" ); return subview(*this, in_row1, in_col1, submat_n_rows, submat_n_cols); } //! creation of subview (generic submatrix) template inline const subview Mat::submat(const span& row_span, const span& col_span) const { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const bool col_all = col_span.whole; const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword submat_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword submat_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "Mat::submat(): indices out of bounds or incorrectly used" ); return subview(*this, in_row1, in_col1, submat_n_rows, submat_n_cols); } template inline subview Mat::operator()(const span& row_span, const span& col_span) { arma_extra_debug_sigprint(); return (*this).submat(row_span, col_span); } template inline const subview Mat::operator()(const span& row_span, const span& col_span) const { arma_extra_debug_sigprint(); return (*this).submat(row_span, col_span); } template inline subview Mat::operator()(const uword in_row1, const uword in_col1, const SizeMat& s) { arma_extra_debug_sigprint(); return (*this).submat(in_row1, in_col1, s); } template inline const subview Mat::operator()(const uword in_row1, const uword in_col1, const SizeMat& s) const { arma_extra_debug_sigprint(); return (*this).submat(in_row1, in_col1, s); } template inline subview Mat::head_rows(const uword N) { arma_extra_debug_sigprint(); arma_debug_check( (N > n_rows), "Mat::head_rows(): size out of bounds"); return subview(*this, 0, 0, N, n_cols); } template inline const subview Mat::head_rows(const uword N) const { arma_extra_debug_sigprint(); arma_debug_check( (N > n_rows), "Mat::head_rows(): size out of bounds"); return subview(*this, 0, 0, N, n_cols); } template inline subview Mat::tail_rows(const uword N) { arma_extra_debug_sigprint(); arma_debug_check( (N > n_rows), "Mat::tail_rows(): size out of bounds"); const uword start_row = n_rows - N; return subview(*this, start_row, 0, N, n_cols); } template inline const subview Mat::tail_rows(const uword N) const { arma_extra_debug_sigprint(); arma_debug_check( (N > n_rows), "Mat::tail_rows(): size out of bounds"); const uword start_row = n_rows - N; return subview(*this, start_row, 0, N, n_cols); } template inline subview Mat::head_cols(const uword N) { arma_extra_debug_sigprint(); arma_debug_check( (N > n_cols), "Mat::head_cols(): size out of bounds"); return subview(*this, 0, 0, n_rows, N); } template inline const subview Mat::head_cols(const uword N) const { arma_extra_debug_sigprint(); arma_debug_check( (N > n_cols), "Mat::head_cols(): size out of bounds"); return subview(*this, 0, 0, n_rows, N); } template inline subview Mat::tail_cols(const uword N) { arma_extra_debug_sigprint(); arma_debug_check( (N > n_cols), "Mat::tail_cols(): size out of bounds"); const uword start_col = n_cols - N; return subview(*this, 0, start_col, n_rows, N); } template inline const subview Mat::tail_cols(const uword N) const { arma_extra_debug_sigprint(); arma_debug_check( (N > n_cols), "Mat::tail_cols(): size out of bounds"); const uword start_col = n_cols - N; return subview(*this, 0, start_col, n_rows, N); } template template arma_inline subview_elem1 Mat::elem(const Base& a) { arma_extra_debug_sigprint(); return subview_elem1(*this, a); } template template arma_inline const subview_elem1 Mat::elem(const Base& a) const { arma_extra_debug_sigprint(); return subview_elem1(*this, a); } template template arma_inline subview_elem1 Mat::operator()(const Base& a) { arma_extra_debug_sigprint(); return subview_elem1(*this, a); } template template arma_inline const subview_elem1 Mat::operator()(const Base& a) const { arma_extra_debug_sigprint(); return subview_elem1(*this, a); } template template arma_inline subview_elem2 Mat::elem(const Base& ri, const Base& ci) { arma_extra_debug_sigprint(); return subview_elem2(*this, ri, ci, false, false); } template template arma_inline const subview_elem2 Mat::elem(const Base& ri, const Base& ci) const { arma_extra_debug_sigprint(); return subview_elem2(*this, ri, ci, false, false); } template template arma_inline subview_elem2 Mat::submat(const Base& ri, const Base& ci) { arma_extra_debug_sigprint(); return subview_elem2(*this, ri, ci, false, false); } template template arma_inline const subview_elem2 Mat::submat(const Base& ri, const Base& ci) const { arma_extra_debug_sigprint(); return subview_elem2(*this, ri, ci, false, false); } template template arma_inline subview_elem2 Mat::operator()(const Base& ri, const Base& ci) { arma_extra_debug_sigprint(); return subview_elem2(*this, ri, ci, false, false); } template template arma_inline const subview_elem2 Mat::operator()(const Base& ri, const Base& ci) const { arma_extra_debug_sigprint(); return subview_elem2(*this, ri, ci, false, false); } template template arma_inline subview_elem2 Mat::rows(const Base& ri) { arma_extra_debug_sigprint(); return subview_elem2(*this, ri, ri, false, true); } template template arma_inline const subview_elem2 Mat::rows(const Base& ri) const { arma_extra_debug_sigprint(); return subview_elem2(*this, ri, ri, false, true); } template template arma_inline subview_elem2 Mat::cols(const Base& ci) { arma_extra_debug_sigprint(); return subview_elem2(*this, ci, ci, true, false); } template template arma_inline const subview_elem2 Mat::cols(const Base& ci) const { arma_extra_debug_sigprint(); return subview_elem2(*this, ci, ci, true, false); } template arma_inline subview_each1< Mat, 0 > Mat::each_col() { arma_extra_debug_sigprint(); return subview_each1< Mat, 0>(*this); } template arma_inline subview_each1< Mat, 1 > Mat::each_row() { arma_extra_debug_sigprint(); return subview_each1< Mat, 1>(*this); } template template inline subview_each2< Mat, 0, T1 > Mat::each_col(const Base& indices) { arma_extra_debug_sigprint(); return subview_each2< Mat, 0, T1 >(*this, indices); } template template inline subview_each2< Mat, 1, T1 > Mat::each_row(const Base& indices) { arma_extra_debug_sigprint(); return subview_each2< Mat, 1, T1 >(*this, indices); } //! creation of diagview (diagonal) template arma_inline diagview Mat::diag(const sword in_id) { arma_extra_debug_sigprint(); const uword row_offset = (in_id < 0) ? uword(-in_id) : 0; const uword col_offset = (in_id > 0) ? uword( in_id) : 0; arma_debug_check ( ((row_offset > 0) && (row_offset >= n_rows)) || ((col_offset > 0) && (col_offset >= n_cols)), "Mat::diag(): requested diagonal out of bounds" ); const uword len = (std::min)(n_rows - row_offset, n_cols - col_offset); return diagview(*this, row_offset, col_offset, len); } //! creation of diagview (diagonal) template arma_inline const diagview Mat::diag(const sword in_id) const { arma_extra_debug_sigprint(); const uword row_offset = (in_id < 0) ? -in_id : 0; const uword col_offset = (in_id > 0) ? in_id : 0; arma_debug_check ( ((row_offset > 0) && (row_offset >= n_rows)) || ((col_offset > 0) && (col_offset >= n_cols)), "Mat::diag(): requested diagonal out of bounds" ); const uword len = (std::min)(n_rows - row_offset, n_cols - col_offset); return diagview(*this, row_offset, col_offset, len); } template inline void Mat::swap_rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; arma_debug_check ( (in_row1 >= local_n_rows) || (in_row2 >= local_n_rows), "Mat::swap_rows(): index out of bounds" ); if(n_elem > 0) { for(uword ucol=0; ucol < local_n_cols; ++ucol) { const uword offset = ucol * local_n_rows; const uword pos1 = in_row1 + offset; const uword pos2 = in_row2 + offset; std::swap( access::rw(mem[pos1]), access::rw(mem[pos2]) ); } } } template inline void Mat::swap_cols(const uword in_colA, const uword in_colB) { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; arma_debug_check ( (in_colA >= local_n_cols) || (in_colB >= local_n_cols), "Mat::swap_cols(): index out of bounds" ); if(n_elem > 0) { eT* ptrA = colptr(in_colA); eT* ptrB = colptr(in_colB); eT tmp_i; eT tmp_j; uword iq,jq; for(iq=0, jq=1; jq < local_n_rows; iq+=2, jq+=2) { tmp_i = ptrA[iq]; tmp_j = ptrA[jq]; ptrA[iq] = ptrB[iq]; ptrA[jq] = ptrB[jq]; ptrB[iq] = tmp_i; ptrB[jq] = tmp_j; } if(iq < local_n_rows) { std::swap( ptrA[iq], ptrB[iq] ); } } } //! remove specified row template inline void Mat::shed_row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check( row_num >= n_rows, "Mat::shed_row(): index out of bounds"); shed_rows(row_num, row_num); } //! remove specified column template inline void Mat::shed_col(const uword col_num) { arma_extra_debug_sigprint(); arma_debug_check( col_num >= n_cols, "Mat::shed_col(): index out of bounds"); shed_cols(col_num, col_num); } //! remove specified rows template inline void Mat::shed_rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_row2 >= n_rows), "Mat::shed_rows(): indices out of bounds or incorrectly used" ); const uword n_keep_front = in_row1; const uword n_keep_back = n_rows - (in_row2 + 1); Mat X(n_keep_front + n_keep_back, n_cols); if(n_keep_front > 0) { X.rows( 0, (n_keep_front-1) ) = rows( 0, (in_row1-1) ); } if(n_keep_back > 0) { X.rows( n_keep_front, (n_keep_front+n_keep_back-1) ) = rows( (in_row2+1), (n_rows-1) ); } steal_mem(X); } //! remove specified columns template inline void Mat::shed_cols(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_col1 > in_col2) || (in_col2 >= n_cols), "Mat::shed_cols(): indices out of bounds or incorrectly used" ); const uword n_keep_front = in_col1; const uword n_keep_back = n_cols - (in_col2 + 1); Mat X(n_rows, n_keep_front + n_keep_back); if(n_keep_front > 0) { X.cols( 0, (n_keep_front-1) ) = cols( 0, (in_col1-1) ); } if(n_keep_back > 0) { X.cols( n_keep_front, (n_keep_front+n_keep_back-1) ) = cols( (in_col2+1), (n_cols-1) ); } steal_mem(X); } //! insert N rows at the specified row position, //! optionally setting the elements of the inserted rows to zero template inline void Mat::insert_rows(const uword row_num, const uword N, const bool set_to_zero) { arma_extra_debug_sigprint(); const uword t_n_rows = n_rows; const uword t_n_cols = n_cols; const uword A_n_rows = row_num; const uword B_n_rows = t_n_rows - row_num; // insertion at row_num == n_rows is in effect an append operation arma_debug_check( (row_num > t_n_rows), "Mat::insert_rows(): index out of bounds"); if(N > 0) { Mat out(t_n_rows + N, t_n_cols); if(A_n_rows > 0) { out.rows(0, A_n_rows-1) = rows(0, A_n_rows-1); } if(B_n_rows > 0) { out.rows(row_num + N, t_n_rows + N - 1) = rows(row_num, t_n_rows-1); } if(set_to_zero == true) { out.rows(row_num, row_num + N - 1).zeros(); } steal_mem(out); } } //! insert N columns at the specified column position, //! optionally setting the elements of the inserted columns to zero template inline void Mat::insert_cols(const uword col_num, const uword N, const bool set_to_zero) { arma_extra_debug_sigprint(); const uword t_n_rows = n_rows; const uword t_n_cols = n_cols; const uword A_n_cols = col_num; const uword B_n_cols = t_n_cols - col_num; // insertion at col_num == n_cols is in effect an append operation arma_debug_check( (col_num > t_n_cols), "Mat::insert_cols(): index out of bounds"); if(N > 0) { Mat out(t_n_rows, t_n_cols + N); if(A_n_cols > 0) { out.cols(0, A_n_cols-1) = cols(0, A_n_cols-1); } if(B_n_cols > 0) { out.cols(col_num + N, t_n_cols + N - 1) = cols(col_num, t_n_cols-1); } if(set_to_zero == true) { out.cols(col_num, col_num + N - 1).zeros(); } steal_mem(out); } } //! insert the given object at the specified row position; //! the given object must have the same number of columns as the matrix template template inline void Mat::insert_rows(const uword row_num, const Base& X) { arma_extra_debug_sigprint(); const unwrap tmp(X.get_ref()); const Mat& C = tmp.M; const uword C_n_rows = C.n_rows; const uword C_n_cols = C.n_cols; const uword t_n_rows = n_rows; const uword t_n_cols = n_cols; const uword A_n_rows = row_num; const uword B_n_rows = t_n_rows - row_num; bool err_state = false; char* err_msg = 0; // insertion at row_num == n_rows is in effect an append operation arma_debug_set_error ( err_state, err_msg, (row_num > t_n_rows), "Mat::insert_rows(): index out of bounds" ); arma_debug_set_error ( err_state, err_msg, ( (C_n_cols != t_n_cols) && ( (t_n_rows > 0) || (t_n_cols > 0) ) && ( (C_n_rows > 0) || (C_n_cols > 0) ) ), "Mat::insert_rows(): given object has an incompatible number of columns" ); arma_debug_check(err_state, err_msg); if(C_n_rows > 0) { Mat out( t_n_rows + C_n_rows, (std::max)(t_n_cols, C_n_cols) ); if(t_n_cols > 0) { if(A_n_rows > 0) { out.rows(0, A_n_rows-1) = rows(0, A_n_rows-1); } if( (t_n_cols > 0) && (B_n_rows > 0) ) { out.rows(row_num + C_n_rows, t_n_rows + C_n_rows - 1) = rows(row_num, t_n_rows - 1); } } if(C_n_cols > 0) { out.rows(row_num, row_num + C_n_rows - 1) = C; } steal_mem(out); } } //! insert the given object at the specified column position; //! the given object must have the same number of rows as the matrix template template inline void Mat::insert_cols(const uword col_num, const Base& X) { arma_extra_debug_sigprint(); const unwrap tmp(X.get_ref()); const Mat& C = tmp.M; const uword C_n_rows = C.n_rows; const uword C_n_cols = C.n_cols; const uword t_n_rows = n_rows; const uword t_n_cols = n_cols; const uword A_n_cols = col_num; const uword B_n_cols = t_n_cols - col_num; bool err_state = false; char* err_msg = 0; // insertion at col_num == n_cols is in effect an append operation arma_debug_set_error ( err_state, err_msg, (col_num > t_n_cols), "Mat::insert_cols(): index out of bounds" ); arma_debug_set_error ( err_state, err_msg, ( (C_n_rows != t_n_rows) && ( (t_n_rows > 0) || (t_n_cols > 0) ) && ( (C_n_rows > 0) || (C_n_cols > 0) ) ), "Mat::insert_cols(): given object has an incompatible number of rows" ); arma_debug_check(err_state, err_msg); if(C_n_cols > 0) { Mat out( (std::max)(t_n_rows, C_n_rows), t_n_cols + C_n_cols ); if(t_n_rows > 0) { if(A_n_cols > 0) { out.cols(0, A_n_cols-1) = cols(0, A_n_cols-1); } if(B_n_cols > 0) { out.cols(col_num + C_n_cols, t_n_cols + C_n_cols - 1) = cols(col_num, t_n_cols - 1); } } if(C_n_rows > 0) { out.cols(col_num, col_num + C_n_cols - 1) = C; } steal_mem(out); } } template template inline Mat::Mat(const Gen& X) : n_rows(X.n_rows) , n_cols(X.n_cols) , n_elem(n_rows*n_cols) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); init_cold(); X.apply(*this); } template template inline const Mat& Mat::operator=(const Gen& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); init_warm(X.n_rows, X.n_cols); X.apply(*this); return *this; } template template inline const Mat& Mat::operator+=(const Gen& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); X.apply_inplace_plus(*this); return *this; } template template inline const Mat& Mat::operator-=(const Gen& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); X.apply_inplace_minus(*this); return *this; } template template inline const Mat& Mat::operator*=(const Gen& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const Mat tmp(X); return (*this).operator*=(tmp); } template template inline const Mat& Mat::operator%=(const Gen& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); X.apply_inplace_schur(*this); return *this; } template template inline const Mat& Mat::operator/=(const Gen& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); X.apply_inplace_div(*this); return *this; } //! create a matrix from Op, i.e. run the previously delayed unary operations template template inline Mat::Mat(const Op& X) : n_rows(0) , n_cols(0) , n_elem(0) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); op_type::apply(*this, X); } //! create a matrix from Op, i.e. run the previously delayed unary operations template template inline const Mat& Mat::operator=(const Op& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); op_type::apply(*this, X); return *this; } //! in-place matrix addition, with the right-hand-side operand having delayed operations template template inline const Mat& Mat::operator+=(const Op& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const Mat m(X); return (*this).operator+=(m); } //! in-place matrix subtraction, with the right-hand-side operand having delayed operations template template inline const Mat& Mat::operator-=(const Op& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const Mat m(X); return (*this).operator-=(m); } //! in-place matrix multiplication, with the right-hand-side operand having delayed operations template template inline const Mat& Mat::operator*=(const Op& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); glue_times::apply_inplace(*this, X); return *this; } //! in-place matrix element-wise multiplication, with the right-hand-side operand having delayed operations template template inline const Mat& Mat::operator%=(const Op& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const Mat m(X); return (*this).operator%=(m); } //! in-place matrix element-wise division, with the right-hand-side operand having delayed operations template template inline const Mat& Mat::operator/=(const Op& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const Mat m(X); return (*this).operator/=(m); } //! create a matrix from eOp, i.e. run the previously delayed unary operations template template inline Mat::Mat(const eOp& X) : n_rows(X.get_n_rows()) , n_cols(X.get_n_cols()) , n_elem(X.get_n_elem()) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); init_cold(); eop_type::apply(*this, X); } //! create a matrix from eOp, i.e. run the previously delayed unary operations template template inline const Mat& Mat::operator=(const eOp& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const bool bad_alias = (eOp::proxy_type::has_subview && X.P.is_alias(*this)); if(bad_alias == false) { init_warm(X.get_n_rows(), X.get_n_cols()); eop_type::apply(*this, X); } else { arma_extra_debug_print("bad_alias = true"); Mat tmp(X); steal_mem(tmp); } return *this; } template template inline const Mat& Mat::operator+=(const eOp& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); eop_type::apply_inplace_plus(*this, X); return *this; } template template inline const Mat& Mat::operator-=(const eOp& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); eop_type::apply_inplace_minus(*this, X); return *this; } template template inline const Mat& Mat::operator*=(const eOp& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); glue_times::apply_inplace(*this, X); return *this; } template template inline const Mat& Mat::operator%=(const eOp& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); eop_type::apply_inplace_schur(*this, X); return *this; } template template inline const Mat& Mat::operator/=(const eOp& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); eop_type::apply_inplace_div(*this, X); return *this; } //! EXPERIMENTAL template template inline Mat::Mat(const mtOp& X) : n_rows(0) , n_cols(0) , n_elem(0) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); op_type::apply(*this, X); } //! EXPERIMENTAL template template inline const Mat& Mat::operator=(const mtOp& X) { arma_extra_debug_sigprint(); op_type::apply(*this, X); return *this; } //! EXPERIMENTAL template template inline const Mat& Mat::operator+=(const mtOp& X) { arma_extra_debug_sigprint(); const Mat m(X); return (*this).operator+=(m); } //! EXPERIMENTAL template template inline const Mat& Mat::operator-=(const mtOp& X) { arma_extra_debug_sigprint(); const Mat m(X); return (*this).operator-=(m); } //! EXPERIMENTAL template template inline const Mat& Mat::operator*=(const mtOp& X) { arma_extra_debug_sigprint(); const Mat m(X); return (*this).operator*=(m); } //! EXPERIMENTAL template template inline const Mat& Mat::operator%=(const mtOp& X) { arma_extra_debug_sigprint(); const Mat m(X); return (*this).operator%=(m); } //! EXPERIMENTAL template template inline const Mat& Mat::operator/=(const mtOp& X) { arma_extra_debug_sigprint(); const Mat m(X); return (*this).operator/=(m); } //! create a matrix from Glue, i.e. run the previously delayed binary operations template template inline Mat::Mat(const Glue& X) : n_rows(0) , n_cols(0) , n_elem(0) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); glue_type::apply(*this, X); } //! create a matrix from Glue, i.e. run the previously delayed binary operations template template inline const Mat& Mat::operator=(const Glue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); glue_type::apply(*this, X); return *this; } //! in-place matrix addition, with the right-hand-side operands having delayed operations template template inline const Mat& Mat::operator+=(const Glue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); const Mat m(X); return (*this).operator+=(m); } //! in-place matrix subtraction, with the right-hand-side operands having delayed operations template template inline const Mat& Mat::operator-=(const Glue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); const Mat m(X); return (*this).operator-=(m); } //! in-place matrix multiplications, with the right-hand-side operands having delayed operations template template inline const Mat& Mat::operator*=(const Glue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); glue_times::apply_inplace(*this, X); return *this; } //! in-place matrix element-wise multiplication, with the right-hand-side operands having delayed operations template template inline const Mat& Mat::operator%=(const Glue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); const Mat m(X); return (*this).operator%=(m); } //! in-place matrix element-wise division, with the right-hand-side operands having delayed operations template template inline const Mat& Mat::operator/=(const Glue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); const Mat m(X); return (*this).operator/=(m); } template template inline const Mat& Mat::operator+=(const Glue& X) { arma_extra_debug_sigprint(); glue_times::apply_inplace_plus(*this, X, sword(+1)); return *this; } template template inline const Mat& Mat::operator-=(const Glue& X) { arma_extra_debug_sigprint(); glue_times::apply_inplace_plus(*this, X, sword(-1)); return *this; } //! create a matrix from eGlue, i.e. run the previously delayed binary operations template template inline Mat::Mat(const eGlue& X) : n_rows(X.get_n_rows()) , n_cols(X.get_n_cols()) , n_elem(X.get_n_elem()) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); init_cold(); eglue_type::apply(*this, X); } //! create a matrix from eGlue, i.e. run the previously delayed binary operations template template inline const Mat& Mat::operator=(const eGlue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); const bool bad_alias = ( (eGlue::proxy1_type::has_subview && X.P1.is_alias(*this)) || (eGlue::proxy2_type::has_subview && X.P2.is_alias(*this)) ); if(bad_alias == false) { init_warm(X.get_n_rows(), X.get_n_cols()); eglue_type::apply(*this, X); } else { arma_extra_debug_print("bad_alias = true"); Mat tmp(X); steal_mem(tmp); } return *this; } //! in-place matrix addition, with the right-hand-side operands having delayed operations template template inline const Mat& Mat::operator+=(const eGlue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); eglue_type::apply_inplace_plus(*this, X); return *this; } //! in-place matrix subtraction, with the right-hand-side operands having delayed operations template template inline const Mat& Mat::operator-=(const eGlue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); eglue_type::apply_inplace_minus(*this, X); return *this; } template template inline const Mat& Mat::operator*=(const eGlue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); glue_times::apply_inplace(*this, X); return *this; } template template inline const Mat& Mat::operator%=(const eGlue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); eglue_type::apply_inplace_schur(*this, X); return *this; } template template inline const Mat& Mat::operator/=(const eGlue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); eglue_type::apply_inplace_div(*this, X); return *this; } //! EXPERIMENTAL: create a matrix from mtGlue, i.e. run the previously delayed binary operations template template inline Mat::Mat(const mtGlue& X) : n_rows(0) , n_cols(0) , n_elem(0) , vec_state(0) , mem_state(0) , mem() { arma_extra_debug_sigprint_this(this); glue_type::apply(*this, X); } //! EXPERIMENTAL: create a matrix from Glue, i.e. run the previously delayed binary operations template template inline const Mat& Mat::operator=(const mtGlue& X) { arma_extra_debug_sigprint(); glue_type::apply(*this, X); return *this; } //! EXPERIMENTAL: in-place matrix addition, with the right-hand-side operands having delayed operations template template inline const Mat& Mat::operator+=(const mtGlue& X) { arma_extra_debug_sigprint(); const Mat m(X); return (*this).operator+=(m); } //! EXPERIMENTAL: in-place matrix subtraction, with the right-hand-side operands having delayed operations template template inline const Mat& Mat::operator-=(const mtGlue& X) { arma_extra_debug_sigprint(); const Mat m(X); return (*this).operator-=(m); } //! EXPERIMENTAL: in-place matrix multiplications, with the right-hand-side operands having delayed operations template template inline const Mat& Mat::operator*=(const mtGlue& X) { arma_extra_debug_sigprint(); const Mat m(X); glue_times::apply_inplace(*this, m); return *this; } //! EXPERIMENTAL: in-place matrix element-wise multiplication, with the right-hand-side operands having delayed operations template template inline const Mat& Mat::operator%=(const mtGlue& X) { arma_extra_debug_sigprint(); const Mat m(X); return (*this).operator%=(m); } //! EXPERIMENTAL: in-place matrix element-wise division, with the right-hand-side operands having delayed operations template template inline const Mat& Mat::operator/=(const mtGlue& X) { arma_extra_debug_sigprint(); const Mat m(X); return (*this).operator/=(m); } //! linear element accessor (treats the matrix as a vector); no bounds check; assumes memory is aligned template arma_inline arma_warn_unused const eT& Mat::at_alt(const uword ii) const { const eT* mem_aligned = mem; memory::mark_as_aligned(mem_aligned); return mem_aligned[ii]; } //! linear element accessor (treats the matrix as a vector); bounds checking not done when ARMA_NO_DEBUG is defined template arma_inline arma_warn_unused eT& Mat::operator() (const uword ii) { arma_debug_check( (ii >= n_elem), "Mat::operator(): index out of bounds"); return access::rw(mem[ii]); } //! linear element accessor (treats the matrix as a vector); bounds checking not done when ARMA_NO_DEBUG is defined template arma_inline arma_warn_unused const eT& Mat::operator() (const uword ii) const { arma_debug_check( (ii >= n_elem), "Mat::operator(): index out of bounds"); return mem[ii]; } //! linear element accessor (treats the matrix as a vector); no bounds check. template arma_inline arma_warn_unused eT& Mat::operator[] (const uword ii) { return access::rw(mem[ii]); } //! linear element accessor (treats the matrix as a vector); no bounds check template arma_inline arma_warn_unused const eT& Mat::operator[] (const uword ii) const { return mem[ii]; } //! linear element accessor (treats the matrix as a vector); no bounds check. template arma_inline arma_warn_unused eT& Mat::at(const uword ii) { return access::rw(mem[ii]); } //! linear element accessor (treats the matrix as a vector); no bounds check template arma_inline arma_warn_unused const eT& Mat::at(const uword ii) const { return mem[ii]; } //! element accessor; bounds checking not done when ARMA_NO_DEBUG is defined template arma_inline arma_warn_unused eT& Mat::operator() (const uword in_row, const uword in_col) { arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "Mat::operator(): index out of bounds"); return access::rw(mem[in_row + in_col*n_rows]); } //! element accessor; bounds checking not done when ARMA_NO_DEBUG is defined template arma_inline arma_warn_unused const eT& Mat::operator() (const uword in_row, const uword in_col) const { arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "Mat::operator(): index out of bounds"); return mem[in_row + in_col*n_rows]; } //! element accessor; no bounds check template arma_inline arma_warn_unused eT& Mat::at(const uword in_row, const uword in_col) { return access::rw( mem[in_row + in_col*n_rows] ); } //! element accessor; no bounds check template arma_inline arma_warn_unused const eT& Mat::at(const uword in_row, const uword in_col) const { return mem[in_row + in_col*n_rows]; } //! prefix ++ template arma_inline const Mat& Mat::operator++() { Mat_aux::prefix_pp(*this); return *this; } //! postfix ++ (must not return the object by reference) template arma_inline void Mat::operator++(int) { Mat_aux::postfix_pp(*this); } //! prefix -- template arma_inline const Mat& Mat::operator--() { Mat_aux::prefix_mm(*this); return *this; } //! postfix -- (must not return the object by reference) template arma_inline void Mat::operator--(int) { Mat_aux::postfix_mm(*this); } //! returns true if the matrix has no elements template arma_inline arma_warn_unused bool Mat::is_empty() const { return (n_elem == 0); } //! returns true if the object can be interpreted as a column or row vector template arma_inline arma_warn_unused bool Mat::is_vec() const { return ( (n_rows == 1) || (n_cols == 1) ); } //! returns true if the object can be interpreted as a row vector template arma_inline arma_warn_unused bool Mat::is_rowvec() const { return (n_rows == 1); } //! returns true if the object can be interpreted as a column vector template arma_inline arma_warn_unused bool Mat::is_colvec() const { return (n_cols == 1); } //! returns true if the object has the same number of non-zero rows and columnns template arma_inline arma_warn_unused bool Mat::is_square() const { return (n_rows == n_cols); } //! returns true if all of the elements are finite template inline arma_warn_unused bool Mat::is_finite() const { return arrayops::is_finite( memptr(), n_elem ); } template inline arma_warn_unused bool Mat::has_inf() const { arma_extra_debug_sigprint(); return arrayops::has_inf(memptr(), n_elem); } template inline arma_warn_unused bool Mat::has_nan() const { arma_extra_debug_sigprint(); return arrayops::has_nan(memptr(), n_elem); } template inline arma_warn_unused bool Mat::is_sorted(const char* direction) const { arma_extra_debug_sigprint(); return (*this).is_sorted(direction, (((vec_state == 2) || (n_rows == 1)) ? uword(1) : uword(0))); } template inline arma_warn_unused bool Mat::is_sorted(const char* direction, const uword dim) const { arma_extra_debug_sigprint(); const char sig = (direction != NULL) ? direction[0] : char(0); arma_debug_check( ((sig != 'a') && (sig != 'd')), "Mat::is_sorted(): unknown sort direction" ); arma_debug_check( (dim > 1), "Mat::is_sorted(): parameter 'dim' must be 0 or 1" ); if(n_elem <= 1) { return true; } const uword local_n_cols = n_cols; const uword local_n_rows = n_rows; if(sig == 'a') { // deliberately using the opposite direction comparator, // as we need to handle the case of two elements being equal arma_descend_sort_helper comparator; if(dim == 0) { if(local_n_rows <= 1u) { return true; } const uword local_n_rows_m1 = local_n_rows - 1; for(uword c=0; c < local_n_cols; ++c) { const eT* coldata = colptr(c); for(uword r=0; r < local_n_rows_m1; ++r) { const eT val1 = (*coldata); coldata++; const eT val2 = (*coldata); if(comparator(val1,val2)) { return false; } } } } else // dim == 1 { if(local_n_cols <= 1u) { return true; } const uword local_n_cols_m1 = local_n_cols - 1; if(local_n_rows == 1) { const eT* rowdata = memptr(); for(uword c=0; c < local_n_cols_m1; ++c) { const eT val1 = (*rowdata); rowdata++; const eT val2 = (*rowdata); if(comparator(val1,val2)) { return false; } } } else { for(uword r=0; r < local_n_rows; ++r) for(uword c=0; c < local_n_cols_m1; ++c) { const eT val1 = at(r,c ); const eT val2 = at(r,c+1); if(comparator(val1,val2)) { return false; } } } } } else if(sig == 'd') { // deliberately using the opposite direction comparator, // as we need to handle the case of two elements being equal arma_ascend_sort_helper comparator; if(dim == 0) { if(local_n_rows <= 1u) { return true; } const uword local_n_rows_m1 = local_n_rows - 1; for(uword c=0; c < local_n_cols; ++c) { const eT* coldata = colptr(c); for(uword r=0; r < local_n_rows_m1; ++r) { const eT val1 = (*coldata); coldata++; const eT val2 = (*coldata); if(comparator(val1,val2)) { return false; } } } } else // dim == 1 { if(local_n_cols <= 1u) { return true; } const uword local_n_cols_m1 = local_n_cols - 1; if(local_n_rows == 1) { const eT* rowdata = memptr(); for(uword c=0; c < local_n_cols_m1; ++c) { const eT val1 = (*rowdata); rowdata++; const eT val2 = (*rowdata); if(comparator(val1,val2)) { return false; } } } else { for(uword r=0; r < local_n_rows; ++r) for(uword c=0; c < local_n_cols_m1; ++c) { const eT val1 = at(r,c ); const eT val2 = at(r,c+1); if(comparator(val1,val2)) { return false; } } } } } return true; } //! returns true if the given index is currently in range template arma_inline arma_warn_unused bool Mat::in_range(const uword ii) const { return (ii < n_elem); } //! returns true if the given start and end indices are currently in range template arma_inline arma_warn_unused bool Mat::in_range(const span& x) const { arma_extra_debug_sigprint(); if(x.whole == true) { return true; } else { const uword a = x.a; const uword b = x.b; return ( (a <= b) && (b < n_elem) ); } } //! returns true if the given location is currently in range template arma_inline arma_warn_unused bool Mat::in_range(const uword in_row, const uword in_col) const { return ( (in_row < n_rows) && (in_col < n_cols) ); } template arma_inline arma_warn_unused bool Mat::in_range(const span& row_span, const uword in_col) const { arma_extra_debug_sigprint(); if(row_span.whole == true) { return (in_col < n_cols); } else { const uword in_row1 = row_span.a; const uword in_row2 = row_span.b; return ( (in_row1 <= in_row2) && (in_row2 < n_rows) && (in_col < n_cols) ); } } template arma_inline arma_warn_unused bool Mat::in_range(const uword in_row, const span& col_span) const { arma_extra_debug_sigprint(); if(col_span.whole == true) { return (in_row < n_rows); } else { const uword in_col1 = col_span.a; const uword in_col2 = col_span.b; return ( (in_row < n_rows) && (in_col1 <= in_col2) && (in_col2 < n_cols) ); } } template arma_inline arma_warn_unused bool Mat::in_range(const span& row_span, const span& col_span) const { arma_extra_debug_sigprint(); const uword in_row1 = row_span.a; const uword in_row2 = row_span.b; const uword in_col1 = col_span.a; const uword in_col2 = col_span.b; const bool rows_ok = row_span.whole ? true : ( (in_row1 <= in_row2) && (in_row2 < n_rows) ); const bool cols_ok = col_span.whole ? true : ( (in_col1 <= in_col2) && (in_col2 < n_cols) ); return ( (rows_ok == true) && (cols_ok == true) ); } template arma_inline arma_warn_unused bool Mat::in_range(const uword in_row, const uword in_col, const SizeMat& s) const { const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; if( (in_row >= l_n_rows) || (in_col >= l_n_cols) || ((in_row + s.n_rows) > l_n_rows) || ((in_col + s.n_cols) > l_n_cols) ) { return false; } else { return true; } } //! returns a pointer to array of eTs for a specified column; no bounds check template arma_inline arma_warn_unused eT* Mat::colptr(const uword in_col) { return & access::rw(mem[in_col*n_rows]); } //! returns a pointer to array of eTs for a specified column; no bounds check template arma_inline arma_warn_unused const eT* Mat::colptr(const uword in_col) const { return & mem[in_col*n_rows]; } //! returns a pointer to array of eTs used by the matrix template arma_inline arma_warn_unused eT* Mat::memptr() { return const_cast(mem); } //! returns a pointer to array of eTs used by the matrix template arma_inline arma_warn_unused const eT* Mat::memptr() const { return mem; } //! print contents of the matrix (to the cout stream), //! optionally preceding with a user specified line of text. //! the precision and cell width are modified. //! on return, the stream's state are restored to their original values. template inline void Mat::impl_print(const std::string& extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = ARMA_DEFAULT_OSTREAM.width(); ARMA_DEFAULT_OSTREAM << extra_text << '\n'; ARMA_DEFAULT_OSTREAM.width(orig_width); } arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this, true); } //! print contents of the matrix to a user specified stream, //! optionally preceding with a user specified line of text. //! the precision and cell width are modified. //! on return, the stream's state are restored to their original values. template inline void Mat::impl_print(std::ostream& user_stream, const std::string& extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = user_stream.width(); user_stream << extra_text << '\n'; user_stream.width(orig_width); } arma_ostream::print(user_stream, *this, true); } //! print contents of the matrix (to the cout stream), //! optionally preceding with a user specified line of text. //! the stream's state are used as is and are not modified //! (i.e. the precision and cell width are not modified). template inline void Mat::impl_raw_print(const std::string& extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = ARMA_DEFAULT_OSTREAM.width(); ARMA_DEFAULT_OSTREAM << extra_text << '\n'; ARMA_DEFAULT_OSTREAM.width(orig_width); } arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this, false); } //! print contents of the matrix to a user specified stream, //! optionally preceding with a user specified line of text. //! the stream's state are used as is and are not modified. //! (i.e. the precision and cell width are not modified). template inline void Mat::impl_raw_print(std::ostream& user_stream, const std::string& extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = user_stream.width(); user_stream << extra_text << '\n'; user_stream.width(orig_width); } arma_ostream::print(user_stream, *this, false); } //! change the matrix to have user specified dimensions (data is not preserved) template inline void Mat::set_size(const uword in_elem) { arma_extra_debug_sigprint(); switch(vec_state) { case 0: case 1: init_warm(in_elem, 1); break; case 2: init_warm(1, in_elem); break; default: ; } } //! change the matrix to have user specified dimensions (data is not preserved) template inline void Mat::set_size(const uword in_rows, const uword in_cols) { arma_extra_debug_sigprint(); init_warm(in_rows, in_cols); } //! change the matrix to have user specified dimensions (data is preserved) template inline void Mat::resize(const uword in_elem) { arma_extra_debug_sigprint(); switch(vec_state) { case 0: case 1: (*this).resize(in_elem, 1); break; case 2: (*this).resize(1, in_elem); break; default: ; } } //! change the matrix to have user specified dimensions (data is preserved) template inline void Mat::resize(const uword in_rows, const uword in_cols) { arma_extra_debug_sigprint(); *this = arma::resize(*this, in_rows, in_cols); } //! change the matrix to have user specified dimensions (data is preserved) template inline void Mat::reshape(const uword in_rows, const uword in_cols) { arma_extra_debug_sigprint(); *this = arma::reshape(*this, in_rows, in_cols); } //!< don't use this in new code; kept only for compatibility with old code template inline void Mat::reshape(const uword in_rows, const uword in_cols, const uword dim) { arma_extra_debug_sigprint(); *this = arma::reshape(*this, in_rows, in_cols, dim); } //! change the matrix (without preserving data) to have the same dimensions as the given expression template template inline void Mat::copy_size(const Base& X) { arma_extra_debug_sigprint(); const Proxy P(X.get_ref()); const uword X_n_rows = P.get_n_rows(); const uword X_n_cols = P.get_n_cols(); init_warm(X_n_rows, X_n_cols); } //! transform each element in the matrix using a functor template template inline const Mat& Mat::transform(functor F) { arma_extra_debug_sigprint(); eT* out_mem = memptr(); const uword N = n_elem; uword ii, jj; for(ii=0, jj=1; jj < N; ii+=2, jj+=2) { eT tmp_ii = out_mem[ii]; eT tmp_jj = out_mem[jj]; tmp_ii = eT( F(tmp_ii) ); tmp_jj = eT( F(tmp_jj) ); out_mem[ii] = tmp_ii; out_mem[jj] = tmp_jj; } if(ii < N) { out_mem[ii] = eT( F(out_mem[ii]) ); } return *this; } //! imbue (fill) the matrix with values provided by a functor template template inline const Mat& Mat::imbue(functor F) { arma_extra_debug_sigprint(); eT* out_mem = memptr(); const uword N = n_elem; uword ii, jj; for(ii=0, jj=1; jj < N; ii+=2, jj+=2) { const eT tmp_ii = eT( F() ); const eT tmp_jj = eT( F() ); out_mem[ii] = tmp_ii; out_mem[jj] = tmp_jj; } if(ii < N) { out_mem[ii] = eT( F() ); } return *this; } //! fill the matrix with the specified value template arma_hot inline const Mat& Mat::fill(const eT val) { arma_extra_debug_sigprint(); arrayops::inplace_set( memptr(), val, n_elem ); return *this; } //! fill the matrix with the specified value template template arma_hot inline const Mat& Mat::fill(const fill::fill_class&) { arma_extra_debug_sigprint(); if(is_same_type::yes) (*this).zeros(); if(is_same_type::yes) (*this).ones(); if(is_same_type::yes) (*this).eye(); if(is_same_type::yes) (*this).randu(); if(is_same_type::yes) (*this).randn(); return *this; } template inline const Mat& Mat::zeros() { arma_extra_debug_sigprint(); arrayops::fill_zeros(memptr(), n_elem); return *this; } template inline const Mat& Mat::zeros(const uword in_elem) { arma_extra_debug_sigprint(); set_size(in_elem); return (*this).zeros(); } template inline const Mat& Mat::zeros(const uword in_n_rows, const uword in_n_cols) { arma_extra_debug_sigprint(); set_size(in_n_rows, in_n_cols); return (*this).zeros(); } template inline const Mat& Mat::ones() { arma_extra_debug_sigprint(); return fill(eT(1)); } template inline const Mat& Mat::ones(const uword in_elem) { arma_extra_debug_sigprint(); set_size(in_elem); return fill(eT(1)); } template inline const Mat& Mat::ones(const uword in_rows, const uword in_cols) { arma_extra_debug_sigprint(); set_size(in_rows, in_cols); return fill(eT(1)); } template inline const Mat& Mat::randu() { arma_extra_debug_sigprint(); arma_rng::randu::fill( memptr(), n_elem ); return *this; } template inline const Mat& Mat::randu(const uword in_elem) { arma_extra_debug_sigprint(); set_size(in_elem); return (*this).randu(); } template inline const Mat& Mat::randu(const uword in_rows, const uword in_cols) { arma_extra_debug_sigprint(); set_size(in_rows, in_cols); return (*this).randu(); } template inline const Mat& Mat::randn() { arma_extra_debug_sigprint(); arma_rng::randn::fill( memptr(), n_elem ); return *this; } template inline const Mat& Mat::randn(const uword in_elem) { arma_extra_debug_sigprint(); set_size(in_elem); return (*this).randn(); } template inline const Mat& Mat::randn(const uword in_rows, const uword in_cols) { arma_extra_debug_sigprint(); set_size(in_rows, in_cols); return (*this).randn(); } template inline const Mat& Mat::eye() { arma_extra_debug_sigprint(); (*this).zeros(); const uword N = (std::min)(n_rows, n_cols); for(uword ii=0; ii inline const Mat& Mat::eye(const uword in_rows, const uword in_cols) { arma_extra_debug_sigprint(); set_size(in_rows, in_cols); return (*this).eye(); } template inline void Mat::reset() { arma_extra_debug_sigprint(); switch(vec_state) { default: init_warm(0, 0); break; case 1: init_warm(0, 1); break; case 2: init_warm(1, 0); break; } } template template inline void Mat::set_real(const Base::pod_type,T1>& X) { arma_extra_debug_sigprint(); Mat_aux::set_real(*this, X); } template template inline void Mat::set_imag(const Base::pod_type,T1>& X) { arma_extra_debug_sigprint(); Mat_aux::set_imag(*this, X); } template inline arma_warn_unused eT Mat::min() const { arma_extra_debug_sigprint(); if(n_elem == 0) { arma_debug_check(true, "Mat::min(): object has no elements"); return Datum::nan; } return op_min::direct_min(memptr(), n_elem); } template inline arma_warn_unused eT Mat::max() const { arma_extra_debug_sigprint(); if(n_elem == 0) { arma_debug_check(true, "Mat::max(): object has no elements"); return Datum::nan; } return op_max::direct_max(memptr(), n_elem); } template inline eT Mat::min(uword& index_of_min_val) const { arma_extra_debug_sigprint(); if(n_elem == 0) { arma_debug_check(true, "Mat::min(): object has no elements"); return Datum::nan; } return op_min::direct_min(memptr(), n_elem, index_of_min_val); } template inline eT Mat::max(uword& index_of_max_val) const { arma_extra_debug_sigprint(); if(n_elem == 0) { arma_debug_check(true, "Mat::max(): object has no elements"); return Datum::nan; } return op_max::direct_max(memptr(), n_elem, index_of_max_val); } template inline eT Mat::min(uword& row_of_min_val, uword& col_of_min_val) const { arma_extra_debug_sigprint(); if(n_elem == 0) { arma_debug_check(true, "Mat::min(): object has no elements"); return Datum::nan; } uword iq; eT val = op_min::direct_min(memptr(), n_elem, iq); row_of_min_val = iq % n_rows; col_of_min_val = iq / n_rows; return val; } template inline eT Mat::max(uword& row_of_max_val, uword& col_of_max_val) const { arma_extra_debug_sigprint(); if(n_elem == 0) { arma_debug_check(true, "Mat::max(): object has no elements"); return Datum::nan; } uword iq; eT val = op_max::direct_max(memptr(), n_elem, iq); row_of_max_val = iq % n_rows; col_of_max_val = iq / n_rows; return val; } //! save the matrix to a file template inline bool Mat::save(const std::string name, const file_type type, const bool print_status) const { arma_extra_debug_sigprint(); bool save_okay; switch(type) { case raw_ascii: save_okay = diskio::save_raw_ascii(*this, name); break; case arma_ascii: save_okay = diskio::save_arma_ascii(*this, name); break; case csv_ascii: save_okay = diskio::save_csv_ascii(*this, name); break; case raw_binary: save_okay = diskio::save_raw_binary(*this, name); break; case arma_binary: save_okay = diskio::save_arma_binary(*this, name); break; case pgm_binary: save_okay = diskio::save_pgm_binary(*this, name); break; case hdf5_binary: save_okay = diskio::save_hdf5_binary(*this, name); break; default: arma_warn(print_status, "Mat::save(): unsupported file type"); save_okay = false; } arma_warn( (print_status && (save_okay == false)), "Mat::save(): couldn't write to ", name); return save_okay; } //! save the matrix to a stream template inline bool Mat::save(std::ostream& os, const file_type type, const bool print_status) const { arma_extra_debug_sigprint(); bool save_okay; switch(type) { case raw_ascii: save_okay = diskio::save_raw_ascii(*this, os); break; case arma_ascii: save_okay = diskio::save_arma_ascii(*this, os); break; case csv_ascii: save_okay = diskio::save_csv_ascii(*this, os); break; case raw_binary: save_okay = diskio::save_raw_binary(*this, os); break; case arma_binary: save_okay = diskio::save_arma_binary(*this, os); break; case pgm_binary: save_okay = diskio::save_pgm_binary(*this, os); break; default: arma_warn(print_status, "Mat::save(): unsupported file type"); save_okay = false; } arma_warn( (print_status && (save_okay == false)), "Mat::save(): couldn't write to the given stream"); return save_okay; } //! load a matrix from a file template inline bool Mat::load(const std::string name, const file_type type, const bool print_status) { arma_extra_debug_sigprint(); bool load_okay; std::string err_msg; switch(type) { case auto_detect: load_okay = diskio::load_auto_detect(*this, name, err_msg); break; case raw_ascii: load_okay = diskio::load_raw_ascii(*this, name, err_msg); break; case arma_ascii: load_okay = diskio::load_arma_ascii(*this, name, err_msg); break; case csv_ascii: load_okay = diskio::load_csv_ascii(*this, name, err_msg); break; case raw_binary: load_okay = diskio::load_raw_binary(*this, name, err_msg); break; case arma_binary: load_okay = diskio::load_arma_binary(*this, name, err_msg); break; case pgm_binary: load_okay = diskio::load_pgm_binary(*this, name, err_msg); break; case hdf5_binary: load_okay = diskio::load_hdf5_binary(*this, name, err_msg); break; default: arma_warn(print_status, "Mat::load(): unsupported file type"); load_okay = false; } if( (print_status == true) && (load_okay == false) ) { if(err_msg.length() > 0) { arma_warn(true, "Mat::load(): ", err_msg, name); } else { arma_warn(true, "Mat::load(): couldn't read ", name); } } if(load_okay == false) { (*this).reset(); } return load_okay; } //! load a matrix from a stream template inline bool Mat::load(std::istream& is, const file_type type, const bool print_status) { arma_extra_debug_sigprint(); bool load_okay; std::string err_msg; switch(type) { case auto_detect: load_okay = diskio::load_auto_detect(*this, is, err_msg); break; case raw_ascii: load_okay = diskio::load_raw_ascii(*this, is, err_msg); break; case arma_ascii: load_okay = diskio::load_arma_ascii(*this, is, err_msg); break; case csv_ascii: load_okay = diskio::load_csv_ascii(*this, is, err_msg); break; case raw_binary: load_okay = diskio::load_raw_binary(*this, is, err_msg); break; case arma_binary: load_okay = diskio::load_arma_binary(*this, is, err_msg); break; case pgm_binary: load_okay = diskio::load_pgm_binary(*this, is, err_msg); break; default: arma_warn(print_status, "Mat::load(): unsupported file type"); load_okay = false; } if( (print_status == true) && (load_okay == false) ) { if(err_msg.length() > 0) { arma_warn(true, "Mat::load(): ", err_msg, "the given stream"); } else { arma_warn(true, "Mat::load(): couldn't load from the given stream"); } } if(load_okay == false) { (*this).reset(); } return load_okay; } //! save the matrix to a file, without printing any error messages template inline bool Mat::quiet_save(const std::string name, const file_type type) const { arma_extra_debug_sigprint(); return (*this).save(name, type, false); } //! save the matrix to a stream, without printing any error messages template inline bool Mat::quiet_save(std::ostream& os, const file_type type) const { arma_extra_debug_sigprint(); return (*this).save(os, type, false); } //! load a matrix from a file, without printing any error messages template inline bool Mat::quiet_load(const std::string name, const file_type type) { arma_extra_debug_sigprint(); return (*this).load(name, type, false); } //! load a matrix from a stream, without printing any error messages template inline bool Mat::quiet_load(std::istream& is, const file_type type) { arma_extra_debug_sigprint(); return (*this).load(is, type, false); } template inline Mat::row_iterator::row_iterator(Mat& in_M, const uword in_row) : M (in_M ) , row(in_row) , col(0 ) { arma_extra_debug_sigprint(); } template inline eT& Mat::row_iterator::operator*() { return M.at(row,col); } template inline typename Mat::row_iterator& Mat::row_iterator::operator++() { ++col; if(col >= M.n_cols) { col = 0; ++row; } return *this; } template inline void Mat::row_iterator::operator++(int) { operator++(); } template inline typename Mat::row_iterator& Mat::row_iterator::operator--() { if(col > 0) { --col; } else { if(row > 0) { col = M.n_cols - 1; --row; } } return *this; } template inline void Mat::row_iterator::operator--(int) { operator--(); } template inline bool Mat::row_iterator::operator!=(const typename Mat::row_iterator& X) const { return ( (row != X.row) || (col != X.col) ) ? true : false; } template inline bool Mat::row_iterator::operator==(const typename Mat::row_iterator& X) const { return ( (row == X.row) && (col == X.col) ) ? true : false; } template inline Mat::const_row_iterator::const_row_iterator(const Mat& in_M, const uword in_row) : M (in_M ) , row(in_row) , col(0 ) { arma_extra_debug_sigprint(); } template inline Mat::const_row_iterator::const_row_iterator(const typename Mat::row_iterator& X) : M (X.M) , row(X.row) , col(X.col) { arma_extra_debug_sigprint(); } template inline eT Mat::const_row_iterator::operator*() const { return M.at(row,col); } template inline typename Mat::const_row_iterator& Mat::const_row_iterator::operator++() { ++col; if(col >= M.n_cols) { col = 0; ++row; } return *this; } template inline void Mat::const_row_iterator::operator++(int) { operator++(); } template inline typename Mat::const_row_iterator& Mat::const_row_iterator::operator--() { if(col > 0) { --col; } else { if(row > 0) { col = M.n_cols - 1; --row; } } return *this; } template inline void Mat::const_row_iterator::operator--(int) { operator--(); } template inline bool Mat::const_row_iterator::operator!=(const typename Mat::const_row_iterator& X) const { return ( (row != X.row) || (col != X.col) ) ? true : false; } template inline bool Mat::const_row_iterator::operator==(const typename Mat::const_row_iterator& X) const { return ( (row == X.row) && (col == X.col) ) ? true : false; } template inline Mat::row_col_iterator::row_col_iterator() : M (NULL) , current_pos (NULL) , internal_col(0 ) , internal_row(0 ) { arma_extra_debug_sigprint(); // Technically this iterator is invalid (it does not point to a real element) } template inline Mat::row_col_iterator::row_col_iterator(const row_col_iterator& in_it) : M (in_it.M ) , current_pos (in_it.current_pos ) , internal_col(in_it.internal_col) , internal_row(in_it.internal_row) { arma_extra_debug_sigprint(); } template inline Mat::row_col_iterator::row_col_iterator(Mat& in_M, const uword in_row, const uword in_col) : M (&in_M ) , current_pos (&in_M.at(in_row,in_col)) , internal_col(in_col ) , internal_row(in_row ) { arma_extra_debug_sigprint(); } template inline eT& Mat::row_col_iterator::operator*() { return *current_pos; } template inline typename Mat::row_col_iterator& Mat::row_col_iterator::operator++() { current_pos++; internal_row++; // Check to see if we moved a column. if(internal_row == M->n_rows) { internal_col++; internal_row = 0; } return *this; } template inline typename Mat::row_col_iterator Mat::row_col_iterator::operator++(int) { typename Mat::row_col_iterator temp(*this); ++(*this); return temp; } template inline typename Mat::row_col_iterator& Mat::row_col_iterator::operator--() { if(internal_row > 0) { current_pos--; internal_row--; } else if(internal_col > 0) { current_pos--; internal_col--; internal_row = M->n_rows - 1; } return *this; } template inline typename Mat::row_col_iterator Mat::row_col_iterator::operator--(int) { typename Mat::row_col_iterator temp(*this); --(*this); return temp; } template inline uword Mat::row_col_iterator::row() const { return internal_row; } template inline uword Mat::row_col_iterator::col() const { return internal_col; } template inline bool Mat::row_col_iterator::operator==(const row_col_iterator& rhs) const { return (current_pos == rhs.current_pos); } template inline bool Mat::row_col_iterator::operator!=(const row_col_iterator& rhs) const { return (current_pos != rhs.current_pos); } template inline bool Mat::row_col_iterator::operator==(const const_row_col_iterator& rhs) const { return (current_pos == rhs.current_pos); } template inline bool Mat::row_col_iterator::operator!=(const const_row_col_iterator& rhs) const { return (current_pos != rhs.current_pos); } template inline Mat::const_row_col_iterator::const_row_col_iterator() : M (NULL) , current_pos (NULL) , internal_col(0 ) , internal_row(0 ) { arma_extra_debug_sigprint(); // Technically this iterator is invalid (it does not point to a real element) } template inline Mat::const_row_col_iterator::const_row_col_iterator(const row_col_iterator& in_it) : M (in_it.M ) , current_pos (in_it.current_pos) , internal_col(in_it.col() ) , internal_row(in_it.row() ) { arma_extra_debug_sigprint(); } template inline Mat::const_row_col_iterator::const_row_col_iterator(const const_row_col_iterator& in_it) : M (in_it.M ) , current_pos (in_it.current_pos) , internal_col(in_it.col() ) , internal_row(in_it.row() ) { arma_extra_debug_sigprint(); } template inline Mat::const_row_col_iterator::const_row_col_iterator(const Mat& in_M, const uword in_row, const uword in_col) : M (&in_M ) , current_pos (&in_M.at(in_row,in_col)) , internal_col(in_col ) , internal_row(in_row ) { arma_extra_debug_sigprint(); } template inline const eT& Mat::const_row_col_iterator::operator*() const { return *current_pos; } template inline typename Mat::const_row_col_iterator& Mat::const_row_col_iterator::operator++() { current_pos++; internal_row++; // Check to see if we moved a column. if(internal_row == M->n_rows) { internal_col++; internal_row = 0; } return *this; } template inline typename Mat::const_row_col_iterator Mat::const_row_col_iterator::operator++(int) { typename Mat::const_row_col_iterator temp(*this); ++(*this); return temp; } template inline typename Mat::const_row_col_iterator& Mat::const_row_col_iterator::operator--() { if(internal_row > 0) { current_pos--; internal_row--; } else if(internal_col > 0) { current_pos--; internal_col--; internal_row = M->n_rows - 1; } return *this; } template inline typename Mat::const_row_col_iterator Mat::const_row_col_iterator::operator--(int) { typename Mat::const_row_col_iterator temp(*this); --(*this); return temp; } template inline uword Mat::const_row_col_iterator::row() const { return internal_row; } template inline uword Mat::const_row_col_iterator::col() const { return internal_col; } template inline bool Mat::const_row_col_iterator::operator==(const const_row_col_iterator& rhs) const { return (current_pos == rhs.current_pos); } template inline bool Mat::const_row_col_iterator::operator!=(const const_row_col_iterator& rhs) const { return (current_pos != rhs.current_pos); } template inline bool Mat::const_row_col_iterator::operator==(const row_col_iterator& rhs) const { return (current_pos == rhs.current_pos); } template inline bool Mat::const_row_col_iterator::operator!=(const row_col_iterator& rhs) const { return (current_pos != rhs.current_pos); } template inline typename Mat::iterator Mat::begin() { arma_extra_debug_sigprint(); return memptr(); } template inline typename Mat::const_iterator Mat::begin() const { arma_extra_debug_sigprint(); return memptr(); } template inline typename Mat::const_iterator Mat::cbegin() const { arma_extra_debug_sigprint(); return memptr(); } template inline typename Mat::iterator Mat::end() { arma_extra_debug_sigprint(); return memptr() + n_elem; } template inline typename Mat::const_iterator Mat::end() const { arma_extra_debug_sigprint(); return memptr() + n_elem; } template inline typename Mat::const_iterator Mat::cend() const { arma_extra_debug_sigprint(); return memptr() + n_elem; } template inline typename Mat::col_iterator Mat::begin_col(const uword col_num) { arma_extra_debug_sigprint(); arma_debug_check( (col_num >= n_cols), "Mat::begin_col(): index out of bounds"); return colptr(col_num); } template inline typename Mat::const_col_iterator Mat::begin_col(const uword col_num) const { arma_extra_debug_sigprint(); arma_debug_check( (col_num >= n_cols), "Mat::begin_col(): index out of bounds"); return colptr(col_num); } template inline typename Mat::col_iterator Mat::end_col(const uword col_num) { arma_extra_debug_sigprint(); arma_debug_check( (col_num >= n_cols), "Mat::end_col(): index out of bounds"); return colptr(col_num) + n_rows; } template inline typename Mat::const_col_iterator Mat::end_col(const uword col_num) const { arma_extra_debug_sigprint(); arma_debug_check( (col_num >= n_cols), "Mat::end_col(): index out of bounds"); return colptr(col_num) + n_rows; } template inline typename Mat::row_iterator Mat::begin_row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check( (row_num >= n_rows), "Mat::begin_row(): index out of bounds" ); return typename Mat::row_iterator(*this, row_num); } template inline typename Mat::const_row_iterator Mat::begin_row(const uword row_num) const { arma_extra_debug_sigprint(); arma_debug_check( (row_num >= n_rows), "Mat::begin_row(): index out of bounds" ); return typename Mat::const_row_iterator(*this, row_num); } template inline typename Mat::row_iterator Mat::end_row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check( (row_num >= n_rows), "Mat::end_row(): index out of bounds" ); return typename Mat::row_iterator(*this, row_num + 1); } template inline typename Mat::const_row_iterator Mat::end_row(const uword row_num) const { arma_extra_debug_sigprint(); arma_debug_check( (row_num >= n_rows), "Mat::end_row(): index out of bounds" ); return typename Mat::const_row_iterator(*this, row_num + 1); } template inline typename Mat::row_col_iterator Mat::begin_row_col() { return row_col_iterator(*this); } template inline typename Mat::const_row_col_iterator Mat::begin_row_col() const { return const_row_col_iterator(*this); } template inline typename Mat::row_col_iterator Mat::end_row_col() { return row_col_iterator(*this, 0, n_cols); } template inline typename Mat::const_row_col_iterator Mat::end_row_col() const { return const_row_col_iterator(*this, 0, n_cols); } //! resets this matrix to an empty matrix template inline void Mat::clear() { reset(); } //! returns true if the matrix has no elements template inline bool Mat::empty() const { return (n_elem == 0); } //! returns the number of elements in this matrix template inline uword Mat::size() const { return n_elem; } template template arma_inline Mat::fixed::fixed() : Mat( arma_fixed_indicator(), fixed_n_rows, fixed_n_cols, 0, ((use_extra) ? mem_local_extra : mem_local) ) { arma_extra_debug_sigprint_this(this); } template template arma_inline Mat::fixed::fixed(const fixed& X) : Mat( arma_fixed_indicator(), fixed_n_rows, fixed_n_cols, 0, ((use_extra) ? mem_local_extra : mem_local) ) { arma_extra_debug_sigprint_this(this); eT* dest = (use_extra) ? mem_local_extra : mem_local; const eT* src = (use_extra) ? X.mem_local_extra : X.mem_local; arrayops::copy( dest, src, fixed_n_elem ); } template template template inline Mat::fixed::fixed(const fill::fill_class&) : Mat( arma_fixed_indicator(), fixed_n_rows, fixed_n_cols, 0, ((use_extra) ? mem_local_extra : mem_local) ) { arma_extra_debug_sigprint_this(this); if(is_same_type::yes) (*this).zeros(); if(is_same_type::yes) (*this).ones(); if(is_same_type::yes) (*this).eye(); if(is_same_type::yes) (*this).randu(); if(is_same_type::yes) (*this).randn(); } template template template inline Mat::fixed::fixed(const Base& A) : Mat( arma_fixed_indicator(), fixed_n_rows, fixed_n_cols, 0, ((use_extra) ? mem_local_extra : mem_local) ) { arma_extra_debug_sigprint_this(this); Mat::operator=(A.get_ref()); } template template template inline Mat::fixed::fixed(const Base& A, const Base& B) : Mat( arma_fixed_indicator(), fixed_n_rows, fixed_n_cols, 0, ((use_extra) ? mem_local_extra : mem_local) ) { arma_extra_debug_sigprint_this(this); Mat::init(A,B); } template template inline Mat::fixed::fixed(const eT* aux_mem) : Mat( arma_fixed_indicator(), fixed_n_rows, fixed_n_cols, 0, ((use_extra) ? mem_local_extra : mem_local) ) { arma_extra_debug_sigprint_this(this); eT* dest = (use_extra) ? mem_local_extra : mem_local; arrayops::copy( dest, aux_mem, fixed_n_elem ); } template template inline Mat::fixed::fixed(const char* text) : Mat( arma_fixed_indicator(), fixed_n_rows, fixed_n_cols, 0, ((use_extra) ? mem_local_extra : mem_local) ) { arma_extra_debug_sigprint_this(this); Mat::operator=(text); } template template inline Mat::fixed::fixed(const std::string& text) : Mat( arma_fixed_indicator(), fixed_n_rows, fixed_n_cols, 0, ((use_extra) ? mem_local_extra : mem_local) ) { arma_extra_debug_sigprint_this(this); Mat::operator=(text); } #if defined(ARMA_USE_CXX11) template template inline Mat::fixed::fixed(const std::initializer_list& list) : Mat( arma_fixed_indicator(), fixed_n_rows, fixed_n_cols, 0, ((use_extra) ? mem_local_extra : mem_local) ) { arma_extra_debug_sigprint_this(this); (*this).operator=(list); } template template inline const Mat& Mat::fixed::operator=(const std::initializer_list& list) { arma_extra_debug_sigprint(); const uword N = uword(list.size()); arma_debug_check( (N > fixed_n_elem), "Mat::fixed: initialiser list is too long" ); eT* this_mem = (*this).memptr(); arrayops::copy( this_mem, list.begin(), N ); for(uword iq=N; iq < fixed_n_elem; ++iq) { this_mem[iq] = eT(0); } return *this; } template template inline Mat::fixed::fixed(const std::initializer_list< std::initializer_list >& list) : Mat( arma_fixed_indicator(), fixed_n_rows, fixed_n_cols, 0, ((use_extra) ? mem_local_extra : mem_local) ) { arma_extra_debug_sigprint_this(this); Mat::init(list); } template template inline const Mat& Mat::fixed::operator=(const std::initializer_list< std::initializer_list >& list) { arma_extra_debug_sigprint(); Mat::init(list); return *this; } #endif template template arma_inline const Mat& Mat::fixed::operator=(const fixed& X) { arma_extra_debug_sigprint(); if(this != &X) { eT* dest = (use_extra) ? mem_local_extra : mem_local; const eT* src = (use_extra) ? X.mem_local_extra : X.mem_local; arrayops::copy( dest, src, fixed_n_elem ); } return *this; } #if defined(ARMA_GOOD_COMPILER) template template template inline const Mat& Mat::fixed::operator=(const eOp& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const bool bad_alias = (eOp::proxy_type::has_subview && X.P.is_alias(*this)); if(bad_alias == false) { arma_debug_assert_same_size(fixed_n_rows, fixed_n_cols, X.get_n_rows(), X.get_n_cols(), "Mat::fixed::operator="); eop_type::apply(*this, X); } else { arma_extra_debug_print("bad_alias = true"); Mat tmp(X); (*this) = tmp; } return *this; } template template template inline const Mat& Mat::fixed::operator=(const eGlue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); const bool bad_alias = ( (eGlue::proxy1_type::has_subview && X.P1.is_alias(*this)) || (eGlue::proxy2_type::has_subview && X.P2.is_alias(*this)) ); if(bad_alias == false) { arma_debug_assert_same_size(fixed_n_rows, fixed_n_cols, X.get_n_rows(), X.get_n_cols(), "Mat::fixed::operator="); eglue_type::apply(*this, X); } else { arma_extra_debug_print("bad_alias = true"); Mat tmp(X); (*this) = tmp; } return *this; } #endif template template arma_inline const Op< typename Mat::template fixed::Mat_fixed_type, op_htrans > Mat::fixed::t() const { return Op< typename Mat::template fixed::Mat_fixed_type, op_htrans >(*this); } template template arma_inline const Op< typename Mat::template fixed::Mat_fixed_type, op_htrans > Mat::fixed::ht() const { return Op< typename Mat::template fixed::Mat_fixed_type, op_htrans >(*this); } template template arma_inline const Op< typename Mat::template fixed::Mat_fixed_type, op_strans > Mat::fixed::st() const { return Op< typename Mat::template fixed::Mat_fixed_type, op_strans >(*this); } template template arma_inline arma_warn_unused const eT& Mat::fixed::at_alt(const uword ii) const { #if defined(ARMA_HAVE_ALIGNED_ATTRIBUTE) return (use_extra) ? mem_local_extra[ii] : mem_local[ii]; #else const eT* mem_aligned = (use_extra) ? mem_local_extra : mem_local; memory::mark_as_aligned(mem_aligned); return mem_aligned[ii]; #endif } template template arma_inline arma_warn_unused eT& Mat::fixed::operator[] (const uword ii) { return (use_extra) ? mem_local_extra[ii] : mem_local[ii]; } template template arma_inline arma_warn_unused const eT& Mat::fixed::operator[] (const uword ii) const { return (use_extra) ? mem_local_extra[ii] : mem_local[ii]; } template template arma_inline arma_warn_unused eT& Mat::fixed::at(const uword ii) { return (use_extra) ? mem_local_extra[ii] : mem_local[ii]; } template template arma_inline arma_warn_unused const eT& Mat::fixed::at(const uword ii) const { return (use_extra) ? mem_local_extra[ii] : mem_local[ii]; } template template arma_inline arma_warn_unused eT& Mat::fixed::operator() (const uword ii) { arma_debug_check( (ii >= fixed_n_elem), "Mat::operator(): index out of bounds"); return (use_extra) ? mem_local_extra[ii] : mem_local[ii]; } template template arma_inline arma_warn_unused const eT& Mat::fixed::operator() (const uword ii) const { arma_debug_check( (ii >= fixed_n_elem), "Mat::operator(): index out of bounds"); return (use_extra) ? mem_local_extra[ii] : mem_local[ii]; } template template arma_inline arma_warn_unused eT& Mat::fixed::at(const uword in_row, const uword in_col) { const uword iq = in_row + in_col*fixed_n_rows; return (use_extra) ? mem_local_extra[iq] : mem_local[iq]; } template template arma_inline arma_warn_unused const eT& Mat::fixed::at(const uword in_row, const uword in_col) const { const uword iq = in_row + in_col*fixed_n_rows; return (use_extra) ? mem_local_extra[iq] : mem_local[iq]; } template template arma_inline arma_warn_unused eT& Mat::fixed::operator() (const uword in_row, const uword in_col) { arma_debug_check( ((in_row >= fixed_n_rows) || (in_col >= fixed_n_cols)), "Mat::operator(): index out of bounds"); const uword iq = in_row + in_col*fixed_n_rows; return (use_extra) ? mem_local_extra[iq] : mem_local[iq]; } template template arma_inline arma_warn_unused const eT& Mat::fixed::operator() (const uword in_row, const uword in_col) const { arma_debug_check( ((in_row >= fixed_n_rows) || (in_col >= fixed_n_cols)), "Mat::operator(): index out of bounds"); const uword iq = in_row + in_col*fixed_n_rows; return (use_extra) ? mem_local_extra[iq] : mem_local[iq]; } template template arma_inline arma_warn_unused eT* Mat::fixed::colptr(const uword in_col) { eT* mem_actual = (use_extra) ? mem_local_extra : mem_local; return & access::rw(mem_actual[in_col*fixed_n_rows]); } template template arma_inline arma_warn_unused const eT* Mat::fixed::colptr(const uword in_col) const { const eT* mem_actual = (use_extra) ? mem_local_extra : mem_local; return & mem_actual[in_col*fixed_n_rows]; } template template arma_inline arma_warn_unused eT* Mat::fixed::memptr() { return (use_extra) ? mem_local_extra : mem_local; } template template arma_inline arma_warn_unused const eT* Mat::fixed::memptr() const { return (use_extra) ? mem_local_extra : mem_local; } template template arma_inline arma_warn_unused bool Mat::fixed::is_vec() const { return ( (fixed_n_rows == 1) || (fixed_n_cols == 1) ); } template template arma_hot inline const Mat& Mat::fixed::fill(const eT val) { arma_extra_debug_sigprint(); eT* mem_use = (use_extra) ? &(mem_local_extra[0]) : &(mem_local[0]); arrayops::inplace_set_fixed( mem_use, val ); return *this; } template template arma_hot inline const Mat& Mat::fixed::zeros() { arma_extra_debug_sigprint(); eT* mem_use = (use_extra) ? &(mem_local_extra[0]) : &(mem_local[0]); arrayops::inplace_set_fixed( mem_use, eT(0) ); return *this; } template template arma_hot inline const Mat& Mat::fixed::ones() { arma_extra_debug_sigprint(); eT* mem_use = (use_extra) ? &(mem_local_extra[0]) : &(mem_local[0]); arrayops::inplace_set_fixed( mem_use, eT(1) ); return *this; } //! prefix ++ template arma_inline void Mat_aux::prefix_pp(Mat& x) { eT* memptr = x.memptr(); const uword n_elem = x.n_elem; uword i,j; for(i=0, j=1; j arma_inline void Mat_aux::prefix_pp(Mat< std::complex >& x) { x += T(1); } //! postfix ++ template arma_inline void Mat_aux::postfix_pp(Mat& x) { eT* memptr = x.memptr(); const uword n_elem = x.n_elem; uword i,j; for(i=0, j=1; j arma_inline void Mat_aux::postfix_pp(Mat< std::complex >& x) { x += T(1); } //! prefix -- template arma_inline void Mat_aux::prefix_mm(Mat& x) { eT* memptr = x.memptr(); const uword n_elem = x.n_elem; uword i,j; for(i=0, j=1; j arma_inline void Mat_aux::prefix_mm(Mat< std::complex >& x) { x -= T(1); } //! postfix -- template arma_inline void Mat_aux::postfix_mm(Mat& x) { eT* memptr = x.memptr(); const uword n_elem = x.n_elem; uword i,j; for(i=0, j=1; j arma_inline void Mat_aux::postfix_mm(Mat< std::complex >& x) { x -= T(1); } template inline void Mat_aux::set_real(Mat& out, const Base& X) { arma_extra_debug_sigprint(); const unwrap tmp(X.get_ref()); const Mat& A = tmp.M; arma_debug_assert_same_size( out, A, "Mat::set_real()" ); out = A; } template inline void Mat_aux::set_imag(Mat&, const Base&) { arma_extra_debug_sigprint(); } template inline void Mat_aux::set_real(Mat< std::complex >& out, const Base& X) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const Proxy P(X.get_ref()); const uword local_n_rows = P.get_n_rows(); const uword local_n_cols = P.get_n_cols(); arma_debug_assert_same_size( out.n_rows, out.n_cols, local_n_rows, local_n_cols, "Mat::set_real()" ); eT* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; ea_type A = P.get_ea(); const uword N = out.n_elem; for(uword i=0; i( A[i], out_mem[i].imag() ); } } else { for(uword col=0; col < local_n_cols; ++col) for(uword row=0; row < local_n_rows; ++row) { (*out_mem) = std::complex( P.at(row,col), (*out_mem).imag() ); out_mem++; } } } template inline void Mat_aux::set_imag(Mat< std::complex >& out, const Base& X) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const Proxy P(X.get_ref()); const uword local_n_rows = P.get_n_rows(); const uword local_n_cols = P.get_n_cols(); arma_debug_assert_same_size( out.n_rows, out.n_cols, local_n_rows, local_n_cols, "Mat::set_imag()" ); eT* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; ea_type A = P.get_ea(); const uword N = out.n_elem; for(uword i=0; i( out_mem[i].real(), A[i] ); } } else { for(uword col=0; col < local_n_cols; ++col) for(uword row=0; row < local_n_rows; ++row) { (*out_mem) = std::complex( (*out_mem).real(), P.at(row,col) ); out_mem++; } } } #ifdef ARMA_EXTRA_MAT_MEAT #include ARMA_INCFILE_WRAP(ARMA_EXTRA_MAT_MEAT) #endif //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/OpCube_bones.hpp ================================================ // Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup OpCube //! @{ //! Analog of the Op class, intended for cubes template class OpCube : public BaseCube > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; inline explicit OpCube(const BaseCube& in_m); inline OpCube(const BaseCube& in_m, const elem_type in_aux); inline OpCube(const BaseCube& in_m, const elem_type in_aux, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c); inline OpCube(const BaseCube& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b); inline OpCube(const BaseCube& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c); inline OpCube(const BaseCube& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c, const uword in_aux_uword_d, const char junk); inline ~OpCube(); arma_aligned const T1& m; //!< storage of reference to the operand (e.g. a cube) arma_aligned elem_type aux; //!< storage of auxiliary data, user defined format arma_aligned uword aux_uword_a; //!< storage of auxiliary data, uword format arma_aligned uword aux_uword_b; //!< storage of auxiliary data, uword format arma_aligned uword aux_uword_c; //!< storage of auxiliary data, uword format arma_aligned uword aux_uword_d; //!< storage of auxiliary data, uword format }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/OpCube_meat.hpp ================================================ // Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup OpCube //! @{ template OpCube::OpCube(const BaseCube& in_m) : m(in_m.get_ref()) { arma_extra_debug_sigprint(); } template OpCube::OpCube(const BaseCube& in_m, const typename T1::elem_type in_aux) : m(in_m.get_ref()) , aux(in_aux) { arma_extra_debug_sigprint(); } template OpCube::OpCube(const BaseCube& in_m, const typename T1::elem_type in_aux, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c) : m(in_m.get_ref()) , aux(in_aux) , aux_uword_a(in_aux_uword_a) , aux_uword_b(in_aux_uword_b) , aux_uword_c(in_aux_uword_c) { arma_extra_debug_sigprint(); } template OpCube::OpCube(const BaseCube& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b) : m(in_m.get_ref()) , aux_uword_a(in_aux_uword_a) , aux_uword_b(in_aux_uword_b) { arma_extra_debug_sigprint(); } template OpCube::OpCube(const BaseCube& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c) : m(in_m.get_ref()) , aux_uword_a(in_aux_uword_a) , aux_uword_b(in_aux_uword_b) , aux_uword_c(in_aux_uword_c) { arma_extra_debug_sigprint(); } template OpCube::OpCube(const BaseCube& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c, const uword in_aux_uword_d, const char) : m(in_m.get_ref()) , aux_uword_a(in_aux_uword_a) , aux_uword_b(in_aux_uword_b) , aux_uword_c(in_aux_uword_c) , aux_uword_d(in_aux_uword_d) { arma_extra_debug_sigprint(); } template OpCube::~OpCube() { arma_extra_debug_sigprint(); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Op_bones.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Op //! @{ //! Class for storing data required for delayed unary operations, //! such as the operand (e.g. the matrix to which the operation is to be applied) and the unary operator (e.g. inverse). //! The operand is stored as a reference (which can be optimised away), //! while the operator is "stored" through the template definition (op_type). //! The operands can be 'Mat', 'Row', 'Col', 'Op', and 'Glue'. //! Note that as 'Glue' can be one of the operands, more than one matrix can be stored. //! //! For example, we could have: //! Op< Glue< Mat, Mat, glue_times >, op_htrans > template class Op : public Base > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = \ (T1::is_col && (is_same_type::yes || is_same_type::yes || is_same_type::yes)) || (T1::is_row && (is_same_type::yes || is_same_type::yes || is_same_type::yes || is_same_type::yes || is_same_type::yes)) || (is_same_type::yes); static const bool is_col = \ (T1::is_row && (is_same_type::yes || is_same_type::yes || is_same_type::yes)) || (T1::is_col && (is_same_type::yes || is_same_type::yes || is_same_type::yes || is_same_type::yes || is_same_type::yes)) || (is_same_type::yes) || (is_same_type::yes) || (is_same_type::yes) || (is_same_type::yes); inline explicit Op(const T1& in_m); inline Op(const T1& in_m, const elem_type in_aux); inline Op(const T1& in_m, const elem_type in_aux, const uword in_aux_uword_a, const uword in_aux_uword_b); inline Op(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b); inline Op(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c, const char junk); inline ~Op(); arma_aligned const T1& m; //!< storage of reference to the operand (eg. a matrix) arma_aligned elem_type aux; //!< storage of auxiliary data, user defined format arma_aligned uword aux_uword_a; //!< storage of auxiliary data, uword format arma_aligned uword aux_uword_b; //!< storage of auxiliary data, uword format arma_aligned uword aux_uword_c; //!< storage of auxiliary data, uword format }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Op_meat.hpp ================================================ // Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Op //! @{ template inline Op::Op(const T1& in_m) : m(in_m) { arma_extra_debug_sigprint(); } template inline Op::Op(const T1& in_m, const typename T1::elem_type in_aux) : m(in_m) , aux(in_aux) { arma_extra_debug_sigprint(); } template inline Op::Op(const T1& in_m, const typename T1::elem_type in_aux, const uword in_aux_uword_a, const uword in_aux_uword_b) : m(in_m) , aux(in_aux) , aux_uword_a(in_aux_uword_a) , aux_uword_b(in_aux_uword_b) { arma_extra_debug_sigprint(); } template inline Op::Op(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b) : m(in_m) , aux_uword_a(in_aux_uword_a) , aux_uword_b(in_aux_uword_b) { arma_extra_debug_sigprint(); } template inline Op::Op(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c, const char) : m(in_m) , aux_uword_a(in_aux_uword_a) , aux_uword_b(in_aux_uword_b) , aux_uword_c(in_aux_uword_c) { arma_extra_debug_sigprint(); } template inline Op::~Op() { arma_extra_debug_sigprint(); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Proxy.hpp ================================================ // Copyright (C) 2010-2014 Conrad Sanderson // Copyright (C) 2010-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Proxy //! @{ // ea_type is the "element accessor" type, // which can provide access to elements via operator[] template struct Proxy_default { inline Proxy_default(const T1&) { arma_type_check(( is_arma_type::value == false )); } }; template struct Proxy_fixed { typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef T1 stored_type; typedef const elem_type* ea_type; typedef const T1& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = T1::is_row; static const bool is_col = T1::is_col; arma_aligned const T1& Q; inline explicit Proxy_fixed(const T1& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline static uword get_n_rows() { return T1::n_rows; } arma_inline static uword get_n_cols() { return T1::n_cols; } arma_inline static uword get_n_elem() { return T1::n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&Q) == void_ptr(&X)); } arma_inline bool is_aligned() const { #if defined(ARMA_HAVE_ALIGNED_ATTRIBUTE) return true; #else return memory::is_aligned(Q.memptr()); #endif } }; template struct Proxy_redirect {}; template struct Proxy_redirect { typedef Proxy_default result; }; template struct Proxy_redirect { typedef Proxy_fixed result; }; template class Proxy : public Proxy_redirect::value >::result { public: inline Proxy(const T1& A) : Proxy_redirect< T1, is_Mat_fixed::value >::result(A) { } }; template class Proxy< Mat > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef Mat stored_type; typedef const eT* ea_type; typedef const Mat& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = false; arma_aligned const Mat& Q; inline explicit Proxy(const Mat& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&Q) == void_ptr(&X)); } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template class Proxy< Col > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef Col stored_type; typedef const eT* ea_type; typedef const Col& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = true; arma_aligned const Col& Q; inline explicit Proxy(const Col& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword) const { return Q[row]; } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&Q) == void_ptr(&X)); } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template class Proxy< Row > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef Row stored_type; typedef const eT* ea_type; typedef const Row& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = true; static const bool is_col = false; arma_aligned const Row& Q; inline explicit Proxy(const Row& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return 1; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword, const uword col) const { return Q[col]; } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&Q) == void_ptr(&X)); } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template class Proxy< Gen > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef Gen stored_type; typedef const Gen& ea_type; typedef const Gen& aligned_ea_type; static const bool prefer_at_accessor = Gen::prefer_at_accessor; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = Gen::is_row; static const bool is_col = Gen::is_col; arma_aligned const Gen& Q; inline explicit Proxy(const Gen& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return (is_row ? 1 : Q.n_rows); } arma_inline uword get_n_cols() const { return (is_col ? 1 : Q.n_cols); } arma_inline uword get_n_elem() const { return (is_row ? 1 : Q.n_rows) * (is_col ? 1 : Q.n_cols); } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at_alt (const uword i) const { return Q[i]; } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat&) const { return false; } arma_inline bool is_aligned() const { return Gen::is_simple; } }; template class Proxy< Op > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef Mat stored_type; typedef const elem_type* ea_type; typedef const Mat& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = Op::is_row; static const bool is_col = Op::is_col; arma_aligned const Mat Q; inline explicit Proxy(const Op& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return is_row ? 1 : Q.n_rows; } arma_inline uword get_n_cols() const { return is_col ? 1 : Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat&) const { return false; } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template class Proxy_diagvec_mat { inline Proxy_diagvec_mat(const T1&) {} }; template class Proxy_diagvec_mat< Op > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef diagview stored_type; typedef const diagview& ea_type; typedef const diagview& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = true; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = true; arma_aligned const Mat& R; arma_aligned const diagview Q; inline explicit Proxy_diagvec_mat(const Op& A) : R(A.m), Q( R.diag( (A.aux_uword_b > 0) ? -sword(A.aux_uword_a) : sword(A.aux_uword_a) ) ) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword) const { return Q.at(row, 0); } arma_inline elem_type at_alt (const uword i) const { return Q[i]; } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&R) == void_ptr(&X)); } arma_inline bool is_aligned() const { return false; } }; template class Proxy_diagvec_expr { inline Proxy_diagvec_expr(const T1&) {} }; template class Proxy_diagvec_expr< Op > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef Mat stored_type; typedef const elem_type* ea_type; typedef const Mat& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = true; arma_aligned const Mat Q; inline explicit Proxy_diagvec_expr(const Op& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword) const { return Q.at(row, 0); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat&) const { return false; } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template struct Proxy_diagvec_redirect {}; template struct Proxy_diagvec_redirect< Op, true > { typedef Proxy_diagvec_mat < Op > result; }; template struct Proxy_diagvec_redirect< Op, false> { typedef Proxy_diagvec_expr< Op > result; }; template class Proxy< Op > : public Proxy_diagvec_redirect< Op, is_Mat::value >::result { public: typedef typename Proxy_diagvec_redirect< Op, is_Mat::value >::result Proxy_diagvec; inline explicit Proxy(const Op& A) : Proxy_diagvec(A) { arma_extra_debug_sigprint(); } }; template struct Proxy_xtrans_default { inline Proxy_xtrans_default(const T1&) {} }; template struct Proxy_xtrans_default< Op > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef xtrans_mat stored_type; typedef const xtrans_mat& ea_type; typedef const xtrans_mat& aligned_ea_type; static const bool prefer_at_accessor = true; static const bool has_subview = true; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = false; const unwrap U; const xtrans_mat Q; inline explicit Proxy_xtrans_default(const Op& A) : U(A.m) , Q(U.M) { arma_extra_debug_sigprint(); } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return void_ptr(&(U.M)) == void_ptr(&X); } arma_inline bool is_aligned() const { return false; } }; template struct Proxy_xtrans_default< Op > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef xtrans_mat stored_type; typedef const xtrans_mat& ea_type; typedef const xtrans_mat& aligned_ea_type; static const bool prefer_at_accessor = true; static const bool has_subview = true; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = false; const unwrap U; const xtrans_mat Q; inline explicit Proxy_xtrans_default(const Op& A) : U(A.m) , Q(U.M) { arma_extra_debug_sigprint(); } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return void_ptr(&(U.M)) == void_ptr(&X); } arma_inline bool is_aligned() const { return false; } }; template struct Proxy_xtrans_vector { inline Proxy_xtrans_vector(const T1&) {} }; template struct Proxy_xtrans_vector< Op > { typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef Mat stored_type; typedef const elem_type* ea_type; typedef const Mat& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = quasi_unwrap::has_subview; static const bool fake_mat = true; // NOTE: the Op class takes care of swapping row and col for op_htrans static const bool is_row = Op::is_row; static const bool is_col = Op::is_col; arma_aligned const quasi_unwrap U; // avoid copy if T1 is a Row, Col or subview_col arma_aligned const Mat Q; inline Proxy_xtrans_vector(const Op& A) : U(A.m) , Q(const_cast(U.M.memptr()), U.M.n_cols, U.M.n_rows, false, false) { arma_extra_debug_sigprint(); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return U.is_alias(X); } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template struct Proxy_xtrans_vector< Op > { typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef Mat stored_type; typedef const elem_type* ea_type; typedef const Mat& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = quasi_unwrap::has_subview; static const bool fake_mat = true; // NOTE: the Op class takes care of swapping row and col for op_htrans static const bool is_row = Op::is_row; static const bool is_col = Op::is_col; arma_aligned const quasi_unwrap U; // avoid copy if T1 is a Row, Col or subview_col arma_aligned const Mat Q; inline Proxy_xtrans_vector(const Op& A) : U(A.m) , Q(const_cast(U.M.memptr()), U.M.n_cols, U.M.n_rows, false, false) { arma_extra_debug_sigprint(); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return U.is_alias(X); } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template struct Proxy_xtrans_redirect {}; template struct Proxy_xtrans_redirect { typedef Proxy_xtrans_default result; }; template struct Proxy_xtrans_redirect { typedef Proxy_xtrans_vector result; }; template class Proxy< Op > : public Proxy_xtrans_redirect < Op, ((is_complex::value == false) && ((Op::is_row) || (Op::is_col)) ) >::result { public: typedef typename Proxy_xtrans_redirect < Op, ((is_complex::value == false) && ((Op::is_row) || (Op::is_col)) ) >::result Proxy_xtrans; typedef typename Proxy_xtrans::elem_type elem_type; typedef typename Proxy_xtrans::pod_type pod_type; typedef typename Proxy_xtrans::stored_type stored_type; typedef typename Proxy_xtrans::ea_type ea_type; typedef typename Proxy_xtrans::aligned_ea_type aligned_ea_type; static const bool prefer_at_accessor = Proxy_xtrans::prefer_at_accessor; static const bool has_subview = Proxy_xtrans::has_subview; static const bool fake_mat = Proxy_xtrans::fake_mat; static const bool is_row = Proxy_xtrans::is_row; static const bool is_col = Proxy_xtrans::is_col; using Proxy_xtrans::Q; inline explicit Proxy(const Op& A) : Proxy_xtrans(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return is_row ? 1 : Q.n_rows; } arma_inline uword get_n_cols() const { return is_col ? 1 : Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Proxy_xtrans::get_ea(); } arma_inline aligned_ea_type get_aligned_ea() const { return Proxy_xtrans::get_aligned_ea(); } template arma_inline bool is_alias(const Mat& X) const { return Proxy_xtrans::is_alias(X); } arma_inline bool is_aligned() const { return Proxy_xtrans::is_aligned(); } }; template class Proxy< Op > : public Proxy_xtrans_redirect < Op, ( (Op::is_row) || (Op::is_col) ) >::result { public: typedef typename Proxy_xtrans_redirect < Op, ( (Op::is_row) || (Op::is_col) ) >::result Proxy_xtrans; typedef typename Proxy_xtrans::elem_type elem_type; typedef typename Proxy_xtrans::pod_type pod_type; typedef typename Proxy_xtrans::stored_type stored_type; typedef typename Proxy_xtrans::ea_type ea_type; typedef typename Proxy_xtrans::aligned_ea_type aligned_ea_type; static const bool prefer_at_accessor = Proxy_xtrans::prefer_at_accessor; static const bool has_subview = Proxy_xtrans::has_subview; static const bool fake_mat = Proxy_xtrans::fake_mat; static const bool is_row = Proxy_xtrans::is_row; static const bool is_col = Proxy_xtrans::is_col; using Proxy_xtrans::Q; inline explicit Proxy(const Op& A) : Proxy_xtrans(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return is_row ? 1 : Q.n_rows; } arma_inline uword get_n_cols() const { return is_col ? 1 : Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Proxy_xtrans::get_ea(); } arma_inline aligned_ea_type get_aligned_ea() const { return Proxy_xtrans::get_aligned_ea(); } template arma_inline bool is_alias(const Mat& X) const { return Proxy_xtrans::is_alias(X); } arma_inline bool is_aligned() const { return Proxy_xtrans::is_aligned(); } }; template struct Proxy_subview_row_htrans_cx { typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef subview_row_htrans stored_type; typedef const subview_row_htrans& ea_type; typedef const subview_row_htrans& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = true; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = true; arma_aligned const subview_row_htrans Q; inline explicit Proxy_subview_row_htrans_cx(const Op, op_htrans>& A) : Q(A.m) { arma_extra_debug_sigprint(); } template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&(Q.sv_row.m)) == void_ptr(&X)); } }; template struct Proxy_subview_row_htrans_non_cx { typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef subview_row_strans stored_type; typedef const subview_row_strans& ea_type; typedef const subview_row_strans& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = true; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = true; arma_aligned const subview_row_strans Q; inline explicit Proxy_subview_row_htrans_non_cx(const Op, op_htrans>& A) : Q(A.m) { arma_extra_debug_sigprint(); } template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&(Q.sv_row.m)) == void_ptr(&X)); } }; template struct Proxy_subview_row_htrans_redirect {}; template struct Proxy_subview_row_htrans_redirect { typedef Proxy_subview_row_htrans_cx result; }; template struct Proxy_subview_row_htrans_redirect { typedef Proxy_subview_row_htrans_non_cx result; }; template class Proxy< Op, op_htrans> > : public Proxy_subview_row_htrans_redirect < eT, is_complex::value >::result { public: typedef typename Proxy_subview_row_htrans_redirect < eT, is_complex::value >::result Proxy_sv_row_ht; typedef typename Proxy_sv_row_ht::elem_type elem_type; typedef typename Proxy_sv_row_ht::pod_type pod_type; typedef typename Proxy_sv_row_ht::stored_type stored_type; typedef typename Proxy_sv_row_ht::ea_type ea_type; typedef typename Proxy_sv_row_ht::ea_type aligned_ea_type; static const bool prefer_at_accessor = Proxy_sv_row_ht::prefer_at_accessor; static const bool has_subview = Proxy_sv_row_ht::has_subview; static const bool fake_mat = Proxy_sv_row_ht::fake_mat; static const bool is_row = false; static const bool is_col = true; using Proxy_sv_row_ht::Q; inline explicit Proxy(const Op, op_htrans>& A) : Proxy_sv_row_ht(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword) const { return Q[row]; } arma_inline elem_type at_alt (const uword i) const { return Q[i]; } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return Proxy_sv_row_ht::is_alias(X); } arma_inline bool is_aligned() const { return false; } }; template class Proxy< Op, op_strans> > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef subview_row_strans stored_type; typedef const subview_row_strans& ea_type; typedef const subview_row_strans& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = true; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = true; arma_aligned const subview_row_strans Q; inline explicit Proxy(const Op, op_strans>& A) : Q(A.m) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword) const { return Q[row]; } arma_inline elem_type at_alt (const uword i) const { return Q[i]; } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&(Q.sv_row.m)) == void_ptr(&X)); } arma_inline bool is_aligned() const { return false; } }; template class Proxy< Op< Row< std::complex >, op_htrans> > { public: typedef typename std::complex eT; typedef typename std::complex elem_type; typedef T pod_type; typedef xvec_htrans stored_type; typedef const xvec_htrans& ea_type; typedef const xvec_htrans& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = true; const xvec_htrans Q; const Row& src; inline explicit Proxy(const Op< Row< std::complex >, op_htrans>& A) : Q (A.m.memptr(), A.m.n_rows, A.m.n_cols) , src(A.m) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword) const { return Q[row]; } arma_inline elem_type at_alt (const uword i) const { return Q[i]; } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return void_ptr(&src) == void_ptr(&X); } arma_inline bool is_aligned() const { return false; } }; template class Proxy< Op< Col< std::complex >, op_htrans> > { public: typedef typename std::complex eT; typedef typename std::complex elem_type; typedef T pod_type; typedef xvec_htrans stored_type; typedef const xvec_htrans& ea_type; typedef const xvec_htrans& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = true; static const bool is_col = false; const xvec_htrans Q; const Col& src; inline explicit Proxy(const Op< Col< std::complex >, op_htrans>& A) : Q (A.m.memptr(), A.m.n_rows, A.m.n_cols) , src(A.m) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return 1; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword, const uword col) const { return Q[col]; } arma_inline elem_type at_alt (const uword i) const { return Q[i]; } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return void_ptr(&src) == void_ptr(&X); } arma_inline bool is_aligned() const { return false; } }; template class Proxy< Op< subview_col< std::complex >, op_htrans> > { public: typedef typename std::complex eT; typedef typename std::complex elem_type; typedef T pod_type; typedef xvec_htrans stored_type; typedef const xvec_htrans& ea_type; typedef const xvec_htrans& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = true; static const bool fake_mat = false; static const bool is_row = true; static const bool is_col = false; const xvec_htrans Q; const subview_col& src; inline explicit Proxy(const Op< subview_col< std::complex >, op_htrans>& A) : Q (A.m.colptr(0), A.m.n_rows, A.m.n_cols) , src(A.m) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return 1; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword, const uword col) const { return Q[col]; } arma_inline elem_type at_alt (const uword i) const { return Q[i]; } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return void_ptr(&src.m) == void_ptr(&X); } arma_inline bool is_aligned() const { return false; } }; template class Proxy< Op > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef eOp< Op, eop_scalar_times> stored_type; typedef const eOp< Op, eop_scalar_times>& ea_type; typedef const eOp< Op, eop_scalar_times>& aligned_ea_type; static const bool prefer_at_accessor = eOp< Op, eop_scalar_times>::prefer_at_accessor; static const bool has_subview = eOp< Op, eop_scalar_times>::has_subview; static const bool fake_mat = eOp< Op, eop_scalar_times>::fake_mat; // NOTE: the Op class takes care of swapping row and col for op_htrans static const bool is_row = eOp< Op, eop_scalar_times>::is_row; static const bool is_col = eOp< Op, eop_scalar_times>::is_col; arma_aligned const Op R; arma_aligned const eOp< Op, eop_scalar_times > Q; inline explicit Proxy(const Op& A) : R(A.m) , Q(R, A.aux) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return is_row ? 1 : Q.get_n_rows(); } arma_inline uword get_n_cols() const { return is_col ? 1 : Q.get_n_cols(); } arma_inline uword get_n_elem() const { return Q.get_n_elem(); } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return Q.P.is_alias(X); } arma_inline bool is_aligned() const { return Q.P.is_aligned(); } }; template class Proxy< Op > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef Mat stored_type; typedef const elem_type* ea_type; typedef const Mat& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = true; static const bool fake_mat = true; static const bool is_row = false; static const bool is_col = true; arma_aligned const unwrap U; arma_aligned const Mat Q; inline explicit Proxy(const Op& A) : U(A.m) , Q(const_cast(U.M.memptr()), U.M.n_elem, 1, false, false) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword) const { return Q[row]; } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return ( void_ptr(&X) == void_ptr(&(U.M)) ); } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template class Proxy< Glue > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef Mat stored_type; typedef const elem_type* ea_type; typedef const Mat& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = Glue::is_row; static const bool is_col = Glue::is_col; arma_aligned const Mat Q; inline explicit Proxy(const Glue& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return is_row ? 1 : Q.n_rows; } arma_inline uword get_n_cols() const { return is_col ? 1 : Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat&) const { return false; } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template class Proxy< subview > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef subview stored_type; typedef const subview& ea_type; typedef const subview& aligned_ea_type; static const bool prefer_at_accessor = true; static const bool has_subview = true; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = false; arma_aligned const subview& Q; inline explicit Proxy(const subview& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at_alt (const uword i) const { return Q[i]; } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&(Q.m)) == void_ptr(&X)); } arma_inline bool is_aligned() const { return false; } }; template class Proxy< subview_col > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef subview_col stored_type; typedef const eT* ea_type; typedef const subview_col& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = true; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = true; arma_aligned const subview_col& Q; inline explicit Proxy(const subview_col& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword) const { return Q[row]; } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.colmem; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&(Q.m)) == void_ptr(&X)); } arma_inline bool is_aligned() const { return memory::is_aligned(Q.colmem); } }; template class Proxy< subview_row > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef subview_row stored_type; typedef const subview_row& ea_type; typedef const subview_row& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = true; static const bool fake_mat = false; static const bool is_row = true; static const bool is_col = false; arma_aligned const subview_row& Q; inline explicit Proxy(const subview_row& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return 1; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword, const uword col) const { return Q[col]; } arma_inline elem_type at_alt (const uword i) const { return Q[i]; } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&(Q.m)) == void_ptr(&X)); } arma_inline bool is_aligned() const { return false; } }; template class Proxy< subview_row_strans > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef subview_row_strans stored_type; typedef const subview_row_strans& ea_type; typedef const subview_row_strans& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = true; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = true; arma_aligned const subview_row_strans& Q; inline explicit Proxy(const subview_row_strans& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword) const { return Q[row]; } arma_inline elem_type at_alt (const uword i) const { return Q[i]; } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&(Q.sv_row.m)) == void_ptr(&X)); } arma_inline bool is_aligned() const { return false; } }; template class Proxy< subview_row_htrans > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef subview_row_htrans stored_type; typedef const subview_row_htrans& ea_type; typedef const subview_row_htrans& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = true; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = true; arma_aligned const subview_row_htrans& Q; inline explicit Proxy(const subview_row_htrans& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword) const { return Q[row]; } arma_inline elem_type at_alt (const uword i) const { return Q[i]; } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&(Q.sv_row.m)) == void_ptr(&X)); } arma_inline bool is_aligned() const { return false; } }; template class Proxy< xtrans_mat > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef Mat stored_type; typedef const eT* ea_type; typedef const Mat& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = false; arma_aligned const Mat Q; inline explicit Proxy(const xtrans_mat& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row,col); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat&) const { return false; } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template class Proxy< xvec_htrans > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef Mat stored_type; typedef const eT* ea_type; typedef const Mat& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = false; arma_aligned const Mat Q; inline explicit Proxy(const xvec_htrans& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row,col); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat&) const { return false; } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template class Proxy< subview_elem1 > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef Mat stored_type; typedef const eT* ea_type; typedef const Mat& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = true; arma_aligned const Mat Q; inline explicit Proxy(const subview_elem1& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword) const { return Q[row]; } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat&) const { return false; } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template class Proxy< subview_elem2 > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef Mat stored_type; typedef const eT* ea_type; typedef const Mat& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = false; arma_aligned const Mat Q; inline explicit Proxy(const subview_elem2& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat&) const { return false; } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template class Proxy< diagview > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef diagview stored_type; typedef const diagview& ea_type; typedef const diagview& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = true; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = true; arma_aligned const diagview& Q; inline explicit Proxy(const diagview& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword) const { return Q.at(row, 0); } arma_inline elem_type at_alt (const uword i) const { return Q[i]; } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&(Q.m)) == void_ptr(&X)); } arma_inline bool is_aligned() const { return false; } }; template class Proxy< spdiagview > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef spdiagview stored_type; typedef const spdiagview& ea_type; typedef const spdiagview& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = false; static const bool is_col = true; arma_aligned const spdiagview& Q; inline explicit Proxy(const spdiagview& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword) const { return Q.at(row, 0); } arma_inline elem_type at_alt (const uword i) const { return Q[i]; } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat&) const { return false; } arma_inline bool is_aligned() const { return false; } }; template class Proxy< eOp > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef eOp stored_type; typedef const eOp& ea_type; typedef const eOp& aligned_ea_type; static const bool prefer_at_accessor = eOp::prefer_at_accessor; static const bool has_subview = eOp::has_subview; static const bool fake_mat = eOp::fake_mat; static const bool is_row = eOp::is_row; static const bool is_col = eOp::is_col; arma_aligned const eOp& Q; inline explicit Proxy(const eOp& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return is_row ? 1 : Q.get_n_rows(); } arma_inline uword get_n_cols() const { return is_col ? 1 : Q.get_n_cols(); } arma_inline uword get_n_elem() const { return Q.get_n_elem(); } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return Q.P.is_alias(X); } arma_inline bool is_aligned() const { return Q.P.is_aligned(); } }; template class Proxy< eGlue > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef eGlue stored_type; typedef const eGlue& ea_type; typedef const eGlue& aligned_ea_type; static const bool prefer_at_accessor = eGlue::prefer_at_accessor; static const bool has_subview = eGlue::has_subview; static const bool fake_mat = eGlue::fake_mat; static const bool is_row = eGlue::is_row; static const bool is_col = eGlue::is_col; arma_aligned const eGlue& Q; inline explicit Proxy(const eGlue& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return is_row ? 1 : Q.get_n_rows(); } arma_inline uword get_n_cols() const { return is_col ? 1 : Q.get_n_cols(); } arma_inline uword get_n_elem() const { return Q.get_n_elem(); } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat& X) const { return (Q.P1.is_alias(X) || Q.P2.is_alias(X)); } arma_inline bool is_aligned() const { return (Q.P1.is_aligned() && Q.P2.is_aligned()); } }; template class Proxy< mtOp > { public: typedef out_eT elem_type; typedef typename get_pod_type::result pod_type; typedef Mat stored_type; typedef const elem_type* ea_type; typedef const Mat& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = mtOp::is_row; static const bool is_col = mtOp::is_col; arma_aligned const Mat Q; inline explicit Proxy(const mtOp& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return is_row ? 1 : Q.n_rows; } arma_inline uword get_n_cols() const { return is_col ? 1 : Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row,col); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat&) const { return false; } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template class Proxy< mtGlue > { public: typedef out_eT elem_type; typedef typename get_pod_type::result pod_type; typedef Mat stored_type; typedef const elem_type* ea_type; typedef const Mat& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; static const bool fake_mat = false; static const bool is_row = mtGlue::is_row; static const bool is_col = mtGlue::is_col; arma_aligned const Mat Q; inline explicit Proxy(const mtGlue& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return is_row ? 1 : Q.n_rows; } arma_inline uword get_n_cols() const { return is_col ? 1 : Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row,col); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Mat&) const { return false; } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/ProxyCube.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup ProxyCube //! @{ template class ProxyCube { public: inline ProxyCube(const T1&) { arma_type_check(( is_arma_cube_type::value == false )); } }; // ea_type is the "element accessor" type, // which can provide access to elements via operator[] template class ProxyCube< Cube > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef Cube stored_type; typedef const eT* ea_type; typedef const Cube& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; arma_aligned const Cube& Q; inline explicit ProxyCube(const Cube& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; } arma_inline uword get_n_slices() const { return Q.n_slices; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Cube& X) const { return (void_ptr(&Q) == void_ptr(&X)); } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template class ProxyCube< GenCube > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef GenCube stored_type; typedef const GenCube& ea_type; typedef const GenCube& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; arma_aligned const GenCube& Q; inline explicit ProxyCube(const GenCube& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem_slice() const { return Q.n_rows*Q.n_cols; } arma_inline uword get_n_slices() const { return Q.n_slices; } arma_inline uword get_n_elem() const { return Q.n_rows*Q.n_cols*Q.n_slices; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at_alt (const uword i) const { return Q[i]; } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Cube&) const { return false; } arma_inline bool is_aligned() const { return GenCube::is_simple; } }; template class ProxyCube< OpCube > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef Cube stored_type; typedef const elem_type* ea_type; typedef const Cube& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; arma_aligned const Cube Q; inline explicit ProxyCube(const OpCube& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; } arma_inline uword get_n_slices() const { return Q.n_slices; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Cube&) const { return false; } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template class ProxyCube< GlueCube > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef Cube stored_type; typedef const elem_type* ea_type; typedef const Cube& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; arma_aligned const Cube Q; inline explicit ProxyCube(const GlueCube& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; } arma_inline uword get_n_slices() const { return Q.n_slices; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Cube&) const { return false; } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template class ProxyCube< subview_cube > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef subview_cube stored_type; typedef const subview_cube& ea_type; typedef const subview_cube& aligned_ea_type; static const bool prefer_at_accessor = true; static const bool has_subview = true; arma_aligned const subview_cube& Q; inline explicit ProxyCube(const subview_cube& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; } arma_inline uword get_n_slices() const { return Q.n_slices; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Cube& X) const { return (void_ptr(&(Q.m)) == void_ptr(&X)); } arma_inline bool is_aligned() const { return false; } }; template class ProxyCube< eOpCube > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef eOpCube stored_type; typedef const eOpCube& ea_type; typedef const eOpCube& aligned_ea_type; static const bool prefer_at_accessor = eOpCube::prefer_at_accessor; static const bool has_subview = eOpCube::has_subview; arma_aligned const eOpCube& Q; inline explicit ProxyCube(const eOpCube& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.get_n_rows(); } arma_inline uword get_n_cols() const { return Q.get_n_cols(); } arma_inline uword get_n_elem_slice() const { return Q.get_n_elem_slice(); } arma_inline uword get_n_slices() const { return Q.get_n_slices(); } arma_inline uword get_n_elem() const { return Q.get_n_elem(); } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Cube& X) const { return Q.P.is_alias(X); } arma_inline bool is_aligned() const { return Q.P.is_aligned(); } }; template class ProxyCube< eGlueCube > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef eGlueCube stored_type; typedef const eGlueCube& ea_type; typedef const eGlueCube& aligned_ea_type; static const bool prefer_at_accessor = eGlueCube::prefer_at_accessor; static const bool has_subview = eGlueCube::has_subview; arma_aligned const eGlueCube& Q; inline explicit ProxyCube(const eGlueCube& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.get_n_rows(); } arma_inline uword get_n_cols() const { return Q.get_n_cols(); } arma_inline uword get_n_elem_slice() const { return Q.get_n_elem_slice(); } arma_inline uword get_n_slices() const { return Q.get_n_slices(); } arma_inline uword get_n_elem() const { return Q.get_n_elem(); } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q; } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Cube& X) const { return (Q.P1.is_alias(X) || Q.P2.is_alias(X)); } arma_inline bool is_aligned() const { return Q.P1.is_aligned() && Q.P2.is_aligned(); } }; template class ProxyCube< mtOpCube > { public: typedef out_eT elem_type; typedef typename get_pod_type::result pod_type; typedef Cube stored_type; typedef const elem_type* ea_type; typedef const Cube& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; arma_aligned const Cube Q; inline explicit ProxyCube(const mtOpCube& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; } arma_inline uword get_n_slices() const { return Q.n_slices; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Cube&) const { return false; } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; template class ProxyCube< mtGlueCube > { public: typedef out_eT elem_type; typedef typename get_pod_type::result pod_type; typedef Cube stored_type; typedef const elem_type* ea_type; typedef const Cube& aligned_ea_type; static const bool prefer_at_accessor = false; static const bool has_subview = false; arma_aligned const Cube Q; inline explicit ProxyCube(const mtGlueCube& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem_slice() const { return Q.n_elem_slice; } arma_inline uword get_n_slices() const { return Q.n_slices; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline elem_type operator[] (const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col, const uword slice) const { return Q.at(row, col, slice); } arma_inline elem_type at_alt (const uword i) const { return Q.at_alt(i); } arma_inline ea_type get_ea() const { return Q.memptr(); } arma_inline aligned_ea_type get_aligned_ea() const { return Q; } template arma_inline bool is_alias(const Cube&) const { return false; } arma_inline bool is_aligned() const { return memory::is_aligned(Q.memptr()); } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Row_bones.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Row //! @{ //! Class for row vectors (matrices with only one row) template class Row : public Mat { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_col = false; static const bool is_row = true; inline Row(); inline Row(const Row& X); inline explicit Row(const uword N); inline Row(const uword in_rows, const uword in_cols); template inline Row(const uword n_elem, const fill::fill_class& f); template inline Row(const uword in_rows, const uword in_cols, const fill::fill_class& f); inline Row(const char* text); inline const Row& operator=(const char* text); inline Row(const std::string& text); inline const Row& operator=(const std::string& text); inline Row(const std::vector& x); inline const Row& operator=(const std::vector& x); #if defined(ARMA_USE_CXX11) inline Row(const std::initializer_list& list); inline const Row& operator=(const std::initializer_list& list); inline Row(Row&& m); inline const Row& operator=(Row&& m); #endif inline explicit Row(const SpRow& X); inline const Row& operator=(const eT val); inline const Row& operator=(const Row& X); template inline Row(const Base& X); template inline const Row& operator=(const Base& X); inline Row( eT* aux_mem, const uword aux_length, const bool copy_aux_mem = true, const bool strict = true); inline Row(const eT* aux_mem, const uword aux_length); template inline explicit Row(const Base& A, const Base& B); template inline Row(const BaseCube& X); template inline const Row& operator=(const BaseCube& X); inline Row(const subview_cube& X); inline const Row& operator=(const subview_cube& X); inline mat_injector operator<<(const eT val); arma_inline const Op,op_htrans> t() const; arma_inline const Op,op_htrans> ht() const; arma_inline const Op,op_strans> st() const; arma_inline subview_row col(const uword col_num); arma_inline const subview_row col(const uword col_num) const; using Mat::cols; using Mat::operator(); arma_inline subview_row cols(const uword in_col1, const uword in_col2); arma_inline const subview_row cols(const uword in_col1, const uword in_col2) const; arma_inline subview_row subvec(const uword in_col1, const uword in_col2); arma_inline const subview_row subvec(const uword in_col1, const uword in_col2) const; arma_inline subview_row cols(const span& col_span); arma_inline const subview_row cols(const span& col_span) const; arma_inline subview_row subvec(const span& col_span); arma_inline const subview_row subvec(const span& col_span) const; arma_inline subview_row operator()(const span& col_span); arma_inline const subview_row operator()(const span& col_span) const; arma_inline subview_row head(const uword N); arma_inline const subview_row head(const uword N) const; arma_inline subview_row tail(const uword N); arma_inline const subview_row tail(const uword N) const; arma_inline subview_row head_cols(const uword N); arma_inline const subview_row head_cols(const uword N) const; arma_inline subview_row tail_cols(const uword N); arma_inline const subview_row tail_cols(const uword N) const; inline void shed_col (const uword col_num); inline void shed_cols(const uword in_col1, const uword in_col2); inline void insert_cols(const uword col_num, const uword N, const bool set_to_zero = true); template inline void insert_cols(const uword col_num, const Base& X); arma_inline arma_warn_unused eT& at(const uword i); arma_inline arma_warn_unused const eT& at(const uword i) const; arma_inline arma_warn_unused eT& at(const uword in_row, const uword in_col); arma_inline arma_warn_unused const eT& at(const uword in_row, const uword in_col) const; typedef eT* row_iterator; typedef const eT* const_row_iterator; inline row_iterator begin_row(const uword row_num); inline const_row_iterator begin_row(const uword row_num) const; inline row_iterator end_row (const uword row_num); inline const_row_iterator end_row (const uword row_num) const; template class fixed; protected: inline Row(const arma_fixed_indicator&, const uword in_n_elem, const eT* in_mem); public: #ifdef ARMA_EXTRA_ROW_PROTO #include ARMA_INCFILE_WRAP(ARMA_EXTRA_ROW_PROTO) #endif }; template template class Row::fixed : public Row { private: static const bool use_extra = (fixed_n_elem > arma_config::mat_prealloc); arma_align_mem eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ]; public: typedef fixed Row_fixed_type; typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_col = false; static const bool is_row = true; static const uword n_rows = 1; static const uword n_cols = fixed_n_elem; static const uword n_elem = fixed_n_elem; arma_inline fixed(); arma_inline fixed(const fixed& X); inline fixed(const subview_cube& X); template inline fixed(const fill::fill_class& f); template inline fixed(const Base& A); template inline fixed(const Base& A, const Base& B); inline fixed(const eT* aux_mem); inline fixed(const char* text); inline fixed(const std::string& text); template inline const Row& operator=(const Base& A); inline const Row& operator=(const eT val); inline const Row& operator=(const char* text); inline const Row& operator=(const std::string& text); inline const Row& operator=(const subview_cube& X); using Row::operator(); #if defined(ARMA_USE_CXX11) inline fixed(const std::initializer_list& list); inline const Row& operator=(const std::initializer_list& list); #endif arma_inline const Row& operator=(const fixed& X); #if defined(ARMA_GOOD_COMPILER) template inline const Row& operator=(const eOp& X); template inline const Row& operator=(const eGlue& X); #endif arma_inline const Op< Row_fixed_type, op_htrans > t() const; arma_inline const Op< Row_fixed_type, op_htrans > ht() const; arma_inline const Op< Row_fixed_type, op_strans > st() const; arma_inline arma_warn_unused const eT& at_alt (const uword i) const; arma_inline arma_warn_unused eT& operator[] (const uword i); arma_inline arma_warn_unused const eT& operator[] (const uword i) const; arma_inline arma_warn_unused eT& at (const uword i); arma_inline arma_warn_unused const eT& at (const uword i) const; arma_inline arma_warn_unused eT& operator() (const uword i); arma_inline arma_warn_unused const eT& operator() (const uword i) const; arma_inline arma_warn_unused eT& at (const uword in_row, const uword in_col); arma_inline arma_warn_unused const eT& at (const uword in_row, const uword in_col) const; arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col); arma_inline arma_warn_unused const eT& operator() (const uword in_row, const uword in_col) const; arma_inline arma_warn_unused eT* memptr(); arma_inline arma_warn_unused const eT* memptr() const; arma_hot inline const Row& fill(const eT val); arma_hot inline const Row& zeros(); arma_hot inline const Row& ones(); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/Row_meat.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup Row //! @{ //! construct an empty row vector template inline Row::Row() : Mat(arma_vec_indicator(), 2) { arma_extra_debug_sigprint(); } template inline Row::Row(const Row& X) : Mat(arma_vec_indicator(), 1, X.n_elem, 2) { arma_extra_debug_sigprint(); arrayops::copy((*this).memptr(), X.memptr(), X.n_elem); } //! construct a row vector with the specified number of n_elem template inline Row::Row(const uword in_n_elem) : Mat(arma_vec_indicator(), 1, in_n_elem, 2) { arma_extra_debug_sigprint(); } template inline Row::Row(const uword in_n_rows, const uword in_n_cols) : Mat(arma_vec_indicator(), 2) { arma_extra_debug_sigprint(); Mat::init_warm(in_n_rows, in_n_cols); } template template inline Row::Row(const uword in_n_elem, const fill::fill_class& f) : Mat(arma_vec_indicator(), 1, in_n_elem, 2) { arma_extra_debug_sigprint(); (*this).fill(f); } template template inline Row::Row(const uword in_n_rows, const uword in_n_cols, const fill::fill_class& f) : Mat(arma_vec_indicator(), 2) { arma_extra_debug_sigprint(); Mat::init_warm(in_n_rows, in_n_cols); (*this).fill(f); } template inline Row::Row(const char* text) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 2; Mat::operator=(text); } template inline const Row& Row::operator=(const char* text) { arma_extra_debug_sigprint(); Mat::operator=(text); return *this; } template inline Row::Row(const std::string& text) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 2; Mat::operator=(text); } template inline const Row& Row::operator=(const std::string& text) { arma_extra_debug_sigprint(); Mat::operator=(text); return *this; } //! create a row vector from std::vector template inline Row::Row(const std::vector& x) : Mat(arma_vec_indicator(), 1, uword(x.size()), 2) { arma_extra_debug_sigprint_this(this); if(x.size() > 0) { arrayops::copy( Mat::memptr(), &(x[0]), uword(x.size()) ); } } //! create a row vector from std::vector template inline const Row& Row::operator=(const std::vector& x) { arma_extra_debug_sigprint(); Mat::init_warm(1, uword(x.size())); if(x.size() > 0) { arrayops::copy( Mat::memptr(), &(x[0]), uword(x.size()) ); } return *this; } #if defined(ARMA_USE_CXX11) template inline Row::Row(const std::initializer_list& list) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 2; Mat::operator=(list); } template inline const Row& Row::operator=(const std::initializer_list& list) { arma_extra_debug_sigprint(); Mat::operator=(list); return *this; } template inline Row::Row(Row&& X) : Mat(arma_vec_indicator(), 2) { arma_extra_debug_sigprint(arma_boost::format("this = %x X = %x") % this % &X); access::rw(Mat::n_rows) = 1; access::rw(Mat::n_cols) = X.n_cols; access::rw(Mat::n_elem) = X.n_elem; if( ((X.mem_state == 0) && (X.n_elem > arma_config::mat_prealloc)) || (X.mem_state == 1) || (X.mem_state == 2) ) { access::rw(Mat::mem_state) = X.mem_state; access::rw(Mat::mem) = X.mem; access::rw(X.n_rows) = 1; access::rw(X.n_cols) = 0; access::rw(X.n_elem) = 0; access::rw(X.mem_state) = 0; access::rw(X.mem) = 0; } else { (*this).init_cold(); arrayops::copy( (*this).memptr(), X.mem, X.n_elem ); if( (X.mem_state == 0) && (X.n_elem <= arma_config::mat_prealloc) ) { access::rw(X.n_rows) = 1; access::rw(X.n_cols) = 0; access::rw(X.n_elem) = 0; access::rw(X.mem) = 0; } } } template inline const Row& Row::operator=(Row&& X) { arma_extra_debug_sigprint(arma_boost::format("this = %x X = %x") % this % &X); (*this).steal_mem(X); if( (X.mem_state == 0) && (X.n_elem <= arma_config::mat_prealloc) && (this != &X) ) { access::rw(X.n_rows) = 1; access::rw(X.n_cols) = 0; access::rw(X.n_elem) = 0; access::rw(X.mem) = 0; } return *this; } #endif template inline Row::Row(const SpRow& X) : Mat(arma_vec_indicator(), 1, X.n_elem, 1) { arma_extra_debug_sigprint_this(this); arrayops::inplace_set(Mat::memptr(), eT(0), X.n_elem); for(typename SpRow::const_iterator it = X.begin(); it != X.end(); ++it) { at(it.col()) = (*it); } } template inline const Row& Row::operator=(const eT val) { arma_extra_debug_sigprint(); Mat::operator=(val); return *this; } template inline const Row& Row::operator=(const Row& X) { arma_extra_debug_sigprint(); Mat::operator=(X); return *this; } template template inline Row::Row(const Base& X) : Mat(arma_vec_indicator(), 2) { arma_extra_debug_sigprint(); Mat::operator=(X.get_ref()); } template template inline const Row& Row::operator=(const Base& X) { arma_extra_debug_sigprint(); Mat::operator=(X.get_ref()); return *this; } //! construct a row vector from a given auxiliary array template inline Row::Row(eT* aux_mem, const uword aux_length, const bool copy_aux_mem, const bool strict) : Mat(aux_mem, 1, aux_length, copy_aux_mem, strict) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 2; } //! construct a row vector from a given auxiliary array template inline Row::Row(const eT* aux_mem, const uword aux_length) : Mat(aux_mem, 1, aux_length) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 2; } template template inline Row::Row ( const Base::pod_type, T1>& A, const Base::pod_type, T2>& B ) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 2; Mat::init(A,B); } template template inline Row::Row(const BaseCube& X) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 2; Mat::operator=(X); } template template inline const Row& Row::operator=(const BaseCube& X) { arma_extra_debug_sigprint(); Mat::operator=(X); return *this; } template inline Row::Row(const subview_cube& X) { arma_extra_debug_sigprint(); access::rw(Mat::vec_state) = 2; Mat::operator=(X); } template inline const Row& Row::operator=(const subview_cube& X) { arma_extra_debug_sigprint(); Mat::operator=(X); return *this; } template inline mat_injector< Row > Row::operator<<(const eT val) { return mat_injector< Row >(*this, val); } template arma_inline const Op,op_htrans> Row::t() const { return Op,op_htrans>(*this); } template arma_inline const Op,op_htrans> Row::ht() const { return Op,op_htrans>(*this); } template arma_inline const Op,op_strans> Row::st() const { return Op,op_strans>(*this); } template arma_inline subview_row Row::col(const uword in_col1) { arma_extra_debug_sigprint(); arma_debug_check( (in_col1 >= Mat::n_cols), "Row::col(): indices out of bounds or incorrectly used"); return subview_row(*this, 0, in_col1, 1); } template arma_inline const subview_row Row::col(const uword in_col1) const { arma_extra_debug_sigprint(); arma_debug_check( (in_col1 >= Mat::n_cols), "Row::col(): indices out of bounds or incorrectly used"); return subview_row(*this, 0, in_col1, 1); } template arma_inline subview_row Row::cols(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat::n_cols) ), "Row::cols(): indices out of bounds or incorrectly used"); const uword subview_n_cols = in_col2 - in_col1 + 1; return subview_row(*this, 0, in_col1, subview_n_cols); } template arma_inline const subview_row Row::cols(const uword in_col1, const uword in_col2) const { arma_extra_debug_sigprint(); arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat::n_cols) ), "Row::cols(): indices out of bounds or incorrectly used"); const uword subview_n_cols = in_col2 - in_col1 + 1; return subview_row(*this, 0, in_col1, subview_n_cols); } template arma_inline subview_row Row::subvec(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat::n_cols) ), "Row::subvec(): indices out of bounds or incorrectly used"); const uword subview_n_cols = in_col2 - in_col1 + 1; return subview_row(*this, 0, in_col1, subview_n_cols); } template arma_inline const subview_row Row::subvec(const uword in_col1, const uword in_col2) const { arma_extra_debug_sigprint(); arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat::n_cols) ), "Row::subvec(): indices out of bounds or incorrectly used"); const uword subview_n_cols = in_col2 - in_col1 + 1; return subview_row(*this, 0, in_col1, subview_n_cols); } template arma_inline subview_row Row::cols(const span& col_span) { arma_extra_debug_sigprint(); return subvec(col_span); } template arma_inline const subview_row Row::cols(const span& col_span) const { arma_extra_debug_sigprint(); return subvec(col_span); } template arma_inline subview_row Row::subvec(const span& col_span) { arma_extra_debug_sigprint(); const bool col_all = col_span.whole; const uword local_n_cols = Mat::n_cols; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword subvec_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check( ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ), "Row::subvec(): indices out of bounds or incorrectly used"); return subview_row(*this, 0, in_col1, subvec_n_cols); } template arma_inline const subview_row Row::subvec(const span& col_span) const { arma_extra_debug_sigprint(); const bool col_all = col_span.whole; const uword local_n_cols = Mat::n_cols; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword subvec_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check( ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ), "Row::subvec(): indices out of bounds or incorrectly used"); return subview_row(*this, 0, in_col1, subvec_n_cols); } template arma_inline subview_row Row::operator()(const span& col_span) { arma_extra_debug_sigprint(); return subvec(col_span); } template arma_inline const subview_row Row::operator()(const span& col_span) const { arma_extra_debug_sigprint(); return subvec(col_span); } template arma_inline subview_row Row::head(const uword N) { arma_extra_debug_sigprint(); arma_debug_check( (N > Mat::n_cols), "Row::head(): size out of bounds"); return subview_row(*this, 0, 0, N); } template arma_inline const subview_row Row::head(const uword N) const { arma_extra_debug_sigprint(); arma_debug_check( (N > Mat::n_cols), "Row::head(): size out of bounds"); return subview_row(*this, 0, 0, N); } template arma_inline subview_row Row::tail(const uword N) { arma_extra_debug_sigprint(); arma_debug_check( (N > Mat::n_cols), "Row::tail(): size out of bounds"); const uword start_col = Mat::n_cols - N; return subview_row(*this, 0, start_col, N); } template arma_inline const subview_row Row::tail(const uword N) const { arma_extra_debug_sigprint(); arma_debug_check( (N > Mat::n_cols), "Row::tail(): size out of bounds"); const uword start_col = Mat::n_cols - N; return subview_row(*this, 0, start_col, N); } template arma_inline subview_row Row::head_cols(const uword N) { arma_extra_debug_sigprint(); return (*this).head(N); } template arma_inline const subview_row Row::head_cols(const uword N) const { arma_extra_debug_sigprint(); return (*this).head(N); } template arma_inline subview_row Row::tail_cols(const uword N) { arma_extra_debug_sigprint(); return (*this).tail(N); } template arma_inline const subview_row Row::tail_cols(const uword N) const { arma_extra_debug_sigprint(); return (*this).tail(N); } //! remove specified columns template inline void Row::shed_col(const uword col_num) { arma_extra_debug_sigprint(); arma_debug_check( col_num >= Mat::n_cols, "Row::shed_col(): index out of bounds"); shed_cols(col_num, col_num); } //! remove specified columns template inline void Row::shed_cols(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_col1 > in_col2) || (in_col2 >= Mat::n_cols), "Row::shed_cols(): indices out of bounds or incorrectly used" ); const uword n_keep_front = in_col1; const uword n_keep_back = Mat::n_cols - (in_col2 + 1); Row X(n_keep_front + n_keep_back); eT* X_mem = X.memptr(); const eT* t_mem = (*this).memptr(); if(n_keep_front > 0) { arrayops::copy( X_mem, t_mem, n_keep_front ); } if(n_keep_back > 0) { arrayops::copy( &(X_mem[n_keep_front]), &(t_mem[in_col2+1]), n_keep_back); } Mat::steal_mem(X); } //! insert N cols at the specified col position, //! optionally setting the elements of the inserted cols to zero template inline void Row::insert_cols(const uword col_num, const uword N, const bool set_to_zero) { arma_extra_debug_sigprint(); const uword t_n_cols = Mat::n_cols; const uword A_n_cols = col_num; const uword B_n_cols = t_n_cols - col_num; // insertion at col_num == n_cols is in effect an append operation arma_debug_check( (col_num > t_n_cols), "Row::insert_cols(): index out of bounds"); if(N > 0) { Row out(t_n_cols + N); eT* out_mem = out.memptr(); const eT* t_mem = (*this).memptr(); if(A_n_cols > 0) { arrayops::copy( out_mem, t_mem, A_n_cols ); } if(B_n_cols > 0) { arrayops::copy( &(out_mem[col_num + N]), &(t_mem[col_num]), B_n_cols ); } if(set_to_zero == true) { arrayops::inplace_set( &(out_mem[col_num]), eT(0), N ); } Mat::steal_mem(out); } } //! insert the given object at the specified col position; //! the given object must have one row template template inline void Row::insert_cols(const uword col_num, const Base& X) { arma_extra_debug_sigprint(); Mat::insert_cols(col_num, X); } template arma_inline arma_warn_unused eT& Row::at(const uword i) { return access::rw(Mat::mem[i]); } template arma_inline arma_warn_unused const eT& Row::at(const uword i) const { return Mat::mem[i]; } template arma_inline arma_warn_unused eT& Row::at(const uword, const uword in_col) { return access::rw( Mat::mem[in_col] ); } template arma_inline arma_warn_unused const eT& Row::at(const uword, const uword in_col) const { return Mat::mem[in_col]; } template inline typename Row::row_iterator Row::begin_row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check( (row_num >= Mat::n_rows), "Row::begin_row(): index out of bounds"); return Mat::memptr(); } template inline typename Row::const_row_iterator Row::begin_row(const uword row_num) const { arma_extra_debug_sigprint(); arma_debug_check( (row_num >= Mat::n_rows), "Row::begin_row(): index out of bounds"); return Mat::memptr(); } template inline typename Row::row_iterator Row::end_row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check( (row_num >= Mat::n_rows), "Row::end_row(): index out of bounds"); return Mat::memptr() + Mat::n_cols; } template inline typename Row::const_row_iterator Row::end_row(const uword row_num) const { arma_extra_debug_sigprint(); arma_debug_check( (row_num >= Mat::n_rows), "Row::end_row(): index out of bounds"); return Mat::memptr() + Mat::n_cols; } template template inline Row::fixed::fixed() : Row( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); } template template arma_inline Row::fixed::fixed(const fixed& X) : Row( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); eT* dest = (use_extra) ? mem_local_extra : Mat::mem_local; const eT* src = (use_extra) ? X.mem_local_extra : X.mem_local; arrayops::copy( dest, src, fixed_n_elem ); } template template arma_inline Row::fixed::fixed(const subview_cube& X) : Row( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); Row::operator=(X); } template template template inline Row::fixed::fixed(const fill::fill_class&) : Row( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); if(is_same_type::yes) (*this).zeros(); if(is_same_type::yes) (*this).ones(); if(is_same_type::yes) (*this).eye(); if(is_same_type::yes) (*this).randu(); if(is_same_type::yes) (*this).randn(); } template template template arma_inline Row::fixed::fixed(const Base& A) : Row( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); Row::operator=(A.get_ref()); } template template template arma_inline Row::fixed::fixed(const Base& A, const Base& B) : Row( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); Row::init(A,B); } template template inline Row::fixed::fixed(const eT* aux_mem) : Row( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); eT* dest = (use_extra) ? mem_local_extra : Mat::mem_local; arrayops::copy( dest, aux_mem, fixed_n_elem ); } template template inline Row::fixed::fixed(const char* text) : Row( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); Row::operator=(text); } template template inline Row::fixed::fixed(const std::string& text) : Row( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); Row::operator=(text); } template template template const Row& Row::fixed::operator=(const Base& A) { arma_extra_debug_sigprint(); Row::operator=(A.get_ref()); return *this; } template template const Row& Row::fixed::operator=(const eT val) { arma_extra_debug_sigprint(); Row::operator=(val); return *this; } template template const Row& Row::fixed::operator=(const char* text) { arma_extra_debug_sigprint(); Row::operator=(text); return *this; } template template const Row& Row::fixed::operator=(const std::string& text) { arma_extra_debug_sigprint(); Row::operator=(text); return *this; } template template const Row& Row::fixed::operator=(const subview_cube& X) { arma_extra_debug_sigprint(); Row::operator=(X); return *this; } #if defined(ARMA_USE_CXX11) template template inline Row::fixed::fixed(const std::initializer_list& list) : Row( arma_fixed_indicator(), fixed_n_elem, ((use_extra) ? mem_local_extra : Mat::mem_local) ) { arma_extra_debug_sigprint_this(this); (*this).operator=(list); } template template inline const Row& Row::fixed::operator=(const std::initializer_list& list) { arma_extra_debug_sigprint(); const uword N = uword(list.size()); arma_debug_check( (N > fixed_n_elem), "Row::fixed: initialiser list is too long" ); eT* this_mem = (*this).memptr(); arrayops::copy( this_mem, list.begin(), N ); for(uword iq=N; iq < fixed_n_elem; ++iq) { this_mem[iq] = eT(0); } return *this; } #endif template template arma_inline const Row& Row::fixed::operator=(const fixed& X) { arma_extra_debug_sigprint(); if(this != &X) { eT* dest = (use_extra) ? mem_local_extra : Mat::mem_local; const eT* src = (use_extra) ? X.mem_local_extra : X.mem_local; arrayops::copy( dest, src, fixed_n_elem ); } return *this; } #if defined(ARMA_GOOD_COMPILER) template template template inline const Row& Row::fixed::operator=(const eOp& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const bool bad_alias = (eOp::proxy_type::has_subview && X.P.is_alias(*this)); if(bad_alias == false) { arma_debug_assert_same_size(uword(1), fixed_n_elem, X.get_n_rows(), X.get_n_cols(), "Row::fixed::operator="); eop_type::apply(*this, X); } else { arma_extra_debug_print("bad_alias = true"); Row tmp(X); (*this) = tmp; } return *this; } template template template inline const Row& Row::fixed::operator=(const eGlue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); arma_type_check(( is_same_type< eT, typename T2::elem_type >::no )); const bool bad_alias = ( (eGlue::proxy1_type::has_subview && X.P1.is_alias(*this)) || (eGlue::proxy2_type::has_subview && X.P2.is_alias(*this)) ); if(bad_alias == false) { arma_debug_assert_same_size(uword(1), fixed_n_elem, X.get_n_rows(), X.get_n_cols(), "Row::fixed::operator="); eglue_type::apply(*this, X); } else { arma_extra_debug_print("bad_alias = true"); Row tmp(X); (*this) = tmp; } return *this; } #endif template template arma_inline const Op< typename Row::template fixed::Row_fixed_type, op_htrans > Row::fixed::t() const { return Op< typename Row::template fixed::Row_fixed_type, op_htrans >(*this); } template template arma_inline const Op< typename Row::template fixed::Row_fixed_type, op_htrans > Row::fixed::ht() const { return Op< typename Row::template fixed::Row_fixed_type, op_htrans >(*this); } template template arma_inline const Op< typename Row::template fixed::Row_fixed_type, op_strans > Row::fixed::st() const { return Op< typename Row::template fixed::Row_fixed_type, op_strans >(*this); } template template arma_inline arma_warn_unused const eT& Row::fixed::at_alt(const uword ii) const { #if defined(ARMA_HAVE_ALIGNED_ATTRIBUTE) return (use_extra) ? mem_local_extra[ii] : Mat::mem_local[ii]; #else const eT* mem_aligned = (use_extra) ? mem_local_extra : Mat::mem_local; memory::mark_as_aligned(mem_aligned); return mem_aligned[ii]; #endif } template template arma_inline arma_warn_unused eT& Row::fixed::operator[] (const uword ii) { return (use_extra) ? mem_local_extra[ii] : Mat::mem_local[ii]; } template template arma_inline arma_warn_unused const eT& Row::fixed::operator[] (const uword ii) const { return (use_extra) ? mem_local_extra[ii] : Mat::mem_local[ii]; } template template arma_inline arma_warn_unused eT& Row::fixed::at(const uword ii) { return (use_extra) ? mem_local_extra[ii] : Mat::mem_local[ii]; } template template arma_inline arma_warn_unused const eT& Row::fixed::at(const uword ii) const { return (use_extra) ? mem_local_extra[ii] : Mat::mem_local[ii]; } template template arma_inline arma_warn_unused eT& Row::fixed::operator() (const uword ii) { arma_debug_check( (ii >= fixed_n_elem), "Row::operator(): index out of bounds"); return (use_extra) ? mem_local_extra[ii] : Mat::mem_local[ii]; } template template arma_inline arma_warn_unused const eT& Row::fixed::operator() (const uword ii) const { arma_debug_check( (ii >= fixed_n_elem), "Row::operator(): index out of bounds"); return (use_extra) ? mem_local_extra[ii] : Mat::mem_local[ii]; } template template arma_inline arma_warn_unused eT& Row::fixed::at(const uword, const uword in_col) { return (use_extra) ? mem_local_extra[in_col] : Mat::mem_local[in_col]; } template template arma_inline arma_warn_unused const eT& Row::fixed::at(const uword, const uword in_col) const { return (use_extra) ? mem_local_extra[in_col] : Mat::mem_local[in_col]; } template template arma_inline arma_warn_unused eT& Row::fixed::operator() (const uword in_row, const uword in_col) { arma_debug_check( ((in_row > 0) || (in_col >= fixed_n_elem)), "Row::operator(): index out of bounds" ); return (use_extra) ? mem_local_extra[in_col] : Mat::mem_local[in_col]; } template template arma_inline arma_warn_unused const eT& Row::fixed::operator() (const uword in_row, const uword in_col) const { arma_debug_check( ((in_row > 0) || (in_col >= fixed_n_elem)), "Row::operator(): index out of bounds" ); return (use_extra) ? mem_local_extra[in_col] : Mat::mem_local[in_col]; } template template arma_inline arma_warn_unused eT* Row::fixed::memptr() { return (use_extra) ? mem_local_extra : Mat::mem_local; } template template arma_inline arma_warn_unused const eT* Row::fixed::memptr() const { return (use_extra) ? mem_local_extra : Mat::mem_local; } template template arma_hot inline const Row& Row::fixed::fill(const eT val) { arma_extra_debug_sigprint(); eT* mem_use = (use_extra) ? &(mem_local_extra[0]) : &(Mat::mem_local[0]); arrayops::inplace_set_fixed( mem_use, val ); return *this; } template template arma_hot inline const Row& Row::fixed::zeros() { arma_extra_debug_sigprint(); eT* mem_use = (use_extra) ? &(mem_local_extra[0]) : &(Mat::mem_local[0]); arrayops::inplace_set_fixed( mem_use, eT(0) ); return *this; } template template arma_hot inline const Row& Row::fixed::ones() { arma_extra_debug_sigprint(); eT* mem_use = (use_extra) ? &(mem_local_extra[0]) : &(Mat::mem_local[0]); arrayops::inplace_set_fixed( mem_use, eT(1) ); return *this; } template inline Row::Row(const arma_fixed_indicator&, const uword in_n_elem, const eT* in_mem) : Mat(arma_fixed_indicator(), 1, in_n_elem, 2, in_mem) { arma_extra_debug_sigprint_this(this); } #ifdef ARMA_EXTRA_ROW_MEAT #include ARMA_INCFILE_WRAP(ARMA_EXTRA_ROW_MEAT) #endif //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SizeCube_bones.hpp ================================================ // Copyright (C) 2013-2014 Conrad Sanderson // Copyright (C) 2013-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SizeCube //! @{ class SizeCube { public: const uword n_rows; const uword n_cols; const uword n_slices; inline SizeCube(const uword in_n_rows = 0, const uword in_n_cols = 0, const uword in_n_slices = 0); // inline operator SizeMat () const; inline bool operator==(const SizeCube& s) const; inline bool operator!=(const SizeCube& s) const; inline bool operator==(const SizeMat& s) const; inline bool operator!=(const SizeMat& s) const; inline void print(const std::string extra_text = "") const; inline void print(std::ostream& user_stream, const std::string extra_text = "") const; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SizeCube_meat.hpp ================================================ // Copyright (C) 2013-2014 Conrad Sanderson // Copyright (C) 2013-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SizeCube //! @{ inline SizeCube::SizeCube(const uword in_n_rows, const uword in_n_cols, const uword in_n_slices) : n_rows (in_n_rows ) , n_cols (in_n_cols ) , n_slices(in_n_slices) { arma_extra_debug_sigprint(); } // inline // SizeCube::operator SizeMat () const // { // arma_debug_check( (n_slices != 1), "SizeCube: n_slices != 1, hence cube size cannot be interpreted as matrix size" ); // // return SizeMat(n_rows, n_cols); // } inline bool SizeCube::operator==(const SizeCube& s) const { if(n_rows != s.n_rows ) { return false; } if(n_cols != s.n_cols ) { return false; } if(n_slices != s.n_slices) { return false; } return true; } inline bool SizeCube::operator!=(const SizeCube& s) const { if(n_rows != s.n_rows ) { return true; } if(n_cols != s.n_cols ) { return true; } if(n_slices != s.n_slices) { return true; } return false; } inline bool SizeCube::operator==(const SizeMat& s) const { if(n_rows != s.n_rows) { return false; } if(n_cols != s.n_cols) { return false; } if(n_slices != uword(1)) { return false; } return true; } inline bool SizeCube::operator!=(const SizeMat& s) const { if(n_rows != s.n_rows) { return true; } if(n_cols != s.n_cols) { return true; } if(n_slices != uword(1)) { return true; } return false; } inline void SizeCube::print(const std::string extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = ARMA_DEFAULT_OSTREAM.width(); ARMA_DEFAULT_OSTREAM << extra_text << ' '; ARMA_DEFAULT_OSTREAM.width(orig_width); } arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this); } inline void SizeCube::print(std::ostream& user_stream, const std::string extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = user_stream.width(); user_stream << extra_text << ' '; user_stream.width(orig_width); } arma_ostream::print(user_stream, *this); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SizeMat_bones.hpp ================================================ // Copyright (C) 2013-2014 Conrad Sanderson // Copyright (C) 2013-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SizeMat //! @{ class SizeMat { public: const uword n_rows; const uword n_cols; inline SizeMat(const uword in_n_rows = 0, const uword in_n_cols = 0); // inline operator SizeCube () const; inline bool operator==(const SizeMat& s) const; inline bool operator!=(const SizeMat& s) const; inline bool operator==(const SizeCube& s) const; inline bool operator!=(const SizeCube& s) const; inline void print(const std::string extra_text = "") const; inline void print(std::ostream& user_stream, const std::string extra_text = "") const; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SizeMat_meat.hpp ================================================ // Copyright (C) 2013-2014 Conrad Sanderson // Copyright (C) 2013-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SizeMat //! @{ inline SizeMat::SizeMat(const uword in_n_rows, const uword in_n_cols) : n_rows(in_n_rows) , n_cols(in_n_cols) { arma_extra_debug_sigprint(); } // inline // SizeMat::operator SizeCube () const // { // return SizeCube(n_rows, n_cols, 1); // } inline bool SizeMat::operator==(const SizeMat& s) const { if(n_rows != s.n_rows) { return false; } if(n_cols != s.n_cols) { return false; } return true; } inline bool SizeMat::operator!=(const SizeMat& s) const { if(n_rows != s.n_rows) { return true; } if(n_cols != s.n_cols) { return true; } return false; } inline bool SizeMat::operator==(const SizeCube& s) const { if(n_rows != s.n_rows ) { return false; } if(n_cols != s.n_cols ) { return false; } if(uword(1) != s.n_slices) { return false; } return true; } inline bool SizeMat::operator!=(const SizeCube& s) const { if(n_rows != s.n_rows ) { return true; } if(n_cols != s.n_cols ) { return true; } if(uword(1) != s.n_slices) { return true; } return false; } inline void SizeMat::print(const std::string extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = ARMA_DEFAULT_OSTREAM.width(); ARMA_DEFAULT_OSTREAM << extra_text << ' '; ARMA_DEFAULT_OSTREAM.width(orig_width); } arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this); } inline void SizeMat::print(std::ostream& user_stream, const std::string extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = user_stream.width(); user_stream << extra_text << ' '; user_stream.width(orig_width); } arma_ostream::print(user_stream, *this); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpBase_bones.hpp ================================================ // Copyright (C) 2012-2014 Conrad Sanderson // Copyright (C) 2012-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpBase //! @{ template struct SpBase_eval_SpMat { inline const derived& eval() const; }; template struct SpBase_eval_expr { inline SpMat eval() const; //!< force the immediate evaluation of a delayed expression }; template struct SpBase_eval {}; template struct SpBase_eval { typedef SpBase_eval_SpMat result; }; template struct SpBase_eval { typedef SpBase_eval_expr result; }; template struct SpBase : public SpBase_eval::value>::result { arma_inline const derived& get_ref() const; inline const SpOp t() const; //!< Hermitian transpose inline const SpOp ht() const; //!< Hermitian transpose inline const SpOp st() const; //!< simple transpose inline void print(const std::string extra_text = "") const; inline void print(std::ostream& user_stream, const std::string extra_text = "") const; inline void raw_print(const std::string extra_text = "") const; inline void raw_print(std::ostream& user_stream, const std::string extra_text = "") const; inline void print_dense(const std::string extra_text = "") const; inline void print_dense(std::ostream& user_stream, const std::string extra_text = "") const; inline void raw_print_dense(const std::string extra_text = "") const; inline void raw_print_dense(std::ostream& user_stream, const std::string extra_text = "") const; inline arma_warn_unused elem_type min() const; inline arma_warn_unused elem_type max() const; inline elem_type min(uword& index_of_min_val) const; inline elem_type max(uword& index_of_max_val) const; inline elem_type min(uword& row_of_min_val, uword& col_of_min_val) const; inline elem_type max(uword& row_of_max_val, uword& col_of_max_val) const; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpBase_meat.hpp ================================================ // Copyright (C) 2012-2014 Conrad Sanderson // Copyright (C) 2012-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpBase //! @{ template arma_inline const derived& SpBase::get_ref() const { return static_cast(*this); } template inline const SpOp SpBase::t() const { return SpOp( (*this).get_ref() ); } template inline const SpOp SpBase::ht() const { return SpOp( (*this).get_ref() ); } template inline const SpOp SpBase::st() const { return SpOp( (*this).get_ref() ); } template inline void SpBase::print(const std::string extra_text) const { const unwrap_spmat tmp( (*this).get_ref() ); tmp.M.impl_print(extra_text); } template inline void SpBase::print(std::ostream& user_stream, const std::string extra_text) const { const unwrap_spmat tmp( (*this).get_ref() ); tmp.M.impl_print(user_stream, extra_text); } template inline void SpBase::raw_print(const std::string extra_text) const { const unwrap_spmat tmp( (*this).get_ref() ); tmp.M.impl_raw_print(extra_text); } template inline void SpBase::raw_print(std::ostream& user_stream, const std::string extra_text) const { const unwrap_spmat tmp( (*this).get_ref() ); tmp.M.impl_raw_print(user_stream, extra_text); } template inline void SpBase::print_dense(const std::string extra_text) const { const unwrap_spmat tmp( (*this).get_ref() ); tmp.M.impl_print_dense(extra_text); } template inline void SpBase::print_dense(std::ostream& user_stream, const std::string extra_text) const { const unwrap_spmat tmp( (*this).get_ref() ); tmp.M.impl_print_dense(user_stream, extra_text); } template inline void SpBase::raw_print_dense(const std::string extra_text) const { const unwrap_spmat tmp( (*this).get_ref() ); tmp.M.impl_raw_print_dense(extra_text); } template inline void SpBase::raw_print_dense(std::ostream& user_stream, const std::string extra_text) const { const unwrap_spmat tmp( (*this).get_ref() ); tmp.M.impl_raw_print_dense(user_stream, extra_text); } // // extra functions defined in SpBase_eval_SpMat template inline const derived& SpBase_eval_SpMat::eval() const { arma_extra_debug_sigprint(); return static_cast(*this); } // // extra functions defined in SpBase_eval_expr template inline SpMat SpBase_eval_expr::eval() const { arma_extra_debug_sigprint(); return SpMat( static_cast(*this) ); } template inline arma_warn_unused elem_type SpBase::min() const { return spop_min::min( (*this).get_ref() ); } template inline arma_warn_unused elem_type SpBase::max() const { return spop_max::max( (*this).get_ref() ); } template inline elem_type SpBase::min(uword& index_of_min_val) const { const SpProxy P( (*this).get_ref() ); return spop_min::min_with_index(P, index_of_min_val); } template inline elem_type SpBase::max(uword& index_of_max_val) const { const SpProxy P( (*this).get_ref() ); return spop_max::max_with_index(P, index_of_max_val); } template inline elem_type SpBase::min(uword& row_of_min_val, uword& col_of_min_val) const { const SpProxy P( (*this).get_ref() ); uword index; const elem_type val = spop_min::min_with_index(P, index); const uword local_n_rows = P.get_n_rows(); row_of_min_val = index % local_n_rows; col_of_min_val = index / local_n_rows; return val; } template inline elem_type SpBase::max(uword& row_of_max_val, uword& col_of_max_val) const { const SpProxy P( (*this).get_ref() ); uword index; const elem_type val = spop_max::max_with_index(P, index); const uword local_n_rows = P.get_n_rows(); row_of_max_val = index % local_n_rows; col_of_max_val = index / local_n_rows; return val; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpCol_bones.hpp ================================================ // Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2011 Matthew Amidon // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpCol //! @{ //! Class for sparse column vectors (matrices with only one column) template class SpCol : public SpMat { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = false; static const bool is_col = true; inline SpCol(); inline explicit SpCol(const uword n_elem); inline SpCol(const uword in_rows, const uword in_cols); inline SpCol(const char* text); inline const SpCol& operator=(const char* text); inline SpCol(const std::string& text); inline const SpCol& operator=(const std::string& text); inline const SpCol& operator=(const eT val); template inline SpCol(const Base& X); template inline const SpCol& operator=(const Base& X); template inline SpCol(const SpBase& X); template inline const SpCol& operator=(const SpBase& X); template inline explicit SpCol(const SpBase& A, const SpBase& B); inline void shed_row (const uword row_num); inline void shed_rows(const uword in_row1, const uword in_row2); // inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero = true); typedef typename SpMat::iterator row_iterator; typedef typename SpMat::const_iterator const_row_iterator; inline row_iterator begin_row(const uword row_num = 0); inline const_row_iterator begin_row(const uword row_num = 0) const; inline row_iterator end_row (const uword row_num = 0); inline const_row_iterator end_row (const uword row_num = 0) const; #ifdef ARMA_EXTRA_SPCOL_PROTO #include ARMA_INCFILE_WRAP(ARMA_EXTRA_SPCOL_PROTO) #endif }; ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpCol_meat.hpp ================================================ // Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2015 Conrad Sanderson // Copyright (C) 2011 Matthew Amidon // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpCol //! @{ //! construct an empty column vector template inline SpCol::SpCol() : SpMat(0, 1) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 1; } //! construct a column vector with the specified number of elements template inline SpCol::SpCol(const uword in_n_elem) : SpMat(in_n_elem, 1) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 1; } template inline SpCol::SpCol(const uword in_n_rows, const uword in_n_cols) : SpMat(in_n_rows, in_n_cols) { arma_extra_debug_sigprint(); arma_debug_check((in_n_cols != 1), "SpCol::SpCol(): must have only one column"); access::rw(SpMat::vec_state) = 1; } //! construct a column vector from specified text template inline SpCol::SpCol(const char* text) : SpMat(text) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 1; arma_debug_check((SpMat::n_cols != 1), "SpCol::SpCol(): must have only one column"); } //! construct a column vector from specified text template inline const SpCol& SpCol::operator=(const char* text) { arma_extra_debug_sigprint(); SpMat::init(std::string(text)); access::rw(SpMat::vec_state) = 1; return *this; } //! construct a column vector from specified text template inline SpCol::SpCol(const std::string& text) : SpMat(text) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 1; arma_debug_check((SpMat::n_cols != 1), "SpCol::SpCol(): must have only one column"); } //! construct a column vector from specified text template inline const SpCol& SpCol::operator=(const std::string& text) { arma_extra_debug_sigprint(); SpMat::init(std::string(text)); return *this; } template inline const SpCol& SpCol::operator=(const eT val) { arma_extra_debug_sigprint(); SpMat::operator=(val); return *this; } template template inline SpCol::SpCol(const Base& X) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 1; SpMat::operator=(X.get_ref()); } template template inline const SpCol& SpCol::operator=(const Base& X) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 1; SpMat::operator=(X.get_ref()); return *this; } template template inline SpCol::SpCol(const SpBase& X) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 1; SpMat::operator=(X.get_ref()); } template template inline const SpCol& SpCol::operator=(const SpBase& X) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 1; SpMat::operator=(X.get_ref()); return *this; } template template inline SpCol::SpCol ( const SpBase::pod_type, T1>& A, const SpBase::pod_type, T2>& B ) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 1; SpMat::init(A,B); } //! remove specified row template inline void SpCol::shed_row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check( row_num >= SpMat::n_rows, "SpCol::shed_row(): out of bounds"); shed_rows(row_num, row_num); } //! remove specified rows template inline void SpCol::shed_rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_row2 >= SpMat::n_rows), "SpCol::shed_rows(): indices out of bounds or incorrectly used" ); const uword diff = (in_row2 - in_row1 + 1); // This is easy because everything is in one column. uword start = 0, end = 0; bool start_found = false, end_found = false; for(uword i = 0; i < SpMat::n_nonzero; ++i) { // Start position found? if (SpMat::row_indices[i] >= in_row1 && !start_found) { start = i; start_found = true; } // End position found? if (SpMat::row_indices[i] > in_row2) { end = i; end_found = true; break; } } if (!end_found) { end = SpMat::n_nonzero; } // Now we can make the copy. if (start != end) { const uword elem_diff = end - start; eT* new_values = memory::acquire_chunked (SpMat::n_nonzero - elem_diff); uword* new_row_indices = memory::acquire_chunked(SpMat::n_nonzero - elem_diff); // Copy before the section we are dropping (if it exists). if (start > 0) { arrayops::copy(new_values, SpMat::values, start); arrayops::copy(new_row_indices, SpMat::row_indices, start); } // Copy after the section we are dropping (if it exists). if (end != SpMat::n_nonzero) { arrayops::copy(new_values + start, SpMat::values + end, (SpMat::n_nonzero - end)); arrayops::copy(new_row_indices + start, SpMat::row_indices + end, (SpMat::n_nonzero - end)); arrayops::inplace_minus(new_row_indices + start, diff, (SpMat::n_nonzero - end)); } memory::release(SpMat::values); memory::release(SpMat::row_indices); access::rw(SpMat::values) = new_values; access::rw(SpMat::row_indices) = new_row_indices; access::rw(SpMat::n_nonzero) -= elem_diff; access::rw(SpMat::col_ptrs[1]) -= elem_diff; } access::rw(SpMat::n_rows) -= diff; access::rw(SpMat::n_elem) -= diff; } // //! insert N rows at the specified row position, // //! optionally setting the elements of the inserted rows to zero // template // inline // void // SpCol::insert_rows(const uword row_num, const uword N, const bool set_to_zero) // { // arma_extra_debug_sigprint(); // // arma_debug_check(set_to_zero == false, "SpCol::insert_rows(): cannot set nonzero values"); // // arma_debug_check((row_num > SpMat::n_rows), "SpCol::insert_rows(): out of bounds"); // // for(uword row = 0; row < SpMat::n_rows; ++row) // { // if (SpMat::row_indices[row] >= row_num) // { // access::rw(SpMat::row_indices[row]) += N; // } // } // // access::rw(SpMat::n_rows) += N; // access::rw(SpMat::n_elem) += N; // } template inline typename SpCol::row_iterator SpCol::begin_row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check( (row_num >= SpMat::n_rows), "SpCol::begin_row(): index out of bounds"); return row_iterator(*this, row_num, 0); } template inline typename SpCol::const_row_iterator SpCol::begin_row(const uword row_num) const { arma_extra_debug_sigprint(); arma_debug_check( (row_num >= SpMat::n_rows), "SpCol::begin_row(): index out of bounds"); return const_row_iterator(*this, row_num, 0); } template inline typename SpCol::row_iterator SpCol::end_row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check( (row_num >= SpMat::n_rows), "SpCol::end_row(): index out of bounds"); return row_iterator(*this, row_num + 1, 0); } template inline typename SpCol::const_row_iterator SpCol::end_row(const uword row_num) const { arma_extra_debug_sigprint(); arma_debug_check( (row_num >= SpMat::n_rows), "SpCol::end_row(): index out of bounds"); return const_row_iterator(*this, row_num + 1, 0); } #ifdef ARMA_EXTRA_SPCOL_MEAT #include ARMA_INCFILE_WRAP(ARMA_EXTRA_SPCOL_MEAT) #endif //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpGlue_bones.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpGlue //! @{ template class SpGlue : public SpBase > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = ( (T1::is_row || T2::is_row) && is_spglue_elem::value ) || ( (is_spglue_times::value || is_spglue_times2::value) ? T1::is_row : false ); static const bool is_col = ( (T1::is_col || T2::is_col) && is_spglue_elem::value ) || ( (is_spglue_times::value || is_spglue_times2::value) ? T2::is_col : false ); arma_inline SpGlue(const T1& in_A, const T2& in_B); arma_inline SpGlue(const T1& in_A, const T2& in_B, const elem_type in_aux); arma_inline ~SpGlue(); const T1& A; //!< first operand const T2& B; //!< second operand elem_type aux; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpGlue_meat.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpGlue //! @{ template inline SpGlue::SpGlue(const T1& in_A, const T2& in_B) : A(in_A) , B(in_B) { arma_extra_debug_sigprint(); } template inline SpGlue::SpGlue(const T1& in_A, const T2& in_B, const typename T1::elem_type in_aux) : A(in_A) , B(in_B) , aux(in_aux) { arma_extra_debug_sigprint(); } template inline SpGlue::~SpGlue() { arma_extra_debug_sigprint(); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpMat_bones.hpp ================================================ // Copyright (C) 2011-2014 Ryan Curtin // Copyright (C) 2012-2015 Conrad Sanderson // Copyright (C) 2011 Matthew Amidon // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpMat //! @{ //! Sparse matrix class, with data stored in compressed sparse column (CSC) format template class SpMat : public SpBase< eT, SpMat > { public: typedef eT elem_type; //!< the type of elements stored in the matrix typedef typename get_pod_type::result pod_type; //!< if eT is non-complex, pod_type is the same as eT; otherwise, pod_type is the underlying type used by std::complex static const bool is_row = false; static const bool is_col = false; const uword n_rows; //!< number of rows in the matrix (read-only) const uword n_cols; //!< number of columns in the matrix (read-only) const uword n_elem; //!< number of elements in the matrix (read-only) const uword n_nonzero; //!< number of nonzero elements in the matrix (read-only) const uword vec_state; //!< 0: matrix; 1: column vector; 2: row vector // So that SpValProxy can call add_element() and delete_element(). friend class SpValProxy >; friend class SpSubview; /** * The memory used to store the values of the matrix. * In accordance with the CSC format, this stores only the actual values. * The correct locations of the values are assembled from the row indices * and the column pointers. * * The length of this array is (n_nonzero + 1); the final value ensures * the integrity of iterators. If you are planning on resizing this vector, * it's probably best to use mem_resize() instead, which automatically sets * the length to (n_nonzero + 1). If you need to allocate the memory yourself * for some reason, be sure to set values[n_nonzero] to 0. */ arma_aligned const eT* const values; /** * The row indices of each value. row_indices[i] is the row of values[i]. * * The length of this array is (n_nonzero + 1); the final value ensures * the integrity of iterators. If you are planning on resizing this vector, * it's probably best to use mem_resize() instead. If you need to allocate * the memory yourself for some reason, be sure to set row_indices[n_nonzero] to 0. */ arma_aligned const uword* const row_indices; /** * The column pointers. This stores the index of the first item in column i. * That is, values[col_ptrs[i]] is the first value in column i, and it is in * the row indicated by row_indices[col_ptrs[i]]. * * This array is of length (n_cols + 2); the element col_ptrs[n_cols] should * be equal to n_nonzero, and the element col_ptrs[n_cols + 1] is an invalid * very large value that ensures the integrity of iterators. * * The col_ptrs array is set by the init() function (which is called by the * constructors and set_size() and other functions that set the size of the * matrix), so allocating col_ptrs by hand should not be necessary. */ arma_aligned const uword* const col_ptrs; inline SpMat(); //! Size will be 0x0 (empty). inline ~SpMat(); inline SpMat(const uword in_rows, const uword in_cols); inline SpMat(const char* text); inline const SpMat& operator=(const char* text); inline SpMat(const std::string& text); inline const SpMat& operator=(const std::string& text); inline SpMat(const SpMat& x); #if defined(ARMA_USE_CXX11) inline SpMat(SpMat&& m); inline const SpMat& operator=(SpMat&& m); #endif template inline SpMat(const Base& rowind, const Base& colptr, const Base& values, const uword n_rows, const uword n_cols); template inline SpMat(const Base& locations, const Base& values, const bool sort_locations = true); template inline SpMat(const Base& locations, const Base& values, const uword n_rows, const uword n_cols, const bool sort_locations = true, const bool check_for_zeros = true); template inline SpMat(const bool add_values, const Base& locations, const Base& values, const uword n_rows, const uword n_cols, const bool sort_locations = true, const bool check_for_zeros = true); inline const SpMat& operator=(const eT val); //! Sets size to 1x1. inline const SpMat& operator*=(const eT val); inline const SpMat& operator/=(const eT val); // operator+=(val) and operator-=(val) are not defined as they don't make sense for sparse matrices /** * Operators on other sparse matrices. These work as though you would expect. */ inline const SpMat& operator=(const SpMat& m); inline const SpMat& operator+=(const SpMat& m); inline const SpMat& operator-=(const SpMat& m); inline const SpMat& operator*=(const SpMat& m); inline const SpMat& operator%=(const SpMat& m); inline const SpMat& operator/=(const SpMat& m); /** * Operators on other regular matrices. These work as though you would expect. */ template inline explicit SpMat(const Base& m); template inline const SpMat& operator=(const Base& m); template inline const SpMat& operator+=(const Base& m); template inline const SpMat& operator-=(const Base& m); template inline const SpMat& operator*=(const Base& m); template inline const SpMat& operator/=(const Base& m); template inline const SpMat& operator%=(const Base& m); //! construction of complex matrix out of two non-complex matrices; template inline explicit SpMat(const SpBase& A, const SpBase& B); /** * Operations on sparse subviews. */ inline SpMat(const SpSubview& X); inline const SpMat& operator=(const SpSubview& X); inline const SpMat& operator+=(const SpSubview& X); inline const SpMat& operator-=(const SpSubview& X); inline const SpMat& operator*=(const SpSubview& X); inline const SpMat& operator%=(const SpSubview& X); inline const SpMat& operator/=(const SpSubview& X); // delayed unary ops template inline SpMat(const SpOp& X); template inline const SpMat& operator=(const SpOp& X); template inline const SpMat& operator+=(const SpOp& X); template inline const SpMat& operator-=(const SpOp& X); template inline const SpMat& operator*=(const SpOp& X); template inline const SpMat& operator%=(const SpOp& X); template inline const SpMat& operator/=(const SpOp& X); // delayed binary ops template inline SpMat(const SpGlue& X); template inline const SpMat& operator=(const SpGlue& X); template inline const SpMat& operator+=(const SpGlue& X); template inline const SpMat& operator-=(const SpGlue& X); template inline const SpMat& operator*=(const SpGlue& X); template inline const SpMat& operator%=(const SpGlue& X); template inline const SpMat& operator/=(const SpGlue& X); // delayed mixted-type unary ops template inline SpMat(const mtSpOp& X); template inline const SpMat& operator=(const mtSpOp& X); template inline const SpMat& operator+=(const mtSpOp& X); template inline const SpMat& operator-=(const mtSpOp& X); template inline const SpMat& operator*=(const mtSpOp& X); template inline const SpMat& operator%=(const mtSpOp& X); template inline const SpMat& operator/=(const mtSpOp& X); /** * Submatrix methods. */ arma_inline SpSubview row(const uword row_num); arma_inline const SpSubview row(const uword row_num) const; inline SpSubview operator()(const uword row_num, const span& col_span); inline const SpSubview operator()(const uword row_num, const span& col_span) const; arma_inline SpSubview col(const uword col_num); arma_inline const SpSubview col(const uword col_num) const; inline SpSubview operator()(const span& row_span, const uword col_num); inline const SpSubview operator()(const span& row_span, const uword col_num) const; arma_inline SpSubview rows(const uword in_row1, const uword in_row2); arma_inline const SpSubview rows(const uword in_row1, const uword in_row2) const; arma_inline SpSubview cols(const uword in_col1, const uword in_col2); arma_inline const SpSubview cols(const uword in_col1, const uword in_col2) const; arma_inline SpSubview submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2); arma_inline const SpSubview submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) const; arma_inline SpSubview submat(const uword in_row1, const uword in_col1, const SizeMat& s); arma_inline const SpSubview submat(const uword in_row1, const uword in_col1, const SizeMat& s) const; inline SpSubview submat (const span& row_span, const span& col_span); inline const SpSubview submat (const span& row_span, const span& col_span) const; inline SpSubview operator()(const span& row_span, const span& col_span); inline const SpSubview operator()(const span& row_span, const span& col_span) const; arma_inline SpSubview operator()(const uword in_row1, const uword in_col1, const SizeMat& s); arma_inline const SpSubview operator()(const uword in_row1, const uword in_col1, const SizeMat& s) const; inline SpSubview head_rows(const uword N); inline const SpSubview head_rows(const uword N) const; inline SpSubview tail_rows(const uword N); inline const SpSubview tail_rows(const uword N) const; inline SpSubview head_cols(const uword N); inline const SpSubview head_cols(const uword N) const; inline SpSubview tail_cols(const uword N); inline const SpSubview tail_cols(const uword N) const; inline spdiagview diag(const sword in_id = 0); inline const spdiagview diag(const sword in_id = 0) const; inline void swap_rows(const uword in_row1, const uword in_row2); inline void swap_cols(const uword in_col1, const uword in_col2); inline void shed_row(const uword row_num); inline void shed_col(const uword col_num); inline void shed_rows(const uword in_row1, const uword in_row2); inline void shed_cols(const uword in_col1, const uword in_col2); /** * Element access; access the i'th element (works identically to the Mat accessors). * If there is nothing at element i, 0 is returned. */ arma_inline arma_warn_unused SpValProxy > operator[] (const uword i); arma_inline arma_warn_unused eT operator[] (const uword i) const; arma_inline arma_warn_unused SpValProxy > at (const uword i); arma_inline arma_warn_unused eT at (const uword i) const; arma_inline arma_warn_unused SpValProxy > operator() (const uword i); arma_inline arma_warn_unused eT operator() (const uword i) const; /** * Element access; access the element at row in_row and column in_col. * If there is nothing at that position, 0 is returned. */ arma_inline arma_warn_unused SpValProxy > at (const uword in_row, const uword in_col); arma_inline arma_warn_unused eT at (const uword in_row, const uword in_col) const; arma_inline arma_warn_unused SpValProxy > operator() (const uword in_row, const uword in_col); arma_inline arma_warn_unused eT operator() (const uword in_row, const uword in_col) const; /** * Information boolean checks on matrices. */ arma_inline arma_warn_unused bool is_empty() const; arma_inline arma_warn_unused bool is_vec() const; arma_inline arma_warn_unused bool is_rowvec() const; arma_inline arma_warn_unused bool is_colvec() const; arma_inline arma_warn_unused bool is_square() const; inline arma_warn_unused bool is_finite() const; inline arma_warn_unused bool has_inf() const; inline arma_warn_unused bool has_nan() const; arma_inline arma_warn_unused bool in_range(const uword i) const; arma_inline arma_warn_unused bool in_range(const span& x) const; arma_inline arma_warn_unused bool in_range(const uword in_row, const uword in_col) const; arma_inline arma_warn_unused bool in_range(const span& row_span, const uword in_col) const; arma_inline arma_warn_unused bool in_range(const uword in_row, const span& col_span) const; arma_inline arma_warn_unused bool in_range(const span& row_span, const span& col_span) const; arma_inline arma_warn_unused bool in_range(const uword in_row, const uword in_col, const SizeMat& s) const; inline void impl_print(const std::string& extra_text) const; inline void impl_print(std::ostream& user_stream, const std::string& extra_text) const; inline void impl_raw_print(const std::string& extra_text) const; inline void impl_raw_print(std::ostream& user_stream, const std::string& extra_text) const; inline void impl_print_dense(const std::string& extra_text) const; inline void impl_print_dense(std::ostream& user_stream, const std::string& extra_text) const; inline void impl_raw_print_dense(const std::string& extra_text) const; inline void impl_raw_print_dense(std::ostream& user_stream, const std::string& extra_text) const; //! Copy the size of another matrix. template inline void copy_size(const SpMat& m); template inline void copy_size(const Mat& m); inline void set_size(const uword in_elem); inline void set_size(const uword in_rows, const uword in_cols); inline void resize(const uword in_rows, const uword in_cols); inline void reshape(const uword in_rows, const uword in_cols); inline void reshape(const uword in_rows, const uword in_cols, const uword dim); // this form is deprecated: don't use it inline const SpMat& zeros(); inline const SpMat& zeros(const uword in_elem); inline const SpMat& zeros(const uword in_rows, const uword in_cols); inline const SpMat& eye(); inline const SpMat& eye(const uword in_rows, const uword in_cols); inline const SpMat& speye(); inline const SpMat& speye(const uword in_rows, const uword in_cols); inline const SpMat& sprandu(const uword in_rows, const uword in_cols, const double density); inline const SpMat& sprandn(const uword in_rows, const uword in_cols, const double density); inline void reset(); template inline void set_real(const SpBase& X); template inline void set_imag(const SpBase& X); // saving and loading inline bool save(const std::string name, const file_type type = arma_binary, const bool print_status = true) const; inline bool save( std::ostream& os, const file_type type = arma_binary, const bool print_status = true) const; inline bool load(const std::string name, const file_type type = arma_binary, const bool print_status = true); inline bool load( std::istream& is, const file_type type = arma_binary, const bool print_status = true); inline bool quiet_save(const std::string name, const file_type type = arma_binary) const; inline bool quiet_save( std::ostream& os, const file_type type = arma_binary) const; inline bool quiet_load(const std::string name, const file_type type = arma_binary); inline bool quiet_load( std::istream& is, const file_type type = arma_binary); // TODO: speed up loading of sparse matrices stored as text files (ie. raw_ascii and coord_ascii) // TODO: implement auto_detect for sparse matrices // TODO: modify docs to specify which formats are not applicable to sparse matrices // These forward declarations are necessary. class iterator_base; class iterator; class const_iterator; class row_iterator; class const_row_iterator; // Iterator base provides basic operators but not how to compare or how to // iterate. class iterator_base { public: inline iterator_base(); inline iterator_base(const SpMat& in_M); inline iterator_base(const SpMat& in_M, const uword col, const uword pos); inline arma_hot eT operator*() const; // Don't hold location internally; call "dummy" methods to get that information. arma_inline uword row() const { return M->row_indices[internal_pos]; } arma_inline uword col() const { return internal_col; } arma_inline uword pos() const { return internal_pos; } arma_aligned const SpMat* M; arma_aligned uword internal_col; arma_aligned uword internal_pos; // So that we satisfy the STL iterator types. typedef std::bidirectional_iterator_tag iterator_category; typedef eT value_type; typedef uword difference_type; // not certain on this one typedef const eT* pointer; typedef const eT& reference; }; class const_iterator : public iterator_base { public: inline const_iterator(); inline const_iterator(const SpMat& in_M, uword initial_pos = 0); // Assumes initial_pos is valid. //! Once initialized, will be at the first nonzero value after the given position (using forward columnwise traversal). inline const_iterator(const SpMat& in_M, uword in_row, uword in_col); //! If you know the exact position of the iterator. in_row is a dummy argument. inline const_iterator(const SpMat& in_M, uword in_row, uword in_col, uword in_pos); inline const_iterator(const const_iterator& other); inline arma_hot const_iterator& operator++(); inline arma_hot const_iterator operator++(int); inline arma_hot const_iterator& operator--(); inline arma_hot const_iterator operator--(int); inline arma_hot bool operator==(const const_iterator& rhs) const; inline arma_hot bool operator!=(const const_iterator& rhs) const; inline arma_hot bool operator==(const typename SpSubview::const_iterator& rhs) const; inline arma_hot bool operator!=(const typename SpSubview::const_iterator& rhs) const; inline arma_hot bool operator==(const const_row_iterator& rhs) const; inline arma_hot bool operator!=(const const_row_iterator& rhs) const; inline arma_hot bool operator==(const typename SpSubview::const_row_iterator& rhs) const; inline arma_hot bool operator!=(const typename SpSubview::const_row_iterator& rhs) const; }; /** * So that we can iterate over nonzero values, we need an iterator * implementation. This can't be as simple as Mat's, which is just a pointer * to an eT. If a value is set to 0 using this iterator, the iterator is no * longer valid! */ class iterator : public const_iterator { public: inline iterator() : const_iterator() { } inline iterator(SpMat& in_M, uword initial_pos = 0) : const_iterator(in_M, initial_pos) { } inline iterator(SpMat& in_M, uword in_row, uword in_col) : const_iterator(in_M, in_row, in_col) { } inline iterator(SpMat& in_M, uword in_row, uword in_col, uword in_pos) : const_iterator(in_M, in_row, in_col, in_pos) { } inline iterator(const const_iterator& other) : const_iterator(other) { } inline arma_hot SpValProxy > operator*(); // overloads needed for return type correctness inline arma_hot iterator& operator++(); inline arma_hot iterator operator++(int); inline arma_hot iterator& operator--(); inline arma_hot iterator operator--(int); // This has a different value_type than iterator_base. typedef SpValProxy > value_type; typedef const SpValProxy >* pointer; typedef const SpValProxy >& reference; }; class const_row_iterator : public iterator_base { public: inline const_row_iterator(); inline const_row_iterator(const SpMat& in_M, uword initial_pos = 0); //! Once initialized, will be at the first nonzero value after the given position (using forward row-wise traversal). inline const_row_iterator(const SpMat& in_M, uword in_row, uword in_col); inline const_row_iterator(const const_row_iterator& other); inline arma_hot const_row_iterator& operator++(); inline arma_hot const_row_iterator operator++(int); inline arma_hot const_row_iterator& operator--(); inline arma_hot const_row_iterator operator--(int); uword internal_row; // Hold row internally because we use internal_pos differently. uword actual_pos; // Actual position in matrix. arma_inline eT operator*() const { return iterator_base::M->values[actual_pos]; } arma_inline uword row() const { return internal_row; } inline arma_hot bool operator==(const const_iterator& rhs) const; inline arma_hot bool operator!=(const const_iterator& rhs) const; inline arma_hot bool operator==(const typename SpSubview::const_iterator& rhs) const; inline arma_hot bool operator!=(const typename SpSubview::const_iterator& rhs) const; inline arma_hot bool operator==(const const_row_iterator& rhs) const; inline arma_hot bool operator!=(const const_row_iterator& rhs) const; inline arma_hot bool operator==(const typename SpSubview::const_row_iterator& rhs) const; inline arma_hot bool operator!=(const typename SpSubview::const_row_iterator& rhs) const; }; class row_iterator : public const_row_iterator { public: inline row_iterator() : const_row_iterator() {} inline row_iterator(SpMat& in_M, uword initial_pos = 0) : const_row_iterator(in_M, initial_pos) { } //! Once initialized, will be at the first nonzero value after the given position (using forward row-wise traversal). inline row_iterator(SpMat& in_M, uword in_row, uword in_col) : const_row_iterator(in_M, in_row, in_col) { } inline row_iterator(const row_iterator& other) : const_row_iterator(other) { } inline arma_hot SpValProxy > operator*(); // overloads required for return type correctness inline arma_hot row_iterator& operator++(); inline arma_hot row_iterator operator++(int); inline arma_hot row_iterator& operator--(); inline arma_hot row_iterator operator--(int); // This has a different value_type than iterator_base. typedef SpValProxy > value_type; typedef const SpValProxy >* pointer; typedef const SpValProxy >& reference; }; typedef iterator row_col_iterator; typedef const_iterator const_row_col_iterator; inline iterator begin(); inline const_iterator begin() const; inline iterator end(); inline const_iterator end() const; inline iterator begin_col(const uword col_num); inline const_iterator begin_col(const uword col_num) const; inline iterator end_col(const uword col_num); inline const_iterator end_col(const uword col_num) const; inline row_iterator begin_row(const uword row_num = 0); inline const_row_iterator begin_row(const uword row_num = 0) const; inline row_iterator end_row(); inline const_row_iterator end_row() const; inline row_iterator end_row(const uword row_num); inline const_row_iterator end_row(const uword row_num) const; inline row_col_iterator begin_row_col(); inline const_row_col_iterator begin_row_col() const; inline row_col_iterator end_row_col(); inline const_row_col_iterator end_row_col() const; inline void clear(); inline bool empty() const; inline uword size() const; /** * Resize memory. You are responsible for updating the column pointers and * filling the new memory (if the new size is larger). If the new size is * smaller, the first new_n_nonzero elements will be copied. n_nonzero is * updated. */ inline void mem_resize(const uword new_n_nonzero); //! don't use this unless you're writing internal Armadillo code inline void remove_zeros(); //! don't use this unless you're writing internal Armadillo code inline void steal_mem(SpMat& X); //! don't use this unless you're writing internal Armadillo code template< typename T1, typename Functor> arma_hot inline void init_xform (const SpBase& x, const Functor& func); template arma_hot inline void init_xform_mt(const SpBase& x, const Functor& func); protected: /** * Initialize the matrix to the specified size. Data is not preserved, so the matrix is assumed to be entirely sparse (empty). */ inline void init(uword in_rows, uword in_cols); /** * Initialize the matrix from text. Data is (of course) not preserved, and * the size will be reset. */ inline void init(const std::string& text); /** * Initialize from another matrix (copy). */ inline void init(const SpMat& x); inline void init_batch_std(const Mat& locations, const Mat& values, const bool sort_locations); inline void init_batch_add(const Mat& locations, const Mat& values, const bool sort_locations); private: /** * Return the given element. */ inline arma_hot arma_warn_unused SpValProxy > get_value(const uword i); inline arma_hot arma_warn_unused eT get_value(const uword i) const; inline arma_hot arma_warn_unused SpValProxy > get_value(const uword in_row, const uword in_col); inline arma_hot arma_warn_unused eT get_value(const uword in_row, const uword in_col) const; /** * Given the index representing which of the nonzero values this is, return * its actual location, either in row/col or just the index. */ arma_inline arma_hot arma_warn_unused uword get_position(const uword i) const; arma_inline arma_hot void get_position(const uword i, uword& row_of_i, uword& col_of_i) const; /** * Add an element at the given position, and return a reference to it. The * element will be set to 0 (unless otherwise specified). If the element * already exists, its value will be overwritten. * * @param in_row Row of new element. * @param in_col Column of new element. * @param in_val Value to set new element to (default 0.0). */ inline arma_hot arma_warn_unused eT& add_element(const uword in_row, const uword in_col, const eT in_val = 0.0); /** * Delete an element at the given position. * * @param in_row Row of element to be deleted. * @param in_col Column of element to be deleted. */ inline arma_hot void delete_element(const uword in_row, const uword in_col); public: #ifdef ARMA_EXTRA_SPMAT_PROTO #include ARMA_INCFILE_WRAP(ARMA_EXTRA_SPMAT_PROTO) #endif }; class SpMat_aux { public: template inline static void set_real(SpMat& out, const SpBase& X); template inline static void set_real(SpMat< std::complex >& out, const SpBase< T,T1>& X); template inline static void set_imag(SpMat& out, const SpBase& X); template inline static void set_imag(SpMat< std::complex >& out, const SpBase< T,T1>& X); }; #define ARMA_HAS_SPMAT //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpMat_iterators_meat.hpp ================================================ // Copyright (C) 2011-2014 Ryan Curtin // Copyright (C) 2012-2014 Conrad Sanderson // Copyright (C) 2011 Matthew Amidon // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpMat //! @{ /////////////////////////////////////////////////////////////////////////////// // SpMat::iterator_base implementation // /////////////////////////////////////////////////////////////////////////////// template inline SpMat::iterator_base::iterator_base() : M(NULL) , internal_col(0) , internal_pos(0) { // Technically this iterator is invalid (it may not point to a real element) } template inline SpMat::iterator_base::iterator_base(const SpMat& in_M) : M(&in_M) , internal_col(0) , internal_pos(0) { // Technically this iterator is invalid (it may not point to a real element) } template inline SpMat::iterator_base::iterator_base(const SpMat& in_M, const uword in_col, const uword in_pos) : M(&in_M) , internal_col(in_col) , internal_pos(in_pos) { // Nothing to do. } template inline arma_hot eT SpMat::iterator_base::operator*() const { return M->values[internal_pos]; } /////////////////////////////////////////////////////////////////////////////// // SpMat::const_iterator implementation // /////////////////////////////////////////////////////////////////////////////// template inline SpMat::const_iterator::const_iterator() : iterator_base() { } template inline SpMat::const_iterator::const_iterator(const SpMat& in_M, uword initial_pos) : iterator_base(in_M, 0, initial_pos) { // Corner case for empty matrices. if(in_M.n_nonzero == 0) { iterator_base::internal_col = in_M.n_cols; return; } // Determine which column we should be in. while(iterator_base::M->col_ptrs[iterator_base::internal_col + 1] <= iterator_base::internal_pos) { iterator_base::internal_col++; } } template inline SpMat::const_iterator::const_iterator(const SpMat& in_M, uword in_row, uword in_col) : iterator_base(in_M, in_col, 0) { // So we have a position we want to be right after. Skip to the column. iterator_base::internal_pos = iterator_base::M->col_ptrs[iterator_base::internal_col]; // Now we have to make sure that is the right column. while(iterator_base::M->col_ptrs[iterator_base::internal_col + 1] <= iterator_base::internal_pos) { iterator_base::internal_col++; } // Now we have to get to the right row. while((iterator_base::M->row_indices[iterator_base::internal_pos] < in_row) && (iterator_base::internal_col == in_col)) { ++(*this); // Increment iterator. } } template inline SpMat::const_iterator::const_iterator(const SpMat& in_M, const uword /* in_row */, const uword in_col, const uword in_pos) : iterator_base(in_M, in_col, in_pos) { // Nothing to do. } template inline SpMat::const_iterator::const_iterator(const typename SpMat::const_iterator& other) : iterator_base(*other.M, other.internal_col, other.internal_pos) { // Nothing to do. } template inline arma_hot typename SpMat::const_iterator& SpMat::const_iterator::operator++() { ++iterator_base::internal_pos; if (iterator_base::internal_pos == iterator_base::M->n_nonzero) { iterator_base::internal_col = iterator_base::M->n_cols; return *this; } // Check to see if we moved a column. while (iterator_base::M->col_ptrs[iterator_base::internal_col + 1] <= iterator_base::internal_pos) { ++iterator_base::internal_col; } return *this; } template inline arma_hot typename SpMat::const_iterator SpMat::const_iterator::operator++(int) { typename SpMat::const_iterator tmp(*this); ++(*this); return tmp; } template inline arma_hot typename SpMat::const_iterator& SpMat::const_iterator::operator--() { //iterator_base::M.print("M"); // printf("decrement from %d, %d, %d\n", iterator_base::internal_pos, iterator_base::internal_col, iterator_base::row()); --iterator_base::internal_pos; // printf("now pos %d\n", iterator_base::internal_pos); // First, see if we moved back a column. while (iterator_base::internal_pos < iterator_base::M->col_ptrs[iterator_base::internal_col]) { // printf("colptr %d (col %d)\n", iterator_base::M.col_ptrs[iterator_base::internal_col], iterator_base::internal_col); --iterator_base::internal_col; } return *this; } template inline arma_hot typename SpMat::const_iterator SpMat::const_iterator::operator--(int) { typename SpMat::const_iterator tmp(*this); --(*this); return tmp; } template inline arma_hot bool SpMat::const_iterator::operator==(const const_iterator& rhs) const { return (rhs.row() == (*this).row()) && (rhs.col() == iterator_base::internal_col); } template inline arma_hot bool SpMat::const_iterator::operator!=(const const_iterator& rhs) const { return (rhs.row() != (*this).row()) || (rhs.col() != iterator_base::internal_col); } template inline arma_hot bool SpMat::const_iterator::operator==(const typename SpSubview::const_iterator& rhs) const { return (rhs.row() == (*this).row()) && (rhs.col() == iterator_base::internal_col); } template inline arma_hot bool SpMat::const_iterator::operator!=(const typename SpSubview::const_iterator& rhs) const { return (rhs.row() != (*this).row()) || (rhs.col() != iterator_base::internal_col); } template inline arma_hot bool SpMat::const_iterator::operator==(const const_row_iterator& rhs) const { return (rhs.row() == (*this).row()) && (rhs.col() == iterator_base::internal_col); } template inline arma_hot bool SpMat::const_iterator::operator!=(const const_row_iterator& rhs) const { return (rhs.row() != (*this).row()) || (rhs.col() != iterator_base::internal_col); } template inline arma_hot bool SpMat::const_iterator::operator==(const typename SpSubview::const_row_iterator& rhs) const { return (rhs.row() == (*this).row()) && (rhs.col() == iterator_base::internal_col); } template inline arma_hot bool SpMat::const_iterator::operator!=(const typename SpSubview::const_row_iterator& rhs) const { return (rhs.row() != (*this).row()) || (rhs.col() != iterator_base::internal_col); } /////////////////////////////////////////////////////////////////////////////// // SpMat::iterator implementation // /////////////////////////////////////////////////////////////////////////////// template inline arma_hot SpValProxy > SpMat::iterator::operator*() { return SpValProxy >( iterator_base::M->row_indices[iterator_base::internal_pos], iterator_base::internal_col, access::rw(*iterator_base::M), &access::rw(iterator_base::M->values[iterator_base::internal_pos])); } template inline arma_hot typename SpMat::iterator& SpMat::iterator::operator++() { const_iterator::operator++(); return *this; } template inline arma_hot typename SpMat::iterator SpMat::iterator::operator++(int) { typename SpMat::iterator tmp(*this); const_iterator::operator++(); return tmp; } template inline arma_hot typename SpMat::iterator& SpMat::iterator::operator--() { const_iterator::operator--(); return *this; } template inline arma_hot typename SpMat::iterator SpMat::iterator::operator--(int) { typename SpMat::iterator tmp(*this); const_iterator::operator--(); return tmp; } /////////////////////////////////////////////////////////////////////////////// // SpMat::const_row_iterator implementation // /////////////////////////////////////////////////////////////////////////////// /** * Initialize the const_row_iterator. */ template inline SpMat::const_row_iterator::const_row_iterator() : iterator_base() , internal_row(0) , actual_pos(0) { } template inline SpMat::const_row_iterator::const_row_iterator(const SpMat& in_M, uword initial_pos) : iterator_base(in_M, 0, initial_pos) , internal_row(0) , actual_pos(0) { // Corner case for empty matrix. if(in_M.n_nonzero == 0) { iterator_base::internal_col = 0; internal_row = in_M.n_rows; return; } // We don't count zeros in our position count, so we have to find the nonzero // value corresponding to the given initial position. We assume initial_pos // is valid. // This is irritating because we don't know where the elements are in each // row. What we will do is loop across all columns looking for elements in // row 0 (and add to our sum), then in row 1, and so forth, until we get to // the desired position. uword cur_pos = std::numeric_limits::max(); // Invalid value. uword cur_row = 0; uword cur_col = 0; while(true) // This loop is terminated from the inside. { // Is there anything in the column we are looking at? for (uword ind = 0; ((iterator_base::M->col_ptrs[cur_col] + ind < iterator_base::M->col_ptrs[cur_col + 1]) && (iterator_base::M->row_indices[iterator_base::M->col_ptrs[cur_col] + ind] <= cur_row)); ind++) { // There is something in this column. Is it in the row we are looking at? const uword row_index = iterator_base::M->row_indices[iterator_base::M->col_ptrs[cur_col] + ind]; if (row_index == cur_row) { // Yes, it is what we are looking for. Increment our current position. if (++cur_pos == iterator_base::internal_pos) // TODO: HACK: if cur_pos is std::numeric_limits::max(), ++cur_pos relies on a wraparound/overflow, which is not portable { actual_pos = iterator_base::M->col_ptrs[cur_col] + ind; internal_row = cur_row; iterator_base::internal_col = cur_col; return; } // We are done with this column. Break to the column incrementing code (directly below). break; } else if(row_index > cur_row) { break; // Can't be in this column. } } cur_col++; // Done with the column. Move on. if (cur_col == iterator_base::M->n_cols) { // We are out of columns. Loop back to the beginning and look on the // next row. cur_col = 0; cur_row++; } } } template inline SpMat::const_row_iterator::const_row_iterator(const SpMat& in_M, uword in_row, uword in_col) : iterator_base(in_M, in_col, 0) , internal_row(0) , actual_pos(0) { // This is slow. It needs to be rewritten. // So we have a destination we want to be just after, but don't know what position that is. Make another iterator to find out... const_row_iterator it(in_M, 0); while((it.row() < in_row) || ((it.row() == in_row) && (it.col() < in_col))) { it++; } // Now that it is at the right place, take its position. iterator_base::internal_col = it.internal_col; iterator_base::internal_pos = it.internal_pos; internal_row = it.internal_row; actual_pos = it.actual_pos; } /** * Initialize the const_row_iterator from another const_row_iterator. */ template inline SpMat::const_row_iterator::const_row_iterator(const typename SpMat::const_row_iterator& other) : iterator_base(*other.M, other.internal_col, other.internal_pos) , internal_row(other.internal_row) , actual_pos(other.actual_pos) { // Nothing to do. } /** * Increment the row_iterator. */ template inline arma_hot typename SpMat::const_row_iterator& SpMat::const_row_iterator::operator++() { // We just need to find the next nonzero element. iterator_base::internal_pos++; if(iterator_base::internal_pos == iterator_base::M->n_nonzero) { internal_row = iterator_base::M->n_rows; iterator_base::internal_col = 0; actual_pos = iterator_base::M->n_nonzero; return *this; } // Otherwise, we need to search. uword cur_col = iterator_base::internal_col; uword cur_row = internal_row; while (true) // This loop is terminated from the inside. { // Increment the current column and see if we are now on a new row. if (++cur_col == iterator_base::M->n_cols) { cur_col = 0; cur_row++; } // Is there anything in this new column? for (uword ind = 0; ((iterator_base::M->col_ptrs[cur_col] + ind < iterator_base::M->col_ptrs[cur_col + 1]) && (iterator_base::M->row_indices[iterator_base::M->col_ptrs[cur_col] + ind] <= cur_row)); ind++) { if (iterator_base::M->row_indices[iterator_base::M->col_ptrs[cur_col] + ind] == cur_row) { // We have successfully incremented. internal_row = cur_row; iterator_base::internal_col = cur_col; actual_pos = iterator_base::M->col_ptrs[cur_col] + ind; return *this; // Now we are done. } } } } /** * Increment the row_iterator (but do not return anything. */ template inline arma_hot typename SpMat::const_row_iterator SpMat::const_row_iterator::operator++(int) { typename SpMat::const_row_iterator tmp(*this); ++(*this); return tmp; } /** * Decrement the row_iterator. */ template inline arma_hot typename SpMat::const_row_iterator& SpMat::const_row_iterator::operator--() { iterator_base::internal_pos--; // We have to search backwards. uword cur_col = iterator_base::internal_col; uword cur_row = internal_row; while (true) // This loop is terminated from the inside. { // Decrement the current column and see if we are now on a new row. This is a uword so a negativity check won't work. if (--cur_col > iterator_base::M->n_cols /* this means it underflew */) { cur_col = iterator_base::M->n_cols - 1; cur_row--; } // Is there anything in this new column? for (uword ind = 0; ((iterator_base::M->col_ptrs[cur_col] + ind < iterator_base::M->col_ptrs[cur_col + 1]) && (iterator_base::M->row_indices[iterator_base::M->col_ptrs[cur_col] + ind] <= cur_row)); ind++) { if (iterator_base::M->row_indices[iterator_base::M->col_ptrs[cur_col] + ind] == cur_row) { // We have successfully decremented. iterator_base::internal_col = cur_col; internal_row = cur_row; actual_pos = iterator_base::M->col_ptrs[cur_col] + ind; return *this; // Now we are done. } } } } /** * Decrement the row_iterator. */ template inline arma_hot typename SpMat::const_row_iterator SpMat::const_row_iterator::operator--(int) { typename SpMat::const_row_iterator tmp(*this); --(*this); return tmp; } template inline arma_hot bool SpMat::const_row_iterator::operator==(const const_iterator& rhs) const { return (rhs.row() == row()) && (rhs.col() == iterator_base::internal_col); } template inline arma_hot bool SpMat::const_row_iterator::operator!=(const const_iterator& rhs) const { return (rhs.row() != row()) || (rhs.col() != iterator_base::internal_col); } template inline arma_hot bool SpMat::const_row_iterator::operator==(const typename SpSubview::const_iterator& rhs) const { return (rhs.row() == row()) && (rhs.col() == iterator_base::internal_col); } template inline arma_hot bool SpMat::const_row_iterator::operator!=(const typename SpSubview::const_iterator& rhs) const { return (rhs.row() != row()) || (rhs.col() != iterator_base::internal_col); } template inline arma_hot bool SpMat::const_row_iterator::operator==(const const_row_iterator& rhs) const { return (rhs.row() == row()) && (rhs.col() == iterator_base::internal_col); } template inline arma_hot bool SpMat::const_row_iterator::operator!=(const const_row_iterator& rhs) const { return (rhs.row() != row()) || (rhs.col() != iterator_base::internal_col); } template inline arma_hot bool SpMat::const_row_iterator::operator==(const typename SpSubview::const_row_iterator& rhs) const { return (rhs.row() == row()) && (rhs.col() == iterator_base::internal_col); } template inline arma_hot bool SpMat::const_row_iterator::operator!=(const typename SpSubview::const_row_iterator& rhs) const { return (rhs.row() != row()) || (rhs.col() != iterator_base::internal_col); } /////////////////////////////////////////////////////////////////////////////// // SpMat::row_iterator implementation // /////////////////////////////////////////////////////////////////////////////// template inline arma_hot SpValProxy > SpMat::row_iterator::operator*() { return SpValProxy >( const_row_iterator::internal_row, iterator_base::internal_col, access::rw(*iterator_base::M), &access::rw(iterator_base::M->values[const_row_iterator::actual_pos])); } template inline arma_hot typename SpMat::row_iterator& SpMat::row_iterator::operator++() { const_row_iterator::operator++(); return *this; } template inline arma_hot typename SpMat::row_iterator SpMat::row_iterator::operator++(int) { typename SpMat::row_iterator tmp(*this); const_row_iterator::operator++(); return tmp; } template inline arma_hot typename SpMat::row_iterator& SpMat::row_iterator::operator--() { const_row_iterator::operator--(); return *this; } template inline arma_hot typename SpMat::row_iterator SpMat::row_iterator::operator--(int) { typename SpMat::row_iterator tmp(*this); const_row_iterator::operator--(); return tmp; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpMat_meat.hpp ================================================ // Copyright (C) 2011-2015 Ryan Curtin // Copyright (C) 2012-2015 Conrad Sanderson // Copyright (C) 2011 Matthew Amidon // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpMat //! @{ /** * Initialize a sparse matrix with size 0x0 (empty). */ template inline SpMat::SpMat() : n_rows(0) , n_cols(0) , n_elem(0) , n_nonzero(0) , vec_state(0) , values(memory::acquire_chunked(1)) , row_indices(memory::acquire_chunked(1)) , col_ptrs(memory::acquire(2)) { arma_extra_debug_sigprint_this(this); access::rw(values[0]) = 0; access::rw(row_indices[0]) = 0; access::rw(col_ptrs[0]) = 0; // No elements. access::rw(col_ptrs[1]) = std::numeric_limits::max(); } /** * Clean up the memory of a sparse matrix and destruct it. */ template inline SpMat::~SpMat() { arma_extra_debug_sigprint_this(this); if(values ) { memory::release(access::rw(values)); } if(row_indices) { memory::release(access::rw(row_indices)); } if(col_ptrs ) { memory::release(access::rw(col_ptrs)); } } /** * Constructor with size given. */ template inline SpMat::SpMat(const uword in_rows, const uword in_cols) : n_rows(0) , n_cols(0) , n_elem(0) , n_nonzero(0) , vec_state(0) , values(NULL) , row_indices(NULL) , col_ptrs(NULL) { arma_extra_debug_sigprint_this(this); init(in_rows, in_cols); } /** * Assemble from text. */ template inline SpMat::SpMat(const char* text) : n_rows(0) , n_cols(0) , n_elem(0) , n_nonzero(0) , vec_state(0) , values(NULL) , row_indices(NULL) , col_ptrs(NULL) { arma_extra_debug_sigprint_this(this); init(std::string(text)); } template inline const SpMat& SpMat::operator=(const char* text) { arma_extra_debug_sigprint(); init(std::string(text)); return *this; } template inline SpMat::SpMat(const std::string& text) : n_rows(0) , n_cols(0) , n_elem(0) , n_nonzero(0) , vec_state(0) , values(NULL) , row_indices(NULL) , col_ptrs(NULL) { arma_extra_debug_sigprint(); init(text); } template inline const SpMat& SpMat::operator=(const std::string& text) { arma_extra_debug_sigprint(); init(text); return *this; } template inline SpMat::SpMat(const SpMat& x) : n_rows(0) , n_cols(0) , n_elem(0) , n_nonzero(0) , vec_state(0) , values(NULL) , row_indices(NULL) , col_ptrs(NULL) { arma_extra_debug_sigprint_this(this); init(x); } #if defined(ARMA_USE_CXX11) template inline SpMat::SpMat(SpMat&& in_mat) : n_rows(0) , n_cols(0) , n_elem(0) , n_nonzero(0) , vec_state(0) , values(NULL) , row_indices(NULL) , col_ptrs(NULL) { arma_extra_debug_sigprint_this(this); arma_extra_debug_sigprint(arma_boost::format("this = %x in_mat = %x") % this % &in_mat); (*this).steal_mem(in_mat); } template inline const SpMat& SpMat::operator=(SpMat&& in_mat) { arma_extra_debug_sigprint(arma_boost::format("this = %x in_mat = %x") % this % &in_mat); (*this).steal_mem(in_mat); return *this; } #endif //! Insert a large number of values at once. //! locations.row[0] should be row indices, locations.row[1] should be column indices, //! and values should be the corresponding values. //! If sort_locations is false, then it is assumed that the locations and values //! are already sorted in column-major ordering. template template inline SpMat::SpMat(const Base& locations_expr, const Base& vals_expr, const bool sort_locations) : n_rows(0) , n_cols(0) , n_elem(0) , n_nonzero(0) , vec_state(0) , values(NULL) , row_indices(NULL) , col_ptrs(NULL) { arma_extra_debug_sigprint_this(this); const unwrap locs_tmp( locations_expr.get_ref() ); const unwrap vals_tmp( vals_expr.get_ref() ); const Mat& locs = locs_tmp.M; const Mat& vals = vals_tmp.M; arma_debug_check( (vals.is_vec() == false), "SpMat::SpMat(): given 'values' object is not a vector" ); arma_debug_check( (locs.n_rows != 2), "SpMat::SpMat(): locations matrix must have two rows" ); arma_debug_check( (locs.n_cols != vals.n_elem), "SpMat::SpMat(): number of locations is different than number of values" ); // If there are no elements in the list, max() will fail. if(locs.n_cols == 0) { init(0, 0); return; } // Automatically determine size before pruning zeros. uvec bounds = arma::max(locs, 1); init(bounds[0] + 1, bounds[1] + 1); // Ensure that there are no zeros const uword N_old = vals.n_elem; uword N_new = 0; for(uword i = 0; i < N_old; ++i) { if(vals[i] != eT(0)) { ++N_new; } } if(N_new != N_old) { Col filtered_vals(N_new); Mat filtered_locs(2, N_new); uword index = 0; for(uword i = 0; i < N_old; ++i) { if(vals[i] != eT(0)) { filtered_vals[index] = vals[i]; filtered_locs.at(0, index) = locs.at(0, i); filtered_locs.at(1, index) = locs.at(1, i); ++index; } } init_batch_std(filtered_locs, filtered_vals, sort_locations); } else { init_batch_std(locs, vals, sort_locations); } } //! Insert a large number of values at once. //! locations.row[0] should be row indices, locations.row[1] should be column indices, //! and values should be the corresponding values. //! If sort_locations is false, then it is assumed that the locations and values //! are already sorted in column-major ordering. //! In this constructor the size is explicitly given. template template inline SpMat::SpMat(const Base& locations_expr, const Base& vals_expr, const uword in_n_rows, const uword in_n_cols, const bool sort_locations, const bool check_for_zeros) : n_rows(0) , n_cols(0) , n_elem(0) , n_nonzero(0) , vec_state(0) , values(NULL) , row_indices(NULL) , col_ptrs(NULL) { arma_extra_debug_sigprint_this(this); const unwrap locs_tmp( locations_expr.get_ref() ); const unwrap vals_tmp( vals_expr.get_ref() ); const Mat& locs = locs_tmp.M; const Mat& vals = vals_tmp.M; arma_debug_check( (vals.is_vec() == false), "SpMat::SpMat(): given 'values' object is not a vector" ); arma_debug_check( (locs.n_rows != 2), "SpMat::SpMat(): locations matrix must have two rows" ); arma_debug_check( (locs.n_cols != vals.n_elem), "SpMat::SpMat(): number of locations is different than number of values" ); init(in_n_rows, in_n_cols); // Ensure that there are no zeros, unless the user asked not to. if(check_for_zeros) { const uword N_old = vals.n_elem; uword N_new = 0; for(uword i = 0; i < N_old; ++i) { if(vals[i] != eT(0)) { ++N_new; } } if(N_new != N_old) { Col filtered_vals(N_new); Mat filtered_locs(2, N_new); uword index = 0; for(uword i = 0; i < N_old; ++i) { if(vals[i] != eT(0)) { filtered_vals[index] = vals[i]; filtered_locs.at(0, index) = locs.at(0, i); filtered_locs.at(1, index) = locs.at(1, i); ++index; } } init_batch_std(filtered_locs, filtered_vals, sort_locations); } else { init_batch_std(locs, vals, sort_locations); } } else { init_batch_std(locs, vals, sort_locations); } } template template inline SpMat::SpMat(const bool add_values, const Base& locations_expr, const Base& vals_expr, const uword in_n_rows, const uword in_n_cols, const bool sort_locations, const bool check_for_zeros) : n_rows(0) , n_cols(0) , n_elem(0) , n_nonzero(0) , vec_state(0) , values(NULL) , row_indices(NULL) , col_ptrs(NULL) { arma_extra_debug_sigprint_this(this); const unwrap locs_tmp( locations_expr.get_ref() ); const unwrap vals_tmp( vals_expr.get_ref() ); const Mat& locs = locs_tmp.M; const Mat& vals = vals_tmp.M; arma_debug_check( (vals.is_vec() == false), "SpMat::SpMat(): given 'values' object is not a vector" ); arma_debug_check( (locs.n_rows != 2), "SpMat::SpMat(): locations matrix must have two rows" ); arma_debug_check( (locs.n_cols != vals.n_elem), "SpMat::SpMat(): number of locations is different than number of values" ); init(in_n_rows, in_n_cols); // Ensure that there are no zeros, unless the user asked not to. if(check_for_zeros) { const uword N_old = vals.n_elem; uword N_new = 0; for(uword i = 0; i < N_old; ++i) { if(vals[i] != eT(0)) { ++N_new; } } if(N_new != N_old) { Col filtered_vals(N_new); Mat filtered_locs(2, N_new); uword index = 0; for(uword i = 0; i < N_old; ++i) { if(vals[i] != eT(0)) { filtered_vals[index] = vals[i]; filtered_locs.at(0, index) = locs.at(0, i); filtered_locs.at(1, index) = locs.at(1, i); ++index; } } add_values ? init_batch_add(filtered_locs, filtered_vals, sort_locations) : init_batch_std(filtered_locs, filtered_vals, sort_locations); } else { add_values ? init_batch_add(locs, vals, sort_locations) : init_batch_std(locs, vals, sort_locations); } } else { add_values ? init_batch_add(locs, vals, sort_locations) : init_batch_std(locs, vals, sort_locations); } } //! Insert a large number of values at once. //! Per CSC format, rowind_expr should be row indices, //! colptr_expr should column ptr indices locations, //! and values should be the corresponding values. //! In this constructor the size is explicitly given. //! Values are assumed to be sorted, and the size //! information is trusted template template inline SpMat::SpMat ( const Base& rowind_expr, const Base& colptr_expr, const Base& values_expr, const uword in_n_rows, const uword in_n_cols ) : n_rows(0) , n_cols(0) , n_elem(0) , n_nonzero(0) , vec_state(0) , values(NULL) , row_indices(NULL) , col_ptrs(NULL) { arma_extra_debug_sigprint_this(this); init(in_n_rows, in_n_cols); const unwrap rowind_tmp( rowind_expr.get_ref() ); const unwrap colptr_tmp( colptr_expr.get_ref() ); const unwrap vals_tmp( values_expr.get_ref() ); const Mat& rowind = rowind_tmp.M; const Mat& colptr = colptr_tmp.M; const Mat& vals = vals_tmp.M; arma_debug_check( (rowind.is_vec() == false), "SpMat::SpMat(): given 'rowind' object is not a vector" ); arma_debug_check( (colptr.is_vec() == false), "SpMat::SpMat(): given 'colptr' object is not a vector" ); arma_debug_check( (vals.is_vec() == false), "SpMat::SpMat(): given 'values' object is not a vector" ); arma_debug_check( (rowind.n_elem != vals.n_elem), "SpMat::SpMat(): number of row indices is not equal to number of values" ); arma_debug_check( (colptr.n_elem != (n_cols+1) ), "SpMat::SpMat(): number of column pointers is not equal to n_cols+1" ); // Resize to correct number of elements (this also sets n_nonzero) mem_resize(vals.n_elem); // copy supplied values into sparse matrix -- not checked for consistency arrayops::copy(access::rwp(row_indices), rowind.memptr(), rowind.n_elem ); arrayops::copy(access::rwp(col_ptrs), colptr.memptr(), colptr.n_elem ); arrayops::copy(access::rwp(values), vals.memptr(), vals.n_elem ); // important: set the sentinel as well access::rw(col_ptrs[n_cols + 1]) = std::numeric_limits::max(); } template inline const SpMat& SpMat::operator=(const eT val) { arma_extra_debug_sigprint(); if(val != eT(0)) { // Resize to 1x1 then set that to the right value. init(1, 1); // Sets col_ptrs to 0. mem_resize(1); // One element. // Manually set element. access::rw(values[0]) = val; access::rw(row_indices[0]) = 0; access::rw(col_ptrs[1]) = 1; } else { init(0, 0); } return *this; } template inline const SpMat& SpMat::operator*=(const eT val) { arma_extra_debug_sigprint(); if(val != eT(0)) { arrayops::inplace_mul( access::rwp(values), val, n_nonzero ); remove_zeros(); } else { // Everything will be zero. init(n_rows, n_cols); } return *this; } template inline const SpMat& SpMat::operator/=(const eT val) { arma_extra_debug_sigprint(); arma_debug_check( (val == eT(0)), "element-wise division: division by zero" ); arrayops::inplace_div( access::rwp(values), val, n_nonzero ); remove_zeros(); return *this; } template inline const SpMat& SpMat::operator=(const SpMat& x) { arma_extra_debug_sigprint(); init(x); return *this; } template inline const SpMat& SpMat::operator+=(const SpMat& x) { arma_extra_debug_sigprint(); SpMat out = (*this) + x; steal_mem(out); return *this; } template inline const SpMat& SpMat::operator-=(const SpMat& x) { arma_extra_debug_sigprint(); SpMat out = (*this) - x; steal_mem(out); return *this; } template inline const SpMat& SpMat::operator*=(const SpMat& y) { arma_extra_debug_sigprint(); SpMat z = (*this) * y; steal_mem(z); return *this; } // This is in-place element-wise matrix multiplication. template inline const SpMat& SpMat::operator%=(const SpMat& y) { arma_extra_debug_sigprint(); SpMat z = (*this) % y; steal_mem(z); return *this; } // Construct a complex matrix out of two non-complex matrices template template inline SpMat::SpMat ( const SpBase::pod_type, T1>& A, const SpBase::pod_type, T2>& B ) : n_rows(0) , n_cols(0) , n_elem(0) , n_nonzero(0) , vec_state(0) , values(NULL) // extra element is set when mem_resize is called , row_indices(NULL) , col_ptrs(NULL) { arma_extra_debug_sigprint(); typedef typename T1::elem_type T; // Make sure eT is complex and T is not (compile-time check). arma_type_check(( is_complex::value == false )); arma_type_check(( is_complex< T>::value == true )); // Compile-time abort if types are not compatible. arma_type_check(( is_same_type< std::complex, eT >::no )); const unwrap_spmat tmp1(A.get_ref()); const unwrap_spmat tmp2(B.get_ref()); const SpMat& X = tmp1.M; const SpMat& Y = tmp2.M; arma_debug_assert_same_size(X.n_rows, X.n_cols, Y.n_rows, Y.n_cols, "SpMat()"); const uword l_n_rows = X.n_rows; const uword l_n_cols = X.n_cols; // Set size of matrix correctly. init(l_n_rows, l_n_cols); mem_resize(n_unique(X, Y, op_n_unique_count())); // Now on a second iteration, fill it. typename SpMat::const_iterator x_it = X.begin(); typename SpMat::const_iterator x_end = X.end(); typename SpMat::const_iterator y_it = Y.begin(); typename SpMat::const_iterator y_end = Y.end(); uword cur_pos = 0; while ((x_it != x_end) || (y_it != y_end)) { if(x_it == y_it) // if we are at the same place { access::rw(values[cur_pos]) = std::complex((T) *x_it, (T) *y_it); access::rw(row_indices[cur_pos]) = x_it.row(); ++access::rw(col_ptrs[x_it.col() + 1]); ++x_it; ++y_it; } else { if((x_it.col() < y_it.col()) || ((x_it.col() == y_it.col()) && (x_it.row() < y_it.row()))) // if y is closer to the end { access::rw(values[cur_pos]) = std::complex((T) *x_it, T(0)); access::rw(row_indices[cur_pos]) = x_it.row(); ++access::rw(col_ptrs[x_it.col() + 1]); ++x_it; } else // x is closer to the end { access::rw(values[cur_pos]) = std::complex(T(0), (T) *y_it); access::rw(row_indices[cur_pos]) = y_it.row(); ++access::rw(col_ptrs[y_it.col() + 1]); ++y_it; } } ++cur_pos; } // Now fix the column pointers; they are supposed to be a sum. for (uword c = 1; c <= n_cols; ++c) { access::rw(col_ptrs[c]) += col_ptrs[c - 1]; } } template inline const SpMat& SpMat::operator/=(const SpMat& x) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(n_rows, n_cols, x.n_rows, x.n_cols, "element-wise division"); // If you use this method, you are probably stupid or misguided, but for compatibility with Mat, we have implemented it anyway. // We have to loop over every element, which is not good. In fact, it makes me physically sad to write this. for(uword c = 0; c < n_cols; ++c) { for(uword r = 0; r < n_rows; ++r) { at(r, c) /= x.at(r, c); } } return *this; } template template inline SpMat::SpMat(const Base& x) : n_rows(0) , n_cols(0) , n_elem(0) , n_nonzero(0) , vec_state(0) , values(NULL) // extra element is set when mem_resize is called in operator=() , row_indices(NULL) , col_ptrs(NULL) { arma_extra_debug_sigprint_this(this); (*this).operator=(x); } template template inline const SpMat& SpMat::operator=(const Base& expr) { arma_extra_debug_sigprint(); const quasi_unwrap tmp(expr.get_ref()); const Mat& x = tmp.M; const uword x_n_rows = x.n_rows; const uword x_n_cols = x.n_cols; const uword x_n_elem = x.n_elem; init(x_n_rows, x_n_cols); // Count number of nonzero elements in base object. uword n = 0; const eT* x_mem = x.memptr(); for(uword i = 0; i < x_n_elem; ++i) { n += (x_mem[i] != eT(0)) ? uword(1) : uword(0); } mem_resize(n); // Now the memory is resized correctly; add nonzero elements. n = 0; for(uword j = 0; j < x_n_cols; ++j) for(uword i = 0; i < x_n_rows; ++i) { const eT val = (*x_mem); x_mem++; if(val != eT(0)) { access::rw(values[n]) = val; access::rw(row_indices[n]) = i; access::rw(col_ptrs[j + 1])++; ++n; } } // Sum column counts to be column pointers. for(uword c = 1; c <= n_cols; ++c) { access::rw(col_ptrs[c]) += col_ptrs[c - 1]; } return *this; } template template inline const SpMat& SpMat::operator+=(const Base& x) { arma_extra_debug_sigprint(); return (*this).operator=( (*this) + x.get_ref() ); } template template inline const SpMat& SpMat::operator-=(const Base& x) { arma_extra_debug_sigprint(); return (*this).operator=( (*this) - x.get_ref() ); } template template inline const SpMat& SpMat::operator*=(const Base& y) { arma_extra_debug_sigprint(); const Proxy p(y.get_ref()); arma_debug_assert_mul_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "matrix multiplication"); // We assume the matrix structure is such that we will end up with a sparse // matrix. Assuming that every entry in the dense matrix is nonzero (which is // a fairly valid assumption), each row with any nonzero elements in it (in this // matrix) implies an entire nonzero column. Therefore, we iterate over all // the row_indices and count the number of rows with any elements in them // (using the quasi-linked-list idea from SYMBMM -- see operator_times.hpp). podarray index(n_rows); index.fill(n_rows); // Fill with invalid links. uword last_index = n_rows + 1; for(uword i = 0; i < n_nonzero; ++i) { if(index[row_indices[i]] == n_rows) { index[row_indices[i]] = last_index; last_index = row_indices[i]; } } // Now count the number of rows which have nonzero elements. uword nonzero_rows = 0; while(last_index != n_rows + 1) { ++nonzero_rows; last_index = index[last_index]; } SpMat z(n_rows, p.get_n_cols()); z.mem_resize(nonzero_rows * p.get_n_cols()); // upper bound on size // Now we have to fill all the elements using a modification of the NUMBMM algorithm. uword cur_pos = 0; podarray partial_sums(n_rows); partial_sums.zeros(); for(uword lcol = 0; lcol < n_cols; ++lcol) { const_iterator it = begin(); while(it != end()) { const eT value = (*it); partial_sums[it.row()] += (value * p.at(it.col(), lcol)); ++it; } // Now add all partial sums to the matrix. for(uword i = 0; i < n_rows; ++i) { if(partial_sums[i] != eT(0)) { access::rw(z.values[cur_pos]) = partial_sums[i]; access::rw(z.row_indices[cur_pos]) = i; ++access::rw(z.col_ptrs[lcol + 1]); //printf("colptr %d now %d\n", lcol + 1, z.col_ptrs[lcol + 1]); ++cur_pos; partial_sums[i] = 0; // Would it be faster to do this in batch later? } } } // Now fix the column pointers. for(uword c = 1; c <= z.n_cols; ++c) { access::rw(z.col_ptrs[c]) += z.col_ptrs[c - 1]; } // Resize to final correct size. z.mem_resize(z.col_ptrs[z.n_cols]); // Now take the memory of the temporary matrix. steal_mem(z); return *this; } /** * Don't use this function. It's not mathematically well-defined and wastes * cycles to trash all your data. This is dumb. */ template template inline const SpMat& SpMat::operator/=(const Base& x) { arma_extra_debug_sigprint(); SpMat tmp = (*this) / x.get_ref(); steal_mem(tmp); return *this; } template template inline const SpMat& SpMat::operator%=(const Base& x) { arma_extra_debug_sigprint(); const Proxy p(x.get_ref()); arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "element-wise multiplication"); // Count the number of elements we will need. SpMat tmp(n_rows, n_cols); const_iterator it = begin(); uword new_n_nonzero = 0; while(it != end()) { // prefer_at_accessor == false can't save us any work here if(((*it) * p.at(it.row(), it.col())) != eT(0)) { ++new_n_nonzero; } ++it; } // Resize. tmp.mem_resize(new_n_nonzero); const_iterator c_it = begin(); uword cur_pos = 0; while(c_it != end()) { // prefer_at_accessor == false can't save us any work here const eT val = (*c_it) * p.at(c_it.row(), c_it.col()); if(val != eT(0)) { access::rw(tmp.values[cur_pos]) = val; access::rw(tmp.row_indices[cur_pos]) = c_it.row(); ++access::rw(tmp.col_ptrs[c_it.col() + 1]); ++cur_pos; } ++c_it; } // Fix column pointers. for(uword c = 1; c <= n_cols; ++c) { access::rw(tmp.col_ptrs[c]) += tmp.col_ptrs[c - 1]; } steal_mem(tmp); return *this; } /** * Functions on subviews. */ template inline SpMat::SpMat(const SpSubview& X) : n_rows(0) , n_cols(0) , n_elem(0) , n_nonzero(0) , vec_state(0) , values(NULL) // extra element added when mem_resize is called , row_indices(NULL) , col_ptrs(NULL) { arma_extra_debug_sigprint_this(this); (*this).operator=(X); } template inline const SpMat& SpMat::operator=(const SpSubview& X) { arma_extra_debug_sigprint(); const uword in_n_cols = X.n_cols; const uword in_n_rows = X.n_rows; const bool alias = (this == &(X.m)); if(alias == false) { init(in_n_rows, in_n_cols); const uword x_n_nonzero = X.n_nonzero; mem_resize(x_n_nonzero); typename SpSubview::const_iterator it = X.begin(); typename SpSubview::const_iterator it_end = X.end(); while(it != it_end) { access::rw(row_indices[it.pos()]) = it.row(); access::rw(values[it.pos()]) = (*it); ++access::rw(col_ptrs[it.col() + 1]); ++it; } // Now sum column pointers. for(uword c = 1; c <= n_cols; ++c) { access::rw(col_ptrs[c]) += col_ptrs[c - 1]; } } else { // Create it in a temporary. SpMat tmp(X); steal_mem(tmp); } return *this; } template inline const SpMat& SpMat::operator+=(const SpSubview& X) { arma_extra_debug_sigprint(); SpMat tmp = (*this) + X; steal_mem(tmp); return *this; } template inline const SpMat& SpMat::operator-=(const SpSubview& X) { arma_extra_debug_sigprint(); SpMat tmp = (*this) - X; steal_mem(tmp); return *this; } template inline const SpMat& SpMat::operator*=(const SpSubview& y) { arma_extra_debug_sigprint(); SpMat z = (*this) * y; steal_mem(z); return *this; } template inline const SpMat& SpMat::operator%=(const SpSubview& x) { arma_extra_debug_sigprint(); SpMat tmp = (*this) % x; steal_mem(tmp); return *this; } template inline const SpMat& SpMat::operator/=(const SpSubview& x) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(n_rows, n_cols, x.n_rows, x.n_cols, "element-wise division"); // There is no pretty way to do this. for(uword elem = 0; elem < n_elem; elem++) { at(elem) /= x(elem); } return *this; } template template inline SpMat::SpMat(const SpOp& X) : n_rows(0) , n_cols(0) , n_elem(0) , n_nonzero(0) , vec_state(0) , values(NULL) // set in application of sparse operation , row_indices(NULL) , col_ptrs(NULL) { arma_extra_debug_sigprint_this(this); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); spop_type::apply(*this, X); } template template inline const SpMat& SpMat::operator=(const SpOp& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); spop_type::apply(*this, X); return *this; } template template inline const SpMat& SpMat::operator+=(const SpOp& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const SpMat m(X); return (*this).operator+=(m); } template template inline const SpMat& SpMat::operator-=(const SpOp& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const SpMat m(X); return (*this).operator-=(m); } template template inline const SpMat& SpMat::operator*=(const SpOp& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const SpMat m(X); return (*this).operator*=(m); } template template inline const SpMat& SpMat::operator%=(const SpOp& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const SpMat m(X); return (*this).operator%=(m); } template template inline const SpMat& SpMat::operator/=(const SpOp& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const SpMat m(X); return (*this).operator/=(m); } template template inline SpMat::SpMat(const SpGlue& X) : n_rows(0) , n_cols(0) , n_elem(0) , n_nonzero(0) , vec_state(0) , values(NULL) // extra element set in application of sparse glue , row_indices(NULL) , col_ptrs(NULL) { arma_extra_debug_sigprint_this(this); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); spglue_type::apply(*this, X); } template template inline SpMat::SpMat(const mtSpOp& X) : n_rows(0) , n_cols(0) , n_elem(0) , n_nonzero(0) , vec_state(0) , values(NULL) // extra element set in application of sparse glue , row_indices(NULL) , col_ptrs(NULL) { arma_extra_debug_sigprint_this(this); spop_type::apply(*this, X); } template template inline const SpMat& SpMat::operator=(const mtSpOp& X) { arma_extra_debug_sigprint(); spop_type::apply(*this, X); return *this; } template template inline const SpMat& SpMat::operator+=(const mtSpOp& X) { arma_extra_debug_sigprint(); const SpMat m(X); return (*this).operator+=(m); } template template inline const SpMat& SpMat::operator-=(const mtSpOp& X) { arma_extra_debug_sigprint(); const SpMat m(X); return (*this).operator-=(m); } template template inline const SpMat& SpMat::operator*=(const mtSpOp& X) { arma_extra_debug_sigprint(); const SpMat m(X); return (*this).operator*=(m); } template template inline const SpMat& SpMat::operator%=(const mtSpOp& X) { arma_extra_debug_sigprint(); const SpMat m(X); return (*this).operator%=(m); } template template inline const SpMat& SpMat::operator/=(const mtSpOp& X) { arma_extra_debug_sigprint(); const SpMat m(X); return (*this).operator/=(m); } template template inline const SpMat& SpMat::operator=(const SpGlue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); spglue_type::apply(*this, X); return *this; } template template inline const SpMat& SpMat::operator+=(const SpGlue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const SpMat m(X); return (*this).operator+=(m); } template template inline const SpMat& SpMat::operator-=(const SpGlue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const SpMat m(X); return (*this).operator-=(m); } template template inline const SpMat& SpMat::operator*=(const SpGlue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const SpMat m(X); return (*this).operator*=(m); } template template inline const SpMat& SpMat::operator%=(const SpGlue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const SpMat m(X); return (*this).operator%=(m); } template template inline const SpMat& SpMat::operator/=(const SpGlue& X) { arma_extra_debug_sigprint(); arma_type_check(( is_same_type< eT, typename T1::elem_type >::no )); const SpMat m(X); return (*this).operator/=(m); } template arma_inline SpSubview SpMat::row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check(row_num >= n_rows, "SpMat::row(): out of bounds"); return SpSubview(*this, row_num, 0, 1, n_cols); } template arma_inline const SpSubview SpMat::row(const uword row_num) const { arma_extra_debug_sigprint(); arma_debug_check(row_num >= n_rows, "SpMat::row(): out of bounds"); return SpSubview(*this, row_num, 0, 1, n_cols); } template inline SpSubview SpMat::operator()(const uword row_num, const span& col_span) { arma_extra_debug_sigprint(); const bool col_all = col_span.whole; const uword local_n_cols = n_cols; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword submat_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check ( (row_num >= n_rows) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "SpMat::operator(): indices out of bounds or incorrectly used" ); return SpSubview(*this, row_num, in_col1, 1, submat_n_cols); } template inline const SpSubview SpMat::operator()(const uword row_num, const span& col_span) const { arma_extra_debug_sigprint(); const bool col_all = col_span.whole; const uword local_n_cols = n_cols; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword submat_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check ( (row_num >= n_rows) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "SpMat::operator(): indices out of bounds or incorrectly used" ); return SpSubview(*this, row_num, in_col1, 1, submat_n_cols); } template arma_inline SpSubview SpMat::col(const uword col_num) { arma_extra_debug_sigprint(); arma_debug_check(col_num >= n_cols, "SpMat::col(): out of bounds"); return SpSubview(*this, 0, col_num, n_rows, 1); } template arma_inline const SpSubview SpMat::col(const uword col_num) const { arma_extra_debug_sigprint(); arma_debug_check(col_num >= n_cols, "SpMat::col(): out of bounds"); return SpSubview(*this, 0, col_num, n_rows, 1); } template inline SpSubview SpMat::operator()(const span& row_span, const uword col_num) { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const uword local_n_rows = n_rows; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword submat_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; arma_debug_check ( (col_num >= n_cols) || ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) , "SpMat::operator(): indices out of bounds or incorrectly used" ); return SpSubview(*this, in_row1, col_num, submat_n_rows, 1); } template inline const SpSubview SpMat::operator()(const span& row_span, const uword col_num) const { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const uword local_n_rows = n_rows; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword submat_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; arma_debug_check ( (col_num >= n_cols) || ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) , "SpMat::operator(): indices out of bounds or incorrectly used" ); return SpSubview(*this, in_row1, col_num, submat_n_rows, 1); } template arma_inline SpSubview SpMat::rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_row2 >= n_rows), "SpMat::rows(): indices out of bounds or incorrectly used" ); const uword subview_n_rows = in_row2 - in_row1 + 1; return SpSubview(*this, in_row1, 0, subview_n_rows, n_cols); } template arma_inline const SpSubview SpMat::rows(const uword in_row1, const uword in_row2) const { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_row2 >= n_rows), "SpMat::rows(): indices out of bounds or incorrectly used" ); const uword subview_n_rows = in_row2 - in_row1 + 1; return SpSubview(*this, in_row1, 0, subview_n_rows, n_cols); } template arma_inline SpSubview SpMat::cols(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_col1 > in_col2) || (in_col2 >= n_cols), "SpMat::cols(): indices out of bounds or incorrectly used" ); const uword subview_n_cols = in_col2 - in_col1 + 1; return SpSubview(*this, 0, in_col1, n_rows, subview_n_cols); } template arma_inline const SpSubview SpMat::cols(const uword in_col1, const uword in_col2) const { arma_extra_debug_sigprint(); arma_debug_check ( (in_col1 > in_col2) || (in_col2 >= n_cols), "SpMat::cols(): indices out of bounds or incorrectly used" ); const uword subview_n_cols = in_col2 - in_col1 + 1; return SpSubview(*this, 0, in_col1, n_rows, subview_n_cols); } template arma_inline SpSubview SpMat::submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_col1 > in_col2) || (in_row2 >= n_rows) || (in_col2 >= n_cols), "SpMat::submat(): indices out of bounds or incorrectly used" ); const uword subview_n_rows = in_row2 - in_row1 + 1; const uword subview_n_cols = in_col2 - in_col1 + 1; return SpSubview(*this, in_row1, in_col1, subview_n_rows, subview_n_cols); } template arma_inline const SpSubview SpMat::submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) const { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_col1 > in_col2) || (in_row2 >= n_rows) || (in_col2 >= n_cols), "SpMat::submat(): indices out of bounds or incorrectly used" ); const uword subview_n_rows = in_row2 - in_row1 + 1; const uword subview_n_cols = in_col2 - in_col1 + 1; return SpSubview(*this, in_row1, in_col1, subview_n_rows, subview_n_cols); } template arma_inline SpSubview SpMat::submat(const uword in_row1, const uword in_col1, const SizeMat& s) { arma_extra_debug_sigprint(); const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; arma_debug_check ( ((in_row1 >= l_n_rows) || (in_col1 >= l_n_cols) || ((in_row1 + s_n_rows) > l_n_rows) || ((in_col1 + s_n_cols) > l_n_cols)), "SpMat::submat(): indices or size out of bounds" ); return SpSubview(*this, in_row1, in_col1, s_n_rows, s_n_cols); } template arma_inline const SpSubview SpMat::submat(const uword in_row1, const uword in_col1, const SizeMat& s) const { arma_extra_debug_sigprint(); const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; arma_debug_check ( ((in_row1 >= l_n_rows) || (in_col1 >= l_n_cols) || ((in_row1 + s_n_rows) > l_n_rows) || ((in_col1 + s_n_cols) > l_n_cols)), "SpMat::submat(): indices or size out of bounds" ); return SpSubview(*this, in_row1, in_col1, s_n_rows, s_n_cols); } template inline SpSubview SpMat::submat(const span& row_span, const span& col_span) { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const bool col_all = col_span.whole; const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword submat_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword submat_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "SpMat::submat(): indices out of bounds or incorrectly used" ); return SpSubview(*this, in_row1, in_col1, submat_n_rows, submat_n_cols); } template inline const SpSubview SpMat::submat(const span& row_span, const span& col_span) const { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const bool col_all = col_span.whole; const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword submat_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword submat_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "SpMat::submat(): indices out of bounds or incorrectly used" ); return SpSubview(*this, in_row1, in_col1, submat_n_rows, submat_n_cols); } template inline SpSubview SpMat::operator()(const span& row_span, const span& col_span) { arma_extra_debug_sigprint(); return submat(row_span, col_span); } template inline const SpSubview SpMat::operator()(const span& row_span, const span& col_span) const { arma_extra_debug_sigprint(); return submat(row_span, col_span); } template arma_inline SpSubview SpMat::operator()(const uword in_row1, const uword in_col1, const SizeMat& s) { arma_extra_debug_sigprint(); return (*this).submat(in_row1, in_col1, s); } template arma_inline const SpSubview SpMat::operator()(const uword in_row1, const uword in_col1, const SizeMat& s) const { arma_extra_debug_sigprint(); return (*this).submat(in_row1, in_col1, s); } template inline SpSubview SpMat::head_rows(const uword N) { arma_extra_debug_sigprint(); arma_debug_check( (N > n_rows), "SpMat::head_rows(): size out of bounds"); return SpSubview(*this, 0, 0, N, n_cols); } template inline const SpSubview SpMat::head_rows(const uword N) const { arma_extra_debug_sigprint(); arma_debug_check( (N > n_rows), "SpMat::head_rows(): size out of bounds"); return SpSubview(*this, 0, 0, N, n_cols); } template inline SpSubview SpMat::tail_rows(const uword N) { arma_extra_debug_sigprint(); arma_debug_check( (N > n_rows), "SpMat::tail_rows(): size out of bounds"); const uword start_row = n_rows - N; return SpSubview(*this, start_row, 0, N, n_cols); } template inline const SpSubview SpMat::tail_rows(const uword N) const { arma_extra_debug_sigprint(); arma_debug_check( (N > n_rows), "SpMat::tail_rows(): size out of bounds"); const uword start_row = n_rows - N; return SpSubview(*this, start_row, 0, N, n_cols); } template inline SpSubview SpMat::head_cols(const uword N) { arma_extra_debug_sigprint(); arma_debug_check( (N > n_cols), "SpMat::head_cols(): size out of bounds"); return SpSubview(*this, 0, 0, n_rows, N); } template inline const SpSubview SpMat::head_cols(const uword N) const { arma_extra_debug_sigprint(); arma_debug_check( (N > n_cols), "SpMat::head_cols(): size out of bounds"); return SpSubview(*this, 0, 0, n_rows, N); } template inline SpSubview SpMat::tail_cols(const uword N) { arma_extra_debug_sigprint(); arma_debug_check( (N > n_cols), "SpMat::tail_cols(): size out of bounds"); const uword start_col = n_cols - N; return SpSubview(*this, 0, start_col, n_rows, N); } template inline const SpSubview SpMat::tail_cols(const uword N) const { arma_extra_debug_sigprint(); arma_debug_check( (N > n_cols), "SpMat::tail_cols(): size out of bounds"); const uword start_col = n_cols - N; return SpSubview(*this, 0, start_col, n_rows, N); } //! creation of spdiagview (diagonal) template inline spdiagview SpMat::diag(const sword in_id) { arma_extra_debug_sigprint(); const uword row_offset = (in_id < 0) ? uword(-in_id) : 0; const uword col_offset = (in_id > 0) ? uword( in_id) : 0; arma_debug_check ( ((row_offset > 0) && (row_offset >= n_rows)) || ((col_offset > 0) && (col_offset >= n_cols)), "SpMat::diag(): requested diagonal out of bounds" ); const uword len = (std::min)(n_rows - row_offset, n_cols - col_offset); return spdiagview(*this, row_offset, col_offset, len); } //! creation of spdiagview (diagonal) template inline const spdiagview SpMat::diag(const sword in_id) const { arma_extra_debug_sigprint(); const uword row_offset = (in_id < 0) ? -in_id : 0; const uword col_offset = (in_id > 0) ? in_id : 0; arma_debug_check ( ((row_offset > 0) && (row_offset >= n_rows)) || ((col_offset > 0) && (col_offset >= n_cols)), "SpMat::diag(): requested diagonal out of bounds" ); const uword len = (std::min)(n_rows - row_offset, n_cols - col_offset); return spdiagview(*this, row_offset, col_offset, len); } template inline void SpMat::swap_rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 >= n_rows) || (in_row2 >= n_rows), "SpMat::swap_rows(): out of bounds" ); // Sanity check. if (in_row1 == in_row2) { return; } // The easier way to do this, instead of collecting all the elements in one row and then swapping with the other, will be // to iterate over each column of the matrix (since we store in column-major format) and then swap the two elements in the two rows at that time. // We will try to avoid using the at() call since it is expensive, instead preferring to use an iterator to track our position. uword col1 = (in_row1 < in_row2) ? in_row1 : in_row2; uword col2 = (in_row1 < in_row2) ? in_row2 : in_row1; for (uword lcol = 0; lcol < n_cols; lcol++) { // If there is nothing in this column we can ignore it. if (col_ptrs[lcol] == col_ptrs[lcol + 1]) { continue; } // These will represent the positions of the items themselves. uword loc1 = n_nonzero + 1; uword loc2 = n_nonzero + 1; for (uword search_pos = col_ptrs[lcol]; search_pos < col_ptrs[lcol + 1]; search_pos++) { if (row_indices[search_pos] == col1) { loc1 = search_pos; } if (row_indices[search_pos] == col2) { loc2 = search_pos; break; // No need to look any further. } } // There are four cases: we found both elements; we found one element (loc1); we found one element (loc2); we found zero elements. // If we found zero elements no work needs to be done and we can continue to the next column. if ((loc1 != (n_nonzero + 1)) && (loc2 != (n_nonzero + 1))) { // This is an easy case: just swap the values. No index modifying necessary. eT tmp = values[loc1]; access::rw(values[loc1]) = values[loc2]; access::rw(values[loc2]) = tmp; } else if (loc1 != (n_nonzero + 1)) // We only found loc1 and not loc2. { // We need to find the correct place to move our value to. It will be forward (not backwards) because in_row2 > in_row1. // Each iteration of the loop swaps the current value (loc1) with (loc1 + 1); in this manner we move our value down to where it should be. while (((loc1 + 1) < col_ptrs[lcol + 1]) && (row_indices[loc1 + 1] < in_row2)) { // Swap both the values and the indices. The column should not change. eT tmp = values[loc1]; access::rw(values[loc1]) = values[loc1 + 1]; access::rw(values[loc1 + 1]) = tmp; uword tmp_index = row_indices[loc1]; access::rw(row_indices[loc1]) = row_indices[loc1 + 1]; access::rw(row_indices[loc1 + 1]) = tmp_index; loc1++; // And increment the counter. } // Now set the row index correctly. access::rw(row_indices[loc1]) = in_row2; } else if (loc2 != (n_nonzero + 1)) { // We need to find the correct place to move our value to. It will be backwards (not forwards) because in_row1 < in_row2. // Each iteration of the loop swaps the current value (loc2) with (loc2 - 1); in this manner we move our value up to where it should be. while (((loc2 - 1) >= col_ptrs[lcol]) && (row_indices[loc2 - 1] > in_row1)) { // Swap both the values and the indices. The column should not change. eT tmp = values[loc2]; access::rw(values[loc2]) = values[loc2 - 1]; access::rw(values[loc2 - 1]) = tmp; uword tmp_index = row_indices[loc2]; access::rw(row_indices[loc2]) = row_indices[loc2 - 1]; access::rw(row_indices[loc2 - 1]) = tmp_index; loc2--; // And decrement the counter. } // Now set the row index correctly. access::rw(row_indices[loc2]) = in_row1; } /* else: no need to swap anything; both values are zero */ } } template inline void SpMat::swap_cols(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); // slow but works for(uword lrow = 0; lrow < n_rows; ++lrow) { eT tmp = at(lrow, in_col1); at(lrow, in_col1) = at(lrow, in_col2); at(lrow, in_col2) = tmp; } } template inline void SpMat::shed_row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check (row_num >= n_rows, "SpMat::shed_row(): out of bounds"); shed_rows (row_num, row_num); } template inline void SpMat::shed_col(const uword col_num) { arma_extra_debug_sigprint(); arma_debug_check (col_num >= n_cols, "SpMat::shed_col(): out of bounds"); shed_cols(col_num, col_num); } template inline void SpMat::shed_rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_row2 >= n_rows), "SpMat::shed_rows(): indices out of bounds or incorectly used" ); SpMat newmat(n_rows - (in_row2 - in_row1 + 1), n_cols); // First, count the number of elements we will be removing. uword removing = 0; for (uword i = 0; i < n_nonzero; ++i) { const uword lrow = row_indices[i]; if (lrow >= in_row1 && lrow <= in_row2) { ++removing; } } // Obtain counts of the number of points in each column and store them as the // (invalid) column pointers of the new matrix. for (uword i = 1; i < n_cols + 1; ++i) { access::rw(newmat.col_ptrs[i]) = col_ptrs[i] - col_ptrs[i - 1]; } // Now initialize memory for the new matrix. newmat.mem_resize(n_nonzero - removing); // Now, copy over the elements. // i is the index in the old matrix; j is the index in the new matrix. const_iterator it = begin(); const_iterator it_end = end(); uword j = 0; // The index in the new matrix. while (it != it_end) { const uword lrow = it.row(); const uword lcol = it.col(); if (lrow >= in_row1 && lrow <= in_row2) { // This element is being removed. Subtract it from the column counts. --access::rw(newmat.col_ptrs[lcol + 1]); } else { // This element is being kept. We may need to map the row index, // if it is past the section of rows we are removing. if (lrow > in_row2) { access::rw(newmat.row_indices[j]) = lrow - (in_row2 - in_row1 + 1); } else { access::rw(newmat.row_indices[j]) = lrow; } access::rw(newmat.values[j]) = (*it); ++j; // Increment index in new matrix. } ++it; } // Finally, sum the column counts so they are correct column pointers. for (uword i = 1; i < n_cols + 1; ++i) { access::rw(newmat.col_ptrs[i]) += newmat.col_ptrs[i - 1]; } // Now steal the memory of the new matrix. steal_mem(newmat); } template inline void SpMat::shed_cols(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_col1 > in_col2) || (in_col2 >= n_cols), "SpMat::shed_cols(): indices out of bounds or incorrectly used" ); // First we find the locations in values and row_indices for the column entries. uword col_beg = col_ptrs[in_col1]; uword col_end = col_ptrs[in_col2 + 1]; // Then we find the number of entries in the column. uword diff = col_end - col_beg; if (diff > 0) { eT* new_values = memory::acquire_chunked (n_nonzero - diff); uword* new_row_indices = memory::acquire_chunked(n_nonzero - diff); // Copy first part. if (col_beg != 0) { arrayops::copy(new_values, values, col_beg); arrayops::copy(new_row_indices, row_indices, col_beg); } // Copy second part. if (col_end != n_nonzero) { arrayops::copy(new_values + col_beg, values + col_end, n_nonzero - col_end); arrayops::copy(new_row_indices + col_beg, row_indices + col_end, n_nonzero - col_end); } memory::release(values); memory::release(row_indices); access::rw(values) = new_values; access::rw(row_indices) = new_row_indices; // Update counts and such. access::rw(n_nonzero) -= diff; } // Update column pointers. const uword new_n_cols = n_cols - ((in_col2 - in_col1) + 1); uword* new_col_ptrs = memory::acquire(new_n_cols + 2); new_col_ptrs[new_n_cols + 1] = std::numeric_limits::max(); // Copy first set of columns (no manipulation required). if (in_col1 != 0) { arrayops::copy(new_col_ptrs, col_ptrs, in_col1); } // Copy second set of columns (manipulation required). uword cur_col = in_col1; for (uword i = in_col2 + 1; i <= n_cols; ++i, ++cur_col) { new_col_ptrs[cur_col] = col_ptrs[i] - diff; } memory::release(col_ptrs); access::rw(col_ptrs) = new_col_ptrs; // We update the element and column counts, and we're done. access::rw(n_cols) = new_n_cols; access::rw(n_elem) = n_cols * n_rows; } /** * Element access; acces the i'th element (works identically to the Mat accessors). * If there is nothing at element i, 0 is returned. */ template arma_inline arma_warn_unused SpValProxy > SpMat::operator[](const uword i) { return get_value(i); } template arma_inline arma_warn_unused eT SpMat::operator[](const uword i) const { return get_value(i); } template arma_inline arma_warn_unused SpValProxy > SpMat::at(const uword i) { return get_value(i); } template arma_inline arma_warn_unused eT SpMat::at(const uword i) const { return get_value(i); } template arma_inline arma_warn_unused SpValProxy > SpMat::operator()(const uword i) { arma_debug_check( (i >= n_elem), "SpMat::operator(): out of bounds"); return get_value(i); } template arma_inline arma_warn_unused eT SpMat::operator()(const uword i) const { arma_debug_check( (i >= n_elem), "SpMat::operator(): out of bounds"); return get_value(i); } /** * Element access; access the element at row in_rows and column in_col. * If there is nothing at that position, 0 is returned. */ template arma_inline arma_warn_unused SpValProxy > SpMat::at(const uword in_row, const uword in_col) { return get_value(in_row, in_col); } template arma_inline arma_warn_unused eT SpMat::at(const uword in_row, const uword in_col) const { return get_value(in_row, in_col); } template arma_inline arma_warn_unused SpValProxy > SpMat::operator()(const uword in_row, const uword in_col) { arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "SpMat::operator(): out of bounds"); return get_value(in_row, in_col); } template arma_inline arma_warn_unused eT SpMat::operator()(const uword in_row, const uword in_col) const { arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "SpMat::operator(): out of bounds"); return get_value(in_row, in_col); } /** * Check if matrix is empty (no size, no values). */ template arma_inline arma_warn_unused bool SpMat::is_empty() const { return(n_elem == 0); } //! returns true if the object can be interpreted as a column or row vector template arma_inline arma_warn_unused bool SpMat::is_vec() const { return ( (n_rows == 1) || (n_cols == 1) ); } //! returns true if the object can be interpreted as a row vector template arma_inline arma_warn_unused bool SpMat::is_rowvec() const { return (n_rows == 1); } //! returns true if the object can be interpreted as a column vector template arma_inline arma_warn_unused bool SpMat::is_colvec() const { return (n_cols == 1); } //! returns true if the object has the same number of non-zero rows and columnns template arma_inline arma_warn_unused bool SpMat::is_square() const { return (n_rows == n_cols); } //! returns true if all of the elements are finite template inline arma_warn_unused bool SpMat::is_finite() const { arma_extra_debug_sigprint(); return arrayops::is_finite(values, n_nonzero); } template inline arma_warn_unused bool SpMat::has_inf() const { arma_extra_debug_sigprint(); return arrayops::has_inf(values, n_nonzero); } template inline arma_warn_unused bool SpMat::has_nan() const { arma_extra_debug_sigprint(); return arrayops::has_nan(values, n_nonzero); } //! returns true if the given index is currently in range template arma_inline arma_warn_unused bool SpMat::in_range(const uword i) const { return (i < n_elem); } //! returns true if the given start and end indices are currently in range template arma_inline arma_warn_unused bool SpMat::in_range(const span& x) const { arma_extra_debug_sigprint(); if(x.whole == true) { return true; } else { const uword a = x.a; const uword b = x.b; return ( (a <= b) && (b < n_elem) ); } } //! returns true if the given location is currently in range template arma_inline arma_warn_unused bool SpMat::in_range(const uword in_row, const uword in_col) const { return ( (in_row < n_rows) && (in_col < n_cols) ); } template arma_inline arma_warn_unused bool SpMat::in_range(const span& row_span, const uword in_col) const { arma_extra_debug_sigprint(); if(row_span.whole == true) { return (in_col < n_cols); } else { const uword in_row1 = row_span.a; const uword in_row2 = row_span.b; return ( (in_row1 <= in_row2) && (in_row2 < n_rows) && (in_col < n_cols) ); } } template arma_inline arma_warn_unused bool SpMat::in_range(const uword in_row, const span& col_span) const { arma_extra_debug_sigprint(); if(col_span.whole == true) { return (in_row < n_rows); } else { const uword in_col1 = col_span.a; const uword in_col2 = col_span.b; return ( (in_row < n_rows) && (in_col1 <= in_col2) && (in_col2 < n_cols) ); } } template arma_inline arma_warn_unused bool SpMat::in_range(const span& row_span, const span& col_span) const { arma_extra_debug_sigprint(); const uword in_row1 = row_span.a; const uword in_row2 = row_span.b; const uword in_col1 = col_span.a; const uword in_col2 = col_span.b; const bool rows_ok = row_span.whole ? true : ( (in_row1 <= in_row2) && (in_row2 < n_rows) ); const bool cols_ok = col_span.whole ? true : ( (in_col1 <= in_col2) && (in_col2 < n_cols) ); return ( (rows_ok == true) && (cols_ok == true) ); } template arma_inline arma_warn_unused bool SpMat::in_range(const uword in_row, const uword in_col, const SizeMat& s) const { const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; if( (in_row >= l_n_rows) || (in_col >= l_n_cols) || ((in_row + s.n_rows) > l_n_rows) || ((in_col + s.n_cols) > l_n_cols) ) { return false; } else { return true; } } template inline void SpMat::impl_print(const std::string& extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = ARMA_DEFAULT_OSTREAM.width(); ARMA_DEFAULT_OSTREAM << extra_text << '\n'; ARMA_DEFAULT_OSTREAM.width(orig_width); } arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this, true); } template inline void SpMat::impl_print(std::ostream& user_stream, const std::string& extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = user_stream.width(); user_stream << extra_text << '\n'; user_stream.width(orig_width); } arma_ostream::print(user_stream, *this, true); } template inline void SpMat::impl_raw_print(const std::string& extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = ARMA_DEFAULT_OSTREAM.width(); ARMA_DEFAULT_OSTREAM << extra_text << '\n'; ARMA_DEFAULT_OSTREAM.width(orig_width); } arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this, false); } template inline void SpMat::impl_raw_print(std::ostream& user_stream, const std::string& extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = user_stream.width(); user_stream << extra_text << '\n'; user_stream.width(orig_width); } arma_ostream::print(user_stream, *this, false); } /** * Matrix printing, prepends supplied text. * Prints 0 wherever no element exists. */ template inline void SpMat::impl_print_dense(const std::string& extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = ARMA_DEFAULT_OSTREAM.width(); ARMA_DEFAULT_OSTREAM << extra_text << '\n'; ARMA_DEFAULT_OSTREAM.width(orig_width); } arma_ostream::print_dense(ARMA_DEFAULT_OSTREAM, *this, true); } template inline void SpMat::impl_print_dense(std::ostream& user_stream, const std::string& extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = user_stream.width(); user_stream << extra_text << '\n'; user_stream.width(orig_width); } arma_ostream::print_dense(user_stream, *this, true); } template inline void SpMat::impl_raw_print_dense(const std::string& extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = ARMA_DEFAULT_OSTREAM.width(); ARMA_DEFAULT_OSTREAM << extra_text << '\n'; ARMA_DEFAULT_OSTREAM.width(orig_width); } arma_ostream::print_dense(ARMA_DEFAULT_OSTREAM, *this, false); } template inline void SpMat::impl_raw_print_dense(std::ostream& user_stream, const std::string& extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = user_stream.width(); user_stream << extra_text << '\n'; user_stream.width(orig_width); } arma_ostream::print_dense(user_stream, *this, false); } //! Set the size to the size of another matrix. template template inline void SpMat::copy_size(const SpMat& m) { arma_extra_debug_sigprint(); set_size(m.n_rows, m.n_cols); } template template inline void SpMat::copy_size(const Mat& m) { arma_extra_debug_sigprint(); set_size(m.n_rows, m.n_cols); } template inline void SpMat::set_size(const uword in_elem) { arma_extra_debug_sigprint(); // If this is a row vector, we resize to a row vector. if(vec_state == 2) { set_size(1, in_elem); } else { set_size(in_elem, 1); } } template inline void SpMat::set_size(const uword in_rows, const uword in_cols) { arma_extra_debug_sigprint(); if( (n_rows == in_rows) && (n_cols == in_cols) ) { return; } else { init(in_rows, in_cols); } } template inline void SpMat::resize(const uword in_rows, const uword in_cols) { arma_extra_debug_sigprint(); if( (n_rows == in_rows) || (n_cols == in_cols) ) { return; } if( (n_elem == 0) || (n_nonzero == 0) ) { set_size(in_rows, in_cols); return; } SpMat tmp(in_rows, in_cols); if(tmp.n_elem > 0) { const uword end_row = (std::min)(in_rows, n_rows) - 1; const uword end_col = (std::min)(in_cols, n_cols) - 1; tmp.submat(0, 0, end_row, end_col) = (*this).submat(0, 0, end_row, end_col); } steal_mem(tmp); } template inline void SpMat::reshape(const uword in_rows, const uword in_cols) { arma_extra_debug_sigprint(); arma_check( ((in_rows*in_cols) != n_elem), "SpMat::reshape(): changing the number of elements in a sparse matrix is currently not supported" ); if( (n_rows == in_rows) && (n_cols == in_cols) ) { return; } // We have to modify all of the relevant row indices and the relevant column pointers. // Iterate over all the points to do this. We won't be deleting any points, but we will be modifying // columns and rows. We'll have to store a new set of column vectors. uword* new_col_ptrs = memory::acquire(in_cols + 2); new_col_ptrs[in_cols + 1] = std::numeric_limits::max(); uword* new_row_indices = memory::acquire_chunked(n_nonzero + 1); access::rw(new_row_indices[n_nonzero]) = 0; arrayops::inplace_set(new_col_ptrs, uword(0), in_cols + 1); for(const_iterator it = begin(); it != end(); it++) { uword vector_position = (it.col() * n_rows) + it.row(); new_row_indices[it.pos()] = vector_position % in_rows; ++new_col_ptrs[vector_position / in_rows + 1]; } // Now sum the column counts to get the new column pointers. for(uword i = 1; i <= in_cols; i++) { access::rw(new_col_ptrs[i]) += new_col_ptrs[i - 1]; } // Copy the new row indices. memory::release(row_indices); access::rw(row_indices) = new_row_indices; memory::release(col_ptrs); access::rw(col_ptrs) = new_col_ptrs; // Now set the size. access::rw(n_rows) = in_rows; access::rw(n_cols) = in_cols; } // this form is deprecated: don't use it template inline void SpMat::reshape(const uword in_rows, const uword in_cols, const uword dim) { arma_extra_debug_sigprint(); arma_debug_check( (dim > 1), "SpMat::reshape(): paramter 'dim' must be 0 or 1" ); if(dim == 0) { (*this).reshape(in_rows, in_cols); } else if(dim == 1) { arma_check( ((in_rows*in_cols) != n_elem), "SpMat::reshape(): changing the number of elements in a sparse matrix is currently not supported" ); // Row-wise reshaping. This is more tedious and we will use a separate sparse matrix to do it. SpMat tmp(in_rows, in_cols); for(const_row_iterator it = begin_row(); it.pos() < n_nonzero; it++) { uword vector_position = (it.row() * n_cols) + it.col(); tmp((vector_position / in_cols), (vector_position % in_cols)) = (*it); } steal_mem(tmp); } } template inline const SpMat& SpMat::zeros() { arma_extra_debug_sigprint(); if(n_nonzero != 0) { init(n_rows, n_cols); } return *this; } template inline const SpMat& SpMat::zeros(const uword in_elem) { arma_extra_debug_sigprint(); if(vec_state == 2) { zeros(1, in_elem); // Row vector } else { zeros(in_elem, 1); } return *this; } template inline const SpMat& SpMat::zeros(const uword in_rows, const uword in_cols) { arma_extra_debug_sigprint(); const bool already_done = ( (n_nonzero == 0) && (n_rows == in_rows) && (n_cols == in_cols) ); if(already_done == false) { init(in_rows, in_cols); } return *this; } template inline const SpMat& SpMat::eye() { arma_extra_debug_sigprint(); return (*this).eye(n_rows, n_cols); } template inline const SpMat& SpMat::eye(const uword in_rows, const uword in_cols) { arma_extra_debug_sigprint(); const uword N = (std::min)(in_rows, in_cols); zeros(in_rows, in_cols); mem_resize(N); arrayops::inplace_set(access::rwp(values), eT(1), N); for(uword i = 0; i < N; ++i) { access::rw(row_indices[i]) = i; } for(uword i = 0; i <= N; ++i) { access::rw(col_ptrs[i]) = i; } access::rw(n_nonzero) = N; return *this; } template inline const SpMat& SpMat::speye() { arma_extra_debug_sigprint(); return (*this).eye(n_rows, n_cols); } template inline const SpMat& SpMat::speye(const uword in_n_rows, const uword in_n_cols) { arma_extra_debug_sigprint(); return (*this).eye(in_n_rows, in_n_cols); } template inline const SpMat& SpMat::sprandu(const uword in_rows, const uword in_cols, const double density) { arma_extra_debug_sigprint(); arma_debug_check( ( (density < double(0)) || (density > double(1)) ), "sprandu(): density must be in the [0,1] interval" ); zeros(in_rows, in_cols); mem_resize( uword(density * double(in_rows) * double(in_cols) + 0.5) ); if(n_nonzero == 0) { return *this; } arma_rng::randu::fill( access::rwp(values), n_nonzero ); uvec indices = linspace( 0u, in_rows*in_cols-1, n_nonzero ); // perturb the indices for(uword i=1; i < n_nonzero-1; ++i) { const uword index_left = indices[i-1]; const uword index_right = indices[i+1]; const uword center = (index_left + index_right) / 2; const uword delta1 = center - index_left - 1; const uword delta2 = index_right - center - 1; const uword min_delta = (std::min)(delta1, delta2); uword index_new = uword( double(center) + double(min_delta) * (2.0*randu()-1.0) ); // paranoia, but better be safe than sorry if( (index_left < index_new) && (index_new < index_right) ) { indices[i] = index_new; } } uword cur_index = 0; uword count = 0; for(uword lcol = 0; lcol < in_cols; ++lcol) for(uword lrow = 0; lrow < in_rows; ++lrow) { if(count == indices[cur_index]) { access::rw(row_indices[cur_index]) = lrow; access::rw(col_ptrs[lcol + 1])++; ++cur_index; } ++count; } if(cur_index != n_nonzero) { // Fix size to correct size. mem_resize(cur_index); } // Sum column pointers. for(uword lcol = 1; lcol <= in_cols; ++lcol) { access::rw(col_ptrs[lcol]) += col_ptrs[lcol - 1]; } return *this; } template inline const SpMat& SpMat::sprandn(const uword in_rows, const uword in_cols, const double density) { arma_extra_debug_sigprint(); arma_debug_check( ( (density < double(0)) || (density > double(1)) ), "sprandn(): density must be in the [0,1] interval" ); zeros(in_rows, in_cols); mem_resize( uword(density * double(in_rows) * double(in_cols) + 0.5) ); if(n_nonzero == 0) { return *this; } arma_rng::randn::fill( access::rwp(values), n_nonzero ); uvec indices = linspace( 0u, in_rows*in_cols-1, n_nonzero ); // perturb the indices for(uword i=1; i < n_nonzero-1; ++i) { const uword index_left = indices[i-1]; const uword index_right = indices[i+1]; const uword center = (index_left + index_right) / 2; const uword delta1 = center - index_left - 1; const uword delta2 = index_right - center - 1; const uword min_delta = (std::min)(delta1, delta2); uword index_new = uword( double(center) + double(min_delta) * (2.0*randu()-1.0) ); // paranoia, but better be safe than sorry if( (index_left < index_new) && (index_new < index_right) ) { indices[i] = index_new; } } uword cur_index = 0; uword count = 0; for(uword lcol = 0; lcol < in_cols; ++lcol) for(uword lrow = 0; lrow < in_rows; ++lrow) { if(count == indices[cur_index]) { access::rw(row_indices[cur_index]) = lrow; access::rw(col_ptrs[lcol + 1])++; ++cur_index; } ++count; } if(cur_index != n_nonzero) { // Fix size to correct size. mem_resize(cur_index); } // Sum column pointers. for(uword lcol = 1; lcol <= in_cols; ++lcol) { access::rw(col_ptrs[lcol]) += col_ptrs[lcol - 1]; } return *this; } template inline void SpMat::reset() { arma_extra_debug_sigprint(); switch(vec_state) { default: init(0, 0); break; case 1: init(0, 1); break; case 2: init(1, 0); break; } } template template inline void SpMat::set_real(const SpBase::pod_type,T1>& X) { arma_extra_debug_sigprint(); SpMat_aux::set_real(*this, X); } template template inline void SpMat::set_imag(const SpBase::pod_type,T1>& X) { arma_extra_debug_sigprint(); SpMat_aux::set_imag(*this, X); } //! save the matrix to a file template inline bool SpMat::save(const std::string name, const file_type type, const bool print_status) const { arma_extra_debug_sigprint(); bool save_okay; switch(type) { // case raw_ascii: // save_okay = diskio::save_raw_ascii(*this, name); // break; // case csv_ascii: // save_okay = diskio::save_csv_ascii(*this, name); // break; case arma_binary: save_okay = diskio::save_arma_binary(*this, name); break; case coord_ascii: save_okay = diskio::save_coord_ascii(*this, name); break; default: arma_warn(print_status, "SpMat::save(): unsupported file type"); save_okay = false; } arma_warn( print_status && (save_okay == false), "SpMat::save(): couldn't write to ", name); return save_okay; } //! save the matrix to a stream template inline bool SpMat::save(std::ostream& os, const file_type type, const bool print_status) const { arma_extra_debug_sigprint(); bool save_okay; switch(type) { // case raw_ascii: // save_okay = diskio::save_raw_ascii(*this, os); // break; // case csv_ascii: // save_okay = diskio::save_csv_ascii(*this, os); // break; case arma_binary: save_okay = diskio::save_arma_binary(*this, os); break; case coord_ascii: save_okay = diskio::save_coord_ascii(*this, os); break; default: arma_warn(print_status, "SpMat::save(): unsupported file type"); save_okay = false; } arma_warn( print_status && (save_okay == false), "SpMat::save(): couldn't write to the given stream"); return save_okay; } //! load a matrix from a file template inline bool SpMat::load(const std::string name, const file_type type, const bool print_status) { arma_extra_debug_sigprint(); bool load_okay; std::string err_msg; switch(type) { // case auto_detect: // load_okay = diskio::load_auto_detect(*this, name, err_msg); // break; // case raw_ascii: // load_okay = diskio::load_raw_ascii(*this, name, err_msg); // break; // case csv_ascii: // load_okay = diskio::load_csv_ascii(*this, name, err_msg); // break; case arma_binary: load_okay = diskio::load_arma_binary(*this, name, err_msg); break; case coord_ascii: load_okay = diskio::load_coord_ascii(*this, name, err_msg); break; default: arma_warn(print_status, "SpMat::load(): unsupported file type"); load_okay = false; } if(load_okay == false) { if(err_msg.length() > 0) { arma_warn(print_status, "SpMat::load(): ", err_msg, name); } else { arma_warn(print_status, "SpMat::load(): couldn't read ", name); } } if(load_okay == false) { (*this).reset(); } return load_okay; } //! load a matrix from a stream template inline bool SpMat::load(std::istream& is, const file_type type, const bool print_status) { arma_extra_debug_sigprint(); bool load_okay; std::string err_msg; switch(type) { // case auto_detect: // load_okay = diskio::load_auto_detect(*this, is, err_msg); // break; // case raw_ascii: // load_okay = diskio::load_raw_ascii(*this, is, err_msg); // break; // case csv_ascii: // load_okay = diskio::load_csv_ascii(*this, is, err_msg); // break; case arma_binary: load_okay = diskio::load_arma_binary(*this, is, err_msg); break; case coord_ascii: load_okay = diskio::load_coord_ascii(*this, is, err_msg); break; default: arma_warn(print_status, "SpMat::load(): unsupported file type"); load_okay = false; } if(load_okay == false) { if(err_msg.length() > 0) { arma_warn(print_status, "SpMat::load(): ", err_msg, "the given stream"); } else { arma_warn(print_status, "SpMat::load(): couldn't load from the given stream"); } } if(load_okay == false) { (*this).reset(); } return load_okay; } //! save the matrix to a file, without printing any error messages template inline bool SpMat::quiet_save(const std::string name, const file_type type) const { arma_extra_debug_sigprint(); return (*this).save(name, type, false); } //! save the matrix to a stream, without printing any error messages template inline bool SpMat::quiet_save(std::ostream& os, const file_type type) const { arma_extra_debug_sigprint(); return (*this).save(os, type, false); } //! load a matrix from a file, without printing any error messages template inline bool SpMat::quiet_load(const std::string name, const file_type type) { arma_extra_debug_sigprint(); return (*this).load(name, type, false); } //! load a matrix from a stream, without printing any error messages template inline bool SpMat::quiet_load(std::istream& is, const file_type type) { arma_extra_debug_sigprint(); return (*this).load(is, type, false); } /** * Initialize the matrix to the specified size. Data is not preserved, so the matrix is assumed to be entirely sparse (empty). */ template inline void SpMat::init(uword in_rows, uword in_cols) { arma_extra_debug_sigprint(); // Verify that we are allowed to do this. if(vec_state > 0) { if((in_rows == 0) && (in_cols == 0)) { if(vec_state == 1) { in_cols = 1; } else if(vec_state == 2) { in_rows = 1; } } else { arma_debug_check ( ( ((vec_state == 1) && (in_cols != 1)) || ((vec_state == 2) && (in_rows != 1)) ), "SpMat::init(): object is a row or column vector; requested size is not compatible" ); } } #if (defined(ARMA_USE_CXX11) || defined(ARMA_64BIT_WORD)) const char* error_message = "SpMat::init(): requested size is too large"; #else const char* error_message = "SpMat::init(): requested size is too large; suggest to compile in C++11 mode or enable ARMA_64BIT_WORD"; #endif // Ensure that n_elem can hold the result of (n_rows * n_cols) arma_debug_check ( ( ( (in_rows > ARMA_MAX_UHWORD) || (in_cols > ARMA_MAX_UHWORD) ) ? ( (double(in_rows) * double(in_cols)) > double(ARMA_MAX_UWORD) ) : false ), error_message ); // Clean out the existing memory. if (values) { memory::release(values); memory::release(row_indices); } access::rw(values) = memory::acquire_chunked (1); access::rw(row_indices) = memory::acquire_chunked(1); access::rw(values[0]) = 0; access::rw(row_indices[0]) = 0; memory::release(col_ptrs); // Set the new size accordingly. access::rw(n_rows) = in_rows; access::rw(n_cols) = in_cols; access::rw(n_elem) = (in_rows * in_cols); access::rw(n_nonzero) = 0; // Try to allocate the column pointers, filling them with 0, // except for the last element which contains the maximum possible element // (so iterators terminate correctly). access::rw(col_ptrs) = memory::acquire(in_cols + 2); arrayops::inplace_set(access::rwp(col_ptrs), uword(0), in_cols + 1); access::rw(col_ptrs[in_cols + 1]) = std::numeric_limits::max(); } /** * Initialize the matrix from a string. */ template inline void SpMat::init(const std::string& text) { arma_extra_debug_sigprint(); // Figure out the size first. uword t_n_rows = 0; uword t_n_cols = 0; bool t_n_cols_found = false; std::string token; std::string::size_type line_start = 0; std::string::size_type line_end = 0; while (line_start < text.length()) { line_end = text.find(';', line_start); if (line_end == std::string::npos) line_end = text.length() - 1; std::string::size_type line_len = line_end - line_start + 1; std::stringstream line_stream(text.substr(line_start, line_len)); // Step through each column. uword line_n_cols = 0; while (line_stream >> token) { ++line_n_cols; } if (line_n_cols > 0) { if (t_n_cols_found == false) { t_n_cols = line_n_cols; t_n_cols_found = true; } else // Check it each time through, just to make sure. arma_check((line_n_cols != t_n_cols), "SpMat::init(): inconsistent number of columns in given string"); ++t_n_rows; } line_start = line_end + 1; } zeros(t_n_rows, t_n_cols); // Second time through will pick up all the values. line_start = 0; line_end = 0; uword lrow = 0; while (line_start < text.length()) { line_end = text.find(';', line_start); if (line_end == std::string::npos) line_end = text.length() - 1; std::string::size_type line_len = line_end - line_start + 1; std::stringstream line_stream(text.substr(line_start, line_len)); uword lcol = 0; eT val; while (line_stream >> val) { // Only add nonzero elements. if (val != eT(0)) { get_value(lrow, lcol) = val; } ++lcol; } ++lrow; line_start = line_end + 1; } } /** * Copy from another matrix. */ template inline void SpMat::init(const SpMat& x) { arma_extra_debug_sigprint(); // Ensure we are not initializing to ourselves. if (this != &x) { init(x.n_rows, x.n_cols); // values and row_indices may not be null. if (values != NULL) { memory::release(values); memory::release(row_indices); } access::rw(values) = memory::acquire_chunked (x.n_nonzero + 1); access::rw(row_indices) = memory::acquire_chunked(x.n_nonzero + 1); // Now copy over the elements. arrayops::copy(access::rwp(values), x.values, x.n_nonzero + 1); arrayops::copy(access::rwp(row_indices), x.row_indices, x.n_nonzero + 1); arrayops::copy(access::rwp(col_ptrs), x.col_ptrs, x.n_cols + 1); access::rw(n_nonzero) = x.n_nonzero; } } template inline void SpMat::init_batch_std(const Mat& locs, const Mat& vals, const bool sort_locations) { arma_extra_debug_sigprint(); // Resize to correct number of elements. mem_resize(vals.n_elem); // Reset column pointers to zero. arrayops::inplace_set(access::rwp(col_ptrs), uword(0), n_cols + 1); bool actually_sorted = true; if(sort_locations == true) { // sort_index() uses std::sort() which may use quicksort... so we better // make sure it's not already sorted before taking an O(N^2) sort penalty. for (uword i = 1; i < locs.n_cols; ++i) { const uword* locs_i = locs.colptr(i ); const uword* locs_im1 = locs.colptr(i-1); if( (locs_i[1] < locs_im1[1]) || (locs_i[1] == locs_im1[1] && locs_i[0] <= locs_im1[0]) ) { actually_sorted = false; break; } } if(actually_sorted == false) { // This may not be the fastest possible implementation but it maximizes code reuse. Col abslocs(locs.n_cols); for (uword i = 0; i < locs.n_cols; ++i) { const uword* locs_i = locs.colptr(i); abslocs[i] = locs_i[1] * n_rows + locs_i[0]; } uvec sorted_indices = sort_index(abslocs); // Ascending sort. // Now we add the elements in this sorted order. for (uword i = 0; i < sorted_indices.n_elem; ++i) { const uword* locs_i = locs.colptr( sorted_indices[i] ); arma_debug_check( ( (locs_i[0] >= n_rows) || (locs_i[1] >= n_cols) ), "SpMat::SpMat(): invalid row or column index" ); if(i > 0) { const uword* locs_im1 = locs.colptr( sorted_indices[i-1] ); arma_debug_check( ( (locs_i[1] == locs_im1[1]) && (locs_i[0] == locs_im1[0]) ), "SpMat::SpMat(): detected identical locations" ); } access::rw(values[i]) = vals[ sorted_indices[i] ]; access::rw(row_indices[i]) = locs_i[0]; access::rw(col_ptrs[ locs_i[1] + 1 ])++; } } } if( (sort_locations == false) || (actually_sorted == true) ) { // Now set the values and row indices correctly. // Increment the column pointers in each column (so they are column "counts"). for(uword i = 0; i < vals.n_elem; ++i) { const uword* locs_i = locs.colptr(i); arma_debug_check( ( (locs_i[0] >= n_rows) || (locs_i[1] >= n_cols) ), "SpMat::SpMat(): invalid row or column index" ); if(i > 0) { const uword* locs_im1 = locs.colptr(i-1); arma_debug_check ( ( (locs_i[1] < locs_im1[1]) || (locs_i[1] == locs_im1[1] && locs_i[0] < locs_im1[0]) ), "SpMat::SpMat(): out of order points; either pass sort_locations = true, or sort points in column-major ordering" ); arma_debug_check( ( (locs_i[1] == locs_im1[1]) && (locs_i[0] == locs_im1[0]) ), "SpMat::SpMat(): detected identical locations" ); } access::rw(values[i]) = vals[i]; access::rw(row_indices[i]) = locs_i[0]; access::rw(col_ptrs[ locs_i[1] + 1 ])++; } } // Now fix the column pointers. for (uword i = 0; i < n_cols; ++i) { access::rw(col_ptrs[i + 1]) += col_ptrs[i]; } } template inline void SpMat::init_batch_add(const Mat& locs, const Mat& vals, const bool sort_locations) { arma_extra_debug_sigprint(); if(locs.n_cols < 2) { init_batch_std(locs, vals, false); return; } // Reset column pointers to zero. arrayops::inplace_set(access::rwp(col_ptrs), uword(0), n_cols + 1); bool actually_sorted = true; if(sort_locations == true) { // sort_index() uses std::sort() which may use quicksort... so we better // make sure it's not already sorted before taking an O(N^2) sort penalty. for (uword i = 1; i < locs.n_cols; ++i) { const uword* locs_i = locs.colptr(i ); const uword* locs_im1 = locs.colptr(i-1); if( (locs_i[1] < locs_im1[1]) || (locs_i[1] == locs_im1[1] && locs_i[0] <= locs_im1[0]) ) { actually_sorted = false; break; } } if(actually_sorted == false) { // This may not be the fastest possible implementation but it maximizes code reuse. Col abslocs(locs.n_cols); for (uword i = 0; i < locs.n_cols; ++i) { const uword* locs_i = locs.colptr(i); abslocs[i] = locs_i[1] * n_rows + locs_i[0]; } uvec sorted_indices = sort_index(abslocs); // Ascending sort. // work out the number of unique elments uword n_unique = 1; // first element is unique for(uword i=1; i < sorted_indices.n_elem; ++i) { const uword* locs_i = locs.colptr( sorted_indices[i ] ); const uword* locs_im1 = locs.colptr( sorted_indices[i-1] ); if( (locs_i[1] != locs_im1[1]) || (locs_i[0] != locs_im1[0]) ) { ++n_unique; } } // resize to correct number of elements mem_resize(n_unique); // Now we add the elements in this sorted order. uword count = 0; // first element { const uword i = 0; const uword* locs_i = locs.colptr( sorted_indices[i] ); arma_debug_check( ( (locs_i[0] >= n_rows) || (locs_i[1] >= n_cols) ), "SpMat::SpMat(): invalid row or column index" ); access::rw(values[count]) = vals[ sorted_indices[i] ]; access::rw(row_indices[count]) = locs_i[0]; access::rw(col_ptrs[ locs_i[1] + 1 ])++; } for(uword i=1; i < sorted_indices.n_elem; ++i) { const uword* locs_i = locs.colptr( sorted_indices[i ] ); const uword* locs_im1 = locs.colptr( sorted_indices[i-1] ); arma_debug_check( ( (locs_i[0] >= n_rows) || (locs_i[1] >= n_cols) ), "SpMat::SpMat(): invalid row or column index" ); if( (locs_i[1] == locs_im1[1]) && (locs_i[0] == locs_im1[0]) ) { access::rw(values[count]) += vals[ sorted_indices[i] ]; } else { count++; access::rw(values[count]) = vals[ sorted_indices[i] ]; access::rw(row_indices[count]) = locs_i[0]; access::rw(col_ptrs[ locs_i[1] + 1 ])++; } } } } if( (sort_locations == false) || (actually_sorted == true) ) { // work out the number of unique elments uword n_unique = 1; // first element is unique for(uword i=1; i < locs.n_cols; ++i) { const uword* locs_i = locs.colptr(i ); const uword* locs_im1 = locs.colptr(i-1); if( (locs_i[1] != locs_im1[1]) || (locs_i[0] != locs_im1[0]) ) { ++n_unique; } } // resize to correct number of elements mem_resize(n_unique); // Now set the values and row indices correctly. // Increment the column pointers in each column (so they are column "counts"). uword count = 0; // first element { const uword i = 0; const uword* locs_i = locs.colptr(i); arma_debug_check( ( (locs_i[0] >= n_rows) || (locs_i[1] >= n_cols) ), "SpMat::SpMat(): invalid row or column index" ); access::rw(values[count]) = vals[i]; access::rw(row_indices[count]) = locs_i[0]; access::rw(col_ptrs[ locs_i[1] + 1 ])++; } for(uword i=1; i < locs.n_cols; ++i) { const uword* locs_i = locs.colptr(i ); const uword* locs_im1 = locs.colptr(i-1); arma_debug_check( ( (locs_i[0] >= n_rows) || (locs_i[1] >= n_cols) ), "SpMat::SpMat(): invalid row or column index" ); arma_debug_check ( ( (locs_i[1] < locs_im1[1]) || (locs_i[1] == locs_im1[1] && locs_i[0] < locs_im1[0]) ), "SpMat::SpMat(): out of order points; either pass sort_locations = true, or sort points in column-major ordering" ); if( (locs_i[1] == locs_im1[1]) && (locs_i[0] == locs_im1[0]) ) { access::rw(values[count]) += vals[i]; } else { count++; access::rw(values[count]) = vals[i]; access::rw(row_indices[count]) = locs_i[0]; access::rw(col_ptrs[ locs_i[1] + 1 ])++; } } } // Now fix the column pointers. for (uword i = 0; i < n_cols; ++i) { access::rw(col_ptrs[i + 1]) += col_ptrs[i]; } } template inline void SpMat::mem_resize(const uword new_n_nonzero) { arma_extra_debug_sigprint(); if(n_nonzero != new_n_nonzero) { if(new_n_nonzero == 0) { memory::release(values); memory::release(row_indices); access::rw(values) = memory::acquire_chunked (1); access::rw(row_indices) = memory::acquire_chunked(1); access::rw( values[0]) = 0; access::rw(row_indices[0]) = 0; } else { // Figure out the actual amount of memory currently allocated // NOTE: this relies on memory::acquire_chunked() being used for the 'values' and 'row_indices' arrays const uword n_alloc = memory::enlarge_to_mult_of_chunksize(n_nonzero); if(n_alloc < new_n_nonzero) { eT* new_values = memory::acquire_chunked (new_n_nonzero + 1); uword* new_row_indices = memory::acquire_chunked(new_n_nonzero + 1); if(n_nonzero > 0) { // Copy old elements. uword copy_len = std::min(n_nonzero, new_n_nonzero); arrayops::copy(new_values, values, copy_len); arrayops::copy(new_row_indices, row_indices, copy_len); } memory::release(values); memory::release(row_indices); access::rw(values) = new_values; access::rw(row_indices) = new_row_indices; } // Set the "fake end" of the matrix by setting the last value and row // index to 0. This helps the iterators work correctly. access::rw( values[new_n_nonzero]) = 0; access::rw(row_indices[new_n_nonzero]) = 0; } access::rw(n_nonzero) = new_n_nonzero; } } template inline void SpMat::remove_zeros() { arma_extra_debug_sigprint(); const uword old_n_nonzero = n_nonzero; uword new_n_nonzero = 0; const eT* old_values = values; for(uword i=0; i < old_n_nonzero; ++i) { new_n_nonzero += (old_values[i] != eT(0)) ? uword(1) : uword(0); } if(new_n_nonzero != old_n_nonzero) { if(new_n_nonzero == 0) { init(n_rows, n_cols); return; } SpMat tmp(n_rows, n_cols); tmp.mem_resize(new_n_nonzero); uword new_index = 0; const_iterator it = begin(); const_iterator it_end = end(); for(; it != it_end; ++it) { const eT val = eT(*it); if(val != eT(0)) { access::rw(tmp.values[new_index]) = val; access::rw(tmp.row_indices[new_index]) = it.row(); access::rw(tmp.col_ptrs[it.col() + 1])++; ++new_index; } } for(uword i=0; i < n_cols; ++i) { access::rw(tmp.col_ptrs[i + 1]) += tmp.col_ptrs[i]; } steal_mem(tmp); } } // Steal memory from another matrix. template inline void SpMat::steal_mem(SpMat& x) { arma_extra_debug_sigprint(); if(this != &x) { if(values ) { memory::release(access::rw(values)); } if(row_indices) { memory::release(access::rw(row_indices)); } if(col_ptrs ) { memory::release(access::rw(col_ptrs)); } access::rw(n_rows) = x.n_rows; access::rw(n_cols) = x.n_cols; access::rw(n_elem) = x.n_elem; access::rw(n_nonzero) = x.n_nonzero; access::rw(values) = x.values; access::rw(row_indices) = x.row_indices; access::rw(col_ptrs) = x.col_ptrs; // Set other matrix to empty. access::rw(x.n_rows) = 0; access::rw(x.n_cols) = 0; access::rw(x.n_elem) = 0; access::rw(x.n_nonzero) = 0; access::rw(x.values) = NULL; access::rw(x.row_indices) = NULL; access::rw(x.col_ptrs) = NULL; } } template template arma_hot inline void SpMat::init_xform(const SpBase& A, const Functor& func) { arma_extra_debug_sigprint(); // if possible, avoid doing a copy and instead apply func to the generated elements if(SpProxy::Q_created_by_proxy) { (*this) = A.get_ref(); const uword nnz = n_nonzero; eT* t_values = access::rwp(values); for(uword i=0; i < nnz; ++i) { t_values[i] = func(t_values[i]); } remove_zeros(); } else { init_xform_mt(A.get_ref(), func); } } template template arma_hot inline void SpMat::init_xform_mt(const SpBase& A, const Functor& func) { arma_extra_debug_sigprint(); const SpProxy P(A.get_ref()); if( (P.is_alias(*this) == true) || (is_SpMat::stored_type>::value == true) ) { // NOTE: unwrap_spmat will convert a submatrix to a matrix, which in effect takes care of aliasing with submatrices; // NOTE: however, when more delayed ops are implemented, more elaborate handling of aliasing will be necessary const unwrap_spmat::stored_type> tmp(P.Q); const SpMat& x = tmp.M; if(void_ptr(this) != void_ptr(&x)) { init(x.n_rows, x.n_cols); // values and row_indices may not be null. if(values != NULL) { memory::release(values); memory::release(row_indices); } access::rw(values) = memory::acquire_chunked (x.n_nonzero + 1); access::rw(row_indices) = memory::acquire_chunked(x.n_nonzero + 1); arrayops::copy(access::rwp(row_indices), x.row_indices, x.n_nonzero + 1); arrayops::copy(access::rwp(col_ptrs), x.col_ptrs, x.n_cols + 1); access::rw(n_nonzero) = x.n_nonzero; } // initialise the elements array with a transformed version of the elements from x const uword nnz = n_nonzero; const eT2* x_values = x.values; eT* t_values = access::rwp(values); for(uword i=0; i < nnz; ++i) { t_values[i] = func(x_values[i]); // NOTE: func() must produce a value of type eT (ie. act as a convertor between eT2 and eT) } } else { init(P.get_n_rows(), P.get_n_cols()); mem_resize(P.get_n_nonzero()); typename SpProxy::const_iterator_type it = P.begin(); typename SpProxy::const_iterator_type it_end = P.end(); while(it != it_end) { access::rw(row_indices[it.pos()]) = it.row(); access::rw(values[it.pos()]) = func(*it); // NOTE: func() must produce a value of type eT (ie. act as a convertor between eT2 and eT) ++access::rw(col_ptrs[it.col() + 1]); ++it; } // Now sum column pointers. for(uword c = 1; c <= n_cols; ++c) { access::rw(col_ptrs[c]) += col_ptrs[c - 1]; } } remove_zeros(); } template inline typename SpMat::iterator SpMat::begin() { return iterator(*this); } template inline typename SpMat::const_iterator SpMat::begin() const { return const_iterator(*this); } template inline typename SpMat::iterator SpMat::end() { return iterator(*this, 0, n_cols, n_nonzero); } template inline typename SpMat::const_iterator SpMat::end() const { return const_iterator(*this, 0, n_cols, n_nonzero); } template inline typename SpMat::iterator SpMat::begin_col(const uword col_num) { return iterator(*this, 0, col_num); } template inline typename SpMat::const_iterator SpMat::begin_col(const uword col_num) const { return const_iterator(*this, 0, col_num); } template inline typename SpMat::iterator SpMat::end_col(const uword col_num) { return iterator(*this, 0, col_num + 1); } template inline typename SpMat::const_iterator SpMat::end_col(const uword col_num) const { return const_iterator(*this, 0, col_num + 1); } template inline typename SpMat::row_iterator SpMat::begin_row(const uword row_num) { return row_iterator(*this, row_num, 0); } template inline typename SpMat::const_row_iterator SpMat::begin_row(const uword row_num) const { return const_row_iterator(*this, row_num, 0); } template inline typename SpMat::row_iterator SpMat::end_row() { return row_iterator(*this, n_nonzero); } template inline typename SpMat::const_row_iterator SpMat::end_row() const { return const_row_iterator(*this, n_nonzero); } template inline typename SpMat::row_iterator SpMat::end_row(const uword row_num) { return row_iterator(*this, row_num + 1, 0); } template inline typename SpMat::const_row_iterator SpMat::end_row(const uword row_num) const { return const_row_iterator(*this, row_num + 1, 0); } template inline typename SpMat::row_col_iterator SpMat::begin_row_col() { return begin(); } template inline typename SpMat::const_row_col_iterator SpMat::begin_row_col() const { return begin(); } template inline typename SpMat::row_col_iterator SpMat::end_row_col() { return end(); } template inline typename SpMat::const_row_col_iterator SpMat::end_row_col() const { return end(); } template inline void SpMat::clear() { (*this).reset(); } template inline bool SpMat::empty() const { return (n_elem == 0); } template inline uword SpMat::size() const { return n_elem; } template inline arma_hot arma_warn_unused SpValProxy > SpMat::get_value(const uword i) { // First convert to the actual location. uword lcol = i / n_rows; // Integer division. uword lrow = i % n_rows; return get_value(lrow, lcol); } template inline arma_hot arma_warn_unused eT SpMat::get_value(const uword i) const { // First convert to the actual location. uword lcol = i / n_rows; // Integer division. uword lrow = i % n_rows; return get_value(lrow, lcol); } template inline arma_hot arma_warn_unused SpValProxy > SpMat::get_value(const uword in_row, const uword in_col) { const uword colptr = col_ptrs[in_col]; const uword next_colptr = col_ptrs[in_col + 1]; // Step through the row indices to see if our element exists. for (uword i = colptr; i < next_colptr; ++i) { const uword row_index = row_indices[i]; // First check that we have not stepped past it. if (in_row < row_index) // If we have, then it doesn't exist: return 0. { return SpValProxy >(in_row, in_col, *this); // Proxy for a zero value. } // Now check if we are at the correct place. if (in_row == row_index) // If we are, return a reference to the value. { return SpValProxy >(in_row, in_col, *this, &access::rw(values[i])); } } // We did not find it, so it does not exist: return 0. return SpValProxy >(in_row, in_col, *this); } template inline arma_hot arma_warn_unused eT SpMat::get_value(const uword in_row, const uword in_col) const { const uword colptr = col_ptrs[in_col]; const uword next_colptr = col_ptrs[in_col + 1]; // Step through the row indices to see if our element exists. for (uword i = colptr; i < next_colptr; ++i) { const uword row_index = row_indices[i]; // First check that we have not stepped past it. if (in_row < row_index) // If we have, then it doesn't exist: return 0. { return eT(0); } // Now check if we are at the correct place. if (in_row == row_index) // If we are, return the value. { return values[i]; } } // We did not find it, so it does not exist: return 0. return eT(0); } /** * Given the index representing which of the nonzero values this is, return its * actual location, either in row/col or just the index. */ template arma_hot arma_inline arma_warn_unused uword SpMat::get_position(const uword i) const { uword lrow, lcol; get_position(i, lrow, lcol); // Assemble the row/col into the element's location in the matrix. return (lrow + n_rows * lcol); } template arma_hot arma_inline void SpMat::get_position(const uword i, uword& row_of_i, uword& col_of_i) const { arma_debug_check((i >= n_nonzero), "SpMat::get_position(): index out of bounds"); col_of_i = 0; while (col_ptrs[col_of_i + 1] <= i) { col_of_i++; } row_of_i = row_indices[i]; return; } /** * Add an element at the given position, and return a reference to it. The * element will be set to 0 (unless otherwise specified). If the element * already exists, its value will be overwritten. * * @param in_row Row of new element. * @param in_col Column of new element. * @param in_val Value to set new element to (default 0.0). */ template inline arma_hot arma_warn_unused eT& SpMat::add_element(const uword in_row, const uword in_col, const eT val) { arma_extra_debug_sigprint(); // We will assume the new element does not exist and begin the search for // where to insert it. If we find that it already exists, we will then // overwrite it. uword colptr = col_ptrs[in_col ]; uword next_colptr = col_ptrs[in_col + 1]; uword pos = colptr; // The position in the matrix of this value. if (colptr != next_colptr) { // There are other elements in this column, so we must find where this // element will fit as compared to those. while (pos < next_colptr && in_row > row_indices[pos]) { pos++; } // We aren't inserting into the last position, so it is still possible // that the element may exist. if (pos != next_colptr && row_indices[pos] == in_row) { // It already exists. Then, just overwrite it. access::rw(values[pos]) = val; return access::rw(values[pos]); } } // // Element doesn't exist, so we have to insert it // // We have to update the rest of the column pointers. for (uword i = in_col + 1; i < n_cols + 1; i++) { access::rw(col_ptrs[i])++; // We are only inserting one new element. } // Figure out the actual amount of memory currently allocated // NOTE: this relies on memory::acquire_chunked() being used for the 'values' and 'row_indices' arrays const uword n_alloc = memory::enlarge_to_mult_of_chunksize(n_nonzero + 1); // If possible, avoid time-consuming memory allocation if(n_alloc > (n_nonzero + 1)) { arrayops::copy_backwards(access::rwp(values) + pos + 1, values + pos, (n_nonzero - pos) + 1); arrayops::copy_backwards(access::rwp(row_indices) + pos + 1, row_indices + pos, (n_nonzero - pos) + 1); // Insert the new element. access::rw(values[pos]) = val; access::rw(row_indices[pos]) = in_row; access::rw(n_nonzero)++; } else { const uword old_n_nonzero = n_nonzero; access::rw(n_nonzero)++; // Add to count of nonzero elements. // Allocate larger memory. eT* new_values = memory::acquire_chunked (n_nonzero + 1); uword* new_row_indices = memory::acquire_chunked(n_nonzero + 1); // Copy things over, before the new element. if (pos > 0) { arrayops::copy(new_values, values, pos); arrayops::copy(new_row_indices, row_indices, pos); } // Insert the new element. new_values[pos] = val; new_row_indices[pos] = in_row; // Copy the rest of things over (including the extra element at the end). arrayops::copy(new_values + pos + 1, values + pos, (old_n_nonzero - pos) + 1); arrayops::copy(new_row_indices + pos + 1, row_indices + pos, (old_n_nonzero - pos) + 1); // Assign new pointers. memory::release(values); memory::release(row_indices); access::rw(values) = new_values; access::rw(row_indices) = new_row_indices; } return access::rw(values[pos]); } /** * Delete an element at the given position. * * @param in_row Row of element to be deleted. * @param in_col Column of element to be deleted. */ template inline arma_hot void SpMat::delete_element(const uword in_row, const uword in_col) { arma_extra_debug_sigprint(); // We assume the element exists (although... it may not) and look for its // exact position. If it doesn't exist... well, we don't need to do anything. uword colptr = col_ptrs[in_col]; uword next_colptr = col_ptrs[in_col + 1]; if (colptr != next_colptr) { // There's at least one element in this column. // Let's see if we are one of them. for (uword pos = colptr; pos < next_colptr; pos++) { if (in_row == row_indices[pos]) { const uword old_n_nonzero = n_nonzero; --access::rw(n_nonzero); // Remove one from the count of nonzero elements. // Found it. Now remove it. // Figure out the actual amount of memory currently allocated and the actual amount that will be required // NOTE: this relies on memory::acquire_chunked() being used for the 'values' and 'row_indices' arrays const uword n_alloc = memory::enlarge_to_mult_of_chunksize(old_n_nonzero + 1); const uword n_alloc_mod = memory::enlarge_to_mult_of_chunksize(n_nonzero + 1); // If possible, avoid time-consuming memory allocation if(n_alloc_mod == n_alloc) { if (pos < n_nonzero) // remember, we decremented n_nonzero { arrayops::copy_forwards(access::rwp(values) + pos, values + pos + 1, (n_nonzero - pos) + 1); arrayops::copy_forwards(access::rwp(row_indices) + pos, row_indices + pos + 1, (n_nonzero - pos) + 1); } } else { // Make new arrays. eT* new_values = memory::acquire_chunked (n_nonzero + 1); uword* new_row_indices = memory::acquire_chunked(n_nonzero + 1); if (pos > 0) { arrayops::copy(new_values, values, pos); arrayops::copy(new_row_indices, row_indices, pos); } arrayops::copy(new_values + pos, values + pos + 1, (n_nonzero - pos) + 1); arrayops::copy(new_row_indices + pos, row_indices + pos + 1, (n_nonzero - pos) + 1); memory::release(values); memory::release(row_indices); access::rw(values) = new_values; access::rw(row_indices) = new_row_indices; } // And lastly, update all the column pointers (decrement by one). for (uword i = in_col + 1; i < n_cols + 1; i++) { --access::rw(col_ptrs[i]); // We only removed one element. } return; // There is nothing left to do. } } } return; // The element does not exist, so there's nothing for us to do. } template inline void SpMat_aux::set_real(SpMat& out, const SpBase& X) { arma_extra_debug_sigprint(); const unwrap_spmat tmp(X.get_ref()); const SpMat& A = tmp.M; arma_debug_assert_same_size( out, A, "SpMat::set_real()" ); out = A; } template inline void SpMat_aux::set_imag(SpMat&, const SpBase&) { arma_extra_debug_sigprint(); } template inline void SpMat_aux::set_real(SpMat< std::complex >& out, const SpBase& X) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const unwrap_spmat U(X.get_ref()); const SpMat& Y = U.M; arma_debug_assert_same_size(out, Y, "SpMat::set_real()"); SpMat tmp(Y,arma::imag(out)); // arma:: prefix required due to bugs in GCC 4.4 - 4.6 out.steal_mem(tmp); } template inline void SpMat_aux::set_imag(SpMat< std::complex >& out, const SpBase& X) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const unwrap_spmat U(X.get_ref()); const SpMat& Y = U.M; arma_debug_assert_same_size(out, Y, "SpMat::set_imag()"); SpMat tmp(arma::real(out),Y); // arma:: prefix required due to bugs in GCC 4.4 - 4.6 out.steal_mem(tmp); } #ifdef ARMA_EXTRA_SPMAT_MEAT #include ARMA_INCFILE_WRAP(ARMA_EXTRA_SPMAT_MEAT) #endif //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpOp_bones.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpOp //! @{ template class SpOp : public SpBase > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = (T1::is_row && is_spop_elem::value) || ( T1::is_col && (is_same_type::value || is_same_type::value) ); static const bool is_col = (T1::is_col && is_spop_elem::value) || ( T1::is_row && (is_same_type::value || is_same_type::value) ); inline explicit SpOp(const T1& in_m); inline SpOp(const T1& in_m, const elem_type in_aux); inline SpOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b); inline ~SpOp(); arma_aligned const T1& m; //!< storage of reference to the operand (eg. a matrix) arma_aligned elem_type aux; //!< storage of auxiliary data, user defined format arma_aligned uword aux_uword_a; //!< storage of auxiliary data, uword format arma_aligned uword aux_uword_b; //!< storage of auxiliary data, uword format }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpOp_meat.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpOp //! @{ template inline SpOp::SpOp(const T1& in_m) : m(in_m) { arma_extra_debug_sigprint(); } template inline SpOp::SpOp(const T1& in_m, const typename T1::elem_type in_aux) : m(in_m) , aux(in_aux) { arma_extra_debug_sigprint(); } template inline SpOp::SpOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b) : m(in_m) , aux_uword_a(in_aux_uword_a) , aux_uword_b(in_aux_uword_b) { arma_extra_debug_sigprint(); } template inline SpOp::~SpOp() { arma_extra_debug_sigprint(); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpProxy.hpp ================================================ // Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpProxy //! @{ template class SpProxy< SpMat > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef SpMat stored_type; typedef typename SpMat::const_iterator const_iterator_type; typedef typename SpMat::const_row_iterator const_row_iterator_type; static const bool must_use_iterator = false; static const bool Q_created_by_proxy = false; static const bool is_row = false; static const bool is_col = false; arma_aligned const SpMat& Q; inline explicit SpProxy(const SpMat& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_nonzero() const { return Q.n_nonzero; } arma_inline elem_type operator[](const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline const eT* get_values() const { return Q.values; } arma_inline const uword* get_row_indices() const { return Q.row_indices; } arma_inline const uword* get_col_ptrs() const { return Q.col_ptrs; } arma_inline const_iterator_type begin() const { return Q.begin(); } arma_inline const_iterator_type begin_col(const uword col_num) const { return Q.begin_col(col_num); } arma_inline const_row_iterator_type begin_row(const uword row_num = 0) const { return Q.begin_row(row_num); } arma_inline const_iterator_type end() const { return Q.end(); } arma_inline const_row_iterator_type end_row() const { return Q.end_row(); } arma_inline const_row_iterator_type end_row(const uword row_num) const { return Q.end_row(row_num); } template arma_inline bool is_alias(const SpMat& X) const { return (void_ptr(&Q) == void_ptr(&X)); } }; template class SpProxy< SpCol > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef SpCol stored_type; typedef typename SpCol::const_iterator const_iterator_type; typedef typename SpCol::const_row_iterator const_row_iterator_type; static const bool must_use_iterator = false; static const bool Q_created_by_proxy = false; static const bool is_row = false; static const bool is_col = true; arma_aligned const SpCol& Q; inline explicit SpProxy(const SpCol& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return 1; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_nonzero() const { return Q.n_nonzero; } arma_inline elem_type operator[](const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline const eT* get_values() const { return Q.values; } arma_inline const uword* get_row_indices() const { return Q.row_indices; } arma_inline const uword* get_col_ptrs() const { return Q.col_ptrs; } arma_inline const_iterator_type begin() const { return Q.begin(); } arma_inline const_iterator_type begin_col(const uword) const { return Q.begin(); } arma_inline const_row_iterator_type begin_row(const uword row_num = 0) const { return Q.begin_row(row_num); } arma_inline const_iterator_type end() const { return Q.end(); } arma_inline const_row_iterator_type end_row() const { return Q.end_row(); } arma_inline const_row_iterator_type end_row(const uword row_num) const { return Q.end_row(row_num); } template arma_inline bool is_alias(const SpMat& X) const { return (void_ptr(&Q) == void_ptr(&X)); } }; template class SpProxy< SpRow > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef SpRow stored_type; typedef typename SpRow::const_iterator const_iterator_type; typedef typename SpRow::const_row_iterator const_row_iterator_type; static const bool must_use_iterator = false; static const bool Q_created_by_proxy = false; static const bool is_row = true; static const bool is_col = false; arma_aligned const SpRow& Q; inline explicit SpProxy(const SpRow& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return 1; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_nonzero() const { return Q.n_nonzero; } arma_inline elem_type operator[](const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline const eT* get_values() const { return Q.values; } arma_inline const uword* get_row_indices() const { return Q.row_indices; } arma_inline const uword* get_col_ptrs() const { return Q.col_ptrs; } arma_inline const_iterator_type begin() const { return Q.begin(); } arma_inline const_iterator_type begin_col(const uword col_num) const { return Q.begin_col(col_num); } arma_inline const_row_iterator_type begin_row(const uword row_num = 0) const { return Q.begin_row(row_num); } arma_inline const_iterator_type end() const { return Q.end(); } arma_inline const_row_iterator_type end_row() const { return Q.end_row(); } arma_inline const_row_iterator_type end_row(const uword row_num) const { return Q.end_row(row_num); } template arma_inline bool is_alias(const SpMat& X) const { return (void_ptr(&Q) == void_ptr(&X)); } }; template class SpProxy< SpSubview > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; typedef SpSubview stored_type; typedef typename SpSubview::const_iterator const_iterator_type; typedef typename SpSubview::const_row_iterator const_row_iterator_type; static const bool must_use_iterator = true; static const bool Q_created_by_proxy = false; static const bool is_row = false; static const bool is_col = false; arma_aligned const SpSubview& Q; inline explicit SpProxy(const SpSubview& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return Q.n_rows; } arma_inline uword get_n_cols() const { return Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_nonzero() const { return Q.n_nonzero; } arma_inline elem_type operator[](const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline const eT* get_values() const { return Q.m.values; } arma_inline const uword* get_row_indices() const { return Q.m.row_indices; } arma_inline const uword* get_col_ptrs() const { return Q.m.col_ptrs; } arma_inline const_iterator_type begin() const { return Q.begin(); } arma_inline const_iterator_type begin_col(const uword col_num) const { return Q.begin_col(col_num); } arma_inline const_row_iterator_type begin_row(const uword row_num = 0) const { return Q.begin_row(row_num); } arma_inline const_iterator_type end() const { return Q.end(); } arma_inline const_row_iterator_type end_row() const { return Q.end_row(); } arma_inline const_row_iterator_type end_row(const uword row_num) const { return Q.end_row(row_num); } template arma_inline bool is_alias(const SpMat& X) const { return (void_ptr(&Q.m) == void_ptr(&X)); } }; template class SpProxy< SpOp > { public: typedef typename T1::elem_type elem_type; typedef typename T1::elem_type eT; typedef typename get_pod_type::result pod_type; typedef SpMat stored_type; typedef typename SpMat::const_iterator const_iterator_type; typedef typename SpMat::const_row_iterator const_row_iterator_type; static const bool must_use_iterator = false; static const bool Q_created_by_proxy = true; static const bool is_row = SpOp::is_row; static const bool is_col = SpOp::is_col; arma_aligned const SpMat Q; inline explicit SpProxy(const SpOp& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return is_row ? 1 : Q.n_rows; } arma_inline uword get_n_cols() const { return is_col ? 1 : Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_nonzero() const { return Q.n_nonzero; } arma_inline elem_type operator[](const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline const eT* get_values() const { return Q.values; } arma_inline const uword* get_row_indices() const { return Q.row_indices; } arma_inline const uword* get_col_ptrs() const { return Q.col_ptrs; } arma_inline const_iterator_type begin() const { return Q.begin(); } arma_inline const_iterator_type begin_col(const uword col_num) const { return Q.begin_col(col_num); } arma_inline const_row_iterator_type begin_row(const uword row_num = 0) const { return Q.begin_row(row_num); } arma_inline const_iterator_type end() const { return Q.end(); } arma_inline const_row_iterator_type end_row() const { return Q.end_row(); } arma_inline const_row_iterator_type end_row(const uword row_num) const { return Q.end_row(row_num); } template arma_inline bool is_alias(const SpMat&) const { return false; } }; template class SpProxy< SpGlue > { public: typedef typename T1::elem_type elem_type; typedef typename T1::elem_type eT; typedef typename get_pod_type::result pod_type; typedef SpMat stored_type; typedef typename SpMat::const_iterator const_iterator_type; typedef typename SpMat::const_row_iterator const_row_iterator_type; static const bool must_use_iterator = false; static const bool Q_created_by_proxy = true; static const bool is_row = SpGlue::is_row; static const bool is_col = SpGlue::is_col; arma_aligned const SpMat Q; inline explicit SpProxy(const SpGlue& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return is_row ? 1 : Q.n_rows; } arma_inline uword get_n_cols() const { return is_col ? 1 : Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_nonzero() const { return Q.n_nonzero; } arma_inline elem_type operator[](const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline const eT* get_values() const { return Q.values; } arma_inline const uword* get_row_indices() const { return Q.row_indices; } arma_inline const uword* get_col_ptrs() const { return Q.col_ptrs; } arma_inline const_iterator_type begin() const { return Q.begin(); } arma_inline const_iterator_type begin_col(const uword col_num) const { return Q.begin_col(col_num); } arma_inline const_row_iterator_type begin_row(const uword row_num = 0) const { return Q.begin_row(row_num); } arma_inline const_iterator_type end() const { return Q.end(); } arma_inline const_row_iterator_type end_row() const { return Q.end_row(); } arma_inline const_row_iterator_type end_row(const uword row_num) const { return Q.end_row(row_num); } template arma_inline bool is_alias(const SpMat&) const { return false; } }; template class SpProxy< mtSpOp > { public: typedef out_eT elem_type; typedef typename T1::elem_type eT; typedef typename get_pod_type::result pod_type; typedef SpMat stored_type; typedef typename SpMat::const_iterator const_iterator_type; typedef typename SpMat::const_row_iterator const_row_iterator_type; static const bool must_use_iterator = false; static const bool Q_created_by_proxy = true; static const bool is_row = mtSpOp::is_row; static const bool is_col = mtSpOp::is_col; arma_aligned const SpMat Q; inline explicit SpProxy(const mtSpOp& A) : Q(A) { arma_extra_debug_sigprint(); } arma_inline uword get_n_rows() const { return is_row ? 1 : Q.n_rows; } arma_inline uword get_n_cols() const { return is_col ? 1 : Q.n_cols; } arma_inline uword get_n_elem() const { return Q.n_elem; } arma_inline uword get_n_nonzero() const { return Q.n_nonzero; } arma_inline elem_type operator[](const uword i) const { return Q[i]; } arma_inline elem_type at (const uword row, const uword col) const { return Q.at(row, col); } arma_inline const eT* get_values() const { return Q.values; } arma_inline const uword* get_row_indices() const { return Q.row_indices; } arma_inline const uword* get_col_ptrs() const { return Q.col_ptrs; } arma_inline const_iterator_type begin() const { return Q.begin(); } arma_inline const_iterator_type begin_col(const uword col_num) const { return Q.begin_col(col_num); } arma_inline const_row_iterator_type begin_row(const uword row_num = 0) const { return Q.begin_row(row_num); } arma_inline const_iterator_type end() const { return Q.end(); } arma_inline const_row_iterator_type end_row() const { return Q.end_row(); } arma_inline const_row_iterator_type end_row(const uword row_num) const { return Q.end_row(row_num); } template arma_inline bool is_alias(const SpMat&) const { return false; } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpRow_bones.hpp ================================================ // Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2011 Matthew Amidon // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpRow //! @{ //! Class for sparse row vectors (sparse matrices with only one row) template class SpRow : public SpMat { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = true; static const bool is_col = false; inline SpRow(); inline explicit SpRow(const uword N); inline SpRow(const uword in_rows, const uword in_cols); inline SpRow(const char* text); inline const SpRow& operator=(const char* text); inline SpRow(const std::string& text); inline const SpRow& operator=(const std::string& text); inline const SpRow& operator=(const eT val); template inline SpRow(const Base& X); template inline const SpRow& operator=(const Base& X); template inline SpRow(const SpBase& X); template inline const SpRow& operator=(const SpBase& X); template inline explicit SpRow(const SpBase& A, const SpBase& B); inline void shed_col (const uword col_num); inline void shed_cols(const uword in_col1, const uword in_col2); // inline void insert_cols(const uword col_num, const uword N, const bool set_to_zero = true); typedef typename SpMat::iterator row_iterator; typedef typename SpMat::const_iterator const_row_iterator; inline row_iterator begin_row(const uword row_num = 0); inline const_row_iterator begin_row(const uword row_num = 0) const; inline row_iterator end_row(const uword row_num = 0); inline const_row_iterator end_row(const uword row_num = 0) const; #ifdef ARMA_EXTRA_SPROW_PROTO #include ARMA_INCFILE_WRAP(ARMA_EXTRA_SPROW_PROTO) #endif }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpRow_meat.hpp ================================================ // Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2015 Conrad Sanderson // Copyright (C) 2011 Matthew Amidon // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpRow //! @{ template inline SpRow::SpRow() : SpMat(1, 0) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 2; } template inline SpRow::SpRow(const uword in_n_elem) : SpMat(1, in_n_elem) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 2; } template inline SpRow::SpRow(const uword in_n_rows, const uword in_n_cols) : SpMat(in_n_rows, in_n_cols) { arma_extra_debug_sigprint(); arma_debug_check((in_n_rows != 1), "SpRow::SpRow(): must have only one row"); access::rw(SpMat::vec_state) = 2; } template inline SpRow::SpRow(const char* text) : SpMat(text) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 2; arma_debug_check((SpMat::n_rows != 1), "SpRow::SpRow(): must have only one row"); } template inline const SpRow& SpRow::operator=(const char* text) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 2; SpMat::operator=(text); return *this; } template inline SpRow::SpRow(const std::string& text) : SpMat(text) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 2; arma_debug_check((SpMat::n_rows != 1), "SpRow::SpRow(): must have only one row"); } template inline const SpRow& SpRow::operator=(const std::string& text) { arma_extra_debug_sigprint(); SpMat::operator=(text); return *this; } template inline const SpRow& SpRow::operator=(const eT val) { arma_extra_debug_sigprint(); SpMat::operator=(val); return *this; } template template inline SpRow::SpRow(const Base& X) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 2; SpMat::operator=(X.get_ref()); } template template inline const SpRow& SpRow::operator=(const Base& X) { arma_extra_debug_sigprint(); SpMat::operator=(X.get_ref()); return *this; } template template inline SpRow::SpRow(const SpBase& X) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 2; SpMat::operator=(X.get_ref()); } template template inline const SpRow& SpRow::operator=(const SpBase& X) { arma_extra_debug_sigprint(); SpMat::operator=(X.get_ref()); return *this; } template template inline SpRow::SpRow ( const SpBase::pod_type, T1>& A, const SpBase::pod_type, T2>& B ) { arma_extra_debug_sigprint(); access::rw(SpMat::vec_state) = 2; SpMat::init(A,B); } //! remove specified columns template inline void SpRow::shed_col(const uword col_num) { arma_extra_debug_sigprint(); arma_debug_check( col_num >= SpMat::n_cols, "SpRow::shed_col(): out of bounds"); shed_cols(col_num, col_num); } //! remove specified columns template inline void SpRow::shed_cols(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_col1 > in_col2) || (in_col2 >= SpMat::n_cols), "SpRow::shed_cols(): indices out of bounds or incorrectly used" ); const uword diff = (in_col2 - in_col1 + 1); // This is doubleplus easy because we have all the column pointers stored. const uword start = SpMat::col_ptrs[in_col1]; const uword end = SpMat::col_ptrs[in_col2 + 1]; if (start != end) { const uword elem_diff = end - start; eT* new_values = memory::acquire_chunked (SpMat::n_nonzero - elem_diff); uword* new_row_indices = memory::acquire_chunked(SpMat::n_nonzero - elem_diff); // Copy first set of elements, if necessary. if (start > 0) { arrayops::copy(new_values, SpMat::values, start); arrayops::copy(new_row_indices, SpMat::row_indices, start); } // Copy last set of elements, if necessary. if (end != SpMat::n_nonzero) { arrayops::copy(new_values + start, SpMat::values + end, (SpMat::n_nonzero - end)); arrayops::copy(new_row_indices + start, SpMat::row_indices + end, (SpMat::n_nonzero - end)); } memory::release(SpMat::values); memory::release(SpMat::row_indices); access::rw(SpMat::values) = new_values; access::rw(SpMat::row_indices) = new_row_indices; access::rw(SpMat::n_nonzero) -= elem_diff; } // Update column pointers. uword* new_col_ptrs = memory::acquire(SpMat::n_cols - diff + 1); // Copy first part of column pointers. if (in_col1 > 0) { arrayops::copy(new_col_ptrs, SpMat::col_ptrs, in_col1); } // Copy last part of column pointers (and adjust their values as necessary). if (in_col2 < SpMat::n_cols - 1) { arrayops::copy(new_col_ptrs + in_col1, SpMat::col_ptrs + in_col2 + 1, SpMat::n_cols - in_col2); // Modify their values. arrayops::inplace_minus(new_col_ptrs + in_col1, (end - start), SpMat::n_cols - in_col2); } memory::release(SpMat::col_ptrs); access::rw(SpMat::col_ptrs) = new_col_ptrs; access::rw(SpMat::n_cols) -= diff; access::rw(SpMat::n_elem) -= diff; } // //! insert N cols at the specified col position, // //! optionally setting the elements of the inserted cols to zero // template // inline // void // SpRow::insert_cols(const uword col_num, const uword N, const bool set_to_zero) // { // arma_extra_debug_sigprint(); // // // insertion at col_num == n_cols is in effect an append operation // arma_debug_check( (col_num > SpMat::n_cols), "SpRow::insert_cols(): out of bounds"); // // arma_debug_check( (set_to_zero == false), "SpRow::insert_cols(): cannot set elements to nonzero values"); // // uword newVal = (col_num == 0) ? 0 : SpMat::col_ptrs[col_num]; // SpMat::col_ptrs.insert(col_num, N, newVal); // uword* new_col_ptrs = memory::acquire(SpMat::n_cols + N); // // arrayops::copy(new_col_ptrs, SpMat::col_ptrs, col_num); // // uword fill_value = (col_num == 0) ? 0 : SpMat::col_ptrs[col_num - 1]; // arrayops::inplace_set(new_col_ptrs + col_num, fill_value, N); // // arrayops::copy(new_col_ptrs + col_num + N, SpMat::col_ptrs + col_num, SpMat::n_cols - col_num); // // access::rw(SpMat::n_cols) += N; // access::rw(SpMat::n_elem) += N; // } template inline typename SpRow::row_iterator SpRow::begin_row(const uword row_num) { arma_extra_debug_sigprint(); // Since this is a row, row_num can only be 0. But the option is provided for // compatibility. arma_debug_check((row_num >= 1), "SpRow::begin_row(): index out of bounds"); return SpMat::begin(); } template inline typename SpRow::const_row_iterator SpRow::begin_row(const uword row_num) const { arma_extra_debug_sigprint(); // Since this is a row, row_num can only be 0. But the option is provided for // compatibility. arma_debug_check((row_num >= 1), "SpRow::begin_row(): index out of bounds"); return SpMat::begin(); } template inline typename SpRow::row_iterator SpRow::end_row(const uword row_num) { arma_extra_debug_sigprint(); // Since this is a row, row_num can only be 0. But the option is provided for // compatibility. arma_debug_check((row_num >= 1), "SpRow::end_row(): index out of bounds"); return SpMat::end(); } template inline typename SpRow::const_row_iterator SpRow::end_row(const uword row_num) const { arma_extra_debug_sigprint(); // Since this is a row, row_num can only be 0. But the option is provided for // compatibility. arma_debug_check((row_num >= 1), "SpRow::end_row(): index out of bounds"); return SpMat::end(); } #ifdef ARMA_EXTRA_SPROW_MEAT #include ARMA_INCFILE_WRAP(ARMA_EXTRA_SPROW_MEAT) #endif //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpSubview_bones.hpp ================================================ // Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2011 Matthew Amidon // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpSubview //! @{ template class SpSubview : public SpBase > { public: const SpMat& m; typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = false; static const bool is_col = false; const uword aux_row1; const uword aux_col1; const uword n_rows; const uword n_cols; const uword n_elem; const uword n_nonzero; // So that SpValProxy can call add_element() and delete_element(). friend class SpValProxy >; protected: arma_inline SpSubview(const SpMat& in_m, const uword in_row1, const uword in_col1, const uword in_n_rows, const uword in_n_cols); arma_inline SpSubview( SpMat& in_m, const uword in_row1, const uword in_col1, const uword in_n_rows, const uword in_n_cols); public: inline ~SpSubview(); inline const SpSubview& operator+= (const eT val); inline const SpSubview& operator-= (const eT val); inline const SpSubview& operator*= (const eT val); inline const SpSubview& operator/= (const eT val); inline const SpSubview& operator=(const SpSubview& x); template inline const SpSubview& operator= (const Base& x); template inline const SpSubview& operator+=(const Base& x); template inline const SpSubview& operator-=(const Base& x); template inline const SpSubview& operator*=(const Base& x); template inline const SpSubview& operator%=(const Base& x); template inline const SpSubview& operator/=(const Base& x); template inline const SpSubview& operator_equ_common(const SpBase& x); template inline const SpSubview& operator= (const SpBase& x); template inline const SpSubview& operator+=(const SpBase& x); template inline const SpSubview& operator-=(const SpBase& x); template inline const SpSubview& operator*=(const SpBase& x); template inline const SpSubview& operator%=(const SpBase& x); template inline const SpSubview& operator/=(const SpBase& x); /* inline static void extract(SpMat& out, const SpSubview& in); inline static void plus_inplace(Mat& out, const subview& in); inline static void minus_inplace(Mat& out, const subview& in); inline static void schur_inplace(Mat& out, const subview& in); inline static void div_inplace(Mat& out, const subview& in); */ inline void fill(const eT val); inline void zeros(); inline void ones(); inline void eye(); arma_hot inline SpValProxy > operator[](const uword i); arma_hot inline eT operator[](const uword i) const; arma_hot inline SpValProxy > operator()(const uword i); arma_hot inline eT operator()(const uword i) const; arma_hot inline SpValProxy > operator()(const uword in_row, const uword in_col); arma_hot inline eT operator()(const uword in_row, const uword in_col) const; arma_hot inline SpValProxy > at(const uword i); arma_hot inline eT at(const uword i) const; arma_hot inline SpValProxy > at(const uword in_row, const uword in_col); arma_hot inline eT at(const uword in_row, const uword in_col) const; inline bool check_overlap(const SpSubview& x) const; inline bool is_vec() const; inline SpSubview row(const uword row_num); inline const SpSubview row(const uword row_num) const; inline SpSubview col(const uword col_num); inline const SpSubview col(const uword col_num) const; inline SpSubview rows(const uword in_row1, const uword in_row2); inline const SpSubview rows(const uword in_row1, const uword in_row2) const; inline SpSubview cols(const uword in_col1, const uword in_col2); inline const SpSubview cols(const uword in_col1, const uword in_col2) const; inline SpSubview submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2); inline const SpSubview submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) const; inline SpSubview submat(const span& row_span, const span& col_span); inline const SpSubview submat(const span& row_span, const span& col_span) const; inline SpSubview operator()(const uword row_num, const span& col_span); inline const SpSubview operator()(const uword row_num, const span& col_span) const; inline SpSubview operator()(const span& row_span, const uword col_num); inline const SpSubview operator()(const span& row_span, const uword col_num) const; inline SpSubview operator()(const span& row_span, const span& col_span); inline const SpSubview operator()(const span& row_span, const span& col_span) const; inline void swap_rows(const uword in_row1, const uword in_row2); inline void swap_cols(const uword in_col1, const uword in_col2); // Forward declarations. class iterator_base; class const_iterator; class iterator; class const_row_iterator; class row_iterator; // Similar to SpMat iterators but automatically iterates past and ignores values not in the subview. class iterator_base { public: inline iterator_base(const SpSubview& in_M); inline iterator_base(const SpSubview& in_M, const uword col, const uword pos, const uword skip_pos); inline eT operator*() const; // Don't hold location internally; call "dummy" methods to get that information. arma_inline uword row() const { return M.m.row_indices[internal_pos + skip_pos] - M.aux_row1; } arma_inline uword col() const { return internal_col; } arma_inline uword pos() const { return internal_pos; } arma_aligned const SpSubview& M; arma_aligned uword internal_col; arma_aligned uword internal_pos; arma_aligned uword skip_pos; // not used in row_iterator or const_row_iterator // So that we satisfy the STL iterator types. typedef std::bidirectional_iterator_tag iterator_category; typedef eT value_type; typedef uword difference_type; // not certain on this one typedef const eT* pointer; typedef const eT& reference; }; class const_iterator : public iterator_base { public: inline const_iterator(const SpSubview& in_M, uword initial_pos = 0); inline const_iterator(const SpSubview& in_M, uword in_row, uword in_col); inline const_iterator(const SpSubview& in_M, uword in_row, uword in_col, uword in_pos, uword skip_pos); inline const_iterator(const const_iterator& other); inline const_iterator& operator++(); inline const_iterator operator++(int); inline const_iterator& operator--(); inline const_iterator operator--(int); inline bool operator!=(const const_iterator& rhs) const; inline bool operator==(const const_iterator& rhs) const; inline bool operator!=(const typename SpMat::const_iterator& rhs) const; inline bool operator==(const typename SpMat::const_iterator& rhs) const; inline bool operator!=(const const_row_iterator& rhs) const; inline bool operator==(const const_row_iterator& rhs) const; inline bool operator!=(const typename SpMat::const_row_iterator& rhs) const; inline bool operator==(const typename SpMat::const_row_iterator& rhs) const; }; class iterator : public const_iterator { public: inline iterator(SpSubview& in_M, const uword initial_pos = 0) : const_iterator(in_M, initial_pos) { } inline iterator(SpSubview& in_M, const uword in_row, const uword in_col) : const_iterator(in_M, in_row, in_col) { } inline iterator(SpSubview& in_M, const uword in_row, const uword in_col, const uword in_pos, const uword in_skip_pos) : const_iterator(in_M, in_row, in_col, in_pos, in_skip_pos) { } inline iterator(const iterator& other) : const_iterator(other) { } inline SpValProxy > operator*(); // overloads needed for return type correctness inline iterator& operator++(); inline iterator operator++(int); inline iterator& operator--(); inline iterator operator--(int); // This has a different value_type than iterator_base. typedef SpValProxy > value_type; typedef const SpValProxy >* pointer; typedef const SpValProxy >& reference; }; class const_row_iterator : public iterator_base { public: inline const_row_iterator(const SpSubview& in_M, uword initial_pos = 0); inline const_row_iterator(const SpSubview& in_M, uword in_row, uword in_col); inline const_row_iterator(const const_row_iterator& other); inline const_row_iterator& operator++(); inline const_row_iterator operator++(int); inline const_row_iterator& operator--(); inline const_row_iterator operator--(int); uword internal_row; // Hold row internally because we use internal_pos differently. uword actual_pos; // Actual position in subview's parent matrix. arma_inline eT operator*() const { return iterator_base::M.m.values[actual_pos]; } arma_inline uword row() const { return internal_row; } inline bool operator!=(const const_iterator& rhs) const; inline bool operator==(const const_iterator& rhs) const; inline bool operator!=(const typename SpMat::const_iterator& rhs) const; inline bool operator==(const typename SpMat::const_iterator& rhs) const; inline bool operator!=(const const_row_iterator& rhs) const; inline bool operator==(const const_row_iterator& rhs) const; inline bool operator!=(const typename SpMat::const_row_iterator& rhs) const; inline bool operator==(const typename SpMat::const_row_iterator& rhs) const; }; class row_iterator : public const_row_iterator { public: inline row_iterator(SpSubview& in_M, uword initial_pos = 0) : const_row_iterator(in_M, initial_pos) { } inline row_iterator(SpSubview& in_M, uword in_row, uword in_col) : const_row_iterator(in_M, in_row, in_col) { } inline row_iterator(const row_iterator& other) : const_row_iterator(other) { } inline SpValProxy > operator*(); // overloads needed for return type correctness inline row_iterator& operator++(); inline row_iterator operator++(int); inline row_iterator& operator--(); inline row_iterator operator--(int); // This has a different value_type than iterator_base. typedef SpValProxy > value_type; typedef const SpValProxy >* pointer; typedef const SpValProxy >& reference; }; inline iterator begin(); inline const_iterator begin() const; inline iterator begin_col(const uword col_num); inline const_iterator begin_col(const uword col_num) const; inline row_iterator begin_row(const uword row_num = 0); inline const_row_iterator begin_row(const uword row_num = 0) const; inline iterator end(); inline const_iterator end() const; inline row_iterator end_row(); inline const_row_iterator end_row() const; inline row_iterator end_row(const uword row_num = 0); inline const_row_iterator end_row(const uword row_num = 0) const; private: friend class SpMat; SpSubview(); // For use by SpValProxy. We just update n_nonzero and pass the call on to the matrix. inline arma_hot arma_warn_unused eT& add_element(const uword in_row, const uword in_col, const eT in_val = 0.0); inline arma_hot void delete_element(const uword in_row, const uword in_col); }; /* template class SpSubview_col : public SpSubview { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; inline void operator= (const SpSubview& x); inline void operator= (const SpSubview_col& x); template inline void operator= (const Base& x); inline SpSubview_col rows(const uword in_row1, const uword in_row2); inline const SpSubview_col rows(const uword in_row1, const uword in_row2) const; inline SpSubview_col subvec(const uword in_row1, const uword in_row2); inline const SpSubview_col subvec(const uword in_row1, const uword in_row2) const; protected: inline SpSubview_col(const Mat& in_m, const uword in_col); inline SpSubview_col( Mat& in_m, const uword in_col); inline SpSubview_col(const Mat& in_m, const uword in_col, const uword in_row1, const uword in_n_rows); inline SpSubview_col( Mat& in_m, const uword in_col, const uword in_row1, const uword in_n_rows); private: friend class Mat; friend class Col; friend class SpSubview; SpSubview_col(); }; template class SpSubview_row : public SpSubview { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; inline void operator= (const SpSubview& x); inline void operator= (const SpSubview_row& x); template inline void operator= (const Base& x); inline SpSubview_row cols(const uword in_col1, const uword in_col2); inline const SpSubview_row cols(const uword in_col1, const uword in_col2) const; inline SpSubview_row subvec(const uword in_col1, const uword in_col2); inline const SpSubview_row subvec(const uword in_col1, const uword in_col2) const; protected: inline SpSubview_row(const Mat& in_m, const uword in_row); inline SpSubview_row( Mat& in_m, const uword in_row); inline SpSubview_row(const Mat& in_m, const uword in_row, const uword in_col1, const uword in_n_cols); inline SpSubview_row( Mat& in_m, const uword in_row, const uword in_col1, const uword in_n_cols); private: friend class Mat; friend class Row; friend class SpSubview; SpSubview_row(); }; */ //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpSubview_iterators_meat.hpp ================================================ // Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpSubview //! @{ /////////////////////////////////////////////////////////////////////////////// // SpSubview::iterator_base implementation // /////////////////////////////////////////////////////////////////////////////// template inline SpSubview::iterator_base::iterator_base(const SpSubview& in_M) : M(in_M) , internal_col(0) , internal_pos(0) , skip_pos(0) { // Technically this iterator is invalid (it may not point to a real element). } template inline SpSubview::iterator_base::iterator_base(const SpSubview& in_M, const uword in_col, const uword in_pos, const uword in_skip_pos) : M(in_M) , internal_col(in_col) , internal_pos(in_pos) , skip_pos (in_skip_pos) { // Nothing to do. } template inline eT SpSubview::iterator_base::operator*() const { return M.m.values[internal_pos + skip_pos]; } /////////////////////////////////////////////////////////////////////////////// // SpSubview::const_iterator implementation // /////////////////////////////////////////////////////////////////////////////// template inline SpSubview::const_iterator::const_iterator(const SpSubview& in_M, const uword initial_pos) : iterator_base(in_M, 0, initial_pos, 0) { // Corner case for empty subviews. if(in_M.n_nonzero == 0) { iterator_base::internal_col = in_M.n_cols; iterator_base::skip_pos = in_M.m.n_nonzero; return; } // Figure out the row and column of the position. // lskip_pos holds the number of values which aren't part of this subview. const uword aux_col = iterator_base::M.aux_col1; const uword aux_row = iterator_base::M.aux_row1; const uword ln_rows = iterator_base::M.n_rows; const uword ln_cols = iterator_base::M.n_cols; uword cur_pos = 0; // off by one because we might be searching for pos 0 uword lskip_pos = iterator_base::M.m.col_ptrs[aux_col]; uword cur_col = 0; while(cur_pos < (iterator_base::internal_pos + 1)) { // Have we stepped forward a column (or multiple columns)? while(((lskip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]) && (cur_col < ln_cols)) { ++cur_col; } // See if the current position is in the subview. const uword row_index = iterator_base::M.m.row_indices[cur_pos + lskip_pos]; if(row_index < aux_row) { ++lskip_pos; // not valid } else if(row_index < (aux_row + ln_rows)) { ++cur_pos; // valid, in the subview } else { // skip to end of column const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]; lskip_pos += (next_colptr - (cur_pos + lskip_pos)); } } iterator_base::internal_col = cur_col; iterator_base::skip_pos = lskip_pos; } template inline SpSubview::const_iterator::const_iterator(const SpSubview& in_M, const uword in_row, const uword in_col) : iterator_base(in_M, in_col, 0, 0) { // Corner case for empty subviews. if(in_M.n_nonzero == 0) { // We must be at the last position. iterator_base::internal_col = in_M.n_cols; iterator_base::skip_pos = in_M.m.n_nonzero; return; } // We have a destination we want to be just after, but don't know what position that is. // Because we have to count the points in this subview and not in this subview, this becomes a little difficult and slow. const uword aux_col = iterator_base::M.aux_col1; const uword aux_row = iterator_base::M.aux_row1; const uword ln_rows = iterator_base::M.n_rows; const uword ln_cols = iterator_base::M.n_cols; uword cur_pos = 0; uword skip_pos = iterator_base::M.m.col_ptrs[aux_col]; uword cur_col = 0; // Skip any empty columns. while(((skip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]) && (cur_col < ln_cols)) { ++cur_col; } while(cur_col < in_col) { // See if the current position is in the subview. const uword row_index = iterator_base::M.m.row_indices[cur_pos + skip_pos]; if(row_index < aux_row) { ++skip_pos; } else if(row_index < (aux_row + ln_rows)) { ++cur_pos; } else { // skip to end of column const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]; skip_pos += (next_colptr - (cur_pos + skip_pos)); } // Have we stepped forward a column (or multiple columns)? while(((skip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]) && (cur_col < ln_cols)) { ++cur_col; } } // Now we are either on the right column or ahead of it. if(cur_col == in_col) { // We have to find the right row index. uword row_index = iterator_base::M.m.row_indices[cur_pos + skip_pos]; while((row_index < (in_row + aux_row))) { if(row_index < aux_row) { ++skip_pos; } else { ++cur_pos; } // Ensure we didn't step forward a column; if we did, we need to stop. while(((skip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]) && (cur_col < ln_cols)) { ++cur_col; } if(cur_col != in_col) { break; } row_index = iterator_base::M.m.row_indices[cur_pos + skip_pos]; } } // Now we need to find the next valid position in the subview. uword row_index; while(true) { const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]; row_index = iterator_base::M.m.row_indices[cur_pos + skip_pos]; // Are we at the last position? if(cur_col >= ln_cols) { cur_col = ln_cols; // Make sure we will be pointing at the last element in the parent matrix. skip_pos = iterator_base::M.m.n_nonzero - iterator_base::M.n_nonzero; break; } if(row_index < aux_row) { ++skip_pos; } else if(row_index < (aux_row + ln_rows)) { break; // found } else { skip_pos += (next_colptr - (cur_pos + skip_pos)); } // Did we move any columns? while(((skip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]) && (cur_col < ln_cols)) { ++cur_col; } } // It is possible we have moved another column. while(((skip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]) && (cur_col < ln_cols)) { ++cur_col; } iterator_base::internal_pos = cur_pos; iterator_base::skip_pos = skip_pos; iterator_base::internal_col = cur_col; } template inline SpSubview::const_iterator::const_iterator(const SpSubview& in_M, uword in_row, uword in_col, uword in_pos, uword in_skip_pos) : iterator_base(in_M, in_col, in_pos, in_skip_pos) { arma_ignore(in_row); // Nothing to do. } template inline SpSubview::const_iterator::const_iterator(const const_iterator& other) : iterator_base(other.M, other.internal_col, other.internal_pos, other.skip_pos) { // Nothing to do. } template inline typename SpSubview::const_iterator& SpSubview::const_iterator::operator++() { const uword aux_col = iterator_base::M.aux_col1; const uword aux_row = iterator_base::M.aux_row1; const uword ln_rows = iterator_base::M.n_rows; const uword ln_cols = iterator_base::M.n_cols; uword cur_col = iterator_base::internal_col; uword cur_pos = iterator_base::internal_pos + 1; uword lskip_pos = iterator_base::skip_pos; uword row_index; while(true) { const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]; row_index = iterator_base::M.m.row_indices[cur_pos + lskip_pos]; // Did we move any columns? while((cur_col < ln_cols) && ((lskip_pos + cur_pos) >= iterator_base::M.m.col_ptrs[cur_col + aux_col + 1])) { ++cur_col; } // Are we at the last position? if(cur_col >= ln_cols) { cur_col = ln_cols; // Make sure we will be pointing at the last element in the parent matrix. lskip_pos = iterator_base::M.m.n_nonzero - iterator_base::M.n_nonzero; break; } if(row_index < aux_row) { ++lskip_pos; } else if(row_index < (aux_row + ln_rows)) { break; // found } else { lskip_pos += (next_colptr - (cur_pos + lskip_pos)); } } iterator_base::internal_pos = cur_pos; iterator_base::internal_col = cur_col; iterator_base::skip_pos = lskip_pos; return *this; } template inline typename SpSubview::const_iterator SpSubview::const_iterator::operator++(int) { typename SpSubview::const_iterator tmp(*this); ++(*this); return tmp; } template inline typename SpSubview::const_iterator& SpSubview::const_iterator::operator--() { const uword aux_col = iterator_base::M.aux_col1; const uword aux_row = iterator_base::M.aux_row1; const uword ln_rows = iterator_base::M.n_rows; uword cur_col = iterator_base::internal_col; uword cur_pos = iterator_base::internal_pos - 1; uword skip_pos = iterator_base::skip_pos; // Special condition for end of iterator. if((skip_pos + cur_pos + 1) == iterator_base::M.m.n_nonzero) { // We are at the last element. So we need to set skip_pos back to what it // would be if we didn't manually modify it back in operator++(). skip_pos = iterator_base::M.m.col_ptrs[cur_col + aux_col] - iterator_base::internal_pos; } uword row_index; while(true) { const uword colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col]; row_index = iterator_base::M.m.row_indices[cur_pos + skip_pos]; // Did we move back any columns? while((skip_pos + cur_pos) < iterator_base::M.m.col_ptrs[cur_col + aux_col]) { --cur_col; } if(row_index < aux_row) { skip_pos -= (colptr - (cur_pos + skip_pos) + 1); } else if(row_index < (aux_row + ln_rows)) { break; // found } else { --skip_pos; } } iterator_base::internal_pos = cur_pos; iterator_base::skip_pos = skip_pos; iterator_base::internal_col = cur_col; return *this; } template inline typename SpSubview::const_iterator SpSubview::const_iterator::operator--(int) { typename SpSubview::const_iterator tmp(*this); --(*this); return tmp; } template inline bool SpSubview::const_iterator::operator==(const const_iterator& rhs) const { return (rhs.row() == (*this).row()) && (rhs.col() == iterator_base::internal_col); } template inline bool SpSubview::const_iterator::operator!=(const const_iterator& rhs) const { return (rhs.row() != (*this).row()) || (rhs.col() != iterator_base::internal_col); } template inline bool SpSubview::const_iterator::operator==(const typename SpMat::const_iterator& rhs) const { return (rhs.row() == (*this).row()) && (rhs.col() == iterator_base::internal_col); } template inline bool SpSubview::const_iterator::operator!=(const typename SpMat::const_iterator& rhs) const { return (rhs.row() != (*this).row()) || (rhs.col() != iterator_base::internal_col); } template inline bool SpSubview::const_iterator::operator==(const const_row_iterator& rhs) const { return (rhs.row() == (*this).row()) && (rhs.col() == iterator_base::internal_col); } template inline bool SpSubview::const_iterator::operator!=(const const_row_iterator& rhs) const { return (rhs.row() != (*this).row()) || (rhs.col() != iterator_base::internal_col); } template inline bool SpSubview::const_iterator::operator==(const typename SpMat::const_row_iterator& rhs) const { return (rhs.row() == (*this).row()) && (rhs.col() == iterator_base::internal_col); } template inline bool SpSubview::const_iterator::operator!=(const typename SpMat::const_row_iterator& rhs) const { return (rhs.row() != (*this).row()) || (rhs.col() != iterator_base::internal_col); } /////////////////////////////////////////////////////////////////////////////// // SpSubview::iterator implementation // /////////////////////////////////////////////////////////////////////////////// template inline SpValProxy > SpSubview::iterator::operator*() { return SpValProxy >( iterator_base::row(), iterator_base::col(), access::rw(iterator_base::M), &(access::rw(iterator_base::M.m.values[iterator_base::internal_pos + iterator_base::skip_pos]))); } template inline typename SpSubview::iterator& SpSubview::iterator::operator++() { const_iterator::operator++(); return *this; } template inline typename SpSubview::iterator SpSubview::iterator::operator++(int) { typename SpSubview::iterator tmp(*this); const_iterator::operator++(); return tmp; } template inline typename SpSubview::iterator& SpSubview::iterator::operator--() { const_iterator::operator--(); return *this; } template inline typename SpSubview::iterator SpSubview::iterator::operator--(int) { typename SpSubview::iterator tmp(*this); const_iterator::operator--(); return tmp; } /////////////////////////////////////////////////////////////////////////////// // SpSubview::const_row_iterator implementation // /////////////////////////////////////////////////////////////////////////////// template inline SpSubview::const_row_iterator::const_row_iterator(const SpSubview& in_M, uword initial_pos) : iterator_base(in_M, 0, initial_pos, 0) , internal_row(0) , actual_pos(0) { // Corner case for empty subviews. if(in_M.n_nonzero == 0) { iterator_base::internal_col = 0; internal_row = in_M.n_rows; iterator_base::skip_pos = in_M.m.n_nonzero; return; } const uword aux_col = iterator_base::M.aux_col1; const uword aux_row = iterator_base::M.aux_row1; const uword ln_cols = iterator_base::M.n_cols; // We don't know where the elements are in each row. What we will do is // loop across all valid columns looking for elements in row 0 (and add to // our sum), then in row 1, and so forth, until we get to the desired // position. uword cur_pos = -1; // TODO: HACK: -1 is not a valid unsigned integer; using -1 is relying on wraparound/overflow, which is not portable uword cur_row = 0; uword cur_col = 0; while(true) { // Is there anything in the column we are looking at? const uword colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col]; const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]; for(uword ind = colptr; (ind < next_colptr) && (iterator_base::M.m.row_indices[ind] <= (cur_row + aux_row)); ++ind) { // There is something in this column. Is it in the row we are looking at? const uword row_index = iterator_base::M.m.row_indices[ind]; if(row_index == (cur_row + aux_row)) { // Yes, it is in the right row. if(++cur_pos == iterator_base::internal_pos) // TODO: HACK: if cur_pos is std::numeric_limits::max(), ++cur_pos relies on a wraparound/overflow, which is not portable { iterator_base::internal_col = cur_col; internal_row = cur_row; actual_pos = ind; return; } // We are done with this column. Break to the column incrementing code (directly below). break; } else if(row_index > (cur_row + aux_row)) { break; // Can't be in this column. } } cur_col++; // Done with the column. Move on. if(cur_col == ln_cols) { // Out of columns. Loop back to the beginning and look on the next row. cur_col = 0; cur_row++; } } } template inline SpSubview::const_row_iterator::const_row_iterator(const SpSubview& in_M, uword in_row, uword in_col) : iterator_base(in_M, in_col, 0, 0) , internal_row(0) , actual_pos(0) { // We have a destination we want to be just after, but don't know what that // position is. Because we will have to loop over everything anyway, create // another iterator and loop it until it is at the right place, then take its // information. const_row_iterator it(in_M, 0); while((it.row() < in_row) || ((it.row() == in_row) && (it.col() < in_col))) { ++it; } iterator_base::internal_col = it.col(); iterator_base::internal_pos = it.pos(); iterator_base::skip_pos = it.skip_pos; internal_row = it.internal_row; actual_pos = it.actual_pos; } template inline SpSubview::const_row_iterator::const_row_iterator(const const_row_iterator& other) : iterator_base(other.M, other.internal_col, other.internal_pos, other.skip_pos) , internal_row(other.internal_row) , actual_pos(other.actual_pos) { // Nothing to do. } template inline typename SpSubview::const_row_iterator& SpSubview::const_row_iterator::operator++() { // We just need to find the next nonzero element. ++iterator_base::internal_pos; // If we have exceeded the bounds, update accordingly. if(iterator_base::internal_pos >= iterator_base::M.n_nonzero) { internal_row = iterator_base::M.n_rows; iterator_base::internal_col = 0; actual_pos = iterator_base::M.m.n_nonzero; return *this; } // Otherwise, we need to search. uword cur_col = iterator_base::internal_col; uword cur_row = internal_row; const uword aux_col = iterator_base::M.aux_col1; const uword aux_row = iterator_base::M.aux_row1; const uword ln_cols = iterator_base::M.n_cols; while(true) { // Increment the current column and see if we are on a new row. if(++cur_col == ln_cols) { cur_col = 0; ++cur_row; } // Is there anything in this new column? const uword colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col]; const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]; for(uword ind = colptr; (ind < next_colptr) && (iterator_base::M.m.row_indices[ind] <= (cur_row + aux_row)); ++ind) { const uword row_index = iterator_base::M.m.row_indices[ind]; if((row_index - aux_row) == cur_row) { // We have successfully incremented. internal_row = cur_row; actual_pos = ind; iterator_base::internal_col = cur_col; return *this; } } } } template inline typename SpSubview::const_row_iterator SpSubview::const_row_iterator::operator++(int) { typename SpSubview::const_row_iterator tmp(*this); ++(*this); return tmp; } template inline typename SpSubview::const_row_iterator& SpSubview::const_row_iterator::operator--() { // We just need to find the previous element. // if(iterator_base::pos == 0) // { // // We cannot decrement. // return *this; // } // else if(iterator_base::pos == iterator_base::M.n_nonzero) // { // // We will be coming off the last element. We need to reset the row correctly, because we set row = 0 in the last matrix position. // iterator_base::row = iterator_base::M.n_rows - 1; // } // else if(iterator_base::pos > iterator_base::M.n_nonzero) // { // // This shouldn't happen... // iterator_base::pos--; // return *this; // } iterator_base::internal_pos--; // We have to search backwards. uword cur_col = iterator_base::internal_col; uword cur_row = internal_row; const uword aux_col = iterator_base::M.aux_col1; const uword aux_row = iterator_base::M.aux_row1; const uword ln_cols = iterator_base::M.n_cols; while(true) { // Decrement the current column and see if we are on a new row. if(--cur_col > ln_cols) { cur_col = ln_cols - 1; cur_row--; } // Is there anything in this new column? const uword colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col]; const uword next_colptr = iterator_base::M.m.col_ptrs[cur_col + aux_col + 1]; for(uword ind = colptr; (ind < next_colptr) && (iterator_base::M.m.row_indices[ind] <= (cur_row + aux_row)); ++ind) { const uword row_index = iterator_base::M.m.row_indices[ind]; if((row_index - aux_row) == cur_row) { iterator_base::internal_col = cur_col; internal_row = cur_row; actual_pos = ind; return *this; } } } } template inline typename SpSubview::const_row_iterator SpSubview::const_row_iterator::operator--(int) { typename SpSubview::const_row_iterator tmp(*this); --(*this); return tmp; } template inline bool SpSubview::const_row_iterator::operator==(const const_iterator& rhs) const { return (rhs.row() == row()) && (rhs.col() == iterator_base::internal_col); } template inline bool SpSubview::const_row_iterator::operator!=(const const_iterator& rhs) const { return (rhs.row() != row()) || (rhs.col() != iterator_base::internal_col); } template inline bool SpSubview::const_row_iterator::operator==(const typename SpMat::const_iterator& rhs) const { return (rhs.row() == row()) && (rhs.col() == iterator_base::internal_col); } template inline bool SpSubview::const_row_iterator::operator!=(const typename SpMat::const_iterator& rhs) const { return (rhs.row() != row()) || (rhs.col() != iterator_base::internal_col); } template inline bool SpSubview::const_row_iterator::operator==(const const_row_iterator& rhs) const { return (rhs.row() == row()) && (rhs.col() == iterator_base::internal_col); } template inline bool SpSubview::const_row_iterator::operator!=(const const_row_iterator& rhs) const { return (rhs.row() != row()) || (rhs.col() != iterator_base::internal_col); } template inline bool SpSubview::const_row_iterator::operator==(const typename SpMat::const_row_iterator& rhs) const { return (rhs.row() == row()) && (rhs.col() == iterator_base::internal_col); } template inline bool SpSubview::const_row_iterator::operator!=(const typename SpMat::const_row_iterator& rhs) const { return (rhs.row() != row()) || (rhs.col() != iterator_base::internal_col); } /////////////////////////////////////////////////////////////////////////////// // SpSubview::row_iterator implementation // /////////////////////////////////////////////////////////////////////////////// template inline SpValProxy > SpSubview::row_iterator::operator*() { return SpValProxy >( const_row_iterator::internal_row, iterator_base::internal_col, access::rw(iterator_base::M), &access::rw(iterator_base::M.m.values[const_row_iterator::actual_pos])); } template inline typename SpSubview::row_iterator& SpSubview::row_iterator::operator++() { const_row_iterator::operator++(); return *this; } template inline typename SpSubview::row_iterator SpSubview::row_iterator::operator++(int) { typename SpSubview::row_iterator tmp(*this); ++(*this); return tmp; } template inline typename SpSubview::row_iterator& SpSubview::row_iterator::operator--() { const_row_iterator::operator--(); return *this; } template inline typename SpSubview::row_iterator SpSubview::row_iterator::operator--(int) { typename SpSubview::row_iterator tmp(*this); --(*this); return tmp; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpSubview_meat.hpp ================================================ // Copyright (C) 2011-2015 Ryan Curtin // Copyright (C) 2012-2015 Conrad Sanderson // Copyright (C) 2011 Matthew Amidon // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpSubview //! @{ template arma_inline SpSubview::SpSubview(const SpMat& in_m, const uword in_row1, const uword in_col1, const uword in_n_rows, const uword in_n_cols) : m(in_m) , aux_row1(in_row1) , aux_col1(in_col1) , n_rows(in_n_rows) , n_cols(in_n_cols) , n_elem(in_n_rows * in_n_cols) , n_nonzero(0) { arma_extra_debug_sigprint(); // There must be a O(1) way to do this uword lend = m.col_ptrs[in_col1 + in_n_cols]; uword lend_row = in_row1 + in_n_rows; uword count = 0; for(uword i = m.col_ptrs[in_col1]; i < lend; ++i) { const uword m_row_indices_i = m.row_indices[i]; const bool condition = (m_row_indices_i >= in_row1) && (m_row_indices_i < lend_row); count += condition ? uword(1) : uword(0); } access::rw(n_nonzero) = count; } template arma_inline SpSubview::SpSubview(SpMat& in_m, const uword in_row1, const uword in_col1, const uword in_n_rows, const uword in_n_cols) : m(in_m) , aux_row1(in_row1) , aux_col1(in_col1) , n_rows(in_n_rows) , n_cols(in_n_cols) , n_elem(in_n_rows * in_n_cols) , n_nonzero(0) { arma_extra_debug_sigprint(); // There must be a O(1) way to do this uword lend = m.col_ptrs[in_col1 + in_n_cols]; uword lend_row = in_row1 + in_n_rows; uword count = 0; for(uword i = m.col_ptrs[in_col1]; i < lend; ++i) { const uword m_row_indices_i = m.row_indices[i]; const bool condition = (m_row_indices_i >= in_row1) && (m_row_indices_i < lend_row); count += condition ? uword(1) : uword(0); } access::rw(n_nonzero) = count; } template inline SpSubview::~SpSubview() { arma_extra_debug_sigprint(); } template inline const SpSubview& SpSubview::operator+=(const eT val) { arma_extra_debug_sigprint(); if(val == eT(0)) { return *this; } Mat tmp( (*this).n_rows, (*this).n_cols ); tmp.fill(val); return (*this).operator=( (*this) + tmp ); } template inline const SpSubview& SpSubview::operator-=(const eT val) { arma_extra_debug_sigprint(); if(val == eT(0)) { return *this; } Mat tmp( (*this).n_rows, (*this).n_cols ); tmp.fill(val); return (*this).operator=( (*this) - tmp ); } template inline const SpSubview& SpSubview::operator*=(const eT val) { arma_extra_debug_sigprint(); const uword lstart_row = aux_row1; const uword lend_row = aux_row1 + n_rows; const uword lstart_col = aux_col1; const uword lend_col = aux_col1 + n_cols; const uword* m_row_indices = m.row_indices; eT* m_values = access::rwp(m.values); for(uword c = lstart_col; c < lend_col; ++c) { const uword r_start = m.col_ptrs[c ]; const uword r_end = m.col_ptrs[c + 1]; for(uword r = r_start; r < r_end; ++r) { const uword m_row_indices_r = m_row_indices[r]; if( (m_row_indices_r >= lstart_row) && (m_row_indices_r < lend_row) ) { m_values[r] *= val; } } } const uword old_m_n_nonzero = m.n_nonzero; access::rw(m).remove_zeros(); if(m.n_nonzero != old_m_n_nonzero) { access::rw(n_nonzero) = n_nonzero - (old_m_n_nonzero - m.n_nonzero); } return *this; } template inline const SpSubview& SpSubview::operator/=(const eT val) { arma_extra_debug_sigprint(); arma_debug_check( (val == eT(0)), "element-wise division: division by zero" ); const uword lstart_row = aux_row1; const uword lend_row = aux_row1 + n_rows; const uword lstart_col = aux_col1; const uword lend_col = aux_col1 + n_cols; const uword* m_row_indices = m.row_indices; eT* m_values = access::rwp(m.values); for(uword c = lstart_col; c < lend_col; ++c) { const uword r_start = m.col_ptrs[c ]; const uword r_end = m.col_ptrs[c + 1]; for(uword r = r_start; r < r_end; ++r) { const uword m_row_indices_r = m_row_indices[r]; if( (m_row_indices_r >= lstart_row) && (m_row_indices_r < lend_row) ) { m_values[r] /= val; } } } const uword old_m_n_nonzero = m.n_nonzero; access::rw(m).remove_zeros(); if(m.n_nonzero != old_m_n_nonzero) { access::rw(n_nonzero) = n_nonzero - (old_m_n_nonzero - m.n_nonzero); } return *this; } template template inline const SpSubview& SpSubview::operator=(const Base& in) { arma_extra_debug_sigprint(); // this is a modified version of SpSubview::operator_equ_common(const SpBase) const SpProxy< SpMat > pa((*this).m); const unwrap b_tmp(in.get_ref()); const Mat& b = b_tmp.M; arma_debug_assert_same_size(n_rows, n_cols, b.n_rows, b.n_cols, "insertion into sparse submatrix"); const uword pa_start_row = (*this).aux_row1; const uword pa_start_col = (*this).aux_col1; const uword pa_end_row = pa_start_row + (*this).n_rows - 1; const uword pa_end_col = pa_start_col + (*this).n_cols - 1; const uword pa_n_rows = pa.get_n_rows(); const uword b_n_elem = b.n_elem; const eT* b_mem = b.memptr(); uword box_count = 0; for(uword i=0; i out(pa.get_n_rows(), pa.get_n_cols()); const uword alt_count = pa.get_n_nonzero() - (*this).n_nonzero + box_count; // Resize memory to correct size. out.mem_resize(alt_count); typename SpProxy< SpMat >::const_iterator_type x_it = pa.begin(); typename SpProxy< SpMat >::const_iterator_type x_end = pa.end(); uword b_row = 0; uword b_col = 0; bool x_it_ok = (x_it != x_end); bool y_it_ok = ( (b_row < b.n_rows) && (b_col < b.n_cols) ); uword x_it_row = (x_it_ok) ? x_it.row() : 0; uword x_it_col = (x_it_ok) ? x_it.col() : 0; uword y_it_row = (y_it_ok) ? b_row + pa_start_row : 0; uword y_it_col = (y_it_ok) ? b_col + pa_start_col : 0; uword cur_val = 0; while(x_it_ok || y_it_ok) { const bool x_inside_box = (x_it_row >= pa_start_row) && (x_it_row <= pa_end_row) && (x_it_col >= pa_start_col) && (x_it_col <= pa_end_col); const bool y_inside_box = (y_it_row >= pa_start_row) && (y_it_row <= pa_end_row) && (y_it_col >= pa_start_col) && (y_it_col <= pa_end_col); const eT x_val = x_inside_box ? eT(0) : ( x_it_ok ? (*x_it) : eT(0) ); const eT y_val = y_inside_box ? ( y_it_ok ? b.at(b_row,b_col) : eT(0) ) : eT(0); if( (x_it_row == y_it_row) && (x_it_col == y_it_col) ) { if( (x_val != eT(0)) || (y_val != eT(0)) ) { access::rw(out.values[cur_val]) = (x_val != eT(0)) ? x_val : y_val; access::rw(out.row_indices[cur_val]) = x_it_row; ++access::rw(out.col_ptrs[x_it_col + 1]); ++cur_val; } if(x_it_ok) { ++x_it; if(x_it == x_end) { x_it_ok = false; } } if(x_it_ok) { x_it_row = x_it.row(); x_it_col = x_it.col(); } else { x_it_row++; if(x_it_row >= pa_n_rows) { x_it_row = 0; x_it_col++; } } if(y_it_ok) { b_row++; if(b_row >= b.n_rows) { b_row = 0; b_col++; } if( (b_row > b.n_rows) || (b_col > b.n_cols) ) { y_it_ok = false; } } if(y_it_ok) { y_it_row = b_row + pa_start_row; y_it_col = b_col + pa_start_col; } else { y_it_row++; if(y_it_row >= pa_n_rows) { y_it_row = 0; y_it_col++; } } } else { if((x_it_col < y_it_col) || ((x_it_col == y_it_col) && (x_it_row < y_it_row))) // if y is closer to the end { if(x_val != eT(0)) { access::rw(out.values[cur_val]) = x_val; access::rw(out.row_indices[cur_val]) = x_it_row; ++access::rw(out.col_ptrs[x_it_col + 1]); ++cur_val; } if(x_it_ok) { ++x_it; if(x_it == x_end) { x_it_ok = false; } } if(x_it_ok) { x_it_row = x_it.row(); x_it_col = x_it.col(); } else { x_it_row++; if(x_it_row >= pa_n_rows) { x_it_row = 0; x_it_col++; } } } else { if(y_val != eT(0)) { access::rw(out.values[cur_val]) = y_val; access::rw(out.row_indices[cur_val]) = y_it_row; ++access::rw(out.col_ptrs[y_it_col + 1]); ++cur_val; } if(y_it_ok) { b_row++; if(b_row >= b.n_rows) { b_row = 0; b_col++; } if( (b_row > b.n_rows) || (b_col > b.n_cols) ) { y_it_ok = false; } } if(y_it_ok) { y_it_row = b_row + pa_start_row; y_it_col = b_col + pa_start_col; } else { y_it_row++; if(y_it_row >= pa_n_rows) { y_it_row = 0; y_it_col++; } } } } } const uword out_n_cols = out.n_cols; uword* col_ptrs = access::rwp(out.col_ptrs); // Fix column pointers to be cumulative. for(uword c = 1; c <= out_n_cols; ++c) { col_ptrs[c] += col_ptrs[c - 1]; } access::rw((*this).m).steal_mem(out); access::rw(n_nonzero) = box_count; return *this; } template template inline const SpSubview& SpSubview::operator+=(const Base& x) { arma_extra_debug_sigprint(); return (*this).operator=( (*this) + x.get_ref() ); } template template inline const SpSubview& SpSubview::operator-=(const Base& x) { arma_extra_debug_sigprint(); return (*this).operator=( (*this) - x.get_ref() ); } template template inline const SpSubview& SpSubview::operator*=(const Base& x) { arma_extra_debug_sigprint(); SpMat tmp(*this); tmp *= x.get_ref(); return (*this).operator=(tmp); } template template inline const SpSubview& SpSubview::operator%=(const Base& x) { arma_extra_debug_sigprint(); return (*this).operator=( (*this) % x.get_ref() ); } template template inline const SpSubview& SpSubview::operator/=(const Base& x) { arma_extra_debug_sigprint(); return (*this).operator=( (*this) / x.get_ref() ); } template inline const SpSubview& SpSubview::operator=(const SpSubview& x) { arma_extra_debug_sigprint(); return (*this).operator_equ_common(x); } template template inline const SpSubview& SpSubview::operator=(const SpBase& x) { arma_extra_debug_sigprint(); return (*this).operator_equ_common( x.get_ref() ); } template template inline const SpSubview& SpSubview::operator_equ_common(const SpBase& in) { arma_extra_debug_sigprint(); // algorithm: // instead of directly inserting values into the matrix underlying the subview, // create a new matrix by merging the underlying matrix with the input object, // and then replacing the underlying matrix with the created matrix. // // the merging process requires pretending that the input object // has the same size as the underlying matrix. // while iterating through the elements of the input object, // this requires adjusting the row and column locations of each element, // as well as providing fake zero elements. // in effect there is a proxy for a proxy. const SpProxy< SpMat > pa((*this).m ); const SpProxy< T1 > pb(in.get_ref()); arma_debug_assert_same_size(n_rows, n_cols, pb.get_n_rows(), pb.get_n_cols(), "insertion into sparse submatrix"); const uword pa_start_row = (*this).aux_row1; const uword pa_start_col = (*this).aux_col1; const uword pa_end_row = pa_start_row + (*this).n_rows - 1; const uword pa_end_col = pa_start_col + (*this).n_cols - 1; const uword pa_n_rows = pa.get_n_rows(); SpMat out(pa.get_n_rows(), pa.get_n_cols()); const uword alt_count = pa.get_n_nonzero() - (*this).n_nonzero + pb.get_n_nonzero(); // Resize memory to correct size. out.mem_resize(alt_count); typename SpProxy< SpMat >::const_iterator_type x_it = pa.begin(); typename SpProxy< SpMat >::const_iterator_type x_end = pa.end(); typename SpProxy::const_iterator_type y_it = pb.begin(); typename SpProxy::const_iterator_type y_end = pb.end(); bool x_it_ok = (x_it != x_end); bool y_it_ok = (y_it != y_end); uword x_it_row = (x_it_ok) ? x_it.row() : 0; uword x_it_col = (x_it_ok) ? x_it.col() : 0; uword y_it_row = (y_it_ok) ? y_it.row() + pa_start_row : 0; uword y_it_col = (y_it_ok) ? y_it.col() + pa_start_col : 0; uword cur_val = 0; while(x_it_ok || y_it_ok) { const bool x_inside_box = (x_it_row >= pa_start_row) && (x_it_row <= pa_end_row) && (x_it_col >= pa_start_col) && (x_it_col <= pa_end_col); const bool y_inside_box = (y_it_row >= pa_start_row) && (y_it_row <= pa_end_row) && (y_it_col >= pa_start_col) && (y_it_col <= pa_end_col); const eT x_val = x_inside_box ? eT(0) : ( x_it_ok ? (*x_it) : eT(0) ); const eT y_val = y_inside_box ? ( y_it_ok ? (*y_it) : eT(0) ) : eT(0); if( (x_it_row == y_it_row) && (x_it_col == y_it_col) ) { if( (x_val != eT(0)) || (y_val != eT(0)) ) { access::rw(out.values[cur_val]) = (x_val != eT(0)) ? x_val : y_val; access::rw(out.row_indices[cur_val]) = x_it_row; ++access::rw(out.col_ptrs[x_it_col + 1]); ++cur_val; } if(x_it_ok) { ++x_it; if(x_it == x_end) { x_it_ok = false; } } if(x_it_ok) { x_it_row = x_it.row(); x_it_col = x_it.col(); } else { x_it_row++; if(x_it_row >= pa_n_rows) { x_it_row = 0; x_it_col++; } } if(y_it_ok) { ++y_it; if(y_it == y_end) { y_it_ok = false; } } if(y_it_ok) { y_it_row = y_it.row() + pa_start_row; y_it_col = y_it.col() + pa_start_col; } else { y_it_row++; if(y_it_row >= pa_n_rows) { y_it_row = 0; y_it_col++; } } } else { if((x_it_col < y_it_col) || ((x_it_col == y_it_col) && (x_it_row < y_it_row))) // if y is closer to the end { if(x_val != eT(0)) { access::rw(out.values[cur_val]) = x_val; access::rw(out.row_indices[cur_val]) = x_it_row; ++access::rw(out.col_ptrs[x_it_col + 1]); ++cur_val; } if(x_it_ok) { ++x_it; if(x_it == x_end) { x_it_ok = false; } } if(x_it_ok) { x_it_row = x_it.row(); x_it_col = x_it.col(); } else { x_it_row++; if(x_it_row >= pa_n_rows) { x_it_row = 0; x_it_col++; } } } else { if(y_val != eT(0)) { access::rw(out.values[cur_val]) = y_val; access::rw(out.row_indices[cur_val]) = y_it_row; ++access::rw(out.col_ptrs[y_it_col + 1]); ++cur_val; } if(y_it_ok) { ++y_it; if(y_it == y_end) { y_it_ok = false; } } if(y_it_ok) { y_it_row = y_it.row() + pa_start_row; y_it_col = y_it.col() + pa_start_col; } else { y_it_row++; if(y_it_row >= pa_n_rows) { y_it_row = 0; y_it_col++; } } } } } const uword out_n_cols = out.n_cols; uword* col_ptrs = access::rwp(out.col_ptrs); // Fix column pointers to be cumulative. for(uword c = 1; c <= out_n_cols; ++c) { col_ptrs[c] += col_ptrs[c - 1]; } access::rw((*this).m).steal_mem(out); access::rw(n_nonzero) = pb.get_n_nonzero(); return *this; } template template inline const SpSubview& SpSubview::operator+=(const SpBase& x) { arma_extra_debug_sigprint(); // TODO: implement dedicated machinery return (*this).operator=( (*this) + x.get_ref() ); } template template inline const SpSubview& SpSubview::operator-=(const SpBase& x) { arma_extra_debug_sigprint(); // TODO: implement dedicated machinery return (*this).operator=( (*this) - x.get_ref() ); } template template inline const SpSubview& SpSubview::operator*=(const SpBase& x) { arma_extra_debug_sigprint(); return (*this).operator=( (*this) * x.get_ref() ); } template template inline const SpSubview& SpSubview::operator%=(const SpBase& x) { arma_extra_debug_sigprint(); // TODO: implement dedicated machinery return (*this).operator=( (*this) % x.get_ref() ); } //! If you are using this function, you are probably misguided. template template inline const SpSubview& SpSubview::operator/=(const SpBase& x) { arma_extra_debug_sigprint(); SpProxy p(x.get_ref()); arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "element-wise division"); if(p.is_alias(m) == false) { for(uword lcol = 0; lcol < n_cols; ++lcol) for(uword lrow = 0; lrow < n_rows; ++lrow) { at(lrow,lcol) /= p.at(lrow,lcol); } } else { const SpMat tmp(p.Q); (*this).operator/=(tmp); } return *this; } template inline void SpSubview::fill(const eT val) { arma_extra_debug_sigprint(); if(val != eT(0)) { Mat tmp( (*this).n_rows, (*this).n_cols ); tmp.fill(val); (*this).operator=(tmp); } else { (*this).zeros(); } } template inline void SpSubview::zeros() { arma_extra_debug_sigprint(); (*this).operator*=(eT(0)); } template inline void SpSubview::ones() { arma_extra_debug_sigprint(); (*this).fill(eT(1)); } template inline void SpSubview::eye() { arma_extra_debug_sigprint(); SpMat tmp; tmp.eye( (*this).n_rows, (*this).n_cols ); (*this).operator=(tmp); } template arma_hot inline SpValProxy > SpSubview::operator[](const uword i) { const uword lrow = i % n_rows; const uword lcol = i / n_rows; return (*this).at(lrow, lcol); } template arma_hot inline eT SpSubview::operator[](const uword i) const { const uword lrow = i % n_rows; const uword lcol = i / n_rows; return (*this).at(lrow, lcol); } template arma_hot inline SpValProxy< SpSubview > SpSubview::operator()(const uword i) { arma_debug_check( (i >= n_elem), "SpSubview::operator(): index out of bounds"); const uword lrow = i % n_rows; const uword lcol = i / n_rows; return (*this).at(lrow, lcol); } template arma_hot inline eT SpSubview::operator()(const uword i) const { arma_debug_check( (i >= n_elem), "SpSubview::operator(): index out of bounds"); const uword lrow = i % n_rows; const uword lcol = i / n_rows; return (*this).at(lrow, lcol); } template arma_hot inline SpValProxy< SpSubview > SpSubview::operator()(const uword in_row, const uword in_col) { arma_debug_check( (in_row >= n_rows) || (in_col >= n_cols), "SpSubview::operator(): index out of bounds"); return (*this).at(in_row, in_col); } template arma_hot inline eT SpSubview::operator()(const uword in_row, const uword in_col) const { arma_debug_check( (in_row >= n_rows) || (in_col >= n_cols), "SpSubview::operator(): index out of bounds"); return (*this).at(in_row, in_col); } template arma_hot inline SpValProxy< SpSubview > SpSubview::at(const uword i) { const uword lrow = i % n_rows; const uword lcol = i / n_cols; return (*this).at(lrow, lcol); } template arma_hot inline eT SpSubview::at(const uword i) const { const uword lrow = i % n_rows; const uword lcol = i / n_cols; return (*this).at(lrow, lcol); } template arma_hot inline SpValProxy< SpSubview > SpSubview::at(const uword in_row, const uword in_col) { const uword colptr = m.col_ptrs[in_col + aux_col1]; const uword next_colptr = m.col_ptrs[in_col + aux_col1 + 1]; // Step through the row indices to see if our element exists. for(uword i = colptr; i < next_colptr; ++i) { // First check that we have not stepped past it. if((in_row + aux_row1) < m.row_indices[i]) { return SpValProxy >(in_row, in_col, *this); // Proxy for a zero value. } // Now check if we are at the correct place. if((in_row + aux_row1) == m.row_indices[i]) // If we are, return a reference to the value. { return SpValProxy >(in_row, in_col, *this, &access::rw(m.values[i])); } } // We did not find it, so it does not exist. return SpValProxy >(in_row, in_col, *this); } template arma_hot inline eT SpSubview::at(const uword in_row, const uword in_col) const { return m.at(aux_row1 + in_row, aux_col1 + in_col); } template inline bool SpSubview::check_overlap(const SpSubview& x) const { const subview& t = *this; if(&t.m != &x.m) { return false; } else { if( (t.n_elem == 0) || (x.n_elem == 0) ) { return false; } else { const uword t_row_start = t.aux_row1; const uword t_row_end_p1 = t_row_start + t.n_rows; const uword t_col_start = t.aux_col1; const uword t_col_end_p1 = t_col_start + t.n_cols; const uword x_row_start = x.aux_row1; const uword x_row_end_p1 = x_row_start + x.n_rows; const uword x_col_start = x.aux_col1; const uword x_col_end_p1 = x_col_start + x.n_cols; const bool outside_rows = ( (x_row_start >= t_row_end_p1) || (t_row_start >= x_row_end_p1) ); const bool outside_cols = ( (x_col_start >= t_col_end_p1) || (t_col_start >= x_col_end_p1) ); return ( (outside_rows == false) && (outside_cols == false) ); } } } template inline bool SpSubview::is_vec() const { return ( (n_rows == 1) || (n_cols == 1) ); } template inline SpSubview SpSubview::row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check(row_num >= n_rows, "SpSubview::row(): out of bounds"); return submat(row_num, 0, row_num, n_cols - 1); } template inline const SpSubview SpSubview::row(const uword row_num) const { arma_extra_debug_sigprint(); arma_debug_check(row_num >= n_rows, "SpSubview::row(): out of bounds"); return submat(row_num, 0, row_num, n_cols - 1); } template inline SpSubview SpSubview::col(const uword col_num) { arma_extra_debug_sigprint(); arma_debug_check(col_num >= n_cols, "SpSubview::col(): out of bounds"); return submat(0, col_num, n_rows - 1, col_num); } template inline const SpSubview SpSubview::col(const uword col_num) const { arma_extra_debug_sigprint(); arma_debug_check(col_num >= n_cols, "SpSubview::col(): out of bounds"); return submat(0, col_num, n_rows - 1, col_num); } template inline SpSubview SpSubview::rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_row2 >= n_rows), "SpSubview::rows(): indices out of bounds or incorrectly used" ); return submat(in_row1, 0, in_row2, n_cols - 1); } template inline const SpSubview SpSubview::rows(const uword in_row1, const uword in_row2) const { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_row2 >= n_rows), "SpSubview::rows(): indices out of bounds or incorrectly used" ); return submat(in_row1, 0, in_row2, n_cols - 1); } template inline SpSubview SpSubview::cols(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_col1 > in_col2) || (in_col2 >= n_cols), "SpSubview::cols(): indices out of bounds or incorrectly used" ); return submat(0, in_col1, n_rows - 1, in_col2); } template inline const SpSubview SpSubview::cols(const uword in_col1, const uword in_col2) const { arma_extra_debug_sigprint(); arma_debug_check ( (in_col1 > in_col2) || (in_col2 >= n_cols), "SpSubview::cols(): indices out of bounds or incorrectly used" ); return submat(0, in_col1, n_rows - 1, in_col2); } template inline SpSubview SpSubview::submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_col1 > in_col2) || (in_row2 >= n_rows) || (in_col2 >= n_cols), "SpSubview::submat(): indices out of bounds or incorrectly used" ); return access::rw(m).submat(in_row1 + aux_row1, in_col1 + aux_col1, in_row2 + aux_row1, in_col2 + aux_col1); } template inline const SpSubview SpSubview::submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) const { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_col1 > in_col2) || (in_row2 >= n_rows) || (in_col2 >= n_cols), "SpSubview::submat(): indices out of bounds or incorrectly used" ); return m.submat(in_row1 + aux_row1, in_col1 + aux_col1, in_row2 + aux_row1, in_col2 + aux_col1); } template inline SpSubview SpSubview::submat(const span& row_span, const span& col_span) { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const bool col_all = row_span.whole; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_all ? n_rows : row_span.b; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_all ? n_cols : col_span.b; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= n_rows))) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= n_cols))), "SpSubview::submat(): indices out of bounds or incorrectly used" ); return submat(in_row1, in_col1, in_row2, in_col2); } template inline const SpSubview SpSubview::submat(const span& row_span, const span& col_span) const { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const bool col_all = row_span.whole; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_all ? n_rows - 1 : row_span.b; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_all ? n_cols - 1 : col_span.b; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= n_rows))) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= n_cols))), "SpSubview::submat(): indices out of bounds or incorrectly used" ); return submat(in_row1, in_col1, in_row2, in_col2); } template inline SpSubview SpSubview::operator()(const uword row_num, const span& col_span) { arma_extra_debug_sigprint(); return submat(span(row_num, row_num), col_span); } template inline const SpSubview SpSubview::operator()(const uword row_num, const span& col_span) const { arma_extra_debug_sigprint(); return submat(span(row_num, row_num), col_span); } template inline SpSubview SpSubview::operator()(const span& row_span, const uword col_num) { arma_extra_debug_sigprint(); return submat(row_span, span(col_num, col_num)); } template inline const SpSubview SpSubview::operator()(const span& row_span, const uword col_num) const { arma_extra_debug_sigprint(); return submat(row_span, span(col_num, col_num)); } template inline SpSubview SpSubview::operator()(const span& row_span, const span& col_span) { arma_extra_debug_sigprint(); return submat(row_span, col_span); } template inline const SpSubview SpSubview::operator()(const span& row_span, const span& col_span) const { arma_extra_debug_sigprint(); return submat(row_span, col_span); } template inline void SpSubview::swap_rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); arma_debug_check((in_row1 >= n_rows) || (in_row2 >= n_rows), "SpSubview::swap_rows(): invalid row index"); const uword lstart_col = aux_col1; const uword lend_col = aux_col1 + n_cols; for(uword c = lstart_col; c < lend_col; ++c) { eT val = m.at(in_row1 + aux_row1, c); access::rw(m).at(in_row2 + aux_row1, c) = m.at(in_row1 + aux_row1, c); access::rw(m).at(in_row1 + aux_row1, c) = val; } } template inline void SpSubview::swap_cols(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check((in_col1 >= n_cols) || (in_col2 >= n_cols), "SpSubview::swap_cols(): invalid column index"); const uword lstart_row = aux_row1; const uword lend_row = aux_row1 + n_rows; for(uword r = lstart_row; r < lend_row; ++r) { eT val = m.at(r, in_col1 + aux_col1); access::rw(m).at(r, in_col1 + aux_col1) = m.at(r, in_col2 + aux_col1); access::rw(m).at(r, in_col2 + aux_col1) = val; } } template inline typename SpSubview::iterator SpSubview::begin() { return iterator(*this); } template inline typename SpSubview::const_iterator SpSubview::begin() const { return const_iterator(*this); } template inline typename SpSubview::iterator SpSubview::begin_col(const uword col_num) { return iterator(*this, 0, col_num); } template inline typename SpSubview::const_iterator SpSubview::begin_col(const uword col_num) const { return const_iterator(*this, 0, col_num); } template inline typename SpSubview::row_iterator SpSubview::begin_row(const uword row_num) { return row_iterator(*this, row_num, 0); } template inline typename SpSubview::const_row_iterator SpSubview::begin_row(const uword row_num) const { return const_row_iterator(*this, row_num, 0); } template inline typename SpSubview::iterator SpSubview::end() { return iterator(*this, 0, n_cols, n_nonzero, m.n_nonzero - n_nonzero); } template inline typename SpSubview::const_iterator SpSubview::end() const { return const_iterator(*this, 0, n_cols, n_nonzero, m.n_nonzero - n_nonzero); } template inline typename SpSubview::row_iterator SpSubview::end_row() { return row_iterator(*this, n_nonzero); } template inline typename SpSubview::const_row_iterator SpSubview::end_row() const { return const_row_iterator(*this, n_nonzero); } template inline typename SpSubview::row_iterator SpSubview::end_row(const uword row_num) { return row_iterator(*this, row_num + 1, 0); } template inline typename SpSubview::const_row_iterator SpSubview::end_row(const uword row_num) const { return const_row_iterator(*this, row_num + 1, 0); } template inline arma_hot arma_warn_unused eT& SpSubview::add_element(const uword in_row, const uword in_col, const eT in_val) { arma_extra_debug_sigprint(); // This may not actually add an element. const uword old_n_nonzero = m.n_nonzero; eT& retval = access::rw(m).add_element(in_row + aux_row1, in_col + aux_col1, in_val); // Update n_nonzero (if necessary). access::rw(n_nonzero) += (m.n_nonzero - old_n_nonzero); return retval; } template inline void SpSubview::delete_element(const uword in_row, const uword in_col) { arma_extra_debug_sigprint(); // This may not actually delete an element. const uword old_n_nonzero = m.n_nonzero; access::rw(m).delete_element(in_row + aux_row1, in_col + aux_col1); access::rw(n_nonzero) -= (old_n_nonzero - m.n_nonzero); } /** * Sparse subview col * template inline SpSubview_col::SpSubview_col(const Mat& in_m, const uword in_col) { arma_extra_debug_sigprint(); } template inline SpSubview_col::SpSubview_col(Mat& in_m, const uword in_col) { arma_extra_debug_sigprint(); } template inline SpSubview_col::SpSubview_col(const Mat& in_m, const uword in_col, const uword in_row1, const uword in_n_rows) { arma_extra_debug_sigprint(); } template inline SpSubview_col::SpSubview_col(Mat& in_m, const uword in_col, const uword in_row1, const uword in_n_rows) { arma_extra_debug_sigprint(); } */ /** * Sparse subview row * template inline SpSubview_row::SpSubview_row(const Mat& in_m, const uword in_row) { arma_extra_debug_sigprint(); } template inline SpSubview_row::SpSubview_row(Mat& in_m, const uword in_row) { arma_extra_debug_sigprint(); } template inline SpSubview_row::SpSubview_row(const Mat& in_m, const uword in_row, const uword in_col1, const uword in_n_cols) { arma_extra_debug_sigprint(); } template inline SpSubview_row::SpSubview_row(Mat& in_m, const uword in_row, const uword in_col1, const uword in_n_cols) { arma_extra_debug_sigprint(); } */ //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpValProxy_bones.hpp ================================================ // Copyright (C) 2011-2012 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpValProxy //! @{ /** * Sparse value proxy class, meant to prevent 0s from being added to sparse * matrices. T1 should be either SpMat or SpSubview, and if it's not, bad news * is probably coming. This class only uses T1::add_element() and * T1::delete_element(). */ template class SpValProxy { public: typedef typename T1::elem_type eT; // Convenience typedef friend class SpMat; friend class SpSubview; /** * Create the sparse value proxy. * Otherwise, pass a pointer to a reference of the value. */ arma_inline SpValProxy(uword row, uword col, T1& in_parent, eT* in_val_ptr = NULL); //! For swapping operations. arma_inline SpValProxy& operator=(const SpValProxy& rhs); template arma_inline SpValProxy& operator=(const SpValProxy& rhs); //! Overload all of the potential operators. //! First, the ones that could modify a value. arma_inline SpValProxy& operator=(const eT rhs); arma_inline SpValProxy& operator+=(const eT rhs); arma_inline SpValProxy& operator-=(const eT rhs); arma_inline SpValProxy& operator*=(const eT rhs); arma_inline SpValProxy& operator/=(const eT rhs); arma_inline SpValProxy& operator++(); arma_inline SpValProxy& operator--(); arma_inline eT operator++(const int); arma_inline eT operator--(const int); //! This will work for any other operations that do not modify a value. arma_inline operator eT() const; private: // Deletes the element if it is zero. Does not check if val_ptr == NULL! arma_inline arma_hot void check_zero(); uword row; uword col; eT* val_ptr; T1& parent; // We will call this object if we need to insert or delete an element. }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/SpValProxy_meat.hpp ================================================ // Copyright (C) 2011-2012 Ryan Curtin // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup SpValProxy //! @{ //! SpValProxy implementation. template arma_inline SpValProxy::SpValProxy(uword in_row, uword in_col, T1& in_parent, eT* in_val_ptr) : row(in_row) , col(in_col) , val_ptr(in_val_ptr) , parent(in_parent) { // Nothing to do. } template arma_inline SpValProxy& SpValProxy::operator=(const SpValProxy& rhs) { return (*this).operator=(eT(rhs)); } template template arma_inline SpValProxy& SpValProxy::operator=(const SpValProxy& rhs) { return (*this).operator=(eT(rhs)); } template arma_inline SpValProxy& SpValProxy::operator=(const eT rhs) { if (rhs != eT(0)) // A nonzero element is being assigned. { if (val_ptr) { // The value exists and merely needs to be updated. *val_ptr = rhs; } else { // The value is nonzero and must be added. val_ptr = &parent.add_element(row, col, rhs); } } else // A zero is being assigned.~ { if (val_ptr) { // The element exists, but we need to remove it, because it is being set to 0. parent.delete_element(row, col); val_ptr = NULL; } // If the element does not exist, we do not need to do anything at all. } return *this; } template arma_inline SpValProxy& SpValProxy::operator+=(const eT rhs) { if (val_ptr) { // The value already exists and merely needs to be updated. *val_ptr += rhs; check_zero(); } else { if (rhs != eT(0)) { // The value does not exist and must be added. val_ptr = &parent.add_element(row, col, rhs); } } return *this; } template arma_inline SpValProxy& SpValProxy::operator-=(const eT rhs) { if (val_ptr) { // The value already exists and merely needs to be updated. *val_ptr -= rhs; check_zero(); } else { if (rhs != eT(0)) { // The value does not exist and must be added. val_ptr = &parent.add_element(row, col, -rhs); } } return *this; } template arma_inline SpValProxy& SpValProxy::operator*=(const eT rhs) { if (rhs != eT(0)) { if (val_ptr) { // The value already exists and merely needs to be updated. *val_ptr *= rhs; check_zero(); } } else { if (val_ptr) { // Since we are multiplying by zero, the value can be deleted. parent.delete_element(row, col); val_ptr = NULL; } } return *this; } template arma_inline SpValProxy& SpValProxy::operator/=(const eT rhs) { if (rhs != eT(0)) // I hope this is true! { if (val_ptr) { *val_ptr /= rhs; check_zero(); } } else { if (val_ptr) { *val_ptr /= rhs; // That is where it gets ugly. // Now check if it's 0. if (*val_ptr == eT(0)) { parent.delete_element(row, col); val_ptr = NULL; } } else { eT val = eT(0) / rhs; // This may vary depending on type and implementation. if (val != eT(0)) { // Ok, now we have to add it. val_ptr = &parent.add_element(row, col, val); } } } return *this; } template arma_inline SpValProxy& SpValProxy::operator++() { if (val_ptr) { (*val_ptr) += eT(1); check_zero(); } else { val_ptr = &parent.add_element(row, col, eT(1)); } return *this; } template arma_inline SpValProxy& SpValProxy::operator--() { if (val_ptr) { (*val_ptr) -= eT(1); check_zero(); } else { val_ptr = &parent.add_element(row, col, eT(-1)); } return *this; } template arma_inline typename T1::elem_type SpValProxy::operator++(const int) { if (val_ptr) { (*val_ptr) += eT(1); check_zero(); } else { val_ptr = &parent.add_element(row, col, eT(1)); } if (val_ptr) // It may have changed to now be 0. { return *(val_ptr) - eT(1); } else { return eT(0); } } template arma_inline typename T1::elem_type SpValProxy::operator--(const int) { if (val_ptr) { (*val_ptr) -= eT(1); check_zero(); } else { val_ptr = &parent.add_element(row, col, eT(-1)); } if (val_ptr) // It may have changed to now be 0. { return *(val_ptr) + eT(1); } else { return eT(0); } } template arma_inline SpValProxy::operator eT() const { if (val_ptr) { return *val_ptr; } else { return eT(0); } } template arma_inline arma_hot void SpValProxy::check_zero() { if (*val_ptr == eT(0)) { parent.delete_element(row, col); val_ptr = NULL; } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/access.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup access //! @{ class access { public: //! internal function to allow modification of data declared as read-only (use with caution) template arma_inline static T1& rw (const T1& x) { return const_cast(x); } template arma_inline static T1*& rwp(const T1* const& x) { return const_cast(x); } //! internal function to obtain the real part of either a plain number or a complex number template arma_inline static const eT& tmp_real(const eT& X) { return X; } template arma_inline static const T tmp_real(const std::complex& X) { return X.real(); } //! internal function to work around braindead compilers template arma_inline static const typename enable_if2::value, const eT&>::result alt_conj(const eT& X) { return X; } template arma_inline static const typename enable_if2< is_complex::value, const eT >::result alt_conj(const eT& X) { return std::conj(X); } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/arma_boost.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup arma_boost //! @{ namespace arma_boost { #if defined(ARMA_HAVE_SNPRINTF) #define arma_snprintf snprintf #else // better-than-nothing emulation of C99 snprintf(), // with correct return value and null-terminated output string. // note that _snprintf() provided by MS is not a good substitute for snprintf() inline int arma_snprintf(char* out, size_t size, const char* fmt, ...) { size_t i; for(i=0; i 0) out[size-1] = char(0); return int(i); } #endif class format { public: format(const char* in_fmt) : A(in_fmt) { } format(const std::string& in_fmt) : A(in_fmt) { } const std::string A; private: format(); }; template class basic_format { public: basic_format(const T1& in_A, const T2& in_B) : A(in_A) , B(in_B) { } const T1& A; const T2& B; private: basic_format(); }; template inline basic_format< format, T2 > operator% (const format& X, const T2& arg) { return basic_format< format, T2 >(X, arg); } template inline basic_format< basic_format, T3 > operator% (const basic_format& X, const T3& arg) { return basic_format< basic_format, T3 >(X, arg); } template inline std::string str(const basic_format< format, T2>& X) { char local_buffer[1024]; char* buffer = local_buffer; int buffer_size = 1024; int required_size = buffer_size; bool using_local_buffer = true; std::string out; do { if(using_local_buffer == false) { buffer = new char[buffer_size]; } required_size = arma_snprintf(buffer, size_t(buffer_size), X.A.A.c_str(), X.B); if(required_size < buffer_size) { if(required_size > 0) { out = buffer; } } else { buffer_size *= 2; } if(using_local_buffer) { using_local_buffer = false; } else { delete[] buffer; } } while( (required_size >= buffer_size) ); return out; } template inline std::string str(const basic_format< basic_format< format, T2>, T3>& X) { char local_buffer[1024]; char* buffer = local_buffer; int buffer_size = 1024; int required_size = buffer_size; bool using_local_buffer = true; std::string out; do { if(using_local_buffer == false) { buffer = new char[buffer_size]; } required_size = arma_snprintf(buffer, size_t(buffer_size), X.A.A.A.c_str(), X.A.B, X.B); if(required_size < buffer_size) { if(required_size > 0) { out = buffer; } } else { buffer_size *= 2; } if(using_local_buffer) { using_local_buffer = false; } else { delete[] buffer; } } while( (required_size >= buffer_size) ); return out; } template inline std::string str(const basic_format< basic_format< basic_format< format, T2>, T3>, T4>& X) { char local_buffer[1024]; char* buffer = local_buffer; int buffer_size = 1024; int required_size = buffer_size; bool using_local_buffer = true; std::string out; do { if(using_local_buffer == false) { buffer = new char[buffer_size]; } required_size = arma_snprintf(buffer, size_t(buffer_size), X.A.A.A.A.c_str(), X.A.A.B, X.A.B, X.B); if(required_size < buffer_size) { if(required_size > 0) { out = buffer; } } else { buffer_size *= 2; } if(using_local_buffer) { using_local_buffer = false; } else { delete[] buffer; } } while( (required_size >= buffer_size) ); return out; } template inline std::string str(const basic_format< basic_format< basic_format< basic_format< format, T2>, T3>, T4>, T5>& X) { char local_buffer[1024]; char* buffer = local_buffer; int buffer_size = 1024; int required_size = buffer_size; bool using_local_buffer = true; std::string out; do { if(using_local_buffer == false) { buffer = new char[buffer_size]; } required_size = arma_snprintf(buffer, size_t(buffer_size), X.A.A.A.A.A.c_str(), X.A.A.A.B, X.A.A.B, X.A.B, X.B); if(required_size < buffer_size) { if(required_size > 0) { out = buffer; } } else { buffer_size *= 2; } if(using_local_buffer) { using_local_buffer = false; } else { delete[] buffer; } } while( (required_size >= buffer_size) ); return out; } template inline std::string str(const basic_format< basic_format< basic_format< basic_format< basic_format< format, T2>, T3>, T4>, T5>, T6>& X) { char local_buffer[1024]; char* buffer = local_buffer; int buffer_size = 1024; int required_size = buffer_size; bool using_local_buffer = true; std::string out; do { if(using_local_buffer == false) { buffer = new char[buffer_size]; } required_size = arma_snprintf(buffer, size_t(buffer_size), X.A.A.A.A.A.A.c_str(), X.A.A.A.A.B, X.A.A.A.B, X.A.A.B, X.A.B, X.B); if(required_size < buffer_size) { if(required_size > 0) { out = buffer; } } else { buffer_size *= 2; } if(using_local_buffer) { using_local_buffer = false; } else { delete[] buffer; } } while( (required_size >= buffer_size) ); return out; } template inline std::string str(const basic_format< basic_format< basic_format< basic_format< basic_format< basic_format< format, T2>, T3>, T4>, T5>, T6>, T7>& X) { char local_buffer[1024]; char* buffer = local_buffer; int buffer_size = 1024; int required_size = buffer_size; bool using_local_buffer = true; std::string out; do { if(using_local_buffer == false) { buffer = new char[buffer_size]; } required_size = arma_snprintf(buffer, size_t(buffer_size), X.A.A.A.A.A.A.A.c_str(), X.A.A.A.A.A.B, X.A.A.A.A.B, X.A.A.A.B, X.A.A.B, X.A.B, X.B); if(required_size < buffer_size) { if(required_size > 0) { out = buffer; } } else { buffer_size *= 2; } if(using_local_buffer) { using_local_buffer = false; } else { delete[] buffer; } } while( (required_size >= buffer_size) ); return out; } template struct format_metaprog { static const uword depth = 0; inline static const std::string& get_fmt(const T1& X) { return X.A; } }; //template<> template struct format_metaprog< basic_format > { static const uword depth = 1 + format_metaprog::depth; inline static const std::string& get_fmt(const T1& X) { return format_metaprog::get_fmt(X.A); } }; template inline std::string str(const basic_format& X) { return format_metaprog< basic_format >::get_fmt(X.A); } template inline std::ostream& operator<< (std::ostream& o, const basic_format& X) { o << str(X); return o; } template struct string_only { }; template<> struct string_only { typedef std::string result; }; template struct char_only { }; template<> struct char_only { typedef char result; }; template struct basic_format_only { }; template struct basic_format_only< basic_format > { typedef basic_format result; }; template inline static const T1& str_wrapper(const T1& x, const typename string_only::result* junk = 0) { arma_ignore(junk); return x; } template inline static const T1* str_wrapper(const T1* x, const typename char_only::result* junk = 0) { arma_ignore(junk); return x; } template inline static std::string str_wrapper(const T1& x, const typename basic_format_only::result* junk = 0) { arma_ignore(junk); return str(x); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/arma_cmath.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup arma_cmath //! @{ // // wrappers for isfinite template arma_inline bool arma_isfinite(eT val) { arma_ignore(val); return true; } template<> arma_inline bool arma_isfinite(float x) { #if defined(ARMA_USE_CXX11) { return std::isfinite(x); } #elif defined(ARMA_HAVE_TR1) { return std::tr1::isfinite(x); } #elif defined(ARMA_HAVE_ISFINITE) { return (std::isfinite(x) != 0); } #else { const float y = (std::numeric_limits::max)(); const volatile float xx = x; return (xx == xx) && (x >= -y) && (x <= y); } #endif } template<> arma_inline bool arma_isfinite(double x) { #if defined(ARMA_USE_CXX11) { return std::isfinite(x); } #elif defined(ARMA_HAVE_TR1) { return std::tr1::isfinite(x); } #elif defined(ARMA_HAVE_ISFINITE) { return (std::isfinite(x) != 0); } #else { const double y = (std::numeric_limits::max)(); const volatile double xx = x; return (xx == xx) && (x >= -y) && (x <= y); } #endif } template arma_inline bool arma_isfinite(const std::complex& x) { if( (arma_isfinite(x.real()) == false) || (arma_isfinite(x.imag()) == false) ) { return false; } else { return true; } } // // wrappers for isinf template arma_inline bool arma_isinf(eT val) { arma_ignore(val); return false; } template<> arma_inline bool arma_isinf(float x) { #if defined(ARMA_USE_CXX11) { return std::isinf(x); } #elif defined(ARMA_HAVE_ISINF) { return (std::isinf(x) != 0); } #else { const float y = (std::numeric_limits::max)(); const volatile float xx = x; return (xx == xx) && ((x < -y) || (x > y)); } #endif } template<> arma_inline bool arma_isinf(double x) { #if defined(ARMA_USE_CXX11) { return std::isinf(x); } #elif defined(ARMA_HAVE_ISINF) { return (std::isinf(x) != 0); } #else { const double y = (std::numeric_limits::max)(); const volatile double xx = x; return (xx == xx) && ((x < -y) || (x > y)); } #endif } template arma_inline bool arma_isinf(const std::complex& x) { return ( arma_isinf(x.real()) || arma_isinf(x.imag()) ); } // // wrappers for isnan template arma_inline bool arma_isnan(eT val) { arma_ignore(val); return false; } template<> arma_inline bool arma_isnan(float x) { #if defined(ARMA_USE_CXX11) { return std::isnan(x); } #elif defined(ARMA_HAVE_ISNAN) { return (std::isnan(x) != 0); } #else { const volatile float xx = x; return (xx != xx); } #endif } template<> arma_inline bool arma_isnan(double x) { #if defined(ARMA_USE_CXX11) { return std::isnan(x); } #elif defined(ARMA_HAVE_ISNAN) { return (std::isnan(x) != 0); } #else { const volatile double xx = x; return (xx != xx); } #endif } template arma_inline bool arma_isnan(const std::complex& x) { return ( arma_isnan(x.real()) || arma_isnan(x.imag()) ); } // rudimentary wrappers for log1p() arma_inline float arma_log1p(const float x) { #if defined(ARMA_USE_CXX11) { return std::log1p(x); } #else { if((x >= float(0)) && (x < std::numeric_limits::epsilon())) { return x; } else if((x < float(0)) && (-x < std::numeric_limits::epsilon())) { return x; } else { return std::log(float(1) + x); } } #endif } arma_inline double arma_log1p(const double x) { #if defined(ARMA_USE_CXX11) { return std::log1p(x); } #elif defined(ARMA_HAVE_LOG1P) { return log1p(x); } #else { if((x >= double(0)) && (x < std::numeric_limits::epsilon())) { return x; } else if((x < double(0)) && (-x < std::numeric_limits::epsilon())) { return x; } else { return std::log(double(1) + x); } } #endif } // // wrappers for trigonometric functions // // wherever possible, try to use C++11 or TR1 versions of the following functions: // // complex acos // complex asin // complex atan // // real acosh // real asinh // real atanh // // complex acosh // complex asinh // complex atanh // // // if C++11 or TR1 are not available, we have rudimentary versions of: // // real acosh // real asinh // real atanh template arma_inline std::complex arma_acos(const std::complex& x) { #if defined(ARMA_USE_CXX11) { return std::acos(x); } #elif defined(ARMA_HAVE_TR1) { return std::tr1::acos(x); } #else { arma_ignore(x); arma_stop("acos(): need C++11 compiler"); return std::complex(0); } #endif } template arma_inline std::complex arma_asin(const std::complex& x) { #if defined(ARMA_USE_CXX11) { return std::asin(x); } #elif defined(ARMA_HAVE_TR1) { return std::tr1::asin(x); } #else { arma_ignore(x); arma_stop("asin(): need C++11 compiler"); return std::complex(0); } #endif } template arma_inline std::complex arma_atan(const std::complex& x) { #if defined(ARMA_USE_CXX11) { return std::atan(x); } #elif defined(ARMA_HAVE_TR1) { return std::tr1::atan(x); } #else { arma_ignore(x); arma_stop("atan(): need C++11 compiler"); return std::complex(0); } #endif } template arma_inline eT arma_acosh(const eT x) { #if defined(ARMA_USE_CXX11) { return std::acosh(x); } #elif defined(ARMA_HAVE_TR1) { return std::tr1::acosh(x); } #else { if(x >= eT(1)) { // http://functions.wolfram.com/ElementaryFunctions/ArcCosh/02/ return std::log( x + std::sqrt(x*x - eT(1)) ); } else { if(std::numeric_limits::has_quiet_NaN) { return -(std::numeric_limits::quiet_NaN()); } else { return eT(0); } } } #endif } template arma_inline eT arma_asinh(const eT x) { #if defined(ARMA_USE_CXX11) { return std::asinh(x); } #elif defined(ARMA_HAVE_TR1) { return std::tr1::asinh(x); } #else { // http://functions.wolfram.com/ElementaryFunctions/ArcSinh/02/ return std::log( x + std::sqrt(x*x + eT(1)) ); } #endif } template arma_inline eT arma_atanh(const eT x) { #if defined(ARMA_USE_CXX11) { return std::atanh(x); } #elif defined(ARMA_HAVE_TR1) { return std::tr1::atanh(x); } #else { if( (x >= eT(-1)) && (x <= eT(+1)) ) { // http://functions.wolfram.com/ElementaryFunctions/ArcTanh/02/ return std::log( ( eT(1)+x ) / ( eT(1)-x ) ) / eT(2); } else { if(std::numeric_limits::has_quiet_NaN) { return -(std::numeric_limits::quiet_NaN()); } else { return eT(0); } } } #endif } template arma_inline std::complex arma_acosh(const std::complex& x) { #if defined(ARMA_USE_CXX11) { return std::acosh(x); } #elif defined(ARMA_HAVE_TR1) { return std::tr1::acosh(x); } #else { arma_ignore(x); arma_stop("acosh(): need C++11 compiler"); return std::complex(0); } #endif } template arma_inline std::complex arma_asinh(const std::complex& x) { #if defined(ARMA_USE_CXX11) { return std::asinh(x); } #elif defined(ARMA_HAVE_TR1) { return std::tr1::asinh(x); } #else { arma_ignore(x); arma_stop("asinh(): need C++11 compiler"); return std::complex(0); } #endif } template arma_inline std::complex arma_atanh(const std::complex& x) { #if defined(ARMA_USE_CXX11) { return std::atanh(x); } #elif defined(ARMA_HAVE_TR1) { return std::tr1::atanh(x); } #else { arma_ignore(x); arma_stop("atanh(): need C++11 compiler"); return std::complex(0); } #endif } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/arma_config.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup arma_config //! @{ struct arma_config { #if defined(ARMA_MAT_PREALLOC) static const uword mat_prealloc = (sword(ARMA_MAT_PREALLOC) > 0) ? uword(ARMA_MAT_PREALLOC) : 1; #else static const uword mat_prealloc = 16; #endif #if defined(ARMA_SPMAT_CHUNKSIZE) static const uword spmat_chunksize = (sword(ARMA_SPMAT_CHUNKSIZE) > 0) ? uword(ARMA_SPMAT_CHUNKSIZE) : 256; #else static const uword spmat_chunksize = 256; #endif #if defined(ARMA_USE_ATLAS) static const bool atlas = true; #else static const bool atlas = false; #endif #if defined(ARMA_USE_LAPACK) static const bool lapack = true; #else static const bool lapack = false; #endif #if defined(ARMA_USE_BLAS) static const bool blas = true; #else static const bool blas = false; #endif #if defined(ARMA_USE_ARPACK) static const bool arpack = true; #else static const bool arpack = false; #endif #if defined(ARMA_USE_SUPERLU) static const bool superlu = true; #else static const bool superlu = false; #endif #if defined(ARMA_USE_HDF5) static const bool hdf5 = true; #else static const bool hdf5 = false; #endif #if defined(ARMA_NO_DEBUG) static const bool debug = false; #else static const bool debug = true; #endif #if defined(ARMA_EXTRA_DEBUG) static const bool extra_debug = true; #else static const bool extra_debug = false; #endif #if defined(ARMA_GOOD_COMPILER) static const bool good_comp = true; #else static const bool good_comp = false; #endif #if ( \ defined(ARMA_EXTRA_MAT_PROTO) || defined(ARMA_EXTRA_MAT_MEAT) \ || defined(ARMA_EXTRA_COL_PROTO) || defined(ARMA_EXTRA_COL_MEAT) \ || defined(ARMA_EXTRA_ROW_PROTO) || defined(ARMA_EXTRA_ROW_MEAT) \ || defined(ARMA_EXTRA_CUBE_PROTO) || defined(ARMA_EXTRA_CUBE_MEAT) \ || defined(ARMA_EXTRA_FIELD_PROTO) || defined(ARMA_EXTRA_FIELD_MEAT) \ || defined(ARMA_EXTRA_SPMAT_PROTO) || defined(ARMA_EXTRA_SPMAT_MEAT) \ || defined(ARMA_EXTRA_SPCOL_PROTO) || defined(ARMA_EXTRA_SPCOL_MEAT) \ || defined(ARMA_EXTRA_SPROW_PROTO) || defined(ARMA_EXTRA_SPROW_MEAT) \ ) static const bool extra_code = true; #else static const bool extra_code = false; #endif #if defined(ARMA_USE_CXX11) static const bool use_cxx11 = true; #else static const bool use_cxx11 = false; #endif #if defined(ARMA_USE_WRAPPER) static const bool use_wrapper = true; #else static const bool use_wrapper = false; #endif #if defined(_OPENMP) static const bool openmp = true; #else static const bool openmp = false; #endif }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/arma_ostream_bones.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup arma_ostream //! @{ class arma_ostream_state { private: const ios::fmtflags orig_flags; const std::streamsize orig_precision; const std::streamsize orig_width; const char orig_fill; public: inline arma_ostream_state(const std::ostream& o); inline void restore(std::ostream& o) const; }; class arma_ostream { public: template inline static std::streamsize modify_stream(std::ostream& o, const eT* data, const uword n_elem); template inline static std::streamsize modify_stream(std::ostream& o, const std::complex* data, const uword n_elem); template inline static std::streamsize modify_stream(std::ostream& o, typename SpMat::const_iterator begin, const uword n_elem, const typename arma_not_cx::result* junk = 0); template inline static std::streamsize modify_stream(std::ostream& o, typename SpMat::const_iterator begin, const uword n_elem, const typename arma_cx_only::result* junk = 0); template inline static void print_elem_zero(std::ostream& o, const bool modify); template arma_inline static void print_elem(std::ostream& o, const eT& x, const bool modify); template inline static void print_elem(std::ostream& o, const std::complex& x, const bool modify); template inline static void print(std::ostream& o, const Mat& m, const bool modify); template inline static void print(std::ostream& o, const Cube& m, const bool modify); template inline static void print(std::ostream& o, const field& m); template inline static void print(std::ostream& o, const subview_field& m); template inline static void print_dense(std::ostream& o, const SpMat& m, const bool modify); template inline static void print(std::ostream& o, const SpMat& m, const bool modify); inline static void print(std::ostream& o, const SizeMat& S); inline static void print(std::ostream& o, const SizeCube& S); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/arma_ostream_meat.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // Copyright (C) 2012 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup arma_ostream //! @{ inline arma_ostream_state::arma_ostream_state(const std::ostream& o) : orig_flags (o.flags()) , orig_precision(o.precision()) , orig_width (o.width()) , orig_fill (o.fill()) { } inline void arma_ostream_state::restore(std::ostream& o) const { o.flags (orig_flags); o.precision(orig_precision); o.width (orig_width); o.fill (orig_fill); } // // template inline std::streamsize arma_ostream::modify_stream(std::ostream& o, const eT* data, const uword n_elem) { o.unsetf(ios::showbase); o.unsetf(ios::uppercase); o.unsetf(ios::showpos); o.fill(' '); std::streamsize cell_width; bool use_layout_B = false; bool use_layout_C = false; bool use_layout_D = false; for(uword i=0; i 4) && (is_same_type::yes || is_same_type::yes) >::geq(val, eT(+10000000000)) ) || ( cond_rel< (sizeof(eT) > 4) && is_same_type::yes >::leq(val, eT(-10000000000)) ) ) { use_layout_D = true; break; } if( ( val >= eT(+100) ) || //( (is_signed::value == true) && (val <= eT(-100)) ) || //( (is_non_integral::value == true) && (val > eT(0)) && (val <= eT(+1e-4)) ) || //( (is_non_integral::value == true) && (is_signed::value == true) && (val < eT(0)) && (val >= eT(-1e-4)) ) ( cond_rel< is_signed::value >::leq(val, eT(-100)) ) || ( cond_rel< is_non_integral::value >::gt(val, eT(0)) && cond_rel< is_non_integral::value >::leq(val, eT(+1e-4)) ) || ( cond_rel< is_non_integral::value && is_signed::value >::lt(val, eT(0)) && cond_rel< is_non_integral::value && is_signed::value >::geq(val, eT(-1e-4)) ) ) { use_layout_C = true; break; } if( // (val >= eT(+10)) || ( (is_signed::value == true) && (val <= eT(-10)) ) (val >= eT(+10)) || ( cond_rel< is_signed::value >::leq(val, eT(-10)) ) ) { use_layout_B = true; } } if(use_layout_D) { o.setf(ios::scientific); o.setf(ios::right); o.unsetf(ios::fixed); o.precision(4); cell_width = 21; } else if(use_layout_C) { o.setf(ios::scientific); o.setf(ios::right); o.unsetf(ios::fixed); o.precision(4); cell_width = 13; } else if(use_layout_B) { o.unsetf(ios::scientific); o.setf(ios::right); o.setf(ios::fixed); o.precision(4); cell_width = 10; } else { o.unsetf(ios::scientific); o.setf(ios::right); o.setf(ios::fixed); o.precision(4); cell_width = 9; } return cell_width; } //! "better than nothing" settings for complex numbers template inline std::streamsize arma_ostream::modify_stream(std::ostream& o, const std::complex* data, const uword n_elem) { arma_ignore(data); arma_ignore(n_elem); o.unsetf(ios::showbase); o.unsetf(ios::uppercase); o.fill(' '); o.setf(ios::scientific); o.setf(ios::showpos); o.setf(ios::right); o.unsetf(ios::fixed); std::streamsize cell_width; o.precision(3); cell_width = 2 + 2*(1 + 3 + o.precision() + 5) + 1; return cell_width; } template inline std::streamsize arma_ostream::modify_stream(std::ostream& o, typename SpMat::const_iterator begin, const uword n_elem, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); o.unsetf(ios::showbase); o.unsetf(ios::uppercase); o.unsetf(ios::showpos); o.fill(' '); std::streamsize cell_width; bool use_layout_B = false; bool use_layout_C = false; for(typename SpMat::const_iterator it = begin; it.pos() < n_elem; ++it) { const eT val = *it; if( val >= eT(+100) || ( (is_signed::value == true) && (val <= eT(-100)) ) || ( (is_non_integral::value == true) && (val > eT(0)) && (val <= eT(+1e-4)) ) || ( (is_non_integral::value == true) && (is_signed::value == true) && (val < eT(0)) && (val >= eT(-1e-4)) ) ) { use_layout_C = true; break; } if( (val >= eT(+10)) || ( (is_signed::value == true) && (val <= eT(-10)) ) ) { use_layout_B = true; } } if(use_layout_C) { o.setf(ios::scientific); o.setf(ios::right); o.unsetf(ios::fixed); o.precision(4); cell_width = 13; } else if(use_layout_B) { o.unsetf(ios::scientific); o.setf(ios::right); o.setf(ios::fixed); o.precision(4); cell_width = 10; } else { o.unsetf(ios::scientific); o.setf(ios::right); o.setf(ios::fixed); o.precision(4); cell_width = 9; } return cell_width; } //! "better than nothing" settings for complex numbers template inline std::streamsize arma_ostream::modify_stream(std::ostream& o, typename SpMat::const_iterator begin, const uword n_elem, const typename arma_cx_only::result* junk) { arma_ignore(begin); arma_ignore(n_elem); arma_ignore(junk); o.unsetf(ios::showbase); o.unsetf(ios::uppercase); o.fill(' '); o.setf(ios::scientific); o.setf(ios::showpos); o.setf(ios::right); o.unsetf(ios::fixed); std::streamsize cell_width; o.precision(3); cell_width = 2 + 2*(1 + 3 + o.precision() + 5) + 1; return cell_width; } template inline void arma_ostream::print_elem_zero(std::ostream& o, const bool modify) { if(modify == true) { const std::streamsize orig_precision = o.precision(); o.precision(0); o << eT(0); o.precision(orig_precision); } else { o << eT(0); } } //! Print an element to the specified stream template arma_inline void arma_ostream::print_elem(std::ostream& o, const eT& x, const bool modify) { if(is_signed::value) { typedef typename promote_type::result promoted_eT; if(x != eT(0)) { if(arma_isfinite(x)) { o << promoted_eT(x); } else { o << ( arma_isinf(x) ? ((x <= eT(0)) ? "-inf" : "inf") : "nan" ); } } else { arma_ostream::print_elem_zero(o, modify); } } else { typedef typename promote_type::result promoted_eT; if(x != eT(0)) { o << promoted_eT(x); } else { arma_ostream::print_elem_zero(o, modify); } } } //! Print a complex element to the specified stream template inline void arma_ostream::print_elem(std::ostream& o, const std::complex& x, const bool modify) { if( (x.real() != T(0)) || (x.imag() != T(0)) || (modify == false) ) { std::ostringstream ss; ss.flags(o.flags()); //ss.imbue(o.getloc()); ss.precision(o.precision()); ss << '('; const T a = x.real(); if(arma_isfinite(a)) { ss << a; } else { ss << ( arma_isinf(a) ? ((a <= T(0)) ? "-inf" : "+inf") : "nan" ); } ss << ','; const T b = x.imag(); if(arma_isfinite(b)) { ss << b; } else { ss << ( arma_isinf(b) ? ((b <= T(0)) ? "-inf" : "+inf") : "nan" ); } ss << ')'; o << ss.str(); } else { o << "(0,0)"; } } //! Print a matrix to the specified stream template inline void arma_ostream::print(std::ostream& o, const Mat& m, const bool modify) { arma_extra_debug_sigprint(); const arma_ostream_state stream_state(o); const std::streamsize cell_width = modify ? arma_ostream::modify_stream(o, m.memptr(), m.n_elem) : o.width(); const uword m_n_rows = m.n_rows; const uword m_n_cols = m.n_cols; if(m.is_empty() == false) { if(m_n_cols > 0) { if(cell_width > 0) { for(uword row=0; row < m_n_rows; ++row) { for(uword col=0; col < m_n_cols; ++col) { // the cell width appears to be reset after each element is printed, // hence we need to restore it o.width(cell_width); arma_ostream::print_elem(o, m.at(row,col), modify); } o << '\n'; } } else { for(uword row=0; row < m_n_rows; ++row) { for(uword col=0; col < m_n_cols-1; ++col) { arma_ostream::print_elem(o, m.at(row,col), modify); o << ' '; } arma_ostream::print_elem(o, m.at(row, m_n_cols-1), modify); o << '\n'; } } } } else { o << "[matrix size: " << m_n_rows << 'x' << m_n_cols << "]\n"; } o.flush(); stream_state.restore(o); } //! Print a cube to the specified stream template inline void arma_ostream::print(std::ostream& o, const Cube& x, const bool modify) { arma_extra_debug_sigprint(); const arma_ostream_state stream_state(o); const std::streamsize cell_width = modify ? arma_ostream::modify_stream(o, x.memptr(), x.n_elem) : o.width(); if(x.is_empty() == false) { for(uword slice=0; slice < x.n_slices; ++slice) { o << "[cube slice " << slice << ']' << '\n'; o.width(cell_width); arma_ostream::print(o, x.slice(slice), false); o << '\n'; } } else { o << "[cube size: " << x.n_rows << 'x' << x.n_cols << 'x' << x.n_slices << "]\n"; } stream_state.restore(o); } //! Print a field to the specified stream //! Assumes type oT can be printed, i.e. oT has std::ostream& operator<< (std::ostream&, const oT&) template inline void arma_ostream::print(std::ostream& o, const field& x) { arma_extra_debug_sigprint(); const arma_ostream_state stream_state(o); const std::streamsize cell_width = o.width(); const uword x_n_rows = x.n_rows; const uword x_n_cols = x.n_cols; const uword x_n_slices = x.n_slices; if(x.is_empty() == false) { if(x_n_slices == 1) { for(uword col=0; col inline void arma_ostream::print(std::ostream& o, const subview_field& x) { arma_extra_debug_sigprint(); const arma_ostream_state stream_state(o); const std::streamsize cell_width = o.width(); const uword x_n_rows = x.n_rows; const uword x_n_cols = x.n_cols; const uword x_n_slices = x.n_slices; if(x_n_slices == 1) { for(uword col=0; col inline void arma_ostream::print_dense(std::ostream& o, const SpMat& m, const bool modify) { arma_extra_debug_sigprint(); const arma_ostream_state stream_state(o); const uword m_n_rows = m.n_rows; const uword m_n_cols = m.n_cols; if(m.n_nonzero > 0) { const std::streamsize cell_width = modify ? modify_stream(o, m.begin(), m.n_nonzero) : o.width(); typename SpMat::const_iterator begin = m.begin(); if(m_n_cols > 0) { if(cell_width > 0) { // An efficient row_iterator would make this simpler and faster for(uword row=0; row < m_n_rows; ++row) { for(uword col=0; col < m_n_cols; ++col) { // the cell width appears to be reset after each element is printed, // hence we need to restore it o.width(cell_width); eT val = eT(0); for(typename SpMat::const_iterator it = begin; it.pos() < m.n_nonzero; ++it) { if(it.row() == row && it.col() == col) { val = *it; break; } } arma_ostream::print_elem(o,eT(val), modify); } o << '\n'; } } else { // An efficient row_iterator would make this simpler and faster for(uword row=0; row < m_n_rows; ++row) { for(uword col=0; col < m_n_cols; ++col) { eT val = eT(0); for(typename SpMat::const_iterator it = begin; it.pos() < m.n_nonzero; ++it) { if(it.row() == row && it.col() == col) { val = *it; break; } } arma_ostream::print_elem(o,eT(val), modify); o << ' '; } o << '\n'; } } } } else { if(m.n_elem == 0) { o << "[matrix size: " << m_n_rows << 'x' << m_n_cols << "]\n"; } else { eT tmp[1]; tmp[0] = eT(0); const std::streamsize cell_width = modify ? arma_ostream::modify_stream(o, &tmp[0], 1) : o.width(); for(uword row=0; row < m_n_rows; ++row) { for(uword col=0; col < m_n_cols; ++col) { o.width(cell_width); arma_ostream::print_elem_zero(o, modify); o << ' '; } o << '\n'; } } } o.flush(); stream_state.restore(o); } template inline void arma_ostream::print(std::ostream& o, const SpMat& m, const bool modify) { arma_extra_debug_sigprint(); const arma_ostream_state stream_state(o); o.unsetf(ios::showbase); o.unsetf(ios::uppercase); o.unsetf(ios::showpos); o.unsetf(ios::scientific); o.setf(ios::right); o.setf(ios::fixed); o.precision(2); const uword m_n_nonzero = m.n_nonzero; o << "[matrix size: " << m.n_rows << 'x' << m.n_cols << "; n_nonzero: " << m_n_nonzero << "; density: " << ((m.n_elem > 0) ? (double(m_n_nonzero) / double(m.n_elem) * double(100)) : double(0)) << "%]\n\n"; if(modify == false) { stream_state.restore(o); } if(m_n_nonzero > 0) { const std::streamsize cell_width = modify ? modify_stream(o, m.begin(), m_n_nonzero) : o.width(); typename SpMat::const_iterator begin = m.begin(); typename SpMat::const_iterator m_end = m.end(); while(begin != m_end) { const uword row = begin.row(); // TODO: change the maximum number of spaces before and after each location to be dependent on n_rows and n_cols if(row < 10) { o << " "; } else if(row < 100) { o << " "; } else if(row < 1000) { o << " "; } else if(row < 10000) { o << " "; } else if(row < 100000) { o << ' '; } const uword col = begin.col(); o << '(' << row << ", " << col << ") "; if(col < 10) { o << " "; } else if(col < 100) { o << " "; } else if(col < 1000) { o << " "; } else if(col < 10000) { o << " "; } else if(col < 100000) { o << ' '; } if(cell_width > 0) { o.width(cell_width); } arma_ostream::print_elem(o, eT(*begin), modify); o << '\n'; ++begin; } o << '\n'; } o.flush(); stream_state.restore(o); } inline void arma_ostream::print(std::ostream& o, const SizeMat& S) { arma_extra_debug_sigprint(); const arma_ostream_state stream_state(o); o.unsetf(ios::showbase); o.unsetf(ios::uppercase); o.unsetf(ios::showpos); o.setf(ios::fixed); o << S.n_rows << 'x' << S.n_cols; stream_state.restore(o); } inline void arma_ostream::print(std::ostream& o, const SizeCube& S) { arma_extra_debug_sigprint(); const arma_ostream_state stream_state(o); o.unsetf(ios::showbase); o.unsetf(ios::uppercase); o.unsetf(ios::showpos); o.setf(ios::fixed); o << S.n_rows << 'x' << S.n_cols << 'x' << S.n_slices; stream_state.restore(o); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/arma_rng.hpp ================================================ // Copyright (C) 2013-2015 Conrad Sanderson // Copyright (C) 2013-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup arma_rng //! @{ #if defined(ARMA_RNG_ALT) #undef ARMA_USE_EXTERN_CXX11_RNG #endif #if !defined(ARMA_USE_CXX11) #undef ARMA_USE_EXTERN_CXX11_RNG #endif #if defined(ARMA_USE_EXTERN_CXX11_RNG) extern thread_local arma_rng_cxx11 arma_rng_cxx11_instance; // namespace { thread_local arma_rng_cxx11 arma_rng_cxx11_instance; } #endif class arma_rng { public: #if defined(ARMA_RNG_ALT) typedef arma_rng_alt::seed_type seed_type; #elif defined(ARMA_USE_EXTERN_CXX11_RNG) typedef arma_rng_cxx11::seed_type seed_type; #else typedef arma_rng_cxx98::seed_type seed_type; #endif #if defined(ARMA_RNG_ALT) static const int rng_method = 2; #elif defined(ARMA_USE_EXTERN_CXX11_RNG) static const int rng_method = 1; #else static const int rng_method = 0; #endif inline static void set_seed(const seed_type val); inline static void set_seed_random(); template struct randi; template struct randu; template struct randn; }; inline void arma_rng::set_seed(const arma_rng::seed_type val) { #if defined(ARMA_RNG_ALT) { arma_rng_alt::set_seed(val); } #elif defined(ARMA_USE_EXTERN_CXX11_RNG) { arma_rng_cxx11_instance.set_seed(val); } #else { arma_rng_cxx98::set_seed(val); } #endif } inline void arma_rng::set_seed_random() { seed_type seed1 = seed_type(0); seed_type seed2 = seed_type(0); seed_type seed3 = seed_type(0); seed_type seed4 = seed_type(0); seed_type seed5 = seed_type(0); bool have_seed = false; #if defined(ARMA_USE_CXX11) { try { std::random_device rd; if(rd.entropy() > double(0)) { seed1 = static_cast( rd() ); } if(seed1 != seed_type(0)) { have_seed = true; } } catch(...) {} } #endif if(have_seed == false) { try { union { seed_type a; unsigned char b[sizeof(seed_type)]; } tmp; tmp.a = seed_type(0); std::ifstream f("/dev/urandom", std::ifstream::binary); if(f.good()) { f.read((char*)(&(tmp.b[0])), sizeof(seed_type)); } if(f.good()) { seed2 = tmp.a; if(seed2 != seed_type(0)) { have_seed = true; } } } catch(...) {} } if(have_seed == false) { // get better-than-nothing seeds in case reading /dev/urandom failed #if defined(ARMA_HAVE_GETTIMEOFDAY) { struct timeval posix_time; gettimeofday(&posix_time, 0); seed3 = static_cast(posix_time.tv_usec); } #endif seed4 = static_cast( std::time(NULL) & 0xFFFF ); union { uword* a; unsigned char b[sizeof(uword*)]; } tmp; tmp.a = (uword*)malloc(sizeof(uword)); if(tmp.a != NULL) { for(size_t i=0; i struct arma_rng::randi { arma_inline operator eT () { #if defined(ARMA_RNG_ALT) { return eT( arma_rng_alt::randi_val() ); } #elif defined(ARMA_USE_EXTERN_CXX11_RNG) { return eT( arma_rng_cxx11_instance.randi_val() ); } #else { return eT( arma_rng_cxx98::randi_val() ); } #endif } inline static int max_val() { #if defined(ARMA_RNG_ALT) { return arma_rng_alt::randi_max_val(); } #elif defined(ARMA_USE_EXTERN_CXX11_RNG) { return arma_rng_cxx11::randi_max_val(); } #else { return arma_rng_cxx98::randi_max_val(); } #endif } inline static void fill(eT* mem, const uword N, const int a, const int b) { #if defined(ARMA_RNG_ALT) { return arma_rng_alt::randi_fill(mem, N, a, b); } #elif defined(ARMA_USE_EXTERN_CXX11_RNG) { return arma_rng_cxx11_instance.randi_fill(mem, N, a, b); } #else { return arma_rng_cxx98::randi_fill(mem, N, a, b); } #endif } }; template struct arma_rng::randu { arma_inline operator eT () { #if defined(ARMA_RNG_ALT) { return eT( arma_rng_alt::randu_val() ); } #elif defined(ARMA_USE_EXTERN_CXX11_RNG) { return eT( arma_rng_cxx11_instance.randu_val() ); } #else { return eT( arma_rng_cxx98::randu_val() ); } #endif } inline static void fill(eT* mem, const uword N) { uword i,j; for(i=0, j=1; j < N; i+=2, j+=2) { const eT tmp_i = eT( arma_rng::randu() ); const eT tmp_j = eT( arma_rng::randu() ); mem[i] = tmp_i; mem[j] = tmp_j; } if(i < N) { mem[i] = eT( arma_rng::randu() ); } } }; template struct arma_rng::randu< std::complex > { arma_inline operator std::complex () { const T a = T( arma_rng::randu() ); const T b = T( arma_rng::randu() ); return std::complex(a, b); } inline static void fill(std::complex* mem, const uword N) { for(uword i=0; i < N; ++i) { const T a = T( arma_rng::randu() ); const T b = T( arma_rng::randu() ); mem[i] = std::complex(a, b); } } }; template struct arma_rng::randn { inline operator eT () const { #if defined(ARMA_RNG_ALT) { return eT( arma_rng_alt::randn_val() ); } #elif defined(ARMA_USE_EXTERN_CXX11_RNG) { return eT( arma_rng_cxx11_instance.randn_val() ); } #else { return eT( arma_rng_cxx98::randn_val() ); } #endif } arma_inline static void dual_val(eT& out1, eT& out2) { #if defined(ARMA_RNG_ALT) { arma_rng_alt::randn_dual_val(out1, out2); } #elif defined(ARMA_USE_EXTERN_CXX11_RNG) { arma_rng_cxx11_instance.randn_dual_val(out1, out2); } #else { arma_rng_cxx98::randn_dual_val(out1, out2); } #endif } inline static void fill(eT* mem, const uword N) { uword i, j; for(i=0, j=1; j < N; i+=2, j+=2) { arma_rng::randn::dual_val( mem[i], mem[j] ); } if(i < N) { mem[i] = eT( arma_rng::randn() ); } } }; template struct arma_rng::randn< std::complex > { inline operator std::complex () const { T a, b; arma_rng::randn::dual_val(a, b); return std::complex(a, b); } inline static void fill(std::complex* mem, const uword N) { for(uword i=0; i < N; ++i) { mem[i] = std::complex( arma_rng::randn< std::complex >() ); } } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/arma_rng_cxx11.hpp ================================================ // Copyright (C) 2013-2015 Conrad Sanderson // Copyright (C) 2013-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup arma_rng_cxx11 //! @{ #if defined(ARMA_USE_CXX11) class arma_rng_cxx11 { public: typedef std::mt19937_64::result_type seed_type; inline void set_seed(const seed_type val); arma_inline int randi_val(); arma_inline double randu_val(); arma_inline double randn_val(); template arma_inline void randn_dual_val(eT& out1, eT& out2); template inline void randi_fill(eT* mem, const uword N, const int a, const int b); inline static int randi_max_val(); template inline void randg_fill(eT* mem, const uword N, const double a, const double b); private: arma_aligned std::mt19937_64 engine; // typedef for std::mersenne_twister_engine with preset parameters arma_aligned std::uniform_int_distribution i_distr; // by default uses a=0, b=std::numeric_limits::max() arma_aligned std::uniform_real_distribution u_distr; // by default uses [0,1) interval arma_aligned std::normal_distribution n_distr; // by default uses mean=0.0 and stddev=1.0 }; inline void arma_rng_cxx11::set_seed(const arma_rng_cxx11::seed_type val) { engine.seed(val); } arma_inline int arma_rng_cxx11::randi_val() { return i_distr(engine); } arma_inline double arma_rng_cxx11::randu_val() { return u_distr(engine); } arma_inline double arma_rng_cxx11::randn_val() { return n_distr(engine); } template arma_inline void arma_rng_cxx11::randn_dual_val(eT& out1, eT& out2) { out1 = eT( n_distr(engine) ); out2 = eT( n_distr(engine) ); } template inline void arma_rng_cxx11::randi_fill(eT* mem, const uword N, const int a, const int b) { std::uniform_int_distribution i_distr(a, b); for(uword i=0; i::max(); } template inline void arma_rng_cxx11::randg_fill(eT* mem, const uword N, const double a, const double b) { std::gamma_distribution g_distr(a,b); for(uword i=0; i inline static void randn_dual_val(eT& out1, eT& out2); template inline static void randi_fill(eT* mem, const uword N, const int a, const int b); inline static int randi_max_val(); }; inline void arma_rng_cxx98::set_seed(const arma_rng_cxx98::seed_type val) { std::srand(val); } arma_inline int arma_rng_cxx98::randi_val() { #if (RAND_MAX == 32767) { u32 val1 = u32(std::rand()); u32 val2 = u32(std::rand()); val1 <<= 15; return (val1 | val2); } #else { return std::rand(); } #endif } arma_inline double arma_rng_cxx98::randu_val() { return double( double(randi_val()) * ( double(1) / double(randi_max_val()) ) ); } inline double arma_rng_cxx98::randn_val() { // polar form of the Box-Muller transformation: // http://en.wikipedia.org/wiki/Box-Muller_transformation // http://en.wikipedia.org/wiki/Marsaglia_polar_method double tmp1; double tmp2; double w; do { tmp1 = double(2) * double(randi_val()) * (double(1) / double(randi_max_val())) - double(1); tmp2 = double(2) * double(randi_val()) * (double(1) / double(randi_max_val())) - double(1); w = tmp1*tmp1 + tmp2*tmp2; } while ( w >= double(1) ); return double( tmp1 * std::sqrt( (double(-2) * std::log(w)) / w) ); } template inline void arma_rng_cxx98::randn_dual_val(eT& out1, eT& out2) { // make sure we are internally using at least floats typedef typename promote_type::result eTp; eTp tmp1; eTp tmp2; eTp w; do { tmp1 = eTp(2) * eTp(randi_val()) * (eTp(1) / eTp(randi_max_val())) - eTp(1); tmp2 = eTp(2) * eTp(randi_val()) * (eTp(1) / eTp(randi_max_val())) - eTp(1); w = tmp1*tmp1 + tmp2*tmp2; } while ( w >= eTp(1) ); const eTp k = std::sqrt( (eTp(-2) * std::log(w)) / w); out1 = eT(tmp1*k); out2 = eT(tmp2*k); } template inline void arma_rng_cxx98::randi_fill(eT* mem, const uword N, const int a, const int b) { if( (a == 0) && (b == RAND_MAX) ) { for(uword i=0; i struct arma_type_check_cxx1998 { arma_inline static void apply() { static const char junk[ ERROR___INCORRECT_OR_UNSUPPORTED_TYPE ? -1 : +1 ]; } }; template<> struct arma_type_check_cxx1998 { arma_inline static void apply() { } }; #if defined(ARMA_USE_CXX11) #define arma_static_check(condition, message) static_assert( !(condition), #message ) #define arma_type_check(condition) static_assert( !(condition), "error: incorrect or unsupported type" ) #else #define arma_static_check(condition, message) static const char message[ (condition) ? -1 : +1 ] #define arma_type_check(condition) arma_type_check_cxx1998::apply() #endif //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/arma_version.hpp ================================================ // Copyright (C) 2009-2015 Conrad Sanderson // Copyright (C) 2009-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup arma_version //! @{ #define ARMA_VERSION_MAJOR 5 #define ARMA_VERSION_MINOR 300 #define ARMA_VERSION_PATCH 4 #define ARMA_VERSION_NAME "Plutocracy Incorporated" struct arma_version { static const unsigned int major = ARMA_VERSION_MAJOR; static const unsigned int minor = ARMA_VERSION_MINOR; static const unsigned int patch = ARMA_VERSION_PATCH; static inline std::string as_string() { const char* nickname = ARMA_VERSION_NAME; std::stringstream ss; ss << arma_version::major << '.' << arma_version::minor << '.' << arma_version::patch << " (" << nickname << ')'; return ss.str(); } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/arpack_bones.hpp ================================================ // Copyright (C) 2013 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifdef ARMA_USE_ARPACK // I'm not sure this is necessary. #if !defined(ARMA_BLAS_CAPITALS) #define arma_snaupd snaupd #define arma_dnaupd dnaupd #define arma_cnaupd cnaupd #define arma_znaupd znaupd #define arma_sneupd sneupd #define arma_dneupd dneupd #define arma_cneupd cneupd #define arma_zneupd zneupd #define arma_ssaupd ssaupd #define arma_dsaupd dsaupd #define arma_sseupd sseupd #define arma_dseupd dseupd #else #define arma_snaupd SNAUPD #define arma_dnaupd DNAUPD #define arma_cnaupd CNAUPD #define arma_znaupd ZNAUPD #define arma_sneupd SNEUPD #define arma_dneupd DNEUPD #define arma_cneupd CNEUPD #define arma_zneupd ZNEUPD #define arma_ssaupd SSAUPD #define arma_dsaupd DSAUPD #define arma_sseupd SSEUPD #define arma_dseupd DSEUPD #endif extern "C" { // eigendecomposition of non-symmetric positive semi-definite matrices void arma_fortran(arma_snaupd)(blas_int* ido, char* bmat, blas_int* n, char* which, blas_int* nev, float* tol, float* resid, blas_int* ncv, float* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, float* workd, float* workl, blas_int* lworkl, blas_int* info); void arma_fortran(arma_dnaupd)(blas_int* ido, char* bmat, blas_int* n, char* which, blas_int* nev, double* tol, double* resid, blas_int* ncv, double* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, double* workd, double* workl, blas_int* lworkl, blas_int* info); void arma_fortran(arma_cnaupd)(blas_int* ido, char* bmat, blas_int* n, char* which, blas_int* nev, float* tol, void* resid, blas_int* ncv, void* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, void* workd, void* workl, blas_int* lworkl, float* rwork, blas_int* info); void arma_fortran(arma_znaupd)(blas_int* ido, char* bmat, blas_int* n, char* which, blas_int* nev, double* tol, void* resid, blas_int* ncv, void* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, void* workd, void* workl, blas_int* lworkl, double* rwork, blas_int* info); // eigendecomposition of symmetric positive semi-definite matrices void arma_fortran(arma_ssaupd)(blas_int* ido, char* bmat, blas_int* n, char* which, blas_int* nev, float* tol, float* resid, blas_int* ncv, float* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, float* workd, float* workl, blas_int* lworkl, blas_int* info); void arma_fortran(arma_dsaupd)(blas_int* ido, char* bmat, blas_int* n, char* which, blas_int* nev, double* tol, double* resid, blas_int* ncv, double* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, double* workd, double* workl, blas_int* lworkl, blas_int* info); // recovery of eigenvectors after naupd(); uses blas_int for LOGICAL types void arma_fortran(arma_sneupd)(blas_int* rvec, char* howmny, blas_int* select, float* dr, float* di, float* z, blas_int* ldz, float* sigmar, float* sigmai, float* workev, char* bmat, blas_int* n, char* which, blas_int* nev, float* tol, float* resid, blas_int* ncv, float* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, float* workd, float* workl, blas_int* lworkl, blas_int* info); void arma_fortran(arma_dneupd)(blas_int* rvec, char* howmny, blas_int* select, double* dr, double* di, double* z, blas_int* ldz, double* sigmar, double* sigmai, double* workev, char* bmat, blas_int* n, char* which, blas_int* nev, double* tol, double* resid, blas_int* ncv, double* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, double* workd, double* workl, blas_int* lworkl, blas_int* info); void arma_fortran(arma_cneupd)(blas_int* rvec, char* howmny, blas_int* select, void* d, void* z, blas_int* ldz, void* sigma, void* workev, char* bmat, blas_int* n, char* which, blas_int* nev, float* tol, void* resid, blas_int* ncv, void* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, void* workd, void* workl, blas_int* lworkl, float* rwork, blas_int* info); void arma_fortran(arma_zneupd)(blas_int* rvec, char* howmny, blas_int* select, void* d, void* z, blas_int* ldz, void* sigma, void* workev, char* bmat, blas_int* n, char* which, blas_int* nev, double* tol, void* resid, blas_int* ncv, void* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, void* workd, void* workl, blas_int* lworkl, double* rwork, blas_int* info); // recovery of eigenvectors after saupd(); uses blas_int for LOGICAL types void arma_fortran(arma_sseupd)(blas_int* rvec, char* howmny, blas_int* select, float* d, float* z, blas_int* ldz, float* sigma, char* bmat, blas_int* n, char* which, blas_int* nev, float* tol, float* resid, blas_int* ncv, float* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, float* workd, float* workl, blas_int* lworkl, blas_int* info); void arma_fortran(arma_dseupd)(blas_int* rvec, char* howmny, blas_int* select, double* d, double* z, blas_int* ldz, double* sigma, char* bmat, blas_int* n, char* which, blas_int* nev, double* tol, double* resid, blas_int* ncv, double* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, double* workd, double* workl, blas_int* lworkl, blas_int* info); } #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/arpack_wrapper.hpp ================================================ // Copyright (C) 2013 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifdef ARMA_USE_ARPACK //! \namespace arpack namespace for ARPACK functions namespace arpack { // If real, then eT == eeT; otherwise, eT == std::complex. // For real calls, rwork is ignored; it's only necessary in the complex case. template inline void naupd(blas_int* ido, char* bmat, blas_int* n, char* which, blas_int* nev, eeT* tol, eT* resid, blas_int* ncv, eT* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, eT* workd, eT* workl, blas_int* lworkl, eeT* rwork, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_snaupd)(ido, bmat, n, which, nev, (T*) tol, (T*) resid, ncv, (T*) v, ldv, iparam, ipntr, (T*) workd, (T*) workl, lworkl, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dnaupd)(ido, bmat, n, which, nev, (T*) tol, (T*) resid, ncv, (T*) v, ldv, iparam, ipntr, (T*) workd, (T*) workl, lworkl, info); } else if(is_supported_complex_float::value) { typedef std::complex T; typedef float xT; arma_fortran(arma_cnaupd)(ido, bmat, n, which, nev, (xT*) tol, (T*) resid, ncv, (T*) v, ldv, iparam, ipntr, (T*) workd, (T*) workl, lworkl, (xT*) rwork, info); } else if(is_supported_complex_double::value) { typedef std::complex T; typedef double xT; arma_fortran(arma_znaupd)(ido, bmat, n, which, nev, (xT*) tol, (T*) resid, ncv, (T*) v, ldv, iparam, ipntr, (T*) workd, (T*) workl, lworkl, (xT*) rwork, info); } } //! The use of two template types is necessary here because the compiler will //! instantiate this method for complex types (where eT != eeT) but that in //! practice that is never actually used. template inline void saupd(blas_int* ido, char* bmat, blas_int* n, char* which, blas_int* nev, eeT* tol, eT* resid, blas_int* ncv, eT* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, eT* workd, eT* workl, blas_int* lworkl, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_ssaupd)(ido, bmat, n, which, nev, (T*) tol, (T*) resid, ncv, (T*) v, ldv, iparam, ipntr, (T*) workd, (T*) workl, lworkl, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dsaupd)(ido, bmat, n, which, nev, (T*) tol, (T*) resid, ncv, (T*) v, ldv, iparam, ipntr, (T*) workd, (T*) workl, lworkl, info); } } template inline void seupd(blas_int* rvec, char* howmny, blas_int* select, eT* d, eT* z, blas_int* ldz, eT* sigma, char* bmat, blas_int* n, char* which, blas_int* nev, eT* tol, eT* resid, blas_int* ncv, eT* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, eT* workd, eT* workl, blas_int* lworkl, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_sseupd)(rvec, howmny, select, (T*) d, (T*) z, ldz, (T*) sigma, bmat, n, which, nev, (T*) tol, (T*) resid, ncv, (T*) v, ldv, iparam, ipntr, (T*) workd, (T*) workl, lworkl, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dseupd)(rvec, howmny, select, (T*) d, (T*) z, ldz, (T*) sigma, bmat, n, which, nev, (T*) tol, (T*) resid, ncv, (T*) v, ldv, iparam, ipntr, (T*) workd, (T*) workl, lworkl, info); } } // for complex versions, pass d for dr, and null for di; pass sigma for // sigmar, and null for sigmai; rwork isn't used for non-complex versions template inline void neupd(blas_int* rvec, char* howmny, blas_int* select, eT* dr, eT* di, eT* z, blas_int* ldz, eT* sigmar, eT* sigmai, eT* workev, char* bmat, blas_int* n, char* which, blas_int* nev, eeT* tol, eT* resid, blas_int* ncv, eT* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, eT* workd, eT* workl, blas_int* lworkl, eeT* rwork, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_sneupd)(rvec, howmny, select, (T*) dr, (T*) di, (T*) z, ldz, (T*) sigmar, (T*) sigmai, (T*) workev, bmat, n, which, nev, (T*) tol, (T*) resid, ncv, (T*) v, ldv, iparam, ipntr, (T*) workd, (T*) workl, lworkl, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dneupd)(rvec, howmny, select, (T*) dr, (T*) di, (T*) z, ldz, (T*) sigmar, (T*) sigmai, (T*) workev, bmat, n, which, nev, (T*) tol, (T*) resid, ncv, (T*) v, ldv, iparam, ipntr, (T*) workd, (T*) workl, lworkl, info); } else if(is_supported_complex_float::value) { typedef float xT; // eT is taken typedef std::complex T; arma_fortran(arma_cneupd)(rvec, howmny, select, (T*) dr, (T*) z, ldz, (T*) sigmar, (T*) workev, bmat, n, which, nev, (xT*) tol, (T*) resid, ncv, (T*) v, ldv, iparam, ipntr, (T*) workd, (T*) workl, lworkl, (xT*) rwork, info); } else if(is_supported_complex_double::value) { typedef double xT; // eT is taken typedef std::complex T; arma_fortran(arma_zneupd)(rvec, howmny, select, (T*) dr, (T*) z, ldz, (T*) sigmar, (T*) workev, bmat, n, which, nev, (xT*) tol, (T*) resid, ncv, (T*) v, ldv, iparam, ipntr, (T*) workd, (T*) workl, lworkl, (xT*) rwork, info); } } } // namespace arpack #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/arrayops_bones.hpp ================================================ // Copyright (C) 2011-2015 Conrad Sanderson // Copyright (C) 2011-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup arrayops //! @{ class arrayops { public: template arma_hot arma_inline static void copy(eT* dest, const eT* src, const uword n_elem); template arma_hot inline static void copy_small(eT* dest, const eT* src, const uword n_elem); template arma_hot inline static void copy_forwards(eT* dest, const eT* src, const uword n_elem); template arma_hot inline static void copy_backwards(eT* dest, const eT* src, const uword n_elem); template arma_hot inline static void fill_zeros(eT* dest, const uword n_elem); // // array = convert(array) template arma_hot arma_inline static void convert_cx_scalar(out_eT& out, const in_eT& in, const typename arma_not_cx::result* junk1 = 0, const typename arma_not_cx< in_eT>::result* junk2 = 0); template arma_hot arma_inline static void convert_cx_scalar(out_eT& out, const std::complex& in, const typename arma_not_cx::result* junk = 0); template arma_hot arma_inline static void convert_cx_scalar(std::complex& out, const std::complex< in_T>& in); template arma_hot inline static void convert(out_eT* dest, const in_eT* src, const uword n_elem); template arma_hot inline static void convert_cx(out_eT* dest, const in_eT* src, const uword n_elem); // // array op= array template arma_hot inline static void inplace_plus(eT* dest, const eT* src, const uword n_elem); template arma_hot inline static void inplace_minus(eT* dest, const eT* src, const uword n_elem); template arma_hot inline static void inplace_mul(eT* dest, const eT* src, const uword n_elem); template arma_hot inline static void inplace_div(eT* dest, const eT* src, const uword n_elem); template arma_hot inline static void inplace_plus_base(eT* dest, const eT* src, const uword n_elem); template arma_hot inline static void inplace_minus_base(eT* dest, const eT* src, const uword n_elem); template arma_hot inline static void inplace_mul_base(eT* dest, const eT* src, const uword n_elem); template arma_hot inline static void inplace_div_base(eT* dest, const eT* src, const uword n_elem); // // array op= scalar template arma_hot inline static void inplace_set(eT* dest, const eT val, const uword n_elem); template arma_hot inline static void inplace_set_base(eT* dest, const eT val, const uword n_elem); template arma_hot inline static void inplace_set_small(eT* dest, const eT val, const uword n_elem); template arma_hot inline static void inplace_set_fixed(eT* dest, const eT val); template arma_hot inline static void inplace_plus(eT* dest, const eT val, const uword n_elem); template arma_hot inline static void inplace_minus(eT* dest, const eT val, const uword n_elem); template arma_hot inline static void inplace_mul(eT* dest, const eT val, const uword n_elem); template arma_hot inline static void inplace_div(eT* dest, const eT val, const uword n_elem); template arma_hot inline static void inplace_plus_base(eT* dest, const eT val, const uword n_elem); template arma_hot inline static void inplace_minus_base(eT* dest, const eT val, const uword n_elem); template arma_hot inline static void inplace_mul_base(eT* dest, const eT val, const uword n_elem); template arma_hot inline static void inplace_div_base(eT* dest, const eT val, const uword n_elem); // // scalar = op(array) template arma_hot arma_pure inline static eT accumulate(const eT* src, const uword n_elem); template arma_hot arma_pure inline static eT product(const eT* src, const uword n_elem); template arma_hot arma_pure inline static bool is_finite(const eT* src, const uword n_elem); template arma_hot arma_pure inline static bool has_inf(const eT* src, const uword n_elem); template arma_hot arma_pure inline static bool has_nan(const eT* src, const uword n_elem); template arma_hot arma_pure inline static typename get_pod_type::result norm_1(const eT* src, const uword n_elem); template arma_hot arma_pure inline static eT norm_2(const eT* src, const uword n_elem, const typename arma_not_cx::result* junk = 0); template arma_hot arma_pure inline static T norm_2(const std::complex* src, const uword n_elem); template arma_hot arma_pure inline static typename get_pod_type::result norm_k(const eT* src, const uword n_elem, const int k); template arma_hot arma_pure inline static typename get_pod_type::result norm_max(const eT* src, const uword n_elem); template arma_hot arma_pure inline static typename get_pod_type::result norm_min(const eT* src, const uword n_elem); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/arrayops_meat.hpp ================================================ // Copyright (C) 2011-2015 Conrad Sanderson // Copyright (C) 2011-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup arrayops //! @{ template arma_hot arma_inline void arrayops::copy(eT* dest, const eT* src, const uword n_elem) { if( (n_elem <= 16) && (is_cx::no) ) { arrayops::copy_small(dest, src, n_elem); } else { std::memcpy(dest, src, n_elem*sizeof(eT)); } } template arma_hot inline void arrayops::copy_small(eT* dest, const eT* src, const uword n_elem) { switch(n_elem) { case 16: dest[15] = src[15]; case 15: dest[14] = src[14]; case 14: dest[13] = src[13]; case 13: dest[12] = src[12]; case 12: dest[11] = src[11]; case 11: dest[10] = src[10]; case 10: dest[ 9] = src[ 9]; case 9: dest[ 8] = src[ 8]; case 8: dest[ 7] = src[ 7]; case 7: dest[ 6] = src[ 6]; case 6: dest[ 5] = src[ 5]; case 5: dest[ 4] = src[ 4]; case 4: dest[ 3] = src[ 3]; case 3: dest[ 2] = src[ 2]; case 2: dest[ 1] = src[ 1]; case 1: dest[ 0] = src[ 0]; default: ; } } template arma_hot inline void arrayops::copy_forwards(eT* dest, const eT* src, const uword n_elem) { // can't use std::memcpy(), as we don't know how it copies data uword j; for(j=1; j < n_elem; j+=2) { const eT tmp_i = (*src); src++; const eT tmp_j = (*src); src++; (*dest) = tmp_i; dest++; (*dest) = tmp_j; dest++; } if((j-1) < n_elem) { (*dest) = (*src); } } template arma_hot inline void arrayops::copy_backwards(eT* dest, const eT* src, const uword n_elem) { // can't use std::memcpy(), as we don't know how it copies data // for(uword i=0; i < n_elem; ++i) // { // const uword j = n_elem-i-1; // // dest[j] = src[j]; // } if(n_elem > 0) { eT* dest_it = &(dest[n_elem-1]); const eT* src_it = &( src[n_elem-1]); uword j; for(j=1; j < n_elem; j+=2) { const eT tmp_i = (*src_it); src_it--; const eT tmp_j = (*src_it); src_it--; (*dest_it) = tmp_i; dest_it--; (*dest_it) = tmp_j; dest_it--; } if((j-1) < n_elem) { (*dest_it) = (*src_it); } } } template arma_hot inline void arrayops::fill_zeros(eT* dest, const uword n_elem) { arrayops::inplace_set(dest, eT(0), n_elem); } template arma_hot arma_inline void arrayops::convert_cx_scalar ( out_eT& out, const in_eT& in, const typename arma_not_cx::result* junk1, const typename arma_not_cx< in_eT>::result* junk2 ) { arma_ignore(junk1); arma_ignore(junk2); out = out_eT(in); } template arma_hot arma_inline void arrayops::convert_cx_scalar ( out_eT& out, const std::complex& in, const typename arma_not_cx::result* junk ) { arma_ignore(junk); out = out_eT( in.real() ); } template arma_hot arma_inline void arrayops::convert_cx_scalar ( std::complex& out, const std::complex< in_T>& in ) { typedef std::complex out_eT; out = out_eT(in); } template arma_hot inline void arrayops::convert(out_eT* dest, const in_eT* src, const uword n_elem) { if(is_same_type::value) { const out_eT* src2 = (const out_eT*)src; if(dest != src2) { arrayops::copy(dest, src2, n_elem); } return; } uword j; for(j=1; j::value) ? out_eT( tmp_i ) : ( cond_rel< is_signed::value >::lt(tmp_i, in_eT(0)) ? out_eT(0) : out_eT(tmp_i) ); dest++; (*dest) = (is_signed::value) ? out_eT( tmp_j ) : ( cond_rel< is_signed::value >::lt(tmp_j, in_eT(0)) ? out_eT(0) : out_eT(tmp_j) ); dest++; } if((j-1) < n_elem) { const in_eT tmp_i = (*src); // dest[i] = out_eT( tmp_i ); (*dest) = (is_signed::value) ? out_eT( tmp_i ) : ( cond_rel< is_signed::value >::lt(tmp_i, in_eT(0)) ? out_eT(0) : out_eT(tmp_i) ); } } template arma_hot inline void arrayops::convert_cx(out_eT* dest, const in_eT* src, const uword n_elem) { uword j; for(j=1; j arma_hot inline void arrayops::inplace_plus(eT* dest, const eT* src, const uword n_elem) { if(memory::is_aligned(dest)) { memory::mark_as_aligned(dest); if(memory::is_aligned(src)) { memory::mark_as_aligned(src); arrayops::inplace_plus_base(dest, src, n_elem); } else { arrayops::inplace_plus_base(dest, src, n_elem); } } else { if(memory::is_aligned(src)) { memory::mark_as_aligned(src); arrayops::inplace_plus_base(dest, src, n_elem); } else { arrayops::inplace_plus_base(dest, src, n_elem); } } } template arma_hot inline void arrayops::inplace_minus(eT* dest, const eT* src, const uword n_elem) { if(memory::is_aligned(dest)) { memory::mark_as_aligned(dest); if(memory::is_aligned(src)) { memory::mark_as_aligned(src); arrayops::inplace_minus_base(dest, src, n_elem); } else { arrayops::inplace_minus_base(dest, src, n_elem); } } else { if(memory::is_aligned(src)) { memory::mark_as_aligned(src); arrayops::inplace_minus_base(dest, src, n_elem); } else { arrayops::inplace_minus_base(dest, src, n_elem); } } } template arma_hot inline void arrayops::inplace_mul(eT* dest, const eT* src, const uword n_elem) { if(memory::is_aligned(dest)) { memory::mark_as_aligned(dest); if(memory::is_aligned(src)) { memory::mark_as_aligned(src); arrayops::inplace_mul_base(dest, src, n_elem); } else { arrayops::inplace_mul_base(dest, src, n_elem); } } else { if(memory::is_aligned(src)) { memory::mark_as_aligned(src); arrayops::inplace_mul_base(dest, src, n_elem); } else { arrayops::inplace_mul_base(dest, src, n_elem); } } } template arma_hot inline void arrayops::inplace_div(eT* dest, const eT* src, const uword n_elem) { if(memory::is_aligned(dest)) { memory::mark_as_aligned(dest); if(memory::is_aligned(src)) { memory::mark_as_aligned(src); arrayops::inplace_div_base(dest, src, n_elem); } else { arrayops::inplace_div_base(dest, src, n_elem); } } else { if(memory::is_aligned(src)) { memory::mark_as_aligned(src); arrayops::inplace_div_base(dest, src, n_elem); } else { arrayops::inplace_div_base(dest, src, n_elem); } } } template arma_hot inline void arrayops::inplace_plus_base(eT* dest, const eT* src, const uword n_elem) { #if defined(ARMA_SIMPLE_LOOPS) { for(uword i=0; i arma_hot inline void arrayops::inplace_minus_base(eT* dest, const eT* src, const uword n_elem) { #if defined(ARMA_SIMPLE_LOOPS) { for(uword i=0; i arma_hot inline void arrayops::inplace_mul_base(eT* dest, const eT* src, const uword n_elem) { #if defined(ARMA_SIMPLE_LOOPS) { for(uword i=0; i arma_hot inline void arrayops::inplace_div_base(eT* dest, const eT* src, const uword n_elem) { #if defined(ARMA_SIMPLE_LOOPS) { for(uword i=0; i arma_hot inline void arrayops::inplace_set(eT* dest, const eT val, const uword n_elem) { typedef typename get_pod_type::result pod_type; if( (n_elem <= 16) && (is_cx::no) ) { arrayops::inplace_set_small(dest, val, n_elem); } else { if( (val == eT(0)) && (std::numeric_limits::is_integer || (std::numeric_limits::is_iec559 && is_real::value)) ) { std::memset(dest, 0, sizeof(eT)*n_elem); } else { if(memory::is_aligned(dest)) { memory::mark_as_aligned(dest); arrayops::inplace_set_base(dest, val, n_elem); } else { arrayops::inplace_set_base(dest, val, n_elem); } } } } template arma_hot inline void arrayops::inplace_set_base(eT* dest, const eT val, const uword n_elem) { #if defined(ARMA_SIMPLE_LOOPS) { for(uword i=0; i arma_hot inline void arrayops::inplace_set_small(eT* dest, const eT val, const uword n_elem) { switch(n_elem) { case 16: dest[15] = val; case 15: dest[14] = val; case 14: dest[13] = val; case 13: dest[12] = val; case 12: dest[11] = val; case 11: dest[10] = val; case 10: dest[ 9] = val; case 9: dest[ 8] = val; case 8: dest[ 7] = val; case 7: dest[ 6] = val; case 6: dest[ 5] = val; case 5: dest[ 4] = val; case 4: dest[ 3] = val; case 3: dest[ 2] = val; case 2: dest[ 1] = val; case 1: dest[ 0] = val; default:; } } template arma_hot inline void arrayops::inplace_set_fixed(eT* dest, const eT val) { for(uword i=0; i arma_hot inline void arrayops::inplace_plus(eT* dest, const eT val, const uword n_elem) { if(memory::is_aligned(dest)) { memory::mark_as_aligned(dest); arrayops::inplace_plus_base(dest, val, n_elem); } else { arrayops::inplace_plus_base(dest, val, n_elem); } } template arma_hot inline void arrayops::inplace_minus(eT* dest, const eT val, const uword n_elem) { if(memory::is_aligned(dest)) { memory::mark_as_aligned(dest); arrayops::inplace_minus_base(dest, val, n_elem); } else { arrayops::inplace_minus_base(dest, val, n_elem); } } template arma_hot inline void arrayops::inplace_mul(eT* dest, const eT val, const uword n_elem) { if(memory::is_aligned(dest)) { memory::mark_as_aligned(dest); arrayops::inplace_mul_base(dest, val, n_elem); } else { arrayops::inplace_mul_base(dest, val, n_elem); } } template arma_hot inline void arrayops::inplace_div(eT* dest, const eT val, const uword n_elem) { if(memory::is_aligned(dest)) { memory::mark_as_aligned(dest); arrayops::inplace_div_base(dest, val, n_elem); } else { arrayops::inplace_div_base(dest, val, n_elem); } } template arma_hot inline void arrayops::inplace_plus_base(eT* dest, const eT val, const uword n_elem) { #if defined(ARMA_SIMPLE_LOOPS) { for(uword i=0; i arma_hot inline void arrayops::inplace_minus_base(eT* dest, const eT val, const uword n_elem) { #if defined(ARMA_SIMPLE_LOOPS) { for(uword i=0; i arma_hot inline void arrayops::inplace_mul_base(eT* dest, const eT val, const uword n_elem) { #if defined(ARMA_SIMPLE_LOOPS) { for(uword i=0; i arma_hot inline void arrayops::inplace_div_base(eT* dest, const eT val, const uword n_elem) { #if defined(ARMA_SIMPLE_LOOPS) { for(uword i=0; i arma_hot arma_pure inline eT arrayops::accumulate(const eT* src, const uword n_elem) { #if defined(__FINITE_MATH_ONLY__) && (__FINITE_MATH_ONLY__ > 0) { eT acc = eT(0); if(memory::is_aligned(src)) { memory::mark_as_aligned(src); for(uword i=0; i arma_hot arma_pure inline eT arrayops::product(const eT* src, const uword n_elem) { eT val1 = eT(1); eT val2 = eT(1); uword i,j; for(i=0, j=1; j arma_hot arma_pure inline bool arrayops::is_finite(const eT* src, const uword n_elem) { uword j; for(j=1; j arma_hot arma_pure inline bool arrayops::has_inf(const eT* src, const uword n_elem) { uword j; for(j=1; j arma_hot arma_pure inline bool arrayops::has_nan(const eT* src, const uword n_elem) { uword j; for(j=1; j arma_hot arma_pure inline typename get_pod_type::result arrayops::norm_1(const eT* src, const uword n_elem) { typedef typename get_pod_type::result T; T acc = T(0); uword i,j; for(i=0, j=1; j arma_hot arma_pure inline eT arrayops::norm_2(const eT* src, const uword n_elem, const typename arma_not_cx::result* junk) { arma_ignore(junk); eT acc = eT(0); uword i,j; for(i=0, j=1; j arma_hot arma_pure inline T arrayops::norm_2(const std::complex* src, const uword n_elem) { T acc = T(0); uword i,j; for(i=0, j=1; j arma_hot arma_pure inline typename get_pod_type::result arrayops::norm_k(const eT* src, const uword n_elem, const int k) { typedef typename get_pod_type::result T; T acc = T(0); uword i,j; for(i=0, j=1; j arma_hot arma_pure inline typename get_pod_type::result arrayops::norm_max(const eT* src, const uword n_elem) { typedef typename get_pod_type::result T; T max_val = std::abs(src[0]); uword i,j; for(i=1, j=2; j arma_hot arma_pure inline typename get_pod_type::result arrayops::norm_min(const eT* src, const uword n_elem) { typedef typename get_pod_type::result T; T min_val = std::abs(src[0]); uword i,j; for(i=1, j=2; j tmp_i) { min_val = tmp_i; } if(min_val > tmp_j) { min_val = tmp_j; } } if(i < n_elem) { const T tmp_i = std::abs(src[i]); if(min_val > tmp_i) { min_val = tmp_i; } } return min_val; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/atlas_bones.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifdef ARMA_USE_ATLAS //! \namespace atlas namespace for ATLAS functions (imported from the global namespace) namespace atlas { using ::CblasColMajor; using ::CblasNoTrans; using ::CblasTrans; using ::CblasConjTrans; using ::CblasLower; using ::CblasUpper; #if defined(ARMA_USE_WRAPPER) extern "C" { float wrapper_cblas_sdot(const int N, const float *X, const int incX, const float *Y, const int incY); double wrapper_cblas_ddot(const int N, const double *X, const int incX, const double *Y, const int incY); void wrapper_cblas_cdotu_sub(const int N, const void *X, const int incX, const void *Y, const int incY, void *dotu); void wrapper_cblas_zdotu_sub(const int N, const void *X, const int incX, const void *Y, const int incY, void *dotu); void wrapper_cblas_sgemv(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const float alpha, const float *A, const int lda, const float *X, const int incX, const float beta, float *Y, const int incY); void wrapper_cblas_dgemv(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const double alpha, const double *A, const int lda, const double *X, const int incX, const double beta, double *Y, const int incY); void wrapper_cblas_cgemv(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const void *alpha, const void *A, const int lda, const void *X, const int incX, const void *beta, void *Y, const int incY); void wrapper_cblas_zgemv(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const void *alpha, const void *A, const int lda, const void *X, const int incX, const void *beta, void *Y, const int incY); void wrapper_cblas_sgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const float alpha, const float *A, const int lda, const float *B, const int ldb, const float beta, float *C, const int ldc); void wrapper_cblas_dgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const double alpha, const double *A, const int lda, const double *B, const int ldb, const double beta, double *C, const int ldc); void wrapper_cblas_cgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc); void wrapper_cblas_zgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc); void wrapper_cblas_ssyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const float alpha, const float *A, const int lda, const float beta, float *C, const int ldc); void wrapper_cblas_dsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const double alpha, const double *A, const int lda, const double beta, double *C, const int ldc); void wrapper_cblas_cherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const float alpha, const void *A, const int lda, const float beta, void *C, const int ldc); void wrapper_cblas_zherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const double alpha, const void *A, const int lda, const double beta, void *C, const int ldc); int wrapper_clapack_sgetrf(const enum CBLAS_ORDER Order, const int M, const int N, float *A, const int lda, int *ipiv); int wrapper_clapack_dgetrf(const enum CBLAS_ORDER Order, const int M, const int N, double *A, const int lda, int *ipiv); int wrapper_clapack_cgetrf(const enum CBLAS_ORDER Order, const int M, const int N, void *A, const int lda, int *ipiv); int wrapper_clapack_zgetrf(const enum CBLAS_ORDER Order, const int M, const int N, void *A, const int lda, int *ipiv); int wrapper_clapack_sgetri(const enum CBLAS_ORDER Order, const int N, float *A, const int lda, const int *ipiv); int wrapper_clapack_dgetri(const enum CBLAS_ORDER Order, const int N, double *A, const int lda, const int *ipiv); int wrapper_clapack_cgetri(const enum CBLAS_ORDER Order, const int N, void *A, const int lda, const int *ipiv); int wrapper_clapack_zgetri(const enum CBLAS_ORDER Order, const int N, void *A, const int lda, const int *ipiv); int wrapper_clapack_sgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS, float *A, const int lda, int *ipiv, float *B, const int ldb); int wrapper_clapack_dgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS, double *A, const int lda, int *ipiv, double *B, const int ldb); int wrapper_clapack_cgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS, void *A, const int lda, int *ipiv, void *B, const int ldb); int wrapper_clapack_zgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS, void *A, const int lda, int *ipiv, void *B, const int ldb); } #endif } #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/atlas_wrapper.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifdef ARMA_USE_ATLAS //! \namespace atlas namespace for ATLAS functions (imported from the global namespace) namespace atlas { template inline static const eT& tmp_real(const eT& X) { return X; } template inline static const T tmp_real(const std::complex& X) { return X.real(); } template arma_inline eT cblas_dot(const int N, const eT* X, const eT* Y) { arma_type_check((is_supported_blas_type::value == false)); if(is_float::value) { typedef float T; return eT( arma_wrapper(cblas_sdot)(N, (const T*)X, 1, (const T*)Y, 1) ); } else if(is_double::value) { typedef double T; return eT( arma_wrapper(cblas_ddot)(N, (const T*)X, 1, (const T*)Y, 1) ); } else { return eT(0); } } template arma_inline eT cx_cblas_dot(const int N, const eT* X, const eT* Y) { arma_type_check((is_supported_blas_type::value == false)); if(is_supported_complex_float::value) { typedef typename std::complex T; T out; arma_wrapper(cblas_cdotu_sub)(N, (const T*)X, 1, (const T*)Y, 1, &out); return eT(out); } else if(is_supported_complex_double::value) { typedef typename std::complex T; T out; arma_wrapper(cblas_zdotu_sub)(N, (const T*)X, 1, (const T*)Y, 1, &out); return eT(out); } else { return eT(0); } } template inline void cblas_gemv ( const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const eT alpha, const eT *A, const int lda, const eT *X, const int incX, const eT beta, eT *Y, const int incY ) { arma_type_check((is_supported_blas_type::value == false)); if(is_float::value) { typedef float T; arma_wrapper(cblas_sgemv)(Order, TransA, M, N, (const T)tmp_real(alpha), (const T*)A, lda, (const T*)X, incX, (const T)tmp_real(beta), (T*)Y, incY); } else if(is_double::value) { typedef double T; arma_wrapper(cblas_dgemv)(Order, TransA, M, N, (const T)tmp_real(alpha), (const T*)A, lda, (const T*)X, incX, (const T)tmp_real(beta), (T*)Y, incY); } else if(is_supported_complex_float::value) { typedef std::complex T; arma_wrapper(cblas_cgemv)(Order, TransA, M, N, (const T*)&alpha, (const T*)A, lda, (const T*)X, incX, (const T*)&beta, (T*)Y, incY); } else if(is_supported_complex_double::value) { typedef std::complex T; arma_wrapper(cblas_zgemv)(Order, TransA, M, N, (const T*)&alpha, (const T*)A, lda, (const T*)X, incX, (const T*)&beta, (T*)Y, incY); } } template inline void cblas_gemm ( const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const eT alpha, const eT *A, const int lda, const eT *B, const int ldb, const eT beta, eT *C, const int ldc ) { arma_type_check((is_supported_blas_type::value == false)); if(is_float::value) { typedef float T; arma_wrapper(cblas_sgemm)(Order, TransA, TransB, M, N, K, (const T)tmp_real(alpha), (const T*)A, lda, (const T*)B, ldb, (const T)tmp_real(beta), (T*)C, ldc); } else if(is_double::value) { typedef double T; arma_wrapper(cblas_dgemm)(Order, TransA, TransB, M, N, K, (const T)tmp_real(alpha), (const T*)A, lda, (const T*)B, ldb, (const T)tmp_real(beta), (T*)C, ldc); } else if(is_supported_complex_float::value) { typedef std::complex T; arma_wrapper(cblas_cgemm)(Order, TransA, TransB, M, N, K, (const T*)&alpha, (const T*)A, lda, (const T*)B, ldb, (const T*)&beta, (T*)C, ldc); } else if(is_supported_complex_double::value) { typedef std::complex T; arma_wrapper(cblas_zgemm)(Order, TransA, TransB, M, N, K, (const T*)&alpha, (const T*)A, lda, (const T*)B, ldb, (const T*)&beta, (T*)C, ldc); } } template inline void cblas_syrk ( const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const eT alpha, const eT* A, const int lda, const eT beta, eT* C, const int ldc ) { arma_type_check((is_supported_blas_type::value == false)); if(is_float::value) { typedef float T; arma_wrapper(cblas_ssyrk)(Order, Uplo, Trans, N, K, (const T)alpha, (const T*)A, lda, (const T)beta, (T*)C, ldc); } else if(is_double::value) { typedef double T; arma_wrapper(cblas_dsyrk)(Order, Uplo, Trans, N, K, (const T)alpha, (const T*)A, lda, (const T)beta, (T*)C, ldc); } } template inline void cblas_herk ( const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const T alpha, const std::complex* A, const int lda, const T beta, std::complex* C, const int ldc ) { arma_type_check((is_supported_blas_type::value == false)); if(is_float::value) { typedef float TT; typedef std::complex cx_TT; arma_wrapper(cblas_cherk)(Order, Uplo, Trans, N, K, (const TT)alpha, (const cx_TT*)A, lda, (const TT)beta, (cx_TT*)C, ldc); } else if(is_double::value) { typedef double TT; typedef std::complex cx_TT; arma_wrapper(cblas_zherk)(Order, Uplo, Trans, N, K, (const TT)alpha, (const cx_TT*)A, lda, (const TT)beta, (cx_TT*)C, ldc); } } template inline int clapack_getrf ( const enum CBLAS_ORDER Order, const int M, const int N, eT *A, const int lda, int *ipiv ) { arma_type_check((is_supported_blas_type::value == false)); if(is_float::value) { typedef float T; return arma_wrapper(clapack_sgetrf)(Order, M, N, (T*)A, lda, ipiv); } else if(is_double::value) { typedef double T; return arma_wrapper(clapack_dgetrf)(Order, M, N, (T*)A, lda, ipiv); } else if(is_supported_complex_float::value) { typedef std::complex T; return arma_wrapper(clapack_cgetrf)(Order, M, N, (T*)A, lda, ipiv); } else if(is_supported_complex_double::value) { typedef std::complex T; return arma_wrapper(clapack_zgetrf)(Order, M, N, (T*)A, lda, ipiv); } else { return -1; } } template inline int clapack_getri ( const enum CBLAS_ORDER Order, const int N, eT *A, const int lda, const int *ipiv ) { arma_type_check((is_supported_blas_type::value == false)); if(is_float::value) { typedef float T; return arma_wrapper(clapack_sgetri)(Order, N, (T*)A, lda, ipiv); } else if(is_double::value) { typedef double T; return arma_wrapper(clapack_dgetri)(Order, N, (T*)A, lda, ipiv); } else if(is_supported_complex_float::value) { typedef std::complex T; return arma_wrapper(clapack_cgetri)(Order, N, (T*)A, lda, ipiv); } else if(is_supported_complex_double::value) { typedef std::complex T; return arma_wrapper(clapack_zgetri)(Order, N, (T*)A, lda, ipiv); } else { return -1; } } template inline int clapack_gesv ( const enum CBLAS_ORDER Order, const int N, const int NRHS, eT* A, const int lda, int* ipiv, eT* B, const int ldb ) { arma_type_check((is_supported_blas_type::value == false)); if(is_float::value) { typedef float T; return arma_wrapper(clapack_sgesv)(Order, N, NRHS, (T*)A, lda, ipiv, (T*)B, ldb); } else if(is_double::value) { typedef double T; return arma_wrapper(clapack_dgesv)(Order, N, NRHS, (T*)A, lda, ipiv, (T*)B, ldb); } else if(is_supported_complex_float::value) { typedef std::complex T; return arma_wrapper(clapack_cgesv)(Order, N, NRHS, (T*)A, lda, ipiv, (T*)B, ldb); } else if(is_supported_complex_double::value) { typedef std::complex T; return arma_wrapper(clapack_zgesv)(Order, N, NRHS, (T*)A, lda, ipiv, (T*)B, ldb); } else { return -1; } } } #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/auxlib_bones.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // Copyright (C) 2009 Edmund Highcock // Copyright (C) 2011 James Sanders // Copyright (C) 2012 Eric Jon Sundstrom // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup auxlib //! @{ //! wrapper for accessing external functions defined in ATLAS, LAPACK or BLAS libraries class auxlib { public: template struct pos { static const uword n2 = row + col*2; static const uword n3 = row + col*3; static const uword n4 = row + col*4; }; // // inv template inline static bool inv(Mat& out, const Base& X, const bool slow = false); template inline static bool inv(Mat& out, const Mat& A, const bool slow = false); template inline static bool inv_noalias_tinymat(Mat& out, const Mat& X, const uword N); template inline static bool inv_inplace_lapack(Mat& out); // // inv_tr template inline static bool inv_tr(Mat& out, const Base& X, const uword layout); // // inv_sym template inline static bool inv_sym(Mat& out, const Base& X, const uword layout); // // inv_sympd template inline static bool inv_sympd(Mat& out, const Base& X, const uword layout); // // det template inline static eT det(const Base& X, const bool slow = false); template inline static eT det_tinymat(const Mat& X, const uword N); template inline static eT det_lapack(const Mat& X, const bool make_copy); // // log_det template inline static bool log_det(eT& out_val, typename get_pod_type::result& out_sign, const Base& X); // // lu template inline static bool lu(Mat& L, Mat& U, podarray& ipiv, const Base& X); template inline static bool lu(Mat& L, Mat& U, Mat& P, const Base& X); template inline static bool lu(Mat& L, Mat& U, const Base& X); // // eig_sym template inline static bool eig_sym(Col& eigval, const Base& X); template inline static bool eig_sym(Col& eigval, const Base,T1>& X); template inline static bool eig_sym(Col& eigval, Mat& eigvec, const Base& X); template inline static bool eig_sym(Col& eigval, Mat< std::complex >& eigvec, const Base,T1>& X); template inline static bool eig_sym_dc(Col& eigval, Mat& eigvec, const Base& X); template inline static bool eig_sym_dc(Col& eigval, Mat< std::complex >& eigvec, const Base,T1>& X); // // eig_gen template inline static bool eig_gen(Col< std::complex >& eigval, Mat& l_eigvec, Mat& r_eigvec, const Base& X, const char side); template inline static bool eig_gen(Col< std::complex >& eigval, Mat< std::complex >& l_eigvec, Mat< std::complex >& r_eigvec, const Base< std::complex, T1 >& X, const char side); // // eig_pair template inline static bool eig_pair(Col< std::complex >& eigval, Mat& l_eigvec, Mat& r_eigvec, const Base& X, const Base& Y, const char side); template inline static bool eig_pair(Col< std::complex >& eigval, Mat< std::complex >& l_eigvec, Mat< std::complex >& r_eigvec, const Base< std::complex, T1 >& X, const Base< std::complex, T2 >& Y, const char side); // // chol template inline static bool chol(Mat& out, const Base& X, const uword layout); // // qr template inline static bool qr(Mat& Q, Mat& R, const Base& X); template inline static bool qr_econ(Mat& Q, Mat& R, const Base& X); // // svd template inline static bool svd(Col& S, const Base& X, uword& n_rows, uword& n_cols); template inline static bool svd(Col& S, const Base, T1>& X, uword& n_rows, uword& n_cols); template inline static bool svd(Col& S, const Base& X); template inline static bool svd(Col& S, const Base, T1>& X); template inline static bool svd(Mat& U, Col& S, Mat& V, const Base& X); template inline static bool svd(Mat< std::complex >& U, Col& S, Mat< std::complex >& V, const Base< std::complex, T1>& X); template inline static bool svd_econ(Mat& U, Col& S, Mat& V, const Base& X, const char mode); template inline static bool svd_econ(Mat< std::complex >& U, Col& S, Mat< std::complex >& V, const Base< std::complex, T1>& X, const char mode); // EXPERIMENTAL template inline static bool svd_dc(Col& S, const Base& X, uword& n_rows, uword& n_cols); // EXPERIMENTAL template inline static bool svd_dc(Col& S, const Base, T1>& X, uword& n_rows, uword& n_cols); // EXPERIMENTAL template inline static bool svd_dc(Col& S, const Base& X); // EXPERIMENTAL template inline static bool svd_dc(Col& S, const Base, T1>& X); template inline static bool svd_dc(Mat& U, Col& S, Mat& V, const Base& X); template inline static bool svd_dc(Mat< std::complex >& U, Col& S, Mat< std::complex >& V, const Base< std::complex, T1>& X); template inline static bool svd_dc_econ(Mat& U, Col& S, Mat& V, const Base& X); template inline static bool svd_dc_econ(Mat< std::complex >& U, Col& S, Mat< std::complex >& V, const Base< std::complex, T1>& X); // // solve template inline static bool solve (Mat& out, Mat& A, const Base& X, const bool slow = false); template inline static bool solve_od(Mat& out, Mat& A, const Base& X); template inline static bool solve_ud(Mat& out, Mat& A, const Base& X); // // solve_tr template inline static bool solve_tr(Mat& out, const Mat& A, const Mat& B, const uword layout); // // Schur decomposition template inline static bool schur_dec(Mat& Z, Mat& T, const Mat& A); template inline static bool schur_dec(Mat >& Z, Mat >& T, const Mat >& A); // // syl (solution of the Sylvester equation AX + XB = C) template inline static bool syl(Mat& X, const Mat& A, const Mat& B, const Mat& C); // // lyap (solution of the continuous Lyapunov equation AX + XA^H + Q = 0) template inline static bool lyap(Mat& X, const Mat& A, const Mat& Q); // // dlyap (solution of the discrete Lyapunov equation AXA^H - X + Q = 0) template inline static bool dlyap(Mat& X, const Mat& A, const Mat& Q); // // QZ decomposition template inline static bool qz(Mat& A, Mat& B, Mat& vsl, Mat& vsr, const Base& X, const Base& Y, const char side); template inline static bool qz(Mat< std::complex >& A, Mat< std::complex >& B, Mat< std::complex >& vsl, Mat< std::complex >& vsr, const Base< std::complex, T1 >& X, const Base< std::complex, T2 >& Y, const char side); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/auxlib_meat.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // Copyright (C) 2009 Edmund Highcock // Copyright (C) 2011 James Sanders // Copyright (C) 2011 Stanislav Funiak // Copyright (C) 2012 Eric Jon Sundstrom // Copyright (C) 2012 Michael McNeil Forbes // Copyright (C) 2015 Keith O'Hara // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup auxlib //! @{ //! immediate matrix inverse template inline bool auxlib::inv(Mat& out, const Base& X, const bool slow) { arma_extra_debug_sigprint(); out = X.get_ref(); arma_debug_check( (out.is_square() == false), "inv(): given matrix is not square" ); bool status = false; const uword N = out.n_rows; if( (N <= 4) && (slow == false) ) { Mat tmp(N,N); status = auxlib::inv_noalias_tinymat(tmp, out, N); if(status == true) { arrayops::copy( out.memptr(), tmp.memptr(), tmp.n_elem ); } } if( (N > 4) || (status == false) ) { status = auxlib::inv_inplace_lapack(out); } return status; } template inline bool auxlib::inv(Mat& out, const Mat& X, const bool slow) { arma_extra_debug_sigprint(); arma_debug_check( (X.is_square() == false), "inv(): given matrix is not square" ); bool status = false; const uword N = X.n_rows; if( (N <= 4) && (slow == false) ) { if(&out != &X) { out.set_size(N,N); status = auxlib::inv_noalias_tinymat(out, X, N); } else { Mat tmp(N,N); status = auxlib::inv_noalias_tinymat(tmp, X, N); if(status == true) { arrayops::copy( out.memptr(), tmp.memptr(), tmp.n_elem ); } } } if( (N > 4) || (status == false) ) { out = X; status = auxlib::inv_inplace_lapack(out); } return status; } template inline bool auxlib::inv_noalias_tinymat(Mat& out, const Mat& X, const uword N) { arma_extra_debug_sigprint(); typedef typename get_pod_type::result T; const T det_min = (is_float::value) ? T(1e-19) : T(1e-154); bool calc_ok = true; const eT* Xm = X.memptr(); eT* outm = out.memptr(); // NOTE: the output matrix is assumed to have the correct size switch(N) { case 1: { outm[0] = eT(1) / Xm[0]; }; break; case 2: { const eT a = Xm[pos<0,0>::n2]; const eT b = Xm[pos<0,1>::n2]; const eT c = Xm[pos<1,0>::n2]; const eT d = Xm[pos<1,1>::n2]; const eT det_val = (a*d - b*c); if(std::abs(det_val) >= det_min) { outm[pos<0,0>::n2] = d / det_val; outm[pos<0,1>::n2] = -b / det_val; outm[pos<1,0>::n2] = -c / det_val; outm[pos<1,1>::n2] = a / det_val; } else { calc_ok = false; } }; break; case 3: { const eT det_val = auxlib::det_tinymat(X,3); if(std::abs(det_val) >= det_min) { outm[pos<0,0>::n3] = (Xm[pos<2,2>::n3]*Xm[pos<1,1>::n3] - Xm[pos<2,1>::n3]*Xm[pos<1,2>::n3]) / det_val; outm[pos<1,0>::n3] = -(Xm[pos<2,2>::n3]*Xm[pos<1,0>::n3] - Xm[pos<2,0>::n3]*Xm[pos<1,2>::n3]) / det_val; outm[pos<2,0>::n3] = (Xm[pos<2,1>::n3]*Xm[pos<1,0>::n3] - Xm[pos<2,0>::n3]*Xm[pos<1,1>::n3]) / det_val; outm[pos<0,1>::n3] = -(Xm[pos<2,2>::n3]*Xm[pos<0,1>::n3] - Xm[pos<2,1>::n3]*Xm[pos<0,2>::n3]) / det_val; outm[pos<1,1>::n3] = (Xm[pos<2,2>::n3]*Xm[pos<0,0>::n3] - Xm[pos<2,0>::n3]*Xm[pos<0,2>::n3]) / det_val; outm[pos<2,1>::n3] = -(Xm[pos<2,1>::n3]*Xm[pos<0,0>::n3] - Xm[pos<2,0>::n3]*Xm[pos<0,1>::n3]) / det_val; outm[pos<0,2>::n3] = (Xm[pos<1,2>::n3]*Xm[pos<0,1>::n3] - Xm[pos<1,1>::n3]*Xm[pos<0,2>::n3]) / det_val; outm[pos<1,2>::n3] = -(Xm[pos<1,2>::n3]*Xm[pos<0,0>::n3] - Xm[pos<1,0>::n3]*Xm[pos<0,2>::n3]) / det_val; outm[pos<2,2>::n3] = (Xm[pos<1,1>::n3]*Xm[pos<0,0>::n3] - Xm[pos<1,0>::n3]*Xm[pos<0,1>::n3]) / det_val; const eT check_val = Xm[pos<0,0>::n3]*outm[pos<0,0>::n3] + Xm[pos<0,1>::n3]*outm[pos<1,0>::n3] + Xm[pos<0,2>::n3]*outm[pos<2,0>::n3]; const T max_diff = (is_float::value) ? T(1e-4) : T(1e-10); if(std::abs(T(1) - check_val) > max_diff) { calc_ok = false; } } else { calc_ok = false; } }; break; case 4: { const eT det_val = auxlib::det_tinymat(X,4); if(std::abs(det_val) >= det_min) { outm[pos<0,0>::n4] = ( Xm[pos<1,2>::n4]*Xm[pos<2,3>::n4]*Xm[pos<3,1>::n4] - Xm[pos<1,3>::n4]*Xm[pos<2,2>::n4]*Xm[pos<3,1>::n4] + Xm[pos<1,3>::n4]*Xm[pos<2,1>::n4]*Xm[pos<3,2>::n4] - Xm[pos<1,1>::n4]*Xm[pos<2,3>::n4]*Xm[pos<3,2>::n4] - Xm[pos<1,2>::n4]*Xm[pos<2,1>::n4]*Xm[pos<3,3>::n4] + Xm[pos<1,1>::n4]*Xm[pos<2,2>::n4]*Xm[pos<3,3>::n4] ) / det_val; outm[pos<1,0>::n4] = ( Xm[pos<1,3>::n4]*Xm[pos<2,2>::n4]*Xm[pos<3,0>::n4] - Xm[pos<1,2>::n4]*Xm[pos<2,3>::n4]*Xm[pos<3,0>::n4] - Xm[pos<1,3>::n4]*Xm[pos<2,0>::n4]*Xm[pos<3,2>::n4] + Xm[pos<1,0>::n4]*Xm[pos<2,3>::n4]*Xm[pos<3,2>::n4] + Xm[pos<1,2>::n4]*Xm[pos<2,0>::n4]*Xm[pos<3,3>::n4] - Xm[pos<1,0>::n4]*Xm[pos<2,2>::n4]*Xm[pos<3,3>::n4] ) / det_val; outm[pos<2,0>::n4] = ( Xm[pos<1,1>::n4]*Xm[pos<2,3>::n4]*Xm[pos<3,0>::n4] - Xm[pos<1,3>::n4]*Xm[pos<2,1>::n4]*Xm[pos<3,0>::n4] + Xm[pos<1,3>::n4]*Xm[pos<2,0>::n4]*Xm[pos<3,1>::n4] - Xm[pos<1,0>::n4]*Xm[pos<2,3>::n4]*Xm[pos<3,1>::n4] - Xm[pos<1,1>::n4]*Xm[pos<2,0>::n4]*Xm[pos<3,3>::n4] + Xm[pos<1,0>::n4]*Xm[pos<2,1>::n4]*Xm[pos<3,3>::n4] ) / det_val; outm[pos<3,0>::n4] = ( Xm[pos<1,2>::n4]*Xm[pos<2,1>::n4]*Xm[pos<3,0>::n4] - Xm[pos<1,1>::n4]*Xm[pos<2,2>::n4]*Xm[pos<3,0>::n4] - Xm[pos<1,2>::n4]*Xm[pos<2,0>::n4]*Xm[pos<3,1>::n4] + Xm[pos<1,0>::n4]*Xm[pos<2,2>::n4]*Xm[pos<3,1>::n4] + Xm[pos<1,1>::n4]*Xm[pos<2,0>::n4]*Xm[pos<3,2>::n4] - Xm[pos<1,0>::n4]*Xm[pos<2,1>::n4]*Xm[pos<3,2>::n4] ) / det_val; outm[pos<0,1>::n4] = ( Xm[pos<0,3>::n4]*Xm[pos<2,2>::n4]*Xm[pos<3,1>::n4] - Xm[pos<0,2>::n4]*Xm[pos<2,3>::n4]*Xm[pos<3,1>::n4] - Xm[pos<0,3>::n4]*Xm[pos<2,1>::n4]*Xm[pos<3,2>::n4] + Xm[pos<0,1>::n4]*Xm[pos<2,3>::n4]*Xm[pos<3,2>::n4] + Xm[pos<0,2>::n4]*Xm[pos<2,1>::n4]*Xm[pos<3,3>::n4] - Xm[pos<0,1>::n4]*Xm[pos<2,2>::n4]*Xm[pos<3,3>::n4] ) / det_val; outm[pos<1,1>::n4] = ( Xm[pos<0,2>::n4]*Xm[pos<2,3>::n4]*Xm[pos<3,0>::n4] - Xm[pos<0,3>::n4]*Xm[pos<2,2>::n4]*Xm[pos<3,0>::n4] + Xm[pos<0,3>::n4]*Xm[pos<2,0>::n4]*Xm[pos<3,2>::n4] - Xm[pos<0,0>::n4]*Xm[pos<2,3>::n4]*Xm[pos<3,2>::n4] - Xm[pos<0,2>::n4]*Xm[pos<2,0>::n4]*Xm[pos<3,3>::n4] + Xm[pos<0,0>::n4]*Xm[pos<2,2>::n4]*Xm[pos<3,3>::n4] ) / det_val; outm[pos<2,1>::n4] = ( Xm[pos<0,3>::n4]*Xm[pos<2,1>::n4]*Xm[pos<3,0>::n4] - Xm[pos<0,1>::n4]*Xm[pos<2,3>::n4]*Xm[pos<3,0>::n4] - Xm[pos<0,3>::n4]*Xm[pos<2,0>::n4]*Xm[pos<3,1>::n4] + Xm[pos<0,0>::n4]*Xm[pos<2,3>::n4]*Xm[pos<3,1>::n4] + Xm[pos<0,1>::n4]*Xm[pos<2,0>::n4]*Xm[pos<3,3>::n4] - Xm[pos<0,0>::n4]*Xm[pos<2,1>::n4]*Xm[pos<3,3>::n4] ) / det_val; outm[pos<3,1>::n4] = ( Xm[pos<0,1>::n4]*Xm[pos<2,2>::n4]*Xm[pos<3,0>::n4] - Xm[pos<0,2>::n4]*Xm[pos<2,1>::n4]*Xm[pos<3,0>::n4] + Xm[pos<0,2>::n4]*Xm[pos<2,0>::n4]*Xm[pos<3,1>::n4] - Xm[pos<0,0>::n4]*Xm[pos<2,2>::n4]*Xm[pos<3,1>::n4] - Xm[pos<0,1>::n4]*Xm[pos<2,0>::n4]*Xm[pos<3,2>::n4] + Xm[pos<0,0>::n4]*Xm[pos<2,1>::n4]*Xm[pos<3,2>::n4] ) / det_val; outm[pos<0,2>::n4] = ( Xm[pos<0,2>::n4]*Xm[pos<1,3>::n4]*Xm[pos<3,1>::n4] - Xm[pos<0,3>::n4]*Xm[pos<1,2>::n4]*Xm[pos<3,1>::n4] + Xm[pos<0,3>::n4]*Xm[pos<1,1>::n4]*Xm[pos<3,2>::n4] - Xm[pos<0,1>::n4]*Xm[pos<1,3>::n4]*Xm[pos<3,2>::n4] - Xm[pos<0,2>::n4]*Xm[pos<1,1>::n4]*Xm[pos<3,3>::n4] + Xm[pos<0,1>::n4]*Xm[pos<1,2>::n4]*Xm[pos<3,3>::n4] ) / det_val; outm[pos<1,2>::n4] = ( Xm[pos<0,3>::n4]*Xm[pos<1,2>::n4]*Xm[pos<3,0>::n4] - Xm[pos<0,2>::n4]*Xm[pos<1,3>::n4]*Xm[pos<3,0>::n4] - Xm[pos<0,3>::n4]*Xm[pos<1,0>::n4]*Xm[pos<3,2>::n4] + Xm[pos<0,0>::n4]*Xm[pos<1,3>::n4]*Xm[pos<3,2>::n4] + Xm[pos<0,2>::n4]*Xm[pos<1,0>::n4]*Xm[pos<3,3>::n4] - Xm[pos<0,0>::n4]*Xm[pos<1,2>::n4]*Xm[pos<3,3>::n4] ) / det_val; outm[pos<2,2>::n4] = ( Xm[pos<0,1>::n4]*Xm[pos<1,3>::n4]*Xm[pos<3,0>::n4] - Xm[pos<0,3>::n4]*Xm[pos<1,1>::n4]*Xm[pos<3,0>::n4] + Xm[pos<0,3>::n4]*Xm[pos<1,0>::n4]*Xm[pos<3,1>::n4] - Xm[pos<0,0>::n4]*Xm[pos<1,3>::n4]*Xm[pos<3,1>::n4] - Xm[pos<0,1>::n4]*Xm[pos<1,0>::n4]*Xm[pos<3,3>::n4] + Xm[pos<0,0>::n4]*Xm[pos<1,1>::n4]*Xm[pos<3,3>::n4] ) / det_val; outm[pos<3,2>::n4] = ( Xm[pos<0,2>::n4]*Xm[pos<1,1>::n4]*Xm[pos<3,0>::n4] - Xm[pos<0,1>::n4]*Xm[pos<1,2>::n4]*Xm[pos<3,0>::n4] - Xm[pos<0,2>::n4]*Xm[pos<1,0>::n4]*Xm[pos<3,1>::n4] + Xm[pos<0,0>::n4]*Xm[pos<1,2>::n4]*Xm[pos<3,1>::n4] + Xm[pos<0,1>::n4]*Xm[pos<1,0>::n4]*Xm[pos<3,2>::n4] - Xm[pos<0,0>::n4]*Xm[pos<1,1>::n4]*Xm[pos<3,2>::n4] ) / det_val; outm[pos<0,3>::n4] = ( Xm[pos<0,3>::n4]*Xm[pos<1,2>::n4]*Xm[pos<2,1>::n4] - Xm[pos<0,2>::n4]*Xm[pos<1,3>::n4]*Xm[pos<2,1>::n4] - Xm[pos<0,3>::n4]*Xm[pos<1,1>::n4]*Xm[pos<2,2>::n4] + Xm[pos<0,1>::n4]*Xm[pos<1,3>::n4]*Xm[pos<2,2>::n4] + Xm[pos<0,2>::n4]*Xm[pos<1,1>::n4]*Xm[pos<2,3>::n4] - Xm[pos<0,1>::n4]*Xm[pos<1,2>::n4]*Xm[pos<2,3>::n4] ) / det_val; outm[pos<1,3>::n4] = ( Xm[pos<0,2>::n4]*Xm[pos<1,3>::n4]*Xm[pos<2,0>::n4] - Xm[pos<0,3>::n4]*Xm[pos<1,2>::n4]*Xm[pos<2,0>::n4] + Xm[pos<0,3>::n4]*Xm[pos<1,0>::n4]*Xm[pos<2,2>::n4] - Xm[pos<0,0>::n4]*Xm[pos<1,3>::n4]*Xm[pos<2,2>::n4] - Xm[pos<0,2>::n4]*Xm[pos<1,0>::n4]*Xm[pos<2,3>::n4] + Xm[pos<0,0>::n4]*Xm[pos<1,2>::n4]*Xm[pos<2,3>::n4] ) / det_val; outm[pos<2,3>::n4] = ( Xm[pos<0,3>::n4]*Xm[pos<1,1>::n4]*Xm[pos<2,0>::n4] - Xm[pos<0,1>::n4]*Xm[pos<1,3>::n4]*Xm[pos<2,0>::n4] - Xm[pos<0,3>::n4]*Xm[pos<1,0>::n4]*Xm[pos<2,1>::n4] + Xm[pos<0,0>::n4]*Xm[pos<1,3>::n4]*Xm[pos<2,1>::n4] + Xm[pos<0,1>::n4]*Xm[pos<1,0>::n4]*Xm[pos<2,3>::n4] - Xm[pos<0,0>::n4]*Xm[pos<1,1>::n4]*Xm[pos<2,3>::n4] ) / det_val; outm[pos<3,3>::n4] = ( Xm[pos<0,1>::n4]*Xm[pos<1,2>::n4]*Xm[pos<2,0>::n4] - Xm[pos<0,2>::n4]*Xm[pos<1,1>::n4]*Xm[pos<2,0>::n4] + Xm[pos<0,2>::n4]*Xm[pos<1,0>::n4]*Xm[pos<2,1>::n4] - Xm[pos<0,0>::n4]*Xm[pos<1,2>::n4]*Xm[pos<2,1>::n4] - Xm[pos<0,1>::n4]*Xm[pos<1,0>::n4]*Xm[pos<2,2>::n4] + Xm[pos<0,0>::n4]*Xm[pos<1,1>::n4]*Xm[pos<2,2>::n4] ) / det_val; const eT check_val = Xm[pos<0,0>::n4]*outm[pos<0,0>::n4] + Xm[pos<0,1>::n4]*outm[pos<1,0>::n4] + Xm[pos<0,2>::n4]*outm[pos<2,0>::n4] + Xm[pos<0,3>::n4]*outm[pos<3,0>::n4]; const T max_diff = (is_float::value) ? T(1e-4) : T(1e-10); if(std::abs(T(1) - check_val) > max_diff) { calc_ok = false; } } else { calc_ok = false; } }; break; default: ; } return calc_ok; } template inline bool auxlib::inv_inplace_lapack(Mat& out) { arma_extra_debug_sigprint(); if(out.is_empty()) { return true; } #if defined(ARMA_USE_ATLAS) { arma_debug_assert_atlas_size(out); podarray ipiv(out.n_rows); int info = atlas::clapack_getrf(atlas::CblasColMajor, out.n_rows, out.n_cols, out.memptr(), out.n_rows, ipiv.memptr()); if(info == 0) { info = atlas::clapack_getri(atlas::CblasColMajor, out.n_rows, out.memptr(), out.n_rows, ipiv.memptr()); } return (info == 0); } #elif defined(ARMA_USE_LAPACK) { arma_debug_assert_blas_size(out); blas_int n_rows = out.n_rows; blas_int lwork = (std::max)(blas_int(podarray_prealloc_n_elem::val), n_rows); blas_int info = 0; podarray ipiv(out.n_rows); if(n_rows > 16) { eT work_query[2]; blas_int lwork_query = -1; lapack::getri(&n_rows, out.memptr(), &n_rows, ipiv.memptr(), &work_query[0], &lwork_query, &info); if(info == 0) { const blas_int lwork_proposed = static_cast( access::tmp_real(work_query[0]) ); if(lwork_proposed > lwork) { lwork = lwork_proposed; } } else { return false; } } podarray work( static_cast(lwork) ); lapack::getrf(&n_rows, &n_rows, out.memptr(), &n_rows, ipiv.memptr(), &info); if(info == 0) { lapack::getri(&n_rows, out.memptr(), &n_rows, ipiv.memptr(), work.memptr(), &lwork, &info); } return (info == 0); } #else { arma_stop("inv(): use of ATLAS or LAPACK needs to be enabled"); return false; } #endif } template inline bool auxlib::inv_tr(Mat& out, const Base& X, const uword layout) { arma_extra_debug_sigprint(); out = X.get_ref(); arma_debug_check( (out.is_square() == false), "inv(): given matrix is not square" ); if(out.is_empty()) { return true; } bool status; #if defined(ARMA_USE_LAPACK) { arma_debug_assert_blas_size(out); char uplo = (layout == 0) ? 'U' : 'L'; char diag = 'N'; blas_int n = blas_int(out.n_rows); blas_int info = 0; lapack::trtri(&uplo, &diag, &n, out.memptr(), &n, &info); status = (info == 0); } #else { arma_ignore(layout); arma_stop("inv(): use of LAPACK needs to be enabled"); status = false; } #endif if(status == true) { if(layout == 0) { // upper triangular out = trimatu(out); } else { // lower triangular out = trimatl(out); } } return status; } template inline bool auxlib::inv_sym(Mat& out, const Base& X, const uword layout) { arma_extra_debug_sigprint(); out = X.get_ref(); arma_debug_check( (out.is_square() == false), "inv(): given matrix is not square" ); if(out.is_empty()) { return true; } bool status; #if defined(ARMA_USE_LAPACK) { arma_debug_assert_blas_size(out); char uplo = (layout == 0) ? 'U' : 'L'; blas_int n = blas_int(out.n_rows); blas_int lwork = (std::max)(blas_int(podarray_prealloc_n_elem::val), 2*n); blas_int info = 0; podarray ipiv; ipiv.set_size(out.n_rows); podarray work; work.set_size( uword(lwork) ); lapack::sytrf(&uplo, &n, out.memptr(), &n, ipiv.memptr(), work.memptr(), &lwork, &info); status = (info == 0); if(status == true) { lapack::sytri(&uplo, &n, out.memptr(), &n, ipiv.memptr(), work.memptr(), &info); out = (layout == 0) ? symmatu(out) : symmatl(out); status = (info == 0); } } #else { arma_ignore(layout); arma_stop("inv(): use of LAPACK needs to be enabled"); status = false; } #endif return status; } template inline bool auxlib::inv_sympd(Mat& out, const Base& X, const uword layout) { arma_extra_debug_sigprint(); out = X.get_ref(); arma_debug_check( (out.is_square() == false), "inv_sympd(): given matrix is not square" ); if(out.is_empty()) { return true; } bool status; #if defined(ARMA_USE_LAPACK) { arma_debug_assert_blas_size(out); char uplo = (layout == 0) ? 'U' : 'L'; blas_int n = blas_int(out.n_rows); blas_int info = 0; lapack::potrf(&uplo, &n, out.memptr(), &n, &info); status = (info == 0); if(status == true) { lapack::potri(&uplo, &n, out.memptr(), &n, &info); out = (layout == 0) ? symmatu(out) : symmatl(out); status = (info == 0); } } #else { arma_ignore(layout); arma_stop("inv_sympd(): use of LAPACK needs to be enabled"); status = false; } #endif return status; } template inline eT auxlib::det(const Base& X, const bool slow) { arma_extra_debug_sigprint(); typedef typename get_pod_type::result T; const bool make_copy = (is_Mat::value) ? true : false; const unwrap tmp(X.get_ref()); const Mat& A = tmp.M; arma_debug_check( (A.is_square() == false), "det(): matrix is not square" ); const uword N = A.n_rows; if( (N <= 4) && (slow == false) ) { const T det_min = (is_float::value) ? T(1e-19) : T(1e-154); const eT det_val = auxlib::det_tinymat(A, N); return (std::abs(det_val) >= det_min) ? det_val : auxlib::det_lapack(A, make_copy); } else { return auxlib::det_lapack(A, make_copy); } } template inline eT auxlib::det_tinymat(const Mat& X, const uword N) { arma_extra_debug_sigprint(); switch(N) { case 0: return eT(1); break; case 1: return X[0]; break; case 2: { const eT* Xm = X.memptr(); return ( Xm[pos<0,0>::n2]*Xm[pos<1,1>::n2] - Xm[pos<0,1>::n2]*Xm[pos<1,0>::n2] ); } break; case 3: { // const double tmp1 = X.at(0,0) * X.at(1,1) * X.at(2,2); // const double tmp2 = X.at(0,1) * X.at(1,2) * X.at(2,0); // const double tmp3 = X.at(0,2) * X.at(1,0) * X.at(2,1); // const double tmp4 = X.at(2,0) * X.at(1,1) * X.at(0,2); // const double tmp5 = X.at(2,1) * X.at(1,2) * X.at(0,0); // const double tmp6 = X.at(2,2) * X.at(1,0) * X.at(0,1); // return (tmp1+tmp2+tmp3) - (tmp4+tmp5+tmp6); const eT* Xm = X.memptr(); const eT val1 = Xm[pos<0,0>::n3]*(Xm[pos<2,2>::n3]*Xm[pos<1,1>::n3] - Xm[pos<2,1>::n3]*Xm[pos<1,2>::n3]); const eT val2 = Xm[pos<1,0>::n3]*(Xm[pos<2,2>::n3]*Xm[pos<0,1>::n3] - Xm[pos<2,1>::n3]*Xm[pos<0,2>::n3]); const eT val3 = Xm[pos<2,0>::n3]*(Xm[pos<1,2>::n3]*Xm[pos<0,1>::n3] - Xm[pos<1,1>::n3]*Xm[pos<0,2>::n3]); return ( val1 - val2 + val3 ); } break; case 4: { const eT* Xm = X.memptr(); const eT val = \ Xm[pos<0,3>::n4] * Xm[pos<1,2>::n4] * Xm[pos<2,1>::n4] * Xm[pos<3,0>::n4] \ - Xm[pos<0,2>::n4] * Xm[pos<1,3>::n4] * Xm[pos<2,1>::n4] * Xm[pos<3,0>::n4] \ - Xm[pos<0,3>::n4] * Xm[pos<1,1>::n4] * Xm[pos<2,2>::n4] * Xm[pos<3,0>::n4] \ + Xm[pos<0,1>::n4] * Xm[pos<1,3>::n4] * Xm[pos<2,2>::n4] * Xm[pos<3,0>::n4] \ + Xm[pos<0,2>::n4] * Xm[pos<1,1>::n4] * Xm[pos<2,3>::n4] * Xm[pos<3,0>::n4] \ - Xm[pos<0,1>::n4] * Xm[pos<1,2>::n4] * Xm[pos<2,3>::n4] * Xm[pos<3,0>::n4] \ - Xm[pos<0,3>::n4] * Xm[pos<1,2>::n4] * Xm[pos<2,0>::n4] * Xm[pos<3,1>::n4] \ + Xm[pos<0,2>::n4] * Xm[pos<1,3>::n4] * Xm[pos<2,0>::n4] * Xm[pos<3,1>::n4] \ + Xm[pos<0,3>::n4] * Xm[pos<1,0>::n4] * Xm[pos<2,2>::n4] * Xm[pos<3,1>::n4] \ - Xm[pos<0,0>::n4] * Xm[pos<1,3>::n4] * Xm[pos<2,2>::n4] * Xm[pos<3,1>::n4] \ - Xm[pos<0,2>::n4] * Xm[pos<1,0>::n4] * Xm[pos<2,3>::n4] * Xm[pos<3,1>::n4] \ + Xm[pos<0,0>::n4] * Xm[pos<1,2>::n4] * Xm[pos<2,3>::n4] * Xm[pos<3,1>::n4] \ + Xm[pos<0,3>::n4] * Xm[pos<1,1>::n4] * Xm[pos<2,0>::n4] * Xm[pos<3,2>::n4] \ - Xm[pos<0,1>::n4] * Xm[pos<1,3>::n4] * Xm[pos<2,0>::n4] * Xm[pos<3,2>::n4] \ - Xm[pos<0,3>::n4] * Xm[pos<1,0>::n4] * Xm[pos<2,1>::n4] * Xm[pos<3,2>::n4] \ + Xm[pos<0,0>::n4] * Xm[pos<1,3>::n4] * Xm[pos<2,1>::n4] * Xm[pos<3,2>::n4] \ + Xm[pos<0,1>::n4] * Xm[pos<1,0>::n4] * Xm[pos<2,3>::n4] * Xm[pos<3,2>::n4] \ - Xm[pos<0,0>::n4] * Xm[pos<1,1>::n4] * Xm[pos<2,3>::n4] * Xm[pos<3,2>::n4] \ - Xm[pos<0,2>::n4] * Xm[pos<1,1>::n4] * Xm[pos<2,0>::n4] * Xm[pos<3,3>::n4] \ + Xm[pos<0,1>::n4] * Xm[pos<1,2>::n4] * Xm[pos<2,0>::n4] * Xm[pos<3,3>::n4] \ + Xm[pos<0,2>::n4] * Xm[pos<1,0>::n4] * Xm[pos<2,1>::n4] * Xm[pos<3,3>::n4] \ - Xm[pos<0,0>::n4] * Xm[pos<1,2>::n4] * Xm[pos<2,1>::n4] * Xm[pos<3,3>::n4] \ - Xm[pos<0,1>::n4] * Xm[pos<1,0>::n4] * Xm[pos<2,2>::n4] * Xm[pos<3,3>::n4] \ + Xm[pos<0,0>::n4] * Xm[pos<1,1>::n4] * Xm[pos<2,2>::n4] * Xm[pos<3,3>::n4] \ ; return val; } break; default: return eT(0); ; } } //! immediate determinant of a matrix using ATLAS or LAPACK template inline eT auxlib::det_lapack(const Mat& X, const bool make_copy) { arma_extra_debug_sigprint(); Mat X_copy; if(make_copy == true) { X_copy = X; } Mat& tmp = (make_copy == true) ? X_copy : const_cast< Mat& >(X); if(tmp.is_empty()) { return eT(1); } #if defined(ARMA_USE_ATLAS) { arma_debug_assert_atlas_size(tmp); podarray ipiv(tmp.n_rows); //const int info = atlas::clapack_getrf(atlas::CblasColMajor, tmp.n_rows, tmp.n_cols, tmp.memptr(), tmp.n_rows, ipiv.memptr()); // on output tmp appears to be L+U_alt, where U_alt is U with the main diagonal set to zero eT val = tmp.at(0,0); for(uword i=1; i < tmp.n_rows; ++i) { val *= tmp.at(i,i); } int sign = +1; for(uword i=0; i < tmp.n_rows; ++i) { if( int(i) != ipiv.mem[i] ) // NOTE: no adjustment required, as the clapack version of getrf() assumes counting from 0 { sign *= -1; } } return ( (sign < 0) ? -val : val ); } #elif defined(ARMA_USE_LAPACK) { arma_debug_assert_blas_size(tmp); podarray ipiv(tmp.n_rows); blas_int info = 0; blas_int n_rows = blas_int(tmp.n_rows); blas_int n_cols = blas_int(tmp.n_cols); lapack::getrf(&n_rows, &n_cols, tmp.memptr(), &n_rows, ipiv.memptr(), &info); // on output tmp appears to be L+U_alt, where U_alt is U with the main diagonal set to zero eT val = tmp.at(0,0); for(uword i=1; i < tmp.n_rows; ++i) { val *= tmp.at(i,i); } blas_int sign = +1; for(uword i=0; i < tmp.n_rows; ++i) { if( blas_int(i) != (ipiv.mem[i] - 1) ) // NOTE: adjustment of -1 is required as Fortran counts from 1 { sign *= -1; } } return ( (sign < 0) ? -val : val ); } #else { arma_ignore(X); arma_ignore(make_copy); arma_ignore(tmp); arma_stop("det(): use of ATLAS or LAPACK needs to be enabled"); return eT(0); } #endif } //! immediate log determinant of a matrix using ATLAS or LAPACK template inline bool auxlib::log_det(eT& out_val, typename get_pod_type::result& out_sign, const Base& X) { arma_extra_debug_sigprint(); typedef typename get_pod_type::result T; #if defined(ARMA_USE_ATLAS) { Mat tmp(X.get_ref()); arma_debug_check( (tmp.is_square() == false), "log_det(): given matrix is not square" ); if(tmp.is_empty()) { out_val = eT(0); out_sign = T(1); return true; } arma_debug_assert_atlas_size(tmp); podarray ipiv(tmp.n_rows); const int info = atlas::clapack_getrf(atlas::CblasColMajor, tmp.n_rows, tmp.n_cols, tmp.memptr(), tmp.n_rows, ipiv.memptr()); // on output tmp appears to be L+U_alt, where U_alt is U with the main diagonal set to zero sword sign = (is_complex::value == false) ? ( (access::tmp_real( tmp.at(0,0) ) < T(0)) ? -1 : +1 ) : +1; eT val = (is_complex::value == false) ? std::log( (access::tmp_real( tmp.at(0,0) ) < T(0)) ? tmp.at(0,0)*T(-1) : tmp.at(0,0) ) : std::log( tmp.at(0,0) ); for(uword i=1; i < tmp.n_rows; ++i) { const eT x = tmp.at(i,i); sign *= (is_complex::value == false) ? ( (access::tmp_real(x) < T(0)) ? -1 : +1 ) : +1; val += (is_complex::value == false) ? std::log( (access::tmp_real(x) < T(0)) ? x*T(-1) : x ) : std::log(x); } for(uword i=0; i < tmp.n_rows; ++i) { if( int(i) != ipiv.mem[i] ) // NOTE: no adjustment required, as the clapack version of getrf() assumes counting from 0 { sign *= -1; } } out_val = val; out_sign = T(sign); return (info == 0); } #elif defined(ARMA_USE_LAPACK) { Mat tmp(X.get_ref()); arma_debug_check( (tmp.is_square() == false), "log_det(): given matrix is not square" ); if(tmp.is_empty()) { out_val = eT(0); out_sign = T(1); return true; } arma_debug_assert_blas_size(tmp); podarray ipiv(tmp.n_rows); blas_int info = 0; blas_int n_rows = blas_int(tmp.n_rows); blas_int n_cols = blas_int(tmp.n_cols); lapack::getrf(&n_rows, &n_cols, tmp.memptr(), &n_rows, ipiv.memptr(), &info); // on output tmp appears to be L+U_alt, where U_alt is U with the main diagonal set to zero sword sign = (is_complex::value == false) ? ( (access::tmp_real( tmp.at(0,0) ) < T(0)) ? -1 : +1 ) : +1; eT val = (is_complex::value == false) ? std::log( (access::tmp_real( tmp.at(0,0) ) < T(0)) ? tmp.at(0,0)*T(-1) : tmp.at(0,0) ) : std::log( tmp.at(0,0) ); for(uword i=1; i < tmp.n_rows; ++i) { const eT x = tmp.at(i,i); sign *= (is_complex::value == false) ? ( (access::tmp_real(x) < T(0)) ? -1 : +1 ) : +1; val += (is_complex::value == false) ? std::log( (access::tmp_real(x) < T(0)) ? x*T(-1) : x ) : std::log(x); } for(uword i=0; i < tmp.n_rows; ++i) { if( blas_int(i) != (ipiv.mem[i] - 1) ) // NOTE: adjustment of -1 is required as Fortran counts from 1 { sign *= -1; } } out_val = val; out_sign = T(sign); return (info == 0); } #else { arma_ignore(X); out_val = eT(0); out_sign = T(0); arma_stop("log_det(): use of ATLAS or LAPACK needs to be enabled"); return false; } #endif } //! immediate LU decomposition of a matrix using ATLAS or LAPACK template inline bool auxlib::lu(Mat& L, Mat& U, podarray& ipiv, const Base& X) { arma_extra_debug_sigprint(); U = X.get_ref(); const uword U_n_rows = U.n_rows; const uword U_n_cols = U.n_cols; if(U.is_empty()) { L.set_size(U_n_rows, 0); U.set_size(0, U_n_cols); ipiv.reset(); return true; } #if defined(ARMA_USE_ATLAS) || defined(ARMA_USE_LAPACK) { bool status; #if defined(ARMA_USE_ATLAS) { arma_debug_assert_atlas_size(U); ipiv.set_size( (std::min)(U_n_rows, U_n_cols) ); int info = atlas::clapack_getrf(atlas::CblasColMajor, U_n_rows, U_n_cols, U.memptr(), U_n_rows, ipiv.memptr()); status = (info == 0); } #elif defined(ARMA_USE_LAPACK) { arma_debug_assert_blas_size(U); ipiv.set_size( (std::min)(U_n_rows, U_n_cols) ); blas_int info = 0; blas_int n_rows = U_n_rows; blas_int n_cols = U_n_cols; lapack::getrf(&n_rows, &n_cols, U.memptr(), &n_rows, ipiv.memptr(), &info); // take into account that Fortran counts from 1 arrayops::inplace_minus(ipiv.memptr(), blas_int(1), ipiv.n_elem); status = (info == 0); } #endif L.copy_size(U); for(uword col=0; col < U_n_cols; ++col) { for(uword row=0; (row < col) && (row < U_n_rows); ++row) { L.at(row,col) = eT(0); } if( L.in_range(col,col) == true ) { L.at(col,col) = eT(1); } for(uword row = (col+1); row < U_n_rows; ++row) { L.at(row,col) = U.at(row,col); U.at(row,col) = eT(0); } } return status; } #else { arma_stop("lu(): use of ATLAS or LAPACK needs to be enabled"); return false; } #endif } template inline bool auxlib::lu(Mat& L, Mat& U, Mat& P, const Base& X) { arma_extra_debug_sigprint(); podarray ipiv1; const bool status = auxlib::lu(L, U, ipiv1, X); if(status == true) { if(U.is_empty()) { // L and U have been already set to the correct empty matrices P.eye(L.n_rows, L.n_rows); return true; } const uword n = ipiv1.n_elem; const uword P_rows = U.n_rows; podarray ipiv2(P_rows); const blas_int* ipiv1_mem = ipiv1.memptr(); blas_int* ipiv2_mem = ipiv2.memptr(); for(uword i=0; i(ipiv1_mem[i]); if( ipiv2_mem[i] != ipiv2_mem[k] ) { std::swap( ipiv2_mem[i], ipiv2_mem[k] ); } } P.zeros(P_rows, P_rows); for(uword row=0; row(ipiv2_mem[row])) = eT(1); } if(L.n_cols > U.n_rows) { L.shed_cols(U.n_rows, L.n_cols-1); } if(U.n_rows > L.n_cols) { U.shed_rows(L.n_cols, U.n_rows-1); } } return status; } template inline bool auxlib::lu(Mat& L, Mat& U, const Base& X) { arma_extra_debug_sigprint(); podarray ipiv1; const bool status = auxlib::lu(L, U, ipiv1, X); if(status == true) { if(U.is_empty()) { // L and U have been already set to the correct empty matrices return true; } const uword n = ipiv1.n_elem; const uword P_rows = U.n_rows; podarray ipiv2(P_rows); const blas_int* ipiv1_mem = ipiv1.memptr(); blas_int* ipiv2_mem = ipiv2.memptr(); for(uword i=0; i(ipiv1_mem[i]); if( ipiv2_mem[i] != ipiv2_mem[k] ) { std::swap( ipiv2_mem[i], ipiv2_mem[k] ); L.swap_rows( static_cast(ipiv2_mem[i]), static_cast(ipiv2_mem[k]) ); } } if(L.n_cols > U.n_rows) { L.shed_cols(U.n_rows, L.n_cols-1); } if(U.n_rows > L.n_cols) { U.shed_rows(L.n_cols, U.n_rows-1); } } return status; } //! immediate eigenvalues of a symmetric real matrix using LAPACK template inline bool auxlib::eig_sym(Col& eigval, const Base& X) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { Mat A(X.get_ref()); arma_debug_check( (A.is_square() == false), "eig_sym(): given matrix is not square"); if(A.is_empty()) { eigval.reset(); return true; } arma_debug_assert_blas_size(A); eigval.set_size(A.n_rows); char jobz = 'N'; char uplo = 'U'; blas_int N = blas_int(A.n_rows); blas_int lwork = 3 * ( (std::max)(blas_int(1), 3*N-1) ); blas_int info = 0; podarray work( static_cast(lwork) ); lapack::syev(&jobz, &uplo, &N, A.memptr(), &N, eigval.memptr(), work.memptr(), &lwork, &info); return (info == 0); } #else { arma_ignore(eigval); arma_ignore(X); arma_stop("eig_sym(): use of LAPACK needs to be enabled"); return false; } #endif } //! immediate eigenvalues of a hermitian complex matrix using LAPACK template inline bool auxlib::eig_sym(Col& eigval, const Base,T1>& X) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { typedef typename std::complex eT; Mat A(X.get_ref()); arma_debug_check( (A.is_square() == false), "eig_sym(): given matrix is not square"); if(A.is_empty()) { eigval.reset(); return true; } arma_debug_assert_blas_size(A); eigval.set_size(A.n_rows); char jobz = 'N'; char uplo = 'U'; blas_int N = blas_int(A.n_rows); blas_int lwork = 3 * ( (std::max)(blas_int(1), 2*N-1) ); blas_int info = 0; podarray work( static_cast(lwork) ); podarray rwork( static_cast( (std::max)(blas_int(1), 3*N-2) ) ); arma_extra_debug_print("lapack::heev()"); lapack::heev(&jobz, &uplo, &N, A.memptr(), &N, eigval.memptr(), work.memptr(), &lwork, rwork.memptr(), &info); return (info == 0); } #else { arma_ignore(eigval); arma_ignore(X); arma_stop("eig_sym(): use of LAPACK needs to be enabled"); return false; } #endif } //! immediate eigenvalues and eigenvectors of a symmetric real matrix using LAPACK template inline bool auxlib::eig_sym(Col& eigval, Mat& eigvec, const Base& X) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { eigvec = X.get_ref(); arma_debug_check( (eigvec.is_square() == false), "eig_sym(): given matrix is not square" ); if(eigvec.is_empty()) { eigval.reset(); eigvec.reset(); return true; } arma_debug_assert_blas_size(eigvec); eigval.set_size(eigvec.n_rows); char jobz = 'V'; char uplo = 'U'; blas_int N = blas_int(eigvec.n_rows); blas_int lwork = 3 * ( (std::max)(blas_int(1), 3*N-1) ); blas_int info = 0; podarray work( static_cast(lwork) ); lapack::syev(&jobz, &uplo, &N, eigvec.memptr(), &N, eigval.memptr(), work.memptr(), &lwork, &info); return (info == 0); } #else { arma_ignore(eigval); arma_ignore(eigvec); arma_ignore(X); arma_stop("eig_sym(): use of LAPACK needs to be enabled"); return false; } #endif } //! immediate eigenvalues and eigenvectors of a hermitian complex matrix using LAPACK template inline bool auxlib::eig_sym(Col& eigval, Mat< std::complex >& eigvec, const Base,T1>& X) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { typedef typename std::complex eT; eigvec = X.get_ref(); arma_debug_check( (eigvec.is_square() == false), "eig_sym(): given matrix is not square" ); if(eigvec.is_empty()) { eigval.reset(); eigvec.reset(); return true; } arma_debug_assert_blas_size(eigvec); eigval.set_size(eigvec.n_rows); char jobz = 'V'; char uplo = 'U'; blas_int N = blas_int(eigvec.n_rows); blas_int lwork = 3 * ( (std::max)(blas_int(1), 2*N-1) ); blas_int info = 0; podarray work( static_cast(lwork) ); podarray rwork( static_cast((std::max)(blas_int(1), 3*N-2)) ); arma_extra_debug_print("lapack::heev()"); lapack::heev(&jobz, &uplo, &N, eigvec.memptr(), &N, eigval.memptr(), work.memptr(), &lwork, rwork.memptr(), &info); return (info == 0); } #else { arma_ignore(eigval); arma_ignore(eigvec); arma_ignore(X); arma_stop("eig_sym(): use of LAPACK needs to be enabled"); return false; } #endif } //! immediate eigenvalues and eigenvectors of a symmetric real matrix using LAPACK (divide and conquer algorithm) template inline bool auxlib::eig_sym_dc(Col& eigval, Mat& eigvec, const Base& X) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { eigvec = X.get_ref(); arma_debug_check( (eigvec.is_square() == false), "eig_sym(): given matrix is not square" ); if(eigvec.is_empty()) { eigval.reset(); eigvec.reset(); return true; } arma_debug_assert_blas_size(eigvec); eigval.set_size(eigvec.n_rows); char jobz = 'V'; char uplo = 'U'; blas_int N = blas_int(eigvec.n_rows); blas_int lwork = 2 * (1 + 6*N + 2*(N*N)); blas_int liwork = 3 * (3 + 5*N); blas_int info = 0; podarray work( static_cast( lwork) ); podarray iwork( static_cast(liwork) ); arma_extra_debug_print("lapack::syevd()"); lapack::syevd(&jobz, &uplo, &N, eigvec.memptr(), &N, eigval.memptr(), work.memptr(), &lwork, iwork.memptr(), &liwork, &info); return (info == 0); } #else { arma_ignore(eigval); arma_ignore(eigvec); arma_ignore(X); arma_stop("eig_sym(): use of LAPACK needs to be enabled"); return false; } #endif } //! immediate eigenvalues and eigenvectors of a hermitian complex matrix using LAPACK (divide and conquer algorithm) template inline bool auxlib::eig_sym_dc(Col& eigval, Mat< std::complex >& eigvec, const Base,T1>& X) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { typedef typename std::complex eT; eigvec = X.get_ref(); arma_debug_check( (eigvec.is_square() == false), "eig_sym(): given matrix is not square" ); if(eigvec.is_empty()) { eigval.reset(); eigvec.reset(); return true; } arma_debug_assert_blas_size(eigvec); eigval.set_size(eigvec.n_rows); char jobz = 'V'; char uplo = 'U'; blas_int N = blas_int(eigvec.n_rows); blas_int lwork = 2 * (2*N + N*N); blas_int lrwork = 2 * (1 + 5*N + 2*(N*N)); blas_int liwork = 3 * (3 + 5*N); blas_int info = 0; podarray work( static_cast(lwork) ); podarray rwork( static_cast(lrwork) ); podarray iwork( static_cast(liwork) ); arma_extra_debug_print("lapack::heevd()"); lapack::heevd(&jobz, &uplo, &N, eigvec.memptr(), &N, eigval.memptr(), work.memptr(), &lwork, rwork.memptr(), &lrwork, iwork.memptr(), &liwork, &info); return (info == 0); } #else { arma_ignore(eigval); arma_ignore(eigvec); arma_ignore(X); arma_stop("eig_sym(): use of LAPACK needs to be enabled"); return false; } #endif } //! Eigenvalues and eigenvectors of a general square real matrix using LAPACK. //! The argument 'side' specifies which eigenvectors should be calculated //! (see code for mode details). template inline bool auxlib::eig_gen ( Col< std::complex >& eigval, Mat& l_eigvec, Mat& r_eigvec, const Base& X, const char side ) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { char jobvl; char jobvr; switch(side) { case 'l': // left jobvl = 'V'; jobvr = 'N'; break; case 'r': // right jobvl = 'N'; jobvr = 'V'; break; case 'b': // both jobvl = 'V'; jobvr = 'V'; break; case 'n': // neither jobvl = 'N'; jobvr = 'N'; break; default: arma_stop("eig_gen(): parameter 'side' is invalid"); return false; } Mat A(X.get_ref()); arma_debug_check( (A.is_square() == false), "eig_gen(): given matrix is not square" ); if(A.is_empty()) { eigval.reset(); l_eigvec.reset(); r_eigvec.reset(); return true; } if(A.is_finite() == false) { return false; } // workaround for a bug in LAPACK 3.5 arma_debug_assert_blas_size(A); const uword A_n_rows = A.n_rows; eigval.set_size(A_n_rows); l_eigvec.set_size( ((jobvl == 'V') ? A_n_rows : 1), A_n_rows ); r_eigvec.set_size( ((jobvr == 'V') ? A_n_rows : 1), A_n_rows ); blas_int N = blas_int(A_n_rows); blas_int ldvl = blas_int(l_eigvec.n_rows); blas_int ldvr = blas_int(r_eigvec.n_rows); blas_int lwork = 3 * ( (std::max)(blas_int(1), 4*N) ); blas_int info = 0; podarray work( static_cast(lwork) ); podarray wr(A_n_rows); podarray wi(A_n_rows); arma_extra_debug_print("lapack::geev()"); lapack::geev(&jobvl, &jobvr, &N, A.memptr(), &N, wr.memptr(), wi.memptr(), l_eigvec.memptr(), &ldvl, r_eigvec.memptr(), &ldvr, work.memptr(), &lwork, &info); eigval.set_size(A_n_rows); for(uword i=0; i(wr[i], wi[i]); } return (info == 0); } #else { arma_ignore(eigval); arma_ignore(l_eigvec); arma_ignore(r_eigvec); arma_ignore(X); arma_ignore(side); arma_stop("eig_gen(): use of LAPACK needs to be enabled"); return false; } #endif } //! Eigenvalues and eigenvectors of a general square complex matrix using LAPACK //! The argument 'side' specifies which eigenvectors should be calculated //! (see code for mode details). template inline bool auxlib::eig_gen ( Col< std::complex >& eigval, Mat< std::complex >& l_eigvec, Mat< std::complex >& r_eigvec, const Base< std::complex, T1 >& X, const char side ) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { typedef typename std::complex eT; char jobvl; char jobvr; switch(side) { case 'l': // left jobvl = 'V'; jobvr = 'N'; break; case 'r': // right jobvl = 'N'; jobvr = 'V'; break; case 'b': // both jobvl = 'V'; jobvr = 'V'; break; case 'n': // neither jobvl = 'N'; jobvr = 'N'; break; default: arma_stop("eig_gen(): parameter 'side' is invalid"); return false; } Mat A(X.get_ref()); arma_debug_check( (A.is_square() == false), "eig_gen(): given matrix is not square" ); if(A.is_empty()) { eigval.reset(); l_eigvec.reset(); r_eigvec.reset(); return true; } if(A.is_finite() == false) { return false; } // workaround for a bug in LAPACK 3.5 arma_debug_assert_blas_size(A); const uword A_n_rows = A.n_rows; eigval.set_size(A_n_rows); l_eigvec.set_size( ((jobvl == 'V') ? A_n_rows : 1), A_n_rows ); r_eigvec.set_size( ((jobvr == 'V') ? A_n_rows : 1), A_n_rows ); blas_int N = blas_int(A_n_rows); blas_int ldvl = blas_int(l_eigvec.n_rows); blas_int ldvr = blas_int(r_eigvec.n_rows); blas_int lwork = 3 * ( (std::max)(blas_int(1), 2*N) ); blas_int info = 0; podarray work( static_cast(lwork) ); podarray rwork( static_cast(2*N) ); arma_extra_debug_print("lapack::cx_geev()"); lapack::cx_geev(&jobvl, &jobvr, &N, A.memptr(), &N, eigval.memptr(), l_eigvec.memptr(), &ldvl, r_eigvec.memptr(), &ldvr, work.memptr(), &lwork, rwork.memptr(), &info); return (info == 0); } #else { arma_ignore(eigval); arma_ignore(l_eigvec); arma_ignore(r_eigvec); arma_ignore(X); arma_ignore(side); arma_stop("eig_gen(): use of LAPACK needs to be enabled"); return false; } #endif } //! Eigenvalues and eigenvectors of general square real matrix pair. //! The argument 'side' specifies which eigenvectors should be calculated. template inline bool auxlib::eig_pair ( Col< std::complex >& eigval, Mat& l_eigvec, Mat& r_eigvec, const Base& X, const Base& Y, const char side ) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { char jobvl; char jobvr; switch(side) { case 'l': // left jobvl = 'V'; jobvr = 'N'; break; case 'r': // right jobvl = 'N'; jobvr = 'V'; break; case 'b': // both jobvl = 'V'; jobvr = 'V'; break; case 'n': // neither jobvl = 'N'; jobvr = 'N'; break; default: arma_stop("eig_pair(): parameter 'side' is invalid"); return false; } Mat A(X.get_ref()); Mat B(Y.get_ref()); arma_debug_check( ((A.is_square() == false) || (B.is_square() == false)), "eig_pair(): given matrix is not square" ); arma_debug_check( (A.n_rows != B.n_rows), "eig_pair(): given matrices must have the same size" ); if(A.is_empty()) { eigval.reset(); l_eigvec.reset(); r_eigvec.reset(); return true; } arma_debug_assert_blas_size(A); const uword A_n_rows = A.n_rows; eigval.set_size(A_n_rows); l_eigvec.set_size( ((jobvl == 'V') ? A_n_rows : 1), A_n_rows ); r_eigvec.set_size( ((jobvr == 'V') ? A_n_rows : 1), A_n_rows ); blas_int N = blas_int(A_n_rows); blas_int ldvl = blas_int(l_eigvec.n_rows); blas_int ldvr = blas_int(r_eigvec.n_rows); blas_int lwork = 3 * ( (std::max)(blas_int(1), 8*N) ); blas_int info = 0; podarray work( static_cast(lwork) ); podarray alphar(A_n_rows); podarray alphai(A_n_rows); podarray beta(A_n_rows); arma_extra_debug_print("lapack::ggev()"); lapack::ggev ( &jobvl, &jobvr, &N, A.memptr(), &N, B.memptr(), &N, alphar.memptr(), alphai.memptr(), beta.memptr(), l_eigvec.memptr(), &ldvl, r_eigvec.memptr(), &ldvr, work.memptr(), &lwork, &info ); if(info == 0) { // from LAPACK docs: // If ALPHAI(j) is zero, then the j-th eigenvalue is real; // if positive, then the j-th and (j+1)-st eigenvalues are a complex conjugate pair, // with ALPHAI(j+1) negative. eigval.set_size(A_n_rows); const T* alphar_mem = alphar.memptr(); const T* alphai_mem = alphai.memptr(); const T* beta_mem = beta.memptr(); bool beta_has_zero = false; for(uword j=0; j(re, im); if( (alphai_val > T(0)) && (j < (A_n_rows-1)) ) { // ensure we have exact conjugate ++j; eigval[j] = std::complex(re,-im); } } arma_debug_warn(beta_has_zero, "eig_pair(): warning: given matrix appears ill-conditioned"); return true; } else { return false; } } #else { arma_ignore(eigval); arma_ignore(l_eigvec); arma_ignore(r_eigvec); arma_ignore(X); arma_ignore(Y); arma_ignore(side); arma_stop("eig_pair(): use of LAPACK needs to be enabled"); return false; } #endif } //! Eigenvalues and eigenvectors of general square complex matrix pair. //! The argument 'side' specifies which eigenvectors should be calculated template inline bool auxlib::eig_pair ( Col< std::complex >& eigval, Mat< std::complex >& l_eigvec, Mat< std::complex >& r_eigvec, const Base< std::complex, T1 >& X, const Base< std::complex, T2 >& Y, const char side ) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { typedef typename std::complex eT; char jobvl; char jobvr; switch(side) { case 'l': // left jobvl = 'V'; jobvr = 'N'; break; case 'r': // right jobvl = 'N'; jobvr = 'V'; break; case 'b': // both jobvl = 'V'; jobvr = 'V'; break; case 'n': // neither jobvl = 'N'; jobvr = 'N'; break; default: arma_stop("eig_pair(): parameter 'side' is invalid"); return false; } Mat A(X.get_ref()); Mat B(Y.get_ref()); arma_debug_check( ((A.is_square() == false) || (B.is_square() == false)), "eig_pair(): given matrix is not square" ); arma_debug_check( (A.n_rows != B.n_rows), "eig_pair(): given matrices must have the same size" ); if(A.is_empty()) { eigval.reset(); l_eigvec.reset(); r_eigvec.reset(); return true; } arma_debug_assert_blas_size(A); const uword A_n_rows = A.n_rows; podarray alpha(A_n_rows); podarray beta(A_n_rows); l_eigvec.set_size( ((jobvl == 'V') ? A_n_rows : 1), A_n_rows ); r_eigvec.set_size( ((jobvr == 'V') ? A_n_rows : 1), A_n_rows ); blas_int N = blas_int(A_n_rows); blas_int ldvl = blas_int(l_eigvec.n_rows); blas_int ldvr = blas_int(r_eigvec.n_rows); blas_int lwork = 3 * ((std::max)(blas_int(1),2*N)); blas_int info = 0; podarray work( static_cast(lwork) ); podarray rwork( static_cast(8*N) ); arma_extra_debug_print("lapack::cx_ggev()"); lapack::cx_ggev ( &jobvl, &jobvr, &N, A.memptr(), &N, B.memptr(), &N, alpha.memptr(), beta.memptr(), l_eigvec.memptr(), &ldvl, r_eigvec.memptr(), &ldvr, work.memptr(), &lwork, rwork.memptr(), &info ); if(info == 0) { // TODO: figure out a more robust way to create the eigen values; // TODO: from LAPACK docs: the quotients ALPHA(j)/BETA(j) may easily over- or underflow, and BETA(j) may even be zero eigval.set_size(A_n_rows); eT* eigval_mem = eigval.memptr(); const eT* alpha_mem = alpha.memptr(); const eT* beta_mem = beta.memptr(); const std::complex cx_zero( T(0), T(0) ); bool beta_has_zero = false; for(uword i=0; i inline bool auxlib::chol(Mat& out, const Base& X, const uword layout) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { out = X.get_ref(); arma_debug_check( (out.is_square() == false), "chol(): given matrix is not square" ); if(out.is_empty()) { return true; } arma_debug_assert_blas_size(out); const uword out_n_rows = out.n_rows; char uplo = (layout == 0) ? 'U' : 'L'; blas_int n = out_n_rows; blas_int info = 0; lapack::potrf(&uplo, &n, out.memptr(), &n, &info); if(layout == 0) { for(uword col=0; col < out_n_rows; ++col) { eT* colptr = out.colptr(col); for(uword row=(col+1); row < out_n_rows; ++row) { colptr[row] = eT(0); } } } else { for(uword col=1; col < out_n_rows; ++col) { eT* colptr = out.colptr(col); for(uword row=0; row < col; ++row) { colptr[row] = eT(0); } } } return (info == 0); } #else { arma_ignore(out); arma_ignore(X); arma_ignore(layout); arma_stop("chol(): use of LAPACK needs to be enabled"); return false; } #endif } template inline bool auxlib::qr(Mat& Q, Mat& R, const Base& X) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { R = X.get_ref(); const uword R_n_rows = R.n_rows; const uword R_n_cols = R.n_cols; if(R.is_empty()) { Q.eye(R_n_rows, R_n_rows); return true; } arma_debug_assert_blas_size(R); blas_int m = static_cast(R_n_rows); blas_int n = static_cast(R_n_cols); blas_int lwork = 0; blas_int lwork_min = (std::max)(blas_int(1), (std::max)(m,n)); // take into account requirements of geqrf() _and_ orgqr()/ungqr() blas_int k = (std::min)(m,n); blas_int info = 0; podarray tau( static_cast(k) ); eT work_query[2]; blas_int lwork_query = -1; lapack::geqrf(&m, &n, R.memptr(), &m, tau.memptr(), &work_query[0], &lwork_query, &info); if(info == 0) { const blas_int lwork_proposed = static_cast( access::tmp_real(work_query[0]) ); lwork = (lwork_proposed > lwork_min) ? lwork_proposed : lwork_min; } else { return false; } podarray work( static_cast(lwork) ); lapack::geqrf(&m, &n, R.memptr(), &m, tau.memptr(), work.memptr(), &lwork, &info); Q.set_size(R_n_rows, R_n_rows); arrayops::copy( Q.memptr(), R.memptr(), (std::min)(Q.n_elem, R.n_elem) ); // // construct R for(uword col=0; col < R_n_cols; ++col) { for(uword row=(col+1); row < R_n_rows; ++row) { R.at(row,col) = eT(0); } } if( (is_float::value) || (is_double::value) ) { lapack::orgqr(&m, &m, &k, Q.memptr(), &m, tau.memptr(), work.memptr(), &lwork, &info); } else if( (is_supported_complex_float::value) || (is_supported_complex_double::value) ) { lapack::ungqr(&m, &m, &k, Q.memptr(), &m, tau.memptr(), work.memptr(), &lwork, &info); } return (info == 0); } #else { arma_ignore(Q); arma_ignore(R); arma_ignore(X); arma_stop("qr(): use of LAPACK needs to be enabled"); return false; } #endif } template inline bool auxlib::qr_econ(Mat& Q, Mat& R, const Base& X) { arma_extra_debug_sigprint(); // This function implements a memory-efficient QR for a non-square X that has dimensions m x n. // This basically discards the basis for the null-space. // // if m <= n: (use standard routine) // Q[m,m]*R[m,n] = X[m,n] // geqrf Needs A[m,n]: Uses R // orgqr Needs A[m,m]: Uses Q // otherwise: (memory-efficient routine) // Q[m,n]*R[n,n] = X[m,n] // geqrf Needs A[m,n]: Uses Q // geqrf Needs A[m,n]: Uses Q #if defined(ARMA_USE_LAPACK) { if(is_Mat::value) { const unwrap tmp(X.get_ref()); const Mat& M = tmp.M; if(M.n_rows < M.n_cols) { return auxlib::qr(Q, R, X); } } Q = X.get_ref(); const uword Q_n_rows = Q.n_rows; const uword Q_n_cols = Q.n_cols; if( Q_n_rows <= Q_n_cols ) { return auxlib::qr(Q, R, Q); } if(Q.is_empty()) { Q.set_size(Q_n_rows, 0 ); R.set_size(0, Q_n_cols); return true; } arma_debug_assert_blas_size(Q); blas_int m = static_cast(Q_n_rows); blas_int n = static_cast(Q_n_cols); blas_int lwork = 0; blas_int lwork_min = (std::max)(blas_int(1), (std::max)(m,n)); // take into account requirements of geqrf() _and_ orgqr()/ungqr() blas_int k = (std::min)(m,n); blas_int info = 0; podarray tau( static_cast(k) ); eT work_query[2]; blas_int lwork_query = -1; lapack::geqrf(&m, &n, Q.memptr(), &m, tau.memptr(), &work_query[0], &lwork_query, &info); if(info == 0) { const blas_int lwork_proposed = static_cast( access::tmp_real(work_query[0]) ); lwork = (lwork_proposed > lwork_min) ? lwork_proposed : lwork_min; } else { return false; } podarray work( static_cast(lwork) ); lapack::geqrf(&m, &n, Q.memptr(), &m, tau.memptr(), work.memptr(), &lwork, &info); // Q now has the elements on and above the diagonal of the array // contain the min(M,N)-by-N upper trapezoidal matrix Q // (Q is upper triangular if m >= n); // the elements below the diagonal, with the array TAU, // represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors. R.set_size(Q_n_cols, Q_n_cols); // // construct R for(uword col=0; col < Q_n_cols; ++col) { for(uword row=0; row <= col; ++row) { R.at(row,col) = Q.at(row,col); } for(uword row=(col+1); row < Q_n_cols; ++row) { R.at(row,col) = eT(0); } } if( (is_float::value) || (is_double::value) ) { lapack::orgqr(&m, &n, &k, Q.memptr(), &m, tau.memptr(), work.memptr(), &lwork, &info); } else if( (is_supported_complex_float::value) || (is_supported_complex_double::value) ) { lapack::ungqr(&m, &n, &k, Q.memptr(), &m, tau.memptr(), work.memptr(), &lwork, &info); } return (info == 0); } #else { arma_ignore(Q); arma_ignore(R); arma_ignore(X); arma_stop("qr_econ(): use of LAPACK needs to be enabled"); return false; } #endif } template inline bool auxlib::svd(Col& S, const Base& X, uword& X_n_rows, uword& X_n_cols) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { Mat A(X.get_ref()); X_n_rows = A.n_rows; X_n_cols = A.n_cols; if(A.is_empty()) { S.reset(); return true; } arma_debug_assert_blas_size(A); Mat U(1, 1); Mat V(1, A.n_cols); char jobu = 'N'; char jobvt = 'N'; blas_int m = A.n_rows; blas_int n = A.n_cols; blas_int min_mn = (std::min)(m,n); blas_int lda = A.n_rows; blas_int ldu = U.n_rows; blas_int ldvt = V.n_rows; blas_int lwork = 0; blas_int lwork_min = (std::max)( blas_int(1), (std::max)( (3*min_mn + (std::max)(m,n)), 5*min_mn ) ); blas_int info = 0; S.set_size( static_cast(min_mn) ); eT work_query[2]; blas_int lwork_query = -1; lapack::gesvd ( &jobu, &jobvt, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, &work_query[0], &lwork_query, &info ); if(info == 0) { const blas_int lwork_proposed = static_cast( work_query[0] ); lwork = (lwork_proposed > lwork_min) ? lwork_proposed : lwork_min; podarray work( static_cast(lwork) ); lapack::gesvd ( &jobu, &jobvt, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, work.memptr(), &lwork, &info ); } return (info == 0); } #else { arma_ignore(S); arma_ignore(X); arma_ignore(X_n_rows); arma_ignore(X_n_cols); arma_stop("svd(): use of LAPACK needs to be enabled"); return false; } #endif } template inline bool auxlib::svd(Col& S, const Base, T1>& X, uword& X_n_rows, uword& X_n_cols) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { typedef std::complex eT; Mat A(X.get_ref()); X_n_rows = A.n_rows; X_n_cols = A.n_cols; if(A.is_empty()) { S.reset(); return true; } arma_debug_assert_blas_size(A); Mat U(1, 1); Mat V(1, A.n_cols); char jobu = 'N'; char jobvt = 'N'; blas_int m = A.n_rows; blas_int n = A.n_cols; blas_int min_mn = (std::min)(m,n); blas_int lda = A.n_rows; blas_int ldu = U.n_rows; blas_int ldvt = V.n_rows; blas_int lwork = 3 * ( (std::max)(blas_int(1), 2*min_mn+(std::max)(m,n) ) ); blas_int info = 0; S.set_size( static_cast(min_mn) ); podarray work( static_cast(lwork ) ); podarray< T> rwork( static_cast(5*min_mn) ); // let gesvd_() calculate the optimum size of the workspace blas_int lwork_tmp = -1; lapack::cx_gesvd ( &jobu, &jobvt, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, work.memptr(), &lwork_tmp, rwork.memptr(), &info ); if(info == 0) { blas_int proposed_lwork = static_cast(real(work[0])); if(proposed_lwork > lwork) { lwork = proposed_lwork; work.set_size( static_cast(lwork) ); } lapack::cx_gesvd ( &jobu, &jobvt, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, work.memptr(), &lwork, rwork.memptr(), &info ); } return (info == 0); } #else { arma_ignore(S); arma_ignore(X); arma_ignore(X_n_rows); arma_ignore(X_n_cols); arma_stop("svd(): use of LAPACK needs to be enabled"); return false; } #endif } template inline bool auxlib::svd(Col& S, const Base& X) { arma_extra_debug_sigprint(); uword junk; return auxlib::svd(S, X, junk, junk); } template inline bool auxlib::svd(Col& S, const Base, T1>& X) { arma_extra_debug_sigprint(); uword junk; return auxlib::svd(S, X, junk, junk); } template inline bool auxlib::svd(Mat& U, Col& S, Mat& V, const Base& X) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { Mat A(X.get_ref()); if(A.is_empty()) { U.eye(A.n_rows, A.n_rows); S.reset(); V.eye(A.n_cols, A.n_cols); return true; } arma_debug_assert_blas_size(A); U.set_size(A.n_rows, A.n_rows); V.set_size(A.n_cols, A.n_cols); char jobu = 'A'; char jobvt = 'A'; blas_int m = blas_int(A.n_rows); blas_int n = blas_int(A.n_cols); blas_int min_mn = (std::min)(m,n); blas_int lda = blas_int(A.n_rows); blas_int ldu = blas_int(U.n_rows); blas_int ldvt = blas_int(V.n_rows); blas_int lwork_min = (std::max)( blas_int(1), (std::max)( (3*min_mn + (std::max)(m,n)), 5*min_mn ) ); blas_int lwork = 0; blas_int info = 0; S.set_size( static_cast(min_mn) ); // let gesvd_() calculate the optimum size of the workspace eT work_query[2]; blas_int lwork_query = -1; lapack::gesvd ( &jobu, &jobvt, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, &work_query[0], &lwork_query, &info ); if(info == 0) { const blas_int lwork_proposed = static_cast( work_query[0] ); lwork = (lwork_proposed > lwork_min) ? lwork_proposed : lwork_min; podarray work( static_cast(lwork) ); lapack::gesvd ( &jobu, &jobvt, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, work.memptr(), &lwork, &info ); op_strans::apply_mat_inplace(V); } return (info == 0); } #else { arma_ignore(U); arma_ignore(S); arma_ignore(V); arma_ignore(X); arma_stop("svd(): use of LAPACK needs to be enabled"); return false; } #endif } template inline bool auxlib::svd(Mat< std::complex >& U, Col& S, Mat< std::complex >& V, const Base< std::complex, T1>& X) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { typedef std::complex eT; Mat A(X.get_ref()); if(A.is_empty()) { U.eye(A.n_rows, A.n_rows); S.reset(); V.eye(A.n_cols, A.n_cols); return true; } arma_debug_assert_blas_size(A); U.set_size(A.n_rows, A.n_rows); V.set_size(A.n_cols, A.n_cols); char jobu = 'A'; char jobvt = 'A'; blas_int m = blas_int(A.n_rows); blas_int n = blas_int(A.n_cols); blas_int min_mn = (std::min)(m,n); blas_int lda = blas_int(A.n_rows); blas_int ldu = blas_int(U.n_rows); blas_int ldvt = blas_int(V.n_rows); blas_int lwork = 3 * ( (std::max)(blas_int(1), 2*min_mn + (std::max)(m,n) ) ); blas_int info = 0; S.set_size( static_cast(min_mn) ); podarray work( static_cast(lwork ) ); podarray rwork( static_cast(5*min_mn) ); // let gesvd_() calculate the optimum size of the workspace blas_int lwork_tmp = -1; lapack::cx_gesvd ( &jobu, &jobvt, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, work.memptr(), &lwork_tmp, rwork.memptr(), &info ); if(info == 0) { blas_int proposed_lwork = static_cast(real(work[0])); if(proposed_lwork > lwork) { lwork = proposed_lwork; work.set_size( static_cast(lwork) ); } lapack::cx_gesvd ( &jobu, &jobvt, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, work.memptr(), &lwork, rwork.memptr(), &info ); op_htrans::apply_mat_inplace(V); } return (info == 0); } #else { arma_ignore(U); arma_ignore(S); arma_ignore(V); arma_ignore(X); arma_stop("svd(): use of LAPACK needs to be enabled"); return false; } #endif } template inline bool auxlib::svd_econ(Mat& U, Col& S, Mat& V, const Base& X, const char mode) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { Mat A(X.get_ref()); arma_debug_assert_blas_size(A); blas_int m = blas_int(A.n_rows); blas_int n = blas_int(A.n_cols); blas_int min_mn = (std::min)(m,n); blas_int lda = blas_int(A.n_rows); S.set_size( static_cast(min_mn) ); blas_int ldu = 0; blas_int ldvt = 0; char jobu; char jobvt; switch(mode) { case 'l': jobu = 'S'; jobvt = 'N'; ldu = m; ldvt = 1; U.set_size( static_cast(ldu), static_cast(min_mn) ); V.reset(); break; case 'r': jobu = 'N'; jobvt = 'S'; ldu = 1; ldvt = (std::min)(m,n); U.reset(); V.set_size( static_cast(ldvt), static_cast(n) ); break; case 'b': jobu = 'S'; jobvt = 'S'; ldu = m; ldvt = (std::min)(m,n); U.set_size( static_cast(ldu), static_cast(min_mn) ); V.set_size( static_cast(ldvt), static_cast(n ) ); break; default: U.reset(); S.reset(); V.reset(); return false; } if(A.is_empty()) { U.eye(); S.reset(); V.eye(); return true; } blas_int lwork = 3 * ( (std::max)(blas_int(1), (std::max)( (3*min_mn + (std::max)(m,n)), 5*min_mn ) ) ); blas_int info = 0; podarray work( static_cast(lwork) ); // let gesvd_() calculate the optimum size of the workspace blas_int lwork_tmp = -1; lapack::gesvd ( &jobu, &jobvt, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, work.memptr(), &lwork_tmp, &info ); if(info == 0) { blas_int proposed_lwork = static_cast(work[0]); if(proposed_lwork > lwork) { lwork = proposed_lwork; work.set_size( static_cast(lwork) ); } lapack::gesvd ( &jobu, &jobvt, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, work.memptr(), &lwork, &info ); op_strans::apply_mat_inplace(V); } return (info == 0); } #else { arma_ignore(U); arma_ignore(S); arma_ignore(V); arma_ignore(X); arma_ignore(mode); arma_stop("svd(): use of LAPACK needs to be enabled"); return false; } #endif } template inline bool auxlib::svd_econ(Mat< std::complex >& U, Col& S, Mat< std::complex >& V, const Base< std::complex, T1>& X, const char mode) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { typedef std::complex eT; Mat A(X.get_ref()); arma_debug_assert_blas_size(A); blas_int m = blas_int(A.n_rows); blas_int n = blas_int(A.n_cols); blas_int min_mn = (std::min)(m,n); blas_int lda = blas_int(A.n_rows); S.set_size( static_cast(min_mn) ); blas_int ldu = 0; blas_int ldvt = 0; char jobu; char jobvt; switch(mode) { case 'l': jobu = 'S'; jobvt = 'N'; ldu = m; ldvt = 1; U.set_size( static_cast(ldu), static_cast(min_mn) ); V.reset(); break; case 'r': jobu = 'N'; jobvt = 'S'; ldu = 1; ldvt = (std::min)(m,n); U.reset(); V.set_size( static_cast(ldvt), static_cast(n) ); break; case 'b': jobu = 'S'; jobvt = 'S'; ldu = m; ldvt = (std::min)(m,n); U.set_size( static_cast(ldu), static_cast(min_mn) ); V.set_size( static_cast(ldvt), static_cast(n) ); break; default: U.reset(); S.reset(); V.reset(); return false; } if(A.is_empty()) { U.eye(); S.reset(); V.eye(); return true; } blas_int lwork = 3 * ( (std::max)(blas_int(1), (std::max)( (3*min_mn + (std::max)(m,n)), 5*min_mn ) ) ); blas_int info = 0; podarray work( static_cast(lwork ) ); podarray rwork( static_cast(5*min_mn) ); // let gesvd_() calculate the optimum size of the workspace blas_int lwork_tmp = -1; lapack::cx_gesvd ( &jobu, &jobvt, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, work.memptr(), &lwork_tmp, rwork.memptr(), &info ); if(info == 0) { blas_int proposed_lwork = static_cast(real(work[0])); if(proposed_lwork > lwork) { lwork = proposed_lwork; work.set_size( static_cast(lwork) ); } lapack::cx_gesvd ( &jobu, &jobvt, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, work.memptr(), &lwork, rwork.memptr(), &info ); op_htrans::apply_mat_inplace(V); } return (info == 0); } #else { arma_ignore(U); arma_ignore(S); arma_ignore(V); arma_ignore(X); arma_ignore(mode); arma_stop("svd(): use of LAPACK needs to be enabled"); return false; } #endif } // EXPERIMENTAL template inline bool auxlib::svd_dc(Col& S, const Base& X, uword& X_n_rows, uword& X_n_cols) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { Mat A(X.get_ref()); X_n_rows = A.n_rows; X_n_cols = A.n_cols; if(A.is_empty()) { S.reset(); return true; } arma_debug_assert_blas_size(A); Mat U(1, 1); Mat V(1, 1); char jobz = 'N'; blas_int m = blas_int(A.n_rows); blas_int n = blas_int(A.n_cols); blas_int min_mn = (std::min)(m,n); blas_int lda = blas_int(A.n_rows); blas_int ldu = blas_int(U.n_rows); blas_int ldvt = blas_int(V.n_rows); blas_int lwork = 3 * ( 3*min_mn + std::max( std::max(m,n), 7*min_mn ) ); blas_int info = 0; S.set_size( static_cast(min_mn) ); podarray work( static_cast(lwork ) ); podarray iwork( static_cast(8*min_mn) ); lapack::gesdd ( &jobz, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, work.memptr(), &lwork, iwork.memptr(), &info ); return (info == 0); } #else { arma_ignore(S); arma_ignore(X); arma_ignore(X_n_rows); arma_ignore(X_n_cols); arma_stop("svd(): use of LAPACK needs to be enabled"); return false; } #endif } // EXPERIMENTAL template inline bool auxlib::svd_dc(Col& S, const Base, T1>& X, uword& X_n_rows, uword& X_n_cols) { arma_extra_debug_sigprint(); #if (defined(ARMA_USE_LAPACK) && defined(ARMA_DONT_USE_CX_GESDD)) { arma_extra_debug_print("auxlib::svd_dc(): redirecting to auxlib::svd(), as use of lapack::cx_gesdd() is disabled"); return auxlib::svd(S, X, X_n_rows, X_n_cols); } #elif defined(ARMA_USE_LAPACK) { typedef std::complex eT; Mat A(X.get_ref()); X_n_rows = A.n_rows; X_n_cols = A.n_cols; if(A.is_empty()) { S.reset(); return true; } arma_debug_assert_blas_size(A); Mat U(1, 1); Mat V(1, 1); char jobz = 'N'; blas_int m = blas_int(A.n_rows); blas_int n = blas_int(A.n_cols); blas_int min_mn = (std::min)(m,n); blas_int lda = blas_int(A.n_rows); blas_int ldu = blas_int(U.n_rows); blas_int ldvt = blas_int(V.n_rows); blas_int lwork = 3 * (2*min_mn + std::max(m,n)); blas_int info = 0; S.set_size( static_cast(min_mn) ); podarray work( static_cast(lwork ) ); podarray rwork( static_cast(7*min_mn) ); // LAPACK 3.4.2 docs state 5*min(m,n), while zgesdd() seems to write past the end podarray iwork( static_cast(8*min_mn) ); lapack::cx_gesdd ( &jobz, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, work.memptr(), &lwork, rwork.memptr(), iwork.memptr(), &info ); return (info == 0); } #else { arma_ignore(S); arma_ignore(X); arma_ignore(X_n_rows); arma_ignore(X_n_cols); arma_stop("svd(): use of LAPACK needs to be enabled"); return false; } #endif } // EXPERIMENTAL template inline bool auxlib::svd_dc(Col& S, const Base& X) { arma_extra_debug_sigprint(); uword junk; return auxlib::svd_dc(S, X, junk, junk); } // EXPERIMENTAL template inline bool auxlib::svd_dc(Col& S, const Base, T1>& X) { arma_extra_debug_sigprint(); uword junk; return auxlib::svd_dc(S, X, junk, junk); } template inline bool auxlib::svd_dc(Mat& U, Col& S, Mat& V, const Base& X) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { Mat A(X.get_ref()); if(A.is_empty()) { U.eye(A.n_rows, A.n_rows); S.reset(); V.eye(A.n_cols, A.n_cols); return true; } arma_debug_assert_blas_size(A); U.set_size(A.n_rows, A.n_rows); V.set_size(A.n_cols, A.n_cols); char jobz = 'A'; blas_int m = blas_int(A.n_rows); blas_int n = blas_int(A.n_cols); blas_int min_mn = (std::min)(m,n); blas_int max_mn = (std::max)(m,n); blas_int lda = blas_int(A.n_rows); blas_int ldu = blas_int(U.n_rows); blas_int ldvt = blas_int(V.n_rows); blas_int lwork1 = 3*min_mn*min_mn + (std::max)( max_mn, 4*min_mn*min_mn + 4*min_mn ); blas_int lwork2 = 3*min_mn + (std::max)( max_mn, 4*min_mn*min_mn + 3*min_mn + max_mn ); blas_int lwork = 2 * ((std::max)(lwork1, lwork2)); // due to differences between lapack 3.1 and 3.4 blas_int info = 0; S.set_size( static_cast(min_mn) ); podarray work( static_cast(lwork ) ); podarray iwork( static_cast(8*min_mn) ); lapack::gesdd ( &jobz, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, work.memptr(), &lwork, iwork.memptr(), &info ); op_strans::apply_mat_inplace(V); return (info == 0); } #else { arma_ignore(U); arma_ignore(S); arma_ignore(V); arma_ignore(X); arma_stop("svd(): use of LAPACK needs to be enabled"); return false; } #endif } template inline bool auxlib::svd_dc(Mat< std::complex >& U, Col& S, Mat< std::complex >& V, const Base< std::complex, T1>& X) { arma_extra_debug_sigprint(); #if (defined(ARMA_USE_LAPACK) && defined(ARMA_DONT_USE_CX_GESDD)) { arma_extra_debug_print("auxlib::svd_dc(): redirecting to auxlib::svd(), as use of lapack::cx_gesdd() is disabled"); return auxlib::svd(U, S, V, X); } #elif defined(ARMA_USE_LAPACK) { typedef std::complex eT; Mat A(X.get_ref()); if(A.is_empty()) { U.eye(A.n_rows, A.n_rows); S.reset(); V.eye(A.n_cols, A.n_cols); return true; } arma_debug_assert_blas_size(A); U.set_size(A.n_rows, A.n_rows); V.set_size(A.n_cols, A.n_cols); char jobz = 'A'; blas_int m = blas_int(A.n_rows); blas_int n = blas_int(A.n_cols); blas_int min_mn = (std::min)(m,n); blas_int max_mn = (std::max)(m,n); blas_int lda = blas_int(A.n_rows); blas_int ldu = blas_int(U.n_rows); blas_int ldvt = blas_int(V.n_rows); blas_int lwork = 2 * (min_mn*min_mn + 2*min_mn + max_mn); blas_int lrwork1 = 5*min_mn*min_mn + 7*min_mn; blas_int lrwork2 = min_mn * ((std::max)(5*min_mn+7, 2*max_mn + 2*min_mn+1)); blas_int lrwork = (std::max)(lrwork1, lrwork2); // due to differences between lapack 3.1 and 3.4 blas_int info = 0; S.set_size( static_cast(min_mn) ); podarray work( static_cast(lwork ) ); podarray rwork( static_cast(lrwork ) ); podarray iwork( static_cast(8*min_mn) ); lapack::cx_gesdd ( &jobz, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, work.memptr(), &lwork, rwork.memptr(), iwork.memptr(), &info ); op_htrans::apply_mat_inplace(V); return (info == 0); } #else { arma_ignore(U); arma_ignore(S); arma_ignore(V); arma_ignore(X); arma_stop("svd(): use of LAPACK needs to be enabled"); return false; } #endif } template inline bool auxlib::svd_dc_econ(Mat& U, Col& S, Mat& V, const Base& X) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { Mat A(X.get_ref()); arma_debug_assert_blas_size(A); char jobz = 'S'; blas_int m = blas_int(A.n_rows); blas_int n = blas_int(A.n_cols); blas_int min_mn = (std::min)(m,n); blas_int max_mn = (std::max)(m,n); blas_int lda = blas_int(A.n_rows); blas_int ldu = m; blas_int ldvt = min_mn; blas_int lwork1 = 3*min_mn*min_mn + (std::max)( max_mn, 4*min_mn*min_mn + 4*min_mn ); blas_int lwork2 = 3*min_mn + (std::max)( max_mn, 4*min_mn*min_mn + 3*min_mn + max_mn ); blas_int lwork = 2 * ((std::max)(lwork1, lwork2)); // due to differences between lapack 3.1 and 3.4 blas_int info = 0; if(A.is_empty()) { U.eye(); S.reset(); V.eye( static_cast(n), static_cast(min_mn) ); return true; } S.set_size( static_cast(min_mn) ); U.set_size( static_cast(m), static_cast(min_mn) ); V.set_size( static_cast(min_mn), static_cast(n) ); podarray work( static_cast(lwork ) ); podarray iwork( static_cast(8*min_mn) ); lapack::gesdd ( &jobz, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, work.memptr(), &lwork, iwork.memptr(), &info ); op_strans::apply_mat_inplace(V); return (info == 0); } #else { arma_ignore(U); arma_ignore(S); arma_ignore(V); arma_ignore(X); arma_stop("svd(): use of LAPACK needs to be enabled"); return false; } #endif } template inline bool auxlib::svd_dc_econ(Mat< std::complex >& U, Col& S, Mat< std::complex >& V, const Base< std::complex, T1>& X) { arma_extra_debug_sigprint(); #if (defined(ARMA_USE_LAPACK) && defined(ARMA_DONT_USE_CX_GESDD)) { arma_extra_debug_print("auxlib::svd_dc_econ(): redirecting to auxlib::svd_econ(), as use of lapack::cx_gesdd() is disabled"); return auxlib::svd_econ(U, S, V, X, 'b'); } #elif defined(ARMA_USE_LAPACK) { typedef std::complex eT; Mat A(X.get_ref()); arma_debug_assert_blas_size(A); char jobz = 'S'; blas_int m = blas_int(A.n_rows); blas_int n = blas_int(A.n_cols); blas_int min_mn = (std::min)(m,n); blas_int max_mn = (std::max)(m,n); blas_int lda = blas_int(A.n_rows); blas_int ldu = m; blas_int ldvt = min_mn; blas_int lwork = 2 * (min_mn*min_mn + 2*min_mn + max_mn); blas_int lrwork1 = 5*min_mn*min_mn + 7*min_mn; blas_int lrwork2 = min_mn * ((std::max)(5*min_mn+7, 2*max_mn + 2*min_mn+1)); blas_int lrwork = (std::max)(lrwork1, lrwork2); // due to differences between lapack 3.1 and 3.4 blas_int info = 0; if(A.is_empty()) { U.eye(); S.reset(); V.eye( static_cast(n), static_cast(min_mn) ); return true; } S.set_size( static_cast(min_mn) ); U.set_size( static_cast(m), static_cast(min_mn) ); V.set_size( static_cast(min_mn), static_cast(n) ); podarray work( static_cast(lwork ) ); podarray rwork( static_cast(lrwork ) ); podarray iwork( static_cast(8*min_mn) ); lapack::cx_gesdd ( &jobz, &m, &n, A.memptr(), &lda, S.memptr(), U.memptr(), &ldu, V.memptr(), &ldvt, work.memptr(), &lwork, rwork.memptr(), iwork.memptr(), &info ); op_htrans::apply_mat_inplace(V); return (info == 0); } #else { arma_ignore(U); arma_ignore(S); arma_ignore(V); arma_ignore(X); arma_stop("svd(): use of LAPACK needs to be enabled"); return false; } #endif } //! Solve a system of linear equations. //! Assumes that A.n_rows = A.n_cols and B.n_rows = A.n_rows template inline bool auxlib::solve(Mat& out, Mat& A, const Base& X, const bool slow) { arma_extra_debug_sigprint(); bool status = false; const uword A_n_rows = A.n_rows; if( (A_n_rows <= 4) && (slow == false) ) { Mat A_inv(A_n_rows, A_n_rows); status = auxlib::inv_noalias_tinymat(A_inv, A, A_n_rows); if(status == true) { const unwrap_check Y( X.get_ref(), out ); const Mat& B = Y.M; const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; arma_debug_check( (A_n_rows != B_n_rows), "solve(): number of rows in the given objects must be the same" ); if(A.is_empty() || B.is_empty()) { out.zeros(A.n_cols, B_n_cols); return true; } out.set_size(A_n_rows, B_n_cols); gemm_emul::apply(out, A_inv, B); return true; } } if( (A_n_rows > 4) || (status == false) ) { out = X.get_ref(); const uword B_n_rows = out.n_rows; const uword B_n_cols = out.n_cols; arma_debug_check( (A_n_rows != B_n_rows), "solve(): number of rows in the given objects must be the same" ); if(A.is_empty() || out.is_empty()) { out.zeros(A.n_cols, B_n_cols); return true; } #if defined(ARMA_USE_ATLAS) { arma_debug_assert_atlas_size(A); podarray ipiv(A_n_rows + 2); // +2 for paranoia: old versions of Atlas might be trashing memory int info = atlas::clapack_gesv(atlas::CblasColMajor, A_n_rows, B_n_cols, A.memptr(), A_n_rows, ipiv.memptr(), out.memptr(), A_n_rows); return (info == 0); } #elif defined(ARMA_USE_LAPACK) { arma_debug_assert_blas_size(A); blas_int n = blas_int(A_n_rows); // assuming A is square blas_int lda = blas_int(A_n_rows); blas_int ldb = blas_int(A_n_rows); blas_int nrhs = blas_int(B_n_cols); blas_int info = 0; podarray ipiv(A_n_rows + 2); // +2 for paranoia: some versions of Lapack might be trashing memory arma_extra_debug_print("lapack::gesv()"); lapack::gesv(&n, &nrhs, A.memptr(), &lda, ipiv.memptr(), out.memptr(), &ldb, &info); arma_extra_debug_print("lapack::gesv() -- finished"); return (info == 0); } #else { arma_stop("solve(): use of ATLAS or LAPACK needs to be enabled"); return false; } #endif } return true; } //! Solve an over-determined system. //! Assumes that A.n_rows > A.n_cols and B.n_rows = A.n_rows template inline bool auxlib::solve_od(Mat& out, Mat& A, const Base& X) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { Mat tmp = X.get_ref(); const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword B_n_rows = tmp.n_rows; const uword B_n_cols = tmp.n_cols; arma_debug_check( (A_n_rows != B_n_rows), "solve(): number of rows in the given objects must be the same" ); out.set_size(A_n_cols, B_n_cols); if(A.is_empty() || tmp.is_empty()) { out.zeros(); return true; } arma_debug_assert_blas_size(A,tmp); char trans = 'N'; blas_int m = blas_int(A_n_rows); blas_int n = blas_int(A_n_cols); blas_int lda = blas_int(A_n_rows); blas_int ldb = blas_int(A_n_rows); blas_int nrhs = blas_int(B_n_cols); blas_int lwork = 3 * ( (std::max)(blas_int(1), n + (std::max)(n, nrhs)) ); blas_int info = 0; podarray work( static_cast(lwork) ); // NOTE: the dgels() function in the lapack library supplied by ATLAS 3.6 seems to have problems arma_extra_debug_print("lapack::gels()"); lapack::gels( &trans, &m, &n, &nrhs, A.memptr(), &lda, tmp.memptr(), &ldb, work.memptr(), &lwork, &info ); arma_extra_debug_print("lapack::gels() -- finished"); for(uword col=0; col inline bool auxlib::solve_ud(Mat& out, Mat& A, const Base& X) { arma_extra_debug_sigprint(); // TODO: this function provides the same results as Octave 3.4.2. // TODO: however, these results are different than Matlab 7.12.0.635. // TODO: figure out whether both Octave and Matlab are correct, or only one of them #if defined(ARMA_USE_LAPACK) { const unwrap Y( X.get_ref() ); const Mat& B = Y.M; const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; arma_debug_check( (A_n_rows != B_n_rows), "solve(): number of rows in the given objects must be the same" ); // B could be an alias of "out", hence we need to check whether B is empty before setting the size of "out" if(A.is_empty() || B.is_empty()) { out.zeros(A_n_cols, B_n_cols); return true; } arma_debug_assert_blas_size(A,B); char trans = 'N'; blas_int m = blas_int(A_n_rows); blas_int n = blas_int(A_n_cols); blas_int lda = blas_int(A_n_rows); blas_int ldb = blas_int(A_n_cols); blas_int nrhs = blas_int(B_n_cols); blas_int lwork = 3 * ( (std::max)(blas_int(1), m + (std::max)(m,nrhs)) ); blas_int info = 0; Mat tmp(A_n_cols, B_n_cols); tmp.zeros(); for(uword col=0; col work( static_cast(lwork) ); // NOTE: the dgels() function in the lapack library supplied by ATLAS 3.6 seems to have problems arma_extra_debug_print("lapack::gels()"); lapack::gels( &trans, &m, &n, &nrhs, A.memptr(), &lda, tmp.memptr(), &ldb, work.memptr(), &lwork, &info ); arma_extra_debug_print("lapack::gels() -- finished"); out.set_size(A_n_cols, B_n_cols); for(uword col=0; col inline bool auxlib::solve_tr(Mat& out, const Mat& A, const Mat& B, const uword layout) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { if(A.is_empty() || B.is_empty()) { out.zeros(A.n_cols, B.n_cols); return true; } arma_debug_assert_blas_size(A,B); out = B; char uplo = (layout == 0) ? 'U' : 'L'; char trans = 'N'; char diag = 'N'; blas_int n = blas_int(A.n_rows); blas_int nrhs = blas_int(B.n_cols); blas_int info = 0; lapack::trtrs(&uplo, &trans, &diag, &n, &nrhs, A.memptr(), &n, out.memptr(), &n, &info); return (info == 0); } #else { arma_ignore(out); arma_ignore(A); arma_ignore(B); arma_ignore(layout); arma_stop("solve(): use of LAPACK needs to be enabled"); return false; } #endif } // // Schur decomposition template inline bool auxlib::schur_dec(Mat& Z, Mat& T, const Mat& A) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { arma_debug_check( (A.is_square() == false), "schur_dec(): given matrix is not square" ); if(A.is_empty()) { Z.reset(); T.reset(); return true; } arma_debug_assert_blas_size(A); const uword A_n_rows = A.n_rows; Z.set_size(A_n_rows, A_n_rows); T = A; char jobvs = 'V'; // get Schur vectors (Z) char sort = 'N'; // do not sort eigenvalues/vectors blas_int* select = 0; // pointer to sorting function blas_int n = blas_int(A_n_rows); blas_int sdim = 0; // output for sorting blas_int lwork = 3 * ( (std::max)(blas_int(1), 3*n) ); blas_int info = 0; podarray work( static_cast(lwork) ); podarray bwork(A_n_rows); podarray wr(A_n_rows); // output for eigenvalues podarray wi(A_n_rows); // output for eigenvalues lapack::gees(&jobvs, &sort, select, &n, T.memptr(), &n, &sdim, wr.memptr(), wi.memptr(), Z.memptr(), &n, work.memptr(), &lwork, bwork.memptr(), &info); return (info == 0); } #else { arma_ignore(Z); arma_ignore(T); arma_ignore(A); arma_stop("schur_dec(): use of LAPACK needs to be enabled"); return false; } #endif } template inline bool auxlib::schur_dec(Mat >& Z, Mat >& T, const Mat >& A) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { arma_debug_check( (A.is_square() == false), "schur_dec(): matrix A is not square" ); if(A.is_empty()) { Z.reset(); T.reset(); return true; } arma_debug_assert_blas_size(A); typedef std::complex eT; const uword A_n_rows = A.n_rows; Z.set_size(A_n_rows, A_n_rows); T = A; char jobvs = 'V'; // get Schur vectors (Z) char sort = 'N'; // do not sort eigenvalues/vectors blas_int* select = 0; // pointer to sorting function blas_int n = blas_int(A_n_rows); blas_int sdim = 0; // output for sorting blas_int lwork = 3 * ( (std::max)(blas_int(1), 2*n) ); blas_int info = 0; podarray work( static_cast(lwork) ); podarray bwork(A_n_rows); podarray w(A_n_rows); // output for eigenvalues podarray rwork(A_n_rows); lapack::cx_gees(&jobvs, &sort, select, &n, T.memptr(), &n, &sdim, w.memptr(), Z.memptr(), &n, work.memptr(), &lwork, rwork.memptr(), bwork.memptr(), &info); return (info == 0); } #else { arma_ignore(Z); arma_ignore(T); arma_ignore(A); arma_stop("schur_dec(): use of LAPACK needs to be enabled"); return false; } #endif } // // syl (solution of the Sylvester equation AX + XB = C) template inline bool auxlib::syl(Mat& X, const Mat& A, const Mat& B, const Mat& C) { arma_extra_debug_sigprint(); arma_debug_check ( (A.is_square() == false) || (B.is_square() == false), "syl(): given matrix is not square" ); arma_debug_check ( (C.n_rows != A.n_rows) || (C.n_cols != B.n_cols), "syl(): matrices are not conformant" ); if(A.is_empty() || B.is_empty() || C.is_empty()) { X.reset(); return true; } #if defined(ARMA_USE_LAPACK) { Mat Z1, Z2, T1, T2; const bool status_sd1 = auxlib::schur_dec(Z1, T1, A); const bool status_sd2 = auxlib::schur_dec(Z2, T2, B); if( (status_sd1 == false) || (status_sd2 == false) ) { return false; } char trana = 'N'; char tranb = 'N'; blas_int isgn = +1; blas_int m = blas_int(T1.n_rows); blas_int n = blas_int(T2.n_cols); eT scale = eT(0); blas_int info = 0; Mat Y = trans(Z1) * C * Z2; lapack::trsyl(&trana, &tranb, &isgn, &m, &n, T1.memptr(), &m, T2.memptr(), &n, Y.memptr(), &m, &scale, &info); //Y /= scale; Y /= (-scale); X = Z1 * Y * trans(Z2); return (info >= 0); } #else { arma_stop("syl(): use of LAPACK needs to be enabled"); return false; } #endif } // // lyap (solution of the continuous Lyapunov equation AX + XA^H + Q = 0) template inline bool auxlib::lyap(Mat& X, const Mat& A, const Mat& Q) { arma_extra_debug_sigprint(); arma_debug_check( (A.is_square() == false), "lyap(): matrix A is not square"); arma_debug_check( (Q.is_square() == false), "lyap(): matrix Q is not square"); arma_debug_check( (A.n_rows != Q.n_rows), "lyap(): matrices A and Q have different dimensions"); Mat htransA; op_htrans::apply_mat_noalias(htransA, A); const Mat mQ = -Q; return auxlib::syl(X, A, htransA, mQ); } // // dlyap (solution of the discrete Lyapunov equation AXA^H - X + Q = 0) template inline bool auxlib::dlyap(Mat& X, const Mat& A, const Mat& Q) { arma_extra_debug_sigprint(); arma_debug_check( (A.is_square() == false), "dlyap(): matrix A is not square"); arma_debug_check( (Q.is_square() == false), "dlyap(): matrix Q is not square"); arma_debug_check( (A.n_rows != Q.n_rows), "dlyap(): matrices A and Q have different dimensions"); const Col vecQ = reshape(Q, Q.n_elem, 1); const Mat M = eye< Mat >(Q.n_elem, Q.n_elem) - kron(conj(A), A); Col vecX; const bool status = solve(vecX, M, vecQ); if(status == true) { X = reshape(vecX, Q.n_rows, Q.n_cols); return true; } else { X.reset(); return false; } } // // QZ decomposition of general square real matrix pair template inline bool auxlib::qz(Mat& A, Mat& B, Mat& vsl, Mat& vsr, const Base& X, const Base& Y, const char side) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { char jobvsl; char jobvsr; switch(side) { case 'l': // left jobvsl = 'V'; jobvsr = 'N'; break; case 'r': // right jobvsl = 'N'; jobvsr = 'V'; break; case 'b': // both jobvsl = 'V'; jobvsr = 'V'; break; case 'n': // neither jobvsl = 'N'; jobvsr = 'N'; break; default: arma_stop("qz(): parameter 'side' is invalid"); return false; } char eigsort = 'N'; char kdum = 'N'; // just a dummy blas_int sdim = 0; A = X.get_ref(); B = Y.get_ref(); arma_debug_check( ((A.is_square() == false) || (B.is_square() == false)), "qz(): given matrix is not square" ); arma_debug_check( (A.n_rows != B.n_rows), "qz(): given matrices must have the same size" ); if(A.is_empty()) { A.reset(); B.reset(); vsl.reset(); vsr.reset(); return true; } arma_debug_assert_blas_size(A); const uword A_n_rows = A.n_rows; podarray alphar(A_n_rows); podarray alphai(A_n_rows); podarray beta(A_n_rows); vsl.set_size( ((jobvsl == 'V') ? A_n_rows : 1), A_n_rows ); vsr.set_size( ((jobvsr == 'V') ? A_n_rows : 1), A_n_rows ); blas_int N = blas_int(A_n_rows); blas_int lwork = 3 * ((std::max)(blas_int(1),8*N+16)); blas_int info = 0; podarray work( static_cast(lwork) ); podarray bwork( static_cast(N) ); arma_extra_debug_print("lapack::gges()"); lapack::gges ( &jobvsl, &jobvsr, &eigsort, &kdum, &N, A.memptr(), &N, B.memptr(), &N, &sdim, alphar.memptr(), alphai.memptr(), beta.memptr(), vsl.memptr(), &N, vsr.memptr(), &N, work.memptr(), &lwork, bwork.memptr(), &info ); op_strans::apply_mat_inplace(vsl); // transpose Q return (info == 0); } #else { arma_ignore(A); arma_ignore(B); arma_ignore(vsl); arma_ignore(vsr); arma_ignore(X); arma_ignore(Y); arma_ignore(side); arma_stop("qz(): use of LAPACK needs to be enabled"); return false; } #endif } // // QZ decomposition of general square complex matrix pair template inline bool auxlib::qz(Mat< std::complex >& A, Mat< std::complex >& B, Mat< std::complex >& vsl, Mat< std::complex >& vsr, const Base< std::complex, T1 >& X, const Base< std::complex, T2 >& Y, const char side) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_LAPACK) { typedef typename std::complex eT; char jobvsl; char jobvsr; switch(side) { case 'l': // left jobvsl = 'V'; jobvsr = 'N'; break; case 'r': // right jobvsl = 'N'; jobvsr = 'V'; break; case 'b': // both jobvsl = 'V'; jobvsr = 'V'; break; case 'n': // neither jobvsl = 'N'; jobvsr = 'N'; break; default: arma_stop("qz(): parameter 'side' is invalid"); return false; } char eigsort = 'N'; char kdum = 'N'; // just a dummy blas_int sdim = 0; A = X.get_ref(); B = Y.get_ref(); arma_debug_check( ((A.is_square() == false) || (B.is_square() == false)), "qz(): given matrix is not square" ); arma_debug_check( (A.n_rows != B.n_rows), "qz(): given matrices must have the same size" ); if(A.is_empty()) { A.reset(); B.reset(); vsl.reset(); vsr.reset(); return true; } arma_debug_assert_blas_size(A); const uword A_n_rows = A.n_rows; podarray alpha(A_n_rows); podarray beta(A_n_rows); vsl.set_size( ((jobvsl == 'V') ? A_n_rows : 1), A_n_rows ); vsr.set_size( ((jobvsr == 'V') ? A_n_rows : 1), A_n_rows ); blas_int N = blas_int(A_n_rows); blas_int lwork = 3 * ((std::max)(blas_int(1),2*N)); blas_int info = 0; podarray work( static_cast(lwork) ); podarray bwork( static_cast(N) ); podarray rwork( static_cast(8*N) ); arma_extra_debug_print("lapack::cx_gges()"); lapack::cx_gges ( &jobvsl, &jobvsr, &eigsort, &kdum, &N, A.memptr(), &N, B.memptr(), &N, &sdim, alpha.memptr(), beta.memptr(), vsl.memptr(), &N, vsr.memptr(), &N, work.memptr(), &lwork, rwork.memptr(), bwork.memptr(), &info ); op_htrans::apply_mat_inplace(vsl); // transpose Q return (info == 0); } #else { arma_ignore(A); arma_ignore(B); arma_ignore(vsl); arma_ignore(vsr); arma_ignore(X); arma_ignore(Y); arma_ignore(side); arma_stop("qz(): use of LAPACK needs to be enabled"); return false; } #endif } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/blas_bones.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifdef ARMA_USE_BLAS #if !defined(ARMA_BLAS_CAPITALS) #define arma_sdot sdot #define arma_ddot ddot #define arma_sgemv sgemv #define arma_dgemv dgemv #define arma_cgemv cgemv #define arma_zgemv zgemv #define arma_sgemm sgemm #define arma_dgemm dgemm #define arma_cgemm cgemm #define arma_zgemm zgemm #define arma_ssyrk ssyrk #define arma_dsyrk dsyrk #define arma_cherk cherk #define arma_zherk zherk #else #define arma_sdot SDOT #define arma_ddot DDOT #define arma_sgemv SGEMV #define arma_dgemv DGEMV #define arma_cgemv CGEMV #define arma_zgemv ZGEMV #define arma_sgemm SGEMM #define arma_dgemm DGEMM #define arma_cgemm CGEMM #define arma_zgemm ZGEMM #define arma_ssyrk SSYRK #define arma_dsyrk DSYRK #define arma_cherk CHERK #define arma_zherk ZHERK #endif extern "C" { float arma_fortran(arma_sdot)(blas_int* n, const float* x, blas_int* incx, const float* y, blas_int* incy); double arma_fortran(arma_ddot)(blas_int* n, const double* x, blas_int* incx, const double* y, blas_int* incy); void arma_fortran(arma_sgemv)(const char* transA, const blas_int* m, const blas_int* n, const float* alpha, const float* A, const blas_int* ldA, const float* x, const blas_int* incx, const float* beta, float* y, const blas_int* incy); void arma_fortran(arma_dgemv)(const char* transA, const blas_int* m, const blas_int* n, const double* alpha, const double* A, const blas_int* ldA, const double* x, const blas_int* incx, const double* beta, double* y, const blas_int* incy); void arma_fortran(arma_cgemv)(const char* transA, const blas_int* m, const blas_int* n, const void* alpha, const void* A, const blas_int* ldA, const void* x, const blas_int* incx, const void* beta, void* y, const blas_int* incy); void arma_fortran(arma_zgemv)(const char* transA, const blas_int* m, const blas_int* n, const void* alpha, const void* A, const blas_int* ldA, const void* x, const blas_int* incx, const void* beta, void* y, const blas_int* incy); void arma_fortran(arma_sgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const float* alpha, const float* A, const blas_int* ldA, const float* B, const blas_int* ldB, const float* beta, float* C, const blas_int* ldC); void arma_fortran(arma_dgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const double* alpha, const double* A, const blas_int* ldA, const double* B, const blas_int* ldB, const double* beta, double* C, const blas_int* ldC); void arma_fortran(arma_cgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const void* alpha, const void* A, const blas_int* ldA, const void* B, const blas_int* ldB, const void* beta, void* C, const blas_int* ldC); void arma_fortran(arma_zgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const void* alpha, const void* A, const blas_int* ldA, const void* B, const blas_int* ldB, const void* beta, void* C, const blas_int* ldC); void arma_fortran(arma_ssyrk)(const char* uplo, const char* transA, const blas_int* n, const blas_int* k, const float* alpha, const float* A, const blas_int* ldA, const float* beta, float* C, const blas_int* ldC); void arma_fortran(arma_dsyrk)(const char* uplo, const char* transA, const blas_int* n, const blas_int* k, const double* alpha, const double* A, const blas_int* ldA, const double* beta, double* C, const blas_int* ldC); void arma_fortran(arma_cherk)(const char* uplo, const char* transA, const blas_int* n, const blas_int* k, const float* alpha, const void* A, const blas_int* ldA, const float* beta, void* C, const blas_int* ldC); void arma_fortran(arma_zherk)(const char* uplo, const char* transA, const blas_int* n, const blas_int* k, const double* alpha, const void* A, const blas_int* ldA, const double* beta, void* C, const blas_int* ldC); // void arma_fortran(arma_dswap)(const blas_int* n, double* x, const blas_int* incx, double* y, const blas_int* incy); // void arma_fortran(arma_dscal)(const blas_int* n, const double* alpha, double* x, const blas_int* incx); // void arma_fortran(arma_dcopy)(const blas_int* n, const double* x, const blas_int* incx, double* y, const blas_int* incy); // void arma_fortran(arma_daxpy)(const blas_int* n, const double* alpha, const double* x, const blas_int* incx, double* y, const blas_int* incy); // void arma_fortran(arma_dger )(const blas_int* m, const blas_int* n, const double* alpha, const double* x, const blas_int* incx, const double* y, const blas_int* incy, double* A, const blas_int* ldA); } #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/blas_wrapper.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifdef ARMA_USE_BLAS //! \namespace blas namespace for BLAS functions namespace blas { template inline void gemv(const char* transA, const blas_int* m, const blas_int* n, const eT* alpha, const eT* A, const blas_int* ldA, const eT* x, const blas_int* incx, const eT* beta, eT* y, const blas_int* incy) { arma_type_check((is_supported_blas_type::value == false)); if(is_float::value) { typedef float T; arma_fortran(arma_sgemv)(transA, m, n, (const T*)alpha, (const T*)A, ldA, (const T*)x, incx, (const T*)beta, (T*)y, incy); } else if(is_double::value) { typedef double T; arma_fortran(arma_dgemv)(transA, m, n, (const T*)alpha, (const T*)A, ldA, (const T*)x, incx, (const T*)beta, (T*)y, incy); } else if(is_supported_complex_float::value) { typedef std::complex T; arma_fortran(arma_cgemv)(transA, m, n, (const T*)alpha, (const T*)A, ldA, (const T*)x, incx, (const T*)beta, (T*)y, incy); } else if(is_supported_complex_double::value) { typedef std::complex T; arma_fortran(arma_zgemv)(transA, m, n, (const T*)alpha, (const T*)A, ldA, (const T*)x, incx, (const T*)beta, (T*)y, incy); } } template inline void gemm(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const eT* alpha, const eT* A, const blas_int* ldA, const eT* B, const blas_int* ldB, const eT* beta, eT* C, const blas_int* ldC) { arma_type_check((is_supported_blas_type::value == false)); if(is_float::value) { typedef float T; arma_fortran(arma_sgemm)(transA, transB, m, n, k, (const T*)alpha, (const T*)A, ldA, (const T*)B, ldB, (const T*)beta, (T*)C, ldC); } else if(is_double::value) { typedef double T; arma_fortran(arma_dgemm)(transA, transB, m, n, k, (const T*)alpha, (const T*)A, ldA, (const T*)B, ldB, (const T*)beta, (T*)C, ldC); } else if(is_supported_complex_float::value) { typedef std::complex T; arma_fortran(arma_cgemm)(transA, transB, m, n, k, (const T*)alpha, (const T*)A, ldA, (const T*)B, ldB, (const T*)beta, (T*)C, ldC); } else if(is_supported_complex_double::value) { typedef std::complex T; arma_fortran(arma_zgemm)(transA, transB, m, n, k, (const T*)alpha, (const T*)A, ldA, (const T*)B, ldB, (const T*)beta, (T*)C, ldC); } } template inline void syrk(const char* uplo, const char* transA, const blas_int* n, const blas_int* k, const eT* alpha, const eT* A, const blas_int* ldA, const eT* beta, eT* C, const blas_int* ldC) { arma_type_check((is_supported_blas_type::value == false)); if(is_float::value) { typedef float T; arma_fortran(arma_ssyrk)(uplo, transA, n, k, (const T*)alpha, (const T*)A, ldA, (const T*)beta, (T*)C, ldC); } else if(is_double::value) { typedef double T; arma_fortran(arma_dsyrk)(uplo, transA, n, k, (const T*)alpha, (const T*)A, ldA, (const T*)beta, (T*)C, ldC); } } template inline void herk(const char* uplo, const char* transA, const blas_int* n, const blas_int* k, const T* alpha, const std::complex* A, const blas_int* ldA, const T* beta, std::complex* C, const blas_int* ldC) { arma_type_check((is_supported_blas_type::value == false)); if(is_float::value) { typedef float TT; typedef std::complex cx_TT; arma_fortran(arma_cherk)(uplo, transA, n, k, (const TT*)alpha, (const cx_TT*)A, ldA, (const TT*)beta, (cx_TT*)C, ldC); } else if(is_double::value) { typedef double TT; typedef std::complex cx_TT; arma_fortran(arma_zherk)(uplo, transA, n, k, (const TT*)alpha, (const cx_TT*)A, ldA, (const TT*)beta, (cx_TT*)C, ldC); } } template inline eT dot(const uword n_elem, const eT* x, const eT* y) { arma_type_check((is_supported_blas_type::value == false)); if(is_float::value) { #if defined(ARMA_BLAS_SDOT_BUG) { if(n_elem == 0) { return eT(0); } const char trans = 'T'; const blas_int m = blas_int(n_elem); const blas_int n = 1; //const blas_int lda = (n_elem > 0) ? blas_int(n_elem) : blas_int(1); const blas_int inc = 1; const eT alpha = eT(1); const eT beta = eT(0); eT result[2]; // paranoia: using two elements instead of one //blas::gemv(&trans, &m, &n, &alpha, x, &lda, y, &inc, &beta, &result[0], &inc); blas::gemv(&trans, &m, &n, &alpha, x, &m, y, &inc, &beta, &result[0], &inc); return result[0]; } #else { blas_int n = blas_int(n_elem); blas_int inc = 1; typedef float T; return arma_fortran(arma_sdot)(&n, (const T*)x, &inc, (const T*)y, &inc); } #endif } else if(is_double::value) { blas_int n = blas_int(n_elem); blas_int inc = 1; typedef double T; return arma_fortran(arma_ddot)(&n, (const T*)x, &inc, (const T*)y, &inc); } else if( (is_supported_complex_float::value) || (is_supported_complex_double::value) ) { if(n_elem == 0) { return eT(0); } // using gemv() workaround due to compatibility issues with cdotu() and zdotu() const char trans = 'T'; const blas_int m = blas_int(n_elem); const blas_int n = 1; //const blas_int lda = (n_elem > 0) ? blas_int(n_elem) : blas_int(1); const blas_int inc = 1; const eT alpha = eT(1); const eT beta = eT(0); eT result[2]; // paranoia: using two elements instead of one //blas::gemv(&trans, &m, &n, &alpha, x, &lda, y, &inc, &beta, &result[0], &inc); blas::gemv(&trans, &m, &n, &alpha, x, &m, y, &inc, &beta, &result[0], &inc); return result[0]; } else { return eT(0); } } } #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/compiler_setup.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #undef arma_hot #undef arma_cold #undef arma_pure #undef arma_const #undef arma_aligned #undef arma_align_mem #undef arma_warn_unused #undef arma_deprecated #undef arma_malloc #undef arma_inline #undef arma_noinline #undef arma_ignore #define arma_hot #define arma_cold #define arma_pure #define arma_const #define arma_aligned #define arma_align_mem #define arma_warn_unused #define arma_deprecated #define arma_malloc #define arma_inline inline #define arma_noinline #define arma_ignore(variable) ((void)(variable)) #undef arma_fortran_noprefix #undef arma_fortran_prefix #undef arma_fortran2_noprefix #undef arma_fortran2_prefix #if defined(ARMA_BLAS_UNDERSCORE) #define arma_fortran2_noprefix(function) function##_ #define arma_fortran2_prefix(function) wrapper_##function##_ #else #define arma_fortran2_noprefix(function) function #define arma_fortran2_prefix(function) wrapper_##function #endif #if defined(ARMA_USE_WRAPPER) #define arma_fortran(function) arma_fortran2_prefix(function) #define arma_wrapper(function) wrapper_##function #else #define arma_fortran(function) arma_fortran2_noprefix(function) #define arma_wrapper(function) function #endif #define arma_fortran_prefix(function) arma_fortran2_prefix(function) #define arma_fortran_noprefix(function) arma_fortran2_noprefix(function) #undef ARMA_INCFILE_WRAP #define ARMA_INCFILE_WRAP(x) #if defined(__CYGWIN__) #if defined(ARMA_USE_CXX11) #undef ARMA_USE_CXX11 #undef ARMA_USE_EXTERN_CXX11_RNG #pragma message ("WARNING: disabled use of C++11 features in Armadillo, due to incomplete support for C++11 by Cygwin") #endif #endif #if defined(ARMA_USE_CXX11) #undef ARMA_USE_U64S64 #define ARMA_USE_U64S64 #if !defined(ARMA_32BIT_WORD) #undef ARMA_64BIT_WORD #define ARMA_64BIT_WORD #endif #if defined(ARMA_64BIT_WORD) && defined(SIZE_MAX) #if (SIZE_MAX < 0xFFFFFFFFFFFFFFFFull) #pragma message ("WARNING: disabled use of 64 bit integers, as std::size_t is smaller than 64 bits") #undef ARMA_64BIT_WORD #endif #endif #endif #if defined(ARMA_64BIT_WORD) #undef ARMA_USE_U64S64 #define ARMA_USE_U64S64 #endif // most compilers can't vectorise slightly elaborate loops; // for example clang: http://llvm.org/bugs/show_bug.cgi?id=16358 #undef ARMA_SIMPLE_LOOPS #define ARMA_SIMPLE_LOOPS #undef ARMA_GOOD_COMPILER #undef ARMA_HAVE_TR1 #undef ARMA_HAVE_GETTIMEOFDAY #undef ARMA_HAVE_SNPRINTF #undef ARMA_HAVE_ISFINITE #undef ARMA_HAVE_LOG1P #undef ARMA_HAVE_ISINF #undef ARMA_HAVE_ISNAN #if (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)) #define ARMA_HAVE_GETTIMEOFDAY #endif // posix_memalign() is part of IEEE standard 1003.1 // http://pubs.opengroup.org/onlinepubs/009696899/functions/posix_memalign.html // http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html // http://sourceforge.net/p/predef/wiki/Standards/ #if ( defined(_POSIX_ADVISORY_INFO) && (_POSIX_ADVISORY_INFO >= 200112L) ) #undef ARMA_HAVE_POSIX_MEMALIGN #define ARMA_HAVE_POSIX_MEMALIGN #endif #if defined(__APPLE__) #undef ARMA_BLAS_SDOT_BUG #define ARMA_BLAS_SDOT_BUG #undef ARMA_HAVE_POSIX_MEMALIGN #endif #if defined(__MINGW32__) #undef ARMA_HAVE_POSIX_MEMALIGN #endif #undef ARMA_FNSIG #if defined (__GNUG__) #define ARMA_FNSIG __PRETTY_FUNCTION__ #elif defined (_MSC_VER) #define ARMA_FNSIG __FUNCSIG__ #elif defined(__INTEL_COMPILER) #define ARMA_FNSIG __FUNCTION__ #elif defined(ARMA_USE_CXX11) #define ARMA_FNSIG __func__ #else #define ARMA_FNSIG "(unknown)" #endif #if (defined(__GNUG__) || defined(__GNUC__)) && (defined(__clang__) || defined(__INTEL_COMPILER) || defined(__NVCC__) || defined(__CUDACC__) || defined(__PGI) || defined(__PATHSCALE__)) #undef ARMA_FAKE_GCC #define ARMA_FAKE_GCC #endif #if defined(__GNUG__) && !defined(ARMA_FAKE_GCC) #undef ARMA_GCC_VERSION #define ARMA_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #if (ARMA_GCC_VERSION < 40200) #error "*** Need a newer compiler ***" #endif #if ( (ARMA_GCC_VERSION >= 40700) && (ARMA_GCC_VERSION <= 40701) ) #error "gcc versions 4.7.0 and 4.7.1 are unsupported; use 4.7.2 or later" // due to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53549 #endif #define ARMA_GOOD_COMPILER #undef arma_pure #undef arma_const #undef arma_aligned #undef arma_align_mem #undef arma_warn_unused #undef arma_deprecated #undef arma_malloc #undef arma_inline #undef arma_noinline #define arma_pure __attribute__((__pure__)) #define arma_const __attribute__((__const__)) #define arma_aligned __attribute__((__aligned__)) #define arma_align_mem __attribute__((__aligned__(16))) #define arma_warn_unused __attribute__((__warn_unused_result__)) #define arma_deprecated __attribute__((__deprecated__)) #define arma_malloc __attribute__((__malloc__)) #define arma_inline inline __attribute__((__always_inline__)) #define arma_noinline __attribute__((__noinline__)) #undef ARMA_HAVE_ALIGNED_ATTRIBUTE #define ARMA_HAVE_ALIGNED_ATTRIBUTE #if defined(ARMA_USE_CXX11) #if (ARMA_GCC_VERSION < 40800) #pragma message ("WARNING: compiler is in C++11 mode, but it has incomplete support for C++11 features;") #pragma message ("WARNING: if something breaks, you get to keep all the pieces") #pragma message ("WARNING: To forcefully prevent Armadillo from using C++11 features,") #pragma message ("WARNING: #define ARMA_DONT_USE_CXX11 before #include ") #define ARMA_DONT_USE_CXX11_CHRONO #endif #endif #if !defined(ARMA_USE_CXX11) #if defined(_GLIBCXX_USE_C99_MATH_TR1) && defined(_GLIBCXX_USE_C99_COMPLEX_TR1) #define ARMA_HAVE_TR1 #endif #endif #if (ARMA_GCC_VERSION >= 40300) #undef arma_hot #undef arma_cold #define arma_hot __attribute__((__hot__)) #define arma_cold __attribute__((__cold__)) #endif #if (ARMA_GCC_VERSION >= 40700) #define ARMA_HAVE_GCC_ASSUME_ALIGNED #endif // gcc's vectoriser can handle elaborate loops #undef ARMA_SIMPLE_LOOPS #if defined(__OPTIMIZE_SIZE__) #define ARMA_SIMPLE_LOOPS #endif #if (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)) #define ARMA_HAVE_SNPRINTF #define ARMA_HAVE_ISFINITE #define ARMA_HAVE_LOG1P #define ARMA_HAVE_ISINF #define ARMA_HAVE_ISNAN #endif #undef ARMA_GCC_VERSION #endif #if defined(__clang__) && (defined(__INTEL_COMPILER) || defined(__NVCC__) || defined(__CUDACC__) || defined(__PGI) || defined(__PATHSCALE__)) #undef ARMA_FAKE_CLANG #define ARMA_FAKE_CLANG #endif #if defined(__clang__) && !defined(ARMA_FAKE_CLANG) #define ARMA_GOOD_COMPILER #if !defined(__has_attribute) #define __has_attribute(x) 0 #endif #if __has_attribute(__pure__) #undef arma_pure #define arma_pure __attribute__((__pure__)) #endif #if __has_attribute(__const__) #undef arma_const #define arma_const __attribute__((__const__)) #endif #if __has_attribute(__aligned__) #undef arma_aligned #undef arma_align_mem #define arma_aligned __attribute__((__aligned__)) #define arma_align_mem __attribute__((__aligned__(16))) #undef ARMA_HAVE_ALIGNED_ATTRIBUTE #define ARMA_HAVE_ALIGNED_ATTRIBUTE #endif #if __has_attribute(__warn_unused_result__) #undef arma_warn_unused #define arma_warn_unused __attribute__((__warn_unused_result__)) #endif #if __has_attribute(__deprecated__) #undef arma_deprecated #define arma_deprecated __attribute__((__deprecated__)) #endif #if __has_attribute(__malloc__) #undef arma_malloc #define arma_malloc __attribute__((__malloc__)) #endif #if __has_attribute(__always_inline__) #undef arma_inline #define arma_inline inline __attribute__((__always_inline__)) #endif #if __has_attribute(__noinline__) #undef arma_noinline #define arma_noinline __attribute__((__noinline__)) #endif #if __has_attribute(__hot__) #undef arma_hot #define arma_hot __attribute__((__hot__)) #endif #if __has_attribute(__cold__) #undef arma_cold #define arma_cold __attribute__((__cold__)) #endif #if defined(__has_builtin) && __has_builtin(__builtin_assume_aligned) #undef ARMA_HAVE_GCC_ASSUME_ALIGNED #define ARMA_HAVE_GCC_ASSUME_ALIGNED #endif #if defined(__apple_build_version__) #undef ARMA_USE_EXTERN_CXX11_RNG // because Apple engineers are too lazy to implement thread_local #endif #if (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)) #define ARMA_HAVE_SNPRINTF #define ARMA_HAVE_ISFINITE #define ARMA_HAVE_LOG1P #define ARMA_HAVE_ISINF #define ARMA_HAVE_ISNAN #endif #endif #if defined(__INTEL_COMPILER) #if (__INTEL_COMPILER_BUILD_DATE < 20090623) #error "*** Need a newer compiler ***" #endif #undef ARMA_HAVE_GCC_ASSUME_ALIGNED #undef ARMA_HAVE_ICC_ASSUME_ALIGNED #define ARMA_HAVE_ICC_ASSUME_ALIGNED #endif #if defined(_MSC_VER) #if (_MSC_VER < 1600) #error "*** Need a newer compiler ***" #endif #if (_MSC_VER < 1700) #pragma message ("WARNING: this compiler is outdated and has incomplete support for the C++ standard;") #pragma message ("WARNING: if something breaks, you get to keep all the pieces") #define ARMA_BAD_COMPILER #endif #if defined(ARMA_USE_CXX11) #if (_MSC_VER < 1800) #pragma message ("WARNING: compiler is in C++11 mode, but it has incomplete support for C++11 features;") #pragma message ("WARNING: if something breaks, you get to keep all the pieces") #endif #endif // #undef arma_inline // #define arma_inline inline __forceinline #pragma warning(push) #pragma warning(disable: 4127) // conditional expression is constant #pragma warning(disable: 4510) // default constructor could not be generated #pragma warning(disable: 4511) // copy constructor can't be generated #pragma warning(disable: 4512) // assignment operator can't be generated #pragma warning(disable: 4513) // destructor can't be generated #pragma warning(disable: 4514) // unreferenced inline function has been removed #pragma warning(disable: 4522) // multiple assignment operators specified #pragma warning(disable: 4623) // default constructor can't be generated #pragma warning(disable: 4624) // destructor can't be generated #pragma warning(disable: 4625) // copy constructor can't be generated #pragma warning(disable: 4626) // assignment operator can't be generated #pragma warning(disable: 4710) // function not inlined #pragma warning(disable: 4711) // call was inlined #pragma warning(disable: 4714) // __forceinline can't be inlined // #if (_MANAGED == 1) || (_M_CEE == 1) // // // don't do any alignment when compiling in "managed code" mode // // #undef arma_aligned // #define arma_aligned // // #undef arma_align_mem // #define arma_align_mem // // #elif (_MSC_VER >= 1700) // // #undef arma_align_mem // #define arma_align_mem __declspec(align(16)) // // #define ARMA_HAVE_ALIGNED_ATTRIBUTE // // // disable warnings: "structure was padded due to __declspec(align(16))" // #pragma warning(disable: 4324) // // #endif #endif #if defined(__SUNPRO_CC) // http://www.oracle.com/technetwork/server-storage/solarisstudio/training/index-jsp-141991.html // http://www.oracle.com/technetwork/server-storage/solarisstudio/documentation/cplusplus-faq-355066.html #if (__SUNPRO_CC < 0x5100) #error "*** Need a newer compiler ***" #endif #endif #if defined(log2) #undef log2 #pragma message ("WARNING: detected 'log2' macro and undefined it") #endif // // whoever defined macros with the names "min" and "max" should be permanently removed from the gene pool #if defined(min) || defined(max) #undef min #undef max #pragma message ("WARNING: detected 'min' and/or 'max' macros and undefined them;") #pragma message ("WARNING: you may wish to define NOMINMAX before including any windows header") #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/compiler_setup_post.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #if defined(_MSC_VER) #pragma warning(pop) #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/cond_rel_bones.hpp ================================================ // Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup cond_rel //! @{ // // for preventing pedantic compiler warnings template class cond_rel { public: template arma_inline static bool lt(const eT A, const eT B); template arma_inline static bool gt(const eT A, const eT B); template arma_inline static bool leq(const eT A, const eT B); template arma_inline static bool geq(const eT A, const eT B); template arma_inline static eT make_neg(const eT val); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/cond_rel_meat.hpp ================================================ // Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup cond_rel //! @{ template<> template arma_inline bool cond_rel::lt(const eT A, const eT B) { return (A < B); } template<> template arma_inline bool cond_rel::lt(const eT, const eT) { return false; } template<> template arma_inline bool cond_rel::gt(const eT A, const eT B) { return (A > B); } template<> template arma_inline bool cond_rel::gt(const eT, const eT) { return false; } template<> template arma_inline bool cond_rel::leq(const eT A, const eT B) { return (A <= B); } template<> template arma_inline bool cond_rel::leq(const eT, const eT) { return false; } template<> template arma_inline bool cond_rel::geq(const eT A, const eT B) { return (A >= B); } template<> template arma_inline bool cond_rel::geq(const eT, const eT) { return false; } template<> template arma_inline eT cond_rel::make_neg(const eT val) { return -val; } template<> template arma_inline eT cond_rel::make_neg(const eT) { return eT(0); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/config.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2013-2015 Ryan Curtin // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #if !defined(ARMA_USE_LAPACK) #define ARMA_USE_LAPACK //// Comment out the above line if you don't have LAPACK or a high-speed replacement for LAPACK, //// such as Intel MKL, AMD ACML, or the Accelerate framework. //// LAPACK is required for matrix decompositions (eg. SVD) and matrix inverse. #endif #if !defined(ARMA_USE_BLAS) #define ARMA_USE_BLAS //// Comment out the above line if you don't have BLAS or a high-speed replacement for BLAS, //// such as OpenBLAS, GotoBLAS, Intel MKL, AMD ACML, or the Accelerate framework. //// BLAS is used for matrix multiplication. //// Without BLAS, matrix multiplication will still work, but might be slower. #endif #if !defined(ARMA_USE_ARPACK) // #define ARMA_USE_ARPACK //// Uncomment the above line if you have ARPACK or a high-speed replacement for ARPACK. //// ARPACK is required for eigendecompositions of sparse matrices, eg. eigs_sym(), svds() #endif #if !defined(ARMA_USE_SUPERLU) // #define ARMA_USE_SUPERLU //// Uncomment the above line if you have SuperLU. //// SuperLU is used for solving sparse linear systems via spsolve() //// Caveat: only SuperLU version 4.3 can be used! #endif #if !defined(ARMA_SUPERLU_INCLUDE_DIR) // #define ARMA_SUPERLU_INCLUDE_DIR /usr/include/ //// If you're using SuperLU and want to explicitly include the SuperLU headers, //// uncomment the above define and specify the appropriate include directory. //// Make sure the directory has a trailing / #endif // #define ARMA_USE_WRAPPER //// Comment out the above line if you're getting linking errors when compiling your programs, //// or if you prefer to directly link with LAPACK, BLAS + etc instead of the Armadillo runtime library. //// You will then need to link your programs directly with -llapack -lblas instead of -larmadillo // #define ARMA_BLAS_CAPITALS //// Uncomment the above line if your BLAS and LAPACK libraries have capitalised function names (eg. ACML on 64-bit Windows) #define ARMA_BLAS_UNDERSCORE //// Uncomment the above line if your BLAS and LAPACK libraries have function names with a trailing underscore. //// Conversely, comment it out if the function names don't have a trailing underscore. // #define ARMA_BLAS_LONG //// Uncomment the above line if your BLAS and LAPACK libraries use "long" instead of "int" // #define ARMA_BLAS_LONG_LONG //// Uncomment the above line if your BLAS and LAPACK libraries use "long long" instead of "int" // #define ARMA_USE_TBB_ALLOC //// Uncomment the above line if you want to use Intel TBB scalable_malloc() and scalable_free() instead of standard malloc() and free() // #define ARMA_USE_MKL_ALLOC //// Uncomment the above line if you want to use Intel MKL mkl_malloc() and mkl_free() instead of standard malloc() and free() // #define ARMA_USE_ATLAS // #define ARMA_ATLAS_INCLUDE_DIR /usr/include/ //// If you're using ATLAS and the compiler can't find cblas.h and/or clapack.h //// uncomment the above define and specify the appropriate include directory. //// Make sure the directory has a trailing / #if !defined(ARMA_USE_CXX11) // #define ARMA_USE_CXX11 //// Uncomment the above line to forcefully enable use of C++11 features (eg. initialiser lists). //// Note that ARMA_USE_CXX11 is automatically enabled when a C++11 compiler is detected. #endif #if !defined(ARMA_64BIT_WORD) // #define ARMA_64BIT_WORD //// Uncomment the above line if you require matrices/vectors capable of holding more than 4 billion elements. //// Your machine and compiler must have support for 64 bit integers (eg. via "long" or "long long"). //// Note that ARMA_64BIT_WORD is automatically enabled when a C++11 compiler is detected. #endif #if !defined(ARMA_USE_HDF5) // #define ARMA_USE_HDF5 //// Uncomment the above line to allow the ability to save and load matrices stored in HDF5 format; //// the hdf5.h header file must be available on your system, //// and you will need to link with the hdf5 library (eg. -lhdf5) #endif // #define ARMA_USE_HDF5_ALT #if defined(ARMA_USE_HDF5_ALT) && defined(ARMA_USE_WRAPPER) #undef ARMA_USE_HDF5 #define ARMA_USE_HDF5 // #define ARMA_HDF5_INCLUDE_DIR /usr/include/ #endif #if !defined(ARMA_MAT_PREALLOC) #define ARMA_MAT_PREALLOC 16 #endif //// This is the number of preallocated elements used by matrices and vectors; //// it must be an integer that is at least 1. //// If you mainly use lots of very small vectors (eg. <= 4 elements), //// change the number to the size of your vectors. #if !defined(ARMA_SPMAT_CHUNKSIZE) #define ARMA_SPMAT_CHUNKSIZE 256 #endif //// This is the minimum increase in the amount of memory (in terms of elements) allocated by a sparse matrix; //// it must be an integer that is at least 1. //// The minimum recommended size is 16. // #define ARMA_NO_DEBUG //// Uncomment the above line if you want to disable all run-time checks. //// This will result in faster code, but you first need to make sure that your code runs correctly! //// We strongly recommend to have the run-time checks enabled during development, //// as this greatly aids in finding mistakes in your code, and hence speeds up development. //// We recommend that run-time checks be disabled _only_ for the shipped version of your program. // #define ARMA_EXTRA_DEBUG //// Uncomment the above line if you want to see the function traces of how Armadillo evaluates expressions. //// This is mainly useful for debugging of the library. #if !defined(ARMA_DEFAULT_OSTREAM) #define ARMA_DEFAULT_OSTREAM std::cout #endif #define ARMA_PRINT_ERRORS //#define ARMA_PRINT_HDF5_ERRORS #if defined(ARMA_DONT_PRINT_ERRORS) #undef ARMA_PRINT_ERRORS #undef ARMA_PRINT_HDF5_ERRORS #endif #if defined(ARMA_DONT_USE_LAPACK) #undef ARMA_USE_LAPACK #endif #if defined(ARMA_DONT_USE_BLAS) #undef ARMA_USE_BLAS #endif #if defined(ARMA_DONT_USE_ARPACK) #undef ARMA_USE_ARPACK #endif #if defined(ARMA_DONT_USE_SUPERLU) #undef ARMA_USE_SUPERLU #undef ARMA_SUPERLU_INCLUDE_DIR #endif #if defined(ARMA_DONT_USE_ATLAS) #undef ARMA_USE_ATLAS #undef ARMA_ATLAS_INCLUDE_DIR #endif #if defined(ARMA_DONT_USE_WRAPPER) #undef ARMA_USE_WRAPPER #undef ARMA_USE_HDF5_ALT #endif #if defined(ARMA_DONT_USE_CXX11) #undef ARMA_USE_CXX11 #undef ARMA_USE_EXTERN_CXX11_RNG #endif #if defined(ARMA_USE_WRAPPER) #if defined(ARMA_USE_CXX11) #if !defined(ARMA_USE_EXTERN_CXX11_RNG) // #define ARMA_USE_EXTERN_CXX11_RNG #endif #endif #endif #if defined(ARMA_DONT_USE_EXTERN_CXX11_RNG) #undef ARMA_USE_EXTERN_CXX11_RNG #endif #if defined(ARMA_32BIT_WORD) #undef ARMA_64BIT_WORD #endif #if defined(ARMA_DONT_USE_HDF5) #undef ARMA_USE_HDF5 #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/config.hpp.cmake ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2013-2015 Ryan Curtin // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #if !defined(ARMA_USE_LAPACK) #cmakedefine ARMA_USE_LAPACK //// Comment out the above line if you don't have LAPACK or a high-speed replacement for LAPACK, //// such as Intel MKL, AMD ACML, or the Accelerate framework. //// LAPACK is required for matrix decompositions (eg. SVD) and matrix inverse. #endif #if !defined(ARMA_USE_BLAS) #cmakedefine ARMA_USE_BLAS //// Comment out the above line if you don't have BLAS or a high-speed replacement for BLAS, //// such as OpenBLAS, GotoBLAS, Intel MKL, AMD ACML, or the Accelerate framework. //// BLAS is used for matrix multiplication. //// Without BLAS, matrix multiplication will still work, but might be slower. #endif #if !defined(ARMA_USE_ARPACK) #cmakedefine ARMA_USE_ARPACK //// Uncomment the above line if you have ARPACK or a high-speed replacement for ARPACK. //// ARPACK is required for eigendecompositions of sparse matrices, eg. eigs_sym(), svds() #endif #if !defined(ARMA_USE_SUPERLU) #cmakedefine ARMA_USE_SUPERLU //// Uncomment the above line if you have SuperLU. //// SuperLU is used for solving sparse linear systems via spsolve() //// Caveat: only SuperLU version 4.3 can be used! #endif #if !defined(ARMA_SUPERLU_INCLUDE_DIR) #define ARMA_SUPERLU_INCLUDE_DIR ${ARMA_SUPERLU_INCLUDE_DIR}/ //// If you're using SuperLU and want to explicitly include the SuperLU headers, //// uncomment the above define and specify the appropriate include directory. //// Make sure the directory has a trailing / #endif #cmakedefine ARMA_USE_WRAPPER //// Comment out the above line if you're getting linking errors when compiling your programs, //// or if you prefer to directly link with LAPACK, BLAS + etc instead of the Armadillo runtime library. //// You will then need to link your programs directly with -llapack -lblas instead of -larmadillo // #define ARMA_BLAS_CAPITALS //// Uncomment the above line if your BLAS and LAPACK libraries have capitalised function names (eg. ACML on 64-bit Windows) #define ARMA_BLAS_UNDERSCORE //// Uncomment the above line if your BLAS and LAPACK libraries have function names with a trailing underscore. //// Conversely, comment it out if the function names don't have a trailing underscore. // #define ARMA_BLAS_LONG //// Uncomment the above line if your BLAS and LAPACK libraries use "long" instead of "int" // #define ARMA_BLAS_LONG_LONG //// Uncomment the above line if your BLAS and LAPACK libraries use "long long" instead of "int" // #define ARMA_USE_TBB_ALLOC //// Uncomment the above line if you want to use Intel TBB scalable_malloc() and scalable_free() instead of standard malloc() and free() // #define ARMA_USE_MKL_ALLOC //// Uncomment the above line if you want to use Intel MKL mkl_malloc() and mkl_free() instead of standard malloc() and free() #cmakedefine ARMA_USE_ATLAS #define ARMA_ATLAS_INCLUDE_DIR ${ARMA_ATLAS_INCLUDE_DIR}/ //// If you're using ATLAS and the compiler can't find cblas.h and/or clapack.h //// uncomment the above define and specify the appropriate include directory. //// Make sure the directory has a trailing / #if !defined(ARMA_USE_CXX11) // #define ARMA_USE_CXX11 //// Uncomment the above line to forcefully enable use of C++11 features (eg. initialiser lists). //// Note that ARMA_USE_CXX11 is automatically enabled when a C++11 compiler is detected #endif #if !defined(ARMA_64BIT_WORD) // #define ARMA_64BIT_WORD //// Uncomment the above line if you require matrices/vectors capable of holding more than 4 billion elements. //// Your machine and compiler must have support for 64 bit integers (eg. via "long" or "long long") //// Note that ARMA_64BIT_WORD is automatically enabled when a C++11 compiler is detected #endif #if !defined(ARMA_USE_HDF5) // #define ARMA_USE_HDF5 //// Uncomment the above line to allow the ability to save and load matrices stored in HDF5 format; //// the hdf5.h header file must be available on your system, //// and you will need to link with the hdf5 library (eg. -lhdf5) #endif #cmakedefine ARMA_USE_HDF5_ALT #if defined(ARMA_USE_HDF5_ALT) && defined(ARMA_USE_WRAPPER) #undef ARMA_USE_HDF5 #define ARMA_USE_HDF5 #define ARMA_HDF5_INCLUDE_DIR ${ARMA_HDF5_INCLUDE_DIR}/ #endif #if !defined(ARMA_MAT_PREALLOC) #define ARMA_MAT_PREALLOC 16 #endif //// This is the number of preallocated elements used by matrices and vectors; //// it must be an integer that is at least 1. //// If you mainly use lots of very small vectors (eg. <= 4 elements), //// change the number to the size of your vectors. #if !defined(ARMA_SPMAT_CHUNKSIZE) #define ARMA_SPMAT_CHUNKSIZE 256 #endif //// This is the minimum increase in the amount of memory (in terms of elements) allocated by a sparse matrix; //// it must be an integer that is at least 1. //// The minimum recommended size is 16. // #define ARMA_NO_DEBUG //// Uncomment the above line if you want to disable all run-time checks. //// This will result in faster code, but you first need to make sure that your code runs correctly! //// We strongly recommend to have the run-time checks enabled during development, //// as this greatly aids in finding mistakes in your code, and hence speeds up development. //// We recommend that run-time checks be disabled _only_ for the shipped version of your program. // #define ARMA_EXTRA_DEBUG //// Uncomment the above line if you want to see the function traces of how Armadillo evaluates expressions. //// This is mainly useful for debugging of the library. #if !defined(ARMA_DEFAULT_OSTREAM) #define ARMA_DEFAULT_OSTREAM std::cout #endif #define ARMA_PRINT_ERRORS //#define ARMA_PRINT_HDF5_ERRORS #if defined(ARMA_DONT_PRINT_ERRORS) #undef ARMA_PRINT_ERRORS #undef ARMA_PRINT_HDF5_ERRORS #endif #if defined(ARMA_DONT_USE_LAPACK) #undef ARMA_USE_LAPACK #endif #if defined(ARMA_DONT_USE_BLAS) #undef ARMA_USE_BLAS #endif #if defined(ARMA_DONT_USE_ARPACK) #undef ARMA_USE_ARPACK #endif #if defined(ARMA_DONT_USE_SUPERLU) #undef ARMA_USE_SUPERLU #undef ARMA_SUPERLU_INCLUDE_DIR #endif #if defined(ARMA_DONT_USE_ATLAS) #undef ARMA_USE_ATLAS #undef ARMA_ATLAS_INCLUDE_DIR #endif #if defined(ARMA_DONT_USE_WRAPPER) #undef ARMA_USE_WRAPPER #undef ARMA_USE_HDF5_ALT #endif #if defined(ARMA_DONT_USE_CXX11) #undef ARMA_USE_CXX11 #undef ARMA_USE_EXTERN_CXX11_RNG #endif #if defined(ARMA_USE_WRAPPER) #if defined(ARMA_USE_CXX11) #if !defined(ARMA_USE_EXTERN_CXX11_RNG) #cmakedefine ARMA_USE_EXTERN_CXX11_RNG #endif #endif #endif #if defined(ARMA_DONT_USE_EXTERN_CXX11_RNG) #undef ARMA_USE_EXTERN_CXX11_RNG #endif #if defined(ARMA_32BIT_WORD) #undef ARMA_64BIT_WORD #endif #if defined(ARMA_DONT_USE_HDF5) #undef ARMA_USE_HDF5 #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/constants.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup constants //! @{ namespace priv { class Datum_helper { public: template static typename arma_real_only::result nan(typename arma_real_only::result* junk = 0) { arma_ignore(junk); if(std::numeric_limits::has_quiet_NaN) { return std::numeric_limits::quiet_NaN(); } else { return eT(0); } } template static typename arma_cx_only::result nan(typename arma_cx_only::result* junk = 0) { arma_ignore(junk); typedef typename get_pod_type::result T; return eT( Datum_helper::nan(), Datum_helper::nan() ); } template static typename arma_integral_only::result nan(typename arma_integral_only::result* junk = 0) { arma_ignore(junk); return eT(0); } template static typename arma_real_only::result inf(typename arma_real_only::result* junk = 0) { arma_ignore(junk); if(std::numeric_limits::has_infinity) { return std::numeric_limits::infinity(); } else { return std::numeric_limits::max(); } } template static typename arma_cx_only::result inf(typename arma_cx_only::result* junk = 0) { arma_ignore(junk); typedef typename get_pod_type::result T; return eT( Datum_helper::inf(), Datum_helper::inf() ); } template static typename arma_integral_only::result inf(typename arma_integral_only::result* junk = 0) { arma_ignore(junk); return std::numeric_limits::max(); } }; } //! various constants. //! Physical constants taken from NIST 2010 CODATA values, and some from WolframAlpha (values provided as of 2009-06-23) //! http://physics.nist.gov/cuu/Constants //! http://www.wolframalpha.com //! See also http://en.wikipedia.org/wiki/Physical_constant template class Datum { public: static const eT pi; //!< ratio of any circle's circumference to its diameter static const eT e; //!< base of the natural logarithm static const eT euler; //!< Euler's constant, aka Euler-Mascheroni constant static const eT gratio; //!< golden ratio static const eT sqrt2; //!< square root of 2 static const eT eps; //!< the difference between 1 and the least value greater than 1 that is representable static const eT log_min; //!< log of the minimum representable value static const eT log_max; //!< log of the maximum representable value static const eT nan; //!< "not a number" static const eT inf; //!< infinity // static const eT m_u; //!< atomic mass constant (in kg) static const eT N_A; //!< Avogadro constant static const eT k; //!< Boltzmann constant (in joules per kelvin) static const eT k_evk; //!< Boltzmann constant (in eV/K) static const eT a_0; //!< Bohr radius (in meters) static const eT mu_B; //!< Bohr magneton static const eT Z_0; //!< characteristic impedance of vacuum (in ohms) static const eT G_0; //!< conductance quantum (in siemens) static const eT k_e; //!< Coulomb's constant (in meters per farad) static const eT eps_0; //!< electric constant (in farads per meter) static const eT m_e; //!< electron mass (in kg) static const eT eV; //!< electron volt (in joules) static const eT ec; //!< elementary charge (in coulombs) static const eT F; //!< Faraday constant (in coulombs) static const eT alpha; //!< fine-structure constant static const eT alpha_inv; //!< inverse fine-structure constant static const eT K_J; //!< Josephson constant static const eT mu_0; //!< magnetic constant (in henries per meter) static const eT phi_0; //!< magnetic flux quantum (in webers) static const eT R; //!< molar gas constant (in joules per mole kelvin) static const eT G; //!< Newtonian constant of gravitation (in newton square meters per kilogram squared) static const eT h; //!< Planck constant (in joule seconds) static const eT h_bar; //!< Planck constant over 2 pi, aka reduced Planck constant (in joule seconds) static const eT m_p; //!< proton mass (in kg) static const eT R_inf; //!< Rydberg constant (in reciprocal meters) static const eT c_0; //!< speed of light in vacuum (in meters per second) static const eT sigma; //!< Stefan-Boltzmann constant static const eT R_k; //!< von Klitzing constant (in ohms) static const eT b; //!< Wien wavelength displacement law constant }; // the long lengths of the constants are for future support of "long double" // and any smart compiler that does high-precision computation at compile-time template const eT Datum::pi = eT(3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679); template const eT Datum::e = eT(2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274); template const eT Datum::euler = eT(0.5772156649015328606065120900824024310421593359399235988057672348848677267776646709369470632917467495); template const eT Datum::gratio = eT(1.6180339887498948482045868343656381177203091798057628621354486227052604628189024497072072041893911374); template const eT Datum::sqrt2 = eT(1.4142135623730950488016887242096980785696718753769480731766797379907324784621070388503875343276415727); template const eT Datum::eps = std::numeric_limits::epsilon(); template const eT Datum::log_min = std::log(std::numeric_limits::min()); template const eT Datum::log_max = std::log(std::numeric_limits::max()); template const eT Datum::nan = priv::Datum_helper::nan(); template const eT Datum::inf = priv::Datum_helper::inf(); template const eT Datum::m_u = eT(1.660539040e-27); template const eT Datum::N_A = eT(6.022140857e23); template const eT Datum::k = eT(1.38064852e-23); template const eT Datum::k_evk = eT(8.6173303e-5); template const eT Datum::a_0 = eT(0.52917721067e-10); template const eT Datum::mu_B = eT(927.4009994e-26); template const eT Datum::Z_0 = eT(3.76730313461771e-2); template const eT Datum::G_0 = eT(7.7480917310e-5); template const eT Datum::k_e = eT(8.9875517873681764e9); template const eT Datum::eps_0 = eT(8.85418781762039e-12); template const eT Datum::m_e = eT(9.10938356e-31); template const eT Datum::eV = eT(1.6021766208e-19); template const eT Datum::ec = eT(1.6021766208e-19); template const eT Datum::F = eT(96485.33289); template const eT Datum::alpha = eT(7.2973525664e-3); template const eT Datum::alpha_inv = eT(137.035999139); template const eT Datum::K_J = eT(483597.8525e9); template const eT Datum::mu_0 = eT(1.25663706143592e-06); template const eT Datum::phi_0 = eT(2.067833667e-15); template const eT Datum::R = eT(8.3144598); template const eT Datum::G = eT(6.67408e-11); template const eT Datum::h = eT(6.626070040e-34); template const eT Datum::h_bar = eT(1.054571800e-34); template const eT Datum::m_p = eT(1.672621898e-27); template const eT Datum::R_inf = eT(10973731.568508); template const eT Datum::c_0 = eT(299792458.0); template const eT Datum::sigma = eT(5.670367e-8); template const eT Datum::R_k = eT(25812.8074555); template const eT Datum::b = eT(2.8977729e-3); typedef Datum fdatum; typedef Datum datum; namespace priv { template static arma_inline arma_hot typename arma_real_only::result most_neg(typename arma_real_only::result* junk = 0) { arma_ignore(junk); if(std::numeric_limits::has_infinity) { return -(std::numeric_limits::infinity()); } else { return -(std::numeric_limits::max()); } } template static arma_inline arma_hot typename arma_integral_only::result most_neg(typename arma_integral_only::result* junk = 0) { arma_ignore(junk); return std::numeric_limits::min(); } template static arma_inline arma_hot typename arma_real_only::result most_pos(typename arma_real_only::result* junk = 0) { arma_ignore(junk); if(std::numeric_limits::has_infinity) { return std::numeric_limits::infinity(); } else { return std::numeric_limits::max(); } } template static arma_inline arma_hot typename arma_integral_only::result most_pos(typename arma_integral_only::result* junk = 0) { arma_ignore(junk); return std::numeric_limits::max(); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/constants_compat.hpp ================================================ // Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup constants_compat //! @{ // the Math and Phy classes are kept for compatibility with old code; // for new code, use the Datum class instead // eg. instead of math::pi(), use datum::pi template class Math { public: // the long lengths of the constants are for future support of "long double" // and any smart compiler that does high-precision computation at compile-time //! ratio of any circle's circumference to its diameter static eT pi() { return eT(3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679); } //! base of the natural logarithm static eT e() { return eT(2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274); } //! Euler's constant, aka Euler-Mascheroni constant static eT euler() { return eT(0.5772156649015328606065120900824024310421593359399235988057672348848677267776646709369470632917467495); } //! golden ratio static eT gratio() { return eT(1.6180339887498948482045868343656381177203091798057628621354486227052604628189024497072072041893911374); } //! square root of 2 static eT sqrt2() { return eT(1.4142135623730950488016887242096980785696718753769480731766797379907324784621070388503875343276415727); } //! the difference between 1 and the least value greater than 1 that is representable static eT eps() { return std::numeric_limits::epsilon(); } //! log of the minimum representable value static eT log_min() { static const eT out = std::log(std::numeric_limits::min()); return out; } //! log of the maximum representable value static eT log_max() { static const eT out = std::log(std::numeric_limits::max()); return out; } //! "not a number" static eT nan() { return priv::Datum_helper::nan(); } //! infinity static eT inf() { return priv::Datum_helper::inf(); } }; //! Physical constants taken from NIST 2010 CODATA values, and some from WolframAlpha (values provided as of 2009-06-23) //! http://physics.nist.gov/cuu/Constants //! http://www.wolframalpha.com //! See also http://en.wikipedia.org/wiki/Physical_constant template class Phy { public: //! atomic mass constant (in kg) static eT m_u() { return eT(1.660539040e-27); } //! Avogadro constant static eT N_A() { return eT(6.022140857e23); } //! Boltzmann constant (in joules per kelvin) static eT k() { return eT(1.38064852e-23); } //! Boltzmann constant (in eV/K) static eT k_evk() { return eT(8.6173303e-5); } //! Bohr radius (in meters) static eT a_0() { return eT(0.52917721067e-10); } //! Bohr magneton static eT mu_B() { return eT(927.4009994e-26); } //! characteristic impedance of vacuum (in ohms) static eT Z_0() { return eT(3.76730313461771e-2); } //! conductance quantum (in siemens) static eT G_0() { return eT(7.7480917310e-5); } //! Coulomb's constant (in meters per farad) static eT k_e() { return eT(8.9875517873681764e9); } //! electric constant (in farads per meter) static eT eps_0() { return eT(8.85418781762039e-12); } //! electron mass (in kg) static eT m_e() { return eT(9.10938356e-31); } //! electron volt (in joules) static eT eV() { return eT(1.6021766208e-19); } //! elementary charge (in coulombs) static eT e() { return eT(1.6021766208e-19); } //! Faraday constant (in coulombs) static eT F() { return eT(96485.33289); } //! fine-structure constant static eT alpha() { return eT(7.2973525664e-3); } //! inverse fine-structure constant static eT alpha_inv() { return eT(137.035999139); } //! Josephson constant static eT K_J() { return eT(483597.8525e9); } //! magnetic constant (in henries per meter) static eT mu_0() { return eT(1.25663706143592e-06); } //! magnetic flux quantum (in webers) static eT phi_0() { return eT(2.067833667e-15); } //! molar gas constant (in joules per mole kelvin) static eT R() { return eT(8.3144598); } //! Newtonian constant of gravitation (in newton square meters per kilogram squared) static eT G() { return eT(6.67408e-11); } //! Planck constant (in joule seconds) static eT h() { return eT(6.626070040e-34); } //! Planck constant over 2 pi, aka reduced Planck constant (in joule seconds) static eT h_bar() { return eT(1.054571800e-34); } //! proton mass (in kg) static eT m_p() { return eT(1.672621898e-27); } //! Rydberg constant (in reciprocal meters) static eT R_inf() { return eT(10973731.568508); } //! speed of light in vacuum (in meters per second) static eT c_0() { return eT(299792458.0); } //! Stefan-Boltzmann constant static eT sigma() { return eT(5.670367e-8); } //! von Klitzing constant (in ohms) static eT R_k() { return eT(25812.8074555); } //! Wien wavelength displacement law constant static eT b() { return eT(2.8977729e-3); } }; typedef Math fmath; typedef Math math; typedef Phy fphy; typedef Phy phy; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/debug.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // Copyright (C) 2011 Stanislav Funiak // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup debug //! @{ template inline std::ostream& arma_stream_err1(std::ostream* user_stream) { static std::ostream* stream_err1 = &(ARMA_DEFAULT_OSTREAM); if(user_stream != NULL) { stream_err1 = user_stream; } return *stream_err1; } template inline std::ostream& arma_stream_err2(std::ostream* user_stream) { static std::ostream* stream_err2 = &(ARMA_DEFAULT_OSTREAM); if(user_stream != NULL) { stream_err2 = user_stream; } return *stream_err2; } inline void set_stream_err1(std::ostream& user_stream) { arma_stream_err1(&user_stream); } inline void set_stream_err2(std::ostream& user_stream) { arma_stream_err2(&user_stream); } inline std::ostream& get_stream_err1() { return arma_stream_err1(NULL); } inline std::ostream& get_stream_err2() { return arma_stream_err2(NULL); } // // arma_stop //! print a message to get_stream_err1() and/or throw a logic_error exception template arma_cold arma_noinline static void arma_stop(const T1& x) { #if defined(ARMA_PRINT_ERRORS) { std::ostream& out = get_stream_err1(); out << '\n'; out << "error: " << x << '\n'; out << '\n'; out.flush(); } #else { arma_ignore(x); } #endif throw std::logic_error( std::string(x) ); } template arma_cold arma_noinline static void arma_stop_bad_alloc(const T1& x) { #if defined(ARMA_PRINT_ERRORS) { std::ostream& out = get_stream_err2(); out << '\n'; out << "error: " << x << '\n'; out << '\n'; out.flush(); } #else { arma_ignore(x); } #endif throw std::bad_alloc(); } // // arma_bad //! print a message to get_stream_err2() and/or throw a run-time error exception template arma_cold arma_noinline static void arma_bad(const T1& x, const bool hurl = true) { #if defined(ARMA_PRINT_ERRORS) { std::ostream& out = get_stream_err2(); out << '\n'; out << "error: " << x << '\n'; out << '\n'; out.flush(); } #else { arma_ignore(x); } #endif if(hurl == true) { throw std::runtime_error( std::string(x) ); } } // // arma_print arma_cold inline void arma_print() { get_stream_err1() << std::endl; } template arma_cold arma_noinline static void arma_print(const T1& x) { get_stream_err1() << x << std::endl; } template arma_cold arma_noinline static void arma_print(const T1& x, const T2& y) { get_stream_err1() << x << y << std::endl; } template arma_cold arma_noinline static void arma_print(const T1& x, const T2& y, const T3& z) { get_stream_err1() << x << y << z << std::endl; } // // arma_sigprint //! print a message the the log stream with a preceding @ character. //! by default the log stream is cout. //! used for printing the signature of a function //! (see the arma_extra_debug_sigprint macro) inline void arma_sigprint(const char* x) { get_stream_err1() << "@ " << x; } // // arma_bktprint inline void arma_bktprint() { get_stream_err1() << std::endl; } template inline void arma_bktprint(const T1& x) { get_stream_err1() << " [" << x << ']' << std::endl; } template inline void arma_bktprint(const T1& x, const T2& y) { get_stream_err1() << " [" << x << y << ']' << std::endl; } // // arma_thisprint inline void arma_thisprint(const void* this_ptr) { get_stream_err1() << " [this = " << this_ptr << ']' << std::endl; } // // arma_warn //! print a message to the warn stream template arma_cold arma_noinline static void arma_warn(const bool state, const T1& x) { if(state==true) { get_stream_err2() << x << std::endl; } } template arma_cold arma_noinline static void arma_warn(const bool state, const T1& x, const T2& y) { if(state==true) { get_stream_err2() << x << y << std::endl; } } template arma_cold arma_noinline static void arma_warn(const bool state, const T1& x, const T2& y, const T3& z) { if(state==true) { get_stream_err2() << x << y << z << std::endl; } } // // arma_check //! if state is true, abort program template arma_hot inline void arma_check(const bool state, const T1& x) { if(state==true) { arma_stop(arma_boost::str_wrapper(x)); } } template arma_hot inline void arma_check(const bool state, const T1& x, const T2& y) { if(state==true) { arma_stop( std::string(x) + std::string(y) ); } } template arma_hot inline void arma_check_bad_alloc(const bool state, const T1& x) { if(state==true) { arma_stop_bad_alloc(x); } } // // arma_set_error arma_hot arma_inline void arma_set_error(bool& err_state, char*& err_msg, const bool expression, const char* message) { if(expression == true) { err_state = true; err_msg = const_cast(message); } } // // functions for generating strings indicating size errors arma_cold arma_noinline static std::string arma_incompat_size_string(const uword A_n_rows, const uword A_n_cols, const uword B_n_rows, const uword B_n_cols, const char* x) { std::stringstream tmp; tmp << x << ": incompatible matrix dimensions: " << A_n_rows << 'x' << A_n_cols << " and " << B_n_rows << 'x' << B_n_cols; return tmp.str(); } arma_cold arma_noinline static std::string arma_incompat_size_string(const uword A_n_rows, const uword A_n_cols, const uword A_n_slices, const uword B_n_rows, const uword B_n_cols, const uword B_n_slices, const char* x) { std::stringstream tmp; tmp << x << ": incompatible cube dimensions: " << A_n_rows << 'x' << A_n_cols << 'x' << A_n_slices << " and " << B_n_rows << 'x' << B_n_cols << 'x' << B_n_slices; return tmp.str(); } template arma_cold arma_noinline static std::string arma_incompat_size_string(const subview_cube& Q, const Mat& A, const char* x) { std::stringstream tmp; tmp << x << ": interpreting matrix as cube with dimensions: " << A.n_rows << 'x' << A.n_cols << 'x' << 1 << " or " << A.n_rows << 'x' << 1 << 'x' << A.n_cols << " or " << 1 << 'x' << A.n_rows << 'x' << A.n_cols << " is incompatible with cube dimensions: " << Q.n_rows << 'x' << Q.n_cols << 'x' << Q.n_slices; return tmp.str(); } // // functions for checking whether two dense matrices have the same dimensions arma_inline arma_hot void arma_assert_same_size(const uword A_n_rows, const uword A_n_cols, const uword B_n_rows, const uword B_n_cols, const char* x) { if( (A_n_rows != B_n_rows) || (A_n_cols != B_n_cols) ) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, B_n_rows, B_n_cols, x) ); } } //! stop if given matrices have different sizes template arma_hot inline void arma_assert_same_size(const Mat& A, const Mat& B, const char* x) { const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; if( (A_n_rows != B_n_rows) || (A_n_cols != B_n_cols) ) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, B_n_rows, B_n_cols, x) ); } } //! stop if given proxies have different sizes template arma_hot inline void arma_assert_same_size(const Proxy& A, const Proxy& B, const char* x) { const uword A_n_rows = A.get_n_rows(); const uword A_n_cols = A.get_n_cols(); const uword B_n_rows = B.get_n_rows(); const uword B_n_cols = B.get_n_cols(); if( (A_n_rows != B_n_rows) || (A_n_cols != B_n_cols) ) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, B_n_rows, B_n_cols, x) ); } } template arma_hot inline void arma_assert_same_size(const subview& A, const subview& B, const char* x) { const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; if( (A_n_rows != B_n_rows) || (A_n_cols != B_n_cols) ) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, B_n_rows, B_n_cols, x) ); } } template arma_hot inline void arma_assert_same_size(const Mat& A, const subview& B, const char* x) { const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; if( (A_n_rows != B_n_rows) || (A_n_cols != B_n_cols) ) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, B_n_rows, B_n_cols, x) ); } } template arma_hot inline void arma_assert_same_size(const subview& A, const Mat& B, const char* x) { const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; if( (A_n_rows != B_n_rows) || (A_n_cols != B_n_cols) ) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, B_n_rows, B_n_cols, x) ); } } template arma_hot inline void arma_assert_same_size(const Mat& A, const Proxy& B, const char* x) { const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword B_n_rows = B.get_n_rows(); const uword B_n_cols = B.get_n_cols(); if( (A_n_rows != B_n_rows) || (A_n_cols != B_n_cols) ) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, B_n_rows, B_n_cols, x) ); } } template arma_hot inline void arma_assert_same_size(const Proxy& A, const Mat& B, const char* x) { const uword A_n_rows = A.get_n_rows(); const uword A_n_cols = A.get_n_cols(); const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; if( (A_n_rows != B_n_rows) || (A_n_cols != B_n_cols) ) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, B_n_rows, B_n_cols, x) ); } } template arma_hot inline void arma_assert_same_size(const Proxy& A, const subview& B, const char* x) { const uword A_n_rows = A.get_n_rows(); const uword A_n_cols = A.get_n_cols(); const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; if( (A_n_rows != B_n_rows) || (A_n_cols != B_n_cols) ) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, B_n_rows, B_n_cols, x) ); } } template arma_hot inline void arma_assert_same_size(const subview& A, const Proxy& B, const char* x) { const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword B_n_rows = B.get_n_rows(); const uword B_n_cols = B.get_n_cols(); if( (A_n_rows != B_n_rows) || (A_n_cols != B_n_cols) ) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, B_n_rows, B_n_cols, x) ); } } // // functions for checking whether two sparse matrices have the same dimensions template arma_hot inline void arma_assert_same_size(const SpMat& A, const SpMat& B, const char* x) { const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; if( (A_n_rows != B_n_rows) || (A_n_cols != B_n_cols) ) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, B_n_rows, B_n_cols, x) ); } } // // functions for checking whether two cubes have the same dimensions arma_hot inline void arma_assert_same_size(const uword A_n_rows, const uword A_n_cols, const uword A_n_slices, const uword B_n_rows, const uword B_n_cols, const uword B_n_slices, const char* x) { if( (A_n_rows != B_n_rows) || (A_n_cols != B_n_cols) || (A_n_slices != B_n_slices) ) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, A_n_slices, B_n_rows, B_n_cols, B_n_slices, x) ); } } //! stop if given cubes have different sizes template arma_hot inline void arma_assert_same_size(const Cube& A, const Cube& B, const char* x) { if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) || (A.n_slices != B.n_slices) ) { arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, A.n_slices, B.n_rows, B.n_cols, B.n_slices, x) ); } } template arma_hot inline void arma_assert_same_size(const Cube& A, const subview_cube& B, const char* x) { if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) || (A.n_slices != B.n_slices) ) { arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, A.n_slices, B.n_rows, B.n_cols, B.n_slices, x) ); } } template arma_hot inline void arma_assert_same_size(const subview_cube& A, const Cube& B, const char* x) { if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) || (A.n_slices != B.n_slices) ) { arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, A.n_slices, B.n_rows, B.n_cols, B.n_slices, x) ); } } template arma_hot inline void arma_assert_same_size(const subview_cube& A, const subview_cube& B, const char* x) { if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) || (A.n_slices != B.n_slices)) { arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, A.n_slices, B.n_rows, B.n_cols, B.n_slices, x) ); } } //! stop if given cube proxies have different sizes template arma_hot inline void arma_assert_same_size(const ProxyCube& A, const ProxyCube& B, const char* x) { const uword A_n_rows = A.get_n_rows(); const uword A_n_cols = A.get_n_cols(); const uword A_n_slices = A.get_n_slices(); const uword B_n_rows = B.get_n_rows(); const uword B_n_cols = B.get_n_cols(); const uword B_n_slices = B.get_n_slices(); if( (A_n_rows != B_n_rows) || (A_n_cols != B_n_cols) || (A_n_slices != B_n_slices)) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, A_n_slices, B_n_rows, B_n_cols, B_n_slices, x) ); } } // // functions for checking whether a cube or subcube can be interpreted as a matrix (i.e. single slice) template arma_hot inline void arma_assert_same_size(const Cube& A, const Mat& B, const char* x) { if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) || (A.n_slices != 1) ) { arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, A.n_slices, B.n_rows, B.n_cols, 1, x) ); } } template arma_hot inline void arma_assert_same_size(const Mat& A, const Cube& B, const char* x) { if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) || (1 != B.n_slices) ) { arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, 1, B.n_rows, B.n_cols, B.n_slices, x) ); } } template arma_hot inline void arma_assert_same_size(const subview_cube& A, const Mat& B, const char* x) { if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) || (A.n_slices != 1) ) { arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, A.n_slices, B.n_rows, B.n_cols, 1, x) ); } } template arma_hot inline void arma_assert_same_size(const Mat& A, const subview_cube& B, const char* x) { if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) || (1 != B.n_slices) ) { arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, 1, B.n_rows, B.n_cols, B.n_slices, x) ); } } template inline void arma_assert_cube_as_mat(const Mat& M, const T1& Q, const char* x, const bool check_compat_size) { const uword Q_n_rows = Q.n_rows; const uword Q_n_cols = Q.n_cols; const uword Q_n_slices = Q.n_slices; const uword M_vec_state = M.vec_state; if(M_vec_state == 0) { if( ( (Q_n_rows == 1) || (Q_n_cols == 1) || (Q_n_slices == 1) ) == false ) { std::stringstream tmp; tmp << x << ": can't interpret cube with dimensions " << Q_n_rows << 'x' << Q_n_cols << 'x' << Q_n_slices << " as a matrix; one of the dimensions must be 1"; arma_stop( tmp.str() ); } } else { if(Q_n_slices == 1) { if( (M_vec_state == 1) && (Q_n_cols != 1) ) { std::stringstream tmp; tmp << x << ": can't interpret cube with dimensions " << Q_n_rows << 'x' << Q_n_cols << 'x' << Q_n_slices << " as a column vector"; arma_stop( tmp.str() ); } if( (M_vec_state == 2) && (Q_n_rows != 1) ) { std::stringstream tmp; tmp << x << ": can't interpret cube with dimensions " << Q_n_rows << 'x' << Q_n_cols << 'x' << Q_n_slices << " as a row vector"; arma_stop( tmp.str() ); } } else { if( (Q_n_cols != 1) && (Q_n_rows != 1) ) { std::stringstream tmp; tmp << x << ": can't interpret cube with dimensions " << Q_n_rows << 'x' << Q_n_cols << 'x' << Q_n_slices << " as a vector"; arma_stop( tmp.str() ); } } } if(check_compat_size == true) { const uword M_n_rows = M.n_rows; const uword M_n_cols = M.n_cols; if(M_vec_state == 0) { if( ( ( (Q_n_rows == M_n_rows) && (Q_n_cols == M_n_cols) ) || ( (Q_n_rows == M_n_rows) && (Q_n_slices == M_n_cols) ) || ( (Q_n_cols == M_n_rows) && (Q_n_slices == M_n_cols) ) ) == false ) { std::stringstream tmp; tmp << x << ": can't interpret cube with dimensions " << Q_n_rows << 'x' << Q_n_cols << 'x' << Q_n_slices << " as a matrix with dimensions " << M_n_rows << 'x' << M_n_cols; arma_stop( tmp.str() ); } } else { if(Q_n_slices == 1) { if( (M_vec_state == 1) && (Q_n_rows != M_n_rows) ) { std::stringstream tmp; tmp << x << ": can't interpret cube with dimensions " << Q_n_rows << 'x' << Q_n_cols << 'x' << Q_n_slices << " as a column vector with dimensions " << M_n_rows << 'x' << M_n_cols; arma_stop( tmp.str() ); } if( (M_vec_state == 2) && (Q_n_cols != M_n_cols) ) { std::stringstream tmp; tmp << x << ": can't interpret cube with dimensions " << Q_n_rows << 'x' << Q_n_cols << 'x' << Q_n_slices << " as a row vector with dimensions " << M_n_rows << 'x' << M_n_cols; arma_stop( tmp.str() ); } } else { if( ( (M_n_cols == Q_n_slices) || (M_n_rows == Q_n_slices) ) == false ) { std::stringstream tmp; tmp << x << ": can't interpret cube with dimensions " << Q_n_rows << 'x' << Q_n_cols << 'x' << Q_n_slices << " as a vector with dimensions " << M_n_rows << 'x' << M_n_cols; arma_stop( tmp.str() ); } } } } } // // functions for checking whether two matrices have dimensions that are compatible with the matrix multiply operation arma_hot inline void arma_assert_mul_size(const uword A_n_rows, const uword A_n_cols, const uword B_n_rows, const uword B_n_cols, const char* x) { if(A_n_cols != B_n_rows) { arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, B_n_rows, B_n_cols, x) ); } } //! stop if given matrices are incompatible for multiplication template arma_hot inline void arma_assert_mul_size(const Mat& A, const Mat& B, const char* x) { const uword A_n_cols = A.n_cols; const uword B_n_rows = B.n_rows; if(A_n_cols != B_n_rows) { arma_stop( arma_incompat_size_string(A.n_rows, A_n_cols, B_n_rows, B.n_cols, x) ); } } //! stop if given matrices are incompatible for multiplication template arma_hot inline void arma_assert_mul_size(const Mat& A, const Mat& B, const bool do_trans_A, const bool do_trans_B, const char* x) { const uword final_A_n_cols = (do_trans_A == false) ? A.n_cols : A.n_rows; const uword final_B_n_rows = (do_trans_B == false) ? B.n_rows : B.n_cols; if(final_A_n_cols != final_B_n_rows) { const uword final_A_n_rows = (do_trans_A == false) ? A.n_rows : A.n_cols; const uword final_B_n_cols = (do_trans_B == false) ? B.n_cols : B.n_rows; arma_stop( arma_incompat_size_string(final_A_n_rows, final_A_n_cols, final_B_n_rows, final_B_n_cols, x) ); } } template arma_hot inline void arma_assert_trans_mul_size(const uword A_n_rows, const uword A_n_cols, const uword B_n_rows, const uword B_n_cols, const char* x) { const uword final_A_n_cols = (do_trans_A == false) ? A_n_cols : A_n_rows; const uword final_B_n_rows = (do_trans_B == false) ? B_n_rows : B_n_cols; if(final_A_n_cols != final_B_n_rows) { const uword final_A_n_rows = (do_trans_A == false) ? A_n_rows : A_n_cols; const uword final_B_n_cols = (do_trans_B == false) ? B_n_cols : B_n_rows; arma_stop( arma_incompat_size_string(final_A_n_rows, final_A_n_cols, final_B_n_rows, final_B_n_cols, x) ); } } template arma_hot inline void arma_assert_mul_size(const Mat& A, const subview& B, const char* x) { if(A.n_cols != B.n_rows) { arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) ); } } template arma_hot inline void arma_assert_mul_size(const subview& A, const Mat& B, const char* x) { if(A.n_cols != B.n_rows) { arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) ); } } template arma_hot inline void arma_assert_mul_size(const subview& A, const subview& B, const char* x) { if(A.n_cols != B.n_rows) { arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) ); } } template arma_hot inline void arma_assert_blas_size(const T1& A) { if(sizeof(uword) >= sizeof(blas_int)) { bool overflow; overflow = (A.n_rows > ARMA_MAX_BLAS_INT); overflow = (A.n_cols > ARMA_MAX_BLAS_INT) || overflow; if(overflow) { arma_bad("integer overflow: matrix dimensions are too large for integer type used by BLAS and LAPACK"); } } } template arma_hot inline void arma_assert_blas_size(const T1& A, const T2& B) { if(sizeof(uword) >= sizeof(blas_int)) { bool overflow; overflow = (A.n_rows > ARMA_MAX_BLAS_INT); overflow = (A.n_cols > ARMA_MAX_BLAS_INT) || overflow; overflow = (B.n_rows > ARMA_MAX_BLAS_INT) || overflow; overflow = (B.n_cols > ARMA_MAX_BLAS_INT) || overflow; if(overflow) { arma_bad("integer overflow: matrix dimensions are too large for integer type used by BLAS and LAPACK"); } } } template arma_hot inline void arma_assert_atlas_size(const T1& A) { if(sizeof(uword) >= sizeof(int)) { bool overflow; overflow = (A.n_rows > INT_MAX); overflow = (A.n_cols > INT_MAX) || overflow; if(overflow) { arma_bad("integer overflow: matrix dimensions are too large for integer type used by ATLAS"); } } } template arma_hot inline void arma_assert_atlas_size(const T1& A, const T2& B) { if(sizeof(uword) >= sizeof(int)) { bool overflow; overflow = (A.n_rows > INT_MAX); overflow = (A.n_cols > INT_MAX) || overflow; overflow = (B.n_rows > INT_MAX) || overflow; overflow = (B.n_cols > INT_MAX) || overflow; if(overflow) { arma_bad("integer overflow: matrix dimensions are too large for integer type used by ATLAS"); } } } // // macros // #define ARMA_STRING1(x) #x // #define ARMA_STRING2(x) ARMA_STRING1(x) // #define ARMA_FILELINE __FILE__ ": " ARMA_STRING2(__LINE__) #if defined(ARMA_NO_DEBUG) #undef ARMA_EXTRA_DEBUG #define arma_debug_print true ? (void)0 : arma_print #define arma_debug_warn true ? (void)0 : arma_warn #define arma_debug_check true ? (void)0 : arma_check #define arma_debug_set_error true ? (void)0 : arma_set_error #define arma_debug_assert_same_size true ? (void)0 : arma_assert_same_size #define arma_debug_assert_mul_size true ? (void)0 : arma_assert_mul_size #define arma_debug_assert_trans_mul_size true ? (void)0 : arma_assert_trans_mul_size #define arma_debug_assert_cube_as_mat true ? (void)0 : arma_assert_cube_as_mat #define arma_debug_assert_blas_size true ? (void)0 : arma_assert_blas_size #define arma_debug_assert_atlas_size true ? (void)0 : arma_assert_atlas_size #else #define arma_debug_print arma_print #define arma_debug_warn arma_warn #define arma_debug_check arma_check #define arma_debug_set_error arma_set_error #define arma_debug_assert_same_size arma_assert_same_size #define arma_debug_assert_mul_size arma_assert_mul_size #define arma_debug_assert_trans_mul_size arma_assert_trans_mul_size #define arma_debug_assert_cube_as_mat arma_assert_cube_as_mat #define arma_debug_assert_blas_size arma_assert_blas_size #define arma_debug_assert_atlas_size arma_assert_atlas_size #endif #if defined(ARMA_EXTRA_DEBUG) #define arma_extra_debug_sigprint arma_sigprint(ARMA_FNSIG); arma_bktprint #define arma_extra_debug_sigprint_this arma_sigprint(ARMA_FNSIG); arma_thisprint #define arma_extra_debug_print arma_print #define arma_extra_debug_warn arma_warn #define arma_extra_debug_check arma_check #else #define arma_extra_debug_sigprint true ? (void)0 : arma_bktprint #define arma_extra_debug_sigprint_this true ? (void)0 : arma_thisprint #define arma_extra_debug_print true ? (void)0 : arma_print #define arma_extra_debug_warn true ? (void)0 : arma_warn #define arma_extra_debug_check true ? (void)0 : arma_check #endif #if defined(ARMA_EXTRA_DEBUG) namespace junk { class arma_first_extra_debug_message { public: inline arma_first_extra_debug_message() { union { unsigned short a; unsigned char b[sizeof(unsigned short)]; } endian_test; endian_test.a = 1; const bool little_endian = (endian_test.b[0] == 1); const char* nickname = ARMA_VERSION_NAME; std::ostream& out = get_stream_err1(); out << "@ ---" << '\n'; out << "@ Armadillo " << arma_version::major << '.' << arma_version::minor << '.' << arma_version::patch << " (" << nickname << ")\n"; out << "@ arma_config::use_wrapper = " << arma_config::use_wrapper << '\n'; out << "@ arma_config::use_cxx11 = " << arma_config::use_cxx11 << '\n'; out << "@ arma_config::openmp = " << arma_config::openmp << '\n'; out << "@ arma_config::lapack = " << arma_config::lapack << '\n'; out << "@ arma_config::blas = " << arma_config::blas << '\n'; out << "@ arma_config::arpack = " << arma_config::arpack << '\n'; out << "@ arma_config::superlu = " << arma_config::superlu << '\n'; out << "@ arma_config::atlas = " << arma_config::atlas << '\n'; out << "@ arma_config::hdf5 = " << arma_config::hdf5 << '\n'; out << "@ arma_config::good_comp = " << arma_config::good_comp << '\n'; out << "@ arma_config::extra_code = " << arma_config::extra_code << '\n'; out << "@ arma_config::mat_prealloc = " << arma_config::mat_prealloc << '\n'; out << "@ sizeof(void*) = " << sizeof(void*) << '\n'; out << "@ sizeof(int) = " << sizeof(int) << '\n'; out << "@ sizeof(long) = " << sizeof(long) << '\n'; out << "@ sizeof(uword) = " << sizeof(uword) << '\n'; out << "@ sizeof(blas_int) = " << sizeof(blas_int) << '\n'; out << "@ little_endian = " << little_endian << '\n'; out << "@ ---" << std::endl; } }; static arma_first_extra_debug_message arma_first_extra_debug_message_run; } #endif //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/diagmat_proxy.hpp ================================================ // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // Copyright (C) 2008-2014 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup diagmat_proxy //! @{ template class diagmat_proxy_default { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; inline diagmat_proxy_default(const T1& X) : P ( X ) , P_is_vec( (resolves_to_vector::value) || (P.get_n_rows() == 1) || (P.get_n_cols() == 1) ) , P_is_col( T1::is_col || (P.get_n_cols() == 1) ) , n_elem ( P_is_vec ? P.get_n_elem() : (std::min)(P.get_n_elem(), P.get_n_rows()) ) { arma_extra_debug_sigprint(); arma_debug_check ( (P_is_vec == false) && (P.get_n_rows() != P.get_n_cols()), "diagmat(): only vectors and square matrices are accepted" ); } arma_inline elem_type operator[](const uword i) const { if(Proxy::prefer_at_accessor == false) { return P_is_vec ? P[i] : P.at(i,i); } else { if(P_is_vec) { return (P_is_col) ? P.at(i,0) : P.at(0,i); } else { return P.at(i,i); } } } arma_inline elem_type at(const uword row, const uword col) const { if(row == col) { if(Proxy::prefer_at_accessor == false) { return (P_is_vec) ? P[row] : P.at(row,row); } else { if(P_is_vec) { return (P_is_col) ? P.at(row,0) : P.at(0,row); } else { return P.at(row,row); } } } else { return elem_type(0); } } arma_inline bool is_alias(const Mat&) const { return false; } const Proxy P; const bool P_is_vec; const bool P_is_col; const uword n_elem; }; template class diagmat_proxy_fixed { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; inline diagmat_proxy_fixed(const T1& X) : P(X) { arma_extra_debug_sigprint(); arma_debug_check ( (P_is_vec == false) && (T1::n_rows != T1::n_cols), "diagmat(): only vectors and square matrices are accepted" ); } arma_inline elem_type operator[](const uword i) const { return (P_is_vec) ? P[i] : P.at(i,i); } arma_inline elem_type at(const uword row, const uword col) const { if(row == col) { return (P_is_vec) ? P[row] : P.at(row,row); } else { return elem_type(0); } } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&P)); } const T1& P; static const bool P_is_vec = (T1::n_rows == 1) || (T1::n_cols == 1); static const uword n_elem = P_is_vec ? T1::n_elem : ( (T1::n_elem < T1::n_rows) ? T1::n_elem : T1::n_rows ); }; template struct diagmat_proxy_redirect {}; template struct diagmat_proxy_redirect { typedef diagmat_proxy_default result; }; template struct diagmat_proxy_redirect { typedef diagmat_proxy_fixed result; }; template class diagmat_proxy : public diagmat_proxy_redirect::value >::result { public: inline diagmat_proxy(const T1& X) : diagmat_proxy_redirect< T1, is_Mat_fixed::value >::result(X) { } }; template class diagmat_proxy< Mat > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; inline diagmat_proxy(const Mat& X) : P ( X ) , P_is_vec( (X.n_rows == 1) || (X.n_cols == 1) ) , n_elem ( P_is_vec ? X.n_elem : (std::min)(X.n_elem, X.n_rows) ) { arma_extra_debug_sigprint(); arma_debug_check ( (P_is_vec == false) && (P.n_rows != P.n_cols), "diagmat(): only vectors and square matrices are accepted" ); } arma_inline elem_type operator[] (const uword i) const { return P_is_vec ? P[i] : P.at(i,i); } arma_inline elem_type at (const uword row, const uword col) const { return (row == col) ? ( P_is_vec ? P[row] : P.at(row,row) ) : elem_type(0); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&P)); } const Mat& P; const bool P_is_vec; const uword n_elem; }; template class diagmat_proxy< Row > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; inline diagmat_proxy(const Row& X) : P(X) , n_elem(X.n_elem) { arma_extra_debug_sigprint(); } arma_inline elem_type operator[] (const uword i) const { return P[i]; } arma_inline elem_type at (const uword row, const uword col) const { return (row == col) ? P[row] : elem_type(0); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&P)); } static const bool P_is_vec = true; const Row& P; const uword n_elem; }; template class diagmat_proxy< Col > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; inline diagmat_proxy(const Col& X) : P(X) , n_elem(X.n_elem) { arma_extra_debug_sigprint(); } arma_inline elem_type operator[] (const uword i) const { return P[i]; } arma_inline elem_type at (const uword row, const uword col) const { return (row == col) ? P[row] : elem_type(0); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&P)); } static const bool P_is_vec = true; const Col& P; const uword n_elem; }; template class diagmat_proxy< subview_row > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; inline diagmat_proxy(const subview_row& X) : P(X) , n_elem(X.n_elem) { arma_extra_debug_sigprint(); } arma_inline elem_type operator[] (const uword i) const { return P[i]; } arma_inline elem_type at (const uword row, const uword col) const { return (row == col) ? P[row] : elem_type(0); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&(P.m))); } static const bool P_is_vec = true; const subview_row& P; const uword n_elem; }; template class diagmat_proxy< subview_col > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; inline diagmat_proxy(const subview_col& X) : P(X) , n_elem(X.n_elem) { arma_extra_debug_sigprint(); } arma_inline elem_type operator[] (const uword i) const { return P[i]; } arma_inline elem_type at (const uword row, const uword col) const { return (row == col) ? P[row] : elem_type(0); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&(P.m))); } static const bool P_is_vec = true; const subview_col& P; const uword n_elem; }; // // // template class diagmat_proxy_check_default { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; inline diagmat_proxy_check_default(const T1& X, const Mat&) : P(X) , P_is_vec( (resolves_to_vector::value) || (P.n_rows == 1) || (P.n_cols == 1) ) , n_elem( P_is_vec ? P.n_elem : (std::min)(P.n_elem, P.n_rows) ) { arma_extra_debug_sigprint(); arma_debug_check ( (P_is_vec == false) && (P.n_rows != P.n_cols), "diagmat(): only vectors and square matrices are accepted" ); } arma_inline elem_type operator[] (const uword i) const { return P_is_vec ? P[i] : P.at(i,i); } arma_inline elem_type at (const uword row, const uword col) const { return (row == col) ? ( P_is_vec ? P[row] : P.at(row,row) ) : elem_type(0); } const Mat P; const bool P_is_vec; const uword n_elem; }; template class diagmat_proxy_check_fixed { public: typedef typename T1::elem_type eT; typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; inline diagmat_proxy_check_fixed(const T1& X, const Mat& out) : P( const_cast(X.memptr()), T1::n_rows, T1::n_cols, (&X == &out), false ) { arma_extra_debug_sigprint(); arma_debug_check ( (P_is_vec == false) && (T1::n_rows != T1::n_cols), "diagmat(): only vectors and square matrices are accepted" ); } arma_inline eT operator[] (const uword i) const { return P_is_vec ? P[i] : P.at(i,i); } arma_inline eT at (const uword row, const uword col) const { return (row == col) ? ( P_is_vec ? P[row] : P.at(row,row) ) : elem_type(0); } const Mat P; // TODO: why not just store X directly as T1& ? test with fixed size vectors and matrices static const bool P_is_vec = (T1::n_rows == 1) || (T1::n_cols == 1); static const uword n_elem = P_is_vec ? T1::n_elem : ( (T1::n_elem < T1::n_rows) ? T1::n_elem : T1::n_rows ); }; template struct diagmat_proxy_check_redirect {}; template struct diagmat_proxy_check_redirect { typedef diagmat_proxy_check_default result; }; template struct diagmat_proxy_check_redirect { typedef diagmat_proxy_check_fixed result; }; template class diagmat_proxy_check : public diagmat_proxy_check_redirect::value >::result { public: inline diagmat_proxy_check(const T1& X, const Mat& out) : diagmat_proxy_check_redirect< T1, is_Mat_fixed::value >::result(X, out) { } }; template class diagmat_proxy_check< Mat > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; inline diagmat_proxy_check(const Mat& X, const Mat& out) : P_local ( (&X == &out) ? new Mat(X) : 0 ) , P ( (&X == &out) ? (*P_local) : X ) , P_is_vec( (P.n_rows == 1) || (P.n_cols == 1) ) , n_elem ( P_is_vec ? P.n_elem : (std::min)(P.n_elem, P.n_rows) ) { arma_extra_debug_sigprint(); arma_debug_check ( (P_is_vec == false) && (P.n_rows != P.n_cols), "diagmat(): only vectors and square matrices are accepted" ); } inline ~diagmat_proxy_check() { if(P_local) { delete P_local; } } arma_inline elem_type operator[] (const uword i) const { return P_is_vec ? P[i] : P.at(i,i); } arma_inline elem_type at (const uword row, const uword col) const { return (row == col) ? ( P_is_vec ? P[row] : P.at(row,row) ) : elem_type(0); } const Mat* P_local; const Mat& P; const bool P_is_vec; const uword n_elem; }; template class diagmat_proxy_check< Row > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; inline diagmat_proxy_check(const Row& X, const Mat& out) : P_local ( (&X == reinterpret_cast*>(&out)) ? new Row(X) : 0 ) , P ( (&X == reinterpret_cast*>(&out)) ? (*P_local) : X ) , n_elem (X.n_elem) { arma_extra_debug_sigprint(); } inline ~diagmat_proxy_check() { if(P_local) { delete P_local; } } arma_inline elem_type operator[] (const uword i) const { return P[i]; } arma_inline elem_type at (const uword row, const uword col) const { return (row == col) ? P[row] : elem_type(0); } static const bool P_is_vec = true; const Row* P_local; const Row& P; const uword n_elem; }; template class diagmat_proxy_check< Col > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; inline diagmat_proxy_check(const Col& X, const Mat& out) : P_local ( (&X == reinterpret_cast*>(&out)) ? new Col(X) : 0 ) , P ( (&X == reinterpret_cast*>(&out)) ? (*P_local) : X ) , n_elem (X.n_elem) { arma_extra_debug_sigprint(); } inline ~diagmat_proxy_check() { if(P_local) { delete P_local; } } arma_inline elem_type operator[] (const uword i) const { return P[i]; } arma_inline elem_type at (const uword row, const uword col) const { return (row == col) ? P[row] : elem_type(0); } static const bool P_is_vec = true; const Col* P_local; const Col& P; const uword n_elem; }; template class diagmat_proxy_check< subview_row > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; inline diagmat_proxy_check(const subview_row& X, const Mat&) : P ( X ) , n_elem ( X.n_elem ) { arma_extra_debug_sigprint(); } arma_inline elem_type operator[] (const uword i) const { return P[i]; } arma_inline elem_type at (const uword row, const uword col) const { return (row == col) ? P[row] : elem_type(0); } static const bool P_is_vec = true; const Row P; const uword n_elem; }; template class diagmat_proxy_check< subview_col > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; inline diagmat_proxy_check(const subview_col& X, const Mat& out) : P ( const_cast(X.colptr(0)), X.n_rows, (&(X.m) == &out), false ) , n_elem( X.n_elem ) { arma_extra_debug_sigprint(); } arma_inline elem_type operator[] (const uword i) const { return P[i]; } arma_inline elem_type at (const uword row, const uword col) const { return (row == col) ? P[row] : elem_type(0); } static const bool P_is_vec = true; const Col P; const uword n_elem; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/diagview_bones.hpp ================================================ // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // Copyright (C) 2008-2013 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup diagview //! @{ //! Class for storing data required to extract and set the diagonals of a matrix template class diagview : public Base > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; arma_aligned const Mat& m; static const bool is_row = false; static const bool is_col = true; const uword row_offset; const uword col_offset; const uword n_rows; // equal to n_elem const uword n_elem; static const uword n_cols = 1; protected: arma_inline diagview(const Mat& in_m, const uword in_row_offset, const uword in_col_offset, const uword len); public: inline ~diagview(); inline void operator=(const diagview& x); inline void operator+=(const eT val); inline void operator-=(const eT val); inline void operator*=(const eT val); inline void operator/=(const eT val); template inline void operator= (const Base& x); template inline void operator+=(const Base& x); template inline void operator-=(const Base& x); template inline void operator%=(const Base& x); template inline void operator/=(const Base& x); arma_inline eT at_alt (const uword ii) const; arma_inline eT& operator[](const uword ii); arma_inline eT operator[](const uword ii) const; arma_inline eT& at(const uword ii); arma_inline eT at(const uword ii) const; arma_inline eT& operator()(const uword ii); arma_inline eT operator()(const uword ii) const; arma_inline eT& at(const uword in_n_row, const uword); arma_inline eT at(const uword in_n_row, const uword) const; arma_inline eT& operator()(const uword in_n_row, const uword in_n_col); arma_inline eT operator()(const uword in_n_row, const uword in_n_col) const; arma_inline const Op,op_htrans> t() const; arma_inline const Op,op_htrans> ht() const; arma_inline const Op,op_strans> st() const; inline void fill(const eT val); inline void zeros(); inline void ones(); inline void randu(); inline void randn(); inline static void extract(Mat& out, const diagview& in); inline static void plus_inplace(Mat& out, const diagview& in); inline static void minus_inplace(Mat& out, const diagview& in); inline static void schur_inplace(Mat& out, const diagview& in); inline static void div_inplace(Mat& out, const diagview& in); private: friend class Mat; friend class subview; diagview(); //diagview(const diagview&); // making this private causes an error under gcc 4.1/4.2, but not 4.3 }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/diagview_meat.hpp ================================================ // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // Copyright (C) 2008-2013 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup diagview //! @{ template inline diagview::~diagview() { arma_extra_debug_sigprint(); } template arma_inline diagview::diagview(const Mat& in_m, const uword in_row_offset, const uword in_col_offset, const uword in_len) : m(in_m) , row_offset(in_row_offset) , col_offset(in_col_offset) , n_rows(in_len) , n_elem(in_len) { arma_extra_debug_sigprint(); } //! set a diagonal of our matrix using a diagonal from a foreign matrix template inline void diagview::operator= (const diagview& x) { arma_extra_debug_sigprint(); diagview& d = *this; arma_debug_check( (d.n_elem != x.n_elem), "diagview: diagonals have incompatible lengths"); Mat& d_m = const_cast< Mat& >(d.m); const Mat& x_m = x.m; if(&d_m != &x_m) { const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const uword x_row_offset = x.row_offset; const uword x_col_offset = x.col_offset; uword ii,jj; for(ii=0, jj=1; jj < d_n_elem; ii+=2, jj+=2) { const eT tmp_i = x_m.at(ii + x_row_offset, ii + x_col_offset); const eT tmp_j = x_m.at(jj + x_row_offset, jj + x_col_offset); d_m.at(ii + d_row_offset, ii + d_col_offset) = tmp_i; d_m.at(jj + d_row_offset, jj + d_col_offset) = tmp_j; } if(ii < d_n_elem) { d_m.at(ii + d_row_offset, ii + d_col_offset) = x_m.at(ii + x_row_offset, ii + x_col_offset); } } else { const Mat tmp = x; (*this).operator=(tmp); } } template inline void diagview::operator+=(const eT val) { arma_extra_debug_sigprint(); Mat& t_m = const_cast< Mat& >(m); const uword t_n_elem = n_elem; const uword t_row_offset = row_offset; const uword t_col_offset = col_offset; for(uword ii=0; ii < t_n_elem; ++ii) { t_m.at( ii + t_row_offset, ii + t_col_offset) += val; } } template inline void diagview::operator-=(const eT val) { arma_extra_debug_sigprint(); Mat& t_m = const_cast< Mat& >(m); const uword t_n_elem = n_elem; const uword t_row_offset = row_offset; const uword t_col_offset = col_offset; for(uword ii=0; ii < t_n_elem; ++ii) { t_m.at( ii + t_row_offset, ii + t_col_offset) -= val; } } template inline void diagview::operator*=(const eT val) { arma_extra_debug_sigprint(); Mat& t_m = const_cast< Mat& >(m); const uword t_n_elem = n_elem; const uword t_row_offset = row_offset; const uword t_col_offset = col_offset; for(uword ii=0; ii < t_n_elem; ++ii) { t_m.at( ii + t_row_offset, ii + t_col_offset) *= val; } } template inline void diagview::operator/=(const eT val) { arma_extra_debug_sigprint(); Mat& t_m = const_cast< Mat& >(m); const uword t_n_elem = n_elem; const uword t_row_offset = row_offset; const uword t_col_offset = col_offset; for(uword ii=0; ii < t_n_elem; ++ii) { t_m.at( ii + t_row_offset, ii + t_col_offset) /= val; } } //! set a diagonal of our matrix using data from a foreign object template template inline void diagview::operator= (const Base& o) { arma_extra_debug_sigprint(); diagview& d = *this; Mat& d_m = const_cast< Mat& >(d.m); const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const Proxy P( o.get_ref() ); arma_debug_check ( ( (d_n_elem != P.get_n_elem()) || ((P.get_n_rows() != 1) && (P.get_n_cols() != 1)) ), "diagview: given object has incompatible size" ); const bool is_alias = P.is_alias(d_m); arma_extra_debug_warn(is_alias, "aliasing detected"); if( (is_Mat::stored_type>::value) || (Proxy::prefer_at_accessor) || (is_alias) ) { const unwrap_check::stored_type> tmp(P.Q, is_alias); const Mat& x = tmp.M; const eT* x_mem = x.memptr(); uword ii,jj; for(ii=0, jj=1; jj < d_n_elem; ii+=2, jj+=2) { const eT tmp_i = x_mem[ii]; const eT tmp_j = x_mem[jj]; d_m.at( ii + d_row_offset, ii + d_col_offset) = tmp_i; d_m.at( jj + d_row_offset, jj + d_col_offset) = tmp_j; } if(ii < d_n_elem) { d_m.at( ii + d_row_offset, ii + d_col_offset) = x_mem[ii]; } } else { typename Proxy::ea_type Pea = P.get_ea(); uword ii,jj; for(ii=0, jj=1; jj < d_n_elem; ii+=2, jj+=2) { const eT tmp_i = Pea[ii]; const eT tmp_j = Pea[jj]; d_m.at( ii + d_row_offset, ii + d_col_offset) = tmp_i; d_m.at( jj + d_row_offset, jj + d_col_offset) = tmp_j; } if(ii < d_n_elem) { d_m.at( ii + d_row_offset, ii + d_col_offset) = Pea[ii]; } } } template template inline void diagview::operator+=(const Base& o) { arma_extra_debug_sigprint(); diagview& d = *this; Mat& d_m = const_cast< Mat& >(d.m); const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const Proxy P( o.get_ref() ); arma_debug_check ( ( (d_n_elem != P.get_n_elem()) || ((P.get_n_rows() != 1) && (P.get_n_cols() != 1)) ), "diagview: given object has incompatible size" ); const bool is_alias = P.is_alias(d_m); arma_extra_debug_warn(is_alias, "aliasing detected"); if( (is_Mat::stored_type>::value) || (Proxy::prefer_at_accessor) || (is_alias) ) { const unwrap_check::stored_type> tmp(P.Q, is_alias); const Mat& x = tmp.M; const eT* x_mem = x.memptr(); uword ii,jj; for(ii=0, jj=1; jj < d_n_elem; ii+=2, jj+=2) { const eT tmp_i = x_mem[ii]; const eT tmp_j = x_mem[jj]; d_m.at( ii + d_row_offset, ii + d_col_offset) += tmp_i; d_m.at( jj + d_row_offset, jj + d_col_offset) += tmp_j; } if(ii < d_n_elem) { d_m.at( ii + d_row_offset, ii + d_col_offset) += x_mem[ii]; } } else { typename Proxy::ea_type Pea = P.get_ea(); uword ii,jj; for(ii=0, jj=1; jj < d_n_elem; ii+=2, jj+=2) { const eT tmp_i = Pea[ii]; const eT tmp_j = Pea[jj]; d_m.at( ii + d_row_offset, ii + d_col_offset) += tmp_i; d_m.at( jj + d_row_offset, jj + d_col_offset) += tmp_j; } if(ii < d_n_elem) { d_m.at( ii + d_row_offset, ii + d_col_offset) += Pea[ii]; } } } template template inline void diagview::operator-=(const Base& o) { arma_extra_debug_sigprint(); diagview& d = *this; Mat& d_m = const_cast< Mat& >(d.m); const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const Proxy P( o.get_ref() ); arma_debug_check ( ( (d_n_elem != P.get_n_elem()) || ((P.get_n_rows() != 1) && (P.get_n_cols() != 1)) ), "diagview: given object has incompatible size" ); const bool is_alias = P.is_alias(d_m); arma_extra_debug_warn(is_alias, "aliasing detected"); if( (is_Mat::stored_type>::value) || (Proxy::prefer_at_accessor) || (is_alias) ) { const unwrap_check::stored_type> tmp(P.Q, is_alias); const Mat& x = tmp.M; const eT* x_mem = x.memptr(); uword ii,jj; for(ii=0, jj=1; jj < d_n_elem; ii+=2, jj+=2) { const eT tmp_i = x_mem[ii]; const eT tmp_j = x_mem[jj]; d_m.at( ii + d_row_offset, ii + d_col_offset) -= tmp_i; d_m.at( jj + d_row_offset, jj + d_col_offset) -= tmp_j; } if(ii < d_n_elem) { d_m.at( ii + d_row_offset, ii + d_col_offset) -= x_mem[ii]; } } else { typename Proxy::ea_type Pea = P.get_ea(); uword ii,jj; for(ii=0, jj=1; jj < d_n_elem; ii+=2, jj+=2) { const eT tmp_i = Pea[ii]; const eT tmp_j = Pea[jj]; d_m.at( ii + d_row_offset, ii + d_col_offset) -= tmp_i; d_m.at( jj + d_row_offset, jj + d_col_offset) -= tmp_j; } if(ii < d_n_elem) { d_m.at( ii + d_row_offset, ii + d_col_offset) -= Pea[ii]; } } } template template inline void diagview::operator%=(const Base& o) { arma_extra_debug_sigprint(); diagview& d = *this; Mat& d_m = const_cast< Mat& >(d.m); const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const Proxy P( o.get_ref() ); arma_debug_check ( ( (d_n_elem != P.get_n_elem()) || ((P.get_n_rows() != 1) && (P.get_n_cols() != 1)) ), "diagview: given object has incompatible size" ); const bool is_alias = P.is_alias(d_m); arma_extra_debug_warn(is_alias, "aliasing detected"); if( (is_Mat::stored_type>::value) || (Proxy::prefer_at_accessor) || (is_alias) ) { const unwrap_check::stored_type> tmp(P.Q, is_alias); const Mat& x = tmp.M; const eT* x_mem = x.memptr(); uword ii,jj; for(ii=0, jj=1; jj < d_n_elem; ii+=2, jj+=2) { const eT tmp_i = x_mem[ii]; const eT tmp_j = x_mem[jj]; d_m.at( ii + d_row_offset, ii + d_col_offset) *= tmp_i; d_m.at( jj + d_row_offset, jj + d_col_offset) *= tmp_j; } if(ii < d_n_elem) { d_m.at( ii + d_row_offset, ii + d_col_offset) *= x_mem[ii]; } } else { typename Proxy::ea_type Pea = P.get_ea(); uword ii,jj; for(ii=0, jj=1; jj < d_n_elem; ii+=2, jj+=2) { const eT tmp_i = Pea[ii]; const eT tmp_j = Pea[jj]; d_m.at( ii + d_row_offset, ii + d_col_offset) *= tmp_i; d_m.at( jj + d_row_offset, jj + d_col_offset) *= tmp_j; } if(ii < d_n_elem) { d_m.at( ii + d_row_offset, ii + d_col_offset) *= Pea[ii]; } } } template template inline void diagview::operator/=(const Base& o) { arma_extra_debug_sigprint(); diagview& d = *this; Mat& d_m = const_cast< Mat& >(d.m); const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const Proxy P( o.get_ref() ); arma_debug_check ( ( (d_n_elem != P.get_n_elem()) || ((P.get_n_rows() != 1) && (P.get_n_cols() != 1)) ), "diagview: given object has incompatible size" ); const bool is_alias = P.is_alias(d_m); arma_extra_debug_warn(is_alias, "aliasing detected"); if( (is_Mat::stored_type>::value) || (Proxy::prefer_at_accessor) || (is_alias) ) { const unwrap_check::stored_type> tmp(P.Q, is_alias); const Mat& x = tmp.M; const eT* x_mem = x.memptr(); uword ii,jj; for(ii=0, jj=1; jj < d_n_elem; ii+=2, jj+=2) { const eT tmp_i = x_mem[ii]; const eT tmp_j = x_mem[jj]; d_m.at( ii + d_row_offset, ii + d_col_offset) /= tmp_i; d_m.at( jj + d_row_offset, jj + d_col_offset) /= tmp_j; } if(ii < d_n_elem) { d_m.at( ii + d_row_offset, ii + d_col_offset) /= x_mem[ii]; } } else { typename Proxy::ea_type Pea = P.get_ea(); uword ii,jj; for(ii=0, jj=1; jj < d_n_elem; ii+=2, jj+=2) { const eT tmp_i = Pea[ii]; const eT tmp_j = Pea[jj]; d_m.at( ii + d_row_offset, ii + d_col_offset) /= tmp_i; d_m.at( jj + d_row_offset, jj + d_col_offset) /= tmp_j; } if(ii < d_n_elem) { d_m.at( ii + d_row_offset, ii + d_col_offset) /= Pea[ii]; } } } //! extract a diagonal and store it as a column vector template inline void diagview::extract(Mat& out, const diagview& in) { arma_extra_debug_sigprint(); // NOTE: we're assuming that the matrix has already been set to the correct size and there is no aliasing; // size setting and alias checking is done by either the Mat contructor or operator=() const Mat& in_m = in.m; const uword in_n_elem = in.n_elem; const uword in_row_offset = in.row_offset; const uword in_col_offset = in.col_offset; eT* out_mem = out.memptr(); uword i,j; for(i=0, j=1; j < in_n_elem; i+=2, j+=2) { const eT tmp_i = in_m.at( i + in_row_offset, i + in_col_offset ); const eT tmp_j = in_m.at( j + in_row_offset, j + in_col_offset ); out_mem[i] = tmp_i; out_mem[j] = tmp_j; } if(i < in_n_elem) { out_mem[i] = in_m.at( i + in_row_offset, i + in_col_offset ); } } //! X += Y.diag() template inline void diagview::plus_inplace(Mat& out, const diagview& in) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out.n_rows, out.n_cols, in.n_rows, in.n_cols, "addition"); const Mat& in_m = in.m; const uword in_n_elem = in.n_elem; const uword in_row_offset = in.row_offset; const uword in_col_offset = in.col_offset; eT* out_mem = out.memptr(); uword i,j; for(i=0, j=1; j < in_n_elem; i+=2, j+=2) { const eT tmp_i = in_m.at( i + in_row_offset, i + in_col_offset ); const eT tmp_j = in_m.at( j + in_row_offset, j + in_col_offset ); out_mem[i] += tmp_i; out_mem[j] += tmp_j; } if(i < in_n_elem) { out_mem[i] += in_m.at( i + in_row_offset, i + in_col_offset ); } } //! X -= Y.diag() template inline void diagview::minus_inplace(Mat& out, const diagview& in) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out.n_rows, out.n_cols, in.n_rows, in.n_cols, "subtraction"); const Mat& in_m = in.m; const uword in_n_elem = in.n_elem; const uword in_row_offset = in.row_offset; const uword in_col_offset = in.col_offset; eT* out_mem = out.memptr(); uword i,j; for(i=0, j=1; j < in_n_elem; i+=2, j+=2) { const eT tmp_i = in_m.at( i + in_row_offset, i + in_col_offset ); const eT tmp_j = in_m.at( j + in_row_offset, j + in_col_offset ); out_mem[i] -= tmp_i; out_mem[j] -= tmp_j; } if(i < in_n_elem) { out_mem[i] -= in_m.at( i + in_row_offset, i + in_col_offset ); } } //! X %= Y.diag() template inline void diagview::schur_inplace(Mat& out, const diagview& in) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out.n_rows, out.n_cols, in.n_rows, in.n_cols, "element-wise multiplication"); const Mat& in_m = in.m; const uword in_n_elem = in.n_elem; const uword in_row_offset = in.row_offset; const uword in_col_offset = in.col_offset; eT* out_mem = out.memptr(); uword i,j; for(i=0, j=1; j < in_n_elem; i+=2, j+=2) { const eT tmp_i = in_m.at( i + in_row_offset, i + in_col_offset ); const eT tmp_j = in_m.at( j + in_row_offset, j + in_col_offset ); out_mem[i] *= tmp_i; out_mem[j] *= tmp_j; } if(i < in_n_elem) { out_mem[i] *= in_m.at( i + in_row_offset, i + in_col_offset ); } } //! X /= Y.diag() template inline void diagview::div_inplace(Mat& out, const diagview& in) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out.n_rows, out.n_cols, in.n_rows, in.n_cols, "element-wise division"); const Mat& in_m = in.m; const uword in_n_elem = in.n_elem; const uword in_row_offset = in.row_offset; const uword in_col_offset = in.col_offset; eT* out_mem = out.memptr(); uword i,j; for(i=0, j=1; j < in_n_elem; i+=2, j+=2) { const eT tmp_i = in_m.at( i + in_row_offset, i + in_col_offset ); const eT tmp_j = in_m.at( j + in_row_offset, j + in_col_offset ); out_mem[i] /= tmp_i; out_mem[j] /= tmp_j; } if(i < in_n_elem) { out_mem[i] /= in_m.at( i + in_row_offset, i + in_col_offset ); } } template arma_inline eT diagview::at_alt(const uword ii) const { return m.at(ii+row_offset, ii+col_offset); } template arma_inline eT& diagview::operator[](const uword ii) { return (const_cast< Mat& >(m)).at(ii+row_offset, ii+col_offset); } template arma_inline eT diagview::operator[](const uword ii) const { return m.at(ii+row_offset, ii+col_offset); } template arma_inline eT& diagview::at(const uword ii) { return (const_cast< Mat& >(m)).at(ii+row_offset, ii+col_offset); } template arma_inline eT diagview::at(const uword ii) const { return m.at(ii+row_offset, ii+col_offset); } template arma_inline eT& diagview::operator()(const uword ii) { arma_debug_check( (ii >= n_elem), "diagview::operator(): out of bounds" ); return (const_cast< Mat& >(m)).at(ii+row_offset, ii+col_offset); } template arma_inline eT diagview::operator()(const uword ii) const { arma_debug_check( (ii >= n_elem), "diagview::operator(): out of bounds" ); return m.at(ii+row_offset, ii+col_offset); } template arma_inline eT& diagview::at(const uword row, const uword) { return (const_cast< Mat& >(m)).at(row+row_offset, row+col_offset); } template arma_inline eT diagview::at(const uword row, const uword) const { return m.at(row+row_offset, row+col_offset); } template arma_inline eT& diagview::operator()(const uword row, const uword col) { arma_debug_check( ((row >= n_elem) || (col > 0)), "diagview::operator(): out of bounds" ); return (const_cast< Mat& >(m)).at(row+row_offset, row+col_offset); } template arma_inline eT diagview::operator()(const uword row, const uword col) const { arma_debug_check( ((row >= n_elem) || (col > 0)), "diagview::operator(): out of bounds" ); return m.at(row+row_offset, row+col_offset); } template arma_inline const Op,op_htrans> diagview::t() const { return Op,op_htrans>(*this); } template arma_inline const Op,op_htrans> diagview::ht() const { return Op,op_htrans>(*this); } template arma_inline const Op,op_strans> diagview::st() const { return Op,op_strans>(*this); } template inline void diagview::fill(const eT val) { arma_extra_debug_sigprint(); Mat& x = const_cast< Mat& >(m); const uword local_n_elem = n_elem; for(uword ii=0; ii < local_n_elem; ++ii) { x.at(ii+row_offset, ii+col_offset) = val; } } template inline void diagview::zeros() { arma_extra_debug_sigprint(); (*this).fill(eT(0)); } template inline void diagview::ones() { arma_extra_debug_sigprint(); (*this).fill(eT(1)); } template inline void diagview::randu() { arma_extra_debug_sigprint(); Mat& x = const_cast< Mat& >(m); const uword local_n_elem = n_elem; for(uword ii=0; ii < local_n_elem; ++ii) { x.at(ii+row_offset, ii+col_offset) = eT(arma_rng::randu()); } } template inline void diagview::randn() { arma_extra_debug_sigprint(); Mat& x = const_cast< Mat& >(m); const uword local_n_elem = n_elem; for(uword ii=0; ii < local_n_elem; ++ii) { x.at(ii+row_offset, ii+col_offset) = eT(arma_rng::randn()); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/diskio_bones.hpp ================================================ // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2009-2010 Ian Cullinan // Copyright (C) 2012 Ryan Curtin // Copyright (C) 2013 Szabolcs Horvat // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup diskio //! @{ //! class for saving and loading matrices and fields class diskio { public: template inline static std::string gen_txt_header(const Mat& x); template inline static std::string gen_bin_header(const Mat& x); template inline static std::string gen_bin_header(const SpMat& x); template inline static std::string gen_txt_header(const Cube& x); template inline static std::string gen_bin_header(const Cube& x); inline static file_type guess_file_type(std::istream& f); inline static char conv_to_hex_char(const u8 x); inline static void conv_to_hex(char* out, const u8 x); inline static std::string gen_tmp_name(const std::string& x); inline static bool safe_rename(const std::string& old_name, const std::string& new_name); template inline static bool convert_naninf(eT& val, const std::string& token); template inline static bool convert_naninf(std::complex& val, const std::string& token); // // matrix saving template inline static bool save_raw_ascii (const Mat& x, const std::string& final_name); template inline static bool save_raw_binary (const Mat& x, const std::string& final_name); template inline static bool save_arma_ascii (const Mat& x, const std::string& final_name); template inline static bool save_csv_ascii (const Mat& x, const std::string& final_name); template inline static bool save_arma_binary(const Mat& x, const std::string& final_name); template inline static bool save_pgm_binary (const Mat& x, const std::string& final_name); template inline static bool save_pgm_binary (const Mat< std::complex >& x, const std::string& final_name); template inline static bool save_hdf5_binary(const Mat& x, const std::string& final_name); template inline static bool save_raw_ascii (const Mat& x, std::ostream& f); template inline static bool save_raw_binary (const Mat& x, std::ostream& f); template inline static bool save_arma_ascii (const Mat& x, std::ostream& f); template inline static bool save_csv_ascii (const Mat& x, std::ostream& f); template inline static bool save_arma_binary(const Mat& x, std::ostream& f); template inline static bool save_pgm_binary (const Mat& x, std::ostream& f); template inline static bool save_pgm_binary (const Mat< std::complex >& x, std::ostream& f); // // matrix loading template inline static bool load_raw_ascii (Mat& x, const std::string& name, std::string& err_msg); template inline static bool load_raw_binary (Mat& x, const std::string& name, std::string& err_msg); template inline static bool load_arma_ascii (Mat& x, const std::string& name, std::string& err_msg); template inline static bool load_csv_ascii (Mat& x, const std::string& name, std::string& err_msg); template inline static bool load_arma_binary(Mat& x, const std::string& name, std::string& err_msg); template inline static bool load_pgm_binary (Mat& x, const std::string& name, std::string& err_msg); template inline static bool load_pgm_binary (Mat< std::complex >& x, const std::string& name, std::string& err_msg); template inline static bool load_hdf5_binary(Mat& x, const std::string& name, std::string& err_msg); template inline static bool load_auto_detect(Mat& x, const std::string& name, std::string& err_msg); template inline static bool load_raw_ascii (Mat& x, std::istream& f, std::string& err_msg); template inline static bool load_raw_binary (Mat& x, std::istream& f, std::string& err_msg); template inline static bool load_arma_ascii (Mat& x, std::istream& f, std::string& err_msg); template inline static bool load_csv_ascii (Mat& x, std::istream& f, std::string& err_msg); template inline static bool load_arma_binary(Mat& x, std::istream& f, std::string& err_msg); template inline static bool load_pgm_binary (Mat& x, std::istream& is, std::string& err_msg); template inline static bool load_pgm_binary (Mat< std::complex >& x, std::istream& is, std::string& err_msg); template inline static bool load_auto_detect(Mat& x, std::istream& f, std::string& err_msg); inline static void pnm_skip_comments(std::istream& f); // // sparse matrix saving template inline static bool save_coord_ascii(const SpMat& x, const std::string& final_name); template inline static bool save_arma_binary(const SpMat& x, const std::string& final_name); template inline static bool save_coord_ascii(const SpMat& x, std::ostream& f); template inline static bool save_coord_ascii(const SpMat< std::complex >& x, std::ostream& f); template inline static bool save_arma_binary(const SpMat& x, std::ostream& f); // // sparse matrix loading template inline static bool load_coord_ascii(SpMat& x, const std::string& name, std::string& err_msg); template inline static bool load_arma_binary(SpMat& x, const std::string& name, std::string& err_msg); template inline static bool load_coord_ascii(SpMat& x, std::istream& f, std::string& err_msg); template inline static bool load_coord_ascii(SpMat< std::complex >& x, std::istream& f, std::string& err_msg); template inline static bool load_arma_binary(SpMat& x, std::istream& f, std::string& err_msg); // // cube saving template inline static bool save_raw_ascii (const Cube& x, const std::string& name); template inline static bool save_raw_binary (const Cube& x, const std::string& name); template inline static bool save_arma_ascii (const Cube& x, const std::string& name); template inline static bool save_arma_binary(const Cube& x, const std::string& name); template inline static bool save_hdf5_binary(const Cube& x, const std::string& name); template inline static bool save_raw_ascii (const Cube& x, std::ostream& f); template inline static bool save_raw_binary (const Cube& x, std::ostream& f); template inline static bool save_arma_ascii (const Cube& x, std::ostream& f); template inline static bool save_arma_binary(const Cube& x, std::ostream& f); // // cube loading template inline static bool load_raw_ascii (Cube& x, const std::string& name, std::string& err_msg); template inline static bool load_raw_binary (Cube& x, const std::string& name, std::string& err_msg); template inline static bool load_arma_ascii (Cube& x, const std::string& name, std::string& err_msg); template inline static bool load_arma_binary(Cube& x, const std::string& name, std::string& err_msg); template inline static bool load_hdf5_binary(Cube& x, const std::string& name, std::string& err_msg); template inline static bool load_auto_detect(Cube& x, const std::string& name, std::string& err_msg); template inline static bool load_raw_ascii (Cube& x, std::istream& f, std::string& err_msg); template inline static bool load_raw_binary (Cube& x, std::istream& f, std::string& err_msg); template inline static bool load_arma_ascii (Cube& x, std::istream& f, std::string& err_msg); template inline static bool load_arma_binary(Cube& x, std::istream& f, std::string& err_msg); template inline static bool load_auto_detect(Cube& x, std::istream& f, std::string& err_msg); // // field saving and loading template inline static bool save_arma_binary(const field& x, const std::string& name); template inline static bool save_arma_binary(const field& x, std::ostream& f); template inline static bool load_arma_binary( field& x, const std::string& name, std::string& err_msg); template inline static bool load_arma_binary( field& x, std::istream& f, std::string& err_msg); template inline static bool load_auto_detect( field& x, const std::string& name, std::string& err_msg); template inline static bool load_auto_detect( field& x, std::istream& f, std::string& err_msg); inline static bool save_std_string(const field& x, const std::string& name); inline static bool save_std_string(const field& x, std::ostream& f); inline static bool load_std_string( field& x, const std::string& name, std::string& err_msg); inline static bool load_std_string( field& x, std::istream& f, std::string& err_msg); // // handling of PPM images by cubes template inline static bool save_ppm_binary(const Cube& x, const std::string& final_name); template inline static bool save_ppm_binary(const Cube& x, std::ostream& f); template inline static bool load_ppm_binary( Cube& x, const std::string& final_name, std::string& err_msg); template inline static bool load_ppm_binary( Cube& x, std::istream& f, std::string& err_msg); // // handling of PPM images by fields template inline static bool save_ppm_binary(const field& x, const std::string& final_name); template inline static bool save_ppm_binary(const field& x, std::ostream& f); template inline static bool load_ppm_binary( field& x, const std::string& final_name, std::string& err_msg); template inline static bool load_ppm_binary( field& x, std::istream& f, std::string& err_msg); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/diskio_meat.hpp ================================================ // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2009-2010 Ian Cullinan // Copyright (C) 2012 Ryan Curtin // Copyright (C) 2013 Szabolcs Horvat // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup diskio //! @{ //! Generate the first line of the header used for saving matrices in text format. //! Format: "ARMA_MAT_TXT_ABXYZ". //! A is one of: I (for integral types) or F (for floating point types). //! B is one of: U (for unsigned types), S (for signed types), N (for not applicable) or C (for complex types). //! XYZ specifies the width of each element in terms of bytes, e.g. "008" indicates eight bytes. template inline std::string diskio::gen_txt_header(const Mat& x) { arma_type_check(( is_supported_elem_type::value == false )); arma_ignore(x); if(is_u8::value) { return std::string("ARMA_MAT_TXT_IU001"); } else if(is_s8::value) { return std::string("ARMA_MAT_TXT_IS001"); } else if(is_u16::value) { return std::string("ARMA_MAT_TXT_IU002"); } else if(is_s16::value) { return std::string("ARMA_MAT_TXT_IS002"); } else if(is_u32::value) { return std::string("ARMA_MAT_TXT_IU004"); } else if(is_s32::value) { return std::string("ARMA_MAT_TXT_IS004"); } #if defined(ARMA_USE_U64S64) else if(is_u64::value) { return std::string("ARMA_MAT_TXT_IU008"); } else if(is_s64::value) { return std::string("ARMA_MAT_TXT_IS008"); } #endif #if defined(ARMA_ALLOW_LONG) else if(is_ulng_t_32::value) { return std::string("ARMA_MAT_TXT_IU004"); } else if(is_slng_t_32::value) { return std::string("ARMA_MAT_TXT_IS004"); } else if(is_ulng_t_64::value) { return std::string("ARMA_MAT_TXT_IU008"); } else if(is_slng_t_64::value) { return std::string("ARMA_MAT_TXT_IS008"); } #endif else if(is_float::value) { return std::string("ARMA_MAT_TXT_FN004"); } else if(is_double::value) { return std::string("ARMA_MAT_TXT_FN008"); } else if(is_complex_float::value) { return std::string("ARMA_MAT_TXT_FC008"); } else if(is_complex_double::value) { return std::string("ARMA_MAT_TXT_FC016"); } else { return std::string(); } } //! Generate the first line of the header used for saving matrices in binary format. //! Format: "ARMA_MAT_BIN_ABXYZ". //! A is one of: I (for integral types) or F (for floating point types). //! B is one of: U (for unsigned types), S (for signed types), N (for not applicable) or C (for complex types). //! XYZ specifies the width of each element in terms of bytes, e.g. "008" indicates eight bytes. template inline std::string diskio::gen_bin_header(const Mat& x) { arma_type_check(( is_supported_elem_type::value == false )); arma_ignore(x); if(is_u8::value) { return std::string("ARMA_MAT_BIN_IU001"); } else if(is_s8::value) { return std::string("ARMA_MAT_BIN_IS001"); } else if(is_u16::value) { return std::string("ARMA_MAT_BIN_IU002"); } else if(is_s16::value) { return std::string("ARMA_MAT_BIN_IS002"); } else if(is_u32::value) { return std::string("ARMA_MAT_BIN_IU004"); } else if(is_s32::value) { return std::string("ARMA_MAT_BIN_IS004"); } #if defined(ARMA_USE_U64S64) else if(is_u64::value) { return std::string("ARMA_MAT_BIN_IU008"); } else if(is_s64::value) { return std::string("ARMA_MAT_BIN_IS008"); } #endif #if defined(ARMA_ALLOW_LONG) else if(is_ulng_t_32::value) { return std::string("ARMA_MAT_BIN_IU004"); } else if(is_slng_t_32::value) { return std::string("ARMA_MAT_BIN_IS004"); } else if(is_ulng_t_64::value) { return std::string("ARMA_MAT_BIN_IU008"); } else if(is_slng_t_64::value) { return std::string("ARMA_MAT_BIN_IS008"); } #endif else if(is_float::value) { return std::string("ARMA_MAT_BIN_FN004"); } else if(is_double::value) { return std::string("ARMA_MAT_BIN_FN008"); } else if(is_complex_float::value) { return std::string("ARMA_MAT_BIN_FC008"); } else if(is_complex_double::value) { return std::string("ARMA_MAT_BIN_FC016"); } else { return std::string(); } } //! Generate the first line of the header used for saving matrices in binary format. //! Format: "ARMA_SPM_BIN_ABXYZ". //! A is one of: I (for integral types) or F (for floating point types). //! B is one of: U (for unsigned types), S (for signed types), N (for not applicable) or C (for complex types). //! XYZ specifies the width of each element in terms of bytes, e.g. "008" indicates eight bytes. template inline std::string diskio::gen_bin_header(const SpMat& x) { arma_type_check(( is_supported_elem_type::value == false )); arma_ignore(x); if(is_u8::value) { return std::string("ARMA_SPM_BIN_IU001"); } else if(is_s8::value) { return std::string("ARMA_SPM_BIN_IS001"); } else if(is_u16::value) { return std::string("ARMA_SPM_BIN_IU002"); } else if(is_s16::value) { return std::string("ARMA_SPM_BIN_IS002"); } else if(is_u32::value) { return std::string("ARMA_SPM_BIN_IU004"); } else if(is_s32::value) { return std::string("ARMA_SPM_BIN_IS004"); } #if defined(ARMA_USE_U64S64) else if(is_u64::value) { return std::string("ARMA_SPM_BIN_IU008"); } else if(is_s64::value) { return std::string("ARMA_SPM_BIN_IS008"); } #endif #if defined(ARMA_ALLOW_LONG) else if(is_ulng_t_32::value) { return std::string("ARMA_SPM_BIN_IU004"); } else if(is_slng_t_32::value) { return std::string("ARMA_SPM_BIN_IS004"); } else if(is_ulng_t_64::value) { return std::string("ARMA_SPM_BIN_IU008"); } else if(is_slng_t_64::value) { return std::string("ARMA_SPM_BIN_IS008"); } #endif else if(is_float::value) { return std::string("ARMA_SPM_BIN_FN004"); } else if(is_double::value) { return std::string("ARMA_SPM_BIN_FN008"); } else if(is_complex_float::value) { return std::string("ARMA_SPM_BIN_FC008"); } else if(is_complex_double::value) { return std::string("ARMA_SPM_BIN_FC016"); } else { return std::string(); } } //! Generate the first line of the header used for saving cubes in text format. //! Format: "ARMA_CUB_TXT_ABXYZ". //! A is one of: I (for integral types) or F (for floating point types). //! B is one of: U (for unsigned types), S (for signed types), N (for not applicable) or C (for complex types). //! XYZ specifies the width of each element in terms of bytes, e.g. "008" indicates eight bytes. template inline std::string diskio::gen_txt_header(const Cube& x) { arma_type_check(( is_supported_elem_type::value == false )); arma_ignore(x); if(is_u8::value) { return std::string("ARMA_CUB_TXT_IU001"); } else if(is_s8::value) { return std::string("ARMA_CUB_TXT_IS001"); } else if(is_u16::value) { return std::string("ARMA_CUB_TXT_IU002"); } else if(is_s16::value) { return std::string("ARMA_CUB_TXT_IS002"); } else if(is_u32::value) { return std::string("ARMA_CUB_TXT_IU004"); } else if(is_s32::value) { return std::string("ARMA_CUB_TXT_IS004"); } #if defined(ARMA_USE_U64S64) else if(is_u64::value) { return std::string("ARMA_CUB_TXT_IU008"); } else if(is_s64::value) { return std::string("ARMA_CUB_TXT_IS008"); } #endif #if defined(ARMA_ALLOW_LONG) else if(is_ulng_t_32::value) { return std::string("ARMA_CUB_TXT_IU004"); } else if(is_slng_t_32::value) { return std::string("ARMA_CUB_TXT_IS004"); } else if(is_ulng_t_64::value) { return std::string("ARMA_CUB_TXT_IU008"); } else if(is_slng_t_64::value) { return std::string("ARMA_CUB_TXT_IS008"); } #endif else if(is_float::value) { return std::string("ARMA_CUB_TXT_FN004"); } else if(is_double::value) { return std::string("ARMA_CUB_TXT_FN008"); } else if(is_complex_float::value) { return std::string("ARMA_CUB_TXT_FC008"); } else if(is_complex_double::value) { return std::string("ARMA_CUB_TXT_FC016"); } else { return std::string(); } } //! Generate the first line of the header used for saving cubes in binary format. //! Format: "ARMA_CUB_BIN_ABXYZ". //! A is one of: I (for integral types) or F (for floating point types). //! B is one of: U (for unsigned types), S (for signed types), N (for not applicable) or C (for complex types). //! XYZ specifies the width of each element in terms of bytes, e.g. "008" indicates eight bytes. template inline std::string diskio::gen_bin_header(const Cube& x) { arma_type_check(( is_supported_elem_type::value == false )); arma_ignore(x); if(is_u8::value) { return std::string("ARMA_CUB_BIN_IU001"); } else if(is_s8::value) { return std::string("ARMA_CUB_BIN_IS001"); } else if(is_u16::value) { return std::string("ARMA_CUB_BIN_IU002"); } else if(is_s16::value) { return std::string("ARMA_CUB_BIN_IS002"); } else if(is_u32::value) { return std::string("ARMA_CUB_BIN_IU004"); } else if(is_s32::value) { return std::string("ARMA_CUB_BIN_IS004"); } #if defined(ARMA_USE_U64S64) else if(is_u64::value) { return std::string("ARMA_CUB_BIN_IU008"); } else if(is_s64::value) { return std::string("ARMA_CUB_BIN_IS008"); } #endif #if defined(ARMA_ALLOW_LONG) else if(is_ulng_t_32::value) { return std::string("ARMA_CUB_BIN_IU004"); } else if(is_slng_t_32::value) { return std::string("ARMA_CUB_BIN_IS004"); } else if(is_ulng_t_64::value) { return std::string("ARMA_CUB_BIN_IU008"); } else if(is_slng_t_64::value) { return std::string("ARMA_CUB_BIN_IS008"); } #endif else if(is_float::value) { return std::string("ARMA_CUB_BIN_FN004"); } else if(is_double::value) { return std::string("ARMA_CUB_BIN_FN008"); } else if(is_complex_float::value) { return std::string("ARMA_CUB_BIN_FC008"); } else if(is_complex_double::value) { return std::string("ARMA_CUB_BIN_FC016"); } else { return std::string(); } } inline file_type diskio::guess_file_type(std::istream& f) { arma_extra_debug_sigprint(); f.clear(); const std::fstream::pos_type pos1 = f.tellg(); f.clear(); f.seekg(0, ios::end); f.clear(); const std::fstream::pos_type pos2 = f.tellg(); const uword N = ( (pos1 >= 0) && (pos2 >= 0) ) ? uword(pos2 - pos1) : 0; f.clear(); f.seekg(pos1); podarray data(N); unsigned char* ptr = data.memptr(); f.clear(); f.read( reinterpret_cast(ptr), std::streamsize(N) ); const bool load_okay = f.good(); f.clear(); f.seekg(pos1); bool has_binary = false; bool has_comma = false; bool has_bracket = false; if(load_okay == true) { uword i = 0; uword j = (N >= 2) ? 1 : 0; for(; j= 123)) || ((val_j <= 8) || (val_j >= 123)) ) { has_binary = true; break; } if( (val_i == ',') || (val_j == ',') ) { has_comma = true; } if( (val_i == '(') || (val_j == '(') || (val_i == ')') || (val_j == ')') ) { has_bracket = true; } } } else { return file_type_unknown; } if(has_binary) { return raw_binary; } if(has_comma && (has_bracket == false)) { return csv_ascii; } return raw_ascii; } inline char diskio::conv_to_hex_char(const u8 x) { char out; switch(x) { case 0: out = '0'; break; case 1: out = '1'; break; case 2: out = '2'; break; case 3: out = '3'; break; case 4: out = '4'; break; case 5: out = '5'; break; case 6: out = '6'; break; case 7: out = '7'; break; case 8: out = '8'; break; case 9: out = '9'; break; case 10: out = 'a'; break; case 11: out = 'b'; break; case 12: out = 'c'; break; case 13: out = 'd'; break; case 14: out = 'e'; break; case 15: out = 'f'; break; default: out = '-'; break; } return out; } inline void diskio::conv_to_hex(char* out, const u8 x) { const u8 a = x / 16; const u8 b = x - 16*a; out[0] = conv_to_hex_char(a); out[1] = conv_to_hex_char(b); } //! Append a quasi-random string to the given filename. //! The rand() function is deliberately not used, //! as rand() has an internal state that changes //! from call to call. Such states should not be //! modified in scientific applications, where the //! results should be reproducable and not affected //! by saving data. inline std::string diskio::gen_tmp_name(const std::string& x) { const std::string* ptr_x = &x; const u8* ptr_ptr_x = reinterpret_cast(&ptr_x); const char* extra = ".tmp_"; const uword extra_size = 5; const uword tmp_size = 2*sizeof(u8*) + 2*2; char tmp[tmp_size]; uword char_count = 0; for(uword i=0; i(x.size()); u8 sum = 0; for(uword i=0; i inline bool diskio::convert_naninf(eT& val, const std::string& token) { // see if the token represents a NaN or Inf if( (token.length() == 3) || (token.length() == 4) ) { const bool neg = (token[0] == '-'); const bool pos = (token[0] == '+'); const size_t offset = ( (neg || pos) && (token.length() == 4) ) ? 1 : 0; const std::string token2 = token.substr(offset, 3); if( (token2 == "inf") || (token2 == "Inf") || (token2 == "INF") ) { val = neg ? cond_rel< is_signed::value >::make_neg(Datum::inf) : Datum::inf; return true; } else if( (token2 == "nan") || (token2 == "Nan") || (token2 == "NaN") || (token2 == "NAN") ) { val = Datum::nan; return true; } } return false; } template inline bool diskio::convert_naninf(std::complex& val, const std::string& token) { if( token.length() >= 5 ) { std::stringstream ss( token.substr(1, token.length()-2) ); // strip '(' at the start and ')' at the end std::string token_real; std::string token_imag; std::getline(ss, token_real, ','); std::getline(ss, token_imag); std::stringstream ss_real(token_real); std::stringstream ss_imag(token_imag); T val_real = T(0); T val_imag = T(0); ss_real >> val_real; ss_imag >> val_imag; bool success_real = true; bool success_imag = true; if(ss_real.fail() == true) { success_real = diskio::convert_naninf( val_real, token_real ); } if(ss_imag.fail() == true) { success_imag = diskio::convert_naninf( val_imag, token_imag ); } val = std::complex(val_real, val_imag); return (success_real && success_imag); } return false; } //! Save a matrix as raw text (no header, human readable). //! Matrices can be loaded in Matlab and Octave, as long as they don't have complex elements. template inline bool diskio::save_raw_ascii(const Mat& x, const std::string& final_name) { arma_extra_debug_sigprint(); const std::string tmp_name = diskio::gen_tmp_name(final_name); std::fstream f(tmp_name.c_str(), std::fstream::out); bool save_okay = f.is_open(); if(save_okay == true) { save_okay = diskio::save_raw_ascii(x, f); f.flush(); f.close(); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } } return save_okay; } //! Save a matrix as raw text (no header, human readable). //! Matrices can be loaded in Matlab and Octave, as long as they don't have complex elements. template inline bool diskio::save_raw_ascii(const Mat& x, std::ostream& f) { arma_extra_debug_sigprint(); uword cell_width; // TODO: need sane values for complex numbers if( (is_float::value) || (is_double::value) ) { f.setf(ios::scientific); f.precision(12); cell_width = 20; } for(uword row=0; row < x.n_rows; ++row) { for(uword col=0; col < x.n_cols; ++col) { f.put(' '); if( (is_float::value) || (is_double::value) ) { f.width(cell_width); } arma_ostream::print_elem(f, x.at(row,col), false); } f.put('\n'); } return f.good(); } //! Save a matrix as raw binary (no header) template inline bool diskio::save_raw_binary(const Mat& x, const std::string& final_name) { arma_extra_debug_sigprint(); const std::string tmp_name = diskio::gen_tmp_name(final_name); std::ofstream f(tmp_name.c_str(), std::fstream::binary); bool save_okay = f.is_open(); if(save_okay == true) { save_okay = diskio::save_raw_binary(x, f); f.flush(); f.close(); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } } return save_okay; } template inline bool diskio::save_raw_binary(const Mat& x, std::ostream& f) { arma_extra_debug_sigprint(); f.write( reinterpret_cast(x.mem), std::streamsize(x.n_elem*sizeof(eT)) ); return f.good(); } //! Save a matrix in text format (human readable), //! with a header that indicates the matrix type as well as its dimensions template inline bool diskio::save_arma_ascii(const Mat& x, const std::string& final_name) { arma_extra_debug_sigprint(); const std::string tmp_name = diskio::gen_tmp_name(final_name); std::ofstream f(tmp_name.c_str()); bool save_okay = f.is_open(); if(save_okay == true) { save_okay = diskio::save_arma_ascii(x, f); f.flush(); f.close(); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } } return save_okay; } //! Save a matrix in text format (human readable), //! with a header that indicates the matrix type as well as its dimensions template inline bool diskio::save_arma_ascii(const Mat& x, std::ostream& f) { arma_extra_debug_sigprint(); const ios::fmtflags orig_flags = f.flags(); f << diskio::gen_txt_header(x) << '\n'; f << x.n_rows << ' ' << x.n_cols << '\n'; uword cell_width; // TODO: need sane values for complex numbers if( (is_float::value) || (is_double::value) ) { f.setf(ios::scientific); f.precision(12); cell_width = 20; } for(uword row=0; row < x.n_rows; ++row) { for(uword col=0; col < x.n_cols; ++col) { f.put(' '); if( (is_float::value) || (is_double::value) ) { f.width(cell_width); } arma_ostream::print_elem(f, x.at(row,col), false); } f.put('\n'); } const bool save_okay = f.good(); f.flags(orig_flags); return save_okay; } //! Save a matrix in CSV text format (human readable) template inline bool diskio::save_csv_ascii(const Mat& x, const std::string& final_name) { arma_extra_debug_sigprint(); const std::string tmp_name = diskio::gen_tmp_name(final_name); std::ofstream f(tmp_name.c_str()); bool save_okay = f.is_open(); if(save_okay == true) { save_okay = diskio::save_csv_ascii(x, f); f.flush(); f.close(); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } } return save_okay; } //! Save a matrix in CSV text format (human readable) template inline bool diskio::save_csv_ascii(const Mat& x, std::ostream& f) { arma_extra_debug_sigprint(); const ios::fmtflags orig_flags = f.flags(); // TODO: need sane values for complex numbers if( (is_float::value) || (is_double::value) ) { f.setf(ios::scientific); f.precision(12); } uword x_n_rows = x.n_rows; uword x_n_cols = x.n_cols; for(uword row=0; row < x_n_rows; ++row) { for(uword col=0; col < x_n_cols; ++col) { arma_ostream::print_elem(f, x.at(row,col), false); if( col < (x_n_cols-1) ) { f.put(','); } } f.put('\n'); } const bool save_okay = f.good(); f.flags(orig_flags); return save_okay; } //! Save a matrix in binary format, //! with a header that stores the matrix type as well as its dimensions template inline bool diskio::save_arma_binary(const Mat& x, const std::string& final_name) { arma_extra_debug_sigprint(); const std::string tmp_name = diskio::gen_tmp_name(final_name); std::ofstream f(tmp_name.c_str(), std::fstream::binary); bool save_okay = f.is_open(); if(save_okay == true) { save_okay = diskio::save_arma_binary(x, f); f.flush(); f.close(); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } } return save_okay; } //! Save a matrix in binary format, //! with a header that stores the matrix type as well as its dimensions template inline bool diskio::save_arma_binary(const Mat& x, std::ostream& f) { arma_extra_debug_sigprint(); f << diskio::gen_bin_header(x) << '\n'; f << x.n_rows << ' ' << x.n_cols << '\n'; f.write( reinterpret_cast(x.mem), std::streamsize(x.n_elem*sizeof(eT)) ); return f.good(); } //! Save a matrix as a PGM greyscale image template inline bool diskio::save_pgm_binary(const Mat& x, const std::string& final_name) { arma_extra_debug_sigprint(); const std::string tmp_name = diskio::gen_tmp_name(final_name); std::fstream f(tmp_name.c_str(), std::fstream::out | std::fstream::binary); bool save_okay = f.is_open(); if(save_okay == true) { save_okay = diskio::save_pgm_binary(x, f); f.flush(); f.close(); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } } return save_okay; } // // TODO: // add functionality to save the image in a normalised format, // i.e. scaled so that every value falls in the [0,255] range. //! Save a matrix as a PGM greyscale image template inline bool diskio::save_pgm_binary(const Mat& x, std::ostream& f) { arma_extra_debug_sigprint(); f << "P5" << '\n'; f << x.n_cols << ' ' << x.n_rows << '\n'; f << 255 << '\n'; const uword n_elem = x.n_rows * x.n_cols; podarray tmp(n_elem); uword i = 0; for(uword row=0; row < x.n_rows; ++row) { for(uword col=0; col < x.n_cols; ++col) { tmp[i] = u8( x.at(row,col) ); // TODO: add round() ? ++i; } } f.write(reinterpret_cast(tmp.mem), std::streamsize(n_elem) ); return f.good(); } //! Save a matrix as a PGM greyscale image template inline bool diskio::save_pgm_binary(const Mat< std::complex >& x, const std::string& final_name) { arma_extra_debug_sigprint(); const uchar_mat tmp = conv_to::from(x); return diskio::save_pgm_binary(tmp, final_name); } //! Save a matrix as a PGM greyscale image template inline bool diskio::save_pgm_binary(const Mat< std::complex >& x, std::ostream& f) { arma_extra_debug_sigprint(); const uchar_mat tmp = conv_to::from(x); return diskio::save_pgm_binary(tmp, f); } //! Save a matrix as part of a HDF5 file template inline bool diskio::save_hdf5_binary(const Mat& x, const std::string& final_name) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_HDF5) { #if !defined(ARMA_PRINT_HDF5_ERRORS) { // Disable annoying HDF5 error messages. arma_H5Eset_auto(H5E_DEFAULT, NULL, NULL); } #endif bool save_okay = false; const std::string tmp_name = diskio::gen_tmp_name(final_name); // Set up the file according to HDF5's preferences hid_t file = arma_H5Fcreate(tmp_name.c_str(), H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); // We need to create a dataset, datatype, and dataspace hsize_t dims[2]; dims[1] = x.n_rows; dims[0] = x.n_cols; hid_t dataspace = arma_H5Screate_simple(2, dims, NULL); // treat the matrix as a 2d array dataspace hid_t datatype = hdf5_misc::get_hdf5_type(); // If this returned something invalid, well, it's time to crash. arma_check(datatype == -1, "Mat::save(): unknown datatype for HDF5"); // MATLAB forces the users to specify a name at save time for HDF5; Octave // will use the default of 'dataset' unless otherwise specified, so we will // use that. hid_t dataset = arma_H5Dcreate(file, "dataset", datatype, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); // H5Dwrite does not make a distinction between row-major and column-major; // it just writes the memory. MATLAB and Octave store HDF5 matrices as // column-major, though, so we can save ours like that too and not need to // transpose. herr_t status = arma_H5Dwrite(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, x.mem); save_okay = (status >= 0); arma_H5Dclose(dataset); arma_H5Tclose(datatype); arma_H5Sclose(dataspace); arma_H5Fclose(file); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } return save_okay; } #else { arma_ignore(x); arma_ignore(final_name); arma_stop("Mat::save(): use of HDF5 needs to be enabled"); return false; } #endif } //! Load a matrix as raw text (no header, human readable). //! Can read matrices saved as text in Matlab and Octave. //! NOTE: this is much slower than reading a file with a header. template inline bool diskio::load_raw_ascii(Mat& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); std::fstream f; f.open(name.c_str(), std::fstream::in); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_raw_ascii(x, f, err_msg); f.close(); } return load_okay; } //! Load a matrix as raw text (no header, human readable). //! Can read matrices saved as text in Matlab and Octave. //! NOTE: this is much slower than reading a file with a header. template inline bool diskio::load_raw_ascii(Mat& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); bool load_okay = f.good(); f.clear(); const std::fstream::pos_type pos1 = f.tellg(); // // work out the size uword f_n_rows = 0; uword f_n_cols = 0; bool f_n_cols_found = false; std::string line_string; std::string token; std::stringstream line_stream; while( (f.good() == true) && (load_okay == true) ) { std::getline(f, line_string); if(line_string.size() == 0) { break; } line_stream.clear(); line_stream.str(line_string); uword line_n_cols = 0; while (line_stream >> token) { ++line_n_cols; } if(f_n_cols_found == false) { f_n_cols = line_n_cols; f_n_cols_found = true; } else { if(line_n_cols != f_n_cols) { err_msg = "inconsistent number of columns in "; load_okay = false; } } ++f_n_rows; } if(load_okay == true) { f.clear(); f.seekg(pos1); x.set_size(f_n_rows, f_n_cols); std::stringstream ss; for(uword row=0; (row < x.n_rows) && (load_okay == true); ++row) { for(uword col=0; (col < x.n_cols) && (load_okay == true); ++col) { f >> token; if( (is_signed::value == false) && (token.length() > 0) && (token[0] == '-') ) { x.at(row,col) = eT(0); } else { ss.clear(); ss.str(token); eT val = eT(0); ss >> val; if(ss.fail() == false) { x.at(row,col) = val; } else { const bool success = diskio::convert_naninf( x.at(row,col), token ); if(success == false) { load_okay = false; err_msg = "couldn't interpret data in "; } } } } } } // an empty file indicates an empty matrix if( (f_n_cols_found == false) && (load_okay == true) ) { x.reset(); } return load_okay; } //! Load a matrix in binary format (no header); //! the matrix is assumed to have one column template inline bool diskio::load_raw_binary(Mat& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); std::ifstream f; f.open(name.c_str(), std::fstream::binary); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_raw_binary(x, f, err_msg); f.close(); } return load_okay; } template inline bool diskio::load_raw_binary(Mat& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); arma_ignore(err_msg); f.clear(); const std::streampos pos1 = f.tellg(); f.clear(); f.seekg(0, ios::end); f.clear(); const std::streampos pos2 = f.tellg(); const uword N = ( (pos1 >= 0) && (pos2 >= 0) ) ? uword(pos2 - pos1) : 0; f.clear(); //f.seekg(0, ios::beg); f.seekg(pos1); x.set_size(N / sizeof(eT), 1); f.clear(); f.read( reinterpret_cast(x.memptr()), std::streamsize(N) ); return f.good(); } //! Load a matrix in text format (human readable), //! with a header that indicates the matrix type as well as its dimensions template inline bool diskio::load_arma_ascii(Mat& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); std::ifstream f(name.c_str()); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_arma_ascii(x, f, err_msg); f.close(); } return load_okay; } //! Load a matrix in text format (human readable), //! with a header that indicates the matrix type as well as its dimensions template inline bool diskio::load_arma_ascii(Mat& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); std::streampos pos = f.tellg(); bool load_okay = true; std::string f_header; uword f_n_rows; uword f_n_cols; f >> f_header; f >> f_n_rows; f >> f_n_cols; if(f_header == diskio::gen_txt_header(x)) { x.zeros(f_n_rows, f_n_cols); std::string token; std::stringstream ss; for(uword row=0; row < x.n_rows; ++row) { for(uword col=0; col < x.n_cols; ++col) { f >> token; ss.clear(); ss.str(token); eT val = eT(0); ss >> val; if(ss.fail() == false) { x.at(row,col) = val; } else { diskio::convert_naninf( x.at(row,col), token ); } } } load_okay = f.good(); } else { load_okay = false; err_msg = "incorrect header in "; } // allow automatic conversion of u32/s32 matrices into u64/s64 matrices if(load_okay == false) { if( (sizeof(eT) == 8) && is_same_type::yes ) { Mat tmp; std::string junk; f.clear(); f.seekg(pos); load_okay = diskio::load_arma_ascii(tmp, f, junk); if(load_okay) { x = conv_to< Mat >::from(tmp); } } else if( (sizeof(eT) == 8) && is_same_type::yes ) { Mat tmp; std::string junk; f.clear(); f.seekg(pos); load_okay = diskio::load_arma_ascii(tmp, f, junk); if(load_okay) { x = conv_to< Mat >::from(tmp); } } } return load_okay; } //! Load a matrix in CSV text format (human readable) template inline bool diskio::load_csv_ascii(Mat& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); std::fstream f; f.open(name.c_str(), std::fstream::in); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_csv_ascii(x, f, err_msg); f.close(); } return load_okay; } //! Load a matrix in CSV text format (human readable) template inline bool diskio::load_csv_ascii(Mat& x, std::istream& f, std::string&) { arma_extra_debug_sigprint(); bool load_okay = f.good(); f.clear(); const std::fstream::pos_type pos1 = f.tellg(); // // work out the size uword f_n_rows = 0; uword f_n_cols = 0; std::string line_string; std::string token; std::stringstream line_stream; while( (f.good() == true) && (load_okay == true) ) { std::getline(f, line_string); if(line_string.size() == 0) { break; } line_stream.clear(); line_stream.str(line_string); uword line_n_cols = 0; while(line_stream.good() == true) { std::getline(line_stream, token, ','); ++line_n_cols; } if(f_n_cols < line_n_cols) { f_n_cols = line_n_cols; } ++f_n_rows; } f.clear(); f.seekg(pos1); x.zeros(f_n_rows, f_n_cols); uword row = 0; std::stringstream ss; while(f.good() == true) { std::getline(f, line_string); if(line_string.size() == 0) { break; } line_stream.clear(); line_stream.str(line_string); uword col = 0; while(line_stream.good() == true) { std::getline(line_stream, token, ','); if( (is_signed::value == false) && (token.length() > 0) && (token[0] == '-') ) { x.at(row,col) = eT(0); } else { ss.clear(); ss.str(token); eT val = eT(0); ss >> val; if(ss.fail() == false) { x.at(row,col) = val; } else { diskio::convert_naninf( x.at(row,col), token ); } } ++col; } ++row; } return load_okay; } //! Load a matrix in binary format, //! with a header that indicates the matrix type as well as its dimensions template inline bool diskio::load_arma_binary(Mat& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); std::ifstream f; f.open(name.c_str(), std::fstream::binary); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_arma_binary(x, f, err_msg); f.close(); } return load_okay; } template inline bool diskio::load_arma_binary(Mat& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); std::streampos pos = f.tellg(); bool load_okay = true; std::string f_header; uword f_n_rows; uword f_n_cols; f >> f_header; f >> f_n_rows; f >> f_n_cols; if(f_header == diskio::gen_bin_header(x)) { //f.seekg(1, ios::cur); // NOTE: this may not be portable, as on a Windows machine a newline could be two characters f.get(); x.set_size(f_n_rows,f_n_cols); f.read( reinterpret_cast(x.memptr()), std::streamsize(x.n_elem*sizeof(eT)) ); load_okay = f.good(); } else { load_okay = false; err_msg = "incorrect header in "; } // allow automatic conversion of u32/s32 matrices into u64/s64 matrices if(load_okay == false) { if( (sizeof(eT) == 8) && is_same_type::yes ) { Mat tmp; std::string junk; f.clear(); f.seekg(pos); load_okay = diskio::load_arma_binary(tmp, f, junk); if(load_okay) { x = conv_to< Mat >::from(tmp); } } else if( (sizeof(eT) == 8) && is_same_type::yes ) { Mat tmp; std::string junk; f.clear(); f.seekg(pos); load_okay = diskio::load_arma_binary(tmp, f, junk); if(load_okay) { x = conv_to< Mat >::from(tmp); } } } return load_okay; } inline void diskio::pnm_skip_comments(std::istream& f) { while( isspace(f.peek()) ) { while( isspace(f.peek()) ) { f.get(); } if(f.peek() == '#') { while( (f.peek() != '\r') && (f.peek()!='\n') ) { f.get(); } } } } //! Load a PGM greyscale image as a matrix template inline bool diskio::load_pgm_binary(Mat& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); std::fstream f; f.open(name.c_str(), std::fstream::in | std::fstream::binary); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_pgm_binary(x, f, err_msg); f.close(); } return load_okay; } //! Load a PGM greyscale image as a matrix template inline bool diskio::load_pgm_binary(Mat& x, std::istream& f, std::string& err_msg) { bool load_okay = true; std::string f_header; f >> f_header; if(f_header == "P5") { uword f_n_rows = 0; uword f_n_cols = 0; int f_maxval = 0; diskio::pnm_skip_comments(f); f >> f_n_cols; diskio::pnm_skip_comments(f); f >> f_n_rows; diskio::pnm_skip_comments(f); f >> f_maxval; f.get(); if( (f_maxval > 0) || (f_maxval <= 65535) ) { x.set_size(f_n_rows,f_n_cols); if(f_maxval <= 255) { const uword n_elem = f_n_cols*f_n_rows; podarray tmp(n_elem); f.read( reinterpret_cast(tmp.memptr()), std::streamsize(n_elem) ); uword i = 0; //cout << "f_n_cols = " << f_n_cols << endl; //cout << "f_n_rows = " << f_n_rows << endl; for(uword row=0; row < f_n_rows; ++row) { for(uword col=0; col < f_n_cols; ++col) { x.at(row,col) = eT(tmp[i]); ++i; } } } else { const uword n_elem = f_n_cols*f_n_rows; podarray tmp(n_elem); f.read( reinterpret_cast(tmp.memptr()), std::streamsize(n_elem*2) ); uword i = 0; for(uword row=0; row < f_n_rows; ++row) { for(uword col=0; col < f_n_cols; ++col) { x.at(row,col) = eT(tmp[i]); ++i; } } } } else { load_okay = false; err_msg = "currently no code available to handle loading "; } if(f.good() == false) { load_okay = false; } } else { load_okay = false; err_msg = "unsupported header in "; } return load_okay; } //! Load a PGM greyscale image as a matrix template inline bool diskio::load_pgm_binary(Mat< std::complex >& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); uchar_mat tmp; const bool load_okay = diskio::load_pgm_binary(tmp, name, err_msg); x = conv_to< Mat< std::complex > >::from(tmp); return load_okay; } //! Load a PGM greyscale image as a matrix template inline bool diskio::load_pgm_binary(Mat< std::complex >& x, std::istream& is, std::string& err_msg) { arma_extra_debug_sigprint(); uchar_mat tmp; const bool load_okay = diskio::load_pgm_binary(tmp, is, err_msg); x = conv_to< Mat< std::complex > >::from(tmp); return load_okay; } //! Load a HDF5 file as a matrix template inline bool diskio::load_hdf5_binary(Mat& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_HDF5) { // These may be necessary to store the error handler (if we need to). herr_t (*old_func)(hid_t, void*); void *old_client_data; #if !defined(ARMA_PRINT_HDF5_ERRORS) { // Save old error handler. arma_H5Eget_auto(H5E_DEFAULT, &old_func, &old_client_data); // Disable annoying HDF5 error messages. arma_H5Eset_auto(H5E_DEFAULT, NULL, NULL); } #endif bool load_okay = false; hid_t fid = arma_H5Fopen(name.c_str(), H5F_ACC_RDONLY, H5P_DEFAULT); if(fid >= 0) { // MATLAB HDF5 dataset names are user-specified; // Octave tends to store the datasets in a group, with the actual dataset being referred to as "value". // So we will search for "dataset" and "value", and if those are not found we will take the first dataset we do find. std::vector searchNames; searchNames.push_back("dataset"); searchNames.push_back("value"); hid_t dataset = hdf5_misc::search_hdf5_file(searchNames, fid, 2, false); if(dataset >= 0) { hid_t filespace = arma_H5Dget_space(dataset); // This must be <= 2 due to our search rules. const int ndims = arma_H5Sget_simple_extent_ndims(filespace); hsize_t dims[2]; const herr_t query_status = arma_H5Sget_simple_extent_dims(filespace, dims, NULL); // arma_check(query_status < 0, "Mat::load(): cannot get size of HDF5 dataset"); if(query_status < 0) { err_msg = "cannot get size of HDF5 dataset in "; arma_H5Sclose(filespace); arma_H5Dclose(dataset); arma_H5Fclose(fid); #if !defined(ARMA_PRINT_HDF5_ERRORS) { // Restore HDF5 error handler. arma_H5Eset_auto(H5E_DEFAULT, old_func, old_client_data); } #endif return false; } if(ndims == 1) { dims[1] = 1; } // Vector case; fake second dimension (one column). x.set_size(dims[1], dims[0]); // Now we have to see what type is stored to figure out how to load it. hid_t datatype = arma_H5Dget_type(dataset); hid_t mat_type = hdf5_misc::get_hdf5_type(); // If these are the same type, it is simple. if(arma_H5Tequal(datatype, mat_type) > 0) { // Load directly; H5S_ALL used so that we load the entire dataset. hid_t read_status = arma_H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, void_ptr(x.memptr())); if(read_status >= 0) { load_okay = true; } } else { // Load into another array and convert its type accordingly. hid_t read_status = hdf5_misc::load_and_convert_hdf5(x.memptr(), dataset, datatype, x.n_elem); if(read_status >= 0) { load_okay = true; } } // Now clean up. arma_H5Tclose(datatype); arma_H5Tclose(mat_type); arma_H5Sclose(filespace); } arma_H5Dclose(dataset); arma_H5Fclose(fid); if(load_okay == false) { err_msg = "unsupported or incorrect HDF5 data in "; } } else { err_msg = "cannot open file "; } #if !defined(ARMA_PRINT_HDF5_ERRORS) { // Restore HDF5 error handler. arma_H5Eset_auto(H5E_DEFAULT, old_func, old_client_data); } #endif return load_okay; } #else { arma_ignore(x); arma_ignore(name); arma_ignore(err_msg); arma_stop("Mat::load(): use of HDF5 needs to be enabled"); return false; } #endif } //! Try to load a matrix by automatically determining its type template inline bool diskio::load_auto_detect(Mat& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_HDF5) // We're currently using the C bindings for the HDF5 library, which don't support C++ streams if( arma_H5Fis_hdf5(name.c_str()) ) { return load_hdf5_binary(x, name, err_msg); } #endif std::fstream f; f.open(name.c_str(), std::fstream::in | std::fstream::binary); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_auto_detect(x, f, err_msg); f.close(); } return load_okay; } //! Try to load a matrix by automatically determining its type template inline bool diskio::load_auto_detect(Mat& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); static const std::string ARMA_MAT_TXT = "ARMA_MAT_TXT"; static const std::string ARMA_MAT_BIN = "ARMA_MAT_BIN"; static const std::string P5 = "P5"; podarray raw_header( uword(ARMA_MAT_TXT.length()) + 1); std::streampos pos = f.tellg(); f.read( raw_header.memptr(), std::streamsize(ARMA_MAT_TXT.length()) ); raw_header[uword(ARMA_MAT_TXT.length())] = '\0'; f.clear(); f.seekg(pos); const std::string header = raw_header.mem; if(ARMA_MAT_TXT == header.substr(0,ARMA_MAT_TXT.length())) { return load_arma_ascii(x, f, err_msg); } else if(ARMA_MAT_BIN == header.substr(0,ARMA_MAT_BIN.length())) { return load_arma_binary(x, f, err_msg); } else if(P5 == header.substr(0,P5.length())) { return load_pgm_binary(x, f, err_msg); } else { const file_type ft = guess_file_type(f); switch(ft) { case csv_ascii: return load_csv_ascii(x, f, err_msg); break; case raw_binary: return load_raw_binary(x, f, err_msg); break; case raw_ascii: return load_raw_ascii(x, f, err_msg); break; default: err_msg = "unknown data in "; return false; } } return false; } // // sparse matrices // //! Save a matrix in ASCII coord format template inline bool diskio::save_coord_ascii(const SpMat& x, const std::string& final_name) { arma_extra_debug_sigprint(); const std::string tmp_name = diskio::gen_tmp_name(final_name); std::ofstream f(tmp_name.c_str()); bool save_okay = f.is_open(); if(save_okay == true) { save_okay = diskio::save_coord_ascii(x, f); f.flush(); f.close(); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } } return save_okay; } //! Save a matrix in ASCII coord format template inline bool diskio::save_coord_ascii(const SpMat& x, std::ostream& f) { arma_extra_debug_sigprint(); const ios::fmtflags orig_flags = f.flags(); typename SpMat::const_iterator iter = x.begin(); typename SpMat::const_iterator iter_end = x.end(); for(; iter != iter_end; ++iter) { f.setf(ios::fixed); f << iter.row() << ' ' << iter.col() << ' '; if( (is_float::value) || (is_double::value) ) { f.setf(ios::scientific); f.precision(12); } f << (*iter) << '\n'; } // make sure it's possible to figure out the matrix size later if( (x.n_rows > 0) && (x.n_cols > 0) ) { const uword max_row = (x.n_rows > 0) ? x.n_rows-1 : 0; const uword max_col = (x.n_cols > 0) ? x.n_cols-1 : 0; if( x.at(max_row, max_col) == eT(0) ) { f.setf(ios::fixed); f << max_row << ' ' << max_col << " 0\n"; } } const bool save_okay = f.good(); f.flags(orig_flags); return save_okay; } //! Save a matrix in ASCII coord format (complex numbers) template inline bool diskio::save_coord_ascii(const SpMat< std::complex >& x, std::ostream& f) { arma_extra_debug_sigprint(); const ios::fmtflags orig_flags = f.flags(); typedef typename std::complex eT; typename SpMat::const_iterator iter = x.begin(); typename SpMat::const_iterator iter_end = x.end(); for(; iter != iter_end; ++iter) { f.setf(ios::fixed); f << iter.row() << ' ' << iter.col() << ' '; if( (is_float::value) || (is_double::value) ) { f.setf(ios::scientific); f.precision(12); } const eT val = (*iter); f << val.real() << ' ' << val.imag() << '\n'; } // make sure it's possible to figure out the matrix size later if( (x.n_rows > 0) && (x.n_cols > 0) ) { const uword max_row = (x.n_rows > 0) ? x.n_rows-1 : 0; const uword max_col = (x.n_cols > 0) ? x.n_cols-1 : 0; if( x.at(max_row, max_col) == eT(0) ) { f.setf(ios::fixed); f << max_row << ' ' << max_col << " 0 0\n"; } } const bool save_okay = f.good(); f.flags(orig_flags); return save_okay; } //! Save a matrix in binary format, //! with a header that stores the matrix type as well as its dimensions template inline bool diskio::save_arma_binary(const SpMat& x, const std::string& final_name) { arma_extra_debug_sigprint(); const std::string tmp_name = diskio::gen_tmp_name(final_name); std::ofstream f(tmp_name.c_str(), std::fstream::binary); bool save_okay = f.is_open(); if(save_okay == true) { save_okay = diskio::save_arma_binary(x, f); f.flush(); f.close(); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } } return save_okay; } //! Save a matrix in binary format, //! with a header that stores the matrix type as well as its dimensions template inline bool diskio::save_arma_binary(const SpMat& x, std::ostream& f) { arma_extra_debug_sigprint(); f << diskio::gen_bin_header(x) << '\n'; f << x.n_rows << ' ' << x.n_cols << ' ' << x.n_nonzero << '\n'; f.write( reinterpret_cast(x.values), std::streamsize(x.n_nonzero*sizeof(eT)) ); f.write( reinterpret_cast(x.row_indices), std::streamsize(x.n_nonzero*sizeof(uword)) ); f.write( reinterpret_cast(x.col_ptrs), std::streamsize((x.n_cols+1)*sizeof(uword)) ); return f.good(); } template inline bool diskio::load_coord_ascii(SpMat& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); std::fstream f; f.open(name.c_str(), std::fstream::in | std::fstream::binary); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_coord_ascii(x, f, err_msg); f.close(); } return load_okay; } template inline bool diskio::load_coord_ascii(SpMat& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); arma_ignore(err_msg); bool load_okay = f.good(); f.clear(); const std::fstream::pos_type pos1 = f.tellg(); // // work out the size uword f_n_rows = 0; uword f_n_cols = 0; uword f_n_nz = 0; bool size_found = false; std::string line_string; std::string token; std::stringstream line_stream; std::stringstream ss; uword last_line_row = 0; uword last_line_col = 0; bool first_line = true; bool weird_format = false; while( (f.good() == true) && (load_okay == true) ) { std::getline(f, line_string); if(line_string.size() == 0) { break; } line_stream.clear(); line_stream.str(line_string); uword line_row = 0; uword line_col = 0; // a valid line in co-ord format has at least 2 entries line_stream >> line_row; if(line_stream.good() == false) { load_okay = false; break; } line_stream >> line_col; size_found = true; if(f_n_rows < line_row) f_n_rows = line_row; if(f_n_cols < line_col) f_n_cols = line_col; if(first_line == true) { first_line = false; } else { if( (line_col < last_line_col) || ((line_row <= last_line_row) && (line_col <= last_line_col)) ) { weird_format = true; } } last_line_row = line_row; last_line_col = line_col; if(line_stream.good() == true) { eT final_val = eT(0); line_stream >> token; if(line_stream.fail() == false) { eT val = eT(0); ss.clear(); ss.str(token); ss >> val; if(ss.fail() == false) { final_val = val; } else { val = eT(0); const bool success = diskio::convert_naninf( val, token ); if(success == true) { final_val = val; } } } if(final_val != eT(0)) { ++f_n_nz; } } } if(size_found == true) { // take into account that indices start at 0 f_n_rows++; f_n_cols++; } if(load_okay == true) { f.clear(); f.seekg(pos1); x.set_size(f_n_rows, f_n_cols); if(weird_format == false) { x.mem_resize(f_n_nz); } uword pos = 0; while(f.good() == true) { std::getline(f, line_string); if(line_string.size() == 0) { break; } line_stream.clear(); line_stream.str(line_string); uword line_row = 0; uword line_col = 0; line_stream >> line_row; line_stream >> line_col; eT final_val = eT(0); line_stream >> token; if(line_stream.fail() == false) { eT val = eT(0); ss.clear(); ss.str(token); ss >> val; if(ss.fail() == false) { final_val = val; } else { val = eT(0); const bool success = diskio::convert_naninf( val, token ); if(success == true) { final_val = val; } } } if(final_val != eT(0)) { if(weird_format == false) { access::rw(x.row_indices[pos]) = line_row; access::rw(x.values[pos]) = final_val; ++access::rw(x.col_ptrs[line_col + 1]); ++pos; } else { x.at(line_row,line_col) = final_val; } } } if(weird_format == false) { for(uword c = 1; c <= f_n_cols; ++c) { access::rw(x.col_ptrs[c]) += x.col_ptrs[c - 1]; } } } return load_okay; } template inline bool diskio::load_coord_ascii(SpMat< std::complex >& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); arma_ignore(err_msg); bool load_okay = f.good(); f.clear(); const std::fstream::pos_type pos1 = f.tellg(); // // work out the size uword f_n_rows = 0; uword f_n_cols = 0; uword f_n_nz = 0; bool size_found = false; std::string line_string; std::string token_real; std::string token_imag; std::stringstream line_stream; std::stringstream ss; uword last_line_row = 0; uword last_line_col = 0; bool first_line = true; bool weird_format = false; while( (f.good() == true) && (load_okay == true) ) { std::getline(f, line_string); if(line_string.size() == 0) { break; } line_stream.clear(); line_stream.str(line_string); uword line_row = 0; uword line_col = 0; // a valid line in co-ord format has at least 2 entries line_stream >> line_row; if(line_stream.good() == false) { load_okay = false; break; } line_stream >> line_col; size_found = true; if(f_n_rows < line_row) f_n_rows = line_row; if(f_n_cols < line_col) f_n_cols = line_col; if(first_line == true) { first_line = false; } else { if( (line_col < last_line_col) || ((line_row <= last_line_row) && (line_col <= last_line_col)) ) { weird_format = true; } } last_line_row = line_row; last_line_col = line_col; if(line_stream.good() == true) { T final_val_real = T(0); T final_val_imag = T(0); line_stream >> token_real; if(line_stream.fail() == false) { T val_real = T(0); ss.clear(); ss.str(token_real); ss >> val_real; if(ss.fail() == false) { final_val_real = val_real; } else { val_real = T(0); const bool success = diskio::convert_naninf( val_real, token_real ); if(success == true) { final_val_real = val_real; } } } line_stream >> token_imag; if(line_stream.fail() == false) { T val_imag = T(0); ss.clear(); ss.str(token_imag); ss >> val_imag; if(ss.fail() == false) { final_val_imag = val_imag; } else { val_imag = T(0); const bool success = diskio::convert_naninf( val_imag, token_imag ); if(success == true) { final_val_imag = val_imag; } } } if( (final_val_real != T(0)) || (final_val_imag != T(0)) ) { ++f_n_nz; } } } if(size_found == true) { // take into account that indices start at 0 f_n_rows++; f_n_cols++; } if(load_okay == true) { f.clear(); f.seekg(pos1); x.set_size(f_n_rows, f_n_cols); if(weird_format == false) { x.mem_resize(f_n_nz); } uword pos = 0; while(f.good() == true) { std::getline(f, line_string); if(line_string.size() == 0) { break; } line_stream.clear(); line_stream.str(line_string); uword line_row = 0; uword line_col = 0; line_stream >> line_row; line_stream >> line_col; T final_val_real = T(0); T final_val_imag = T(0); line_stream >> token_real; if(line_stream.fail() == false) { T val_real = T(0); ss.clear(); ss.str(token_real); ss >> val_real; if(ss.fail() == false) { final_val_real = val_real; } else { val_real = T(0); const bool success = diskio::convert_naninf( val_real, token_real ); if(success == true) { final_val_real = val_real; } } } line_stream >> token_imag; if(line_stream.fail() == false) { T val_imag = T(0); ss.clear(); ss.str(token_imag); ss >> val_imag; if(ss.fail() == false) { final_val_imag = val_imag; } else { val_imag = T(0); const bool success = diskio::convert_naninf( val_imag, token_imag ); if(success == true) { final_val_imag = val_imag; } } } if( (final_val_real != T(0)) || (final_val_imag != T(0)) ) { if(weird_format == false) { access::rw(x.row_indices[pos]) = line_row; access::rw(x.values[pos]) = std::complex(final_val_real, final_val_imag); ++access::rw(x.col_ptrs[line_col + 1]); ++pos; } else { x.at(line_row,line_col) = std::complex(final_val_real, final_val_imag); } } } if(weird_format == false) { for(uword c = 1; c <= f_n_cols; ++c) { access::rw(x.col_ptrs[c]) += x.col_ptrs[c - 1]; } } } return load_okay; } //! Load a matrix in binary format, //! with a header that indicates the matrix type as well as its dimensions template inline bool diskio::load_arma_binary(SpMat& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); std::ifstream f; f.open(name.c_str(), std::fstream::binary); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_arma_binary(x, f, err_msg); f.close(); } return load_okay; } template inline bool diskio::load_arma_binary(SpMat& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); bool load_okay = true; std::string f_header; f >> f_header; if(f_header == diskio::gen_bin_header(x)) { uword f_n_rows; uword f_n_cols; uword f_n_nz; f >> f_n_rows; f >> f_n_cols; f >> f_n_nz; //f.seekg(1, ios::cur); // NOTE: this may not be portable, as on a Windows machine a newline could be two characters f.get(); x.set_size(f_n_rows, f_n_cols); x.mem_resize(f_n_nz); f.read( reinterpret_cast(access::rwp(x.values)), std::streamsize(x.n_nonzero*sizeof(eT)) ); std::streampos pos = f.tellg(); f.read( reinterpret_cast(access::rwp(x.row_indices)), std::streamsize(x.n_nonzero*sizeof(uword)) ); f.read( reinterpret_cast(access::rwp(x.col_ptrs)), std::streamsize((x.n_cols+1)*sizeof(uword)) ); bool check1 = true; for(uword i=0; i < x.n_nonzero; ++i) { if(x.values[i] == eT(0)) { check1 = false; break; } } bool check2 = true; for(uword i=0; i < x.n_cols; ++i) { if(x.col_ptrs[i+1] < x.col_ptrs[i]) { check2 = false; break; } } bool check3 = (x.col_ptrs[x.n_cols] == x.n_nonzero); if((check1 == true) && ((check2 == false) || (check3 == false))) { if(sizeof(uword) == 8) { arma_extra_debug_print("detected inconsistent data while loading; re-reading integer parts as u32"); // inconstency could be due to a different uword size used during saving, // so try loading the row_indices and col_ptrs under the assumption of 32 bit unsigned integers f.clear(); f.seekg(pos); podarray tmp_a(x.n_nonzero ); tmp_a.zeros(); podarray tmp_b(x.n_cols + 1); tmp_b.zeros(); f.read( reinterpret_cast(tmp_a.memptr()), std::streamsize( x.n_nonzero * sizeof(u32)) ); f.read( reinterpret_cast(tmp_b.memptr()), std::streamsize((x.n_cols + 1) * sizeof(u32)) ); check2 = true; for(uword i=0; i < x.n_cols; ++i) { if(tmp_b[i+1] < tmp_b[i]) { check2 = false; break; } } check3 = (tmp_b[x.n_cols] == x.n_nonzero); load_okay = f.good(); if( load_okay && (check2 == true) && (check3 == true) ) { arma_extra_debug_print("reading integer parts as u32 succeeded"); arrayops::convert(access::rwp(x.row_indices), tmp_a.memptr(), x.n_nonzero ); arrayops::convert(access::rwp(x.col_ptrs), tmp_b.memptr(), x.n_cols + 1); } else { arma_extra_debug_print("reading integer parts as u32 failed"); } } } if((check1 == false) || (check2 == false) || (check3 == false)) { load_okay = false; err_msg = "inconsistent data in "; } else { load_okay = f.good(); } } else { load_okay = false; err_msg = "incorrect header in "; } return load_okay; } // cubes //! Save a cube as raw text (no header, human readable). template inline bool diskio::save_raw_ascii(const Cube& x, const std::string& final_name) { arma_extra_debug_sigprint(); const std::string tmp_name = diskio::gen_tmp_name(final_name); std::fstream f(tmp_name.c_str(), std::fstream::out); bool save_okay = f.is_open(); if(save_okay == true) { save_okay = save_raw_ascii(x, f); f.flush(); f.close(); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } } return save_okay; } //! Save a cube as raw text (no header, human readable). template inline bool diskio::save_raw_ascii(const Cube& x, std::ostream& f) { arma_extra_debug_sigprint(); uword cell_width; // TODO: need sane values for complex numbers if( (is_float::value) || (is_double::value) ) { f.setf(ios::scientific); f.precision(12); cell_width = 20; } for(uword slice=0; slice < x.n_slices; ++slice) { for(uword row=0; row < x.n_rows; ++row) { for(uword col=0; col < x.n_cols; ++col) { f.put(' '); if( (is_float::value) || (is_double::value) ) { f.width(cell_width); } arma_ostream::print_elem(f, x.at(row,col,slice), false); } f.put('\n'); } } return f.good(); } //! Save a cube as raw binary (no header) template inline bool diskio::save_raw_binary(const Cube& x, const std::string& final_name) { arma_extra_debug_sigprint(); const std::string tmp_name = diskio::gen_tmp_name(final_name); std::ofstream f(tmp_name.c_str(), std::fstream::binary); bool save_okay = f.is_open(); if(save_okay == true) { save_okay = diskio::save_raw_binary(x, f); f.flush(); f.close(); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } } return save_okay; } template inline bool diskio::save_raw_binary(const Cube& x, std::ostream& f) { arma_extra_debug_sigprint(); f.write( reinterpret_cast(x.mem), std::streamsize(x.n_elem*sizeof(eT)) ); return f.good(); } //! Save a cube in text format (human readable), //! with a header that indicates the cube type as well as its dimensions template inline bool diskio::save_arma_ascii(const Cube& x, const std::string& final_name) { arma_extra_debug_sigprint(); const std::string tmp_name = diskio::gen_tmp_name(final_name); std::ofstream f(tmp_name.c_str()); bool save_okay = f.is_open(); if(save_okay == true) { save_okay = diskio::save_arma_ascii(x, f); f.flush(); f.close(); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } } return save_okay; } //! Save a cube in text format (human readable), //! with a header that indicates the cube type as well as its dimensions template inline bool diskio::save_arma_ascii(const Cube& x, std::ostream& f) { arma_extra_debug_sigprint(); const ios::fmtflags orig_flags = f.flags(); f << diskio::gen_txt_header(x) << '\n'; f << x.n_rows << ' ' << x.n_cols << ' ' << x.n_slices << '\n'; uword cell_width; // TODO: need sane values for complex numbers if( (is_float::value) || (is_double::value) ) { f.setf(ios::scientific); f.precision(12); cell_width = 20; } for(uword slice=0; slice < x.n_slices; ++slice) { for(uword row=0; row < x.n_rows; ++row) { for(uword col=0; col < x.n_cols; ++col) { f.put(' '); if( (is_float::value) || (is_double::value) ) { f.width(cell_width); } arma_ostream::print_elem(f, x.at(row,col,slice), false); } f.put('\n'); } } const bool save_okay = f.good(); f.flags(orig_flags); return save_okay; } //! Save a cube in binary format, //! with a header that stores the cube type as well as its dimensions template inline bool diskio::save_arma_binary(const Cube& x, const std::string& final_name) { arma_extra_debug_sigprint(); const std::string tmp_name = diskio::gen_tmp_name(final_name); std::ofstream f(tmp_name.c_str(), std::fstream::binary); bool save_okay = f.is_open(); if(save_okay == true) { save_okay = diskio::save_arma_binary(x, f); f.flush(); f.close(); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } } return save_okay; } //! Save a cube in binary format, //! with a header that stores the cube type as well as its dimensions template inline bool diskio::save_arma_binary(const Cube& x, std::ostream& f) { arma_extra_debug_sigprint(); f << diskio::gen_bin_header(x) << '\n'; f << x.n_rows << ' ' << x.n_cols << ' ' << x.n_slices << '\n'; f.write( reinterpret_cast(x.mem), std::streamsize(x.n_elem*sizeof(eT)) ); return f.good(); } //! Save a cube as part of a HDF5 file template inline bool diskio::save_hdf5_binary(const Cube& x, const std::string& final_name) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_HDF5) { #if !defined(ARMA_PRINT_HDF5_ERRORS) { // Disable annoying HDF5 error messages. arma_H5Eset_auto(H5E_DEFAULT, NULL, NULL); } #endif bool save_okay = false; const std::string tmp_name = diskio::gen_tmp_name(final_name); // Set up the file according to HDF5's preferences hid_t file = arma_H5Fcreate(tmp_name.c_str(), H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); // We need to create a dataset, datatype, and dataspace hsize_t dims[3]; dims[2] = x.n_rows; dims[1] = x.n_cols; dims[0] = x.n_slices; hid_t dataspace = arma_H5Screate_simple(3, dims, NULL); // treat the cube as a 3d array dataspace hid_t datatype = hdf5_misc::get_hdf5_type(); // If this returned something invalid, well, it's time to crash. arma_check(datatype == -1, "Cube::save(): unknown datatype for HDF5"); // MATLAB forces the users to specify a name at save time for HDF5; Octave // will use the default of 'dataset' unless otherwise specified, so we will // use that. hid_t dataset = arma_H5Dcreate(file, "dataset", datatype, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); herr_t status = arma_H5Dwrite(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, x.mem); save_okay = (status >= 0); arma_H5Dclose(dataset); arma_H5Tclose(datatype); arma_H5Sclose(dataspace); arma_H5Fclose(file); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } return save_okay; } #else { arma_ignore(x); arma_ignore(final_name); arma_stop("Cube::save(): use of HDF5 needs to be enabled"); return false; } #endif } //! Load a cube as raw text (no header, human readable). //! NOTE: this is much slower than reading a file with a header. template inline bool diskio::load_raw_ascii(Cube& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); Mat tmp; const bool load_okay = diskio::load_raw_ascii(tmp, name, err_msg); if(load_okay == true) { if(tmp.is_empty() == false) { x.set_size(tmp.n_rows, tmp.n_cols, 1); x.slice(0) = tmp; } else { x.reset(); } } return load_okay; } //! Load a cube as raw text (no header, human readable). //! NOTE: this is much slower than reading a file with a header. template inline bool diskio::load_raw_ascii(Cube& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); Mat tmp; const bool load_okay = diskio::load_raw_ascii(tmp, f, err_msg); if(load_okay == true) { if(tmp.is_empty() == false) { x.set_size(tmp.n_rows, tmp.n_cols, 1); x.slice(0) = tmp; } else { x.reset(); } } return load_okay; } //! Load a cube in binary format (no header); //! the cube is assumed to have one slice with one column template inline bool diskio::load_raw_binary(Cube& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); std::ifstream f; f.open(name.c_str(), std::fstream::binary); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_raw_binary(x, f, err_msg); f.close(); } return load_okay; } template inline bool diskio::load_raw_binary(Cube& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); arma_ignore(err_msg); f.clear(); const std::streampos pos1 = f.tellg(); f.clear(); f.seekg(0, ios::end); f.clear(); const std::streampos pos2 = f.tellg(); const uword N = ( (pos1 >= 0) && (pos2 >= 0) ) ? uword(pos2 - pos1) : 0; f.clear(); //f.seekg(0, ios::beg); f.seekg(pos1); x.set_size(N / sizeof(eT), 1, 1); f.clear(); f.read( reinterpret_cast(x.memptr()), std::streamsize(N) ); return f.good(); } //! Load a cube in text format (human readable), //! with a header that indicates the cube type as well as its dimensions template inline bool diskio::load_arma_ascii(Cube& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); std::ifstream f(name.c_str()); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_arma_ascii(x, f, err_msg); f.close(); } return load_okay; } //! Load a cube in text format (human readable), //! with a header that indicates the cube type as well as its dimensions template inline bool diskio::load_arma_ascii(Cube& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); std::streampos pos = f.tellg(); bool load_okay = true; std::string f_header; uword f_n_rows; uword f_n_cols; uword f_n_slices; f >> f_header; f >> f_n_rows; f >> f_n_cols; f >> f_n_slices; if(f_header == diskio::gen_txt_header(x)) { x.set_size(f_n_rows, f_n_cols, f_n_slices); for(uword slice=0; slice < x.n_slices; ++slice) { for(uword row=0; row < x.n_rows; ++row) { for(uword col=0; col < x.n_cols; ++col) { f >> x.at(row,col,slice); } } } load_okay = f.good(); } else { load_okay = false; err_msg = "incorrect header in "; } // allow automatic conversion of u32/s32 cubes into u64/s64 cubes if(load_okay == false) { if( (sizeof(eT) == 8) && is_same_type::yes ) { Cube tmp; std::string junk; f.clear(); f.seekg(pos); load_okay = diskio::load_arma_ascii(tmp, f, junk); if(load_okay) { x = conv_to< Cube >::from(tmp); } } else if( (sizeof(eT) == 8) && is_same_type::yes ) { Cube tmp; std::string junk; f.clear(); f.seekg(pos); load_okay = diskio::load_arma_ascii(tmp, f, junk); if(load_okay) { x = conv_to< Cube >::from(tmp); } } } return load_okay; } //! Load a cube in binary format, //! with a header that indicates the cube type as well as its dimensions template inline bool diskio::load_arma_binary(Cube& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); std::ifstream f; f.open(name.c_str(), std::fstream::binary); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_arma_binary(x, f, err_msg); f.close(); } return load_okay; } template inline bool diskio::load_arma_binary(Cube& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); std::streampos pos = f.tellg(); bool load_okay = true; std::string f_header; uword f_n_rows; uword f_n_cols; uword f_n_slices; f >> f_header; f >> f_n_rows; f >> f_n_cols; f >> f_n_slices; if(f_header == diskio::gen_bin_header(x)) { //f.seekg(1, ios::cur); // NOTE: this may not be portable, as on a Windows machine a newline could be two characters f.get(); x.set_size(f_n_rows, f_n_cols, f_n_slices); f.read( reinterpret_cast(x.memptr()), std::streamsize(x.n_elem*sizeof(eT)) ); load_okay = f.good(); } else { load_okay = false; err_msg = "incorrect header in "; } // allow automatic conversion of u32/s32 cubes into u64/s64 cubes if(load_okay == false) { if( (sizeof(eT) == 8) && is_same_type::yes ) { Cube tmp; std::string junk; f.clear(); f.seekg(pos); load_okay = diskio::load_arma_binary(tmp, f, junk); if(load_okay) { x = conv_to< Cube >::from(tmp); } } else if( (sizeof(eT) == 8) && is_same_type::yes ) { Cube tmp; std::string junk; f.clear(); f.seekg(pos); load_okay = diskio::load_arma_binary(tmp, f, junk); if(load_okay) { x = conv_to< Cube >::from(tmp); } } } return load_okay; } //! Load a HDF5 file as a cube template inline bool diskio::load_hdf5_binary(Cube& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_HDF5) { // These may be necessary to store the error handler (if we need to). herr_t (*old_func)(hid_t, void*); void *old_client_data; #if !defined(ARMA_PRINT_HDF5_ERRORS) { // Save old error handler. arma_H5Eget_auto(H5E_DEFAULT, &old_func, &old_client_data); // Disable annoying HDF5 error messages. arma_H5Eset_auto(H5E_DEFAULT, NULL, NULL); } #endif bool load_okay = false; hid_t fid = arma_H5Fopen(name.c_str(), H5F_ACC_RDONLY, H5P_DEFAULT); if(fid >= 0) { // MATLAB HDF5 dataset names are user-specified; // Octave tends to store the datasets in a group, with the actual dataset being referred to as "value". // So we will search for "dataset" and "value", and if those are not found we will take the first dataset we do find. std::vector searchNames; searchNames.push_back("dataset"); searchNames.push_back("value"); hid_t dataset = hdf5_misc::search_hdf5_file(searchNames, fid, 3, false); if(dataset >= 0) { hid_t filespace = arma_H5Dget_space(dataset); // This must be <= 3 due to our search rules. const int ndims = arma_H5Sget_simple_extent_ndims(filespace); hsize_t dims[3]; const herr_t query_status = arma_H5Sget_simple_extent_dims(filespace, dims, NULL); // arma_check(query_status < 0, "Cube::load(): cannot get size of HDF5 dataset"); if(query_status < 0) { err_msg = "cannot get size of HDF5 dataset in "; arma_H5Sclose(filespace); arma_H5Dclose(dataset); arma_H5Fclose(fid); #if !defined(ARMA_PRINT_HDF5_ERRORS) { // Restore HDF5 error handler. arma_H5Eset_auto(H5E_DEFAULT, old_func, old_client_data); } #endif return false; } if (ndims == 1) { dims[1] = 1; dims[2] = 1; } // Vector case; one row/colum, several slices if (ndims == 2) { dims[2] = 1; } // Matrix case; one column, several rows/slices x.set_size(dims[2], dims[1], dims[0]); // Now we have to see what type is stored to figure out how to load it. hid_t datatype = arma_H5Dget_type(dataset); hid_t mat_type = hdf5_misc::get_hdf5_type(); // If these are the same type, it is simple. if(arma_H5Tequal(datatype, mat_type) > 0) { // Load directly; H5S_ALL used so that we load the entire dataset. hid_t read_status = arma_H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, void_ptr(x.memptr())); if(read_status >= 0) { load_okay = true; } } else { // Load into another array and convert its type accordingly. hid_t read_status = hdf5_misc::load_and_convert_hdf5(x.memptr(), dataset, datatype, x.n_elem); if(read_status >= 0) { load_okay = true; } } // Now clean up. arma_H5Tclose(datatype); arma_H5Tclose(mat_type); arma_H5Sclose(filespace); } arma_H5Dclose(dataset); arma_H5Fclose(fid); if(load_okay == false) { err_msg = "unsupported or incorrect HDF5 data in "; } } else { err_msg = "cannot open file "; } #if !defined(ARMA_PRINT_HDF5_ERRORS) { // Restore HDF5 error handler. arma_H5Eset_auto(H5E_DEFAULT, old_func, old_client_data); } #endif return load_okay; } #else { arma_ignore(x); arma_ignore(name); arma_ignore(err_msg); arma_stop("Cube::load(): use of HDF5 needs to be enabled"); return false; } #endif } //! Try to load a cube by automatically determining its type template inline bool diskio::load_auto_detect(Cube& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_HDF5) // We're currently using the C bindings for the HDF5 library, which don't support C++ streams if( arma_H5Fis_hdf5(name.c_str()) ) { return load_hdf5_binary(x, name, err_msg); } #endif std::fstream f; f.open(name.c_str(), std::fstream::in | std::fstream::binary); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_auto_detect(x, f, err_msg); f.close(); } return load_okay; } //! Try to load a cube by automatically determining its type template inline bool diskio::load_auto_detect(Cube& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); static const std::string ARMA_CUB_TXT = "ARMA_CUB_TXT"; static const std::string ARMA_CUB_BIN = "ARMA_CUB_BIN"; static const std::string P6 = "P6"; podarray raw_header(uword(ARMA_CUB_TXT.length()) + 1); std::streampos pos = f.tellg(); f.read( raw_header.memptr(), std::streamsize(ARMA_CUB_TXT.length()) ); raw_header[uword(ARMA_CUB_TXT.length())] = '\0'; f.clear(); f.seekg(pos); const std::string header = raw_header.mem; if(ARMA_CUB_TXT == header.substr(0, ARMA_CUB_TXT.length())) { return load_arma_ascii(x, f, err_msg); } else if(ARMA_CUB_BIN == header.substr(0, ARMA_CUB_BIN.length())) { return load_arma_binary(x, f, err_msg); } else if(P6 == header.substr(0, P6.length())) { return load_ppm_binary(x, f, err_msg); } else { const file_type ft = guess_file_type(f); switch(ft) { // case csv_ascii: // return load_csv_ascii(x, f, err_msg); // break; case raw_binary: return load_raw_binary(x, f, err_msg); break; case raw_ascii: return load_raw_ascii(x, f, err_msg); break; default: err_msg = "unknown data in "; return false; } } return false; } // fields template inline bool diskio::save_arma_binary(const field& x, const std::string& final_name) { arma_extra_debug_sigprint(); const std::string tmp_name = diskio::gen_tmp_name(final_name); std::ofstream f( tmp_name.c_str(), std::fstream::binary ); bool save_okay = f.is_open(); if(save_okay == true) { save_okay = diskio::save_arma_binary(x, f); f.flush(); f.close(); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } } return save_okay; } template inline bool diskio::save_arma_binary(const field& x, std::ostream& f) { arma_extra_debug_sigprint(); arma_type_check(( (is_Mat::value == false) && (is_Cube::value == false) )); if(x.n_slices <= 1) { f << "ARMA_FLD_BIN" << '\n'; f << x.n_rows << '\n'; f << x.n_cols << '\n'; } else { f << "ARMA_FL3_BIN" << '\n'; f << x.n_rows << '\n'; f << x.n_cols << '\n'; f << x.n_slices << '\n'; } bool save_okay = true; for(uword i=0; i inline bool diskio::load_arma_binary(field& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); std::ifstream f( name.c_str(), std::fstream::binary ); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_arma_binary(x, f, err_msg); f.close(); } return load_okay; } template inline bool diskio::load_arma_binary(field& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); arma_type_check(( (is_Mat::value == false) && (is_Cube::value == false) )); bool load_okay = true; std::string f_type; f >> f_type; if(f_type == "ARMA_FLD_BIN") { uword f_n_rows; uword f_n_cols; f >> f_n_rows; f >> f_n_cols; x.set_size(f_n_rows, f_n_cols); f.get(); for(uword i=0; i> f_n_rows; f >> f_n_cols; f >> f_n_slices; x.set_size(f_n_rows, f_n_cols, f_n_slices); f.get(); for(uword i=0; i& x, const std::string& final_name) { arma_extra_debug_sigprint(); const std::string tmp_name = diskio::gen_tmp_name(final_name); std::ofstream f( tmp_name.c_str(), std::fstream::binary ); bool save_okay = f.is_open(); if(save_okay == true) { save_okay = diskio::save_std_string(x, f); f.flush(); f.close(); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } } return save_okay; } inline bool diskio::save_std_string(const field& x, std::ostream& f) { arma_extra_debug_sigprint(); for(uword row=0; row& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); std::ifstream f( name.c_str() ); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_std_string(x, f, err_msg); f.close(); } return load_okay; } inline bool diskio::load_std_string(field& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); bool load_okay = true; // // work out the size uword f_n_rows = 0; uword f_n_cols = 0; bool f_n_cols_found = false; std::string line_string; std::string token; while( (f.good() == true) && (load_okay == true) ) { std::getline(f, line_string); if(line_string.size() == 0) break; std::stringstream line_stream(line_string); uword line_n_cols = 0; while (line_stream >> token) line_n_cols++; if(f_n_cols_found == false) { f_n_cols = line_n_cols; f_n_cols_found = true; } else { if(line_n_cols != f_n_cols) { load_okay = false; err_msg = "inconsistent number of columns in "; } } ++f_n_rows; } if(load_okay == true) { f.clear(); f.seekg(0, ios::beg); //f.seekg(start); x.set_size(f_n_rows, f_n_cols); for(uword row=0; row < x.n_rows; ++row) { for(uword col=0; col < x.n_cols; ++col) { f >> x.at(row,col); } } } if(f.good() == false) { load_okay = false; } return load_okay; } //! Try to load a field by automatically determining its type template inline bool diskio::load_auto_detect(field& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); std::fstream f; f.open(name.c_str(), std::fstream::in | std::fstream::binary); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_auto_detect(x, f, err_msg); f.close(); } return load_okay; } //! Try to load a field by automatically determining its type template inline bool diskio::load_auto_detect(field& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); arma_type_check(( is_Mat::value == false )); static const std::string ARMA_FLD_BIN = "ARMA_FLD_BIN"; static const std::string ARMA_FL3_BIN = "ARMA_FL3_BIN"; static const std::string P6 = "P6"; podarray raw_header(uword(ARMA_FLD_BIN.length()) + 1); std::streampos pos = f.tellg(); f.read( raw_header.memptr(), std::streamsize(ARMA_FLD_BIN.length()) ); f.clear(); f.seekg(pos); raw_header[uword(ARMA_FLD_BIN.length())] = '\0'; const std::string header = raw_header.mem; if(ARMA_FLD_BIN == header.substr(0, ARMA_FLD_BIN.length())) { return load_arma_binary(x, f, err_msg); } else if(ARMA_FL3_BIN == header.substr(0, ARMA_FL3_BIN.length())) { return load_arma_binary(x, f, err_msg); } else if(P6 == header.substr(0, P6.length())) { return load_ppm_binary(x, f, err_msg); } else { err_msg = "unsupported header in "; return false; } } // // handling of PPM images by cubes template inline bool diskio::load_ppm_binary(Cube& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); std::fstream f; f.open(name.c_str(), std::fstream::in | std::fstream::binary); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_ppm_binary(x, f, err_msg); f.close(); } return load_okay; } template inline bool diskio::load_ppm_binary(Cube& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); bool load_okay = true; std::string f_header; f >> f_header; if(f_header == "P6") { uword f_n_rows = 0; uword f_n_cols = 0; int f_maxval = 0; diskio::pnm_skip_comments(f); f >> f_n_cols; diskio::pnm_skip_comments(f); f >> f_n_rows; diskio::pnm_skip_comments(f); f >> f_maxval; f.get(); if( (f_maxval > 0) || (f_maxval <= 65535) ) { x.set_size(f_n_rows, f_n_cols, 3); if(f_maxval <= 255) { const uword n_elem = 3*f_n_cols*f_n_rows; podarray tmp(n_elem); f.read( reinterpret_cast(tmp.memptr()), std::streamsize(n_elem) ); uword i = 0; //cout << "f_n_cols = " << f_n_cols << endl; //cout << "f_n_rows = " << f_n_rows << endl; for(uword row=0; row < f_n_rows; ++row) { for(uword col=0; col < f_n_cols; ++col) { x.at(row,col,0) = eT(tmp[i+0]); x.at(row,col,1) = eT(tmp[i+1]); x.at(row,col,2) = eT(tmp[i+2]); i+=3; } } } else { const uword n_elem = 3*f_n_cols*f_n_rows; podarray tmp(n_elem); f.read( reinterpret_cast(tmp.memptr()), std::streamsize(2*n_elem) ); uword i = 0; for(uword row=0; row < f_n_rows; ++row) { for(uword col=0; col < f_n_cols; ++col) { x.at(row,col,0) = eT(tmp[i+0]); x.at(row,col,1) = eT(tmp[i+1]); x.at(row,col,2) = eT(tmp[i+2]); i+=3; } } } } else { load_okay = false; err_msg = "currently no code available to handle loading "; } if(f.good() == false) { load_okay = false; } } else { load_okay = false; err_msg = "unsupported header in "; } return load_okay; } template inline bool diskio::save_ppm_binary(const Cube& x, const std::string& final_name) { arma_extra_debug_sigprint(); const std::string tmp_name = diskio::gen_tmp_name(final_name); std::ofstream f( tmp_name.c_str(), std::fstream::binary ); bool save_okay = f.is_open(); if(save_okay == true) { save_okay = diskio::save_ppm_binary(x, f); f.flush(); f.close(); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } } return save_okay; } template inline bool diskio::save_ppm_binary(const Cube& x, std::ostream& f) { arma_extra_debug_sigprint(); arma_debug_check( (x.n_slices != 3), "diskio::save_ppm_binary(): given cube must have exactly 3 slices" ); const uword n_elem = 3 * x.n_rows * x.n_cols; podarray tmp(n_elem); uword i = 0; for(uword row=0; row < x.n_rows; ++row) { for(uword col=0; col < x.n_cols; ++col) { tmp[i+0] = u8( access::tmp_real( x.at(row,col,0) ) ); tmp[i+1] = u8( access::tmp_real( x.at(row,col,1) ) ); tmp[i+2] = u8( access::tmp_real( x.at(row,col,2) ) ); i+=3; } } f << "P6" << '\n'; f << x.n_cols << '\n'; f << x.n_rows << '\n'; f << 255 << '\n'; f.write( reinterpret_cast(tmp.mem), std::streamsize(n_elem) ); return f.good(); } // // handling of PPM images by fields template inline bool diskio::load_ppm_binary(field& x, const std::string& name, std::string& err_msg) { arma_extra_debug_sigprint(); std::fstream f; f.open(name.c_str(), std::fstream::in | std::fstream::binary); bool load_okay = f.is_open(); if(load_okay == true) { load_okay = diskio::load_ppm_binary(x, f, err_msg); f.close(); } return load_okay; } template inline bool diskio::load_ppm_binary(field& x, std::istream& f, std::string& err_msg) { arma_extra_debug_sigprint(); arma_type_check(( is_Mat::value == false )); typedef typename T1::elem_type eT; bool load_okay = true; std::string f_header; f >> f_header; if(f_header == "P6") { uword f_n_rows = 0; uword f_n_cols = 0; int f_maxval = 0; diskio::pnm_skip_comments(f); f >> f_n_cols; diskio::pnm_skip_comments(f); f >> f_n_rows; diskio::pnm_skip_comments(f); f >> f_maxval; f.get(); if( (f_maxval > 0) || (f_maxval <= 65535) ) { x.set_size(3); Mat& R = x(0); Mat& G = x(1); Mat& B = x(2); R.set_size(f_n_rows,f_n_cols); G.set_size(f_n_rows,f_n_cols); B.set_size(f_n_rows,f_n_cols); if(f_maxval <= 255) { const uword n_elem = 3*f_n_cols*f_n_rows; podarray tmp(n_elem); f.read( reinterpret_cast(tmp.memptr()), std::streamsize(n_elem) ); uword i = 0; //cout << "f_n_cols = " << f_n_cols << endl; //cout << "f_n_rows = " << f_n_rows << endl; for(uword row=0; row < f_n_rows; ++row) { for(uword col=0; col < f_n_cols; ++col) { R.at(row,col) = eT(tmp[i+0]); G.at(row,col) = eT(tmp[i+1]); B.at(row,col) = eT(tmp[i+2]); i+=3; } } } else { const uword n_elem = 3*f_n_cols*f_n_rows; podarray tmp(n_elem); f.read( reinterpret_cast(tmp.memptr()), std::streamsize(2*n_elem) ); uword i = 0; for(uword row=0; row < f_n_rows; ++row) { for(uword col=0; col < f_n_cols; ++col) { R.at(row,col) = eT(tmp[i+0]); G.at(row,col) = eT(tmp[i+1]); B.at(row,col) = eT(tmp[i+2]); i+=3; } } } } else { load_okay = false; err_msg = "currently no code available to handle loading "; } if(f.good() == false) { load_okay = false; } } else { load_okay = false; err_msg = "unsupported header in "; } return load_okay; } template inline bool diskio::save_ppm_binary(const field& x, const std::string& final_name) { arma_extra_debug_sigprint(); const std::string tmp_name = diskio::gen_tmp_name(final_name); std::ofstream f( tmp_name.c_str(), std::fstream::binary ); bool save_okay = f.is_open(); if(save_okay == true) { save_okay = diskio::save_ppm_binary(x, f); f.flush(); f.close(); if(save_okay == true) { save_okay = diskio::safe_rename(tmp_name, final_name); } } return save_okay; } template inline bool diskio::save_ppm_binary(const field& x, std::ostream& f) { arma_extra_debug_sigprint(); arma_type_check(( is_Mat::value == false )); typedef typename T1::elem_type eT; arma_debug_check( (x.n_elem != 3), "diskio::save_ppm_binary(): given field must have exactly 3 matrices of equal size" ); bool same_size = true; for(uword i=1; i<3; ++i) { if( (x(0).n_rows != x(i).n_rows) || (x(0).n_cols != x(i).n_cols) ) { same_size = false; break; } } arma_debug_check( (same_size != true), "diskio::save_ppm_binary(): given field must have exactly 3 matrices of equal size" ); const Mat& R = x(0); const Mat& G = x(1); const Mat& B = x(2); f << "P6" << '\n'; f << R.n_cols << '\n'; f << R.n_rows << '\n'; f << 255 << '\n'; const uword n_elem = 3 * R.n_rows * R.n_cols; podarray tmp(n_elem); uword i = 0; for(uword row=0; row < R.n_rows; ++row) { for(uword col=0; col < R.n_cols; ++col) { tmp[i+0] = u8( access::tmp_real( R.at(row,col) ) ); tmp[i+1] = u8( access::tmp_real( G.at(row,col) ) ); tmp[i+2] = u8( access::tmp_real( B.at(row,col) ) ); i+=3; } } f.write( reinterpret_cast(tmp.mem), std::streamsize(n_elem) ); return f.good(); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/distr_param.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup distr_param //! @{ class distr_param { public: uword state; union { int a_int; double a_double; }; union { int b_int; double b_double; }; inline distr_param() : state(0) { } inline explicit distr_param(const int a, const int b) : state(1) , a_int(a) , b_int(b) { } inline explicit distr_param(const double a, const double b) : state(2) , a_double(a) , b_double(b) { } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/eGlueCube_bones.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup eGlueCube //! @{ template class eGlueCube : public BaseCube > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; static const bool prefer_at_accessor = (ProxyCube::prefer_at_accessor || ProxyCube::prefer_at_accessor); static const bool has_subview = (ProxyCube::has_subview || ProxyCube::has_subview ); arma_aligned const ProxyCube P1; arma_aligned const ProxyCube P2; arma_inline ~eGlueCube(); arma_inline eGlueCube(const T1& in_A, const T2& in_B); arma_inline uword get_n_rows() const; arma_inline uword get_n_cols() const; arma_inline uword get_n_elem_slice() const; arma_inline uword get_n_slices() const; arma_inline uword get_n_elem() const; arma_inline elem_type operator[] (const uword i) const; arma_inline elem_type at (const uword row, const uword col, const uword slice) const; arma_inline elem_type at_alt (const uword i) const; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/eGlueCube_meat.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup eGlueCube //! @{ template arma_inline eGlueCube::~eGlueCube() { arma_extra_debug_sigprint(); } template arma_inline eGlueCube::eGlueCube(const T1& in_A, const T2& in_B) : P1(in_A) , P2(in_B) { arma_extra_debug_sigprint(); arma_debug_assert_same_size ( P1.get_n_rows(), P1.get_n_cols(), P1.get_n_slices(), P2.get_n_rows(), P2.get_n_cols(), P2.get_n_slices(), eglue_type::text() ); } template arma_inline uword eGlueCube::get_n_rows() const { return P1.get_n_rows(); } template arma_inline uword eGlueCube::get_n_cols() const { return P1.get_n_cols(); } template arma_inline uword eGlueCube::get_n_slices() const { return P1.get_n_slices(); } template arma_inline uword eGlueCube::get_n_elem_slice() const { return P1.get_n_elem_slice(); } template arma_inline uword eGlueCube::get_n_elem() const { return P1.get_n_elem(); } template arma_inline typename T1::elem_type eGlueCube::operator[] (const uword i) const { // the optimiser will keep only one return statement typedef typename T1::elem_type eT; if(is_same_type::yes) { return P1[i] + P2[i]; } else if(is_same_type::yes) { return P1[i] - P2[i]; } else if(is_same_type::yes) { return P1[i] / P2[i]; } else if(is_same_type::yes) { return P1[i] * P2[i]; } else return eT(0); } template arma_inline typename T1::elem_type eGlueCube::at(const uword row, const uword col, const uword slice) const { // the optimiser will keep only one return statement typedef typename T1::elem_type eT; if(is_same_type::yes) { return P1.at(row,col,slice) + P2.at(row,col,slice); } else if(is_same_type::yes) { return P1.at(row,col,slice) - P2.at(row,col,slice); } else if(is_same_type::yes) { return P1.at(row,col,slice) / P2.at(row,col,slice); } else if(is_same_type::yes) { return P1.at(row,col,slice) * P2.at(row,col,slice); } else return eT(0); } template arma_inline typename T1::elem_type eGlueCube::at_alt(const uword i) const { // the optimiser will keep only one return statement typedef typename T1::elem_type eT; if(is_same_type::yes) { return P1.at_alt(i) + P2.at_alt(i); } else if(is_same_type::yes) { return P1.at_alt(i) - P2.at_alt(i); } else if(is_same_type::yes) { return P1.at_alt(i) / P2.at_alt(i); } else if(is_same_type::yes) { return P1.at_alt(i) * P2.at_alt(i); } else return eT(0); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/eGlue_bones.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup eGlue //! @{ template class eGlue : public Base > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef Proxy proxy1_type; typedef Proxy proxy2_type; static const bool prefer_at_accessor = (Proxy::prefer_at_accessor || Proxy::prefer_at_accessor); static const bool has_subview = (Proxy::has_subview || Proxy::has_subview ); static const bool fake_mat = (Proxy::fake_mat || Proxy::fake_mat ); static const bool is_col = (Proxy::is_col || Proxy::is_col); static const bool is_row = (Proxy::is_row || Proxy::is_row); arma_aligned const Proxy P1; arma_aligned const Proxy P2; arma_inline ~eGlue(); arma_inline eGlue(const T1& in_A, const T2& in_B); arma_inline uword get_n_rows() const; arma_inline uword get_n_cols() const; arma_inline uword get_n_elem() const; arma_inline elem_type operator[] (const uword ii) const; arma_inline elem_type at (const uword row, const uword col) const; arma_inline elem_type at_alt (const uword ii) const; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/eGlue_meat.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup eGlue //! @{ template arma_inline eGlue::~eGlue() { arma_extra_debug_sigprint(); } template arma_inline eGlue::eGlue(const T1& in_A, const T2& in_B) : P1(in_A) , P2(in_B) { arma_extra_debug_sigprint(); // arma_debug_assert_same_size( P1, P2, eglue_type::text() ); arma_debug_assert_same_size ( P1.get_n_rows(), P1.get_n_cols(), P2.get_n_rows(), P2.get_n_cols(), eglue_type::text() ); } template arma_inline uword eGlue::get_n_rows() const { return is_row ? 1 : P1.get_n_rows(); } template arma_inline uword eGlue::get_n_cols() const { return is_col ? 1 : P1.get_n_cols(); } template arma_inline uword eGlue::get_n_elem() const { return P1.get_n_elem(); } template arma_inline typename T1::elem_type eGlue::operator[] (const uword ii) const { // the optimiser will keep only one return statement typedef typename T1::elem_type eT; if(is_same_type::yes) { return P1[ii] + P2[ii]; } else if(is_same_type::yes) { return P1[ii] - P2[ii]; } else if(is_same_type::yes) { return P1[ii] / P2[ii]; } else if(is_same_type::yes) { return P1[ii] * P2[ii]; } else return eT(0); } template arma_inline typename T1::elem_type eGlue::at(const uword row, const uword col) const { // the optimiser will keep only one return statement typedef typename T1::elem_type eT; if(is_same_type::yes) { return P1.at(row,col) + P2.at(row,col); } else if(is_same_type::yes) { return P1.at(row,col) - P2.at(row,col); } else if(is_same_type::yes) { return P1.at(row,col) / P2.at(row,col); } else if(is_same_type::yes) { return P1.at(row,col) * P2.at(row,col); } else return eT(0); } template arma_inline typename T1::elem_type eGlue::at_alt(const uword ii) const { // the optimiser will keep only one return statement typedef typename T1::elem_type eT; if(is_same_type::yes) { return P1.at_alt(ii) + P2.at_alt(ii); } else if(is_same_type::yes) { return P1.at_alt(ii) - P2.at_alt(ii); } else if(is_same_type::yes) { return P1.at_alt(ii) / P2.at_alt(ii); } else if(is_same_type::yes) { return P1.at_alt(ii) * P2.at_alt(ii); } else return eT(0); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/eOpCube_bones.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup eOpCube //! @{ template class eOpCube : public BaseCube > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; static const bool prefer_at_accessor = ProxyCube::prefer_at_accessor; static const bool has_subview = ProxyCube::has_subview; arma_aligned const ProxyCube P; arma_aligned elem_type aux; //!< storage of auxiliary data, user defined format arma_aligned uword aux_uword_a; //!< storage of auxiliary data, uword format arma_aligned uword aux_uword_b; //!< storage of auxiliary data, uword format arma_aligned uword aux_uword_c; //!< storage of auxiliary data, uword format inline ~eOpCube(); inline explicit eOpCube(const BaseCube& in_m); inline eOpCube(const BaseCube& in_m, const elem_type in_aux); inline eOpCube(const BaseCube& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b); inline eOpCube(const BaseCube& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c); inline eOpCube(const BaseCube& in_m, const elem_type in_aux, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c); arma_inline uword get_n_rows() const; arma_inline uword get_n_cols() const; arma_inline uword get_n_elem_slice() const; arma_inline uword get_n_slices() const; arma_inline uword get_n_elem() const; arma_inline elem_type operator[] (const uword i) const; arma_inline elem_type at (const uword row, const uword col, const uword slice) const; arma_inline elem_type at_alt (const uword i) const; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/eOpCube_meat.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup eOpCube //! @{ template eOpCube::eOpCube(const BaseCube& in_m) : P (in_m.get_ref()) { arma_extra_debug_sigprint(); } template eOpCube::eOpCube(const BaseCube& in_m, const typename T1::elem_type in_aux) : P (in_m.get_ref()) , aux (in_aux) { arma_extra_debug_sigprint(); } template eOpCube::eOpCube(const BaseCube& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b) : P (in_m.get_ref()) , aux_uword_a (in_aux_uword_a) , aux_uword_b (in_aux_uword_b) { arma_extra_debug_sigprint(); } template eOpCube::eOpCube(const BaseCube& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c) : P (in_m.get_ref()) , aux_uword_a (in_aux_uword_a) , aux_uword_b (in_aux_uword_b) , aux_uword_c (in_aux_uword_c) { arma_extra_debug_sigprint(); } template eOpCube::eOpCube(const BaseCube& in_m, const typename T1::elem_type in_aux, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c) : P (in_m.get_ref()) , aux (in_aux) , aux_uword_a (in_aux_uword_a) , aux_uword_b (in_aux_uword_b) , aux_uword_c (in_aux_uword_c) { arma_extra_debug_sigprint(); } template eOpCube::~eOpCube() { arma_extra_debug_sigprint(); } template arma_inline uword eOpCube::get_n_rows() const { return P.get_n_rows(); } template arma_inline uword eOpCube::get_n_cols() const { return P.get_n_cols(); } template arma_inline uword eOpCube::get_n_elem_slice() const { return P.get_n_elem_slice(); } template arma_inline uword eOpCube::get_n_slices() const { return P.get_n_slices(); } template arma_inline uword eOpCube::get_n_elem() const { return P.get_n_elem(); } template arma_inline typename T1::elem_type eOpCube::operator[] (const uword i) const { return eop_core::process(P[i], aux); } template arma_inline typename T1::elem_type eOpCube::at(const uword row, const uword col, const uword slice) const { return eop_core::process(P.at(row, col, slice), aux); } template arma_inline typename T1::elem_type eOpCube::at_alt(const uword i) const { return eop_core::process(P.at_alt(i), aux); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/eOp_bones.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup eOp //! @{ template class eOp : public Base > { public: typedef typename T1::elem_type elem_type; typedef typename get_pod_type::result pod_type; typedef Proxy proxy_type; static const bool prefer_at_accessor = Proxy::prefer_at_accessor; static const bool has_subview = Proxy::has_subview; static const bool fake_mat = Proxy::fake_mat; static const bool is_row = Proxy::is_row; static const bool is_col = Proxy::is_col; arma_aligned const Proxy P; arma_aligned elem_type aux; //!< storage of auxiliary data, user defined format arma_aligned uword aux_uword_a; //!< storage of auxiliary data, uword format arma_aligned uword aux_uword_b; //!< storage of auxiliary data, uword format inline ~eOp(); inline explicit eOp(const T1& in_m); inline eOp(const T1& in_m, const elem_type in_aux); inline eOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b); inline eOp(const T1& in_m, const elem_type in_aux, const uword in_aux_uword_a, const uword in_aux_uword_b); arma_inline uword get_n_rows() const; arma_inline uword get_n_cols() const; arma_inline uword get_n_elem() const; arma_inline elem_type operator[] (const uword ii) const; arma_inline elem_type at (const uword row, const uword col) const; arma_inline elem_type at_alt (const uword ii) const; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/eOp_meat.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup eOp //! @{ template eOp::eOp(const T1& in_m) : P(in_m) { arma_extra_debug_sigprint(); } template eOp::eOp(const T1& in_m, const typename T1::elem_type in_aux) : P(in_m) , aux(in_aux) { arma_extra_debug_sigprint(); } template eOp::eOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b) : P(in_m) , aux_uword_a(in_aux_uword_a) , aux_uword_b(in_aux_uword_b) { arma_extra_debug_sigprint(); } template eOp::eOp(const T1& in_m, const typename T1::elem_type in_aux, const uword in_aux_uword_a, const uword in_aux_uword_b) : P(in_m) , aux(in_aux) , aux_uword_a(in_aux_uword_a) , aux_uword_b(in_aux_uword_b) { arma_extra_debug_sigprint(); } template eOp::~eOp() { arma_extra_debug_sigprint(); } template arma_inline uword eOp::get_n_rows() const { return is_row ? 1 : P.get_n_rows(); } template arma_inline uword eOp::get_n_cols() const { return is_col ? 1 : P.get_n_cols(); } template arma_inline uword eOp::get_n_elem() const { return P.get_n_elem(); } template arma_inline typename T1::elem_type eOp::operator[] (const uword ii) const { return eop_core::process(P[ii], aux); } template arma_inline typename T1::elem_type eOp::at(const uword row, const uword col) const { if(is_row) { return eop_core::process(P.at(0, col), aux); } else if(is_col) { return eop_core::process(P.at(row, 0), aux); } else { return eop_core::process(P.at(row, col), aux); } } template arma_inline typename T1::elem_type eOp::at_alt(const uword ii) const { return eop_core::process(P.at_alt(ii), aux); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/eglue_core_bones.hpp ================================================ // Copyright (C) 2010-2015 Conrad Sanderson // Copyright (C) 2010-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup eglue_core //! @{ template struct eglue_core { // matrices template arma_hot inline static void apply(outT& out, const eGlue& x); template arma_hot inline static void apply_inplace_plus (Mat& out, const eGlue& x); template arma_hot inline static void apply_inplace_minus(Mat& out, const eGlue& x); template arma_hot inline static void apply_inplace_schur(Mat& out, const eGlue& x); template arma_hot inline static void apply_inplace_div (Mat& out, const eGlue& x); // cubes template arma_hot inline static void apply(Cube& out, const eGlueCube& x); template arma_hot inline static void apply_inplace_plus (Cube& out, const eGlueCube& x); template arma_hot inline static void apply_inplace_minus(Cube& out, const eGlueCube& x); template arma_hot inline static void apply_inplace_schur(Cube& out, const eGlueCube& x); template arma_hot inline static void apply_inplace_div (Cube& out, const eGlueCube& x); }; class eglue_plus : public eglue_core { public: inline static const char* text() { return "addition"; } }; class eglue_minus : public eglue_core { public: inline static const char* text() { return "subtraction"; } }; class eglue_div : public eglue_core { public: inline static const char* text() { return "element-wise division"; } }; class eglue_schur : public eglue_core { public: inline static const char* text() { return "element-wise multiplication"; } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/eglue_core_meat.hpp ================================================ // Copyright (C) 2010-2015 Conrad Sanderson // Copyright (C) 2010-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup eglue_core //! @{ #undef arma_applier_1u #undef arma_applier_1a #undef arma_applier_2 #undef arma_applier_3 #undef operatorA #undef operatorB #if defined(ARMA_SIMPLE_LOOPS) #define arma_applier_1u(operatorA, operatorB) \ {\ for(uword i=0; i template arma_hot inline void eglue_core::apply(outT& out, const eGlue& x) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const bool prefer_at_accessor = (Proxy::prefer_at_accessor || Proxy::prefer_at_accessor); // NOTE: we're assuming that the matrix has already been set to the correct size and there is no aliasing; // size setting and alias checking is done by either the Mat contructor or operator=() eT* out_mem = out.memptr(); if(prefer_at_accessor == false) { const uword n_elem = x.get_n_elem(); if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P1.is_aligned() && x.P2.is_aligned()) { typename Proxy::aligned_ea_type P1 = x.P1.get_aligned_ea(); typename Proxy::aligned_ea_type P2 = x.P2.get_aligned_ea(); if(is_same_type::yes) { arma_applier_1a(=, +); } else if(is_same_type::yes) { arma_applier_1a(=, -); } else if(is_same_type::yes) { arma_applier_1a(=, /); } else if(is_same_type::yes) { arma_applier_1a(=, *); } } else { typename Proxy::ea_type P1 = x.P1.get_ea(); typename Proxy::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(=, +); } else if(is_same_type::yes) { arma_applier_1u(=, -); } else if(is_same_type::yes) { arma_applier_1u(=, /); } else if(is_same_type::yes) { arma_applier_1u(=, *); } } } else { typename Proxy::ea_type P1 = x.P1.get_ea(); typename Proxy::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(=, +); } else if(is_same_type::yes) { arma_applier_1u(=, -); } else if(is_same_type::yes) { arma_applier_1u(=, /); } else if(is_same_type::yes) { arma_applier_1u(=, *); } } } else { const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); const Proxy& P1 = x.P1; const Proxy& P2 = x.P2; if(is_same_type::yes) { arma_applier_2(=, +); } else if(is_same_type::yes) { arma_applier_2(=, -); } else if(is_same_type::yes) { arma_applier_2(=, /); } else if(is_same_type::yes) { arma_applier_2(=, *); } } } template template arma_hot inline void eglue_core::apply_inplace_plus(Mat& out, const eGlue& x) { arma_extra_debug_sigprint(); const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "addition"); typedef typename T1::elem_type eT; eT* out_mem = out.memptr(); const bool prefer_at_accessor = (Proxy::prefer_at_accessor || Proxy::prefer_at_accessor); if(prefer_at_accessor == false) { const uword n_elem = x.get_n_elem(); if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P1.is_aligned() && x.P2.is_aligned()) { typename Proxy::aligned_ea_type P1 = x.P1.get_aligned_ea(); typename Proxy::aligned_ea_type P2 = x.P2.get_aligned_ea(); if(is_same_type::yes) { arma_applier_1a(+=, +); } else if(is_same_type::yes) { arma_applier_1a(+=, -); } else if(is_same_type::yes) { arma_applier_1a(+=, /); } else if(is_same_type::yes) { arma_applier_1a(+=, *); } } else { typename Proxy::ea_type P1 = x.P1.get_ea(); typename Proxy::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(+=, +); } else if(is_same_type::yes) { arma_applier_1u(+=, -); } else if(is_same_type::yes) { arma_applier_1u(+=, /); } else if(is_same_type::yes) { arma_applier_1u(+=, *); } } } else { typename Proxy::ea_type P1 = x.P1.get_ea(); typename Proxy::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(+=, +); } else if(is_same_type::yes) { arma_applier_1u(+=, -); } else if(is_same_type::yes) { arma_applier_1u(+=, /); } else if(is_same_type::yes) { arma_applier_1u(+=, *); } } } else { const Proxy& P1 = x.P1; const Proxy& P2 = x.P2; if(is_same_type::yes) { arma_applier_2(+=, +); } else if(is_same_type::yes) { arma_applier_2(+=, -); } else if(is_same_type::yes) { arma_applier_2(+=, /); } else if(is_same_type::yes) { arma_applier_2(+=, *); } } } template template arma_hot inline void eglue_core::apply_inplace_minus(Mat& out, const eGlue& x) { arma_extra_debug_sigprint(); const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "subtraction"); typedef typename T1::elem_type eT; eT* out_mem = out.memptr(); const bool prefer_at_accessor = (Proxy::prefer_at_accessor || Proxy::prefer_at_accessor); if(prefer_at_accessor == false) { const uword n_elem = x.get_n_elem(); if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P1.is_aligned() && x.P2.is_aligned()) { typename Proxy::aligned_ea_type P1 = x.P1.get_aligned_ea(); typename Proxy::aligned_ea_type P2 = x.P2.get_aligned_ea(); if(is_same_type::yes) { arma_applier_1a(-=, +); } else if(is_same_type::yes) { arma_applier_1a(-=, -); } else if(is_same_type::yes) { arma_applier_1a(-=, /); } else if(is_same_type::yes) { arma_applier_1a(-=, *); } } else { typename Proxy::ea_type P1 = x.P1.get_ea(); typename Proxy::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(-=, +); } else if(is_same_type::yes) { arma_applier_1u(-=, -); } else if(is_same_type::yes) { arma_applier_1u(-=, /); } else if(is_same_type::yes) { arma_applier_1u(-=, *); } } } else { typename Proxy::ea_type P1 = x.P1.get_ea(); typename Proxy::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(-=, +); } else if(is_same_type::yes) { arma_applier_1u(-=, -); } else if(is_same_type::yes) { arma_applier_1u(-=, /); } else if(is_same_type::yes) { arma_applier_1u(-=, *); } } } else { const Proxy& P1 = x.P1; const Proxy& P2 = x.P2; if(is_same_type::yes) { arma_applier_2(-=, +); } else if(is_same_type::yes) { arma_applier_2(-=, -); } else if(is_same_type::yes) { arma_applier_2(-=, /); } else if(is_same_type::yes) { arma_applier_2(-=, *); } } } template template arma_hot inline void eglue_core::apply_inplace_schur(Mat& out, const eGlue& x) { arma_extra_debug_sigprint(); const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "element-wise multiplication"); typedef typename T1::elem_type eT; eT* out_mem = out.memptr(); const bool prefer_at_accessor = (Proxy::prefer_at_accessor || Proxy::prefer_at_accessor); if(prefer_at_accessor == false) { const uword n_elem = x.get_n_elem(); if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P1.is_aligned() && x.P2.is_aligned()) { typename Proxy::aligned_ea_type P1 = x.P1.get_aligned_ea(); typename Proxy::aligned_ea_type P2 = x.P2.get_aligned_ea(); if(is_same_type::yes) { arma_applier_1a(*=, +); } else if(is_same_type::yes) { arma_applier_1a(*=, -); } else if(is_same_type::yes) { arma_applier_1a(*=, /); } else if(is_same_type::yes) { arma_applier_1a(*=, *); } } else { typename Proxy::ea_type P1 = x.P1.get_ea(); typename Proxy::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(*=, +); } else if(is_same_type::yes) { arma_applier_1u(*=, -); } else if(is_same_type::yes) { arma_applier_1u(*=, /); } else if(is_same_type::yes) { arma_applier_1u(*=, *); } } } else { typename Proxy::ea_type P1 = x.P1.get_ea(); typename Proxy::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(*=, +); } else if(is_same_type::yes) { arma_applier_1u(*=, -); } else if(is_same_type::yes) { arma_applier_1u(*=, /); } else if(is_same_type::yes) { arma_applier_1u(*=, *); } } } else { const Proxy& P1 = x.P1; const Proxy& P2 = x.P2; if(is_same_type::yes) { arma_applier_2(*=, +); } else if(is_same_type::yes) { arma_applier_2(*=, -); } else if(is_same_type::yes) { arma_applier_2(*=, /); } else if(is_same_type::yes) { arma_applier_2(*=, *); } } } template template arma_hot inline void eglue_core::apply_inplace_div(Mat& out, const eGlue& x) { arma_extra_debug_sigprint(); const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "element-wise division"); typedef typename T1::elem_type eT; eT* out_mem = out.memptr(); const bool prefer_at_accessor = (Proxy::prefer_at_accessor || Proxy::prefer_at_accessor); if(prefer_at_accessor == false) { const uword n_elem = x.get_n_elem(); if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P1.is_aligned() && x.P2.is_aligned()) { typename Proxy::aligned_ea_type P1 = x.P1.get_aligned_ea(); typename Proxy::aligned_ea_type P2 = x.P2.get_aligned_ea(); if(is_same_type::yes) { arma_applier_1a(/=, +); } else if(is_same_type::yes) { arma_applier_1a(/=, -); } else if(is_same_type::yes) { arma_applier_1a(/=, /); } else if(is_same_type::yes) { arma_applier_1a(/=, *); } } else { typename Proxy::ea_type P1 = x.P1.get_ea(); typename Proxy::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(/=, +); } else if(is_same_type::yes) { arma_applier_1u(/=, -); } else if(is_same_type::yes) { arma_applier_1u(/=, /); } else if(is_same_type::yes) { arma_applier_1u(/=, *); } } } else { typename Proxy::ea_type P1 = x.P1.get_ea(); typename Proxy::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(/=, +); } else if(is_same_type::yes) { arma_applier_1u(/=, -); } else if(is_same_type::yes) { arma_applier_1u(/=, /); } else if(is_same_type::yes) { arma_applier_1u(/=, *); } } } else { const Proxy& P1 = x.P1; const Proxy& P2 = x.P2; if(is_same_type::yes) { arma_applier_2(/=, +); } else if(is_same_type::yes) { arma_applier_2(/=, -); } else if(is_same_type::yes) { arma_applier_2(/=, /); } else if(is_same_type::yes) { arma_applier_2(/=, *); } } } // // cubes template template arma_hot inline void eglue_core::apply(Cube& out, const eGlueCube& x) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const bool prefer_at_accessor = (ProxyCube::prefer_at_accessor || ProxyCube::prefer_at_accessor); // NOTE: we're assuming that the cube has already been set to the correct size and there is no aliasing; // size setting and alias checking is done by either the Cube contructor or operator=() eT* out_mem = out.memptr(); if(prefer_at_accessor == false) { const uword n_elem = out.n_elem; if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P1.is_aligned() && x.P2.is_aligned()) { typename ProxyCube::aligned_ea_type P1 = x.P1.get_aligned_ea(); typename ProxyCube::aligned_ea_type P2 = x.P2.get_aligned_ea(); if(is_same_type::yes) { arma_applier_1a(=, +); } else if(is_same_type::yes) { arma_applier_1a(=, -); } else if(is_same_type::yes) { arma_applier_1a(=, /); } else if(is_same_type::yes) { arma_applier_1a(=, *); } } else { typename ProxyCube::ea_type P1 = x.P1.get_ea(); typename ProxyCube::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(=, +); } else if(is_same_type::yes) { arma_applier_1u(=, -); } else if(is_same_type::yes) { arma_applier_1u(=, /); } else if(is_same_type::yes) { arma_applier_1u(=, *); } } } else { typename ProxyCube::ea_type P1 = x.P1.get_ea(); typename ProxyCube::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(=, +); } else if(is_same_type::yes) { arma_applier_1u(=, -); } else if(is_same_type::yes) { arma_applier_1u(=, /); } else if(is_same_type::yes) { arma_applier_1u(=, *); } } } else { const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); const uword n_slices = x.get_n_slices(); const ProxyCube& P1 = x.P1; const ProxyCube& P2 = x.P2; if(is_same_type::yes) { arma_applier_3(=, +); } else if(is_same_type::yes) { arma_applier_3(=, -); } else if(is_same_type::yes) { arma_applier_3(=, /); } else if(is_same_type::yes) { arma_applier_3(=, *); } } } template template arma_hot inline void eglue_core::apply_inplace_plus(Cube& out, const eGlueCube& x) { arma_extra_debug_sigprint(); const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); const uword n_slices = x.get_n_slices(); arma_debug_assert_same_size(out.n_rows, out.n_cols, out.n_slices, n_rows, n_cols, n_slices, "addition"); typedef typename T1::elem_type eT; eT* out_mem = out.memptr(); const bool prefer_at_accessor = (ProxyCube::prefer_at_accessor || ProxyCube::prefer_at_accessor); if(prefer_at_accessor == false) { const uword n_elem = out.n_elem; if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P1.is_aligned() && x.P2.is_aligned()) { typename ProxyCube::aligned_ea_type P1 = x.P1.get_aligned_ea(); typename ProxyCube::aligned_ea_type P2 = x.P2.get_aligned_ea(); if(is_same_type::yes) { arma_applier_1a(+=, +); } else if(is_same_type::yes) { arma_applier_1a(+=, -); } else if(is_same_type::yes) { arma_applier_1a(+=, /); } else if(is_same_type::yes) { arma_applier_1a(+=, *); } } else { typename ProxyCube::ea_type P1 = x.P1.get_ea(); typename ProxyCube::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(+=, +); } else if(is_same_type::yes) { arma_applier_1u(+=, -); } else if(is_same_type::yes) { arma_applier_1u(+=, /); } else if(is_same_type::yes) { arma_applier_1u(+=, *); } } } else { typename ProxyCube::ea_type P1 = x.P1.get_ea(); typename ProxyCube::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(+=, +); } else if(is_same_type::yes) { arma_applier_1u(+=, -); } else if(is_same_type::yes) { arma_applier_1u(+=, /); } else if(is_same_type::yes) { arma_applier_1u(+=, *); } } } else { const ProxyCube& P1 = x.P1; const ProxyCube& P2 = x.P2; if(is_same_type::yes) { arma_applier_3(+=, +); } else if(is_same_type::yes) { arma_applier_3(+=, -); } else if(is_same_type::yes) { arma_applier_3(+=, /); } else if(is_same_type::yes) { arma_applier_3(+=, *); } } } template template arma_hot inline void eglue_core::apply_inplace_minus(Cube& out, const eGlueCube& x) { arma_extra_debug_sigprint(); const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); const uword n_slices = x.get_n_slices(); arma_debug_assert_same_size(out.n_rows, out.n_cols, out.n_slices, n_rows, n_cols, n_slices, "subtraction"); typedef typename T1::elem_type eT; eT* out_mem = out.memptr(); const bool prefer_at_accessor = (ProxyCube::prefer_at_accessor || ProxyCube::prefer_at_accessor); if(prefer_at_accessor == false) { const uword n_elem = out.n_elem; if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P1.is_aligned() && x.P2.is_aligned()) { typename ProxyCube::aligned_ea_type P1 = x.P1.get_aligned_ea(); typename ProxyCube::aligned_ea_type P2 = x.P2.get_aligned_ea(); if(is_same_type::yes) { arma_applier_1a(-=, +); } else if(is_same_type::yes) { arma_applier_1a(-=, -); } else if(is_same_type::yes) { arma_applier_1a(-=, /); } else if(is_same_type::yes) { arma_applier_1a(-=, *); } } else { typename ProxyCube::ea_type P1 = x.P1.get_ea(); typename ProxyCube::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(-=, +); } else if(is_same_type::yes) { arma_applier_1u(-=, -); } else if(is_same_type::yes) { arma_applier_1u(-=, /); } else if(is_same_type::yes) { arma_applier_1u(-=, *); } } } else { typename ProxyCube::ea_type P1 = x.P1.get_ea(); typename ProxyCube::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(-=, +); } else if(is_same_type::yes) { arma_applier_1u(-=, -); } else if(is_same_type::yes) { arma_applier_1u(-=, /); } else if(is_same_type::yes) { arma_applier_1u(-=, *); } } } else { const ProxyCube& P1 = x.P1; const ProxyCube& P2 = x.P2; if(is_same_type::yes) { arma_applier_3(-=, +); } else if(is_same_type::yes) { arma_applier_3(-=, -); } else if(is_same_type::yes) { arma_applier_3(-=, /); } else if(is_same_type::yes) { arma_applier_3(-=, *); } } } template template arma_hot inline void eglue_core::apply_inplace_schur(Cube& out, const eGlueCube& x) { arma_extra_debug_sigprint(); const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); const uword n_slices = x.get_n_slices(); arma_debug_assert_same_size(out.n_rows, out.n_cols, out.n_slices, n_rows, n_cols, n_slices, "element-wise multiplication"); typedef typename T1::elem_type eT; eT* out_mem = out.memptr(); const bool prefer_at_accessor = (ProxyCube::prefer_at_accessor || ProxyCube::prefer_at_accessor); if(prefer_at_accessor == false) { const uword n_elem = out.n_elem; if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P1.is_aligned() && x.P2.is_aligned()) { typename ProxyCube::aligned_ea_type P1 = x.P1.get_aligned_ea(); typename ProxyCube::aligned_ea_type P2 = x.P2.get_aligned_ea(); if(is_same_type::yes) { arma_applier_1a(*=, +); } else if(is_same_type::yes) { arma_applier_1a(*=, -); } else if(is_same_type::yes) { arma_applier_1a(*=, /); } else if(is_same_type::yes) { arma_applier_1a(*=, *); } } else { typename ProxyCube::ea_type P1 = x.P1.get_ea(); typename ProxyCube::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(*=, +); } else if(is_same_type::yes) { arma_applier_1u(*=, -); } else if(is_same_type::yes) { arma_applier_1u(*=, /); } else if(is_same_type::yes) { arma_applier_1u(*=, *); } } } else { typename ProxyCube::ea_type P1 = x.P1.get_ea(); typename ProxyCube::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(*=, +); } else if(is_same_type::yes) { arma_applier_1u(*=, -); } else if(is_same_type::yes) { arma_applier_1u(*=, /); } else if(is_same_type::yes) { arma_applier_1u(*=, *); } } } else { const ProxyCube& P1 = x.P1; const ProxyCube& P2 = x.P2; if(is_same_type::yes) { arma_applier_3(*=, +); } else if(is_same_type::yes) { arma_applier_3(*=, -); } else if(is_same_type::yes) { arma_applier_3(*=, /); } else if(is_same_type::yes) { arma_applier_3(*=, *); } } } template template arma_hot inline void eglue_core::apply_inplace_div(Cube& out, const eGlueCube& x) { arma_extra_debug_sigprint(); const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); const uword n_slices = x.get_n_slices(); arma_debug_assert_same_size(out.n_rows, out.n_cols, out.n_slices, n_rows, n_cols, n_slices, "element-wise division"); typedef typename T1::elem_type eT; eT* out_mem = out.memptr(); const bool prefer_at_accessor = (ProxyCube::prefer_at_accessor || ProxyCube::prefer_at_accessor); if(prefer_at_accessor == false) { const uword n_elem = out.n_elem; if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P1.is_aligned() && x.P2.is_aligned()) { typename ProxyCube::aligned_ea_type P1 = x.P1.get_aligned_ea(); typename ProxyCube::aligned_ea_type P2 = x.P2.get_aligned_ea(); if(is_same_type::yes) { arma_applier_1a(/=, +); } else if(is_same_type::yes) { arma_applier_1a(/=, -); } else if(is_same_type::yes) { arma_applier_1a(/=, /); } else if(is_same_type::yes) { arma_applier_1a(/=, *); } } else { typename ProxyCube::ea_type P1 = x.P1.get_ea(); typename ProxyCube::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(/=, +); } else if(is_same_type::yes) { arma_applier_1u(/=, -); } else if(is_same_type::yes) { arma_applier_1u(/=, /); } else if(is_same_type::yes) { arma_applier_1u(/=, *); } } } else { typename ProxyCube::ea_type P1 = x.P1.get_ea(); typename ProxyCube::ea_type P2 = x.P2.get_ea(); if(is_same_type::yes) { arma_applier_1u(/=, +); } else if(is_same_type::yes) { arma_applier_1u(/=, -); } else if(is_same_type::yes) { arma_applier_1u(/=, /); } else if(is_same_type::yes) { arma_applier_1u(/=, *); } } } else { const ProxyCube& P1 = x.P1; const ProxyCube& P2 = x.P2; if(is_same_type::yes) { arma_applier_3(/=, +); } else if(is_same_type::yes) { arma_applier_3(/=, -); } else if(is_same_type::yes) { arma_applier_3(/=, /); } else if(is_same_type::yes) { arma_applier_3(/=, *); } } } #undef arma_applier_1u #undef arma_applier_1a #undef arma_applier_2 #undef arma_applier_3 //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/eop_aux.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup eop_aux //! @{ //! use of the SFINAE approach to work around compiler limitations //! http://en.wikipedia.org/wiki/SFINAE class eop_aux { public: template arma_inline static typename arma_integral_only::result acos (const eT x) { return eT( std::acos(double(x)) ); } template arma_inline static typename arma_integral_only::result asin (const eT x) { return eT( std::asin(double(x)) ); } template arma_inline static typename arma_integral_only::result atan (const eT x) { return eT( std::atan(double(x)) ); } template arma_inline static typename arma_real_only::result acos (const eT x) { return std::acos(x); } template arma_inline static typename arma_real_only::result asin (const eT x) { return std::asin(x); } template arma_inline static typename arma_real_only::result atan (const eT x) { return std::atan(x); } template arma_inline static typename arma_cx_only::result acos (const eT x) { return arma_acos(x); } template arma_inline static typename arma_cx_only::result asin (const eT x) { return arma_asin(x); } template arma_inline static typename arma_cx_only::result atan (const eT x) { return arma_atan(x); } template arma_inline static typename arma_integral_only::result acosh (const eT x) { return eT( arma_acosh(double(x)) ); } template arma_inline static typename arma_integral_only::result asinh (const eT x) { return eT( arma_asinh(double(x)) ); } template arma_inline static typename arma_integral_only::result atanh (const eT x) { return eT( arma_atanh(double(x)) ); } template arma_inline static typename arma_real_or_cx_only::result acosh (const eT x) { return arma_acosh(x); } template arma_inline static typename arma_real_or_cx_only::result asinh (const eT x) { return arma_asinh(x); } template arma_inline static typename arma_real_or_cx_only::result atanh (const eT x) { return arma_atanh(x); } template arma_inline static typename arma_not_cx::result conj(const eT x) { return x; } template arma_inline static std::complex conj(const std::complex& x) { return std::conj(x); } template arma_inline static typename arma_integral_only::result sqrt (const eT x) { return eT( std::sqrt (double(x)) ); } template arma_inline static typename arma_integral_only::result log10 (const eT x) { return eT( std::log10(double(x)) ); } template arma_inline static typename arma_integral_only::result log (const eT x) { return eT( std::log (double(x)) ); } template arma_inline static typename arma_integral_only::result exp (const eT x) { return eT( std::exp (double(x)) ); } template arma_inline static typename arma_integral_only::result cos (const eT x) { return eT( std::cos (double(x)) ); } template arma_inline static typename arma_integral_only::result sin (const eT x) { return eT( std::sin (double(x)) ); } template arma_inline static typename arma_integral_only::result tan (const eT x) { return eT( std::tan (double(x)) ); } template arma_inline static typename arma_integral_only::result cosh (const eT x) { return eT( std::cosh (double(x)) ); } template arma_inline static typename arma_integral_only::result sinh (const eT x) { return eT( std::sinh (double(x)) ); } template arma_inline static typename arma_integral_only::result tanh (const eT x) { return eT( std::tanh (double(x)) ); } template arma_inline static typename arma_real_or_cx_only::result sqrt (const eT x) { return std::sqrt (x); } template arma_inline static typename arma_real_or_cx_only::result log10 (const eT x) { return std::log10(x); } template arma_inline static typename arma_real_or_cx_only::result log (const eT x) { return std::log (x); } template arma_inline static typename arma_real_or_cx_only::result exp (const eT x) { return std::exp (x); } template arma_inline static typename arma_real_or_cx_only::result cos (const eT x) { return std::cos (x); } template arma_inline static typename arma_real_or_cx_only::result sin (const eT x) { return std::sin (x); } template arma_inline static typename arma_real_or_cx_only::result tan (const eT x) { return std::tan (x); } template arma_inline static typename arma_real_or_cx_only::result cosh (const eT x) { return std::cosh (x); } template arma_inline static typename arma_real_or_cx_only::result sinh (const eT x) { return std::sinh (x); } template arma_inline static typename arma_real_or_cx_only::result tanh (const eT x) { return std::tanh (x); } template arma_inline static typename arma_unsigned_integral_only::result neg (const eT x) { return x; } template arma_inline static typename arma_signed_only::result neg (const eT x) { return -x; } template arma_inline static typename arma_integral_only::result floor (const eT x) { return x; } template arma_inline static typename arma_real_only::result floor (const eT x) { return std::floor(x); } template arma_inline static typename arma_cx_only::result floor (const eT& x) { return eT( std::floor(x.real()), std::floor(x.imag()) ); } template arma_inline static typename arma_integral_only::result ceil (const eT x) { return x; } template arma_inline static typename arma_real_only::result ceil (const eT x) { return std::ceil(x); } template arma_inline static typename arma_cx_only::result ceil (const eT& x) { return eT( std::ceil(x.real()), std::ceil(x.imag()) ); } #if defined(ARMA_USE_CXX11) template arma_inline static typename arma_integral_only::result round (const eT x) { return x; } template arma_inline static typename arma_real_only::result round (const eT x) { return std::round(x); } template arma_inline static typename arma_cx_only::result round (const eT& x) { return eT( std::round(x.real()), std::round(x.imag()) ); } #else template arma_inline static typename arma_integral_only::result round (const eT x) { return x; } template arma_inline static typename arma_real_only::result round (const eT x) { return (x >= eT(0)) ? std::floor(x+0.5) : std::ceil(x-0.5); } template arma_inline static typename arma_cx_only::result round (const eT& x) { return eT( eop_aux::round(x.real()), eop_aux::round(x.imag()) ); } #endif #if defined(ARMA_USE_CXX11) template arma_inline static typename arma_integral_only::result log2 (const eT x) { return eT( std::log(double(x))/ double(0.69314718055994530942) ); } template arma_inline static typename arma_real_only::result log2 (const eT x) { return std::log2(x); } template arma_inline static typename arma_cx_only::result log2 (const eT& x) { typedef typename get_pod_type::result T; return std::log(x) / T(0.69314718055994530942); } #else template arma_inline static typename arma_integral_only::result log2 (const eT x) { return eT( std::log(double(x))/ double(0.69314718055994530942) ); } template arma_inline static typename arma_real_or_cx_only::result log2 (const eT x) { typedef typename get_pod_type::result T; return std::log(x) / T(0.69314718055994530942); } #endif #if defined(ARMA_USE_CXX11) template arma_inline static typename arma_integral_only::result exp2 (const eT x) { return eT( std::pow(double(2), double(x)) ); } template arma_inline static typename arma_real_only::result exp2 (const eT x) { return std::exp2(x); } template arma_inline static typename arma_cx_only::result exp2 (const eT& x) { typedef typename get_pod_type::result T; return std::pow( T(2), x); } #else template arma_inline static typename arma_integral_only::result exp2 (const eT x) { return eT( std::pow(double(2), double(x)) ); } template arma_inline static typename arma_real_or_cx_only::result exp2 (const eT x) { typedef typename get_pod_type::result T; return std::pow( T(2), x); } #endif template arma_inline static typename arma_integral_only::result exp10 (const eT x) { return eT( std::pow(double(10), double(x)) ); } template arma_inline static typename arma_real_or_cx_only::result exp10 (const eT x) { typedef typename get_pod_type::result T; return std::pow( T(10), x); } template arma_inline static typename arma_unsigned_integral_only::result arma_abs (const eT x) { return x; } template arma_inline static typename arma_signed_integral_only::result arma_abs (const eT x) { return std::abs(x); } template arma_inline static typename arma_real_only::result arma_abs (const eT x) { return std::abs(x); } template arma_inline static typename arma_real_only< T>::result arma_abs (const std::complex& x) { return std::abs(x); } template arma_inline static typename arma_unsigned_integral_only::result sign (const eT x) { return (x > eT(0)) ? eT(+1) : eT(0); } template arma_inline static typename arma_signed_integral_only::result sign (const eT x) { return (x > eT(0)) ? eT(+1) : ( (x < eT(0)) ? eT(-1) : eT(0) ); } template arma_inline static typename arma_real_only::result sign (const eT x) { return (x > eT(0)) ? eT(+1) : ( (x < eT(0)) ? eT(-1) : eT(0) ); } template arma_inline static typename arma_cx_only::result sign (const eT& x) { typedef typename eT::value_type T; return (x.real() != T(0) && x.imag() != T(0)) ? (x / std::abs(x)) : x; } template arma_inline static typename arma_integral_only::result pow (const T1 base, const T2 exponent) { return T1( std::pow( double(base), double(exponent) ) ); } template arma_inline static typename arma_real_or_cx_only::result pow (const T1 base, const T2 exponent) { return std::pow(base, exponent); } template arma_inline static typename arma_integral_only::result direct_eps(const eT) { return eT(0); } template inline static typename arma_real_only::result direct_eps(const eT x) { //arma_extra_debug_sigprint(); // acording to IEEE Standard for Floating-Point Arithmetic (IEEE 754) // the mantissa length for double is 53 bits = std::numeric_limits::digits // the mantissa length for float is 24 bits = std::numeric_limits::digits //return std::pow( std::numeric_limits::radix, (std::floor(std::log10(std::abs(x))/std::log10(std::numeric_limits::radix))-(std::numeric_limits::digits-1)) ); const eT radix_eT = eT(std::numeric_limits::radix); const eT digits_m1_eT = eT(std::numeric_limits::digits - 1); // return std::pow( radix_eT, eT(std::floor(std::log10(std::abs(x))/std::log10(radix_eT)) - digits_m1_eT) ); return eop_aux::pow( radix_eT, eT(std::floor(std::log10(std::abs(x))/std::log10(radix_eT)) - digits_m1_eT) ); } template inline static typename arma_real_only::result direct_eps(const std::complex x) { //arma_extra_debug_sigprint(); //return std::pow( std::numeric_limits::radix, (std::floor(std::log10(std::abs(x))/std::log10(std::numeric_limits::radix))-(std::numeric_limits::digits-1)) ); const T radix_T = T(std::numeric_limits::radix); const T digits_m1_T = T(std::numeric_limits::digits - 1); return std::pow( radix_T, T(std::floor(std::log10(std::abs(x))/std::log10(radix_T)) - digits_m1_T) ); } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/eop_core_bones.hpp ================================================ // Copyright (C) 2010-2015 Conrad Sanderson // Copyright (C) 2010-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup eop_core //! @{ template class eop_core { public: // matrices template arma_hot inline static void apply(outT& out, const eOp& x); template arma_hot inline static void apply_inplace_plus (Mat& out, const eOp& x); template arma_hot inline static void apply_inplace_minus(Mat& out, const eOp& x); template arma_hot inline static void apply_inplace_schur(Mat& out, const eOp& x); template arma_hot inline static void apply_inplace_div (Mat& out, const eOp& x); // cubes template arma_hot inline static void apply(Cube& out, const eOpCube& x); template arma_hot inline static void apply_inplace_plus (Cube& out, const eOpCube& x); template arma_hot inline static void apply_inplace_minus(Cube& out, const eOpCube& x); template arma_hot inline static void apply_inplace_schur(Cube& out, const eOpCube& x); template arma_hot inline static void apply_inplace_div (Cube& out, const eOpCube& x); // common template arma_hot arma_pure arma_inline static eT process(const eT val, const eT k); }; class eop_neg : public eop_core {}; class eop_scalar_plus : public eop_core {}; class eop_scalar_minus_pre : public eop_core {}; class eop_scalar_minus_post : public eop_core {}; class eop_scalar_times : public eop_core {}; class eop_scalar_div_pre : public eop_core {}; class eop_scalar_div_post : public eop_core {}; class eop_square : public eop_core {}; class eop_sqrt : public eop_core {}; class eop_log : public eop_core {}; class eop_log2 : public eop_core {}; class eop_log10 : public eop_core {}; class eop_trunc_log : public eop_core {}; class eop_exp : public eop_core {}; class eop_exp2 : public eop_core {}; class eop_exp10 : public eop_core {}; class eop_trunc_exp : public eop_core {}; class eop_cos : public eop_core {}; class eop_sin : public eop_core {}; class eop_tan : public eop_core {}; class eop_acos : public eop_core {}; class eop_asin : public eop_core {}; class eop_atan : public eop_core {}; class eop_cosh : public eop_core {}; class eop_sinh : public eop_core {}; class eop_tanh : public eop_core {}; class eop_acosh : public eop_core {}; class eop_asinh : public eop_core {}; class eop_atanh : public eop_core {}; class eop_eps : public eop_core {}; class eop_abs : public eop_core {}; class eop_conj : public eop_core {}; class eop_pow : public eop_core {}; class eop_floor : public eop_core {}; class eop_ceil : public eop_core {}; class eop_round : public eop_core {}; class eop_sign : public eop_core {}; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/eop_core_meat.hpp ================================================ // Copyright (C) 2010-2015 Conrad Sanderson // Copyright (C) 2010-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup eop_core //! @{ #undef arma_applier_1u #undef arma_applier_1a #undef arma_applier_2 #undef arma_applier_3 #undef operatorA #if defined(ARMA_SIMPLE_LOOPS) #define arma_applier_1u(operatorA) \ {\ for(uword i=0; i::process(P[i], k);\ }\ } #else #define arma_applier_1u(operatorA) \ {\ uword i,j;\ \ for(i=0, j=1; j::process(tmp_i, k);\ tmp_j = eop_core::process(tmp_j, k);\ \ out_mem[i] operatorA tmp_i;\ out_mem[j] operatorA tmp_j;\ }\ \ if(i < n_elem)\ {\ out_mem[i] operatorA eop_core::process(P[i], k);\ }\ } #endif #if defined(ARMA_SIMPLE_LOOPS) #define arma_applier_1a(operatorA) \ {\ for(uword i=0; i::process(P.at_alt(i), k);\ }\ } #else #define arma_applier_1a(operatorA) \ {\ uword i,j;\ \ for(i=0, j=1; j::process(tmp_i, k);\ tmp_j = eop_core::process(tmp_j, k);\ \ out_mem[i] operatorA tmp_i;\ out_mem[j] operatorA tmp_j;\ }\ \ if(i < n_elem)\ {\ out_mem[i] operatorA eop_core::process(P.at_alt(i), k);\ }\ } #endif #define arma_applier_2(operatorA) \ {\ if(n_rows != 1)\ {\ for(uword col=0; col::process(tmp_i, k);\ tmp_j = eop_core::process(tmp_j, k);\ \ *out_mem operatorA tmp_i; out_mem++;\ *out_mem operatorA tmp_j; out_mem++;\ }\ \ if(i < n_rows)\ {\ *out_mem operatorA eop_core::process(P.at(i,col), k); out_mem++;\ }\ }\ }\ else\ {\ for(uword count=0; count < n_cols; ++count)\ {\ out_mem[count] operatorA eop_core::process(P.at(0,count), k);\ }\ }\ } #define arma_applier_3(operatorA) \ {\ for(uword slice=0; slice::process(tmp_i, k);\ tmp_j = eop_core::process(tmp_j, k);\ \ *out_mem operatorA tmp_i; out_mem++; \ *out_mem operatorA tmp_j; out_mem++; \ }\ \ if(i < n_rows)\ {\ *out_mem operatorA eop_core::process(P.at(i,col,slice), k); out_mem++; \ }\ }\ }\ } // // matrices template template arma_hot inline void eop_core::apply(outT& out, const eOp& x) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; // NOTE: we're assuming that the matrix has already been set to the correct size and there is no aliasing; // size setting and alias checking is done by either the Mat contructor or operator=() const eT k = x.aux; eT* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { const uword n_elem = x.get_n_elem(); if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P.is_aligned()) { typename Proxy::aligned_ea_type P = x.P.get_aligned_ea(); arma_applier_1a(=); } else { typename Proxy::ea_type P = x.P.get_ea(); arma_applier_1u(=); } } else { typename Proxy::ea_type P = x.P.get_ea(); arma_applier_1u(=); } } else { const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); const Proxy& P = x.P; arma_applier_2(=); } } template template arma_hot inline void eop_core::apply_inplace_plus(Mat& out, const eOp& x) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "addition"); const eT k = x.aux; eT* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { const uword n_elem = x.get_n_elem(); if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P.is_aligned()) { typename Proxy::aligned_ea_type P = x.P.get_aligned_ea(); arma_applier_1a(+=); } else { typename Proxy::ea_type P = x.P.get_ea(); arma_applier_1u(+=); } } else { typename Proxy::ea_type P = x.P.get_ea(); arma_applier_1u(+=); } } else { const Proxy& P = x.P; arma_applier_2(+=); } } template template arma_hot inline void eop_core::apply_inplace_minus(Mat& out, const eOp& x) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "subtraction"); const eT k = x.aux; eT* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { const uword n_elem = x.get_n_elem(); if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P.is_aligned()) { typename Proxy::aligned_ea_type P = x.P.get_aligned_ea(); arma_applier_1a(-=); } else { typename Proxy::ea_type P = x.P.get_ea(); arma_applier_1u(-=); } } else { typename Proxy::ea_type P = x.P.get_ea(); arma_applier_1u(-=); } } else { const Proxy& P = x.P; arma_applier_2(-=); } } template template arma_hot inline void eop_core::apply_inplace_schur(Mat& out, const eOp& x) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "element-wise multiplication"); const eT k = x.aux; eT* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { const uword n_elem = x.get_n_elem(); if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P.is_aligned()) { typename Proxy::aligned_ea_type P = x.P.get_aligned_ea(); arma_applier_1a(*=); } else { typename Proxy::ea_type P = x.P.get_ea(); arma_applier_1u(*=); } } else { typename Proxy::ea_type P = x.P.get_ea(); arma_applier_1u(*=); } } else { const Proxy& P = x.P; arma_applier_2(*=); } } template template arma_hot inline void eop_core::apply_inplace_div(Mat& out, const eOp& x) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); arma_debug_assert_same_size(out.n_rows, out.n_cols, n_rows, n_cols, "element-wise division"); const eT k = x.aux; eT* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { const uword n_elem = x.get_n_elem(); if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P.is_aligned()) { typename Proxy::aligned_ea_type P = x.P.get_aligned_ea(); arma_applier_1a(/=); } else { typename Proxy::ea_type P = x.P.get_ea(); arma_applier_1u(/=); } } else { typename Proxy::ea_type P = x.P.get_ea(); arma_applier_1u(/=); } } else { const Proxy& P = x.P; arma_applier_2(/=); } } // // cubes template template arma_hot inline void eop_core::apply(Cube& out, const eOpCube& x) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; // NOTE: we're assuming that the matrix has already been set to the correct size and there is no aliasing; // size setting and alias checking is done by either the Mat contructor or operator=() const eT k = x.aux; eT* out_mem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { const uword n_elem = out.n_elem; if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P.is_aligned()) { typename ProxyCube::aligned_ea_type P = x.P.get_aligned_ea(); arma_applier_1a(=); } else { typename ProxyCube::ea_type P = x.P.get_ea(); arma_applier_1u(=); } } else { typename ProxyCube::ea_type P = x.P.get_ea(); arma_applier_1u(=); } } else { const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); const uword n_slices = x.get_n_slices(); const ProxyCube& P = x.P; arma_applier_3(=); } } template template arma_hot inline void eop_core::apply_inplace_plus(Cube& out, const eOpCube& x) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); const uword n_slices = x.get_n_slices(); arma_debug_assert_same_size(out.n_rows, out.n_cols, out.n_slices, n_rows, n_cols, n_slices, "addition"); const eT k = x.aux; eT* out_mem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { const uword n_elem = out.n_elem; if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P.is_aligned()) { typename ProxyCube::aligned_ea_type P = x.P.get_aligned_ea(); arma_applier_1a(+=); } else { typename ProxyCube::ea_type P = x.P.get_ea(); arma_applier_1u(+=); } } else { typename ProxyCube::ea_type P = x.P.get_ea(); arma_applier_1u(+=); } } else { const ProxyCube& P = x.P; arma_applier_3(+=); } } template template arma_hot inline void eop_core::apply_inplace_minus(Cube& out, const eOpCube& x) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); const uword n_slices = x.get_n_slices(); arma_debug_assert_same_size(out.n_rows, out.n_cols, out.n_slices, n_rows, n_cols, n_slices, "subtraction"); const eT k = x.aux; eT* out_mem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { const uword n_elem = out.n_elem; if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P.is_aligned()) { typename ProxyCube::aligned_ea_type P = x.P.get_aligned_ea(); arma_applier_1a(-=); } else { typename ProxyCube::ea_type P = x.P.get_ea(); arma_applier_1u(-=); } } else { typename ProxyCube::ea_type P = x.P.get_ea(); arma_applier_1u(-=); } } else { const ProxyCube& P = x.P; arma_applier_3(-=); } } template template arma_hot inline void eop_core::apply_inplace_schur(Cube& out, const eOpCube& x) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); const uword n_slices = x.get_n_slices(); arma_debug_assert_same_size(out.n_rows, out.n_cols, out.n_slices, n_rows, n_cols, n_slices, "element-wise multiplication"); const eT k = x.aux; eT* out_mem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { const uword n_elem = out.n_elem; if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P.is_aligned()) { typename ProxyCube::aligned_ea_type P = x.P.get_aligned_ea(); arma_applier_1a(*=); } else { typename ProxyCube::ea_type P = x.P.get_ea(); arma_applier_1u(*=); } } else { typename ProxyCube::ea_type P = x.P.get_ea(); arma_applier_1u(*=); } } else { const ProxyCube& P = x.P; arma_applier_3(*=); } } template template arma_hot inline void eop_core::apply_inplace_div(Cube& out, const eOpCube& x) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword n_rows = x.get_n_rows(); const uword n_cols = x.get_n_cols(); const uword n_slices = x.get_n_slices(); arma_debug_assert_same_size(out.n_rows, out.n_cols, out.n_slices, n_rows, n_cols, n_slices, "element-wise division"); const eT k = x.aux; eT* out_mem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { const uword n_elem = out.n_elem; if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); if(x.P.is_aligned()) { typename ProxyCube::aligned_ea_type P = x.P.get_aligned_ea(); arma_applier_1a(/=); } else { typename ProxyCube::ea_type P = x.P.get_ea(); arma_applier_1u(/=); } } else { typename ProxyCube::ea_type P = x.P.get_ea(); arma_applier_1u(/=); } } else { const ProxyCube& P = x.P; arma_applier_3(/=); } } // // common template template arma_hot arma_pure arma_inline eT eop_core::process(const eT, const eT) { arma_stop("eop_core::process(): unhandled eop_type"); return eT(0); } template<> template arma_hot arma_const arma_inline eT eop_core::process(const eT val, const eT k) { return val + k; } template<> template arma_hot arma_const arma_inline eT eop_core::process(const eT val, const eT k) { return k - val; } template<> template arma_hot arma_const arma_inline eT eop_core::process(const eT val, const eT k) { return val - k; } template<> template arma_hot arma_const arma_inline eT eop_core::process(const eT val, const eT k) { return val * k; } template<> template arma_hot arma_const arma_inline eT eop_core::process(const eT val, const eT k) { return k / val; } template<> template arma_hot arma_const arma_inline eT eop_core::process(const eT val, const eT k) { return val / k; } template<> template arma_hot arma_const arma_inline eT eop_core::process(const eT val, const eT ) { return val*val; } template<> template arma_hot arma_const arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::neg(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::sqrt(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::log(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::log2(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::log10(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return arma::trunc_log(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::exp(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::exp2(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::exp10(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return arma::trunc_exp(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::cos(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::sin(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::tan(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::acos(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::asin(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::atan(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::cosh(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::sinh(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::tanh(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::acosh(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::asinh(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::atanh(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::direct_eps(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::arma_abs(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::conj(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT k) { return eop_aux::pow(val, k); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::floor(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::ceil(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::round(val); } template<> template arma_hot arma_pure arma_inline eT eop_core::process(const eT val, const eT ) { return eop_aux::sign(val); } #undef arma_applier_1u #undef arma_applier_1a #undef arma_applier_2 #undef arma_applier_3 //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fft_engine.hpp ================================================ // This Source Code Form is a compilation of: // (1) source code written by Conrad Sanderson, and // (2) a modified form of source code referred to as "kissfft.hh". // // This compilation is Copyright (C) 2013 Conrad Sanderson // and is subject to the terms of the Mozilla Public License, v. 2.0. // // The source code that is distinct and separate from "kissfft.hh" // is Copyright (C) 2013 Conrad Sanderson and is subject to the // terms of the Mozilla Public License, v. 2.0. // // If a copy of the MPL was not distributed with this file, // You can obtain one at http://mozilla.org/MPL/2.0/. // // The original "kissfft.hh" source code is licensed under a 3-clause BSD license, // as follows: // // Copyright (c) 2003-2010 Mark Borgerding // // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // * Neither the author nor the names of any contributors may be used to endorse or promote // products derived from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS // OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE // OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. template struct store {}; template struct store { static const uword N = fixed_N; arma_aligned cx_type coeffs_array[fixed_N]; inline store() {} inline store(uword) {} arma_inline cx_type* coeffs_ptr() { return &coeffs_array[0]; } arma_inline const cx_type* coeffs_ptr() const { return &coeffs_array[0]; } }; template struct store { const uword N; podarray coeffs_array; inline store() : N(0) {} inline store(uword in_N) : N(in_N) { coeffs_array.set_size(N); } arma_inline cx_type* coeffs_ptr() { return coeffs_array.memptr(); } arma_inline const cx_type* coeffs_ptr() const { return coeffs_array.memptr(); } }; template class fft_engine : public store 0)> { public: typedef typename get_pod_type::result T; using store 0)>::N; using store 0)>::coeffs_ptr; podarray residue; podarray radix; podarray tmp_array; template inline uword calc_radix() { uword i = 0; for(uword n = N, r=4; n >= 2; ++i) { while( (n % r) > 0 ) { switch(r) { case 2: r = 3; break; case 4: r = 2; break; default: r += 2; break; } if(r*r > n) { r = n; } } n /= r; if(fill) { residue[i] = n; radix[i] = r; } } return i; } inline fft_engine(const uword in_N) : store< cx_type, fixed_N, (fixed_N > 0) >(in_N) { arma_extra_debug_sigprint(); const uword len = calc_radix(); residue.set_size(len); radix.set_size(len); calc_radix(); // calculate the constant coefficients cx_type* coeffs = coeffs_ptr(); const T k = T( (inverse) ? +2 : -2 ) * std::acos( T(-1) ) / T(N); for(uword i=0; i < N; ++i) { coeffs[i] = std::exp( cx_type(T(0), i*k) ); } } arma_hot inline void butterfly_2(cx_type* Y, const uword stride, const uword m) { arma_extra_debug_sigprint(); const cx_type* coeffs = coeffs_ptr(); for(uword i=0; i < m; ++i) { const cx_type t = Y[i+m] * coeffs[i*stride]; Y[i+m] = Y[i] - t; Y[i ] += t; } } arma_hot inline void butterfly_3(cx_type* Y, const uword stride, const uword m) { arma_extra_debug_sigprint(); arma_aligned cx_type tmp[5]; cx_type* coeffs1 = coeffs_ptr(); cx_type* coeffs2 = coeffs1; const T coeff_sm_imag = coeffs1[stride*m].imag(); const uword n = m*2; // TODO: rearrange the indices within tmp[] into a more sane order for(uword i = m; i > 0; --i) { tmp[1] = Y[m] * (*coeffs1); tmp[2] = Y[n] * (*coeffs2); tmp[0] = tmp[1] - tmp[2]; tmp[0] *= coeff_sm_imag; tmp[3] = tmp[1] + tmp[2]; Y[m] = cx_type( (Y[0].real() - (0.5*tmp[3].real())), (Y[0].imag() - (0.5*tmp[3].imag())) ); Y[0] += tmp[3]; Y[n] = cx_type( (Y[m].real() + tmp[0].imag()), (Y[m].imag() - tmp[0].real()) ); Y[m] += cx_type( -tmp[0].imag(), tmp[0].real() ); Y++; coeffs1 += stride; coeffs2 += stride*2; } } arma_hot inline void butterfly_4(cx_type* Y, const uword stride, const uword m) { arma_extra_debug_sigprint(); arma_aligned cx_type tmp[7]; const cx_type* coeffs = coeffs_ptr(); const uword m2 = m*2; const uword m3 = m*3; // TODO: rearrange the indices within tmp[] into a more sane order for(uword i=0; i < m; ++i) { tmp[0] = Y[i + m ] * coeffs[i*stride ]; tmp[2] = Y[i + m3] * coeffs[i*stride*3]; tmp[3] = tmp[0] + tmp[2]; //tmp[4] = tmp[0] - tmp[2]; //tmp[4] = (inverse) ? cx_type( -(tmp[4].imag()), tmp[4].real() ) : cx_type( tmp[4].imag(), -tmp[4].real() ); tmp[4] = (inverse) ? cx_type( (tmp[2].imag() - tmp[0].imag()), (tmp[0].real() - tmp[2].real()) ) : cx_type( (tmp[0].imag() - tmp[2].imag()), (tmp[2].real() - tmp[0].real()) ); tmp[1] = Y[i + m2] * coeffs[i*stride*2]; tmp[5] = Y[i] - tmp[1]; Y[i ] += tmp[1]; Y[i + m2] = Y[i] - tmp[3]; Y[i ] += tmp[3]; Y[i + m ] = tmp[5] + tmp[4]; Y[i + m3] = tmp[5] - tmp[4]; } } inline arma_hot void butterfly_5(cx_type* Y, const uword stride, const uword m) { arma_extra_debug_sigprint(); arma_aligned cx_type tmp[13]; const cx_type* coeffs = coeffs_ptr(); const T a_real = coeffs[stride*1*m].real(); const T a_imag = coeffs[stride*1*m].imag(); const T b_real = coeffs[stride*2*m].real(); const T b_imag = coeffs[stride*2*m].imag(); cx_type* Y0 = Y; cx_type* Y1 = Y + 1*m; cx_type* Y2 = Y + 2*m; cx_type* Y3 = Y + 3*m; cx_type* Y4 = Y + 4*m; for(uword i=0; i < m; ++i) { tmp[0] = (*Y0); tmp[1] = (*Y1) * coeffs[stride*1*i]; tmp[2] = (*Y2) * coeffs[stride*2*i]; tmp[3] = (*Y3) * coeffs[stride*3*i]; tmp[4] = (*Y4) * coeffs[stride*4*i]; tmp[7] = tmp[1] + tmp[4]; tmp[8] = tmp[2] + tmp[3]; tmp[9] = tmp[2] - tmp[3]; tmp[10] = tmp[1] - tmp[4]; (*Y0) += tmp[7]; (*Y0) += tmp[8]; tmp[5] = tmp[0] + cx_type( ( (tmp[7].real() * a_real) + (tmp[8].real() * b_real) ), ( (tmp[7].imag() * a_real) + (tmp[8].imag() * b_real) ) ); tmp[6] = cx_type( ( (tmp[10].imag() * a_imag) + (tmp[9].imag() * b_imag) ), ( -(tmp[10].real() * a_imag) - (tmp[9].real() * b_imag) ) ); (*Y1) = tmp[5] - tmp[6]; (*Y4) = tmp[5] + tmp[6]; tmp[11] = tmp[0] + cx_type( ( (tmp[7].real() * b_real) + (tmp[8].real() * a_real) ), ( (tmp[7].imag() * b_real) + (tmp[8].imag() * a_real) ) ); tmp[12] = cx_type( ( -(tmp[10].imag() * b_imag) + (tmp[9].imag() * a_imag) ), ( (tmp[10].real() * b_imag) - (tmp[9].real() * a_imag) ) ); (*Y2) = tmp[11] + tmp[12]; (*Y3) = tmp[11] - tmp[12]; Y0++; Y1++; Y2++; Y3++; Y4++; } } arma_hot inline void butterfly_N(cx_type* Y, const uword stride, const uword m, const uword r) { arma_extra_debug_sigprint(); const cx_type* coeffs = coeffs_ptr(); tmp_array.set_min_size(r); cx_type* tmp = tmp_array.memptr(); for(uword u=0; u < m; ++u) { uword k = u; for(uword v=0; v < r; ++v) { tmp[v] = Y[k]; k += m; } k = u; for(uword v=0; v < r; ++v) { Y[k] = tmp[0]; uword j = 0; for(uword w=1; w < r; ++w) { j += stride * k; if(j >= N) { j -= N; } Y[k] += tmp[w] * coeffs[j]; } k += m; } } } inline void run(cx_type* Y, const cx_type* X, const uword stage = 0, const uword stride = 1) { arma_extra_debug_sigprint(); const uword m = residue[stage]; const uword r = radix[stage]; const cx_type *Y_end = Y + r*m; if(m == 1) { for(cx_type* Yi = Y; Yi != Y_end; Yi++, X += stride) { (*Yi) = (*X); } } else { const uword next_stage = stage + 1; const uword next_stride = stride * r; for(cx_type* Yi = Y; Yi != Y_end; Yi += m, X += stride) { run(Yi, X, next_stage, next_stride); } } switch(r) { case 2: butterfly_2(Y, stride, m ); break; case 3: butterfly_3(Y, stride, m ); break; case 4: butterfly_4(Y, stride, m ); break; case 5: butterfly_5(Y, stride, m ); break; default: butterfly_N(Y, stride, m, r); break; } } }; ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/field_bones.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Ian Cullinan // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup field //! @{ struct field_prealloc_n_elem { static const uword val = 16; }; //! A lightweight 2D container for arbitrary objects //! (the objects must have a copy constructor) template class field { public: typedef oT object_type; const uword n_rows; //!< number of rows in the field (read-only) const uword n_cols; //!< number of columns in the field (read-only) const uword n_slices; //!< number of slices in the field (read-only) const uword n_elem; //!< number of elements in the field (read-only) private: arma_aligned oT** mem; //!< pointer to memory used by the object arma_aligned oT* mem_local[ field_prealloc_n_elem::val ]; //!< Internal memory, to avoid calling the 'new' operator for small amounts of memory public: inline ~field(); inline field(); inline field(const field& x); inline const field& operator=(const field& x); inline field(const subview_field& x); inline const field& operator=(const subview_field& x); inline explicit field(const uword n_elem_in); inline field(const uword n_rows_in, const uword n_cols_in); inline field(const uword n_rows_in, const uword n_cols_in, const uword n_slices_in); inline void set_size(const uword n_obj_in); inline void set_size(const uword n_rows_in, const uword n_cols_in); inline void set_size(const uword n_rows_in, const uword n_cols_in, const uword n_slices_in); template inline void copy_size(const field& x); arma_inline oT& operator[](const uword i); arma_inline const oT& operator[](const uword i) const; arma_inline oT& at(const uword i); arma_inline const oT& at(const uword i) const; arma_inline oT& operator()(const uword i); arma_inline const oT& operator()(const uword i) const; arma_inline oT& at(const uword row, const uword col); arma_inline const oT& at(const uword row, const uword col) const; arma_inline oT& at(const uword row, const uword col, const uword slice); arma_inline const oT& at(const uword row, const uword col, const uword slice) const; arma_inline oT& operator()(const uword row, const uword col); arma_inline const oT& operator()(const uword row, const uword col) const; arma_inline oT& operator()(const uword row, const uword col, const uword slice); arma_inline const oT& operator()(const uword row, const uword col, const uword slice) const; inline field_injector operator<<(const oT& val); inline field_injector operator<<(const injector_end_of_row<>& x); inline subview_field row(const uword row_num); inline const subview_field row(const uword row_num) const; inline subview_field col(const uword col_num); inline const subview_field col(const uword col_num) const; inline subview_field slice(const uword slice_num); inline const subview_field slice(const uword slice_num) const; inline subview_field rows(const uword in_row1, const uword in_row2); inline const subview_field rows(const uword in_row1, const uword in_row2) const; inline subview_field cols(const uword in_col1, const uword in_col2); inline const subview_field cols(const uword in_col1, const uword in_col2) const; inline subview_field slices(const uword in_slice1, const uword in_slice2); inline const subview_field slices(const uword in_slice1, const uword in_slice2) const; inline subview_field subfield(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2); inline const subview_field subfield(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) const; inline subview_field subfield(const uword in_row1, const uword in_col1, const uword in_slice1, const uword in_row2, const uword in_col2, const uword in_slice2); inline const subview_field subfield(const uword in_row1, const uword in_col1, const uword in_slice1, const uword in_row2, const uword in_col2, const uword in_slice2) const; inline subview_field subfield(const uword in_row1, const uword in_col1, const SizeMat& s); inline const subview_field subfield(const uword in_row1, const uword in_col1, const SizeMat& s) const; inline subview_field subfield(const uword in_row1, const uword in_col1, const uword in_slice1, const SizeCube& s); inline const subview_field subfield(const uword in_row1, const uword in_col1, const uword in_slice1, const SizeCube& s) const; inline subview_field subfield(const span& row_span, const span& col_span); inline const subview_field subfield(const span& row_span, const span& col_span) const; inline subview_field subfield(const span& row_span, const span& col_span, const span& slice_span); inline const subview_field subfield(const span& row_span, const span& col_span, const span& slice_span) const; inline subview_field operator()(const span& row_span, const span& col_span); inline const subview_field operator()(const span& row_span, const span& col_span) const; inline subview_field operator()(const span& row_span, const span& col_span, const span& slice_span); inline const subview_field operator()(const span& row_span, const span& col_span, const span& slice_span) const; inline subview_field operator()(const uword in_row1, const uword in_col1, const SizeMat& s); inline const subview_field operator()(const uword in_row1, const uword in_col1, const SizeMat& s) const; inline subview_field operator()(const uword in_row1, const uword in_col1, const uword in_slice1, const SizeCube& s); inline const subview_field operator()(const uword in_row1, const uword in_col1, const uword in_slice1, const SizeCube& s) const; inline void print(const std::string extra_text = "") const; inline void print(std::ostream& user_stream, const std::string extra_text = "") const; inline void fill(const oT& x); inline void reset(); inline void reset_objects(); arma_inline bool is_empty() const; arma_inline arma_warn_unused bool in_range(const uword i) const; arma_inline arma_warn_unused bool in_range(const span& x) const; arma_inline arma_warn_unused bool in_range(const uword in_row, const uword in_col) const; arma_inline arma_warn_unused bool in_range(const span& row_span, const uword in_col) const; arma_inline arma_warn_unused bool in_range(const uword in_row, const span& col_span) const; arma_inline arma_warn_unused bool in_range(const span& row_span, const span& col_span) const; arma_inline arma_warn_unused bool in_range(const uword in_row, const uword in_col, const SizeMat& s) const; arma_inline arma_warn_unused bool in_range(const uword in_row, const uword in_col, const uword in_slice) const; arma_inline arma_warn_unused bool in_range(const span& row_span, const span& col_span, const span& slice_span) const; arma_inline arma_warn_unused bool in_range(const uword in_row, const uword in_col, const uword in_slice, const SizeCube& s) const; inline bool save(const std::string name, const file_type type = arma_binary, const bool print_status = true) const; inline bool save( std::ostream& os, const file_type type = arma_binary, const bool print_status = true) const; inline bool load(const std::string name, const file_type type = auto_detect, const bool print_status = true); inline bool load( std::istream& is, const file_type type = auto_detect, const bool print_status = true); inline bool quiet_save(const std::string name, const file_type type = arma_binary) const; inline bool quiet_save( std::ostream& os, const file_type type = arma_binary) const; inline bool quiet_load(const std::string name, const file_type type = auto_detect); inline bool quiet_load( std::istream& is, const file_type type = auto_detect); // for container-like functionality typedef oT value_type; typedef uword size_type; class iterator { public: inline iterator(field& in_M, const bool at_end = false); inline oT& operator* (); inline iterator& operator++(); inline void operator++(int); inline iterator& operator--(); inline void operator--(int); inline bool operator!=(const iterator& X) const; inline bool operator==(const iterator& X) const; arma_aligned field& M; arma_aligned uword i; }; class const_iterator { public: const_iterator(const field& in_M, const bool at_end = false); const_iterator(const iterator& X); inline const oT& operator*() const; inline const_iterator& operator++(); inline void operator++(int); inline const_iterator& operator--(); inline void operator--(int); inline bool operator!=(const const_iterator& X) const; inline bool operator==(const const_iterator& X) const; arma_aligned const field& M; arma_aligned uword i; }; inline iterator begin(); inline const_iterator begin() const; inline const_iterator cbegin() const; inline iterator end(); inline const_iterator end() const; inline const_iterator cend() const; inline void clear(); inline bool empty() const; inline uword size() const; private: inline void init(const field& x); inline void init(const uword n_rows_in, const uword n_cols_in); inline void init(const uword n_rows_in, const uword n_cols_in, const uword n_slices_in); inline void delete_objects(); inline void create_objects(); friend class field_aux; friend class subview_field; public: #ifdef ARMA_EXTRA_FIELD_PROTO #include ARMA_INCFILE_WRAP(ARMA_EXTRA_FIELD_PROTO) #endif }; class field_aux { public: template inline static void reset_objects(field< oT >& x); template inline static void reset_objects(field< Mat >& x); template inline static void reset_objects(field< Col >& x); template inline static void reset_objects(field< Row >& x); template inline static void reset_objects(field< Cube >& x); inline static void reset_objects(field< std::string >& x); template inline static bool save(const field< oT >& x, const std::string& name, const file_type type, std::string& err_msg); template inline static bool save(const field< oT >& x, std::ostream& os, const file_type type, std::string& err_msg); template inline static bool load( field< oT >& x, const std::string& name, const file_type type, std::string& err_msg); template inline static bool load( field< oT >& x, std::istream& is, const file_type type, std::string& err_msg); template inline static bool save(const field< Mat >& x, const std::string& name, const file_type type, std::string& err_msg); template inline static bool save(const field< Mat >& x, std::ostream& os, const file_type type, std::string& err_msg); template inline static bool load( field< Mat >& x, const std::string& name, const file_type type, std::string& err_msg); template inline static bool load( field< Mat >& x, std::istream& is, const file_type type, std::string& err_msg); template inline static bool save(const field< Col >& x, const std::string& name, const file_type type, std::string& err_msg); template inline static bool save(const field< Col >& x, std::ostream& os, const file_type type, std::string& err_msg); template inline static bool load( field< Col >& x, const std::string& name, const file_type type, std::string& err_msg); template inline static bool load( field< Col >& x, std::istream& is, const file_type type, std::string& err_msg); template inline static bool save(const field< Row >& x, const std::string& name, const file_type type, std::string& err_msg); template inline static bool save(const field< Row >& x, std::ostream& os, const file_type type, std::string& err_msg); template inline static bool load( field< Row >& x, const std::string& name, const file_type type, std::string& err_msg); template inline static bool load( field< Row >& x, std::istream& is, const file_type type, std::string& err_msg); template inline static bool save(const field< Cube >& x, const std::string& name, const file_type type, std::string& err_msg); template inline static bool save(const field< Cube >& x, std::ostream& os, const file_type type, std::string& err_msg); template inline static bool load( field< Cube >& x, const std::string& name, const file_type type, std::string& err_msg); template inline static bool load( field< Cube >& x, std::istream& is, const file_type type, std::string& err_msg); inline static bool save(const field< std::string >& x, const std::string& name, const file_type type, std::string& err_msg); inline static bool save(const field< std::string >& x, std::ostream& os, const file_type type, std::string& err_msg); inline static bool load( field< std::string >& x, const std::string& name, const file_type type, std::string& err_msg); inline static bool load( field< std::string >& x, std::istream& is, const file_type type, std::string& err_msg); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/field_meat.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Ian Cullinan // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup field //! @{ template inline field::~field() { arma_extra_debug_sigprint_this(this); delete_objects(); if(n_elem > sizeof(mem_local)/sizeof(oT*) ) { delete [] mem; } if(arma_config::debug == true) { // try to expose buggy user code that accesses deleted objects mem = 0; } } template inline field::field() : n_rows(0) , n_cols(0) , n_slices(0) , n_elem(0) , mem(0) { arma_extra_debug_sigprint_this(this); } //! construct a field from a given field template inline field::field(const field& x) : n_rows(0) , n_cols(0) , n_slices(0) , n_elem(0) , mem(0) { arma_extra_debug_sigprint(arma_boost::format("this = %x x = %x") % this % &x); init(x); } //! construct a field from a given field template inline const field& field::operator=(const field& x) { arma_extra_debug_sigprint(); init(x); return *this; } //! construct a field from subview_field (e.g. construct a field from a delayed subfield operation) template inline field::field(const subview_field& X) : n_rows(0) , n_cols(0) , n_slices(0) , n_elem(0) , mem(0) { arma_extra_debug_sigprint_this(this); this->operator=(X); } //! construct a field from subview_field (e.g. construct a field from a delayed subfield operation) template inline const field& field::operator=(const subview_field& X) { arma_extra_debug_sigprint(); subview_field::extract(*this, X); return *this; } //! construct the field with the specified number of elements, //! assuming a column-major layout template inline field::field(const uword n_elem_in) : n_rows(0) , n_cols(0) , n_slices(0) , n_elem(0) , mem(0) { arma_extra_debug_sigprint_this(this); init(n_elem_in, 1); } //! construct the field with the specified dimensions template inline field::field(const uword n_rows_in, const uword n_cols_in) : n_rows(0) , n_cols(0) , n_slices(0) , n_elem(0) , mem(0) { arma_extra_debug_sigprint_this(this); init(n_rows_in, n_cols_in); } //! construct the field with the specified dimensions template inline field::field(const uword n_rows_in, const uword n_cols_in, const uword n_slices_in) : n_rows(0) , n_cols(0) , n_slices(0) , n_elem(0) , mem(0) { arma_extra_debug_sigprint_this(this); init(n_rows_in, n_cols_in, n_slices_in); } //! change the field to have the specified number of elements, //! assuming a column-major layout (data is not preserved) template inline void field::set_size(const uword n_elem_in) { arma_extra_debug_sigprint(arma_boost::format("n_elem_in = %d") % n_elem_in); init(n_elem_in, 1); } //! change the field to have the specified dimensions (data is not preserved) template inline void field::set_size(const uword n_rows_in, const uword n_cols_in) { arma_extra_debug_sigprint(arma_boost::format("n_rows_in = %d, n_cols_in = %d") % n_rows_in % n_cols_in); init(n_rows_in, n_cols_in); } //! change the field to have the specified dimensions (data is not preserved) template inline void field::set_size(const uword n_rows_in, const uword n_cols_in, const uword n_slices_in) { arma_extra_debug_sigprint(arma_boost::format("n_rows_in = %d, n_cols_in = %d, n_slices_in = %d") % n_rows_in % n_cols_in % n_slices_in); init(n_rows_in, n_cols_in, n_slices_in); } //! change the field to have the specified dimensions (data is not preserved) template template inline void field::copy_size(const field& x) { arma_extra_debug_sigprint(); init(x.n_rows, x.n_cols, x.n_slices); } //! linear element accessor (treats the field as a vector); no bounds check template arma_inline oT& field::operator[] (const uword i) { return (*mem[i]); } //! linear element accessor (treats the field as a vector); no bounds check template arma_inline const oT& field::operator[] (const uword i) const { return (*mem[i]); } //! linear element accessor (treats the field as a vector); no bounds check template arma_inline oT& field::at(const uword i) { return (*mem[i]); } //! linear element accessor (treats the field as a vector); no bounds check template arma_inline const oT& field::at(const uword i) const { return (*mem[i]); } //! linear element accessor (treats the field as a vector); bounds checking not done when ARMA_NO_DEBUG is defined template arma_inline oT& field::operator() (const uword i) { arma_debug_check( (i >= n_elem), "field::operator(): index out of bounds"); return (*mem[i]); } //! linear element accessor (treats the field as a vector); bounds checking not done when ARMA_NO_DEBUG is defined template arma_inline const oT& field::operator() (const uword i) const { arma_debug_check( (i >= n_elem), "field::operator(): index out of bounds"); return (*mem[i]); } //! element accessor; bounds checking not done when ARMA_NO_DEBUG is defined template arma_inline oT& field::operator() (const uword in_row, const uword in_col) { arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "field::operator(): index out of bounds"); return (*mem[in_row + in_col*n_rows]); } //! element accessor; bounds checking not done when ARMA_NO_DEBUG is defined template arma_inline const oT& field::operator() (const uword in_row, const uword in_col) const { arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "field::operator(): index out of bounds"); return (*mem[in_row + in_col*n_rows]); } //! element accessor; bounds checking not done when ARMA_NO_DEBUG is defined template arma_inline oT& field::operator() (const uword in_row, const uword in_col, const uword in_slice) { arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols) || (in_slice >= n_slices)), "field::operator(): index out of bounds"); return (*mem[in_row + in_col*n_rows + in_slice*(n_rows*n_cols)]); } //! element accessor; bounds checking not done when ARMA_NO_DEBUG is defined template arma_inline const oT& field::operator() (const uword in_row, const uword in_col, const uword in_slice) const { arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols) || (in_slice >= n_slices)), "field::operator(): index out of bounds"); return (*mem[in_row + in_col*n_rows + in_slice*(n_rows*n_cols)]); } //! element accessor; no bounds check template arma_inline oT& field::at(const uword in_row, const uword in_col) { return (*mem[in_row + in_col*n_rows]); } //! element accessor; no bounds check template arma_inline const oT& field::at(const uword in_row, const uword in_col) const { return (*mem[in_row + in_col*n_rows]); } //! element accessor; no bounds check template arma_inline oT& field::at(const uword in_row, const uword in_col, const uword in_slice) { return (*mem[in_row + in_col*n_rows + in_slice*(n_rows*n_cols)]); } //! element accessor; no bounds check template arma_inline const oT& field::at(const uword in_row, const uword in_col, const uword in_slice) const { return (*mem[in_row + in_col*n_rows + in_slice*(n_rows*n_cols)]); } template inline field_injector< field > field::operator<<(const oT& val) { return field_injector< field >(*this, val); } template inline field_injector< field > field::operator<<(const injector_end_of_row<>& x) { return field_injector< field >(*this, x); } //! creation of subview_field (row of a field) template inline subview_field field::row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check( (n_slices >= 2), "field::row(): field must be 2D" ); arma_debug_check( (row_num >= n_rows), "field::row(): row out of bounds" ); return subview_field(*this, row_num, 0, 1, n_cols); } //! creation of subview_field (row of a field) template inline const subview_field field::row(const uword row_num) const { arma_extra_debug_sigprint(); arma_debug_check( (n_slices >= 2), "field::row(): field must be 2D" ); arma_debug_check( (row_num >= n_rows), "field::row(): row out of bounds" ); return subview_field(*this, row_num, 0, 1, n_cols); } //! creation of subview_field (column of a field) template inline subview_field field::col(const uword col_num) { arma_extra_debug_sigprint(); arma_debug_check( (n_slices >= 2), "field::col(): field must be 2D" ); arma_debug_check( (col_num >= n_cols), "field::col(): out of bounds"); return subview_field(*this, 0, col_num, n_rows, 1); } //! creation of subview_field (column of a field) template inline const subview_field field::col(const uword col_num) const { arma_extra_debug_sigprint(); arma_debug_check( (n_slices >= 2), "field::col(): field must be 2D" ); arma_debug_check( (col_num >= n_cols), "field::col(): out of bounds"); return subview_field(*this, 0, col_num, n_rows, 1); } //! creation of subview_field (slice of a field) template inline subview_field field::slice(const uword slice_num) { arma_extra_debug_sigprint(); arma_debug_check( (slice_num >= n_slices), "field::slice(): out of bounds"); return subview_field(*this, 0, 0, slice_num, n_rows, n_cols, 1); } //! creation of subview_field (slice of a field) template inline const subview_field field::slice(const uword slice_num) const { arma_extra_debug_sigprint(); arma_debug_check( (slice_num >= n_slices), "field::slice(): out of bounds"); return subview_field(*this, 0, 0, slice_num, n_rows, n_cols, 1); } //! creation of subview_field (subfield comprised of specified rows) template inline subview_field field::rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); arma_debug_check( (n_slices >= 2), "field::rows(): field must be 2D" ); arma_debug_check ( ( (in_row1 > in_row2) || (in_row2 >= n_rows) ), "field::rows(): indicies out of bounds or incorrectly used" ); const uword sub_n_rows = in_row2 - in_row1 + 1; return subview_field(*this, in_row1, 0, sub_n_rows, n_cols); } //! creation of subview_field (subfield comprised of specified rows) template inline const subview_field field::rows(const uword in_row1, const uword in_row2) const { arma_extra_debug_sigprint(); arma_debug_check( (n_slices >= 2), "field::rows(): field must be 2D" ); arma_debug_check ( ( (in_row1 > in_row2) || (in_row2 >= n_rows) ), "field::rows(): indicies out of bounds or incorrectly used" ); const uword sub_n_rows = in_row2 - in_row1 + 1; return subview_field(*this, in_row1, 0, sub_n_rows, n_cols); } //! creation of subview_field (subfield comprised of specified columns) template inline subview_field field::cols(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check( (n_slices >= 2), "field::cols(): field must be 2D" ); arma_debug_check ( ( (in_col1 > in_col2) || (in_col2 >= n_cols) ), "field::cols(): indicies out of bounds or incorrectly used" ); const uword sub_n_cols = in_col2 - in_col1 + 1; return subview_field(*this, 0, in_col1, n_rows, sub_n_cols); } //! creation of subview_field (subfield comprised of specified columns) template inline const subview_field field::cols(const uword in_col1, const uword in_col2) const { arma_extra_debug_sigprint(); arma_debug_check( (n_slices >= 2), "field::cols(): field must be 2D" ); arma_debug_check ( ( (in_col1 > in_col2) || (in_col2 >= n_cols) ), "field::cols(): indicies out of bounds or incorrectly used" ); const uword sub_n_cols = in_col2 - in_col1 + 1; return subview_field(*this, 0, in_col1, n_rows, sub_n_cols); } //! creation of subview_field (subfield comprised of specified slices) template inline subview_field field::slices(const uword in_slice1, const uword in_slice2) { arma_extra_debug_sigprint(); arma_debug_check ( ( (in_slice1 > in_slice2) || (in_slice2 >= n_slices) ), "field::slices(): indicies out of bounds or incorrectly used" ); const uword sub_n_slices = in_slice2 - in_slice1 + 1; return subview_field(*this, 0, 0, in_slice1, n_rows, n_cols, sub_n_slices); } //! creation of subview_field (subfield comprised of specified slices) template inline const subview_field field::slices(const uword in_slice1, const uword in_slice2) const { arma_extra_debug_sigprint(); arma_debug_check ( ( (in_slice1 > in_slice2) || (in_slice2 >= n_slices) ), "field::slices(): indicies out of bounds or incorrectly used" ); const uword sub_n_slices = in_slice2 - in_slice1 + 1; return subview_field(*this, 0, 0, in_slice1, n_rows, n_cols, sub_n_slices); } //! creation of subview_field (subfield with arbitrary dimensions) template inline subview_field field::subfield(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check( (n_slices >= 2), "field::subfield(): field must be 2D" ); arma_debug_check ( (in_row1 > in_row2) || (in_col1 > in_col2) || (in_row2 >= n_rows) || (in_col2 >= n_cols), "field::subfield(): indices out of bounds or incorrectly used" ); const uword sub_n_rows = in_row2 - in_row1 + 1; const uword sub_n_cols = in_col2 - in_col1 + 1; return subview_field(*this, in_row1, in_col1, sub_n_rows, sub_n_cols); } //! creation of subview_field (subfield with arbitrary dimensions) template inline const subview_field field::subfield(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) const { arma_extra_debug_sigprint(); arma_debug_check( (n_slices >= 2), "field::subfield(): field must be 2D" ); arma_debug_check ( (in_row1 > in_row2) || (in_col1 > in_col2) || (in_row2 >= n_rows) || (in_col2 >= n_cols), "field::subfield(): indices out of bounds or incorrectly used" ); const uword sub_n_rows = in_row2 - in_row1 + 1; const uword sub_n_cols = in_col2 - in_col1 + 1; return subview_field(*this, in_row1, in_col1, sub_n_rows, sub_n_cols); } //! creation of subview_field (subfield with arbitrary dimensions) template inline subview_field field::subfield(const uword in_row1, const uword in_col1, const uword in_slice1, const uword in_row2, const uword in_col2, const uword in_slice2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_col1 > in_col2) || (in_slice1 > in_slice2) || (in_row2 >= n_rows) || (in_col2 >= n_cols) || (in_slice2 >= n_slices), "field::subfield(): indices out of bounds or incorrectly used" ); const uword sub_n_rows = in_row2 - in_row1 + 1; const uword sub_n_cols = in_col2 - in_col1 + 1; const uword sub_n_slices = in_slice2 - in_slice1 + 1; return subview_field(*this, in_row1, in_col1, in_slice1, sub_n_rows, sub_n_cols, sub_n_slices); } //! creation of subview_field (subfield with arbitrary dimensions) template inline const subview_field field::subfield(const uword in_row1, const uword in_col1, const uword in_slice1, const uword in_row2, const uword in_col2, const uword in_slice2) const { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_col1 > in_col2) || (in_slice1 > in_slice2) || (in_row2 >= n_rows) || (in_col2 >= n_cols) || (in_slice2 >= n_slices), "field::subfield(): indices out of bounds or incorrectly used" ); const uword sub_n_rows = in_row2 - in_row1 + 1; const uword sub_n_cols = in_col2 - in_col1 + 1; const uword sub_n_slices = in_slice2 - in_slice1 + 1; return subview_field(*this, in_row1, in_col1, in_slice1, sub_n_rows, sub_n_cols, sub_n_slices); } //! creation of subview_field (subfield with arbitrary dimensions) template inline subview_field field::subfield(const uword in_row1, const uword in_col1, const SizeMat& s) { arma_extra_debug_sigprint(); arma_debug_check( (n_slices >= 2), "field::subfield(): field must be 2D" ); const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; arma_debug_check ( ((in_row1 >= l_n_rows) || (in_col1 >= l_n_cols) || ((in_row1 + s_n_rows) > l_n_rows) || ((in_col1 + s_n_cols) > l_n_cols)), "field::subfield(): indices or size out of bounds" ); return subview_field(*this, in_row1, in_col1, s_n_rows, s_n_cols); } //! creation of subview_field (subfield with arbitrary dimensions) template inline const subview_field field::subfield(const uword in_row1, const uword in_col1, const SizeMat& s) const { arma_extra_debug_sigprint(); arma_debug_check( (n_slices >= 2), "field::subfield(): field must be 2D" ); const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; arma_debug_check ( ((in_row1 >= l_n_rows) || (in_col1 >= l_n_cols) || ((in_row1 + s_n_rows) > l_n_rows) || ((in_col1 + s_n_cols) > l_n_cols)), "field::subfield(): indices or size out of bounds" ); return subview_field(*this, in_row1, in_col1, s_n_rows, s_n_cols); } //! creation of subview_field (subfield with arbitrary dimensions) template inline subview_field field::subfield(const uword in_row1, const uword in_col1, const uword in_slice1, const SizeCube& s) { arma_extra_debug_sigprint(); const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; const uword l_n_slices = n_slices; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; const uword sub_n_slices = s.n_slices; arma_debug_check ( ((in_row1 >= l_n_rows) || (in_col1 >= l_n_cols) || (in_slice1 >= l_n_slices) || ((in_row1 + s_n_rows) > l_n_rows) || ((in_col1 + s_n_cols) > l_n_cols) || ((in_slice1 + sub_n_slices) > l_n_slices)), "field::subfield(): indices or size out of bounds" ); return subview_field(*this, in_row1, in_col1, in_slice1, s_n_rows, s_n_cols, sub_n_slices); } //! creation of subview_field (subfield with arbitrary dimensions) template inline const subview_field field::subfield(const uword in_row1, const uword in_col1, const uword in_slice1, const SizeCube& s) const { arma_extra_debug_sigprint(); const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; const uword l_n_slices = n_slices; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; const uword sub_n_slices = s.n_slices; arma_debug_check ( ((in_row1 >= l_n_rows) || (in_col1 >= l_n_cols) || (in_slice1 >= l_n_slices) || ((in_row1 + s_n_rows) > l_n_rows) || ((in_col1 + s_n_cols) > l_n_cols) || ((in_slice1 + sub_n_slices) > l_n_slices)), "field::subfield(): indices or size out of bounds" ); return subview_field(*this, in_row1, in_col1, in_slice1, s_n_rows, s_n_cols, sub_n_slices); } //! creation of subview_field (subfield with arbitrary dimensions) template inline subview_field field::subfield(const span& row_span, const span& col_span) { arma_extra_debug_sigprint(); arma_debug_check( (n_slices >= 2), "field::subfield(): field must be 2D" ); const bool row_all = row_span.whole; const bool col_all = col_span.whole; const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword sub_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword sub_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "field::subfield(): indices out of bounds or incorrectly used" ); return subview_field(*this, in_row1, in_col1, sub_n_rows, sub_n_cols); } //! creation of subview_field (subfield with arbitrary dimensions) template inline const subview_field field::subfield(const span& row_span, const span& col_span) const { arma_extra_debug_sigprint(); arma_debug_check( (n_slices >= 2), "field::subfield(): field must be 2D" ); const bool row_all = row_span.whole; const bool col_all = col_span.whole; const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword sub_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword sub_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "field::subfield(): indices out of bounds or incorrectly used" ); return subview_field(*this, in_row1, in_col1, sub_n_rows, sub_n_cols); } //! creation of subview_field (subfield with arbitrary dimensions) template inline subview_field field::subfield(const span& row_span, const span& col_span, const span& slice_span) { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const bool col_all = col_span.whole; const bool slice_all = slice_span.whole; const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword sub_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword sub_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; const uword in_slice1 = slice_all ? 0 : slice_span.a; const uword in_slice2 = slice_span.b; const uword sub_n_slices = slice_all ? local_n_slices : in_slice2 - in_slice1 + 1; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) || ( slice_all ? false : ((in_slice1 > in_slice2) || (in_slice2 >= local_n_slices)) ) , "field::subfield(): indices out of bounds or incorrectly used" ); return subview_field(*this, in_row1, in_col1, in_slice1, sub_n_rows, sub_n_cols, sub_n_slices); } //! creation of subview_field (subfield with arbitrary dimensions) template inline const subview_field field::subfield(const span& row_span, const span& col_span, const span& slice_span) const { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const bool col_all = col_span.whole; const bool slice_all = slice_span.whole; const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword sub_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword sub_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; const uword in_slice1 = slice_all ? 0 : slice_span.a; const uword in_slice2 = slice_span.b; const uword sub_n_slices = slice_all ? local_n_slices : in_slice2 - in_slice1 + 1; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) || ( slice_all ? false : ((in_slice1 > in_slice2) || (in_slice2 >= local_n_slices)) ) , "field::subfield(): indices out of bounds or incorrectly used" ); return subview_field(*this, in_row1, in_col1, in_slice1, sub_n_rows, sub_n_cols, sub_n_slices); } template inline subview_field field::operator()(const span& row_span, const span& col_span) { arma_extra_debug_sigprint(); return (*this).subfield(row_span, col_span); } template inline const subview_field field::operator()(const span& row_span, const span& col_span) const { arma_extra_debug_sigprint(); return (*this).subfield(row_span, col_span); } template inline subview_field field::operator()(const span& row_span, const span& col_span, const span& slice_span) { arma_extra_debug_sigprint(); return (*this).subfield(row_span, col_span, slice_span); } template inline const subview_field field::operator()(const span& row_span, const span& col_span, const span& slice_span) const { arma_extra_debug_sigprint(); return (*this).subfield(row_span, col_span, slice_span); } template inline subview_field field::operator()(const uword in_row1, const uword in_col1, const SizeMat& s) { arma_extra_debug_sigprint(); return (*this).subfield(in_row1, in_col1, s); } template inline const subview_field field::operator()(const uword in_row1, const uword in_col1, const SizeMat& s) const { arma_extra_debug_sigprint(); return (*this).subfield(in_row1, in_col1, s); } template inline subview_field field::operator()(const uword in_row1, const uword in_col1, const uword in_slice1, const SizeCube& s) { arma_extra_debug_sigprint(); return (*this).subfield(in_row1, in_col1, in_slice1, s); } template inline const subview_field field::operator()(const uword in_row1, const uword in_col1, const uword in_slice1, const SizeCube& s) const { arma_extra_debug_sigprint(); return (*this).subfield(in_row1, in_col1, in_slice1, s); } //! print contents of the field (to the cout stream), //! optionally preceding with a user specified line of text. //! the field class preserves the stream's flags //! but the associated operator<< function for type oT //! may still modify the stream's parameters. //! NOTE: this function assumes that type oT can be printed, //! i.e. the function "std::ostream& operator<< (std::ostream&, const oT&)" //! has been defined. template inline void field::print(const std::string extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = ARMA_DEFAULT_OSTREAM.width(); ARMA_DEFAULT_OSTREAM << extra_text << '\n'; ARMA_DEFAULT_OSTREAM.width(orig_width); } arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this); } //! print contents of the field to a user specified stream, //! optionally preceding with a user specified line of text. //! the field class preserves the stream's flags //! but the associated operator<< function for type oT //! may still modify the stream's parameters. //! NOTE: this function assumes that type oT can be printed, //! i.e. the function "std::ostream& operator<< (std::ostream&, const oT&)" //! has been defined. template inline void field::print(std::ostream& user_stream, const std::string extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = user_stream.width(); user_stream << extra_text << '\n'; user_stream.width(orig_width); } arma_ostream::print(user_stream, *this); } //! fill the field with an object template inline void field::fill(const oT& x) { arma_extra_debug_sigprint(); field& t = *this; for(uword i=0; i inline void field::reset() { arma_extra_debug_sigprint(); init(0,0,0); } //! reset each object template inline void field::reset_objects() { arma_extra_debug_sigprint(); field_aux::reset_objects(*this); } //! returns true if the field has no objects template arma_inline bool field::is_empty() const { return (n_elem == 0); } //! returns true if the given index is currently in range template arma_inline arma_warn_unused bool field::in_range(const uword i) const { return (i < n_elem); } //! returns true if the given start and end indices are currently in range template arma_inline arma_warn_unused bool field::in_range(const span& x) const { arma_extra_debug_sigprint(); if(x.whole == true) { return true; } else { const uword a = x.a; const uword b = x.b; return ( (a <= b) && (b < n_elem) ); } } //! returns true if the given location is currently in range template arma_inline arma_warn_unused bool field::in_range(const uword in_row, const uword in_col) const { return ( (in_row < n_rows) && (in_col < n_cols) ); } template arma_inline arma_warn_unused bool field::in_range(const span& row_span, const uword in_col) const { arma_extra_debug_sigprint(); if(row_span.whole == true) { return (in_col < n_cols); } else { const uword in_row1 = row_span.a; const uword in_row2 = row_span.b; return ( (in_row1 <= in_row2) && (in_row2 < n_rows) && (in_col < n_cols) ); } } template arma_inline arma_warn_unused bool field::in_range(const uword in_row, const span& col_span) const { arma_extra_debug_sigprint(); if(col_span.whole == true) { return (in_row < n_rows); } else { const uword in_col1 = col_span.a; const uword in_col2 = col_span.b; return ( (in_row < n_rows) && (in_col1 <= in_col2) && (in_col2 < n_cols) ); } } template arma_inline arma_warn_unused bool field::in_range(const span& row_span, const span& col_span) const { arma_extra_debug_sigprint(); const uword in_row1 = row_span.a; const uword in_row2 = row_span.b; const uword in_col1 = col_span.a; const uword in_col2 = col_span.b; const bool rows_ok = row_span.whole ? true : ( (in_row1 <= in_row2) && (in_row2 < n_rows) ); const bool cols_ok = col_span.whole ? true : ( (in_col1 <= in_col2) && (in_col2 < n_cols) ); return ( (rows_ok == true) && (cols_ok == true) ); } template arma_inline arma_warn_unused bool field::in_range(const uword in_row, const uword in_col, const SizeMat& s) const { const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; if( (in_row >= l_n_rows) || (in_col >= l_n_cols) || ((in_row + s.n_rows) > l_n_rows) || ((in_col + s.n_cols) > l_n_cols) ) { return false; } else { return true; } } template arma_inline arma_warn_unused bool field::in_range(const uword in_row, const uword in_col, const uword in_slice) const { return ( (in_row < n_rows) && (in_col < n_cols) && (in_slice < n_slices) ); } template arma_inline arma_warn_unused bool field::in_range(const span& row_span, const span& col_span, const span& slice_span) const { arma_extra_debug_sigprint(); const uword in_row1 = row_span.a; const uword in_row2 = row_span.b; const uword in_col1 = col_span.a; const uword in_col2 = col_span.b; const uword in_slice1 = slice_span.a; const uword in_slice2 = slice_span.b; const bool rows_ok = row_span.whole ? true : ( (in_row1 <= in_row2 ) && (in_row2 < n_rows ) ); const bool cols_ok = col_span.whole ? true : ( (in_col1 <= in_col2 ) && (in_col2 < n_cols ) ); const bool slices_ok = slice_span.whole ? true : ( (in_slice1 <= in_slice2) && (in_slice2 < n_slices) ); return ( (rows_ok == true) && (cols_ok == true) && (slices_ok == true) ); } template arma_inline arma_warn_unused bool field::in_range(const uword in_row, const uword in_col, const uword in_slice, const SizeCube& s) const { const uword l_n_rows = n_rows; const uword l_n_cols = n_cols; const uword l_n_slices = n_slices; if( (in_row >= l_n_rows) || (in_col >= l_n_cols) || (in_slice >= l_n_slices) || ((in_row + s.n_rows) > l_n_rows) || ((in_col + s.n_cols) > l_n_cols) || ((in_slice + s.n_slices) > l_n_slices) ) { return false; } else { return true; } } template inline bool field::save(const std::string name, const file_type type, const bool print_status) const { arma_extra_debug_sigprint(); std::string err_msg; const bool save_okay = field_aux::save(*this, name, type, err_msg); if( (print_status == true) && (save_okay == false) ) { if(err_msg.length() > 0) { arma_warn(true, "field::save(): ", err_msg, name); } else { arma_warn(true, "field::save(): couldn't write to ", name); } } return save_okay; } template inline bool field::save(std::ostream& os, const file_type type, const bool print_status) const { arma_extra_debug_sigprint(); std::string err_msg; const bool save_okay = field_aux::save(*this, os, type, err_msg); if( (print_status == true) && (save_okay == false) ) { if(err_msg.length() > 0) { arma_warn(true, "field::save(): ", err_msg, "[ostream]"); } else { arma_warn(true, "field::save(): couldn't write to [ostream]"); } } return save_okay; } template inline bool field::load(const std::string name, const file_type type, const bool print_status) { arma_extra_debug_sigprint(); std::string err_msg; const bool load_okay = field_aux::load(*this, name, type, err_msg); if( (print_status == true) && (load_okay == false) ) { if(err_msg.length() > 0) { arma_warn(true, "field::load(): ", err_msg, name); } else { arma_warn(true, "field::load(): couldn't read from ", name); } } if(load_okay == false) { (*this).reset(); } return load_okay; } template inline bool field::load(std::istream& is, const file_type type, const bool print_status) { arma_extra_debug_sigprint(); std::string err_msg; const bool load_okay = field_aux::load(*this, is, type, err_msg); if( (print_status == true) && (load_okay == false) ) { if(err_msg.length() > 0) { arma_warn(true, "field::load(): ", err_msg, "[istream]"); } else { arma_warn(true, "field::load(): couldn't read from [istream]"); } } if(load_okay == false) { (*this).reset(); } return load_okay; } template inline bool field::quiet_save(const std::string name, const file_type type) const { arma_extra_debug_sigprint(); return (*this).save(name, type, false); } template inline bool field::quiet_save(std::ostream& os, const file_type type) const { arma_extra_debug_sigprint(); return (*this).save(os, type, false); } template inline bool field::quiet_load(const std::string name, const file_type type) { arma_extra_debug_sigprint(); return (*this).load(name, type, false); } template inline bool field::quiet_load(std::istream& is, const file_type type) { arma_extra_debug_sigprint(); return (*this).load(is, type, false); } //! construct a field from a given field template inline void field::init(const field& x) { arma_extra_debug_sigprint(); if(this != &x) { const uword x_n_rows = x.n_rows; const uword x_n_cols = x.n_cols; const uword x_n_slices = x.n_slices; init(x_n_rows, x_n_cols, x_n_slices); field& t = *this; if(x_n_slices == 1) { for(uword ucol=0; ucol < x_n_cols; ++ucol) for(uword urow=0; urow < x_n_rows; ++urow) { t.at(urow,ucol) = x.at(urow,ucol); } } else { for(uword uslice=0; uslice < x_n_slices; ++uslice) for(uword ucol=0; ucol < x_n_cols; ++ucol ) for(uword urow=0; urow < x_n_rows; ++urow ) { t.at(urow,ucol,uslice) = x.at(urow,ucol,uslice); } } } } template inline void field::init(const uword n_rows_in, const uword n_cols_in) { (*this).init(n_rows_in, n_cols_in, 1); } //! internal field construction; if the requested size is small enough, memory from the stack is used. otherwise memory is allocated via 'new' template inline void field::init(const uword n_rows_in, const uword n_cols_in, const uword n_slices_in) { arma_extra_debug_sigprint( arma_boost::format("n_rows_in = %d, n_cols_in = %d, n_slices_in = %d") % n_rows_in % n_cols_in % n_slices_in ); #if (defined(ARMA_USE_CXX11) || defined(ARMA_64BIT_WORD)) const char* error_message = "field::init(): requested size is too large"; #else const char* error_message = "field::init(): requested size is too large; suggest to compile in C++11 mode or enable ARMA_64BIT_WORD"; #endif arma_debug_check ( ( ( (n_rows_in > 0x0FFF) || (n_cols_in > 0x0FFF) || (n_slices_in > 0xFF) ) ? ( (double(n_rows_in) * double(n_cols_in) * double(n_slices_in)) > double(ARMA_MAX_UWORD) ) : false ), error_message ); const uword n_elem_new = n_rows_in * n_cols_in * n_slices_in; if(n_elem == n_elem_new) { // delete_objects(); // create_objects(); access::rw(n_rows) = n_rows_in; access::rw(n_cols) = n_cols_in; access::rw(n_slices) = n_slices_in; } else { delete_objects(); if(n_elem > sizeof(mem_local)/sizeof(oT*) ) { delete [] mem; } if(n_elem_new <= sizeof(mem_local)/sizeof(oT*) ) { mem = mem_local; } else { mem = new(std::nothrow) oT* [n_elem_new]; arma_check_bad_alloc( (mem == 0), "field::init(): out of memory" ); } access::rw(n_elem) = n_elem_new; if(n_elem_new == 0) { access::rw(n_rows) = 0; access::rw(n_cols) = 0; access::rw(n_slices) = 0; } else { access::rw(n_rows) = n_rows_in; access::rw(n_cols) = n_cols_in; access::rw(n_slices) = n_slices_in; } create_objects(); } } template inline void field::delete_objects() { arma_extra_debug_sigprint( arma_boost::format("n_elem = %d") % n_elem ); for(uword i=0; i inline void field::create_objects() { arma_extra_debug_sigprint( arma_boost::format("n_elem = %d") % n_elem ); for(uword i=0; i inline field::iterator::iterator(field& in_M, const bool at_end) : M(in_M) , i( (at_end == false) ? 0 : in_M.n_elem ) { arma_extra_debug_sigprint(); } template inline oT& field::iterator::operator*() { return M[i]; } template inline typename field::iterator& field::iterator::operator++() { ++i; return *this; } template inline void field::iterator::operator++(int) { operator++(); } template inline typename field::iterator& field::iterator::operator--() { if(i > 0) { --i; } return *this; } template inline void field::iterator::operator--(int) { operator--(); } template inline bool field::iterator::operator!=(const typename field::iterator& X) const { return (i != X.i); } template inline bool field::iterator::operator==(const typename field::iterator& X) const { return (i == X.i); } template inline field::const_iterator::const_iterator(const field& in_M, const bool at_end) : M(in_M) , i( (at_end == false) ? 0 : in_M.n_elem ) { arma_extra_debug_sigprint(); } template inline field::const_iterator::const_iterator(const typename field::iterator& X) : M(X.M) , i(X.i) { arma_extra_debug_sigprint(); } template inline const oT& field::const_iterator::operator*() const { return M[i]; } template inline typename field::const_iterator& field::const_iterator::operator++() { ++i; return *this; } template inline void field::const_iterator::operator++(int) { operator++(); } template inline typename field::const_iterator& field::const_iterator::operator--() { if(i > 0) { --i; } return *this; } template inline void field::const_iterator::operator--(int) { operator--(); } template inline bool field::const_iterator::operator!=(const typename field::const_iterator& X) const { return (i != X.i); } template inline bool field::const_iterator::operator==(const typename field::const_iterator& X) const { return (i == X.i); } template inline typename field::iterator field::begin() { arma_extra_debug_sigprint(); return field::iterator(*this); } template inline typename field::const_iterator field::begin() const { arma_extra_debug_sigprint(); return field::const_iterator(*this); } template inline typename field::const_iterator field::cbegin() const { arma_extra_debug_sigprint(); return field::const_iterator(*this); } template inline typename field::iterator field::end() { arma_extra_debug_sigprint(); return field::iterator(*this, true); } template inline typename field::const_iterator field::end() const { arma_extra_debug_sigprint(); return field::const_iterator(*this, true); } template inline typename field::const_iterator field::cend() const { arma_extra_debug_sigprint(); return field::const_iterator(*this, true); } template inline void field::clear() { reset(); } template inline bool field::empty() const { return (n_elem == 0); } template inline uword field::size() const { return n_elem; } // // // template inline void field_aux::reset_objects(field& x) { arma_extra_debug_sigprint(); x.delete_objects(); x.create_objects(); } template inline void field_aux::reset_objects(field< Mat >& x) { arma_extra_debug_sigprint(); for(uword i=0; i inline void field_aux::reset_objects(field< Col >& x) { arma_extra_debug_sigprint(); for(uword i=0; i inline void field_aux::reset_objects(field< Row >& x) { arma_extra_debug_sigprint(); for(uword i=0; i inline void field_aux::reset_objects(field< Cube >& x) { arma_extra_debug_sigprint(); for(uword i=0; i& x) { arma_extra_debug_sigprint(); for(uword i=0; i inline bool field_aux::save(const field&, const std::string&, const file_type, std::string& err_msg) { arma_extra_debug_sigprint(); err_msg = " [saving/loading this type of field is currently not supported] filename = "; return false; } template inline bool field_aux::save(const field&, std::ostream&, const file_type, std::string& err_msg) { arma_extra_debug_sigprint(); err_msg = " [saving/loading this type of field is currently not supported] filename = "; return false; } template inline bool field_aux::load(field&, const std::string&, const file_type, std::string& err_msg) { arma_extra_debug_sigprint(); err_msg = " [saving/loading this type of field is currently not supported] filename = "; return false; } template inline bool field_aux::load(field&, std::istream&, const file_type, std::string& err_msg) { arma_extra_debug_sigprint(); err_msg = " [saving/loading this type of field is currently not supported] filename = "; return false; } template inline bool field_aux::save(const field< Mat >& x, const std::string& name, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); switch(type) { case arma_binary: return diskio::save_arma_binary(x, name); break; case ppm_binary: return diskio::save_ppm_binary(x, name); break; default: err_msg = " [unsupported type] filename = "; return false; } } template inline bool field_aux::save(const field< Mat >& x, std::ostream& os, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); switch(type) { case arma_binary: return diskio::save_arma_binary(x, os); break; case ppm_binary: return diskio::save_ppm_binary(x, os); break; default: err_msg = " [unsupported type] filename = "; return false; } } template inline bool field_aux::load(field< Mat >& x, const std::string& name, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); switch(type) { case auto_detect: return diskio::load_auto_detect(x, name, err_msg); break; case arma_binary: return diskio::load_arma_binary(x, name, err_msg); break; case ppm_binary: return diskio::load_ppm_binary(x, name, err_msg); break; default: err_msg = " [unsupported type] filename = "; return false; } } template inline bool field_aux::load(field< Mat >& x, std::istream& is, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); switch(type) { case auto_detect: return diskio::load_auto_detect(x, is, err_msg); break; case arma_binary: return diskio::load_arma_binary(x, is, err_msg); break; case ppm_binary: return diskio::load_ppm_binary(x, is, err_msg); break; default: err_msg = " [unsupported type] filename = "; return false; } } template inline bool field_aux::save(const field< Col >& x, const std::string& name, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); switch(type) { case arma_binary: return diskio::save_arma_binary(x, name); break; case ppm_binary: return diskio::save_ppm_binary(x, name); break; default: err_msg = " [unsupported type] filename = "; return false; } } template inline bool field_aux::save(const field< Col >& x, std::ostream& os, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); switch(type) { case arma_binary: return diskio::save_arma_binary(x, os); break; case ppm_binary: return diskio::save_ppm_binary(x, os); break; default: err_msg = " [unsupported type] filename = "; return false; } } template inline bool field_aux::load(field< Col >& x, const std::string& name, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); switch(type) { case auto_detect: return diskio::load_auto_detect(x, name, err_msg); break; case arma_binary: return diskio::load_arma_binary(x, name, err_msg); break; case ppm_binary: return diskio::load_ppm_binary(x, name, err_msg); break; default: err_msg = " [unsupported type] filename = "; return false; } } template inline bool field_aux::load(field< Col >& x, std::istream& is, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); switch(type) { case auto_detect: return diskio::load_auto_detect(x, is, err_msg); break; case arma_binary: return diskio::load_arma_binary(x, is, err_msg); break; case ppm_binary: return diskio::load_ppm_binary(x, is, err_msg); break; default: err_msg = " [unsupported type] filename = "; return false; } } template inline bool field_aux::save(const field< Row >& x, const std::string& name, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); switch(type) { case arma_binary: return diskio::save_arma_binary(x, name); break; case ppm_binary: return diskio::save_ppm_binary(x, name); break; default: err_msg = " [unsupported type] filename = "; return false; } } template inline bool field_aux::save(const field< Row >& x, std::ostream& os, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); switch(type) { case arma_binary: return diskio::save_arma_binary(x, os); break; case ppm_binary: return diskio::save_ppm_binary(x, os); break; default: err_msg = " [unsupported type] filename = "; return false; } } template inline bool field_aux::load(field< Row >& x, const std::string& name, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); switch(type) { case auto_detect: return diskio::load_auto_detect(x, name, err_msg); break; case arma_binary: return diskio::load_arma_binary(x, name, err_msg); break; case ppm_binary: return diskio::load_ppm_binary(x, name, err_msg); break; default: err_msg = " [unsupported type] filename = "; return false; } } template inline bool field_aux::load(field< Row >& x, std::istream& is, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); switch(type) { case auto_detect: return diskio::load_auto_detect(x, is, err_msg); break; case arma_binary: return diskio::load_arma_binary(x, is, err_msg); break; case ppm_binary: return diskio::load_ppm_binary(x, is, err_msg); break; default: err_msg = " [unsupported type] filename = "; return false; } } template inline bool field_aux::save(const field< Cube >& x, const std::string& name, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); switch(type) { case arma_binary: return diskio::save_arma_binary(x, name); break; default: err_msg = " [unsupported type] filename = "; return false; } } template inline bool field_aux::save(const field< Cube >& x, std::ostream& os, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); switch(type) { case arma_binary: return diskio::save_arma_binary(x, os); break; default: err_msg = " [unsupported type] filename = "; return false; } } template inline bool field_aux::load(field< Cube >& x, const std::string& name, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); switch(type) { case auto_detect: case arma_binary: return diskio::load_arma_binary(x, name, err_msg); break; default: err_msg = " [unsupported type] filename = "; return false; } } template inline bool field_aux::load(field< Cube >& x, std::istream& is, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); switch(type) { case auto_detect: case arma_binary: return diskio::load_arma_binary(x, is, err_msg); break; default: err_msg = " [unsupported type] filename = "; return false; } } inline bool field_aux::save(const field< std::string >& x, const std::string& name, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); arma_ignore(type); err_msg.clear(); return diskio::save_std_string(x, name); } inline bool field_aux::save(const field< std::string >& x, std::ostream& os, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); arma_ignore(type); err_msg.clear(); return diskio::save_std_string(x, os); } inline bool field_aux::load(field< std::string >& x, const std::string& name, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); arma_ignore(type); return diskio::load_std_string(x, name, err_msg); } inline bool field_aux::load(field< std::string >& x, std::istream& is, const file_type type, std::string& err_msg) { arma_extra_debug_sigprint(); arma_ignore(type); return diskio::load_std_string(x, is, err_msg); } #ifdef ARMA_EXTRA_FIELD_MEAT #include ARMA_INCFILE_WRAP(ARMA_EXTRA_FIELD_MEAT) #endif //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_accu.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // Copyright (C) 2012 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_accu //! @{ template arma_hot inline typename T1::elem_type accu_proxy_linear(const Proxy& P) { typedef typename T1::elem_type eT; const uword n_elem = P.get_n_elem(); #if defined(__FINITE_MATH_ONLY__) && (__FINITE_MATH_ONLY__ > 0) { eT val = eT(0); if(P.is_aligned()) { typename Proxy::aligned_ea_type A = P.get_aligned_ea(); for(uword i=0; i::ea_type A = P.get_ea(); for(uword i=0; i::ea_type A = P.get_ea(); uword i,j; for(i=0, j=1; j < n_elem; i+=2, j+=2) { val1 += A[i]; val2 += A[j]; } if(i < n_elem) { val1 += A[i]; // equivalent to: val1 += A[n_elem-1]; } return (val1 + val2); } #endif } template arma_hot inline typename T1::elem_type accu_proxy_mat(const Proxy& P) { const quasi_unwrap::stored_type> tmp(P.Q); return arrayops::accumulate(tmp.M.memptr(), tmp.M.n_elem); } template arma_hot inline typename T1::elem_type accu_proxy_at(const Proxy& P) { typedef typename T1::elem_type eT; const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); eT val = eT(0); if(n_rows != 1) { eT val1 = eT(0); eT val2 = eT(0); for(uword col=0; col < n_cols; ++col) { uword i,j; for(i=0, j=1; j < n_rows; i+=2, j+=2) { val1 += P.at(i,col); val2 += P.at(j,col); } if(i < n_rows) { val1 += P.at(i,col); } } val = val1 + val2; } else { for(uword col=0; col < n_cols; ++col) { val += P.at(0,col); } } return val; } //! accumulate the elements of a matrix template arma_hot inline typename enable_if2< is_arma_type::value, typename T1::elem_type >::result accu(const T1& X) { arma_extra_debug_sigprint(); const Proxy P(X); const bool have_direct_mem = (is_Mat::stored_type>::value) || (is_subview_col::stored_type>::value); return (Proxy::prefer_at_accessor) ? accu_proxy_at(P) : (have_direct_mem ? accu_proxy_mat(P) : accu_proxy_linear(P)); } //! explicit handling of Hamming norm (also known as zero norm) template inline arma_warn_unused uword accu(const mtOp& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const eT val = X.aux; const Proxy P(X.m); uword n_nonzero = 0; if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; ea_type A = P.get_ea(); const uword n_elem = P.get_n_elem(); for(uword i=0; i inline arma_warn_unused uword accu(const mtOp& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const eT val = X.aux; const Proxy P(X.m); uword n_nonzero = 0; if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; ea_type A = P.get_ea(); const uword n_elem = P.get_n_elem(); for(uword i=0; i arma_hot arma_pure arma_warn_unused inline eT accu(const subview& X) { arma_extra_debug_sigprint(); const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; eT val = eT(0); if(X_n_rows == 1) { typedef subview_row sv_type; const sv_type& sv = reinterpret_cast(X); // subview_row is a child class of subview and has no extra data const Proxy P(sv); val = accu_proxy_linear(P); } else if(X_n_cols == 1) { val = arrayops::accumulate( X.colptr(0), X_n_rows ); } else { for(uword col=0; col < X_n_cols; ++col) { val += arrayops::accumulate( X.colptr(col), X_n_rows ); } } return val; } template arma_hot arma_pure arma_warn_unused inline eT accu(const subview_col& X) { arma_extra_debug_sigprint(); return arrayops::accumulate( X.colptr(0), X.n_rows ); } //! accumulate the elements of a cube template arma_hot arma_warn_unused inline typename T1::elem_type accu(const BaseCube& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename ProxyCube::ea_type ea_type; const ProxyCube A(X.get_ref()); if(is_Cube::stored_type>::value) { unwrap_cube::stored_type> tmp(A.Q); return arrayops::accumulate(tmp.M.memptr(), tmp.M.n_elem); } if(ProxyCube::prefer_at_accessor == false) { ea_type P = A.get_ea(); const uword n_elem = A.get_n_elem(); eT val1 = eT(0); eT val2 = eT(0); uword i,j; for(i=0, j=1; j arma_inline arma_warn_unused const typename arma_scalar_only::result & accu(const T& x) { return x; } //! accumulate values in a sparse object template arma_hot inline arma_warn_unused typename enable_if2::value, typename T1::elem_type>::result accu(const T1& x) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const SpProxy p(x); if(SpProxy::must_use_iterator == false) { // direct counting return arrayops::accumulate(p.get_values(), p.get_n_nonzero()); } else { typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); eT result = eT(0); while(it != it_end) { result += (*it); ++it; } return result; } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_all.hpp ================================================ // Copyright (C) 2013-2015 Conrad Sanderson // Copyright (C) 2013-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_all //! @{ template arma_inline const mtOp all ( const T1& X, const uword dim = 0, const typename enable_if< is_arma_type::value == true >::result* junk1 = 0, const typename enable_if< resolves_to_vector::value == false >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return mtOp(X, dim, 0); } template arma_inline const mtOp all ( const T1& X, const uword dim, const typename enable_if::value == true>::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return mtOp(X, dim, 0); } template inline arma_warn_unused bool all ( const T1& X, const arma_empty_class junk1 = arma_empty_class(), const typename enable_if::value == true>::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return op_all::all_vec(X); } template inline arma_warn_unused bool all(const mtOp& in) { arma_extra_debug_sigprint(); arma_extra_debug_print("all(): two consecutive calls to all() detected"); return op_all::all_vec(in.m); } template arma_inline const Op< mtOp, op_all> all(const mtOp& in, const uword dim) { arma_extra_debug_sigprint(); return mtOp, op_all>(in, dim, 0); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_any.hpp ================================================ // Copyright (C) 2013-2015 Conrad Sanderson // Copyright (C) 2013-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_any //! @{ template arma_inline const mtOp any ( const T1& X, const uword dim = 0, const typename enable_if< is_arma_type::value == true >::result* junk1 = 0, const typename enable_if< resolves_to_vector::value == false >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return mtOp(X, dim, 0); } template arma_inline const mtOp any ( const T1& X, const uword dim, const typename enable_if::value == true>::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return mtOp(X, dim, 0); } template inline arma_warn_unused bool any ( const T1& X, const arma_empty_class junk1 = arma_empty_class(), const typename enable_if::value == true>::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return op_any::any_vec(X); } template inline arma_warn_unused bool any(const mtOp& in) { arma_extra_debug_sigprint(); arma_extra_debug_print("any(): two consecutive calls to any() detected"); return op_any::any_vec(in.m); } template arma_inline const Op< mtOp, op_any> any(const mtOp& in, const uword dim) { arma_extra_debug_sigprint(); return mtOp, op_any>(in, dim, 0); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_as_scalar.hpp ================================================ // Copyright (C) 2010-2015 Conrad Sanderson // Copyright (C) 2010-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_as_scalar //! @{ template struct as_scalar_redirect { template inline static typename T1::elem_type apply(const T1& X); }; template<> struct as_scalar_redirect<2> { template inline static typename T1::elem_type apply(const Glue& X); }; template<> struct as_scalar_redirect<3> { template inline static typename T1::elem_type apply(const Glue< Glue, T3, glue_times>& X); }; template template inline typename T1::elem_type as_scalar_redirect::apply(const T1& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(X); if(P.get_n_elem() != 1) { arma_debug_check(true, "as_scalar(): expression doesn't evaluate to exactly one element"); return Datum::nan; } return (Proxy::prefer_at_accessor) ? P.at(0,0) : P[0]; } template inline typename T1::elem_type as_scalar_redirect<2>::apply(const Glue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; // T1 must result in a matrix with one row // T2 must result in a matrix with one column const bool has_all_mat = (is_Mat::value || is_Mat_trans::value) && (is_Mat::value || is_Mat_trans::value); const bool prefer_at_accessor = Proxy::prefer_at_accessor || Proxy::prefer_at_accessor; const bool do_partial_unwrap = has_all_mat || prefer_at_accessor; if(do_partial_unwrap == true) { const partial_unwrap tmp1(X.A); const partial_unwrap tmp2(X.B); typedef typename partial_unwrap::stored_type TA; typedef typename partial_unwrap::stored_type TB; const TA& A = tmp1.M; const TB& B = tmp2.M; const uword A_n_rows = (tmp1.do_trans == false) ? (TA::is_row ? 1 : A.n_rows) : (TA::is_col ? 1 : A.n_cols); const uword A_n_cols = (tmp1.do_trans == false) ? (TA::is_col ? 1 : A.n_cols) : (TA::is_row ? 1 : A.n_rows); const uword B_n_rows = (tmp2.do_trans == false) ? (TB::is_row ? 1 : B.n_rows) : (TB::is_col ? 1 : B.n_cols); const uword B_n_cols = (tmp2.do_trans == false) ? (TB::is_col ? 1 : B.n_cols) : (TB::is_row ? 1 : B.n_rows); arma_debug_check( (A_n_rows != 1) || (B_n_cols != 1) || (A_n_cols != B_n_rows), "as_scalar(): incompatible dimensions" ); const eT val = op_dot::direct_dot(A.n_elem, A.memptr(), B.memptr()); return (tmp1.do_times || tmp2.do_times) ? (val * tmp1.get_val() * tmp2.get_val()) : val; } else { const Proxy PA(X.A); const Proxy PB(X.B); arma_debug_check ( (PA.get_n_rows() != 1) || (PB.get_n_cols() != 1) || (PA.get_n_cols() != PB.get_n_rows()), "as_scalar(): incompatible dimensions" ); return op_dot::apply_proxy(PA,PB); } } template inline typename T1::elem_type as_scalar_redirect<3>::apply(const Glue< Glue, T3, glue_times >& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; // T1 * T2 must result in a matrix with one row // T3 must result in a matrix with one column typedef typename strip_inv ::stored_type T2_stripped_1; typedef typename strip_diagmat::stored_type T2_stripped_2; const strip_inv strip1(X.A.B); const strip_diagmat strip2(strip1.M); const bool tmp2_do_inv = strip1.do_inv; const bool tmp2_do_diagmat = strip2.do_diagmat; if(tmp2_do_diagmat == false) { const Mat tmp(X); if(tmp.n_elem != 1) { arma_debug_check(true, "as_scalar(): expression doesn't evaluate to exactly one element"); return Datum::nan; } return tmp[0]; } else { const partial_unwrap tmp1(X.A.A); const partial_unwrap tmp2(strip2.M); const partial_unwrap tmp3(X.B); const Mat& A = tmp1.M; const Mat& B = tmp2.M; const Mat& C = tmp3.M; const uword A_n_rows = (tmp1.do_trans == false) ? A.n_rows : A.n_cols; const uword A_n_cols = (tmp1.do_trans == false) ? A.n_cols : A.n_rows; const bool B_is_vec = B.is_vec(); const uword B_n_rows = (B_is_vec == true) ? B.n_elem : ( (tmp2.do_trans == false) ? B.n_rows : B.n_cols ); const uword B_n_cols = (B_is_vec == true) ? B.n_elem : ( (tmp2.do_trans == false) ? B.n_cols : B.n_rows ); const uword C_n_rows = (tmp3.do_trans == false) ? C.n_rows : C.n_cols; const uword C_n_cols = (tmp3.do_trans == false) ? C.n_cols : C.n_rows; const eT val = tmp1.get_val() * tmp2.get_val() * tmp3.get_val(); arma_debug_check ( (A_n_rows != 1) || (C_n_cols != 1) || (A_n_cols != B_n_rows) || (B_n_cols != C_n_rows) , "as_scalar(): incompatible dimensions" ); if(B_is_vec == true) { if(tmp2_do_inv == true) { return val * op_dotext::direct_rowvec_invdiagvec_colvec(A.mem, B, C.mem); } else { return val * op_dot::direct_dot(A.n_elem, A.mem, B.mem, C.mem); } } else { if(tmp2_do_inv == true) { return val * op_dotext::direct_rowvec_invdiagmat_colvec(A.mem, B, C.mem); } else { return val * op_dotext::direct_rowvec_diagmat_colvec(A.mem, B, C.mem); } } } } template inline typename T1::elem_type as_scalar_diag(const Base& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap tmp(X.get_ref()); const Mat& A = tmp.M; if(A.n_elem != 1) { arma_debug_check(true, "as_scalar(): expression doesn't evaluate to exactly one element"); return Datum::nan; } return A.mem[0]; } template inline typename T1::elem_type as_scalar_diag(const Glue< Glue, T3, glue_times >& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; // T1 * T2 must result in a matrix with one row // T3 must result in a matrix with one column typedef typename strip_diagmat::stored_type T2_stripped; const strip_diagmat strip(X.A.B); const partial_unwrap tmp1(X.A.A); const partial_unwrap tmp2(strip.M); const partial_unwrap tmp3(X.B); const Mat& A = tmp1.M; const Mat& B = tmp2.M; const Mat& C = tmp3.M; const uword A_n_rows = (tmp1.do_trans == false) ? A.n_rows : A.n_cols; const uword A_n_cols = (tmp1.do_trans == false) ? A.n_cols : A.n_rows; const bool B_is_vec = B.is_vec(); const uword B_n_rows = (B_is_vec == true) ? B.n_elem : ( (tmp2.do_trans == false) ? B.n_rows : B.n_cols ); const uword B_n_cols = (B_is_vec == true) ? B.n_elem : ( (tmp2.do_trans == false) ? B.n_cols : B.n_rows ); const uword C_n_rows = (tmp3.do_trans == false) ? C.n_rows : C.n_cols; const uword C_n_cols = (tmp3.do_trans == false) ? C.n_cols : C.n_rows; const eT val = tmp1.get_val() * tmp2.get_val() * tmp3.get_val(); arma_debug_check ( (A_n_rows != 1) || (C_n_cols != 1) || (A_n_cols != B_n_rows) || (B_n_cols != C_n_rows) , "as_scalar(): incompatible dimensions" ); if(B_is_vec == true) { return val * op_dot::direct_dot(A.n_elem, A.mem, B.mem, C.mem); } else { return val * op_dotext::direct_rowvec_diagmat_colvec(A.mem, B, C.mem); } } template arma_inline arma_warn_unused typename T1::elem_type as_scalar(const Glue& X, const typename arma_not_cx::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); if(is_glue_times_diag::value == false) { const sword N_mat = 1 + depth_lhs< glue_times, Glue >::num; arma_extra_debug_print(arma_boost::format("N_mat = %d") % N_mat); return as_scalar_redirect::apply(X); } else { return as_scalar_diag(X); } } template inline arma_warn_unused typename T1::elem_type as_scalar(const Base& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(X.get_ref()); if(P.get_n_elem() != 1) { arma_debug_check(true, "as_scalar(): expression doesn't evaluate to exactly one element"); return Datum::nan; } return (Proxy::prefer_at_accessor) ? P.at(0,0) : P[0]; } // ensure the following two functions are aware of each other template inline arma_warn_unused typename T1::elem_type as_scalar(const eOp& X); template inline arma_warn_unused typename T1::elem_type as_scalar(const eGlue& X); template inline arma_warn_unused typename T1::elem_type as_scalar(const eOp& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const eT val = as_scalar(X.P.Q); return eop_core::process(val, X.aux); } template inline arma_warn_unused typename T1::elem_type as_scalar(const eGlue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const eT a = as_scalar(X.P1.Q); const eT b = as_scalar(X.P2.Q); // the optimiser will keep only one return statement if(is_same_type::yes) { return a + b; } else if(is_same_type::yes) { return a - b; } else if(is_same_type::yes) { return a / b; } else if(is_same_type::yes) { return a * b; } } template inline arma_warn_unused typename T1::elem_type as_scalar(const BaseCube& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const ProxyCube P(X.get_ref()); if(P.get_n_elem() != 1) { arma_debug_check(true, "as_scalar(): expression doesn't evaluate to exactly one element"); return Datum::nan; } return (ProxyCube::prefer_at_accessor) ? P.at(0,0,0) : P[0]; } template arma_inline arma_warn_unused const typename arma_scalar_only::result & as_scalar(const T& x) { return x; } template inline arma_warn_unused typename T1::elem_type as_scalar(const SpBase& X) { typedef typename T1::elem_type eT; const unwrap_spmat tmp(X.get_ref()); const SpMat& A = tmp.M; if(A.n_elem != 1) { arma_debug_check(true, "as_scalar(): expression doesn't evaluate to exactly one element"); return Datum::nan; } return A.at(0,0); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_chol.hpp ================================================ // Copyright (C) 2009-2014 Conrad Sanderson // Copyright (C) 2009-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_chol //! @{ template inline const Op chol ( const Base& X, const char* layout = "upper", const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); const char sig = (layout != NULL) ? layout[0] : char(0); arma_debug_check( ((sig != 'u') && (sig != 'l')), "chol(): layout must be \"upper\" or \"lower\"" ); return Op(X.get_ref(), ((sig == 'u') ? 0 : 1), 0 ); } template inline bool chol ( Mat& out, const Base& X, const char* layout = "upper", const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); try { out = chol(X, layout); } catch(std::runtime_error&) { return false; } return true; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_clamp.hpp ================================================ // Copyright (C) 2014 Conrad Sanderson // Copyright (C) 2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_clamp //! @{ template inline typename enable_if2 < is_arma_type::value && is_cx::no, const mtOp >::result clamp(const T1& X, const typename T1::elem_type min_val, const typename T1::elem_type max_val) { arma_extra_debug_sigprint(); arma_debug_check( (min_val > max_val), "clamp(): min_val has to be smaller than max_val" ); return mtOp(mtOp_dual_aux_indicator(), X, min_val, max_val); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_cond.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_cond //! @{ template arma_warn_unused inline typename enable_if2::value, typename T1::pod_type>::result cond(const Base& X) { arma_extra_debug_sigprint(); typedef typename T1::pod_type T; Col S; const bool status = auxlib::svd_dc(S, X); if(status == false) { arma_bad("cond(): failed to converge", false); return T(0); } if(S.n_elem > 0) { return T( max(S) / min(S) ); } else { return T(0); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_conv.hpp ================================================ // Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_conv //! @{ //! Convolution, which is also equivalent to polynomial multiplication and FIR digital filtering. template inline const Glue conv(const Base& A, const Base& B) { arma_extra_debug_sigprint(); return Glue(A.get_ref(), B.get_ref()); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_conv_to.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_conv_to //! @{ //! conversion from Armadillo Base and BaseCube objects to scalars //! (kept only for compatibility with old code; use as_scalar() instead for Base objects like Mat) template class conv_to { public: template inline static out_eT from(const Base& in, const typename arma_not_cx::result* junk = 0); template inline static out_eT from(const Base& in, const typename arma_cx_only::result* junk = 0); template inline static out_eT from(const BaseCube& in, const typename arma_not_cx::result* junk = 0); template inline static out_eT from(const BaseCube& in, const typename arma_cx_only::result* junk = 0); }; template template inline out_eT conv_to::from(const Base& in, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); arma_type_check(( is_supported_elem_type::value == false )); const Proxy P(in.get_ref()); arma_debug_check( (P.get_n_elem() != 1), "conv_to(): given object doesn't have exactly one element" ); return out_eT(Proxy::prefer_at_accessor ? P.at(0,0) : P[0]); } template template inline out_eT conv_to::from(const Base& in, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); arma_type_check(( is_supported_elem_type::value == false )); const Proxy P(in.get_ref()); arma_debug_check( (P.get_n_elem() != 1), "conv_to(): given object doesn't have exactly one element" ); out_eT out; arrayops::convert_cx_scalar(out, (Proxy::prefer_at_accessor ? P.at(0,0) : P[0])); return out; } template template inline out_eT conv_to::from(const BaseCube& in, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); arma_type_check(( is_supported_elem_type::value == false )); const ProxyCube P(in.get_ref()); arma_debug_check( (P.get_n_elem() != 1), "conv_to(): given object doesn't have exactly one element" ); return out_eT(ProxyCube::prefer_at_accessor ? P.at(0,0,0) : P[0]); } template template inline out_eT conv_to::from(const BaseCube& in, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); arma_type_check(( is_supported_elem_type::value == false )); const ProxyCube P(in.get_ref()); arma_debug_check( (P.get_n_elem() != 1), "conv_to(): given object doesn't have exactly one element" ); out_eT out; arrayops::convert_cx_scalar(out, (ProxyCube::prefer_at_accessor ? P.at(0,0,0) : P[0])); return out; } //! conversion to Armadillo matrices from Armadillo Base objects, as well as from std::vector template class conv_to< Mat > { public: template inline static Mat from(const Base& in, const typename arma_not_cx::result* junk = 0); template inline static Mat from(const Base& in, const typename arma_cx_only::result* junk = 0); template inline static Mat from(const SpBase& in); template inline static Mat from(const std::vector& in, const typename arma_not_cx::result* junk = 0); template inline static Mat from(const std::vector& in, const typename arma_cx_only::result* junk = 0); }; template template inline Mat conv_to< Mat >::from(const Base& in, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const quasi_unwrap tmp(in.get_ref()); const Mat& X = tmp.M; Mat out(X.n_rows, X.n_cols); arrayops::convert( out.memptr(), X.memptr(), X.n_elem ); return out; } template template inline Mat conv_to< Mat >::from(const Base& in, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const quasi_unwrap tmp(in.get_ref()); const Mat& X = tmp.M; Mat out(X.n_rows, X.n_cols); arrayops::convert_cx( out.memptr(), X.memptr(), X.n_elem ); return out; } template template inline Mat conv_to< Mat >::from(const SpBase& in) { arma_extra_debug_sigprint(); return Mat(in.get_ref()); } template template inline Mat conv_to< Mat >::from(const std::vector& in, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const uword N = uword( in.size() ); Mat out(N, 1); if(N > 0) { arrayops::convert( out.memptr(), &(in[0]), N ); } return out; } template template inline Mat conv_to< Mat >::from(const std::vector& in, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const uword N = uword( in.size() ); Mat out(N, 1); if(N > 0) { arrayops::convert_cx( out.memptr(), &(in[0]), N ); } return out; } //! conversion to Armadillo row vectors from Armadillo Base objects, as well as from std::vector template class conv_to< Row > { public: template inline static Row from(const Base& in, const typename arma_not_cx::result* junk = 0); template inline static Row from(const Base& in, const typename arma_cx_only::result* junk = 0); template inline static Row from(const std::vector& in, const typename arma_not_cx::result* junk = 0); template inline static Row from(const std::vector& in, const typename arma_cx_only::result* junk = 0); }; template template inline Row conv_to< Row >::from(const Base& in, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const quasi_unwrap tmp(in.get_ref()); const Mat& X = tmp.M; arma_debug_check( ( (X.is_vec() == false) && (X.is_empty() == false) ), "conv_to(): given object can't be interpreted as a vector" ); Row out(X.n_elem); arrayops::convert( out.memptr(), X.memptr(), X.n_elem ); return out; } template template inline Row conv_to< Row >::from(const Base& in, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const quasi_unwrap tmp(in.get_ref()); const Mat& X = tmp.M; arma_debug_check( ( (X.is_vec() == false) && (X.is_empty() == false) ), "conv_to(): given object can't be interpreted as a vector" ); Row out(X.n_rows, X.n_cols); arrayops::convert_cx( out.memptr(), X.memptr(), X.n_elem ); return out; } template template inline Row conv_to< Row >::from(const std::vector& in, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const uword N = uword( in.size() ); Row out(N); if(N > 0) { arrayops::convert( out.memptr(), &(in[0]), N ); } return out; } template template inline Row conv_to< Row >::from(const std::vector& in, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const uword N = uword( in.size() ); Row out(N); if(N > 0) { arrayops::convert_cx( out.memptr(), &(in[0]), N ); } return out; } //! conversion to Armadillo column vectors from Armadillo Base objects, as well as from std::vector template class conv_to< Col > { public: template inline static Col from(const Base& in, const typename arma_not_cx::result* junk = 0); template inline static Col from(const Base& in, const typename arma_cx_only::result* junk = 0); template inline static Col from(const std::vector& in, const typename arma_not_cx::result* junk = 0); template inline static Col from(const std::vector& in, const typename arma_cx_only::result* junk = 0); }; template template inline Col conv_to< Col >::from(const Base& in, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const quasi_unwrap tmp(in.get_ref()); const Mat& X = tmp.M; arma_debug_check( ( (X.is_vec() == false) && (X.is_empty() == false) ), "conv_to(): given object can't be interpreted as a vector" ); Col out(X.n_elem); arrayops::convert( out.memptr(), X.memptr(), X.n_elem ); return out; } template template inline Col conv_to< Col >::from(const Base& in, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const quasi_unwrap tmp(in.get_ref()); const Mat& X = tmp.M; arma_debug_check( ( (X.is_vec() == false) && (X.is_empty() == false) ), "conv_to(): given object can't be interpreted as a vector" ); Col out(X.n_rows, X.n_cols); arrayops::convert_cx( out.memptr(), X.memptr(), X.n_elem ); return out; } template template inline Col conv_to< Col >::from(const std::vector& in, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const uword N = uword( in.size() ); Col out(N); if(N > 0) { arrayops::convert( out.memptr(), &(in[0]), N ); } return out; } template template inline Col conv_to< Col >::from(const std::vector& in, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const uword N = uword( in.size() ); Col out(N); if(N > 0) { arrayops::convert_cx( out.memptr(), &(in[0]), N ); } return out; } template class conv_to< SpMat > { public: template inline static SpMat from(const Base& in); }; template template inline SpMat conv_to< SpMat >::from(const Base& in) { arma_extra_debug_sigprint(); return SpMat(in.get_ref()); } //! conversion to Armadillo cubes from Armadillo BaseCube objects template class conv_to< Cube > { public: template inline static Cube from(const BaseCube& in, const typename arma_not_cx::result* junk = 0); template inline static Cube from(const BaseCube& in, const typename arma_cx_only::result* junk = 0); }; template template inline Cube conv_to< Cube >::from(const BaseCube& in, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const unwrap_cube tmp( in.get_ref() ); const Cube& X = tmp.M; Cube out(X.n_rows, X.n_cols, X.n_slices); arrayops::convert( out.memptr(), X.memptr(), X.n_elem ); return out; } template template inline Cube conv_to< Cube >::from(const BaseCube& in, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const unwrap_cube tmp( in.get_ref() ); const Cube& X = tmp.M; Cube out(X.n_rows, X.n_cols, X.n_slices); arrayops::convert_cx( out.memptr(), X.memptr(), X.n_elem ); return out; } //! conversion to std::vector from Armadillo Base objects template class conv_to< std::vector > { public: template inline static std::vector from(const Base& in, const typename arma_not_cx::result* junk = 0); template inline static std::vector from(const Base& in, const typename arma_cx_only::result* junk = 0); }; template template inline std::vector conv_to< std::vector >::from(const Base& in, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const quasi_unwrap tmp(in.get_ref()); const Mat& X = tmp.M; arma_debug_check( ( (X.is_vec() == false) && (X.is_empty() == false) ), "conv_to(): given object can't be interpreted as a vector" ); const uword N = X.n_elem; std::vector out(N); if(N > 0) { arrayops::convert( &(out[0]), X.memptr(), N ); } return out; } template template inline std::vector conv_to< std::vector >::from(const Base& in, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const quasi_unwrap tmp(in.get_ref()); const Mat& X = tmp.M; arma_debug_check( ( (X.is_vec() == false) && (X.is_empty() == false) ), "conv_to(): given object can't be interpreted as a vector" ); const uword N = X.n_elem; std::vector out(N); if(N > 0) { arrayops::convert_cx( &(out[0]), X.memptr(), N ); } return out; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_cor.hpp ================================================ // Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_cor //! @{ template inline const Op cor(const Base& X, const uword norm_type = 0) { arma_extra_debug_sigprint(); arma_debug_check( (norm_type > 1), "cor(): parameter 'norm_type' must be 0 or 1" ); return Op(X.get_ref(), norm_type, 0); } template inline const Glue cor(const Base& A, const Base& B, const uword norm_type = 0) { arma_extra_debug_sigprint(); arma_debug_check( (norm_type > 1), "cor(): parameter 'norm_type' must be 0 or 1" ); return Glue(A.get_ref(), B.get_ref(), norm_type); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_cov.hpp ================================================ // Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_cov //! @{ template inline const Op cov(const Base& X, const uword norm_type = 0) { arma_extra_debug_sigprint(); arma_debug_check( (norm_type > 1), "cov(): parameter 'norm_type' must be 0 or 1" ); return Op(X.get_ref(), norm_type, 0); } template inline const Glue cov(const Base& A, const Base& B, const uword norm_type = 0) { arma_extra_debug_sigprint(); arma_debug_check( (norm_type > 1), "cov(): parameter 'norm_type' must be 0 or 1" ); return Glue(A.get_ref(), B.get_ref(), norm_type); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_cross.hpp ================================================ // Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_cross //! @{ //! cross product (only valid for 3 dimensional vectors) template inline const Glue cross(const Base& X, const Base& Y) { arma_extra_debug_sigprint(); return Glue(X.get_ref(), Y.get_ref()); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_cumsum.hpp ================================================ // Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_cumsum //! @{ template arma_inline const Op cumsum ( const T1& X, const uword dim = 0, const typename enable_if< is_arma_type::value == true >::result* junk1 = 0, const typename enable_if< resolves_to_vector::value == false >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return Op(X, dim, 0); } template arma_inline const Op cumsum ( const T1& X, const uword dim, const typename enable_if::value == true>::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return Op(X, dim, 0); } template arma_inline const Op cumsum ( const T1& X, const arma_empty_class junk1 = arma_empty_class(), const typename enable_if::value == true>::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return Op(X); } template arma_inline const Op, op_cumsum_mat> cumsum ( const Op& X, const uword dim, const typename enable_if::value == true>::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return Op, op_cumsum_mat>(X, dim, 0); } template arma_inline const Op, op_cumsum_vec> cumsum ( const Op& X, const arma_empty_class junk1 = arma_empty_class(), const typename enable_if::value == true>::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return Op, op_cumsum_vec>(X); } template arma_inline arma_warn_unused const typename arma_scalar_only::result & cumsum(const T& x) { return x; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_det.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_det //! @{ //! determinant of mat template inline arma_warn_unused typename T1::elem_type det ( const Base& X, const bool slow = false, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return auxlib::det(X, slow); } template inline arma_warn_unused typename T1::elem_type det ( const Base& X, const char* method, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'f')), "det(): unknown method specified" ); const bool slow = (sig == 's'); return auxlib::det(X, slow); } //! determinant of diagmat template inline arma_warn_unused typename T1::elem_type det ( const Op& X, const bool slow = false ) { arma_extra_debug_sigprint(); arma_ignore(slow); typedef typename T1::elem_type eT; const diagmat_proxy A(X.m); const uword N = A.n_elem; eT val1 = eT(1); eT val2 = eT(1); uword i,j; for(i=0, j=1; j inline arma_warn_unused typename T1::elem_type det ( const Op& X, const char* method ) { arma_extra_debug_sigprint(); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'f')), "det(): unknown method specified" ); return det(X, false); } //! determinant of a triangular matrix template inline arma_warn_unused typename T1::elem_type det ( const Op& X, const bool slow = false ) { arma_extra_debug_sigprint(); arma_ignore(slow); typedef typename T1::elem_type eT; const Proxy P(X.m); const uword N = P.get_n_rows(); arma_debug_check( (N != P.get_n_cols()), "det(): matrix is not square" ); eT val1 = eT(1); eT val2 = eT(1); uword i,j; for(i=0, j=1; j inline arma_warn_unused typename T1::elem_type det ( const Op& X, const char* method ) { arma_extra_debug_sigprint(); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'f')), "det(): unknown method specified" ); return det(X, false); } //! determinant of inv(A), without doing the inverse operation template inline arma_warn_unused typename T1::elem_type det ( const Op& X, const bool slow = false, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; const eT tmp = det(X.m, slow); arma_debug_warn( (tmp == eT(0)), "det(): warning: denominator is zero" ); return eT(1) / tmp; } template inline arma_warn_unused typename T1::elem_type det ( const Op& X, const char* method, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'f')), "det(): unknown method specified" ); const bool slow = (sig == 's'); return det(X, slow); } //! determinant of trans(A) template inline arma_warn_unused typename T1::elem_type det ( const Op& in, const bool slow = false, const typename arma_blas_type_only::result* junk1 = 0, const typename arma_not_cx::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return auxlib::det(in.m, slow); // bypass op_htrans } template inline arma_warn_unused typename T1::elem_type det ( const Op& in, const char* method, const typename arma_blas_type_only::result* junk1 = 0, const typename arma_not_cx::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'f')), "det(): unknown method specified" ); const bool slow = (sig == 's'); return auxlib::det(in.m, slow); // bypass op_htrans } template arma_inline arma_warn_unused const typename arma_scalar_only::result & det(const T& x) { return x; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_diagmat.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_diagmat //! @{ //! interpret a matrix or a vector as a diagonal matrix (i.e. off-diagonal entries are zero) template arma_inline typename enable_if2 < is_arma_type::value, const Op >::result diagmat(const T1& X) { arma_extra_debug_sigprint(); return Op(X); } template inline const SpOp diagmat(const SpBase& X) { arma_extra_debug_sigprint(); return SpOp(X.get_ref()); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_diagvec.hpp ================================================ // Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_diagvec //! @{ //! extract a diagonal from a matrix template arma_inline const Op diagvec(const Base& X, const sword diag_id = 0) { arma_extra_debug_sigprint(); return Op(X.get_ref(), ((diag_id < 0) ? -diag_id : diag_id), ((diag_id < 0) ? 1 : 0) ); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_dot.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // Copyright (C) 2012 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_dot //! @{ template arma_inline arma_warn_unused typename enable_if2 < is_arma_type::value && is_arma_type::value && is_same_type::yes, typename T1::elem_type >::result dot ( const T1& A, const T2& B ) { arma_extra_debug_sigprint(); return op_dot::apply(A,B); } template inline arma_warn_unused typename enable_if2 < is_arma_type::value && is_arma_type::value && is_same_type::no, typename promote_type::result >::result dot ( const T1& A, const T2& B ) { arma_extra_debug_sigprint(); return op_dot_mixed::apply(A,B); } template inline arma_warn_unused typename enable_if2 < is_arma_type::value && is_arma_type::value && is_same_type::value, typename T1::elem_type >::result norm_dot ( const T1& A, const T2& B ) { arma_extra_debug_sigprint(); return op_norm_dot::apply(A,B); } // // cdot template arma_inline arma_warn_unused typename enable_if2 < is_arma_type::value && is_arma_type::value && is_same_type::value && is_not_complex::value, typename T1::elem_type >::result cdot ( const T1& A, const T2& B ) { arma_extra_debug_sigprint(); return op_dot::apply(A,B); } template arma_inline arma_warn_unused typename enable_if2 < is_arma_type::value && is_arma_type::value && is_same_type::value && is_complex::value, typename T1::elem_type >::result cdot ( const T1& A, const T2& B ) { arma_extra_debug_sigprint(); return op_cdot::apply(A,B); } // convert dot(htrans(x), y) to cdot(x,y) template arma_inline arma_warn_unused typename enable_if2 < is_arma_type::value && is_same_type::value && is_complex::value, typename T1::elem_type >::result dot ( const Op& A, const T2& B ) { arma_extra_debug_sigprint(); return cdot(A.m, B); } // // for sparse matrices // namespace priv { template arma_hot inline typename T1::elem_type dot_helper(const SpProxy& pa, const SpProxy& pb) { typedef typename T1::elem_type eT; // Iterate over both objects and see when they are the same eT result = eT(0); typename SpProxy::const_iterator_type a_it = pa.begin(); typename SpProxy::const_iterator_type a_end = pa.end(); typename SpProxy::const_iterator_type b_it = pb.begin(); typename SpProxy::const_iterator_type b_end = pb.end(); while((a_it != a_end) && (b_it != b_end)) { if(a_it == b_it) { result += (*a_it) * (*b_it); ++a_it; ++b_it; } else if((a_it.col() < b_it.col()) || ((a_it.col() == b_it.col()) && (a_it.row() < b_it.row()))) { // a_it is "behind" ++a_it; } else { // b_it is "behind" ++b_it; } } return result; } } //! dot product of two sparse objects template arma_warn_unused arma_hot inline typename enable_if2 <(is_arma_sparse_type::value) && (is_arma_sparse_type::value) && (is_same_type::value), typename T1::elem_type >::result dot ( const T1& x, const T2& y ) { arma_extra_debug_sigprint(); const SpProxy pa(x); const SpProxy pb(y); arma_debug_assert_same_size(pa.get_n_rows(), pa.get_n_cols(), pb.get_n_rows(), pb.get_n_cols(), "dot()"); typedef typename T1::elem_type eT; typedef typename SpProxy::stored_type pa_Q_type; typedef typename SpProxy::stored_type pb_Q_type; if( ( (SpProxy::must_use_iterator == false) && (SpProxy::must_use_iterator == false) ) && ( (is_SpMat::value == true ) && (is_SpMat::value == true ) ) ) { const unwrap_spmat tmp_a(pa.Q); const unwrap_spmat tmp_b(pb.Q); const SpMat& A = tmp_a.M; const SpMat& B = tmp_b.M; if( &A == &B ) { // We can do it directly! return op_dot::direct_dot_arma(A.n_nonzero, A.values, A.values); } else { return priv::dot_helper(pa,pb); } } else { return priv::dot_helper(pa,pb); } } //! dot product of one dense and one sparse object template arma_warn_unused arma_hot inline typename enable_if2 <(is_arma_type::value) && (is_arma_sparse_type::value) && (is_same_type::value), typename T1::elem_type >::result dot ( const T1& x, const T2& y ) { arma_extra_debug_sigprint(); const Proxy pa(x); const SpProxy pb(y); arma_debug_assert_same_size(pa.get_n_rows(), pa.get_n_cols(), pb.get_n_rows(), pb.get_n_cols(), "dot()"); typedef typename T1::elem_type eT; eT result = eT(0); typename SpProxy::const_iterator_type it = pb.begin(); typename SpProxy::const_iterator_type it_end = pb.end(); // prefer_at_accessor won't save us operations while(it != it_end) { result += (*it) * pa.at(it.row(), it.col()); ++it; } return result; } //! dot product of one sparse and one dense object template arma_warn_unused arma_hot inline typename enable_if2 <(is_arma_sparse_type::value) && (is_arma_type::value) && (is_same_type::value), typename T1::elem_type >::result dot ( const T1& x, const T2& y ) { arma_extra_debug_sigprint(); // this is commutative return dot(y, x); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_eig_gen.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // Copyright (C) 2009 Edmund Highcock // Copyright (C) 2011 Stanislav Funiak // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_eig_gen //! @{ //! Eigenvalues of general real square matrix X template inline Col< std::complex > eig_gen ( const Base& X, const typename arma_blas_type_only::result* junk1 = 0, const typename arma_not_cx::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); Mat l_eigvec; Mat r_eigvec; Col< std::complex > eigval; const bool status = auxlib::eig_gen(eigval, l_eigvec, r_eigvec, X, 'n'); if(status == false) { eigval.reset(); arma_bad("eig_gen(): failed to converge"); } return eigval; } //! Eigenvalues of general complex square matrix X template inline Col< std::complex > eig_gen ( const Base< std::complex, T1>& X, const typename arma_blas_type_only< std::complex >::result* junk1 = 0, const typename arma_cx_only< std::complex >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); Mat< std::complex > l_eigvec; Mat< std::complex > r_eigvec; Col< std::complex > eigval; const bool status = auxlib::eig_gen(eigval, l_eigvec, r_eigvec, X, 'n'); if(status == false) { eigval.reset(); arma_bad("eig_gen(): failed to converge"); } return eigval; } //! Eigenvalues of general real square matrix X template inline bool eig_gen ( Col< std::complex >& eigval, const Base& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); Mat l_eigvec; Mat r_eigvec; const bool status = auxlib::eig_gen(eigval, l_eigvec, r_eigvec, X, 'n'); if(status == false) { eigval.reset(); arma_bad("eig_gen(): failed to converge", false); } return status; } //! Eigenvalues of general complex square matrix X template inline bool eig_gen ( Col< std::complex >& eigval, const Base< std::complex, T1>& X, const typename arma_blas_type_only< std::complex >::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); Mat< std::complex > l_eigvec; Mat< std::complex > r_eigvec; const bool status = auxlib::eig_gen(eigval, l_eigvec, r_eigvec, X, 'n'); if(status == false) { eigval.reset(); arma_bad("eig_gen(): failed to converge", false); } return status; } //! Eigenvalues and eigenvectors of general real square matrix X. //! Optional argument 'side' specifies which eigenvectors should be computed: //! 'r' for right (default) and 'l' for left. template inline bool eig_gen ( Col< std::complex >& eigval, Mat< std::complex >& eigvec, const Base& X, const char side = 'r', const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); //std::cout << "real" << std::endl; arma_debug_check( ( ((void*)(&eigval)) == ((void*)(&eigvec)) ), "eig_gen(): eigval is an alias of eigvec" ); Mat dummy_eigvec; Mat tmp_eigvec; bool status; switch(side) { case 'r': status = auxlib::eig_gen(eigval, dummy_eigvec, tmp_eigvec, X, side); break; case 'l': status = auxlib::eig_gen(eigval, tmp_eigvec, dummy_eigvec, X, side); break; default: arma_stop("eig_gen(): parameter 'side' is invalid"); status = false; } if(status == false) { eigval.reset(); eigvec.reset(); arma_bad("eig_gen(): failed to converge", false); } else { const uword n = eigval.n_elem; if(n > 0) { eigvec.set_size(n,n); for(uword j=0; j >( tmp_eigvec.col(j), tmp_eigvec.col(j+1) ); // eigvec.col(j+1) = Mat< std::complex >( tmp_eigvec.col(j), -tmp_eigvec.col(j+1) ); for(uword i=0; i( tmp_eigvec.at(i,j), tmp_eigvec.at(i,j+1) ); eigvec.at(i,j+1) = std::complex( tmp_eigvec.at(i,j), -tmp_eigvec.at(i,j+1) ); } ++j; } else { // eigvec.col(i) = tmp_eigvec.col(i); for(uword i=0; i(tmp_eigvec.at(i,j), eT(0)); } } } } } return status; } //! Eigenvalues and eigenvectors of general complex square matrix X //! Optional argument 'side' specifies which eigenvectors should be computed: //! 'r' for right (default) and 'l' for left. template inline bool eig_gen ( Col >& eigval, Mat >& eigvec, const Base, T1>& X, const char side = 'r', const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); //std::cout << "complex" << std::endl; arma_debug_check( ( ((void*)(&eigval)) == ((void*)(&eigvec)) ), "eig_gen(): eigval is an alias of eigvec" ); Mat< std::complex > dummy_eigvec; bool status; switch(side) { case 'r': status = auxlib::eig_gen(eigval, dummy_eigvec, eigvec, X, side); break; case 'l': status = auxlib::eig_gen(eigval, eigvec, dummy_eigvec, X, side); break; default: arma_stop("eig_gen(): parameter 'side' is invalid"); status = false; } if(status == false) { eigval.reset(); eigvec.reset(); arma_bad("eig_gen(): failed to converge", false); } return status; } //! Eigenvalues and eigenvectors (both left and right) of general real/complex square matrix X //! NOTE: DO NOT USE THIS FUNCTION; it is kept ONLY for compatibility with old user code template arma_deprecated inline bool eig_gen ( Col< std::complex >& eigval, Mat& l_eigvec, Mat& r_eigvec, const Base& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); arma_debug_check ( ((&l_eigvec) == (&r_eigvec)), "eig_gen(): l_eigvec is an alias of r_eigvec" ); arma_debug_check ( ( (((void*)(&eigval)) == ((void*)(&l_eigvec))) || (((void*)(&eigval)) == ((void*)(&r_eigvec))) ), "eig_gen(): eigval is an alias of l_eigvec or r_eigvec" ); const bool status = auxlib::eig_gen(eigval, l_eigvec, r_eigvec, X, 'b'); if(status == false) { eigval.reset(); l_eigvec.reset(); r_eigvec.reset(); arma_bad("eig_gen(): failed to converge", false); } return status; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_eig_pair.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_eig_pair //! @{ //! eigenvalues for pair of N-by-N general real matrices (A,B) template inline Col< std::complex > eig_pair ( const Base& A, const Base& B, const typename arma_blas_type_only::result* junk1 = 0, const typename arma_not_cx::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); Mat l_eigvec; Mat r_eigvec; Col< std::complex > eigval; const bool status = auxlib::eig_pair(eigval, l_eigvec, r_eigvec, A, B, 'n'); if(status == false) { eigval.reset(); arma_bad("eig_pair(): failed to converge"); } return eigval; } //! eigenvalues for pair of N-by-N general complex matrices (A,B) template inline Col< std::complex > eig_pair ( const Base< std::complex, T1>& A, const Base< std::complex, T1>& B, const typename arma_blas_type_only< std::complex >::result* junk1 = 0, const typename arma_cx_only< std::complex >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); Mat< std::complex > l_eigvec; Mat< std::complex > r_eigvec; Col< std::complex > eigval; const bool status = auxlib::eig_pair(eigval, l_eigvec, r_eigvec, A, B, 'n'); if(status == false) { eigval.reset(); arma_bad("eig_pair(): failed to converge"); } return eigval; } //! eigenvalues for pair of N-by-N general real matrices (A,B) template inline bool eig_pair ( Col< std::complex >& eigval, const Base< eT, T1 >& A, const Base< eT, T2 >& B, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); Mat l_eigvec; Mat r_eigvec; const bool status = auxlib::eig_pair(eigval, l_eigvec, r_eigvec, A, B, 'n'); if(status == false) { eigval.reset(); arma_bad("eig_pair(): failed to converge", false); } return status; } //! eigenvalues for pair of N-by-N general complex matrices (A,B) template inline bool eig_pair ( Col< std::complex >& eigval, const Base< std::complex, T1 >& A, const Base< std::complex, T2 >& B, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); Mat< std::complex > l_eigvec; Mat< std::complex > r_eigvec; const bool status = auxlib::eig_pair(eigval, l_eigvec, r_eigvec, A, B, 'n'); if(status == false) { eigval.reset(); arma_bad("eig_pair(): failed to converge", false); } return status; } //! eigenvalues and eigenvectors for pair of N-by-N general real matrices (A,B) template inline bool eig_pair ( Col< std::complex >& eigval, Mat< std::complex >& eigvec, const Base< eT, T1 >& A, const Base< eT, T2 >& B, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); arma_debug_check( ( ((void*)(&eigval)) == ((void*)(&eigvec)) ), "eig_pair(): eigval is an alias of eigvec" ); Mat dummy_eigvec; Mat tmp_eigvec; const bool status = auxlib::eig_pair(eigval, dummy_eigvec, tmp_eigvec, A, B, 'r'); if(status == false) { eigval.reset(); eigvec.reset(); arma_bad("eig_pair(): failed to converge", false); } else { const uword n = eigval.n_elem; if(n > 0) { eigvec.set_size(n,n); // from LAPACK docs: // If the j-th and (j+1)-th eigenvalues form a complex conjugate pair, then // v(j) = VR(:,j)+i*VR(:,j+1) and v(j+1) = VR(:,j)-i*VR(:,j+1). for(uword j=0; j >( tmp_eigvec.col(j), tmp_eigvec.col(j+1) ); // eigvec.col(j+1) = Mat< std::complex >( tmp_eigvec.col(j), -tmp_eigvec.col(j+1) ); for(uword i=0; i( tmp_eigvec.at(i,j), tmp_eigvec.at(i,j+1) ); eigvec.at(i,j+1) = std::complex( tmp_eigvec.at(i,j), -tmp_eigvec.at(i,j+1) ); } ++j; } else { // eigvec.col(i) = tmp_eigvec.col(i); for(uword i=0; i(tmp_eigvec.at(i,j), eT(0)); } } } } } return status; } //! eigenvalues and eigenvectors for pair of N-by-N general complex matrices (A,B) template inline bool eig_pair ( Col< std::complex >& eigval, Mat< std::complex >& eigvec, const Base< std::complex, T1 >& A, const Base< std::complex, T2 >& B, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); arma_debug_check( ( ((void*)(&eigval)) == ((void*)(&eigvec)) ), "eig_pair(): eigval is an alias of eigvec" ); Mat< std::complex > dummy_eigvec; const bool status = auxlib::eig_pair(eigval, dummy_eigvec, eigvec, A, B, 'r'); if(status == false) { eigval.reset(); eigvec.reset(); arma_bad("eig_pair(): failed to converge", false); } return status; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_eig_sym.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // Copyright (C) 2011 Stanislav Funiak // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_eig_sym //! @{ //! Eigenvalues of real/complex symmetric/hermitian matrix X template inline bool eig_sym ( Col& eigval, const Base& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); // unwrap_check not used as T1::elem_type and T1::pod_type may not be the same. // furthermore, it doesn't matter if X is an alias of eigval, as auxlib::eig_sym() makes a copy of X const bool status = auxlib::eig_sym(eigval, X); if(status == false) { eigval.reset(); arma_bad("eig_sym(): failed to converge", false); } return status; } //! Eigenvalues of real/complex symmetric/hermitian matrix X template inline Col eig_sym ( const Base& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); Col out; const bool status = auxlib::eig_sym(out, X); if(status == false) { out.reset(); arma_bad("eig_sym(): failed to converge"); } return out; } //! Eigenvalues and eigenvectors of real/complex symmetric/hermitian matrix X template inline bool eig_sym ( Col& eigval, Mat& eigvec, const Base& X, const char* method = "dc", const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'd')), "eig_sym(): unknown method specified" ); arma_debug_check( void_ptr(&eigval) == void_ptr(&eigvec), "eig_sym(): eigval is an alias of eigvec" ); const Proxy P(X.get_ref()); const bool is_alias = P.is_alias(eigvec); Mat eigvec_tmp; Mat& eigvec_out = (is_alias == false) ? eigvec : eigvec_tmp; bool status = false; if(sig == 'd') { status = auxlib::eig_sym_dc(eigval, eigvec_out, P.Q); } if(status == false) { status = auxlib::eig_sym(eigval, eigvec_out, P.Q); } if(status == false) { eigval.reset(); eigvec.reset(); arma_bad("eig_sym(): failed to converge", false); } else { if(is_alias) { eigvec.steal_mem(eigvec_tmp); } } return status; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_eigs_gen.hpp ================================================ // Copyright (C) 2013-2014 Ryan Curtin // Copyright (C) 2013-2014 Conrad Sanderson // Copyright (C) 2013-2014 NICTA // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_eigs_gen //! @{ //! eigenvalues of general sparse matrix X template inline Col< std::complex > eigs_gen ( const SpBase& X, const uword n_eigvals, const char* form = "lm", const typename T1::pod_type tol = 0.0, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::pod_type T; Mat< std::complex > eigvec; Col< std::complex > eigval; const bool status = sp_auxlib::eigs_gen(eigval, eigvec, X, n_eigvals, form, tol); if(status == false) { eigval.reset(); arma_bad("eigs_gen(): failed to converge"); } return eigval; } //! eigenvalues of general sparse matrix X template inline bool eigs_gen ( Col< std::complex >& eigval, const SpBase& X, const uword n_eigvals, const char* form = "lm", const typename T1::pod_type tol = 0.0, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::pod_type T; Mat< std::complex > eigvec; const bool status = sp_auxlib::eigs_gen(eigval, eigvec, X, n_eigvals, form, tol); if(status == false) { eigval.reset(); arma_bad("eigs_gen(): failed to converge", false); } return status; } //! eigenvalues and eigenvectors of general real sparse matrix X template inline bool eigs_gen ( Col< std::complex >& eigval, Mat< std::complex >& eigvec, const SpBase& X, const uword n_eigvals, const char* form = "lm", const typename T1::pod_type tol = 0.0, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); arma_debug_check( void_ptr(&eigval) == void_ptr(&eigvec), "eigs_gen(): eigval is an alias of eigvec" ); const bool status = sp_auxlib::eigs_gen(eigval, eigvec, X, n_eigvals, form, tol); if(status == false) { eigval.reset(); eigvec.reset(); arma_bad("eigs_gen(): failed to converge", false); } return status; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_eigs_sym.hpp ================================================ // Copyright (C) 2013-2014 Ryan Curtin // Copyright (C) 2013-2014 Conrad Sanderson // Copyright (C) 2013-2014 NICTA // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_eigs_sym //! @{ //! eigenvalues of symmetric real sparse matrix X template inline Col eigs_sym ( const SpBase& X, const uword n_eigvals, const char* form = "lm", const typename T1::elem_type tol = 0.0, const typename arma_real_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); Mat eigvec; Col eigval; const bool status = sp_auxlib::eigs_sym(eigval, eigvec, X, n_eigvals, form, tol); if(status == false) { eigval.reset(); arma_bad("eigs_sym(): failed to converge"); } return eigval; } //! eigenvalues of symmetric real sparse matrix X template inline bool eigs_sym ( Col& eigval, const SpBase& X, const uword n_eigvals, const char* form = "lm", const typename T1::elem_type tol = 0.0, const typename arma_real_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); Mat eigvec; const bool status = sp_auxlib::eigs_sym(eigval, eigvec, X, n_eigvals, form, tol); if(status == false) { eigval.reset(); arma_bad("eigs_sym(): failed to converge", false); } return status; } //! eigenvalues and eigenvectors of symmetric real sparse matrix X template inline bool eigs_sym ( Col& eigval, Mat& eigvec, const SpBase& X, const uword n_eigvals, const char* form = "lm", const typename T1::elem_type tol = 0.0, const typename arma_real_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); arma_debug_check( void_ptr(&eigval) == void_ptr(&eigvec), "eigs_sym(): eigval is an alias of eigvec" ); const bool status = sp_auxlib::eigs_sym(eigval, eigvec, X, n_eigvals, form, tol); if(status == false) { eigval.reset(); arma_bad("eigs_sym(): failed to converge", false); } return status; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_elem.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_elem //! @{ // // real template arma_inline typename enable_if2< (is_arma_type::value && is_cx::no), const T1& >::result real(const T1& X) { arma_extra_debug_sigprint(); return X; } template arma_inline const T1& real(const BaseCube& X) { arma_extra_debug_sigprint(); return X.get_ref(); } template arma_inline const T1& real(const SpBase& A) { arma_extra_debug_sigprint(); return A.get_ref(); } template inline typename enable_if2< (is_arma_type::value && is_cx::yes), const mtOp >::result real(const T1& X) { arma_extra_debug_sigprint(); return mtOp( X ); } template inline const mtOpCube real(const BaseCube, T1>& X) { arma_extra_debug_sigprint(); return mtOpCube( X.get_ref() ); } template arma_inline const mtSpOp real(const SpBase,T1>& A) { arma_extra_debug_sigprint(); return mtSpOp(A.get_ref()); } // // imag template inline const Gen< Mat, gen_zeros > imag(const Base& X) { arma_extra_debug_sigprint(); const Proxy A(X.get_ref()); return Gen< Mat, gen_zeros>(A.get_n_rows(), A.get_n_cols()); } template inline const GenCube imag(const BaseCube& X) { arma_extra_debug_sigprint(); const ProxyCube A(X.get_ref()); return GenCube(A.get_n_rows(), A.get_n_cols(), A.get_n_slices()); } template inline SpMat imag(const SpBase& A) { arma_extra_debug_sigprint(); const SpProxy P(A.get_ref()); return SpMat(P.get_n_rows(), P.get_n_cols()); } template inline typename enable_if2< (is_arma_type::value && is_cx::yes), const mtOp >::result imag(const T1& X) { arma_extra_debug_sigprint(); return mtOp( X ); } template inline const mtOpCube imag(const BaseCube,T1>& X) { arma_extra_debug_sigprint(); return mtOpCube( X.get_ref() ); } template arma_inline const mtSpOp imag(const SpBase,T1>& A) { arma_extra_debug_sigprint(); return mtSpOp(A.get_ref()); } // // log template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result log(const T1& A) { arma_extra_debug_sigprint(); return eOp(A); } template arma_inline const eOpCube log(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // log2 template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result log2(const T1& A) { arma_extra_debug_sigprint(); return eOp(A); } template arma_inline const eOpCube log2(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // log10 template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result log10(const T1& A) { arma_extra_debug_sigprint(); return eOp(A); } template arma_inline const eOpCube log10(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // exp template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result exp(const T1& A) { arma_extra_debug_sigprint(); return eOp(A); } template arma_inline const eOpCube exp(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // exp2 template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result exp2(const T1& A) { arma_extra_debug_sigprint(); return eOp(A); } template arma_inline const eOpCube exp2(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // exp10 template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result exp10(const T1& A) { arma_extra_debug_sigprint(); return eOp(A); } template arma_inline const eOpCube exp10(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // abs template arma_inline typename enable_if2< (is_arma_type::value && is_cx::no), const eOp >::result abs(const T1& X) { arma_extra_debug_sigprint(); return eOp(X); } template arma_inline const eOpCube abs(const BaseCube& X, const typename arma_not_cx::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); return eOpCube(X.get_ref()); } template inline typename enable_if2< (is_arma_type::value && is_cx::yes), const mtOp >::result abs(const T1& X) { arma_extra_debug_sigprint(); return mtOp(X); } template inline const mtOpCube abs(const BaseCube< std::complex,T1>& X, const typename arma_cx_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); return mtOpCube( X.get_ref() ); } template arma_inline const SpOp abs(const SpBase& X, const typename arma_not_cx::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); return SpOp(X.get_ref()); } template arma_inline const mtSpOp abs(const SpBase< std::complex, T1>& X, const typename arma_cx_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); return mtSpOp(X.get_ref()); } // // square template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result square(const T1& A) { arma_extra_debug_sigprint(); return eOp(A); } template arma_inline const eOpCube square(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } template arma_inline const SpOp square(const SpBase& A) { arma_extra_debug_sigprint(); return SpOp(A.get_ref()); } // // sqrt template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result sqrt(const T1& A) { arma_extra_debug_sigprint(); return eOp(A); } template arma_inline const eOpCube sqrt(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } template arma_inline const SpOp sqrt(const SpBase& A) { arma_extra_debug_sigprint(); return SpOp(A.get_ref()); } // // conj template arma_inline const T1& conj(const Base& A) { arma_extra_debug_sigprint(); return A.get_ref(); } template arma_inline const T1& conj(const BaseCube& A) { arma_extra_debug_sigprint(); return A.get_ref(); } template arma_inline const T1& conj(const SpBase& A) { arma_extra_debug_sigprint(); return A.get_ref(); } template arma_inline const eOp conj(const Base,T1>& A) { arma_extra_debug_sigprint(); return eOp(A.get_ref()); } template arma_inline const eOpCube conj(const BaseCube,T1>& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } template arma_inline const SpOp conj(const SpBase,T1>& A) { arma_extra_debug_sigprint(); return SpOp(A.get_ref()); } // pow template arma_inline const eOp pow(const Base& A, const typename T1::elem_type exponent) { arma_extra_debug_sigprint(); return eOp(A.get_ref(), exponent); } template arma_inline const eOpCube pow(const BaseCube& A, const typename T1::elem_type exponent) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref(), exponent); } // pow, specialised handling (non-complex exponent for complex matrices) template arma_inline const eOp pow(const Base& A, const typename T1::elem_type::value_type exponent) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; return eOp(A.get_ref(), eT(exponent)); } template arma_inline const eOpCube pow(const BaseCube& A, const typename T1::elem_type::value_type exponent) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; return eOpCube(A.get_ref(), eT(exponent)); } // // floor template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result floor(const T1& A) { arma_extra_debug_sigprint(); return eOp(A); } template arma_inline const eOpCube floor(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // ceil template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result ceil(const T1& A) { arma_extra_debug_sigprint(); return eOp(A); } template arma_inline const eOpCube ceil(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // round template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result round(const T1& A) { arma_extra_debug_sigprint(); return eOp(A); } template arma_inline const eOpCube round(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // sign template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result sign(const T1& A) { arma_extra_debug_sigprint(); return eOp(A); } template arma_inline const eOpCube sign(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_eps.hpp ================================================ // Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_eps //! @{ //! \brief //! eps version for non-complex matrices and vectors template inline const eOp eps(const Base& X, const typename arma_not_cx::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); return eOp(X.get_ref()); } //! \brief //! eps version for complex matrices and vectors template inline Mat< typename T1::pod_type > eps(const Base< std::complex, T1>& X, const typename arma_cx_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::pod_type T; typedef typename T1::elem_type eT; const unwrap tmp(X.get_ref()); const Mat& A = tmp.M; Mat out(A.n_rows, A.n_cols); T* out_mem = out.memptr(); const eT* A_mem = A.memptr(); const uword n_elem = A.n_elem; for(uword i=0; i arma_inline arma_warn_unused typename arma_integral_only::result eps(const eT& x) { arma_ignore(x); return eT(0); } template arma_inline arma_warn_unused typename arma_real_only::result eps(const eT& x) { return eop_aux::direct_eps(x); } template arma_inline arma_warn_unused typename arma_real_only::result eps(const std::complex& x) { return eop_aux::direct_eps(x); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_expmat.hpp ================================================ // Copyright (C) 2014 Conrad Sanderson // Copyright (C) 2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. template inline typename enable_if2 < is_real::value, const Op >::result expmat(const Base& A) { arma_extra_debug_sigprint(); return Op( A.get_ref() ); } ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_eye.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_eye //! @{ arma_inline const Gen eye(const uword n_rows, const uword n_cols) { arma_extra_debug_sigprint(); return Gen(n_rows, n_cols); } template arma_inline const Gen eye(const uword n_rows, const uword n_cols, const typename arma_Mat_Col_Row_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); if(is_Col::value == true) { arma_debug_check( (n_cols != 1), "eye(): incompatible size" ); } else if(is_Row::value == true) { arma_debug_check( (n_rows != 1), "eye(): incompatible size" ); } return Gen(n_rows, n_cols); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_fft.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_fft //! @{ // 1D FFT & 1D IFFT template inline typename enable_if2 < (is_arma_type::value && is_real::value), const mtOp, T1, op_fft_real> >::result fft(const T1& A) { arma_extra_debug_sigprint(); return mtOp, T1, op_fft_real>(A, uword(0), uword(1)); } template inline typename enable_if2 < (is_arma_type::value && is_real::value), const mtOp, T1, op_fft_real> >::result fft(const T1& A, const uword N) { arma_extra_debug_sigprint(); return mtOp, T1, op_fft_real>(A, N, uword(0)); } template inline typename enable_if2 < (is_arma_type::value && is_complex_strict::value), const Op >::result fft(const T1& A) { arma_extra_debug_sigprint(); return Op(A, uword(0), uword(1)); } template inline typename enable_if2 < (is_arma_type::value && is_complex_strict::value), const Op >::result fft(const T1& A, const uword N) { arma_extra_debug_sigprint(); return Op(A, N, uword(0)); } template inline typename enable_if2 < (is_arma_type::value && is_complex_strict::value), const Op >::result ifft(const T1& A) { arma_extra_debug_sigprint(); return Op(A, uword(0), uword(1)); } template inline typename enable_if2 < (is_arma_type::value && is_complex_strict::value), const Op >::result ifft(const T1& A, const uword N) { arma_extra_debug_sigprint(); return Op(A, N, uword(0)); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_fft2.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_fft2 //! @{ // 2D FFT & 2D IFFT template inline typename enable_if2 < is_arma_type::value, Mat< std::complex > >::result fft2(const T1& A) { arma_extra_debug_sigprint(); // not exactly efficient, but "better-than-nothing" implementation typedef typename T1::pod_type T; Mat< std::complex > B = fft(A); // for square matrices, strans() will work out that an inplace transpose can be done, // hence we can potentially avoid creating a temporary matrix B = strans(B); return strans( fft(B) ); } template inline typename enable_if2 < is_arma_type::value, Mat< std::complex > >::result fft2(const T1& A, const uword n_rows, const uword n_cols) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap tmp(A); const Mat& B = tmp.M; const bool do_resize = (B.n_rows != n_rows) || (B.n_cols != n_cols); return fft2( do_resize ? resize(B,n_rows,n_cols) : B ); } template inline typename enable_if2 < (is_arma_type::value && is_complex_strict::value), Mat< std::complex > >::result ifft2(const T1& A) { arma_extra_debug_sigprint(); // not exactly efficient, but "better-than-nothing" implementation typedef typename T1::pod_type T; Mat< std::complex > B = ifft(A); // for square matrices, strans() will work out that an inplace transpose can be done, // hence we can potentially avoid creating a temporary matrix B = strans(B); return strans( ifft(B) ); } template inline typename enable_if2 < (is_arma_type::value && is_complex_strict::value), Mat< std::complex > >::result ifft2(const T1& A, const uword n_rows, const uword n_cols) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap tmp(A); const Mat& B = tmp.M; const bool do_resize = (B.n_rows != n_rows) || (B.n_cols != n_cols); return ifft2( do_resize ? resize(B,n_rows,n_cols) : B ); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_find.hpp ================================================ // Copyright (C) 2010-2014 Conrad Sanderson // Copyright (C) 2010-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_find //! @{ template inline typename enable_if2 < is_arma_type::value, const mtOp >::result find(const T1& X) { arma_extra_debug_sigprint(); return mtOp(X); } template inline const mtOp find(const Base& X, const uword k, const char* direction = "first") { arma_extra_debug_sigprint(); const char sig = (direction != NULL) ? direction[0] : char(0); arma_debug_check ( ( (sig != 'f') && (sig != 'F') && (sig != 'l') && (sig != 'L') ), "find(): direction must be \"first\" or \"last\"" ); const uword type = ( (sig == 'f') || (sig == 'F') ) ? 0 : 1; return mtOp(X.get_ref(), k, type); } // template inline uvec find(const BaseCube& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_cube tmp(X.get_ref()); const Mat R( const_cast< eT* >(tmp.M.memptr()), tmp.M.n_elem, 1, false ); return find(R); } template inline uvec find(const BaseCube& X, const uword k, const char* direction = "first") { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_cube tmp(X.get_ref()); const Mat R( const_cast< eT* >(tmp.M.memptr()), tmp.M.n_elem, 1, false ); return find(R, k, direction); } template inline uvec find(const mtOpCube& X, const uword k = 0, const char* direction = "first") { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_cube tmp(X.m); const Mat R( const_cast< eT* >(tmp.M.memptr()), tmp.M.n_elem, 1, false ); return find( mtOp, op_rel_type>(R, X.aux), k, direction ); } template inline uvec find(const mtGlueCube& X, const uword k = 0, const char* direction = "first") { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; const unwrap_cube tmp1(X.A); const unwrap_cube tmp2(X.B); arma_debug_assert_same_size( tmp1.M, tmp2.M, "relational operator" ); const Mat R1( const_cast< eT1* >(tmp1.M.memptr()), tmp1.M.n_elem, 1, false ); const Mat R2( const_cast< eT2* >(tmp2.M.memptr()), tmp2.M.n_elem, 1, false ); return find( mtGlue, Mat, glue_rel_type>(R1, R2), k, direction ); } // template inline typename enable_if2 < is_arma_type::value, const mtOp >::result find_finite(const T1& X) { arma_extra_debug_sigprint(); return mtOp(X); } template inline typename enable_if2 < is_arma_type::value, const mtOp >::result find_nonfinite(const T1& X) { arma_extra_debug_sigprint(); return mtOp(X); } // template inline uvec find_finite(const BaseCube& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_cube tmp(X.get_ref()); const Mat R( const_cast< eT* >(tmp.M.memptr()), tmp.M.n_elem, 1, false ); return find_finite(R); } template inline uvec find_nonfinite(const BaseCube& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_cube tmp(X.get_ref()); const Mat R( const_cast< eT* >(tmp.M.memptr()), tmp.M.n_elem, 1, false ); return find_nonfinite(R); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_flip.hpp ================================================ // Copyright (C) 2010-2015 Conrad Sanderson // Copyright (C) 2010-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_flip //! @{ template arma_inline typename enable_if2< is_arma_type::value, const Op >::result flipud(const T1& X) { arma_extra_debug_sigprint(); return Op(X); } template arma_inline typename enable_if2< is_arma_type::value, const Op >::result fliplr(const T1& X) { arma_extra_debug_sigprint(); return Op(X); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_hist.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. template inline const mtOp hist ( const Base& A, const uword n_bins = 10, const arma_empty_class junk1 = arma_empty_class(), const typename arma_not_cx::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return mtOp( A.get_ref(), n_bins, 0 ); } template inline const mtGlue hist ( const Base& A, const Base& B, const uword dim = 0, const typename arma_not_cx::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return mtGlue( A.get_ref(), B.get_ref(), dim ); } ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_histc.hpp ================================================ // Copyright (C) 2015 Conrad Sanderson // Copyright (C) 2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. template inline typename enable_if2 < is_not_complex::value, const mtGlue >::result histc ( const Base& X, const Base& Y, const uword dim = 0 ) { arma_extra_debug_sigprint(); return mtGlue( X.get_ref(), Y.get_ref(), dim ); } ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_inplace_strans.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 Alexandre Drouin // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_inplace_strans //! @{ template inline void inplace_strans ( Mat& X, const char* method = "std" ) { arma_extra_debug_sigprint(); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'l')), "inplace_strans(): unknown method specified" ); const bool low_memory = (sig == 'l'); if( (low_memory == false) || (X.n_rows == X.n_cols) ) { op_strans::apply_mat_inplace(X); } else { // in-place algorithm inspired by: // Fred G. Gustavson, Tadeusz Swirszcz. // In-Place Transposition of Rectangular Matrices. // Applied Parallel Computing. State of the Art in Scientific Computing. // Lecture Notes in Computer Science. Volume 4699, pp. 560-569, 2007. // X.set_size() will check whether we can change the dimensions of X; // X.set_size() will also reuse existing memory, as the number of elements hasn't changed X.set_size(X.n_cols, X.n_rows); const uword m = X.n_cols; const uword n = X.n_rows; std::vector visited(X.n_elem); // TODO: replace std::vector with a better implementation for(uword col = 0; col < m; ++col) for(uword row = 0; row < n; ++row) { const uword pos = col*n + row; if(visited[pos] == false) { uword curr_pos = pos; eT val = X.at(row, col); while(visited[curr_pos] == false) { visited[curr_pos] = true; const uword j = curr_pos / m; const uword i = curr_pos - m * j; const eT tmp = X.at(j, i); X.at(j, i) = val; val = tmp; curr_pos = i*n + j; } } } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_inplace_trans.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_inplace_trans //! @{ template inline typename enable_if2 < is_cx::no, void >::result inplace_htrans ( Mat& X, const char* method = "std" ) { arma_extra_debug_sigprint(); inplace_strans(X, method); } template inline typename enable_if2 < is_cx::yes, void >::result inplace_htrans ( Mat& X, const char* method = "std" ) { arma_extra_debug_sigprint(); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'l')), "inplace_htrans(): unknown method specified" ); const bool low_memory = (sig == 'l'); if( (low_memory == false) || (X.n_rows == X.n_cols) ) { op_htrans::apply_mat_inplace(X); } else { inplace_strans(X, method); X = conj(X); } } template inline typename enable_if2 < is_cx::no, void >::result inplace_trans ( Mat& X, const char* method = "std" ) { arma_extra_debug_sigprint(); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'l')), "inplace_trans(): unknown method specified" ); inplace_strans(X, method); } template inline typename enable_if2 < is_cx::yes, void >::result inplace_trans ( Mat& X, const char* method = "std" ) { arma_extra_debug_sigprint(); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'l')), "inplace_trans(): unknown method specified" ); inplace_htrans(X, method); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_interp1.hpp ================================================ // Copyright (C) 2015 Conrad Sanderson // Copyright (C) 2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_interp1 //! @{ template inline void interp1_helper_nearest(const Mat& XG, const Mat& YG, const Mat& XI, Mat& YI, const eT extrap_val) { arma_extra_debug_sigprint(); const eT XG_min = XG.min(); const eT XG_max = XG.max(); YI.copy_size(XI); const eT* XG_mem = XG.memptr(); const eT* YG_mem = YG.memptr(); const eT* XI_mem = XI.memptr(); eT* YI_mem = YI.memptr(); const uword NG = XG.n_elem; const uword NI = XI.n_elem; uword best_j = 0; for(uword i=0; i::inf; const eT XI_val = XI_mem[i]; if((XI_val < XG_min) || (XI_val > XG_max)) { YI_mem[i] = extrap_val; } else { // XG and XI are guaranteed to be sorted in ascending manner, // so start searching XG from last known optimum position for(uword j=best_j; j= eT(0)) ? tmp : -tmp; if(err >= best_err) { // error is going up, so we have found the optimum position break; } else { best_err = err; best_j = j; // remember the optimum position } } YI_mem[i] = YG_mem[best_j]; } } } template inline void interp1_helper_linear(const Mat& XG, const Mat& YG, const Mat& XI, Mat& YI, const eT extrap_val) { arma_extra_debug_sigprint(); const eT XG_min = XG.min(); const eT XG_max = XG.max(); YI.copy_size(XI); const eT* XG_mem = XG.memptr(); const eT* YG_mem = YG.memptr(); const eT* XI_mem = XI.memptr(); eT* YI_mem = YI.memptr(); const uword NG = XG.n_elem; const uword NI = XI.n_elem; uword a_best_j = 0; uword b_best_j = 0; for(uword i=0; i XG_max)) { YI_mem[i] = extrap_val; } else { // XG and XI are guaranteed to be sorted in ascending manner, // so start searching XG from last known optimum position eT a_best_err = Datum::inf; eT b_best_err = Datum::inf; for(uword j=a_best_j; j= eT(0)) ? tmp : -tmp; if(err >= a_best_err) { break; } else { a_best_err = err; a_best_j = j; } } if( (XG_mem[a_best_j] - XI_val) <= eT(0) ) { // a_best_j is to the left of the interpolated position b_best_j = ( (a_best_j+1) < NG) ? (a_best_j+1) : a_best_j; } else { // a_best_j is to the right of the interpolated position b_best_j = (a_best_j >= 1) ? (a_best_j-1) : a_best_j; } b_best_err = std::abs( XG_mem[b_best_j] - XI_val ); if(a_best_j > b_best_j) { std::swap(a_best_j, b_best_j ); std::swap(a_best_err, b_best_err); } const eT weight = (a_best_err > eT(0)) ? (a_best_err / (a_best_err + b_best_err)) : eT(0); YI_mem[i] = (eT(1) - weight)*YG_mem[a_best_j] + (weight)*YG_mem[b_best_j]; } } } template inline void interp1_helper(const Mat& X, const Mat& Y, const Mat& XI, Mat& YI, const uword sig, const eT extrap_val) { arma_extra_debug_sigprint(); arma_debug_check( ((X.is_vec() == false) || (Y.is_vec() == false) || (XI.is_vec() == false)), "interp1(): currently only vectors are supported" ); arma_debug_check( (X.n_elem != Y.n_elem), "interp1(): X and Y must have the same number of elements" ); arma_debug_check( (X.n_elem < 2), "interp1(): X must have at least two elements" ); // sig = 10: nearest neighbour // sig = 11: nearest neighbour, assume monotonic increase in X and XI // // sig = 20: linear // sig = 21: linear, assume monotonic increase in X and XI if(sig == 11) { interp1_helper_nearest(X, Y, XI, YI, extrap_val); return; } if(sig == 21) { interp1_helper_linear (X, Y, XI, YI, extrap_val); return; } Mat X_tmp; Mat Y_tmp; const bool X_is_sorted = X.is_sorted(); if(X_is_sorted == false) { const uvec X_indices = stable_sort_index(X); const uword N = X.n_elem; X_tmp.set_size(N); Y_tmp.set_size(N); const uword* X_indices_mem = X_indices.memptr(); const eT* X_mem = X.memptr(); const eT* Y_mem = Y.memptr(); eT* X_tmp_mem = X_tmp.memptr(); eT* Y_tmp_mem = Y_tmp.memptr(); for(uword i=0; i& X_sorted = (X_is_sorted) ? X : X_tmp; const Mat& Y_sorted = (X_is_sorted) ? Y : Y_tmp; Mat XI_tmp; uvec XI_indices; const bool XI_is_sorted = XI.is_sorted(); if(XI_is_sorted == false) { XI_indices = stable_sort_index(XI); const uword N = XI.n_elem; XI_tmp.copy_size(XI); const uword* XI_indices_mem = XI_indices.memptr(); const eT* XI_mem = XI.memptr(); eT* XI_tmp_mem = XI_tmp.memptr(); for(uword i=0; i& XI_sorted = (XI_is_sorted) ? XI : XI_tmp; if(sig == 10) { interp1_helper_nearest(X_sorted, Y_sorted, XI_sorted, YI, extrap_val); } else if(sig == 20) { interp1_helper_linear (X_sorted, Y_sorted, XI_sorted, YI, extrap_val); } if( (XI_is_sorted == false) && (YI.n_elem > 0) ) { Mat YI_unsorted; YI_unsorted.copy_size(YI); const eT* YI_mem = YI.memptr(); eT* YI_unsorted_mem = YI_unsorted.memptr(); const uword N = XI_sorted.n_elem; const uword* XI_indices_mem = XI_indices.memptr(); for(uword i=0; i inline typename enable_if2 < is_real::value, void >::result interp1 ( const Base& X, const Base& Y, const Base& XI, Mat& YI, const char* method = "linear", const typename T1::elem_type extrap_val = Datum::nan ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; uword sig = 0; if(method != NULL ) if(method[0] != char(0)) if(method[1] != char(0)) { const char c1 = method[0]; const char c2 = method[1]; if(c1 == 'n') { sig = 10; } // nearest neighbour else if(c1 == 'l') { sig = 20; } // linear else { if( (c1 == '*') && (c2 == 'n') ) { sig = 11; } // nearest neighour, assume monotonic increase in X and XI if( (c1 == '*') && (c2 == 'l') ) { sig = 21; } // linear, assume monotonic increase in X and XI } } arma_debug_check( (sig == 0), "interp1(): unsupported interpolation type" ); const quasi_unwrap X_tmp( X.get_ref()); const quasi_unwrap Y_tmp( Y.get_ref()); const quasi_unwrap XI_tmp(XI.get_ref()); if( X_tmp.is_alias(YI) || Y_tmp.is_alias(YI) || XI_tmp.is_alias(YI) ) { Mat tmp; interp1_helper(X_tmp.M, Y_tmp.M, XI_tmp.M, tmp, sig, extrap_val); YI.steal_mem(tmp); } else { interp1_helper(X_tmp.M, Y_tmp.M, XI_tmp.M, YI, sig, extrap_val); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_inv.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_inv //! @{ //! delayed matrix inverse (general matrices) template arma_inline const Op inv ( const Base& X, const bool slow = false, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return Op(X.get_ref(), ((slow == false) ? 0 : 1), 0); } template arma_inline const Op inv ( const Base& X, const char* method, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'f')), "inv(): unknown method specified" ); return Op(X.get_ref(), ((sig == 'f') ? 0 : 1), 0); } //! delayed matrix inverse (triangular matrices) template arma_inline const Op inv ( const Op& X, const bool slow = false, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(slow); arma_ignore(junk); return Op(X.m, X.aux_uword_a, 0); } template arma_inline const Op inv ( const Op& X, const char* method, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'f')), "inv(): unknown method specified" ); return Op(X.m, X.aux_uword_a, 0); } template inline bool inv ( Mat& out, const Base& X, const bool slow = false, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); try { out = inv(X,slow); } catch(std::runtime_error&) { return false; } return true; } template inline bool inv ( Mat& out, const Base& X, const char* method, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); try { out = inv(X,method); } catch(std::runtime_error&) { return false; } return true; } //! inverse of symmetric positive definite matrices template arma_inline const Op inv_sympd ( const Base& X, const char* method = "std", const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'f')), "inv_sympd(): unknown method specified" ); return Op(X.get_ref(), 0, 0); } template inline bool inv_sympd ( Mat& out, const Base& X, const char* method = "std", const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); try { out = inv_sympd(X,method); } catch(std::runtime_error&) { return false; } return true; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_join.hpp ================================================ // Copyright (C) 2010-2015 Conrad Sanderson // Copyright (C) 2010-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_join //! @{ template inline const Glue join_cols(const Base& A, const Base& B) { arma_extra_debug_sigprint(); return Glue(A.get_ref(), B.get_ref(), 0); } template inline const Glue join_vert(const Base& A, const Base& B) { arma_extra_debug_sigprint(); return Glue(A.get_ref(), B.get_ref(), 0); } template inline const Glue join_rows(const Base& A, const Base& B) { arma_extra_debug_sigprint(); return Glue(A.get_ref(), B.get_ref(), 1); } template inline const Glue join_horiz(const Base& A, const Base& B) { arma_extra_debug_sigprint(); return Glue(A.get_ref(), B.get_ref(), 1); } template inline const GlueCube join_slices(const BaseCube& A, const BaseCube& B) { arma_extra_debug_sigprint(); return GlueCube(A.get_ref(), B.get_ref()); } // // for sparse matrices template inline const SpGlue join_cols(const SpBase& A, const SpBase& B) { arma_extra_debug_sigprint(); return SpGlue(A.get_ref(), B.get_ref()); } template inline const SpGlue join_vert(const SpBase& A, const SpBase& B) { arma_extra_debug_sigprint(); return SpGlue(A.get_ref(), B.get_ref()); } template inline const SpGlue join_rows(const SpBase& A, const SpBase& B) { arma_extra_debug_sigprint(); return SpGlue(A.get_ref(), B.get_ref()); } template inline const SpGlue join_horiz(const SpBase& A, const SpBase& B) { arma_extra_debug_sigprint(); return SpGlue(A.get_ref(), B.get_ref()); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_kron.hpp ================================================ // Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_kron //! @{ //! \brief //! kronecker product of two matrices, //! with the matrices having the same element type template arma_inline const Glue kron(const Base& A, const Base& B) { arma_extra_debug_sigprint(); return Glue(A.get_ref(), B.get_ref()); } //! \brief //! kronecker product of two matrices, //! with the matrices having different element types template inline Mat::eT> kron(const Base,T1>& X, const Base& Y) { arma_extra_debug_sigprint(); typedef typename std::complex eT1; promote_type::check(); const unwrap tmp1(X.get_ref()); const unwrap tmp2(Y.get_ref()); const Mat& A = tmp1.M; const Mat& B = tmp2.M; Mat out; glue_kron::direct_kron(out, A, B); return out; } //! \brief //! kronecker product of two matrices, //! with the matrices having different element types template inline Mat::eT> kron(const Base& X, const Base,T2>& Y) { arma_extra_debug_sigprint(); typedef typename std::complex eT2; promote_type::check(); const unwrap tmp1(X.get_ref()); const unwrap tmp2(Y.get_ref()); const Mat& A = tmp1.M; const Mat& B = tmp2.M; Mat out; glue_kron::direct_kron(out, A, B); return out; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_log_det.hpp ================================================ // Copyright (C) 2010-2011 Conrad Sanderson // Copyright (C) 2010-2011 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_log_det //! @{ //! log determinant of mat template inline bool log_det ( typename T1::elem_type& out_val, typename T1::pod_type& out_sign, const Base& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return auxlib::log_det(out_val, out_sign, X); } template inline void log_det ( typename T1::elem_type& out_val, typename T1::pod_type& out_sign, const Op& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typedef typename T1::pod_type T; const diagmat_proxy A(X.m); const uword N = A.n_elem; if(N == 0) { out_val = eT(0); out_sign = T(1); return; } eT x = A[0]; T sign = (is_complex::value == false) ? ( (access::tmp_real(x) < T(0)) ? -1 : +1 ) : +1; eT val = (is_complex::value == false) ? std::log( (access::tmp_real(x) < T(0)) ? x*T(-1) : x ) : std::log(x); for(uword i=1; i::value == false) ? ( (access::tmp_real(x) < T(0)) ? -1 : +1 ) : +1; val += (is_complex::value == false) ? std::log( (access::tmp_real(x) < T(0)) ? x*T(-1) : x ) : std::log(x); } out_val = val; out_sign = sign; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_lu.hpp ================================================ // Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_lu //! @{ //! immediate lower upper decomposition, permutation info is embedded into L (similar to Matlab/Octave) template inline bool lu ( Mat& L, Mat& U, const Base& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); arma_debug_check( (&L == &U), "lu(): L and U are the same object"); const bool status = auxlib::lu(L, U, X); if(status == false) { L.reset(); U.reset(); arma_bad("lu(): failed to converge", false); } return status; } //! immediate lower upper decomposition, also providing the permutation matrix template inline bool lu ( Mat& L, Mat& U, Mat& P, const Base& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); arma_debug_check( ( (&L == &U) || (&L == &P) || (&U == &P) ), "lu(): two or more output objects are the same object"); const bool status = auxlib::lu(L, U, P, X); if(status == false) { L.reset(); U.reset(); P.reset(); arma_bad("lu(): failed to converge", false); } return status; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_max.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_max //! @{ //! \brief //! Delayed 'maximum values' operation. //! The dimension, along which the maxima are found, is set via 'dim'. //! For dim = 0, the maximum value of each column is found (i.e. searches by traversing across rows). //! For dim = 1, the maximum value of each row is found (i.e. searches by traversing across columns). //! The default is dim = 0. template arma_inline const Op max ( const T1& X, const uword dim = 0, const typename enable_if< is_arma_type::value == true >::result* junk1 = 0, const typename enable_if< resolves_to_vector::value == false >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return Op(X, dim, 0); } template arma_inline const Op max ( const T1& X, const uword dim, const typename enable_if::value == true>::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return Op(X, dim, 0); } template inline arma_warn_unused typename T1::elem_type max ( const T1& X, const arma_empty_class junk1 = arma_empty_class(), const typename enable_if::value == true>::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return op_max::max(X); } //! \brief //! Immediate 'find maximum value' operation, //! invoked, for example, by: max(max(A)) template inline arma_warn_unused typename T1::elem_type max(const Op& in) { arma_extra_debug_sigprint(); arma_extra_debug_print("max(): two consecutive max() calls detected"); return op_max::max(in.m); } template arma_inline const Op< Op, op_max> max(const Op& in, const uword dim) { arma_extra_debug_sigprint(); return Op< Op, op_max>(in, dim, 0); } template arma_inline arma_warn_unused const typename arma_scalar_only::result & max(const T& x) { return x; } //! element-wise maximum template arma_inline typename enable_if2 < ( is_arma_type::value && is_arma_type::value && is_same_type::value ), const Glue >::result max ( const T1& X, const T2& Y ) { arma_extra_debug_sigprint(); return Glue(X, Y); } template inline arma_warn_unused typename enable_if2 < (is_arma_sparse_type::value == true) && (resolves_to_sparse_vector::value == true), typename T1::elem_type >::result max(const T1& x) { arma_extra_debug_sigprint(); return spop_max::vector_max(x); } template inline typename enable_if2 < (is_arma_sparse_type::value == true) && (resolves_to_sparse_vector::value == false), const SpOp >::result max(const T1& X, const uword dim = 0) { arma_extra_debug_sigprint(); return SpOp(X, dim, 0); } template inline arma_warn_unused typename T1::elem_type max(const SpOp& X) { arma_extra_debug_sigprint(); arma_extra_debug_print("max(): two consecutive max() calls detected"); return spop_max::vector_max(X.m); } template inline const SpOp< SpOp, spop_max> max(const SpOp& in, const uword dim) { arma_extra_debug_sigprint(); return SpOp< SpOp, spop_max>(in, dim, 0); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_mean.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_mean //! @{ template arma_inline const Op mean ( const T1& X, const uword dim = 0, const typename enable_if< is_arma_type::value == true >::result* junk1 = 0, const typename enable_if< resolves_to_vector::value == false >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return Op(X, dim, 0); } template arma_inline const Op mean ( const T1& X, const uword dim, const typename enable_if::value == true>::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return Op(X, dim, 0); } template inline arma_warn_unused typename T1::elem_type mean ( const T1& X, const arma_empty_class junk1 = arma_empty_class(), const typename enable_if::value == true>::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return op_mean::mean_all(X); } //! \brief //! Immediate 'find mean value' operation, //! invoked, for example, by: mean(mean(A)) template inline arma_warn_unused typename T1::elem_type mean(const Op& in) { arma_extra_debug_sigprint(); arma_extra_debug_print("mean(): two consecutive mean() calls detected"); return op_mean::mean_all(in.m); } template arma_inline const Op< Op, op_mean> mean(const Op& in, const uword dim) { arma_extra_debug_sigprint(); return Op< Op, op_mean>(in, dim, 0); } template arma_inline arma_warn_unused const typename arma_scalar_only::result & mean(const T& x) { return x; } template inline arma_warn_unused const SpOp mean ( const T1& X, const uword dim = 0, const typename enable_if< is_arma_sparse_type::value == true >::result* junk1 = 0, const typename enable_if< resolves_to_sparse_vector::value == false >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return SpOp(X, dim, 0); } template inline arma_warn_unused const SpOp mean ( const T1& X, const uword dim, const typename enable_if< resolves_to_sparse_vector::value == true >::result* junk1 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); return SpOp(X, dim, 0); } template inline arma_warn_unused typename T1::elem_type mean ( const T1& X, const arma_empty_class junk1 = arma_empty_class(), const typename enable_if< resolves_to_sparse_vector::value == true >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return spop_mean::mean_all(X); } template inline arma_warn_unused typename T1::elem_type mean(const SpOp& in) { arma_extra_debug_sigprint(); arma_extra_debug_print("mean(): two consecutive mean() calls detected"); return spop_mean::mean_all(in.m); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_median.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_median //! @{ template arma_inline const Op median ( const T1& X, const uword dim = 0, const typename enable_if< is_arma_type::value == true >::result* junk1 = 0, const typename enable_if< resolves_to_vector::value == false >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return Op(X, dim, 0); } template arma_inline const Op median ( const T1& X, const uword dim, const typename enable_if::value == true>::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return Op(X, dim, 0); } template inline arma_warn_unused typename T1::elem_type median ( const T1& X, const arma_empty_class junk1 = arma_empty_class(), const typename enable_if::value == true>::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return op_median::median_vec(X); } template arma_inline arma_warn_unused const typename arma_scalar_only::result & median(const T& x) { return x; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_min.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_min //! @{ //! \brief //! Delayed 'minimum values' operation. //! The dimension, along which the minima are found, is set via 'dim'. //! For dim = 0, the minimum value of each column is found (i.e. searches by traversing across rows). //! For dim = 1, the minimum value of each row is found (i.e. searches by traversing across columns). //! The default is dim = 0. template arma_inline const Op min ( const T1& X, const uword dim = 0, const typename enable_if< is_arma_type::value == true >::result* junk1 = 0, const typename enable_if< resolves_to_vector::value == false >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return Op(X, dim, 0); } template arma_inline const Op min ( const T1& X, const uword dim, const typename enable_if::value == true>::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return Op(X, dim, 0); } template inline arma_warn_unused typename T1::elem_type min ( const T1& X, const arma_empty_class junk1 = arma_empty_class(), const typename enable_if::value == true>::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return op_min::min(X); } //! \brief //! Immediate 'find minimum value' operation, //! invoked, for example, by: min(min(A)) template inline arma_warn_unused typename T1::elem_type min(const Op& in) { arma_extra_debug_sigprint(); arma_extra_debug_print("min(): two consecutive min() calls detected"); return op_min::min(in.m); } template arma_inline const Op< Op, op_min> min(const Op& in, const uword dim) { arma_extra_debug_sigprint(); return Op< Op, op_min>(in, dim, 0); } template arma_inline arma_warn_unused const typename arma_scalar_only::result & min(const T& x) { return x; } //! element-wise minimum template arma_inline typename enable_if2 < ( is_arma_type::value && is_arma_type::value && is_same_type::value ), const Glue >::result min ( const T1& X, const T2& Y ) { arma_extra_debug_sigprint(); return Glue(X, Y); } template inline arma_warn_unused typename enable_if2 < (is_arma_sparse_type::value == true) && (resolves_to_sparse_vector::value == true), typename T1::elem_type >::result min(const T1& x) { arma_extra_debug_sigprint(); return spop_min::vector_min(x); } template inline typename enable_if2 < (is_arma_sparse_type::value == true) && (resolves_to_sparse_vector::value == false), const SpOp >::result min(const T1& X, const uword dim = 0) { arma_extra_debug_sigprint(); return SpOp(X, dim, 0); } template inline arma_warn_unused typename T1::elem_type min(const SpOp& X) { arma_extra_debug_sigprint(); arma_extra_debug_print("min(): two consecutive min() calls detected"); return spop_min::vector_min(X.m); } template inline const SpOp< SpOp, spop_min> min(const SpOp& in, const uword dim) { arma_extra_debug_sigprint(); return SpOp< SpOp, spop_min>(in, dim, 0); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_misc.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_misc //! @{ //! \brief //! Generate a vector with 'num' elements. //! The values of the elements linearly increase from 'start' upto (and including) 'end'. template inline typename enable_if2 < is_Mat::value, vec_type >::result linspace ( const typename vec_type::pod_type start, const typename vec_type::pod_type end, const uword num = 100u ) { arma_extra_debug_sigprint(); typedef typename vec_type::elem_type eT; typedef typename vec_type::pod_type T; vec_type x; if(num >= 2) { x.set_size(num); eT* x_mem = x.memptr(); const uword num_m1 = num - 1; if(is_non_integral::value == true) { const T delta = (end-start)/T(num_m1); for(uword i=0; i= start) ? double(end-start)/double(num_m1) : -double(start-end)/double(num_m1); for(uword i=0; i(start, end, num); } // // log_exp_add template inline typename arma_real_only::result log_add_exp(eT log_a, eT log_b) { if(log_a < log_b) { std::swap(log_a, log_b); } const eT negdelta = log_b - log_a; if( (negdelta < Datum::log_min) || (arma_isfinite(negdelta) == false) ) { return log_a; } else { return (log_a + arma_log1p(std::exp(negdelta))); } } // for compatibility with earlier versions template inline typename arma_real_only::result log_add(eT log_a, eT log_b) { return log_add_exp(log_a, log_b); } template arma_inline arma_warn_unused bool is_finite(const eT x, const typename arma_scalar_only::result* junk = 0) { arma_ignore(junk); return arma_isfinite(x); } template inline arma_warn_unused typename enable_if2 < is_arma_type::value, bool >::result is_finite(const T1& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(X); const bool have_direct_mem = (is_Mat::stored_type>::value) || (is_subview_col::stored_type>::value); if(have_direct_mem) { const quasi_unwrap::stored_type> tmp(P.Q); return tmp.M.is_finite(); } if(Proxy::prefer_at_accessor == false) { const typename Proxy::ea_type Pea = P.get_ea(); const uword n_elem = P.get_n_elem(); uword i,j; for(i=0, j=1; j inline arma_warn_unused bool is_finite(const SpBase& X) { arma_extra_debug_sigprint(); const SpProxy P(X.get_ref()); if(is_SpMat::stored_type>::value) { const unwrap_spmat::stored_type> tmp(P.Q); return tmp.M.is_finite(); } else { typename SpProxy::const_iterator_type it = P.begin(); typename SpProxy::const_iterator_type it_end = P.end(); while(it != it_end) { if(arma_isfinite(*it) == false) { return false; } ++it; } } return true; } template inline arma_warn_unused bool is_finite(const BaseCube& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_cube tmp(X.get_ref()); const Cube& A = tmp.M; return A.is_finite(); } //! DO NOT USE IN NEW CODE; change instances of inv(sympd(X)) to inv_sympd(X) template arma_deprecated inline const T1& sympd(const Base& X) { arma_extra_debug_sigprint(); return X.get_ref(); } template inline void swap(Mat& A, Mat& B) { arma_extra_debug_sigprint(); A.swap(B); } template inline void swap(Cube& A, Cube& B) { arma_extra_debug_sigprint(); A.swap(B); } template arma_inline const Op orth(const Base& X, const typename T1::pod_type tol = 0.0, const typename arma_blas_type_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; return Op(X.get_ref(), eT(tol)); } template inline bool orth(Mat& out, const Base& X, const typename T1::pod_type tol = 0.0, const typename arma_blas_type_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); try { out = orth(X,tol); } catch (std::runtime_error&) { return false; } return true; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_n_unique.hpp ================================================ // Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_n_unique //! @{ //! \brief //! Get the number of unique nonzero elements in two sparse matrices. //! This is very useful for determining the amount of memory necessary before //! a sparse matrix operation on two matrices. template inline uword n_unique ( const SpBase& x, const SpBase& y, const op_n_unique_type junk ) { arma_extra_debug_sigprint(); const SpProxy pa(x.get_ref()); const SpProxy pb(y.get_ref()); return n_unique(pa,pb,junk); } template arma_hot inline uword n_unique ( const SpProxy& pa, const SpProxy& pb, const op_n_unique_type junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typename SpProxy::const_iterator_type x_it = pa.begin(); typename SpProxy::const_iterator_type x_it_end = pa.end(); typename SpProxy::const_iterator_type y_it = pb.begin(); typename SpProxy::const_iterator_type y_it_end = pb.end(); uword total_n_nonzero = 0; while( (x_it != x_it_end) || (y_it != y_it_end) ) { if(x_it == y_it) { if(op_n_unique_type::eval((*x_it), (*y_it)) != typename T1::elem_type(0)) { ++total_n_nonzero; } ++x_it; ++y_it; } else { if((x_it.col() < y_it.col()) || ((x_it.col() == y_it.col()) && (x_it.row() < y_it.row()))) // if y is closer to the end { if(op_n_unique_type::eval((*x_it), typename T1::elem_type(0)) != typename T1::elem_type(0)) { ++total_n_nonzero; } ++x_it; } else // x is closer to the end { if(op_n_unique_type::eval(typename T1::elem_type(0), (*y_it)) != typename T1::elem_type(0)) { ++total_n_nonzero; } ++y_it; } } } return total_n_nonzero; } // Simple operators. struct op_n_unique_add { template inline static eT eval(const eT& l, const eT& r) { return (l + r); } }; struct op_n_unique_sub { template inline static eT eval(const eT& l, const eT& r) { return (l - r); } }; struct op_n_unique_mul { template inline static eT eval(const eT& l, const eT& r) { return (l * r); } }; struct op_n_unique_count { template inline static eT eval(const eT&, const eT&) { return eT(1); } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_nonzeros.hpp ================================================ // Copyright (C) 2015 Conrad Sanderson // Copyright (C) 2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_nonzeros //! @{ template inline const Op nonzeros(const Base& X) { arma_extra_debug_sigprint(); return Op(X.get_ref()); } template inline Col nonzeros(const SpBase& X) { arma_extra_debug_sigprint(); Col out; op_nonzeros::apply_noalias(out, X.get_ref()); return out; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_norm.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_norm //! @{ template arma_hot inline typename T1::pod_type arma_vec_norm_1 ( const Proxy& P, const typename arma_not_cx::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::pod_type T; T acc = T(0); if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type A = P.get_ea(); const uword N = P.get_n_elem(); T acc1 = T(0); T acc2 = T(0); uword i,j; for(i=0, j=1; j arma_hot inline typename T1::pod_type arma_vec_norm_1 ( const Proxy& P, const typename arma_cx_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typedef typename T1::pod_type T; T acc = T(0); if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type A = P.get_ea(); const uword N = P.get_n_elem(); for(uword i=0; i& X = A[i]; const T a = X.real(); const T b = X.imag(); acc += std::sqrt( (a*a) + (b*b) ); } } else { const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); if(n_rows == 1) { for(uword col=0; col& X = P.at(0,col); const T a = X.real(); const T b = X.imag(); acc += std::sqrt( (a*a) + (b*b) ); } } else { for(uword col=0; col& X = P.at(row,col); const T a = X.real(); const T b = X.imag(); acc += std::sqrt( (a*a) + (b*b) ); } } } if( (acc != T(0)) && arma_isfinite(acc) ) { return acc; } else { arma_extra_debug_print("arma_vec_norm_1(): detected possible underflow or overflow"); const quasi_unwrap::stored_type> R(P.Q); const uword N = R.M.n_elem; const eT* R_mem = R.M.memptr(); T max_val = priv::most_neg(); for(uword i=0; i& X = R_mem[i]; const T a = std::abs(X.real()); const T b = std::abs(X.imag()); if(a > max_val) { max_val = a; } if(b > max_val) { max_val = b; } } if(max_val == T(0)) { return T(0); } T alt_acc = T(0); for(uword i=0; i& X = R_mem[i]; const T a = X.real() / max_val; const T b = X.imag() / max_val; alt_acc += std::sqrt( (a*a) + (b*b) ); } return ( alt_acc * max_val ); } } template arma_hot inline eT arma_vec_norm_2_direct_mem_robust ( const Mat& X ) { arma_extra_debug_sigprint(); const uword N = X.n_elem; const eT* A = X.memptr(); eT max_val = priv::most_neg(); uword j; for(j=1; j max_val) { max_val = val_i; } if(val_j > max_val) { max_val = val_j; } } if((j-1) < N) { const eT val_i = std::abs(*A); if(val_i > max_val) { max_val = val_i; } } if(max_val == eT(0)) { return eT(0); } const eT* B = X.memptr(); eT acc1 = eT(0); eT acc2 = eT(0); for(j=1; j arma_hot inline eT arma_vec_norm_2_direct_mem_fast ( const Mat& X ) { arma_extra_debug_sigprint(); const uword N = X.n_elem; const eT* A = X.memptr(); eT acc; #if defined(__FINITE_MATH_ONLY__) && (__FINITE_MATH_ONLY__ > 0) { eT acc1 = eT(0); if(memory::is_aligned(A)) { memory::mark_as_aligned(A); for(uword i=0; i arma_hot inline typename T1::pod_type arma_vec_norm_2 ( const Proxy& P, const typename arma_not_cx::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); const bool have_direct_mem = (is_Mat::stored_type>::value) || (is_subview_col::stored_type>::value); if(have_direct_mem) { const quasi_unwrap::stored_type> tmp(P.Q); return arma_vec_norm_2_direct_mem_fast(tmp.M); } typedef typename T1::pod_type T; T acc = T(0); if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type A = P.get_ea(); const uword N = P.get_n_elem(); T acc1 = T(0); T acc2 = T(0); uword i,j; for(i=0, j=1; j::stored_type> tmp(P.Q); return arma_vec_norm_2_direct_mem_robust(tmp.M); } } template arma_hot inline typename T1::pod_type arma_vec_norm_2 ( const Proxy& P, const typename arma_cx_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typedef typename T1::pod_type T; T acc = T(0); if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type A = P.get_ea(); const uword N = P.get_n_elem(); for(uword i=0; i& X = A[i]; const T a = X.real(); const T b = X.imag(); acc += (a*a) + (b*b); } } else { const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); if(n_rows == 1) { for(uword col=0; col& X = P.at(0,col); const T a = X.real(); const T b = X.imag(); acc += (a*a) + (b*b); } } else { for(uword col=0; col& X = P.at(row,col); const T a = X.real(); const T b = X.imag(); acc += (a*a) + (b*b); } } } const T sqrt_acc = std::sqrt(acc); if( (sqrt_acc != T(0)) && arma_isfinite(sqrt_acc) ) { return sqrt_acc; } else { arma_extra_debug_print("arma_vec_norm_2(): detected possible underflow or overflow"); const quasi_unwrap::stored_type> R(P.Q); const uword N = R.M.n_elem; const eT* R_mem = R.M.memptr(); T max_val = priv::most_neg(); for(uword i=0; i max_val) { max_val = val_i; } } if(max_val == T(0)) { return T(0); } T alt_acc = T(0); for(uword i=0; i arma_hot inline typename T1::pod_type arma_vec_norm_k ( const Proxy& P, const int k ) { arma_extra_debug_sigprint(); typedef typename T1::pod_type T; T acc = T(0); if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type A = P.get_ea(); const uword N = P.get_n_elem(); uword i,j; for(i=0, j=1; j arma_hot inline typename T1::pod_type arma_vec_norm_max(const Proxy& P) { arma_extra_debug_sigprint(); typedef typename T1::pod_type T; const uword N = P.get_n_elem(); T max_val = (N != 1) ? priv::most_neg() : std::abs(P[0]); if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type A = P.get_ea(); uword i,j; for(i=0, j=1; j arma_hot inline typename T1::pod_type arma_vec_norm_min(const Proxy& P) { arma_extra_debug_sigprint(); typedef typename T1::pod_type T; const uword N = P.get_n_elem(); T min_val = (N != 1) ? priv::most_pos() : std::abs(P[0]); if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type A = P.get_ea(); uword i,j; for(i=0, j=1; j tmp_i) { min_val = tmp_i; } if(min_val > tmp_j) { min_val = tmp_j; } } if(i < N) { const T tmp_i = std::abs(A[i]); if(min_val > tmp_i) { min_val = tmp_i; } } } else { const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); if(n_rows != 1) { for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { const T tmp = std::abs(P.at(row,col)); if(min_val > tmp) { min_val = tmp; } } } else { for(uword col=0; col < n_cols; ++col) { const T tmp = std::abs(P.at(0,col)); if(min_val > tmp) { min_val = tmp; } } } } return min_val; } template inline typename T1::pod_type arma_mat_norm_1(const Proxy& P) { arma_extra_debug_sigprint(); // TODO: this can be sped up with a dedicated implementation return as_scalar( max( sum(abs(P.Q), 0), 1) ); } template inline typename T1::pod_type arma_mat_norm_2(const Proxy& P) { arma_extra_debug_sigprint(); typedef typename T1::pod_type T; // TODO: is the SVD based approach only valid for square matrices? Col S; svd(S, P.Q); return (S.n_elem > 0) ? max(S) : T(0); } template inline typename T1::pod_type arma_mat_norm_inf(const Proxy& P) { arma_extra_debug_sigprint(); // TODO: this can be sped up with a dedicated implementation return as_scalar( max( sum(abs(P.Q), 1), 0) ); } template inline arma_warn_unused typename enable_if2< is_arma_type::value, typename T1::pod_type >::result norm ( const T1& X, const uword k = uword(2), const typename arma_real_or_cx_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::pod_type T; const Proxy P(X); if(P.get_n_elem() == 0) { return T(0); } const bool is_vec = (P.get_n_rows() == 1) || (P.get_n_cols() == 1); if(is_vec) { switch(k) { case 1: return arma_vec_norm_1(P); break; case 2: return arma_vec_norm_2(P); break; default: { arma_debug_check( (k == 0), "norm(): k must be greater than zero" ); return arma_vec_norm_k(P, int(k)); } } } else { switch(k) { case 1: return arma_mat_norm_1(P); break; case 2: return arma_mat_norm_2(P); break; default: arma_stop("norm(): unsupported matrix norm type"); return T(0); } } return T(0); // prevent erroneous compiler warnings } template inline arma_warn_unused typename enable_if2< is_arma_type::value, typename T1::pod_type >::result norm ( const T1& X, const char* method, const typename arma_real_or_cx_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::pod_type T; const Proxy P(X); if(P.get_n_elem() == 0) { return T(0); } const char sig = (method != NULL) ? method[0] : char(0); const bool is_vec = (P.get_n_rows() == 1) || (P.get_n_cols() == 1); if(is_vec) { if( (sig == 'i') || (sig == 'I') || (sig == '+') ) // max norm { return arma_vec_norm_max(P); } else if(sig == '-') // min norm { return arma_vec_norm_min(P); } else if( (sig == 'f') || (sig == 'F') ) { return arma_vec_norm_2(P); } else { arma_stop("norm(): unsupported vector norm type"); return T(0); } } else { if( (sig == 'i') || (sig == 'I') || (sig == '+') ) // inf norm { return arma_mat_norm_inf(P); } else if( (sig == 'f') || (sig == 'F') ) { return arma_vec_norm_2(P); } else { arma_stop("norm(): unsupported matrix norm type"); return T(0); } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_norm_sparse.hpp ================================================ // Copyright (C) 2012-2014 Conrad Sanderson // Copyright (C) 2012-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_norm //! @{ // // norms for sparse matrices template inline typename T1::pod_type arma_mat_norm_1(const SpProxy& P) { arma_extra_debug_sigprint(); // TODO: this can be sped up with a dedicated implementation return as_scalar( max( sum(abs(P.Q), 0), 1) ); } template inline typename T1::pod_type arma_mat_norm_2(const SpProxy& P, const typename arma_real_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); // norm = sqrt( largest eigenvalue of (A^H)*A ), where ^H is the conjugate transpose // http://math.stackexchange.com/questions/4368/computing-the-largest-eigenvalue-of-a-very-large-sparse-matrix typedef typename T1::elem_type eT; typedef typename T1::pod_type T; const unwrap_spmat::stored_type> tmp(P.Q); const SpMat& A = tmp.M; const SpMat B = trans(A); const SpMat C = (A.n_rows <= A.n_cols) ? (A*B) : (B*A); const Col eigval = eigs_sym(C, 1); return (eigval.n_elem > 0) ? std::sqrt(eigval[0]) : T(0); } template inline typename T1::pod_type arma_mat_norm_2(const SpProxy& P, const typename arma_cx_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); //typedef typename T1::elem_type eT; typedef typename T1::pod_type T; arma_ignore(P); arma_stop("norm(): unimplemented norm type for complex sparse matrices"); return T(0); // const unwrap_spmat::stored_type> tmp(P.Q); // // const SpMat& A = tmp.M; // const SpMat B = trans(A); // // const SpMat C = (A.n_rows <= A.n_cols) ? (A*B) : (B*A); // // const Col eigval = eigs_gen(C, 1); } template inline typename T1::pod_type arma_mat_norm_inf(const SpProxy& P) { arma_extra_debug_sigprint(); // TODO: this can be sped up with a dedicated implementation return as_scalar( max( sum(abs(P.Q), 1), 0) ); } template inline arma_warn_unused typename enable_if2< is_arma_sparse_type::value, typename T1::pod_type >::result norm ( const T1& X, const uword k = uword(2), const typename arma_real_or_cx_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typedef typename T1::pod_type T; const SpProxy P(X); if(P.get_n_nonzero() == 0) { return T(0); } const bool is_vec = (P.get_n_rows() == 1) || (P.get_n_cols() == 1); if(is_vec == true) { const unwrap_spmat::stored_type> tmp(P.Q); const SpMat& A = tmp.M; // create a fake dense vector to allow reuse of code for dense vectors Col fake_vector( access::rwp(A.values), A.n_nonzero, false ); const Proxy< Col > P_fake_vector(fake_vector); switch(k) { case 1: return arma_vec_norm_1(P_fake_vector); break; case 2: return arma_vec_norm_2(P_fake_vector); break; default: { arma_debug_check( (k == 0), "norm(): k must be greater than zero" ); return arma_vec_norm_k(P_fake_vector, int(k)); } } } else { switch(k) { case 1: return arma_mat_norm_1(P); break; case 2: return arma_mat_norm_2(P); break; default: arma_stop("norm(): unsupported or unimplemented norm type for sparse matrices"); return T(0); } } } template inline arma_warn_unused typename enable_if2< is_arma_sparse_type::value, typename T1::pod_type >::result norm ( const T1& X, const char* method, const typename arma_real_or_cx_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typedef typename T1::pod_type T; const SpProxy P(X); if(P.get_n_nonzero() == 0) { return T(0); } const unwrap_spmat::stored_type> tmp(P.Q); const SpMat& A = tmp.M; // create a fake dense vector to allow reuse of code for dense vectors Col fake_vector( access::rwp(A.values), A.n_nonzero, false ); const Proxy< Col > P_fake_vector(fake_vector); const char sig = (method != NULL) ? method[0] : char(0); const bool is_vec = (P.get_n_rows() == 1) || (P.get_n_cols() == 1); if(is_vec == true) { if( (sig == 'i') || (sig == 'I') || (sig == '+') ) // max norm { return arma_vec_norm_max(P_fake_vector); } else if(sig == '-') // min norm { const T val = arma_vec_norm_min(P_fake_vector); if( P.get_n_nonzero() < P.get_n_elem() ) { return (std::min)(T(0), val); } else { return val; } } else if( (sig == 'f') || (sig == 'F') ) { return arma_vec_norm_2(P_fake_vector); } else { arma_stop("norm(): unsupported vector norm type"); return T(0); } } else { if( (sig == 'i') || (sig == 'I') || (sig == '+') ) // inf norm { return arma_mat_norm_inf(P); } else if( (sig == 'f') || (sig == 'F') ) { return arma_vec_norm_2(P_fake_vector); } else { arma_stop("norm(): unsupported matrix norm type"); return T(0); } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_normalise.hpp ================================================ // Copyright (C) 2014 Conrad Sanderson // Copyright (C) 2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_normalise //! @{ template inline typename enable_if2 < (is_arma_type::value && resolves_to_colvector::value), const Op >::result normalise ( const T1& X, const uword p = uword(2), const arma_empty_class junk1 = arma_empty_class(), const typename arma_real_or_cx_only::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return Op(X, p, 0); } template inline typename enable_if2 < (is_arma_type::value && resolves_to_rowvector::value), const Op >::result normalise ( const T1& X, const uword p = uword(2), const arma_empty_class junk1 = arma_empty_class(), const typename arma_real_or_cx_only::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return Op(X, p, 0); } template inline typename enable_if2 < (is_arma_type::value && (resolves_to_vector::value == false)), const Op >::result normalise ( const T1& X, const uword p = uword(2), const uword dim = 0, const typename arma_real_or_cx_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return Op(X, p, dim); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_numel.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_numel //! @{ template inline typename enable_if2< is_arma_type::value, uword >::result numel(const T1& X) { arma_extra_debug_sigprint(); const Proxy P(X); return P.get_n_elem(); } template inline typename enable_if2< is_arma_cube_type::value, uword >::result numel(const T1& X) { arma_extra_debug_sigprint(); const ProxyCube P(X); return P.get_n_elem(); } template inline typename enable_if2< is_arma_sparse_type::value, uword >::result numel(const T1& X) { arma_extra_debug_sigprint(); const SpProxy P(X); return P.get_n_elem(); } template inline uword numel(const field& X) { arma_extra_debug_sigprint(); return X.n_elem; } template inline uword numel(const subview_field& X) { arma_extra_debug_sigprint(); return X.n_elem; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_ones.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_ones //! @{ arma_inline const Gen ones(const uword n_elem) { arma_extra_debug_sigprint(); return Gen(n_elem, 1); } template arma_inline const Gen ones(const uword n_elem, const arma_empty_class junk1 = arma_empty_class(), const typename arma_Mat_Col_Row_only::result* junk2 = 0) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); if(is_Row::value == true) { return Gen(1, n_elem); } else { return Gen(n_elem, 1); } } arma_inline const Gen ones(const uword n_rows, const uword n_cols) { arma_extra_debug_sigprint(); return Gen(n_rows, n_cols); } template inline const Gen ones(const uword n_rows, const uword n_cols, const typename arma_Mat_Col_Row_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); if(is_Col::value == true) { arma_debug_check( (n_cols != 1), "ones(): incompatible size" ); } else if(is_Row::value == true) { arma_debug_check( (n_rows != 1), "ones(): incompatible size" ); } return Gen(n_rows, n_cols); } arma_inline const GenCube ones(const uword n_rows, const uword n_cols, const uword n_slices) { arma_extra_debug_sigprint(); return GenCube(n_rows, n_cols, n_slices); } template arma_inline const GenCube ones(const uword n_rows, const uword n_cols, const uword n_slices, const typename arma_Cube_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); return GenCube(n_rows, n_cols, n_slices); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_pinv.hpp ================================================ // Copyright (C) 2009-2013 Conrad Sanderson // Copyright (C) 2009-2013 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_pinv //! @{ template inline const Op pinv ( const Base& X, const typename T1::elem_type tol = 0.0, const char* method = "dc", const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'd')), "pinv(): unknown method specified" ); return (sig == 'd') ? Op(X.get_ref(), tol, 1, 0) : Op(X.get_ref(), tol, 0, 0); } template inline bool pinv ( Mat& out, const Base& X, const typename T1::elem_type tol = 0.0, const char* method = "dc", const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); try { out = pinv(X, tol, method); } catch(std::runtime_error&) { return false; } return true; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_princomp.hpp ================================================ // Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_princomp //! @{ //! \brief //! principal component analysis -- 4 arguments version //! coeff_out -> principal component coefficients //! score_out -> projected samples //! latent_out -> eigenvalues of principal vectors //! tsquared_out -> Hotelling's T^2 statistic template inline bool princomp ( Mat& coeff_out, Mat& score_out, Col& latent_out, Col& tsquared_out, const Base& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); const bool status = op_princomp::direct_princomp(coeff_out, score_out, latent_out, tsquared_out, X); if(status == false) { coeff_out.reset(); score_out.reset(); latent_out.reset(); tsquared_out.reset(); arma_bad("princomp(): failed to converge", false); } return status; } //! \brief //! principal component analysis -- 3 arguments version //! coeff_out -> principal component coefficients //! score_out -> projected samples //! latent_out -> eigenvalues of principal vectors template inline bool princomp ( Mat& coeff_out, Mat& score_out, Col& latent_out, const Base& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); const bool status = op_princomp::direct_princomp(coeff_out, score_out, latent_out, X); if(status == false) { coeff_out.reset(); score_out.reset(); latent_out.reset(); arma_bad("princomp(): failed to converge", false); } return status; } //! \brief //! principal component analysis -- 2 arguments version //! coeff_out -> principal component coefficients //! score_out -> projected samples template inline bool princomp ( Mat& coeff_out, Mat& score_out, const Base& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); const bool status = op_princomp::direct_princomp(coeff_out, score_out, X); if(status == false) { coeff_out.reset(); score_out.reset(); arma_bad("princomp(): failed to converge", false); } return status; } //! \brief //! principal component analysis -- 1 argument version //! coeff_out -> principal component coefficients template inline bool princomp ( Mat& coeff_out, const Base& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); const bool status = op_princomp::direct_princomp(coeff_out, X); if(status == false) { coeff_out.reset(); arma_bad("princomp(): failed to converge", false); } return status; } template inline const Op princomp ( const Base& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return Op(X.get_ref()); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_prod.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_prod //! @{ //! \brief //! Delayed product of elements of a matrix along a specified dimension (either rows or columns). //! The result is stored in a dense matrix that has either one column or one row. //! For dim = 0, find the sum of each column (i.e. traverse across rows) //! For dim = 1, find the sum of each row (i.e. traverse across columns) //! The default is dim = 0. //! NOTE: this function works differently than in Matlab/Octave. template arma_inline const Op prod ( const T1& X, const uword dim = 0, const typename enable_if< is_arma_type::value == true >::result* junk1 = 0, const typename enable_if< resolves_to_vector::value == false >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return Op(X, dim, 0); } template arma_inline const Op prod ( const T1& X, const uword dim, const typename enable_if::value == true>::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return Op(X, dim, 0); } template inline arma_warn_unused typename T1::elem_type prod ( const T1& X, const arma_empty_class junk1 = arma_empty_class(), const typename enable_if::value == true>::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return op_prod::prod( X ); } //! \brief //! Immediate 'product of all values' operation, //! invoked, for example, by: prod(prod(A)) template inline arma_warn_unused typename T1::elem_type prod(const Op& in) { arma_extra_debug_sigprint(); arma_extra_debug_print("prod(): two consecutive prod() calls detected"); return op_prod::prod( in.m ); } template inline const Op, op_prod> prod(const Op& in, const uword dim) { arma_extra_debug_sigprint(); return Op, op_prod>(in, dim, 0); } template arma_inline arma_warn_unused const typename arma_scalar_only::result & prod(const T& x) { return x; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_qr.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_qr //! @{ //! QR decomposition template inline bool qr ( Mat& Q, Mat& R, const Base& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); arma_debug_check( (&Q == &R), "qr(): Q and R are the same object"); const bool status = auxlib::qr(Q, R, X); if(status == false) { Q.reset(); R.reset(); arma_bad("qr(): failed to converge", false); } return status; } //! economical QR decomposition template inline bool qr_econ ( Mat& Q, Mat& R, const Base& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); arma_debug_check( (&Q == &R), "qr_econ(): Q and R are the same object"); const bool status = auxlib::qr_econ(Q, R, X); if(status == false) { Q.reset(); R.reset(); arma_bad("qr_econ(): failed to converge", false); } return status; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_qz.hpp ================================================ // Copyright (C) 2015 Conrad Sanderson // Copyright (C) 2015 NICTA (www.nicta.com.au) // Copyright (C) 2015 Keith O'Hara // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_qz //! @{ //! QZ decomposition for pair of N-by-N general matrices (A,B) template inline typename enable_if2 < is_supported_blas_type::value, bool >::result qz ( Mat& AA, Mat& BB, Mat& Q, Mat& Z, const Base& A, const Base& B ) { arma_extra_debug_sigprint(); const bool status = auxlib::qz(AA, BB, Q, Z, A, B, 'b'); if(status == false) { AA.reset(); BB.reset(); Q.reset(); Z.reset(); arma_bad("qz(): failed to converge", false); } return status; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_randg.hpp ================================================ // Copyright (C) 2015 Conrad Sanderson // Copyright (C) 2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_randg //! @{ template inline obj_type randg(const uword n_rows, const uword n_cols, const distr_param& param = distr_param(), const typename arma_Mat_Col_Row_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); #if defined(ARMA_USE_CXX11) { if(is_Col::value == true) { arma_debug_check( (n_cols != 1), "randg(): incompatible size" ); } else if(is_Row::value == true) { arma_debug_check( (n_rows != 1), "randg(): incompatible size" ); } obj_type out(n_rows, n_cols); double a; double b; if(param.state == 0) { a = double(1); b = double(1); } else if(param.state == 1) { a = double(param.a_int); b = double(param.b_int); } else { a = param.a_double; b = param.b_double; } arma_debug_check( ((a <= double(0)) || (b <= double(0))), "randg(): a and b must be greater than zero" ); #if defined(ARMA_USE_EXTERN_CXX11_RNG) { arma_rng_cxx11_instance.randg_fill(out.memptr(), out.n_elem, a, b); } #else { arma_rng_cxx11 local_arma_rng_cxx11_instance; typedef typename arma_rng_cxx11::seed_type seed_type; local_arma_rng_cxx11_instance.set_seed( seed_type(arma_rng::randi()) ); local_arma_rng_cxx11_instance.randg_fill(out.memptr(), out.n_elem, a, b); } #endif return out; } #else { arma_ignore(n_rows); arma_ignore(n_cols); arma_ignore(param); arma_stop("randg(): C++11 compiler required"); return obj_type(); } #endif } template inline obj_type randg(const uword n_elem, const distr_param& param = distr_param(), const arma_empty_class junk1 = arma_empty_class(), const typename arma_Mat_Col_Row_only::result* junk2 = 0) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); if(is_Row::value == true) { return randg(1, n_elem, param); } else { return randg(n_elem, 1, param); } } inline mat randg(const uword n_rows, const uword n_cols, const distr_param& param = distr_param()) { arma_extra_debug_sigprint(); return randg(n_rows, n_cols, param); } inline vec randg(const uword n_elem, const distr_param& param = distr_param()) { arma_extra_debug_sigprint(); return randg(n_elem, param); } template inline cube_type randg(const uword n_rows, const uword n_cols, const uword n_slices, const distr_param& param = distr_param(), const typename arma_Cube_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); #if defined(ARMA_USE_CXX11) { cube_type out(n_rows, n_cols, n_slices); double a; double b; if(param.state == 0) { a = double(1); b = double(1); } else if(param.state == 1) { a = double(param.a_int); b = double(param.b_int); } else { a = param.a_double; b = param.b_double; } arma_debug_check( ((a <= double(0)) || (b <= double(0))), "randg(): a and b must be greater than zero" ); #if defined(ARMA_USE_EXTERN_CXX11_RNG) { arma_rng_cxx11_instance.randg_fill(out.memptr(), out.n_elem, a, b); } #else { arma_rng_cxx11 local_arma_rng_cxx11_instance; typedef typename arma_rng_cxx11::seed_type seed_type; local_arma_rng_cxx11_instance.set_seed( seed_type(arma_rng::randi()) ); local_arma_rng_cxx11_instance.randg_fill(out.memptr(), out.n_elem, a, b); } #endif return out; } #else { arma_ignore(n_rows); arma_ignore(n_cols); arma_ignore(n_slices); arma_ignore(param); arma_stop("randg(): C++11 compiler required"); return cube_type(); } #endif } inline cube randg(const uword n_rows, const uword n_cols, const uword n_slices, const distr_param& param = distr_param()) { arma_extra_debug_sigprint(); return randg(n_rows, n_cols, n_slices, param); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_randi.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_randi //! @{ template inline obj_type randi(const uword n_rows, const uword n_cols, const distr_param& param = distr_param(), const typename arma_Mat_Col_Row_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename obj_type::elem_type eT; if(is_Col::value == true) { arma_debug_check( (n_cols != 1), "randi(): incompatible size" ); } else if(is_Row::value == true) { arma_debug_check( (n_rows != 1), "randi(): incompatible size" ); } obj_type out(n_rows, n_cols); int a; int b; if(param.state == 0) { a = 0; b = arma_rng::randi::max_val(); } else if(param.state == 1) { a = param.a_int; b = param.b_int; } else { a = int(param.a_double); b = int(param.b_double); } arma_debug_check( (a > b), "randi(): incorrect distribution parameters: a must be less than b" ); arma_rng::randi::fill(out.memptr(), out.n_elem, a, b); return out; } template inline obj_type randi(const uword n_elem, const distr_param& param = distr_param(), const arma_empty_class junk1 = arma_empty_class(), const typename arma_Mat_Col_Row_only::result* junk2 = 0) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); if(is_Row::value == true) { return randi(1, n_elem, param); } else { return randi(n_elem, 1, param); } } inline imat randi(const uword n_rows, const uword n_cols, const distr_param& param = distr_param()) { arma_extra_debug_sigprint(); return randi(n_rows, n_cols, param); } inline ivec randi(const uword n_elem, const distr_param& param = distr_param()) { arma_extra_debug_sigprint(); return randi(n_elem, param); } template inline cube_type randi(const uword n_rows, const uword n_cols, const uword n_slices, const distr_param& param = distr_param(), const typename arma_Cube_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename cube_type::elem_type eT; cube_type out(n_rows, n_cols, n_slices); int a; int b; if(param.state == 0) { a = 0; b = arma_rng::randi::max_val(); } else if(param.state == 1) { a = param.a_int; b = param.b_int; } else { a = int(param.a_double); b = int(param.b_double); } arma_debug_check( (a > b), "randi(): incorrect distribution parameters: a must be less than b" ); arma_rng::randi::fill(out.memptr(), out.n_elem, a, b); return out; } inline icube randi(const uword n_rows, const uword n_cols, const uword n_slices, const distr_param& param = distr_param()) { arma_extra_debug_sigprint(); return randi(n_rows, n_cols, n_slices, param); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_randn.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_randn //! @{ inline double randn() { return double(arma_rng::randn()); } template inline typename arma_scalar_only::result randn() { return eT(arma_rng::randn()); } //! Generate a vector with all elements set to random values with a gaussian distribution (zero mean, unit variance) arma_inline const Gen randn(const uword n_elem) { arma_extra_debug_sigprint(); return Gen(n_elem, 1); } template arma_inline const Gen randn(const uword n_elem, const arma_empty_class junk1 = arma_empty_class(), const typename arma_Mat_Col_Row_only::result* junk2 = 0) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); if(is_Row::value == true) { return Gen(1, n_elem); } else { return Gen(n_elem, 1); } } //! Generate a dense matrix with all elements set to random values with a gaussian distribution (zero mean, unit variance) arma_inline const Gen randn(const uword n_rows, const uword n_cols) { arma_extra_debug_sigprint(); return Gen(n_rows, n_cols); } template arma_inline const Gen randn(const uword n_rows, const uword n_cols, const typename arma_Mat_Col_Row_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); if(is_Col::value == true) { arma_debug_check( (n_cols != 1), "randn(): incompatible size" ); } else if(is_Row::value == true) { arma_debug_check( (n_rows != 1), "randn(): incompatible size" ); } return Gen(n_rows, n_cols); } arma_inline const GenCube randn(const uword n_rows, const uword n_cols, const uword n_slices) { arma_extra_debug_sigprint(); return GenCube(n_rows, n_cols, n_slices); } template arma_inline const GenCube randn(const uword n_rows, const uword n_cols, const uword n_slices, const typename arma_Cube_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); return GenCube(n_rows, n_cols, n_slices); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_randu.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_randu //! @{ inline double randu() { return arma_rng::randu(); } template inline typename arma_scalar_only::result randu() { return eT(arma_rng::randu()); } //! Generate a vector with all elements set to random values in the [0,1] interval (uniform distribution) arma_inline const Gen randu(const uword n_elem) { arma_extra_debug_sigprint(); return Gen(n_elem, 1); } template arma_inline const Gen randu(const uword n_elem, const arma_empty_class junk1 = arma_empty_class(), const typename arma_Mat_Col_Row_only::result* junk2 = 0) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); if(is_Row::value == true) { return Gen(1, n_elem); } else { return Gen(n_elem, 1); } } //! Generate a dense matrix with all elements set to random values in the [0,1] interval (uniform distribution) arma_inline const Gen randu(const uword n_rows, const uword n_cols) { arma_extra_debug_sigprint(); return Gen(n_rows, n_cols); } template arma_inline const Gen randu(const uword n_rows, const uword n_cols, const typename arma_Mat_Col_Row_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); if(is_Col::value == true) { arma_debug_check( (n_cols != 1), "randu(): incompatible size" ); } else if(is_Row::value == true) { arma_debug_check( (n_rows != 1), "randu(): incompatible size" ); } return Gen(n_rows, n_cols); } arma_inline const GenCube randu(const uword n_rows, const uword n_cols, const uword n_slices) { arma_extra_debug_sigprint(); return GenCube(n_rows, n_cols, n_slices); } template arma_inline const GenCube randu(const uword n_rows, const uword n_cols, const uword n_slices, const typename arma_Cube_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); return GenCube(n_rows, n_cols, n_slices); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_rank.hpp ================================================ // Copyright (C) 2009-2015 Conrad Sanderson // Copyright (C) 2009-2015 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2011 Stanislav Funiak // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_rank //! @{ template inline arma_warn_unused uword rank ( const Base& X, typename T1::pod_type tol = 0.0, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::pod_type T; uword X_n_rows; uword X_n_cols; Col s; const bool status = auxlib::svd_dc(s, X, X_n_rows, X_n_cols); if(status == false) { arma_bad("rank(): failed to converge"); return uword(0); } const uword s_n_elem = s.n_elem; const T* s_mem = s.memptr(); // set tolerance to default if it hasn't been specified if( (tol == T(0)) && (s_n_elem > 0) ) { tol = (std::max)(X_n_rows, X_n_cols) * s_mem[0] * std::numeric_limits::epsilon(); } uword count = 0; for(uword i=0; i < s_n_elem; ++i) { count += (s_mem[i] > tol) ? uword(1) : uword(0); } return count; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_repmat.hpp ================================================ // Copyright (C) 2009-2015 Conrad Sanderson // Copyright (C) 2009-2015 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_repmat //! @{ template arma_inline const Op repmat(const Base& A, const uword r, const uword c) { arma_extra_debug_sigprint(); return Op(A.get_ref(), r, c); } template arma_inline const SpOp repmat(const SpBase& A, const uword r, const uword c) { arma_extra_debug_sigprint(); return SpOp(A.get_ref(), r, c); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_reshape.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_reshape //! @{ template inline typename enable_if2< is_arma_type::value, const Op >::result reshape(const T1& X, const uword in_n_rows, const uword in_n_cols) { arma_extra_debug_sigprint(); return Op(X, in_n_rows, in_n_cols); } template inline const Op reshape(const Base& X, const uword in_n_rows, const uword in_n_cols, const uword dim) { arma_extra_debug_sigprint(); arma_debug_check( (dim > 1), "reshape(): parameter 'dim' must be 0 or 1" ); return Op(X.get_ref(), in_n_rows, in_n_cols, dim, 'j'); } template inline const OpCube reshape(const BaseCube& X, const uword in_n_rows, const uword in_n_cols, const uword in_n_slices, const uword dim = 0) { arma_extra_debug_sigprint(); arma_debug_check( (dim > 1), "reshape(): parameter 'dim' must be 0 or 1" ); return OpCube(X.get_ref(), in_n_rows, in_n_cols, in_n_slices, dim, 'j'); } template inline const SpOp reshape(const SpBase& X, const uword in_n_rows, const uword in_n_cols) { arma_extra_debug_sigprint(); return SpOp(X.get_ref(), in_n_rows, in_n_cols); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_resize.hpp ================================================ // Copyright (C) 2011-2015 Conrad Sanderson // Copyright (C) 2011-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_resize //! @{ template inline const Op resize(const Base& X, const uword in_n_rows, const uword in_n_cols) { arma_extra_debug_sigprint(); return Op(X.get_ref(), in_n_rows, in_n_cols); } template inline const OpCube resize(const BaseCube& X, const uword in_n_rows, const uword in_n_cols, const uword in_n_slices) { arma_extra_debug_sigprint(); return OpCube(X.get_ref(), in_n_rows, in_n_cols, in_n_slices); } template inline const SpOp resize(const SpBase& X, const uword in_n_rows, const uword in_n_cols) { arma_extra_debug_sigprint(); return SpOp(X.get_ref(), in_n_rows, in_n_cols); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_shuffle.hpp ================================================ // Copyright (C) 2009-2013 Conrad Sanderson // Copyright (C) 2009-2013 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_shuffle //! @{ //! \brief //! Shuffle the rows or the columns of a matrix or vector in random fashion. //! If dim = 0, shuffle the columns (default operation). //! If dim = 1, shuffle the rows. template arma_inline const Op shuffle ( const T1& X, const uword dim = 0, const typename enable_if< is_arma_type::value == true >::result* junk1 = 0, const typename enable_if< resolves_to_vector::value == false >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return Op(X, dim, 0); } template arma_inline const Op shuffle ( const T1& X, const uword dim, const typename enable_if::value == true>::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return Op(X, dim, 0); } template arma_inline const Op shuffle ( const T1& X, const arma_empty_class junk1 = arma_empty_class(), const typename enable_if::value == true>::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return T1::is_row ? Op(X, 1, 0) : Op(X, 0, 0); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_size.hpp ================================================ // Copyright (C) 2013-2014 Conrad Sanderson // Copyright (C) 2013-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_size //! @{ inline const SizeMat size(const uword n_rows, const uword n_cols) { arma_extra_debug_sigprint(); return SizeMat(n_rows, n_cols); } template inline typename enable_if2< is_arma_type::value, const SizeMat >::result size(const T1& X) { arma_extra_debug_sigprint(); const Proxy P(X); return SizeMat( P.get_n_rows(), P.get_n_cols() ); } template inline typename enable_if2< is_arma_type::value, const uword >::result size(const T1& X, const uword dim) { arma_extra_debug_sigprint(); arma_debug_check( (dim >= 2), "size(): dimension out of bounds" ); const Proxy P(X); return (dim == 0) ? P.get_n_rows() : P.get_n_cols(); } inline const SizeCube size(const uword n_rows, const uword n_cols, const uword n_slices) { arma_extra_debug_sigprint(); return SizeCube(n_rows, n_cols, n_slices); } template inline typename enable_if2< is_arma_cube_type::value, const SizeCube >::result size(const T1& X) { arma_extra_debug_sigprint(); const ProxyCube P(X); return SizeCube( P.get_n_rows(), P.get_n_cols(), P.get_n_slices() ); } template inline typename enable_if2< is_arma_cube_type::value, const uword >::result size(const T1& X, const uword dim) { arma_extra_debug_sigprint(); arma_debug_check( (dim >= 3), "size(): dimension out of bounds" ); const ProxyCube P(X); return (dim == 0) ? P.get_n_rows() : ( (dim == 1) ? P.get_n_cols() : P.get_n_slices() ); } template inline typename enable_if2< is_arma_sparse_type::value, const SizeMat >::result size(const T1& X) { arma_extra_debug_sigprint(); const SpProxy P(X); return SizeMat( P.get_n_rows(), P.get_n_cols() ); } template inline typename enable_if2< is_arma_sparse_type::value, const uword >::result size(const T1& X, const uword dim) { arma_extra_debug_sigprint(); arma_debug_check( (dim >= 2), "size(): dimension out of bounds" ); const SpProxy P(X); return (dim == 0) ? P.get_n_rows() : P.get_n_cols(); } template inline const SizeCube size(const field& X) { arma_extra_debug_sigprint(); return SizeCube( X.n_rows, X.n_cols, X.n_slices ); } template inline const SizeCube size(const subview_field& X) { arma_extra_debug_sigprint(); return SizeCube( X.n_rows, X.n_cols, X.n_slices ); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_solve.hpp ================================================ // Copyright (C) 2009-2013 Conrad Sanderson // Copyright (C) 2009-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_solve //! @{ //! Solve a system of linear equations, i.e., A*X = B, where X is unknown. //! For a square matrix A, this function is conceptually the same as X = inv(A)*B, //! but is done more efficiently. //! The number of rows in A and B must be the same. //! B can be either a column vector or a matrix. //! This function will also try to provide approximate solutions //! to under-determined as well as over-determined systems (non-square A matrices). template inline const Glue solve ( const Base& A, const Base& B, const bool slow = false, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return Glue(A.get_ref(), B.get_ref(), ((slow == false) ? 0 : 1) ); } template inline const Glue solve ( const Base& A, const Base& B, const char* method, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'f')), "solve(): unknown method specified" ); return Glue( A.get_ref(), B.get_ref(), ((sig == 'f') ? 0 : 1) ); } template inline const Glue solve ( const Op& A, const Base& B, const bool slow = false, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(slow); arma_ignore(junk); return Glue(A.m, B.get_ref(), A.aux_uword_a); } template inline const Glue solve ( const Op& A, const Base& B, const char* method, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'f')), "solve(): unknown method specified" ); return Glue(A.m, B.get_ref(), A.aux_uword_a); } template inline bool solve ( Mat& out, const Base& A, const Base& B, const bool slow = false, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); try { out = solve( A.get_ref(), B.get_ref(), slow ); } catch(std::runtime_error&) { return false; } return true; } template inline bool solve ( Mat& out, const Base& A, const Base& B, const char* method, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); try { out = solve( A.get_ref(), B.get_ref(), method ); } catch(std::runtime_error&) { return false; } return true; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_sort.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_sort //! @{ //! kept for compatibility with old code template arma_inline typename enable_if2 < ( (is_arma_type::value == true) && (resolves_to_vector::value == false) ), const Op >::result sort ( const T1& X, const uword sort_type = 0, const uword dim = 0 ) { arma_extra_debug_sigprint(); return Op(X, sort_type, dim); } template arma_inline typename enable_if2 < ( (is_arma_type::value == true) && (resolves_to_vector::value == false) && (is_same_type::value) ), const Op >::result sort ( const T1& X, const T2* sort_direction, const uword dim = 0 ) { arma_extra_debug_sigprint(); const char sig = (sort_direction != NULL) ? sort_direction[0] : char(0); arma_debug_check( (sig != 'a') && (sig != 'd'), "sort(): unknown sort direction"); const uword sort_type = (sig == 'a') ? 0 : 1; return Op(X, sort_type, dim); } //! kept for compatibility with old code template arma_inline typename enable_if2 < ( (is_arma_type::value == true) && (resolves_to_vector::value == true) ), const Op >::result sort ( const T1& X, const uword sort_type = 0 ) { arma_extra_debug_sigprint(); const uword dim = (T1::is_col) ? 0 : 1; return Op(X, sort_type, dim); } template arma_inline typename enable_if2 < ( (is_arma_type::value == true) && (resolves_to_vector::value == true) && (is_same_type::value) ), const Op >::result sort ( const T1& X, const T2* sort_direction ) { arma_extra_debug_sigprint(); const char sig = (sort_direction != NULL) ? sort_direction[0] : char(0); arma_debug_check( (sig != 'a') && (sig != 'd'), "sort(): unknown sort direction"); const uword sort_type = (sig == 'a') ? 0 : 1; const uword dim = (T1::is_col) ? 0 : 1; return Op(X, sort_type, dim); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_sort_index.hpp ================================================ // Copyright (C) 2009-2015 Conrad Sanderson // Copyright (C) 2009-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_sort_index //! @{ //! kept for compatibility with old code template inline const mtOp sort_index ( const Base& X, const uword sort_type = 0 ) { arma_extra_debug_sigprint(); arma_debug_check( (sort_type > 1), "sort_index(): parameter 'sort_type' must be 0 or 1" ); return mtOp(X.get_ref(), sort_type, uword(0)); } //! kept for compatibility with old code template inline const mtOp stable_sort_index ( const Base& X, const uword sort_type = 0 ) { arma_extra_debug_sigprint(); arma_debug_check( (sort_type > 1), "stable_sort_index(): parameter 'sort_type' must be 0 or 1" ); return mtOp(X.get_ref(), sort_type, uword(0)); } template inline typename enable_if2 < ( (is_arma_type::value == true) && (is_same_type::value == true) ), const mtOp >::result sort_index ( const T1& X, const T2* sort_direction ) { arma_extra_debug_sigprint(); const char sig = (sort_direction != NULL) ? sort_direction[0] : char(0); arma_debug_check( ((sig != 'a') && (sig != 'd')), "sort_index(): unknown sort direction" ); return mtOp(X, ((sig == 'a') ? uword(0) : uword(1)), uword(0)); } template inline typename enable_if2 < ( (is_arma_type::value == true) && (is_same_type::value == true) ), const mtOp >::result stable_sort_index ( const T1& X, const T2* sort_direction ) { arma_extra_debug_sigprint(); const char sig = (sort_direction != NULL) ? sort_direction[0] : char(0); arma_debug_check( ((sig != 'a') && (sig != 'd')), "stable_sort_index(): unknown sort direction" ); return mtOp(X, ((sig == 'a') ? uword(0) : uword(1)), uword(0)); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_speye.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_speye //! @{ //! Generate a sparse matrix with the values along the main diagonal set to one template inline obj_type speye(const uword n_rows, const uword n_cols, const typename arma_SpMat_SpCol_SpRow_only::result* junk = NULL) { arma_extra_debug_sigprint(); arma_ignore(junk); if(is_SpCol::value == true) { arma_debug_check( (n_cols != 1), "speye(): incompatible size" ); } else if(is_SpRow::value == true) { arma_debug_check( (n_rows != 1), "speye(): incompatible size" ); } obj_type out; out.eye(n_rows, n_cols); return out; } // Convenience shortcut method (no template parameter necessary) inline sp_mat speye(const uword n_rows, const uword n_cols) { arma_extra_debug_sigprint(); sp_mat out; out.eye(n_rows, n_cols); return out; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_spones.hpp ================================================ // Copyright (C) 2012-2013 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_spones //! @{ //! Generate a sparse matrix with the non-zero values in the same locations as in the given sparse matrix X, //! with the non-zero values set to one template inline SpMat spones(const SpBase& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; SpMat out( X.get_ref() ); arrayops::inplace_set( access::rwp(out.values), eT(1), out.n_nonzero ); return out; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_sprandn.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_sprandn //! @{ //! Generate a sparse matrix with a randomly selected subset of the elements //! set to random values from a Gaussian distribution with zero mean and unit variance template inline obj_type sprandn ( const uword n_rows, const uword n_cols, const double density, const typename arma_SpMat_SpCol_SpRow_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); if(is_SpCol::value == true) { arma_debug_check( (n_cols != 1), "sprandn(): incompatible size" ); } else if(is_SpRow::value == true) { arma_debug_check( (n_rows != 1), "sprandn(): incompatible size" ); } obj_type out; out.sprandn(n_rows, n_cols, density); return out; } inline sp_mat sprandn(const uword n_rows, const uword n_cols, const double density) { arma_extra_debug_sigprint(); sp_mat out; out.sprandn(n_rows, n_cols, density); return out; } //! Generate a sparse matrix with the non-zero values in the same locations as in the given sparse matrix X, //! with the non-zero values set to random values from a Gaussian distribution with zero mean and unit variance template inline SpMat sprandn(const SpBase& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; SpMat out( X.get_ref() ); arma_rng::randn::fill( access::rwp(out.values), out.n_nonzero ); return out; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_sprandu.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_sprandu //! @{ //! Generate a sparse matrix with a randomly selected subset of the elements //! set to random values in the [0,1] interval (uniform distribution) template inline obj_type sprandu ( const uword n_rows, const uword n_cols, const double density, const typename arma_SpMat_SpCol_SpRow_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); if(is_SpCol::value == true) { arma_debug_check( (n_cols != 1), "sprandu(): incompatible size" ); } else if(is_SpRow::value == true) { arma_debug_check( (n_rows != 1), "sprandu(): incompatible size" ); } obj_type out; out.sprandu(n_rows, n_cols, density); return out; } inline sp_mat sprandu(const uword n_rows, const uword n_cols, const double density) { arma_extra_debug_sigprint(); sp_mat out; out.sprandu(n_rows, n_cols, density); return out; } //! Generate a sparse matrix with the non-zero values in the same locations as in the given sparse matrix X, //! with the non-zero values set to random values in the [0,1] interval (uniform distribution) template inline SpMat sprandu(const SpBase& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; SpMat out( X.get_ref() ); arma_rng::randu::fill( access::rwp(out.values), out.n_nonzero ); return out; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_spsolve.hpp ================================================ // Copyright (C) 2015 Ryan Curtin // Copyright (C) 2015 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_spsolve //! @{ //! Solve a system of linear equations, i.e., A*X = B, where X is unknown, //! A is sparse, and B is dense. X will be dense too. template inline bool spsolve_helper ( Mat& out, const SpBase& A, const Base& B, const char* solver, const spsolve_opts_base& settings, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; const char sig = (solver != NULL) ? solver[0] : char(0); arma_debug_check( ((sig != 'l') && (sig != 's')), "spsolve(): unknown solver" ); bool status = false; if(sig == 's') // SuperLU solver { const superlu_opts& opts = (settings.id == 1) ? static_cast(settings) : superlu_opts(); arma_debug_check( ( (opts.pivot_thresh < double(0)) || (opts.pivot_thresh > double(1)) ), "spsolve(): pivot_thresh out of bounds" ); status = sp_auxlib::spsolve(out, A.get_ref(), B.get_ref(), opts); } else if(sig == 'l') // brutal LAPACK solver { arma_debug_warn( (settings.id != 0), "spsolve(): ignoring settings not applicable to LAPACK based solver" ); Mat AA; bool conversion_ok = true; try { Mat tmp(A.get_ref()); // conversion from sparse to dense can throw std::bad_alloc AA.steal_mem(tmp); } catch(std::bad_alloc&) { conversion_ok = false; arma_debug_warn(true, "spsolve(): not enough memory to use LAPACK based solver"); } if(conversion_ok) { arma_debug_check( (AA.n_rows != AA.n_cols), "spsolve(): matrix A must be square sized" ); status = auxlib::solve(out, AA, B.get_ref(), true); } } if(status == false) { out.reset(); } return status; } template inline bool spsolve ( Mat& out, const SpBase& A, const Base& B, const char* solver = "superlu", const spsolve_opts_base& settings = spsolve_opts_none(), const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); const bool status = spsolve_helper(out, A.get_ref(), B.get_ref(), solver, settings); if(status == false) { arma_debug_warn(true, "spsolve(): solution not found"); } return status; } template inline Mat spsolve ( const SpBase& A, const Base& B, const char* solver = "superlu", const spsolve_opts_base& settings = spsolve_opts_none(), const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; Mat out; const bool status = spsolve_helper(out, A.get_ref(), B.get_ref(), solver, settings); if(status == false) { arma_bad("spsolve(): solution not found"); } return out; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_stddev.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_stddev //! @{ template inline const mtOp stddev ( const T1& X, const uword norm_type = 0, const uword dim = 0, const typename enable_if< is_arma_type::value == true >::result* junk1 = 0, const typename enable_if< resolves_to_vector::value == false >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return mtOp(X, norm_type, dim); } template inline const mtOp stddev ( const T1& X, const uword norm_type, const uword dim, const typename enable_if::value == true>::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return mtOp(X, norm_type, dim); } template inline arma_warn_unused typename T1::pod_type stddev ( const T1& X, const uword norm_type = 0, const arma_empty_class junk1 = arma_empty_class(), const typename enable_if::value == true>::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return std::sqrt( op_var::var_vec(X, norm_type) ); } template arma_inline arma_warn_unused const typename arma_scalar_only::result stddev(const T&) { return T(0); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_strans.hpp ================================================ // Copyright (C) 2011-2012 Conrad Sanderson // Copyright (C) 2011-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_strans //! @{ template arma_inline const Op strans ( const T1& X, const typename enable_if< is_arma_type::value == true >::result* junk1 = 0, const typename arma_cx_only::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return Op(X); } // NOTE: for non-complex objects, deliberately returning op_htrans instead of op_strans, // NOTE: due to currently more optimisations available when using op_htrans, especially by glue_times template arma_inline const Op strans ( const T1& X, const typename enable_if< is_arma_type::value == true >::result* junk1 = 0, const typename arma_not_cx::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return Op(X); } //! two consecutive transpose operations cancel each other template arma_inline const T1& strans(const Op& X) { arma_extra_debug_sigprint(); arma_extra_debug_print("strans(): removing op_strans"); return X.m; } // // handling of sparse matrices template inline typename enable_if2 < is_arma_sparse_type::value, const SpOp >::result strans(const T1& x) { arma_extra_debug_sigprint(); return SpOp(x); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_sum.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_sum //! @{ //! \brief //! Delayed sum of elements of a matrix along a specified dimension (either rows or columns). //! The result is stored in a dense matrix that has either one column or one row. //! For dim = 0, find the sum of each column (traverse across rows) //! For dim = 1, find the sum of each row (traverse across columns) //! The default is dim = 0. //! NOTE: the dim argument is different than in Matlab/Octave. template arma_inline const Op sum ( const T1& X, const uword dim = 0, const typename enable_if< is_arma_type::value == true >::result* junk1 = 0, const typename enable_if< resolves_to_vector::value == false >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return Op(X, dim, 0); } template arma_inline const Op sum ( const T1& X, const uword dim, const typename enable_if< resolves_to_vector::value == true >::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return Op(X, dim, 0); } //! \brief //! Immediate 'sum all values' operation for expressions which resolve to a vector template inline arma_warn_unused typename T1::elem_type sum ( const T1& X, const arma_empty_class junk1 = arma_empty_class(), const typename enable_if< resolves_to_vector::value == true >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return accu(X); } //! \brief //! Immediate 'sum all values' operation, //! invoked, for example, by: sum(sum(A)) template inline arma_warn_unused typename T1::elem_type sum(const Op& in) { arma_extra_debug_sigprint(); arma_extra_debug_print("sum(): two consecutive sum() calls detected"); return accu(in.m); } template arma_inline const Op, op_sum> sum(const Op& in, const uword dim) { arma_extra_debug_sigprint(); return Op, op_sum>(in, dim, 0); } template arma_inline arma_warn_unused const typename arma_scalar_only::result & sum(const T& x) { return x; } //! sum of sparse object template inline typename enable_if2 < (is_arma_sparse_type::value == true) && (resolves_to_sparse_vector::value == true), typename T1::elem_type >::result sum(const T1& x) { arma_extra_debug_sigprint(); // sum elements return accu(x); } template inline typename enable_if2 < (is_arma_sparse_type::value == true) && (resolves_to_sparse_vector::value == false), const SpOp >::result sum(const T1& x, const uword dim = 0) { arma_extra_debug_sigprint(); return SpOp(x, dim, 0); } template inline arma_warn_unused typename T1::elem_type sum(const SpOp& in) { arma_extra_debug_sigprint(); arma_extra_debug_print("sum(): two consecutive sum() calls detected"); return accu(in.m); } template arma_inline const SpOp, spop_sum> sum(const SpOp& in, const uword dim) { arma_extra_debug_sigprint(); return SpOp, spop_sum>(in, dim, 0); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_svd.hpp ================================================ // Copyright (C) 2009-2013 Conrad Sanderson // Copyright (C) 2009-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_svd //! @{ template inline bool svd ( Col& S, const Base& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); // it doesn't matter if X is an alias of S, as auxlib::svd() makes a copy of X const bool status = auxlib::svd_dc(S, X); if(status == false) { S.reset(); arma_bad("svd(): failed to converge", false); } return status; } template inline Col svd ( const Base& X, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); Col out; const bool status = auxlib::svd_dc(out, X); if(status == false) { out.reset(); arma_bad("svd(): failed to converge"); } return out; } template inline bool svd ( Mat& U, Col& S, Mat& V, const Base& X, const char* method = "dc", const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); arma_debug_check ( ( ((void*)(&U) == (void*)(&S)) || (&U == &V) || ((void*)(&S) == (void*)(&V)) ), "svd(): two or more output objects are the same object" ); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'd')), "svd(): unknown method specified" ); // auxlib::svd() makes an internal copy of X const bool status = (sig == 'd') ? auxlib::svd_dc(U, S, V, X) : auxlib::svd(U, S, V, X); if(status == false) { U.reset(); S.reset(); V.reset(); arma_bad("svd(): failed to converge", false); } return status; } template inline bool svd_econ ( Mat& U, Col& S, Mat& V, const Base& X, const char mode, const char* method = "dc", const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); arma_debug_check ( ( ((void*)(&U) == (void*)(&S)) || (&U == &V) || ((void*)(&S) == (void*)(&V)) ), "svd_econ(): two or more output objects are the same object" ); arma_debug_check ( ( (mode != 'l') && (mode != 'r') && (mode != 'b') ), "svd_econ(): parameter 'mode' or 'side' is incorrect" ); const char sig = (method != NULL) ? method[0] : char(0); arma_debug_check( ((sig != 's') && (sig != 'd')), "svd_econ(): unknown method specified" ); const bool status = ((mode == 'b') && (sig == 'd')) ? auxlib::svd_dc_econ(U, S, V, X) : auxlib::svd_econ(U, S, V, X, mode); if(status == false) { U.reset(); S.reset(); V.reset(); arma_bad("svd_econ(): failed to converge", false); } return status; } template inline bool svd_econ ( Mat& U, Col& S, Mat& V, const Base& X, const char* side = "both", const char* method = "dc", const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return svd_econ(U, S, V, X, ((side != NULL) ? side[0] : char(0)), method); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_svds.hpp ================================================ // Copyright (C) 2015 Conrad Sanderson // Copyright (C) 2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_svds //! @{ template inline bool svds_helper ( Mat& U, Col& S, Mat& V, const SpBase& X, const uword k, const typename T1::pod_type tol, const bool calc_UV, const typename arma_real_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typedef typename T1::pod_type T; if(arma_config::arpack == false) { arma_stop("svds(): use of ARPACK needs to be enabled"); return false; } arma_debug_check ( ( ((void*)(&U) == (void*)(&S)) || (&U == &V) || ((void*)(&S) == (void*)(&V)) ), "svds(): two or more output objects are the same object" ); arma_debug_check( (tol < T(0)), "svds(): tol must be >= 0" ); const unwrap_spmat tmp(X.get_ref()); const SpMat& A = tmp.M; const uword kk = (std::min)( (std::min)(A.n_rows, A.n_cols), k ); const T A_max = (A.n_nonzero > 0) ? T(max(abs(Col(const_cast(A.values), A.n_nonzero, false)))) : T(0); if(A_max == T(0)) { // TODO: use reset instead ? S.zeros(kk); if(calc_UV) { U.eye(A.n_rows, kk); V.eye(A.n_cols, kk); } } else { SpMat C( (A.n_rows + A.n_cols), (A.n_rows + A.n_cols) ); SpMat B = A / A_max; SpMat Bt = B.t(); C(0, A.n_rows, size(B) ) = B; C(A.n_rows, 0, size(Bt)) = Bt; Bt.reset(); B.reset(); Col eigval; Mat eigvec; const bool status = sp_auxlib::eigs_sym(eigval, eigvec, C, kk, "la", (tol / Datum::sqrt2)); if(status == false) { U.reset(); S.reset(); V.reset(); return false; } const T A_norm = max(eigval); const T tol2 = tol / Datum::sqrt2 * A_norm; uvec indices = find(eigval > tol2); if(indices.n_elem > kk) { indices = indices.subvec(0,kk-1); } else if(indices.n_elem < kk) { const uvec indices2 = find(abs(eigval) <= tol2); const uword N_extra = (std::min)( indices2.n_elem, (kk - indices.n_elem) ); if(N_extra > 0) { indices = join_cols(indices, indices2.subvec(0,N_extra-1)); } } const uvec sorted_indices = sort_index(eigval, "descend"); S = eigval.elem(sorted_indices); S *= A_max; if(calc_UV) { uvec U_row_indices(A.n_rows); for(uword i=0; i < A.n_rows; ++i) { U_row_indices[i] = i; } uvec V_row_indices(A.n_cols); for(uword i=0; i < A.n_cols; ++i) { V_row_indices[i] = i + A.n_rows; } U = Datum::sqrt2 * eigvec(U_row_indices, sorted_indices); V = Datum::sqrt2 * eigvec(V_row_indices, sorted_indices); } } arma_debug_warn( (S.n_elem < k), "svds(): warning: found fewer singular values than specified" ); return true; } template inline bool svds_helper ( Mat& U, Col& S, Mat& V, const SpBase& X, const uword k, const typename T1::pod_type tol, const bool calc_UV, const typename arma_cx_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typedef typename T1::pod_type T; if(arma_config::arpack == false) { arma_stop("svds(): use of ARPACK needs to be enabled"); return false; } arma_debug_check ( ( ((void*)(&U) == (void*)(&S)) || (&U == &V) || ((void*)(&S) == (void*)(&V)) ), "svds(): two or more output objects are the same object" ); arma_debug_check( (tol < T(0)), "svds(): tol must be >= 0" ); const unwrap_spmat tmp(X.get_ref()); const SpMat& A = tmp.M; const uword kk = (std::min)( (std::min)(A.n_rows, A.n_cols), k ); const T A_max = (A.n_nonzero > 0) ? T(max(abs(Col(const_cast(A.values), A.n_nonzero, false)))) : T(0); if(A_max == T(0)) { // TODO: use reset instead ? S.zeros(kk); if(calc_UV) { U.eye(A.n_rows, kk); V.eye(A.n_cols, kk); } } else { SpMat C( (A.n_rows + A.n_cols), (A.n_rows + A.n_cols) ); SpMat B = A / A_max; SpMat Bt = B.t(); C(0, A.n_rows, size(B) ) = B; C(A.n_rows, 0, size(Bt)) = Bt; Bt.reset(); B.reset(); Col eigval_tmp; Mat eigvec; const bool status = sp_auxlib::eigs_gen(eigval_tmp, eigvec, C, kk, "lr", (tol / Datum::sqrt2)); if(status == false) { U.reset(); S.reset(); V.reset(); arma_bad("svds(): failed to converge", false); return false; } const Col eigval = real(eigval_tmp); const T A_norm = max(eigval); const T tol2 = tol / Datum::sqrt2 * A_norm; uvec indices = find(eigval > tol2); if(indices.n_elem > kk) { indices = indices.subvec(0,kk-1); } else if(indices.n_elem < kk) { const uvec indices2 = find(abs(eigval) <= tol2); const uword N_extra = (std::min)( indices2.n_elem, (kk - indices.n_elem) ); if(N_extra > 0) { indices = join_cols(indices, indices2.subvec(0,N_extra-1)); } } const uvec sorted_indices = sort_index(eigval, "descend"); S = eigval.elem(sorted_indices); S *= A_max; if(calc_UV) { uvec U_row_indices(A.n_rows); for(uword i=0; i < A.n_rows; ++i) { U_row_indices[i] = i; } uvec V_row_indices(A.n_cols); for(uword i=0; i < A.n_cols; ++i) { V_row_indices[i] = i + A.n_rows; } U = Datum::sqrt2 * eigvec(U_row_indices, sorted_indices); V = Datum::sqrt2 * eigvec(V_row_indices, sorted_indices); } } arma_debug_warn( (S.n_elem < k), "svds(): warning: found fewer singular values than specified" ); return true; } //! find the k largest singular values and corresponding singular vectors of sparse matrix X template inline bool svds ( Mat& U, Col& S, Mat& V, const SpBase& X, const uword k, const typename T1::pod_type tol = 0.0, const typename arma_real_or_cx_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); const bool status = svds_helper(U, S, V, X.get_ref(), k, tol, true); if(status == false) { arma_bad("svds(): failed to converge", false); } return status; } //! find the k largest singular values of sparse matrix X template inline bool svds ( Col& S, const SpBase& X, const uword k, const typename T1::pod_type tol = 0.0, const typename arma_real_or_cx_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); Mat U; Mat V; const bool status = svds_helper(U, S, V, X.get_ref(), k, tol, false); if(status == false) { arma_bad("svds(): failed to converge", false); } return status; } //! find the k largest singular values of sparse matrix X template inline Col svds ( const SpBase& X, const uword k, const typename T1::pod_type tol = 0.0, const typename arma_real_or_cx_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); Col S; Mat U; Mat V; const bool status = svds_helper(U, S, V, X.get_ref(), k, tol, false); if(status == false) { arma_bad("svds(): failed to converge", true); } return S; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_syl_lyap.hpp ================================================ // Copyright (C) 2011-2012 Conrad Sanderson // Copyright (C) 2011-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_syl_lyap //! @{ //! find the solution of the Sylvester equation AX + XB = C template inline bool syl ( Mat & out, const Base& in_A, const Base& in_B, const Base& in_C, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; const unwrap_check tmp_A(in_A.get_ref(), out); const unwrap_check tmp_B(in_B.get_ref(), out); const unwrap_check tmp_C(in_C.get_ref(), out); const Mat& A = tmp_A.M; const Mat& B = tmp_B.M; const Mat& C = tmp_C.M; const bool status = auxlib::syl(out, A, B, C); if(status == false) { out.reset(); arma_bad("syl(): equation appears to be singular", false); } return status; } template inline Mat syl ( const Base& in_A, const Base& in_B, const Base& in_C, const typename arma_blas_type_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; const unwrap tmp_A( in_A.get_ref() ); const unwrap tmp_B( in_B.get_ref() ); const unwrap tmp_C( in_C.get_ref() ); const Mat& A = tmp_A.M; const Mat& B = tmp_B.M; const Mat& C = tmp_C.M; Mat out; const bool status = auxlib::syl(out, A, B, C); if(status == false) { out.reset(); arma_bad("syl(): equation appears to be singular"); } return out; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_symmat.hpp ================================================ // Copyright (C) 2011-2014 Conrad Sanderson // Copyright (C) 2011-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_symmat //! @{ template arma_inline typename enable_if2< is_cx::no, const Op >::result symmatu(const Base& X, const bool do_conj = false) { arma_extra_debug_sigprint(); arma_ignore(do_conj); return Op(X.get_ref(), 0, 0); } template arma_inline typename enable_if2< is_cx::no, const Op >::result symmatl(const Base& X, const bool do_conj = false) { arma_extra_debug_sigprint(); arma_ignore(do_conj); return Op(X.get_ref(), 1, 0); } template arma_inline typename enable_if2< is_cx::yes, const Op >::result symmatu(const Base& X, const bool do_conj = true) { arma_extra_debug_sigprint(); return Op(X.get_ref(), 0, (do_conj ? 1 : 0)); } template arma_inline typename enable_if2< is_cx::yes, const Op >::result symmatl(const Base& X, const bool do_conj = true) { arma_extra_debug_sigprint(); return Op(X.get_ref(), 1, (do_conj ? 1 : 0)); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_toeplitz.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_toeplitz //! @{ template inline Op toeplitz(const Base& X) { arma_extra_debug_sigprint(); return Op( X.get_ref() ); } template inline Op circ_toeplitz(const Base& X) { arma_extra_debug_sigprint(); return Op( X.get_ref() ); } template inline Glue toeplitz(const Base& X, const Base& Y) { arma_extra_debug_sigprint(); return Glue( X.get_ref(), Y.get_ref() ); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_trace.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_trace //! @{ //! Immediate trace (sum of diagonal elements) of a square dense matrix template arma_hot arma_warn_unused inline typename enable_if2::value, typename T1::elem_type>::result trace(const T1& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy A(X); arma_debug_check( (A.get_n_rows() != A.get_n_cols()), "trace(): matrix must be square sized" ); const uword N = A.get_n_rows(); eT val1 = eT(0); eT val2 = eT(0); uword i,j; for(i=0, j=1; j arma_hot arma_warn_unused inline typename T1::elem_type trace(const Op& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const diagmat_proxy A(X.m); const uword N = A.n_elem; eT val = eT(0); for(uword i=0; i arma_hot inline typename T1::elem_type trace_mul_unwrap(const T1& XA, const T2& XB) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy PA(XA); const unwrap tmpB(XB); const Mat& B = tmpB.M; arma_debug_assert_mul_size(PA.get_n_rows(), PA.get_n_cols(), B.n_rows, B.n_cols, "matrix multiplication"); arma_debug_check( (PA.get_n_rows() != B.n_cols), "trace(): matrix must be square sized" ); const uword N1 = PA.get_n_rows(); // equivalent to B.n_cols, due to square size requirements const uword N2 = PA.get_n_cols(); // equivalent to B.n_rows, due to matrix multiplication requirements eT val = eT(0); for(uword i=0; i arma_hot inline typename T1::elem_type trace_mul_proxy(const T1& XA, const T2& XB) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy PA(XA); const Proxy PB(XB); if(is_Mat::stored_type>::value == true) { return trace_mul_unwrap(PA.Q, PB.Q); } arma_debug_assert_mul_size(PA.get_n_rows(), PA.get_n_cols(), PB.get_n_rows(), PB.get_n_cols(), "matrix multiplication"); arma_debug_check( (PA.get_n_rows() != PB.get_n_cols()), "trace(): matrix must be square sized" ); const uword N1 = PA.get_n_rows(); // equivalent to PB.get_n_cols(), due to square size requirements const uword N2 = PA.get_n_cols(); // equivalent to PB.get_n_rows(), due to matrix multiplication requirements eT val = eT(0); for(uword i=0; i arma_hot arma_warn_unused inline typename T1::elem_type trace(const Glue& X) { arma_extra_debug_sigprint(); return (is_Mat::value) ? trace_mul_unwrap(X.A, X.B) : trace_mul_proxy(X.A, X.B); } //! trace of sparse object template arma_hot arma_warn_unused inline typename enable_if2::value, typename T1::elem_type>::result trace(const T1& x) { arma_extra_debug_sigprint(); const SpProxy p(x); arma_debug_check( (p.get_n_rows() != p.get_n_cols()), "trace(): matrix must be square sized" ); typedef typename T1::elem_type eT; eT result = eT(0); typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); while(it != it_end) { if(it.row() == it.col()) { result += (*it); } ++it; } return result; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_trans.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_trans //! @{ template arma_inline const Op trans ( const T1& X, const typename enable_if< is_arma_type::value == true >::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return Op(X); } template arma_inline const Op htrans ( const T1& X, const typename enable_if< is_arma_type::value == true >::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return Op(X); } //! two consecutive transpose operations cancel each other template arma_inline const T1& trans(const Op& X) { arma_extra_debug_sigprint(); arma_extra_debug_print("trans(): removing op_htrans"); return X.m; } template arma_inline const T1& htrans(const Op& X) { arma_extra_debug_sigprint(); arma_extra_debug_print("htrans(): removing op_htrans"); return X.m; } // // handling of sparse matrices template inline typename enable_if2 < is_arma_sparse_type::value, const SpOp >::result trans ( const T1& x, const typename arma_not_cx::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return SpOp(x); } template inline typename enable_if2 < is_arma_sparse_type::value, const SpOp >::result trans ( const T1& x, const typename arma_cx_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return SpOp(x); } template inline typename enable_if2 < is_arma_sparse_type::value, const SpOp >::result htrans ( const T1& x, const typename arma_not_cx::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return SpOp(x); } template inline typename enable_if2 < is_arma_sparse_type::value, const SpOp >::result htrans ( const T1& x, const typename arma_cx_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return SpOp(x); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_trig.hpp ================================================ // Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_trig //! @{ // // trigonometric functions: // cos family: cos, acos, cosh, acosh // sin family: sin, asin, sinh, asinh // tan family: tan, atan, tanh, atanh // // cos template arma_inline const eOp cos(const Base& A) { arma_extra_debug_sigprint(); return eOp(A.get_ref()); } template arma_inline const eOpCube cos(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // acos template arma_inline const eOp acos(const Base& A) { arma_extra_debug_sigprint(); return eOp(A.get_ref()); } template arma_inline const eOpCube acos(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // cosh template arma_inline const eOp cosh(const Base& A) { arma_extra_debug_sigprint(); return eOp(A.get_ref()); } template arma_inline const eOpCube cosh(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // acosh template arma_inline const eOp acosh(const Base& A) { arma_extra_debug_sigprint(); return eOp(A.get_ref()); } template arma_inline const eOpCube acosh(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // sin template arma_inline const eOp sin(const Base& A) { arma_extra_debug_sigprint(); return eOp(A.get_ref()); } template arma_inline const eOpCube sin(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // asin template arma_inline const eOp asin(const Base& A) { arma_extra_debug_sigprint(); return eOp(A.get_ref()); } template arma_inline const eOpCube asin(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // sinh template arma_inline const eOp sinh(const Base& A) { arma_extra_debug_sigprint(); return eOp(A.get_ref()); } template arma_inline const eOpCube sinh(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // asinh template arma_inline const eOp asinh(const Base& A) { arma_extra_debug_sigprint(); return eOp(A.get_ref()); } template arma_inline const eOpCube asinh(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // tan template arma_inline const eOp tan(const Base& A) { arma_extra_debug_sigprint(); return eOp(A.get_ref()); } template arma_inline const eOpCube tan(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // atan template arma_inline const eOp atan(const Base& A) { arma_extra_debug_sigprint(); return eOp(A.get_ref()); } template arma_inline const eOpCube atan(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // tanh template arma_inline const eOp tanh(const Base& A) { arma_extra_debug_sigprint(); return eOp(A.get_ref()); } template arma_inline const eOpCube tanh(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } // // atanh template arma_inline const eOp atanh(const Base& A) { arma_extra_debug_sigprint(); return eOp(A.get_ref()); } template arma_inline const eOpCube atanh(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_trimat.hpp ================================================ // Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_trimat //! @{ template arma_inline const Op trimatu(const Base& X) { arma_extra_debug_sigprint(); return Op(X.get_ref(), 0, 0); } template arma_inline const Op trimatl(const Base& X) { arma_extra_debug_sigprint(); return Op(X.get_ref(), 1, 0); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_trunc_exp.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_trunc_exp //! @{ template inline static typename arma_real_only::result trunc_exp(const eT x) { if(std::numeric_limits::is_iec559 && (x >= Math::log_max() )) { return std::numeric_limits::max(); } else { return std::exp(x); } } template inline static typename arma_integral_only::result trunc_exp(const eT x) { return eT( trunc_exp( double(x) ) ); } template inline static std::complex trunc_exp(const std::complex& x) { return std::polar( trunc_exp( x.real() ), x.imag() ); } template arma_inline const eOp trunc_exp(const Base& A) { arma_extra_debug_sigprint(); return eOp(A.get_ref()); } template arma_inline const eOpCube trunc_exp(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_trunc_log.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_trunc_log //! @{ template inline static typename arma_real_only::result trunc_log(const eT x) { if(std::numeric_limits::is_iec559) { if(x == std::numeric_limits::infinity()) { return Math::log_max(); } else { return (x <= eT(0)) ? Math::log_min() : std::log(x); } } else { return std::log(x); } } template inline static typename arma_integral_only::result trunc_log(const eT x) { return eT( trunc_log( double(x) ) ); } template inline static std::complex trunc_log(const std::complex& x) { return std::complex( trunc_log( std::abs(x) ), std::arg(x) ); } template arma_inline const eOp trunc_log(const Base& A) { arma_extra_debug_sigprint(); return eOp(A.get_ref()); } template arma_inline const eOpCube trunc_log(const BaseCube& A) { arma_extra_debug_sigprint(); return eOpCube(A.get_ref()); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_unique.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 Arnold Wiliem // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. template inline const Op unique ( const Base& A, const typename arma_not_cx::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return Op( A.get_ref() ); } ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_var.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_var //! @{ template inline const mtOp var ( const T1& X, const uword norm_type = 0, const uword dim = 0, const typename enable_if< is_arma_type::value == true >::result* junk1 = 0, const typename enable_if< resolves_to_vector::value == false >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return mtOp(X, norm_type, dim); } template inline const mtOp var ( const T1& X, const uword norm_type, const uword dim, const typename enable_if::value == true>::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); return mtOp(X, norm_type, dim); } template inline arma_warn_unused typename T1::pod_type var ( const T1& X, const uword norm_type = 0, const arma_empty_class junk1 = arma_empty_class(), const typename enable_if::value == true>::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return op_var::var_vec( X, norm_type ); } template arma_inline arma_warn_unused const typename arma_scalar_only::result var(const T&) { return T(0); } template inline const mtSpOp var ( const T1& X, const uword norm_type = 0, const uword dim = 0, const typename enable_if< is_arma_sparse_type::value == true >::result* junk1 = 0, const typename enable_if< resolves_to_sparse_vector::value == false >::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return mtSpOp(X, norm_type, dim); } template inline const mtSpOp var ( const T1& X, const uword norm_type, const uword dim = 0, const typename enable_if::value == true>::result* junk1 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); return mtSpOp(X, norm_type, dim); } template inline typename T1::pod_type var ( const T1& X, const uword norm_type = 0, const arma_empty_class junk1 = arma_empty_class(), const typename enable_if::value == true>::result* junk2 = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); return spop_var::var_vec(X, norm_type); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_vectorise.hpp ================================================ // Copyright (C) 2013-2014 Conrad Sanderson // Copyright (C) 2013-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_vectorise //! @{ template inline typename enable_if2 < is_arma_type::value, const Op >::result vectorise(const T1& X) { arma_extra_debug_sigprint(); return Op(X); } template inline typename enable_if2 < is_arma_type::value, const Op >::result vectorise(const T1& X, const uword dim) { arma_extra_debug_sigprint(); arma_debug_check( (dim > 1), "vectorise(): parameter 'dim' must be 0 or 1" ); return Op(X, dim, 0); } template inline Col vectorise(const BaseCube& X) { arma_extra_debug_sigprint(); Col out; op_vectorise_cube_col::apply(out, X); return out; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/fn_zeros.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup fn_zeros //! @{ //! Generate a vector with all elements set to zero arma_inline const Gen zeros(const uword n_elem) { arma_extra_debug_sigprint(); return Gen(n_elem, 1); } template arma_inline const Gen zeros(const uword n_elem, const arma_empty_class junk1 = arma_empty_class(), const typename arma_Mat_Col_Row_only::result* junk2 = 0) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); if(is_Row::value == true) { return Gen(1, n_elem); } else { return Gen(n_elem, 1); } } //! Generate a dense matrix with all elements set to zero arma_inline const Gen zeros(const uword n_rows, const uword n_cols) { arma_extra_debug_sigprint(); return Gen(n_rows, n_cols); } template arma_inline const Gen zeros(const uword n_rows, const uword n_cols, const typename arma_Mat_Col_Row_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); if(is_Col::value == true) { arma_debug_check( (n_cols != 1), "zeros(): incompatible size" ); } else if(is_Row::value == true) { arma_debug_check( (n_rows != 1), "zeros(): incompatible size" ); } return Gen(n_rows, n_cols); } arma_inline const GenCube zeros(const uword n_rows, const uword n_cols, const uword n_slices) { arma_extra_debug_sigprint(); return GenCube(n_rows, n_cols, n_slices); } template arma_inline const GenCube zeros(const uword n_rows, const uword n_cols, const uword n_slices, const typename arma_Cube_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); return GenCube(n_rows, n_cols, n_slices); } template inline sp_obj_type zeros(const uword n_rows, const uword n_cols, const typename arma_SpMat_SpCol_SpRow_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); if(is_SpCol::value == true) { arma_debug_check( (n_cols != 1), "zeros(): incompatible size" ); } else if(is_SpRow::value == true) { arma_debug_check( (n_rows != 1), "zeros(): incompatible size" ); } return sp_obj_type(n_rows, n_cols); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/forward_bones.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. using std::cout; using std::cerr; using std::endl; using std::ios; using std::size_t; template struct Base; template struct BaseCube; template class Mat; template class Col; template class Row; template class Cube; template class xvec_htrans; template class field; template class xtrans_mat; template class subview; template class subview_col; template class subview_row; template class subview_row_strans; template class subview_row_htrans; template class subview_cube; template class subview_field; template class SpValProxy; template class SpMat; template class SpCol; template class SpRow; template class SpSubview; template class diagview; template class spdiagview; template class subview_elem1; template class subview_elem2; template class subview_each1; template class subview_each2; class SizeMat; class SizeCube; class arma_empty_class {}; class diskio; class op_min; class op_max; class op_strans; class op_htrans; class op_htrans2; class op_inv; class op_sum; class op_abs; class op_diagmat; class op_trimat; class op_diagvec; class op_vectorise_col; class op_normalise_colvec; class op_normalise_rowvec; class op_clamp; class op_cumsum_vec; class op_shuffle; class op_sort; class op_find; class op_find_simple; class op_flipud; class op_fliplr; class op_real; class op_imag; class op_nonzeros; class op_sort_index; class op_stable_sort_index; class eop_conj; class glue_times; class glue_times_diag; class glue_rel_lt; class glue_rel_gt; class glue_rel_lteq; class glue_rel_gteq; class glue_rel_eq; class glue_rel_noteq; class glue_rel_and; class glue_rel_or; class op_rel_lt_pre; class op_rel_lt_post; class op_rel_gt_pre; class op_rel_gt_post; class op_rel_lteq_pre; class op_rel_lteq_post; class op_rel_gteq_pre; class op_rel_gteq_post; class op_rel_eq; class op_rel_noteq; class gen_ones_diag; class gen_ones_full; class gen_zeros; class gen_randu; class gen_randn; class glue_mixed_plus; class glue_mixed_minus; class glue_mixed_div; class glue_mixed_schur; class glue_mixed_times; class op_cx_scalar_times; class op_cx_scalar_plus; class op_cx_scalar_minus_pre; class op_cx_scalar_minus_post; class op_cx_scalar_div_pre; class op_cx_scalar_div_post; class op_subview_elem_equ; class op_subview_elem_inplace_plus; class op_subview_elem_inplace_minus; class op_subview_elem_inplace_schur; class op_subview_elem_inplace_div; template class gemm; template class gemv; template< typename eT, typename gen_type> class Gen; template< typename T1, typename op_type> class Op; template< typename T1, typename eop_type> class eOp; template class mtOp; template< typename T1, typename T2, typename glue_type> class Glue; template< typename T1, typename T2, typename eglue_type> class eGlue; template class mtGlue; template< typename eT, typename gen_type> class GenCube; template< typename T1, typename op_type> class OpCube; template< typename T1, typename eop_type> class eOpCube; template class mtOpCube; template< typename T1, typename T2, typename glue_type> class GlueCube; template< typename T1, typename T2, typename eglue_type> class eGlueCube; template class mtGlueCube; template class Proxy; template class ProxyCube; class spop_strans; class spop_htrans; class spop_scalar_times; class spglue_plus; class spglue_plus2; class spglue_minus; class spglue_minus2; class spglue_times; class spglue_times2; template< typename T1, typename spop_type> class SpOp; template class mtSpOp; template class SpGlue; template class SpProxy; struct arma_vec_indicator {}; struct arma_fixed_indicator {}; //! \addtogroup injector //! @{ template struct injector_end_of_row {}; static const injector_end_of_row<> endr = injector_end_of_row<>(); //!< endr indicates "end of row" when using the << operator; //!< similar conceptual meaning to std::endl //! @} //! \addtogroup diskio //! @{ enum file_type { file_type_unknown, auto_detect, //!< Automatically detect the file type raw_ascii, //!< ASCII format (text), without any other information. arma_ascii, //!< Armadillo ASCII format (text), with information about matrix type and size csv_ascii, //!< comma separated values (CSV), without any other information raw_binary, //!< raw binary format, without any other information. arma_binary, //!< Armadillo binary format, with information about matrix type and size pgm_binary, //!< Portable Grey Map (greyscale image) ppm_binary, //!< Portable Pixel Map (colour image), used by the field and cube classes hdf5_binary, //!< Open binary format, not specific to Armadillo, which can store arbitrary data coord_ascii //!< simple co-ordinate format for sparse matrices }; //! @} //! \addtogroup fill //! @{ namespace fill { struct fill_none {}; struct fill_zeros {}; struct fill_ones {}; struct fill_eye {}; struct fill_randu {}; struct fill_randn {}; template struct fill_class { inline fill_class() {} }; static const fill_class none; static const fill_class zeros; static const fill_class ones; static const fill_class eye; static const fill_class randu; static const fill_class randn; } //! @} //! \addtogroup fn_spsolve //! @{ struct spsolve_opts_base { const unsigned int id; inline spsolve_opts_base(const unsigned int in_id) : id(in_id) {} }; struct spsolve_opts_none : public spsolve_opts_base { inline spsolve_opts_none() : spsolve_opts_base(0) {} }; struct superlu_opts : public spsolve_opts_base { typedef enum {NATURAL, MMD_ATA, MMD_AT_PLUS_A, COLAMD} permutation_type; typedef enum {REF_NONE, REF_SINGLE, REF_DOUBLE, REF_EXTRA} refine_type; bool equilibrate; bool symmetric; double pivot_thresh; permutation_type permutation; refine_type refine; inline superlu_opts() : spsolve_opts_base(1) { equilibrate = true; symmetric = false; pivot_thresh = 1.0; permutation = COLAMD; refine = REF_NONE; } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_conv_bones.hpp ================================================ // Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_conv //! @{ class glue_conv { public: template inline static void apply(Mat& out, const Glue& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_conv_meat.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_conv //! @{ //! rudimentary implementation of the convolution operation template inline void glue_conv::apply(Mat& out, const Glue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_check A_tmp(X.A, out); const unwrap_check B_tmp(X.B, out); const Mat& A = A_tmp.M; const Mat& B = B_tmp.M; arma_debug_check ( ( ((A.is_vec() == false) && (A.is_empty() == false)) || ((B.is_vec() == false) && (B.is_empty() == false)) ), "conv(): given object is not a vector" ); const Mat& h = (A.n_elem <= B.n_elem) ? A : B; const Mat& x = (A.n_elem <= B.n_elem) ? B : A; const uword h_n_elem = h.n_elem; const uword x_n_elem = x.n_elem; const uword out_n_elem = h_n_elem + x_n_elem - 1; if( (h_n_elem == 0) || (x_n_elem == 0) ) { out.reset(); return; } (A.n_cols == 1) ? out.set_size(out_n_elem, 1) : out.set_size(1, out_n_elem); const eT* h_mem = h.memptr(); const eT* x_mem = x.memptr(); eT* out_mem = out.memptr(); for(uword out_i = 0; out_i < (h_n_elem-1); ++out_i) { eT acc = eT(0); uword h_i = out_i; for(uword x_i = 0; x_i <= out_i; ++x_i, --h_i) { acc += h_mem[h_i] * x_mem[x_i]; } out_mem[out_i] = acc; } for(uword out_i = h_n_elem-1; out_i < out_n_elem - (h_n_elem-1); ++out_i) { eT acc = eT(0); uword h_i = h_n_elem - 1; for(uword x_i = out_i - h_n_elem + 1; x_i <= out_i; ++x_i, --h_i) { acc += h_mem[h_i] * x_mem[x_i]; } out_mem[out_i] = acc; } for(uword out_i = out_n_elem - (h_n_elem-1); out_i < out_n_elem; ++out_i) { eT acc = eT(0); uword h_i = h_n_elem - 1; for(uword x_i = out_i - h_n_elem + 1; x_i < x_n_elem; ++x_i, --h_i) { acc += h_mem[h_i] * x_mem[x_i]; } out_mem[out_i] = acc; } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_cor_bones.hpp ================================================ // Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_cor //! @{ class glue_cor { public: template inline static void direct_cor(Mat& out, const Mat& A, const Mat& B, const uword norm_type); template inline static void direct_cor(Mat< std::complex >& out, const Mat< std::complex >& A, const Mat< std::complex >& B, const uword norm_type); template inline static void apply(Mat& out, const Glue& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_cor_meat.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_cor //! @{ template inline void glue_cor::direct_cor(Mat& out, const Mat& A, const Mat& B, const uword norm_type) { arma_extra_debug_sigprint(); if(A.is_empty() || B.is_empty() ) { out.reset(); return; } if(A.is_vec() && B.is_vec()) { arma_debug_check( (A.n_elem != B.n_elem), "cor(): the number of elements in the two vectors must match" ); const eT* A_ptr = A.memptr(); const eT* B_ptr = B.memptr(); eT A_acc = eT(0); eT B_acc = eT(0); eT out_acc = eT(0); const uword N = A.n_elem; for(uword i=0; i 1) ? eT(N-1) : eT(1) ) : eT(N); out.set_size(1,1); out[0] = out_acc/norm_val; const Mat stddev_A = (A.n_rows == 1) ? Mat(stddev(trans(A))) : Mat(stddev(A)); const Mat stddev_B = (B.n_rows == 1) ? Mat(stddev(trans(B))) : Mat(stddev(B)); out /= stddev_A * stddev_B; } else { arma_debug_assert_mul_size(A, B, true, false, "cor()"); const uword N = A.n_rows; const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N); out = trans(A) * B; out -= (trans(sum(A)) * sum(B))/eT(N); out /= norm_val; out /= trans(stddev(A)) * stddev(B); } } template inline void glue_cor::direct_cor(Mat< std::complex >& out, const Mat< std::complex >& A, const Mat< std::complex >& B, const uword norm_type) { arma_extra_debug_sigprint(); typedef typename std::complex eT; if(A.is_empty() || B.is_empty() ) { out.reset(); return; } if(A.is_vec() && B.is_vec()) { arma_debug_check( (A.n_elem != B.n_elem), "cor(): the number of elements in the two vectors must match" ); const eT* A_ptr = A.memptr(); const eT* B_ptr = B.memptr(); eT A_acc = eT(0); eT B_acc = eT(0); eT out_acc = eT(0); const uword N = A.n_elem; for(uword i=0; i 1) ? eT(N-1) : eT(1) ) : eT(N); out.set_size(1,1); out[0] = out_acc/norm_val; const Mat stddev_A = (A.n_rows == 1) ? Mat(stddev(trans(A))) : Mat(stddev(A)); const Mat stddev_B = (B.n_rows == 1) ? Mat(stddev(trans(B))) : Mat(stddev(B)); out /= conv_to< Mat >::from( stddev_A * stddev_B ); } else { arma_debug_assert_mul_size(A, B, true, false, "cor()"); const uword N = A.n_rows; const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N); out = trans(A) * B; // out = strans(conj(A)) * B; out -= (trans(sum(A)) * sum(B))/eT(N); // out -= (strans(conj(sum(A))) * sum(B))/eT(N); out /= norm_val; out /= conv_to< Mat >::from( trans(stddev(A)) * stddev(B) ); } } template inline void glue_cor::apply(Mat& out, const Glue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_check A_tmp(X.A, out); const unwrap_check B_tmp(X.B, out); const Mat& A = A_tmp.M; const Mat& B = B_tmp.M; const uword norm_type = X.aux_uword; if(&A != &B) { glue_cor::direct_cor(out, A, B, norm_type); } else { op_cor::direct_cor(out, A, norm_type); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_cov_bones.hpp ================================================ // Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_cov //! @{ class glue_cov { public: template inline static void direct_cov(Mat& out, const Mat& A, const Mat& B, const uword norm_type); template inline static void direct_cov(Mat< std::complex >& out, const Mat< std::complex >& A, const Mat< std::complex >& B, const uword norm_type); template inline static void apply(Mat& out, const Glue& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_cov_meat.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_cov //! @{ template inline void glue_cov::direct_cov(Mat& out, const Mat& A, const Mat& B, const uword norm_type) { arma_extra_debug_sigprint(); if(A.is_vec() && B.is_vec()) { arma_debug_check( (A.n_elem != B.n_elem), "cov(): the number of elements in A and B must match" ); const eT* A_ptr = A.memptr(); const eT* B_ptr = B.memptr(); eT A_acc = eT(0); eT B_acc = eT(0); eT out_acc = eT(0); const uword N = A.n_elem; for(uword i=0; i 1) ? eT(N-1) : eT(1) ) : eT(N); out.set_size(1,1); out[0] = out_acc/norm_val; } else { arma_debug_assert_mul_size(A, B, true, false, "cov()"); const uword N = A.n_rows; const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N); out = trans(A) * B; out -= (trans(sum(A)) * sum(B))/eT(N); out /= norm_val; } } template inline void glue_cov::direct_cov(Mat< std::complex >& out, const Mat< std::complex >& A, const Mat< std::complex >& B, const uword norm_type) { arma_extra_debug_sigprint(); typedef typename std::complex eT; if(A.is_vec() && B.is_vec()) { arma_debug_check( (A.n_elem != B.n_elem), "cov(): the number of elements in A and B must match" ); const eT* A_ptr = A.memptr(); const eT* B_ptr = B.memptr(); eT A_acc = eT(0); eT B_acc = eT(0); eT out_acc = eT(0); const uword N = A.n_elem; for(uword i=0; i 1) ? eT(N-1) : eT(1) ) : eT(N); out.set_size(1,1); out[0] = out_acc/norm_val; } else { arma_debug_assert_mul_size(A, B, true, false, "cov()"); const uword N = A.n_rows; const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N); out = trans(A) * B; // out = strans(conj(A)) * B; out -= (trans(sum(A)) * sum(B))/eT(N); // out -= (strans(conj(sum(A))) * sum(B))/eT(N); out /= norm_val; } } template inline void glue_cov::apply(Mat& out, const Glue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_check A_tmp(X.A, out); const unwrap_check B_tmp(X.B, out); const Mat& A = A_tmp.M; const Mat& B = B_tmp.M; const uword norm_type = X.aux_uword; if(&A != &B) { glue_cov::direct_cov(out, A, B, norm_type); } else { op_cov::direct_cov(out, A, norm_type); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_cross_bones.hpp ================================================ // Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_cross //! @{ class glue_cross { public: template inline static void apply(Mat& out, const Glue& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_cross_meat.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_cross //! @{ template inline void glue_cross::apply(Mat& out, const Glue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy PA(X.A); const Proxy PB(X.B); arma_debug_check( ((PA.get_n_elem() != 3) || (PB.get_n_elem() != 3)), "cross(): input vectors must have 3 elements" ); const uword PA_n_rows = Proxy::is_row ? 1 : PA.get_n_rows(); const uword PA_n_cols = Proxy::is_col ? 1 : PA.get_n_cols(); out.set_size(PA_n_rows, PA_n_cols); eT* out_mem = out.memptr(); if( (Proxy::prefer_at_accessor == false) && (Proxy::prefer_at_accessor == false) ) { typename Proxy::ea_type A = PA.get_ea(); typename Proxy::ea_type B = PB.get_ea(); const eT ax = A[0]; const eT ay = A[1]; const eT az = A[2]; const eT bx = B[0]; const eT by = B[1]; const eT bz = B[2]; out_mem[0] = ay*bz - az*by; out_mem[1] = az*bx - ax*bz; out_mem[2] = ax*by - ay*bx; } else { const bool PA_is_col = Proxy::is_col ? true : (PA_n_cols == 1); const bool PB_is_col = Proxy::is_col ? true : (PB.get_n_cols() == 1); const eT ax = PA.at(0,0); const eT ay = PA_is_col ? PA.at(1,0) : PA.at(0,1); const eT az = PA_is_col ? PA.at(2,0) : PA.at(0,2); const eT bx = PB.at(0,0); const eT by = PB_is_col ? PB.at(1,0) : PB.at(0,1); const eT bz = PB_is_col ? PB.at(2,0) : PB.at(0,2); out_mem[0] = ay*bz - az*by; out_mem[1] = az*bx - ax*bz; out_mem[2] = ax*by - ay*bx; } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_hist_bones.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. class glue_hist { public: template inline static void apply(Mat& out, const mtGlue& in); }; ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_hist_meat.hpp ================================================ // Copyright (C) 2012-2015 Conrad Sanderson // Copyright (C) 2012-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. template inline void glue_hist::apply(Mat& out, const mtGlue& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword dim = in.aux_uword; const unwrap_check_mixed tmp1(in.A, out); const unwrap_check_mixed tmp2(in.B, out); const Mat& X = tmp1.M; const Mat& C = tmp2.M; arma_debug_check ( ((C.is_vec() == false) && (C.is_empty() == false)), "hist(): parameter 'centers' must be a vector" ); arma_debug_check ( (dim > 1), "hist(): parameter 'dim' must be 0 or 1" ); const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; const uword X_n_elem = X.n_elem; const uword C_n_elem = C.n_elem; if( C_n_elem == 0 ) { out.reset(); return; } // for vectors we are currently ignoring the "dim" parameter uword out_n_rows = 0; uword out_n_cols = 0; if( (X.vec_state == 0) && (X.n_elem == 1u) ) { if(out.vec_state == 1u) { out_n_rows = C_n_elem; out_n_cols = 1; } else { out_n_rows = 1; out_n_cols = C_n_elem; } } else if( (X.vec_state > 0) || X.is_vec() ) { if(X.vec_state == 2u) { out_n_rows = 1; out_n_cols = C_n_elem; } else if(X.vec_state == 1u) { out_n_rows = C_n_elem; out_n_cols = 1; } else if(X.is_rowvec()) { out_n_rows = 1; out_n_cols = C_n_elem; } else if(X.is_colvec()) { out_n_rows = C_n_elem; out_n_cols = 1; } } else { if(dim == 0) { out_n_rows = C_n_elem; out_n_cols = X_n_cols; } else if(dim == 1) { out_n_rows = X_n_rows; out_n_cols = C_n_elem; } } out.zeros(out_n_rows, out_n_cols); const eT* C_mem = C.memptr(); const eT center_0 = C_mem[0]; if( (X.vec_state > 0) || X.is_vec() ) { const eT* X_mem = X.memptr(); uword* out_mem = out.memptr(); for(uword i=0; i < X_n_elem; ++i) { const eT val = X_mem[i]; if(is_finite(val)) { eT opt_dist = (val >= center_0) ? (val - center_0) : (center_0 - val); uword opt_index = 0; for(uword j=1; j < C_n_elem; ++j) { const eT center = C_mem[j]; const eT dist = (val >= center) ? (val - center) : (center - val); if(dist < opt_dist) { opt_dist = dist; opt_index = j; } else { break; } } out_mem[opt_index]++; } else { // -inf if(val < eT(0)) { out_mem[0]++; } // +inf if(val > eT(0)) { out_mem[C_n_elem-1]++; } // ignore NaN } } } else { if(dim == 0) { for(uword col=0; col < X_n_cols; ++col) { const eT* X_coldata = X.colptr(col); uword* out_coldata = out.colptr(col); for(uword row=0; row < X_n_rows; ++row) { const eT val = X_coldata[row]; if(arma_isfinite(val)) { eT opt_dist = (center_0 >= val) ? (center_0 - val) : (val - center_0); uword opt_index = 0; for(uword j=1; j < C_n_elem; ++j) { const eT center = C_mem[j]; const eT dist = (center >= val) ? (center - val) : (val - center); if(dist < opt_dist) { opt_dist = dist; opt_index = j; } else { break; } } out_coldata[opt_index]++; } else { // -inf if(val < eT(0)) { out_coldata[0]++; } // +inf if(val > eT(0)) { out_coldata[C_n_elem-1]++; } // ignore NaN } } } } else if(dim == 1) { for(uword row=0; row < X_n_rows; ++row) { for(uword col=0; col < X_n_cols; ++col) { const eT val = X.at(row,col); if(arma_isfinite(val)) { eT opt_dist = (center_0 >= val) ? (center_0 - val) : (val - center_0); uword opt_index = 0; for(uword j=1; j < C_n_elem; ++j) { const eT center = C_mem[j]; const eT dist = (center >= val) ? (center - val) : (val - center); if(dist < opt_dist) { opt_dist = dist; opt_index = j; } else { break; } } out.at(row,opt_index)++; } else { // -inf if(val < eT(0)) { out.at(row,0)++; } // +inf if(val > eT(0)) { out.at(row,C_n_elem-1)++; } // ignore NaN } } } } } } ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_histc_bones.hpp ================================================ // Copyright (C) 2015 Conrad Sanderson // Copyright (C) 2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. struct glue_histc { template inline static void apply(Mat& C, const mtGlue& expr); }; ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_histc_meat.hpp ================================================ // Copyright (C) 2015 Conrad Sanderson // Copyright (C) 2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. template inline void glue_histc::apply(Mat& C, const mtGlue& expr) { arma_extra_debug_sigprint(); const uword dim = expr.aux_uword; arma_debug_check( (dim > 1), "histc(): parameter 'dim' must be 0 or 1" ); const unwrap_check_mixed tmpA(expr.A, C); const unwrap_check_mixed tmpB(expr.B, C); typedef typename T1::elem_type eT; const Mat& A = tmpA.M; const Mat& B = tmpB.M; arma_debug_check( ((B.is_vec() == false) && (B.is_empty() == false)), "histc(): parameter 'edges' is not a vector" ); const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword A_n_elem = A.n_elem; const uword B_n_elem = B.n_elem; if( B_n_elem == uword(0) ) { C.reset(); return; } // NOTE: the "dim" parameter is currently ignored for vectors uword C_n_rows = uword(0); uword C_n_cols = uword(0); if( (A.n_elem == uword(1)) && (A.vec_state == uword(0)) ) { if(C.vec_state == uword(1)) { C_n_rows = B_n_elem; C_n_cols = uword(1); } else { C_n_rows = uword(1); C_n_cols = B_n_elem; } } else if( A.is_vec() || (A.vec_state > 0) ) { if(A.vec_state == uword(2)) { C_n_rows = uword(1); C_n_cols = B_n_elem; } else if(A.vec_state == uword(1)) { C_n_rows = B_n_elem; C_n_cols = uword(1); } else if(A.is_rowvec()) { C_n_rows = uword(1); C_n_cols = B_n_elem; } else if(A.is_colvec()) { C_n_rows = B_n_elem; C_n_cols = uword(1); } } else { if(dim == uword(0)) { C_n_rows = B_n_elem; C_n_cols = A_n_cols; } else if(dim == uword(1)) { C_n_rows = A_n_rows; C_n_cols = B_n_elem; } } C.zeros(C_n_rows, C_n_cols); const eT* B_mem = B.memptr(); const uword B_n_elem_m1 = B_n_elem - 1; if( A.is_vec() || (A.vec_state > 0) ) { const eT* A_mem = A.memptr(); uword* C_mem = C.memptr(); for(uword j=0; j < A_n_elem; ++j) { const eT x = A_mem[j]; for(uword i=0; i < B_n_elem_m1; ++i) { if( (B_mem[i] <= x) && (x < B_mem[i+1]) ) { C_mem[i]++; break; } else if( B_mem[B_n_elem_m1] == x ) { C_mem[B_n_elem_m1]++; break; } // for compatibility with Matlab } } } else if(dim == uword(1)) { for(uword row=0; row < A_n_rows; ++row) { for(uword col=0; col < A_n_cols; ++col) { const eT x = A.at(row,col); for(uword i=0; i < B_n_elem_m1; ++i) { if( (B_mem[i] <= x) && (x < B_mem[i+1]) ) { C.at(row,i)++; break; } else if( B_mem[B_n_elem_m1] == x ) { C.at(row,B_n_elem_m1)++; break; } // for compatibility with Matlab } } } } else if(dim == uword(0)) { for(uword col=0; col < A_n_cols; ++col) { const eT* A_coldata = A.colptr(col); uword* C_coldata = C.colptr(col); for(uword row=0; row < A_n_rows; ++row) { const eT x = A_coldata[row]; for(uword i=0; i < B_n_elem_m1; ++i) { if( (B_mem[i] <= x) && (x < B_mem[i+1]) ) { C_coldata[i]++; break; } else if( B_mem[B_n_elem_m1] == x ) { C_coldata[B_n_elem_m1]++; break; } // for compatibility with Matlab } } } } } ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_join_bones.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_join //! @{ class glue_join { public: template inline static void apply(Mat& out, const Glue& X); template inline static void apply_noalias(Mat& out, const Mat& A, const Mat& B, const uword join_type); template inline static void apply(Cube& out, const GlueCube& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_join_meat.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_join //! @{ template inline void glue_join::apply(Mat& out, const Glue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword join_type = X.aux_uword; const unwrap A_tmp(X.A); const unwrap B_tmp(X.B); const Mat& A = A_tmp.M; const Mat& B = B_tmp.M; if( (&out != &A) && (&out != &B) ) { glue_join::apply_noalias(out, A, B, join_type); } else { Mat tmp; glue_join::apply_noalias(tmp, A, B, join_type); out.steal_mem(tmp); } } template inline void glue_join::apply_noalias(Mat& out, const Mat& A, const Mat& B, const uword join_type) { arma_extra_debug_sigprint(); const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; if(join_type == 0) { arma_debug_check ( ( (A_n_cols != B_n_cols) && ( (A_n_rows > 0) || (A_n_cols > 0) ) && ( (B_n_rows > 0) || (B_n_cols > 0) ) ), "join_cols() / join_vert(): number of columns must be the same" ); } else { arma_debug_check ( ( (A_n_rows != B.n_rows) && ( (A_n_rows > 0) || (A_n_cols > 0) ) && ( (B_n_rows > 0) || (B_n_cols > 0) ) ), "join_rows() / join_horiz(): number of rows must be the same" ); } if(join_type == 0) // join columns (i.e. result matrix has more rows) { out.set_size( A_n_rows + B_n_rows, (std::max)(A_n_cols, B_n_cols) ); if( out.n_elem > 0 ) { if(A.is_empty() == false) { out.submat(0, 0, A_n_rows-1, out.n_cols-1) = A; } if(B.is_empty() == false) { out.submat(A_n_rows, 0, out.n_rows-1, out.n_cols-1) = B; } } } else // join rows (i.e. result matrix has more columns) { out.set_size( (std::max)(A_n_rows, B_n_rows), A_n_cols + B_n_cols ); if( out.n_elem > 0 ) { if(A.is_empty() == false) { out.submat(0, 0, out.n_rows-1, A.n_cols-1) = A; } if(B.is_empty() == false) { out.submat(0, A_n_cols, out.n_rows-1, out.n_cols-1) = B; } } } } template inline void glue_join::apply(Cube& out, const GlueCube& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_cube A_tmp(X.A); const unwrap_cube B_tmp(X.B); const Cube& A = A_tmp.M; const Cube& B = B_tmp.M; if(A.n_elem == 0) { out = B; return; } if(B.n_elem == 0) { out = A; return; } arma_debug_check( ( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) ), "join_slices(): size of slices must be the same" ); if( (&out != &A) && (&out != &B) ) { out.set_size(A.n_rows, A.n_cols, A.n_slices + B.n_slices); out.slices(0, A.n_slices-1 ) = A; out.slices(A.n_slices, out.n_slices-1) = B; } else // we have aliasing { Cube C(A.n_rows, A.n_cols, A.n_slices + B.n_slices); C.slices(0, A.n_slices-1) = A; C.slices(A.n_slices, C.n_slices-1) = B; out.steal_mem(C); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_kron_bones.hpp ================================================ // Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_kron //! @{ class glue_kron { public: template inline static void direct_kron(Mat& out, const Mat& A, const Mat& B); template inline static void direct_kron(Mat< std::complex >& out, const Mat< std::complex >& A, const Mat& B); template inline static void direct_kron(Mat< std::complex >& out, const Mat& A, const Mat< std::complex >& B); template inline static void apply(Mat& out, const Glue& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_kron_meat.hpp ================================================ // Copyright (C) 2009-2013 Conrad Sanderson // Copyright (C) 2009-2013 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_kron //! @{ //! \brief //! both input matrices have the same element type template inline void glue_kron::direct_kron(Mat& out, const Mat& A, const Mat& B) { arma_extra_debug_sigprint(); const uword A_rows = A.n_rows; const uword A_cols = A.n_cols; const uword B_rows = B.n_rows; const uword B_cols = B.n_cols; out.set_size(A_rows*B_rows, A_cols*B_cols); for(uword j = 0; j < A_cols; j++) { for(uword i = 0; i < A_rows; i++) { out.submat(i*B_rows, j*B_cols, (i+1)*B_rows-1, (j+1)*B_cols-1) = A.at(i,j) * B; } } } //! \brief //! different types of input matrices //! A -> complex, B -> basic element type template inline void glue_kron::direct_kron(Mat< std::complex >& out, const Mat< std::complex >& A, const Mat& B) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const uword A_rows = A.n_rows; const uword A_cols = A.n_cols; const uword B_rows = B.n_rows; const uword B_cols = B.n_cols; out.set_size(A_rows*B_rows, A_cols*B_cols); Mat tmp_B = conv_to< Mat >::from(B); for(uword j = 0; j < A_cols; j++) { for(uword i = 0; i < A_rows; i++) { out.submat(i*B_rows, j*B_cols, (i+1)*B_rows-1, (j+1)*B_cols-1) = A.at(i,j) * tmp_B; } } } //! \brief //! different types of input matrices //! A -> basic element type, B -> complex template inline void glue_kron::direct_kron(Mat< std::complex >& out, const Mat& A, const Mat< std::complex >& B) { arma_extra_debug_sigprint(); const uword A_rows = A.n_rows; const uword A_cols = A.n_cols; const uword B_rows = B.n_rows; const uword B_cols = B.n_cols; out.set_size(A_rows*B_rows, A_cols*B_cols); for(uword j = 0; j < A_cols; j++) { for(uword i = 0; i < A_rows; i++) { out.submat(i*B_rows, j*B_cols, (i+1)*B_rows-1, (j+1)*B_cols-1) = A.at(i,j) * B; } } } //! \brief //! apply Kronecker product for two objects with same element type template inline void glue_kron::apply(Mat& out, const Glue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap A_tmp(X.A); const unwrap B_tmp(X.B); const Mat& A = A_tmp.M; const Mat& B = B_tmp.M; if( (&out != &A) && (&out != &B) ) { glue_kron::direct_kron(out, A, B); } else { Mat tmp; glue_kron::direct_kron(tmp, A, B); out.steal_mem(tmp); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_max_bones.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_max //! @{ class glue_max { public: template inline static void apply(Mat< eT >& out, const Proxy& PA, const Proxy& PB); template inline static void apply(Mat< std::complex >& out, const Proxy& PA, const Proxy& PB); template inline static void apply(Mat& out, const Glue& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_max_meat.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_max //! @{ template inline void glue_max::apply(Mat& out, const Proxy& PA, const Proxy& PB) { arma_extra_debug_sigprint(); const uword n_rows = PA.get_n_rows(); const uword n_cols = PA.get_n_cols(); arma_debug_assert_same_size(n_rows, n_cols, PB.get_n_rows(), PB.get_n_cols(), "max(): given objects do not have the same size"); out.set_size(n_rows, n_cols); eT* out_mem = out.memptr(); if( (Proxy::prefer_at_accessor == false) && (Proxy::prefer_at_accessor == false) ) { typename Proxy::ea_type A = PA.get_ea(); typename Proxy::ea_type B = PB.get_ea(); const uword N = PA.get_n_elem(); for(uword i=0; i inline void glue_max::apply(Mat< std::complex >& out, const Proxy& PA, const Proxy& PB) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const uword n_rows = PA.get_n_rows(); const uword n_cols = PA.get_n_cols(); arma_debug_assert_same_size(n_rows, n_cols, PB.get_n_rows(), PB.get_n_cols(), "max(): given objects do not have the same size"); out.set_size(n_rows, n_cols); eT* out_mem = out.memptr(); if( (Proxy::prefer_at_accessor == false) && (Proxy::prefer_at_accessor == false) ) { typename Proxy::ea_type A = PA.get_ea(); typename Proxy::ea_type B = PB.get_ea(); const uword N = PA.get_n_elem(); for(uword i=0; i std::abs(B_val) ) ? A_val : B_val; } } else { for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { const eT A_val = PA.at(row,col); const eT B_val = PB.at(row,col); *out_mem = ( std::abs(A_val) > std::abs(B_val) ) ? A_val : B_val; ++out_mem; } } } template inline void glue_max::apply(Mat& out, const Glue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy PA(X.A); const Proxy PB(X.B); if(PA.is_alias(out) || PB.is_alias(out)) { Mat tmp; glue_max::apply(tmp, PA, PB); out.steal_mem(tmp); } else { glue_max::apply(out, PA, PB); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_min_bones.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_min //! @{ class glue_min { public: template inline static void apply(Mat< eT >& out, const Proxy& PA, const Proxy& PB); template inline static void apply(Mat< std::complex >& out, const Proxy& PA, const Proxy& PB); template inline static void apply(Mat& out, const Glue& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_min_meat.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_min //! @{ template inline void glue_min::apply(Mat& out, const Proxy& PA, const Proxy& PB) { arma_extra_debug_sigprint(); const uword n_rows = PA.get_n_rows(); const uword n_cols = PA.get_n_cols(); arma_debug_assert_same_size(n_rows, n_cols, PB.get_n_rows(), PB.get_n_cols(), "min(): given objects do not have the same size"); out.set_size(n_rows, n_cols); eT* out_mem = out.memptr(); if( (Proxy::prefer_at_accessor == false) && (Proxy::prefer_at_accessor == false) ) { typename Proxy::ea_type A = PA.get_ea(); typename Proxy::ea_type B = PB.get_ea(); const uword N = PA.get_n_elem(); for(uword i=0; i inline void glue_min::apply(Mat< std::complex >& out, const Proxy& PA, const Proxy& PB) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const uword n_rows = PA.get_n_rows(); const uword n_cols = PA.get_n_cols(); arma_debug_assert_same_size(n_rows, n_cols, PB.get_n_rows(), PB.get_n_cols(), "min(): given objects do not have the same size"); out.set_size(n_rows, n_cols); eT* out_mem = out.memptr(); if( (Proxy::prefer_at_accessor == false) && (Proxy::prefer_at_accessor == false) ) { typename Proxy::ea_type A = PA.get_ea(); typename Proxy::ea_type B = PB.get_ea(); const uword N = PA.get_n_elem(); for(uword i=0; i inline void glue_min::apply(Mat& out, const Glue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy PA(X.A); const Proxy PB(X.B); if(PA.is_alias(out) || PB.is_alias(out)) { Mat tmp; glue_min::apply(tmp, PA, PB); out.steal_mem(tmp); } else { glue_min::apply(out, PA, PB); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_mixed_bones.hpp ================================================ // Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_mixed //! @{ class glue_mixed_times { public: template inline static void apply(Mat::eT>& out, const mtGlue::eT, T1, T2, glue_mixed_times>& X); }; class glue_mixed_plus { public: template inline static void apply(Mat::eT>& out, const mtGlue::eT, T1, T2, glue_mixed_plus>& X); template inline static void apply(Cube::eT>& out, const mtGlueCube::eT, T1, T2, glue_mixed_plus>& X); }; class glue_mixed_minus { public: template inline static void apply(Mat::eT>& out, const mtGlue::eT, T1, T2, glue_mixed_minus>& X); template inline static void apply(Cube::eT>& out, const mtGlueCube::eT, T1, T2, glue_mixed_minus>& X); }; class glue_mixed_div { public: template inline static void apply(Mat::eT>& out, const mtGlue::eT, T1, T2, glue_mixed_div>& X); template inline static void apply(Cube::eT>& out, const mtGlueCube::eT, T1, T2, glue_mixed_div>& X); }; class glue_mixed_schur { public: template inline static void apply(Mat::eT>& out, const mtGlue::eT, T1, T2, glue_mixed_schur>& X); template inline static void apply(Cube::eT>& out, const mtGlueCube::eT, T1, T2, glue_mixed_schur>& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_mixed_meat.hpp ================================================ // Copyright (C) 2009-2015 Conrad Sanderson // Copyright (C) 2009-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_mixed //! @{ //! matrix multiplication with different element types template inline void glue_mixed_times::apply(Mat::eT>& out, const mtGlue::eT, T1, T2, glue_mixed_times>& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; const unwrap_check_mixed tmp1(X.A, out); const unwrap_check_mixed tmp2(X.B, out); const Mat& A = tmp1.M; const Mat& B = tmp2.M; arma_debug_assert_mul_size(A, B, "matrix multiplication"); out.set_size(A.n_rows, B.n_cols); gemm_mixed<>::apply(out, A, B); } //! matrix addition with different element types template inline void glue_mixed_plus::apply(Mat::eT>& out, const mtGlue::eT, T1, T2, glue_mixed_plus>& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); const Proxy A(X.A); const Proxy B(X.B); arma_debug_assert_same_size(A, B, "addition"); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); out.set_size(n_rows, n_cols); out_eT* out_mem = out.memptr(); const uword n_elem = out.n_elem; const bool prefer_at_accessor = (Proxy::prefer_at_accessor || Proxy::prefer_at_accessor); if(prefer_at_accessor == false) { typename Proxy::ea_type AA = A.get_ea(); typename Proxy::ea_type BB = B.get_ea(); if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); for(uword i=0; i::apply(AA[i]) + upgrade_val::apply(BB[i]); } } else { for(uword i=0; i::apply(AA[i]) + upgrade_val::apply(BB[i]); } } } else { for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { (*out_mem) = upgrade_val::apply(A.at(row,col)) + upgrade_val::apply(B.at(row,col)); out_mem++; } } } //! matrix subtraction with different element types template inline void glue_mixed_minus::apply(Mat::eT>& out, const mtGlue::eT, T1, T2, glue_mixed_minus>& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); const Proxy A(X.A); const Proxy B(X.B); arma_debug_assert_same_size(A, B, "subtraction"); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); out.set_size(n_rows, n_cols); out_eT* out_mem = out.memptr(); const uword n_elem = out.n_elem; const bool prefer_at_accessor = (Proxy::prefer_at_accessor || Proxy::prefer_at_accessor); if(prefer_at_accessor == false) { typename Proxy::ea_type AA = A.get_ea(); typename Proxy::ea_type BB = B.get_ea(); if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); for(uword i=0; i::apply(AA[i]) - upgrade_val::apply(BB[i]); } } else { for(uword i=0; i::apply(AA[i]) - upgrade_val::apply(BB[i]); } } } else { for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { (*out_mem) = upgrade_val::apply(A.at(row,col)) - upgrade_val::apply(B.at(row,col)); out_mem++; } } } //! element-wise matrix division with different element types template inline void glue_mixed_div::apply(Mat::eT>& out, const mtGlue::eT, T1, T2, glue_mixed_div>& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); const Proxy A(X.A); const Proxy B(X.B); arma_debug_assert_same_size(A, B, "element-wise division"); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); out.set_size(n_rows, n_cols); out_eT* out_mem = out.memptr(); const uword n_elem = out.n_elem; const bool prefer_at_accessor = (Proxy::prefer_at_accessor || Proxy::prefer_at_accessor); if(prefer_at_accessor == false) { typename Proxy::ea_type AA = A.get_ea(); typename Proxy::ea_type BB = B.get_ea(); if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); for(uword i=0; i::apply(AA[i]) / upgrade_val::apply(BB[i]); } } else { for(uword i=0; i::apply(AA[i]) / upgrade_val::apply(BB[i]); } } } else { for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { (*out_mem) = upgrade_val::apply(A.at(row,col)) / upgrade_val::apply(B.at(row,col)); out_mem++; } } } //! element-wise matrix multiplication with different element types template inline void glue_mixed_schur::apply(Mat::eT>& out, const mtGlue::eT, T1, T2, glue_mixed_schur>& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); const Proxy A(X.A); const Proxy B(X.B); arma_debug_assert_same_size(A, B, "element-wise multiplication"); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); out.set_size(n_rows, n_cols); out_eT* out_mem = out.memptr(); const uword n_elem = out.n_elem; const bool prefer_at_accessor = (Proxy::prefer_at_accessor || Proxy::prefer_at_accessor); if(prefer_at_accessor == false) { typename Proxy::ea_type AA = A.get_ea(); typename Proxy::ea_type BB = B.get_ea(); if(memory::is_aligned(out_mem)) { memory::mark_as_aligned(out_mem); for(uword i=0; i::apply(AA[i]) * upgrade_val::apply(BB[i]); } } else { for(uword i=0; i::apply(AA[i]) * upgrade_val::apply(BB[i]); } } } else { for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { (*out_mem) = upgrade_val::apply(A.at(row,col)) * upgrade_val::apply(B.at(row,col)); out_mem++; } } } // // // //! cube addition with different element types template inline void glue_mixed_plus::apply(Cube::eT>& out, const mtGlueCube::eT, T1, T2, glue_mixed_plus>& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); const ProxyCube A(X.A); const ProxyCube B(X.B); arma_debug_assert_same_size(A, B, "addition"); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); const uword n_slices = A.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); out_eT* out_mem = out.memptr(); const uword n_elem = out.n_elem; const bool prefer_at_accessor = (ProxyCube::prefer_at_accessor || ProxyCube::prefer_at_accessor); if(prefer_at_accessor == false) { typename ProxyCube::ea_type AA = A.get_ea(); typename ProxyCube::ea_type BB = B.get_ea(); for(uword i=0; i::apply(AA[i]) + upgrade_val::apply(BB[i]); } } else { for(uword slice = 0; slice < n_slices; ++slice) for(uword col = 0; col < n_cols; ++col ) for(uword row = 0; row < n_rows; ++row ) { (*out_mem) = upgrade_val::apply(A.at(row,col,slice)) + upgrade_val::apply(B.at(row,col,slice)); out_mem++; } } } //! cube subtraction with different element types template inline void glue_mixed_minus::apply(Cube::eT>& out, const mtGlueCube::eT, T1, T2, glue_mixed_minus>& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); const ProxyCube A(X.A); const ProxyCube B(X.B); arma_debug_assert_same_size(A, B, "subtraction"); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); const uword n_slices = A.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); out_eT* out_mem = out.memptr(); const uword n_elem = out.n_elem; const bool prefer_at_accessor = (ProxyCube::prefer_at_accessor || ProxyCube::prefer_at_accessor); if(prefer_at_accessor == false) { typename ProxyCube::ea_type AA = A.get_ea(); typename ProxyCube::ea_type BB = B.get_ea(); for(uword i=0; i::apply(AA[i]) - upgrade_val::apply(BB[i]); } } else { for(uword slice = 0; slice < n_slices; ++slice) for(uword col = 0; col < n_cols; ++col ) for(uword row = 0; row < n_rows; ++row ) { (*out_mem) = upgrade_val::apply(A.at(row,col,slice)) - upgrade_val::apply(B.at(row,col,slice)); out_mem++; } } } //! element-wise cube division with different element types template inline void glue_mixed_div::apply(Cube::eT>& out, const mtGlueCube::eT, T1, T2, glue_mixed_div>& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); const ProxyCube A(X.A); const ProxyCube B(X.B); arma_debug_assert_same_size(A, B, "element-wise division"); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); const uword n_slices = A.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); out_eT* out_mem = out.memptr(); const uword n_elem = out.n_elem; const bool prefer_at_accessor = (ProxyCube::prefer_at_accessor || ProxyCube::prefer_at_accessor); if(prefer_at_accessor == false) { typename ProxyCube::ea_type AA = A.get_ea(); typename ProxyCube::ea_type BB = B.get_ea(); for(uword i=0; i::apply(AA[i]) / upgrade_val::apply(BB[i]); } } else { for(uword slice = 0; slice < n_slices; ++slice) for(uword col = 0; col < n_cols; ++col ) for(uword row = 0; row < n_rows; ++row ) { (*out_mem) = upgrade_val::apply(A.at(row,col,slice)) / upgrade_val::apply(B.at(row,col,slice)); out_mem++; } } } //! element-wise cube multiplication with different element types template inline void glue_mixed_schur::apply(Cube::eT>& out, const mtGlueCube::eT, T1, T2, glue_mixed_schur>& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); const ProxyCube A(X.A); const ProxyCube B(X.B); arma_debug_assert_same_size(A, B, "element-wise multiplication"); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); const uword n_slices = A.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); out_eT* out_mem = out.memptr(); const uword n_elem = out.n_elem; const bool prefer_at_accessor = (ProxyCube::prefer_at_accessor || ProxyCube::prefer_at_accessor); if(prefer_at_accessor == false) { typename ProxyCube::ea_type AA = A.get_ea(); typename ProxyCube::ea_type BB = B.get_ea(); for(uword i=0; i::apply(AA[i]) * upgrade_val::apply(BB[i]); } } else { for(uword slice = 0; slice < n_slices; ++slice) for(uword col = 0; col < n_cols; ++col ) for(uword row = 0; row < n_rows; ++row ) { (*out_mem) = upgrade_val::apply(A.at(row,col,slice)) * upgrade_val::apply(B.at(row,col,slice)); out_mem++; } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_relational_bones.hpp ================================================ // Copyright (C) 2009-2014 Conrad Sanderson // Copyright (C) 2009-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_relational //! @{ class glue_rel_lt { public: template inline static void apply(Mat & out, const mtGlue& X); template inline static void apply(Cube & out, const mtGlueCube& X); }; class glue_rel_gt { public: template inline static void apply(Mat & out, const mtGlue& X); template inline static void apply(Cube & out, const mtGlueCube& X); }; class glue_rel_lteq { public: template inline static void apply(Mat & out, const mtGlue& X); template inline static void apply(Cube & out, const mtGlueCube& X); }; class glue_rel_gteq { public: template inline static void apply(Mat & out, const mtGlue& X); template inline static void apply(Cube & out, const mtGlueCube& X); }; class glue_rel_eq { public: template inline static void apply(Mat & out, const mtGlue& X); template inline static void apply(Cube & out, const mtGlueCube& X); }; class glue_rel_noteq { public: template inline static void apply(Mat & out, const mtGlue& X); template inline static void apply(Cube & out, const mtGlueCube& X); }; class glue_rel_and { public: template inline static void apply(Mat & out, const mtGlue& X); template inline static void apply(Cube & out, const mtGlueCube& X); }; class glue_rel_or { public: template inline static void apply(Mat & out, const mtGlue& X); template inline static void apply(Cube & out, const mtGlueCube& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_relational_meat.hpp ================================================ // Copyright (C) 2009-2014 Conrad Sanderson // Copyright (C) 2009-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_relational //! @{ #undef operator_rel #undef operator_str #undef arma_applier_mat #undef arma_applier_cube #define arma_applier_mat(operator_rel, operator_str) \ {\ const Proxy P1(X.A);\ const Proxy P2(X.B);\ \ arma_debug_assert_same_size(P1, P2, operator_str);\ \ const bool bad_alias = (Proxy::has_subview && P1.is_alias(out)) || (Proxy::has_subview && P2.is_alias(out));\ \ if(bad_alias == false)\ {\ \ const uword n_rows = P1.get_n_rows();\ const uword n_cols = P1.get_n_cols();\ \ out.set_size(n_rows, n_cols);\ \ uword* out_mem = out.memptr();\ \ const bool prefer_at_accessor = (Proxy::prefer_at_accessor || Proxy::prefer_at_accessor);\ \ if(prefer_at_accessor == false)\ {\ typename Proxy::ea_type A = P1.get_ea();\ typename Proxy::ea_type B = P2.get_ea();\ \ const uword n_elem = out.n_elem;\ \ for(uword i=0; i::stored_type> tmp1(P1.Q, P1.is_alias(out));\ const unwrap_check::stored_type> tmp2(P2.Q, P2.is_alias(out));\ \ out = (tmp1.M) operator_rel (tmp2.M);\ }\ } #define arma_applier_cube(operator_rel, operator_str) \ {\ const ProxyCube P1(X.A);\ const ProxyCube P2(X.B);\ \ arma_debug_assert_same_size(P1, P2, operator_str);\ \ const bool bad_alias = (ProxyCube::has_subview && P1.is_alias(out)) || (ProxyCube::has_subview && P2.is_alias(out));\ \ if(bad_alias == false)\ {\ \ const uword n_rows = P1.get_n_rows();\ const uword n_cols = P1.get_n_cols();\ const uword n_slices = P1.get_n_slices();\ \ out.set_size(n_rows, n_cols, n_slices);\ \ uword* out_mem = out.memptr();\ \ const bool prefer_at_accessor = (ProxyCube::prefer_at_accessor || ProxyCube::prefer_at_accessor);\ \ if(prefer_at_accessor == false)\ {\ typename ProxyCube::ea_type A = P1.get_ea();\ typename ProxyCube::ea_type B = P2.get_ea();\ \ const uword n_elem = out.n_elem;\ \ for(uword i=0; i::stored_type> tmp1(P1.Q);\ const unwrap_cube::stored_type> tmp2(P2.Q);\ \ out = (tmp1.M) operator_rel (tmp2.M);\ }\ } template inline void glue_rel_lt::apply ( Mat & out, const mtGlue& X ) { arma_extra_debug_sigprint(); arma_applier_mat(<, "operator<"); } template inline void glue_rel_gt::apply ( Mat & out, const mtGlue& X ) { arma_extra_debug_sigprint(); arma_applier_mat(>, "operator>"); } template inline void glue_rel_lteq::apply ( Mat & out, const mtGlue& X ) { arma_extra_debug_sigprint(); arma_applier_mat(<=, "operator<="); } template inline void glue_rel_gteq::apply ( Mat & out, const mtGlue& X ) { arma_extra_debug_sigprint(); arma_applier_mat(>=, "operator>="); } template inline void glue_rel_eq::apply ( Mat & out, const mtGlue& X ) { arma_extra_debug_sigprint(); arma_applier_mat(==, "operator=="); } template inline void glue_rel_noteq::apply ( Mat & out, const mtGlue& X ) { arma_extra_debug_sigprint(); arma_applier_mat(!=, "operator!="); } template inline void glue_rel_and::apply ( Mat & out, const mtGlue& X ) { arma_extra_debug_sigprint(); arma_applier_mat(&&, "operator&&"); } template inline void glue_rel_or::apply ( Mat & out, const mtGlue& X ) { arma_extra_debug_sigprint(); arma_applier_mat(||, "operator||"); } // // // template inline void glue_rel_lt::apply ( Cube & out, const mtGlueCube& X ) { arma_extra_debug_sigprint(); arma_applier_cube(<, "operator<"); } template inline void glue_rel_gt::apply ( Cube & out, const mtGlueCube& X ) { arma_extra_debug_sigprint(); arma_applier_cube(>, "operator>"); } template inline void glue_rel_lteq::apply ( Cube & out, const mtGlueCube& X ) { arma_extra_debug_sigprint(); arma_applier_cube(<=, "operator<="); } template inline void glue_rel_gteq::apply ( Cube & out, const mtGlueCube& X ) { arma_extra_debug_sigprint(); arma_applier_cube(>=, "operator>="); } template inline void glue_rel_eq::apply ( Cube & out, const mtGlueCube& X ) { arma_extra_debug_sigprint(); arma_applier_cube(==, "operator=="); } template inline void glue_rel_noteq::apply ( Cube & out, const mtGlueCube& X ) { arma_extra_debug_sigprint(); arma_applier_cube(!=, "operator!="); } template inline void glue_rel_and::apply ( Cube & out, const mtGlueCube& X ) { arma_extra_debug_sigprint(); arma_applier_cube(&&, "operator&&"); } template inline void glue_rel_or::apply ( Cube & out, const mtGlueCube& X ) { arma_extra_debug_sigprint(); arma_applier_cube(||, "operator||"); } #undef arma_applier_mat #undef arma_applier_cube //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_solve_bones.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_solve //! @{ class glue_solve { public: template inline static void solve_direct(Mat& out, Mat& A, const Base& X, const bool slow); template inline static void apply(Mat& out, const Glue& X); }; class glue_solve_tr { public: template inline static void apply(Mat& out, const Glue& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_solve_meat.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_solve //! @{ template inline void glue_solve::solve_direct(Mat& out, Mat& A, const Base& X, const bool slow) { arma_extra_debug_sigprint(); const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; bool status = false; if(A_n_rows == A_n_cols) { status = auxlib::solve(out, A, X, slow); } else if(A_n_rows > A_n_cols) { arma_extra_debug_print("solve(): detected over-determined system"); status = auxlib::solve_od(out, A, X); } else { arma_extra_debug_print("solve(): detected under-determined system"); status = auxlib::solve_ud(out, A, X); } if(status == false) { out.reset(); arma_bad("solve(): solution not found"); } } template inline void glue_solve::apply(Mat& out, const Glue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; Mat A = X.A.get_ref(); glue_solve::solve_direct( out, A, X.B, (X.aux_uword == 1) ); } template inline void glue_solve_tr::apply(Mat& out, const Glue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_check A_tmp(X.A, out); const unwrap_check B_tmp(X.B, out); const Mat& A = A_tmp.M; const Mat& B = B_tmp.M; bool err_state = false; char* err_msg = 0; arma_debug_set_error( err_state, err_msg, ((&A) == (&B)), "solve(): A is an alias of B" ); arma_debug_set_error( err_state, err_msg, (A.n_rows != B.n_rows), "solve(): number of rows in A and B must be the same" ); arma_debug_set_error( err_state, err_msg, (A.is_square() == false), "solve(): A is not a square matrix" ); arma_debug_check(err_state, err_msg); const bool status = auxlib::solve_tr(out, A, B, X.aux_uword); if(status == false) { out.reset(); arma_bad("solve(): solution not found"); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_times_bones.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_times //! @{ //! \brief //! Template metaprogram depth_lhs //! calculates the number of Glue instances on the left hand side argument of Glue //! i.e. it recursively expands each Tx, until the type of Tx is not "Glue<..,.., glue_type>" (i.e the "glue_type" changes) template struct depth_lhs { static const uword num = 0; }; template struct depth_lhs< glue_type, Glue > { static const uword num = 1 + depth_lhs::num; }; template struct glue_times_redirect2_helper { template arma_hot inline static void apply(Mat& out, const Glue& X); }; template<> struct glue_times_redirect2_helper { template arma_hot inline static void apply(Mat& out, const Glue& X); }; template struct glue_times_redirect3_helper { template arma_hot inline static void apply(Mat& out, const Glue< Glue,T3,glue_times>& X); }; template<> struct glue_times_redirect3_helper { template arma_hot inline static void apply(Mat& out, const Glue< Glue,T3,glue_times>& X); }; template struct glue_times_redirect { template arma_hot inline static void apply(Mat& out, const Glue& X); }; template<> struct glue_times_redirect<2> { template arma_hot inline static void apply(Mat& out, const Glue& X); }; template<> struct glue_times_redirect<3> { template arma_hot inline static void apply(Mat& out, const Glue< Glue,T3,glue_times>& X); }; template<> struct glue_times_redirect<4> { template arma_hot inline static void apply(Mat& out, const Glue< Glue< Glue, T3, glue_times>, T4, glue_times>& X); }; //! Class which implements the immediate multiplication of two or more matrices class glue_times { public: template arma_hot inline static void apply(Mat& out, const Glue& X); template arma_hot inline static void apply_inplace(Mat& out, const T1& X); template arma_hot inline static void apply_inplace_plus(Mat& out, const Glue& X, const sword sign); // template arma_inline static uword mul_storage_cost(const TA& A, const TB& B); template arma_hot inline static void apply(Mat& out, const TA& A, const TB& B, const eT val); template arma_hot inline static void apply(Mat& out, const TA& A, const TB& B, const TC& C, const eT val); template arma_hot inline static void apply(Mat& out, const TA& A, const TB& B, const TC& C, const TD& D, const eT val); }; class glue_times_diag { public: template arma_hot inline static void apply(Mat& out, const Glue& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_times_meat.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_times //! @{ template template arma_hot inline void glue_times_redirect2_helper::apply(Mat& out, const Glue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const partial_unwrap tmp1(X.A); const partial_unwrap tmp2(X.B); const typename partial_unwrap::stored_type& A = tmp1.M; const typename partial_unwrap::stored_type& B = tmp2.M; const bool use_alpha = partial_unwrap::do_times || partial_unwrap::do_times; const eT alpha = use_alpha ? (tmp1.get_val() * tmp2.get_val()) : eT(0); const bool alias = tmp1.is_alias(out) || tmp2.is_alias(out); if(alias == false) { glue_times::apply < eT, partial_unwrap::do_trans, partial_unwrap::do_trans, (partial_unwrap::do_times || partial_unwrap::do_times) > (out, A, B, alpha); } else { Mat tmp; glue_times::apply < eT, partial_unwrap::do_trans, partial_unwrap::do_trans, (partial_unwrap::do_times || partial_unwrap::do_times) > (tmp, A, B, alpha); out.steal_mem(tmp); } } template arma_hot inline void glue_times_redirect2_helper::apply(Mat& out, const Glue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; if(strip_inv::do_inv == true) { arma_extra_debug_print("glue_times_redirect<2>::apply(): detected inv(A)*B"); const strip_inv A_strip(X.A); Mat A = A_strip.M; arma_debug_check( (A.is_square() == false), "inv(): given matrix is not square" ); const unwrap_check B_tmp(X.B, out); const Mat& B = B_tmp.M; arma_debug_assert_mul_size(A, B, "matrix multiplication"); glue_solve::solve_direct( out, A, B, A_strip.slow ); return; } glue_times_redirect2_helper::apply(out, X); } template template arma_hot inline void glue_times_redirect3_helper::apply(Mat& out, const Glue< Glue, T3, glue_times>& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; // we have exactly 3 objects // hence we can safely expand X as X.A.A, X.A.B and X.B const partial_unwrap tmp1(X.A.A); const partial_unwrap tmp2(X.A.B); const partial_unwrap tmp3(X.B ); const typename partial_unwrap::stored_type& A = tmp1.M; const typename partial_unwrap::stored_type& B = tmp2.M; const typename partial_unwrap::stored_type& C = tmp3.M; const bool use_alpha = partial_unwrap::do_times || partial_unwrap::do_times || partial_unwrap::do_times; const eT alpha = use_alpha ? (tmp1.get_val() * tmp2.get_val() * tmp3.get_val()) : eT(0); const bool alias = tmp1.is_alias(out) || tmp2.is_alias(out) || tmp3.is_alias(out); if(alias == false) { glue_times::apply < eT, partial_unwrap::do_trans, partial_unwrap::do_trans, partial_unwrap::do_trans, (partial_unwrap::do_times || partial_unwrap::do_times || partial_unwrap::do_times) > (out, A, B, C, alpha); } else { Mat tmp; glue_times::apply < eT, partial_unwrap::do_trans, partial_unwrap::do_trans, partial_unwrap::do_trans, (partial_unwrap::do_times || partial_unwrap::do_times || partial_unwrap::do_times) > (tmp, A, B, C, alpha); out.steal_mem(tmp); } } template arma_hot inline void glue_times_redirect3_helper::apply(Mat& out, const Glue< Glue, T3, glue_times>& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; if(strip_inv::do_inv == true) { // replace inv(A)*B*C with solve(A,B*C); arma_extra_debug_print("glue_times_redirect<3>::apply(): detected inv(A)*B*C"); const strip_inv A_strip(X.A.A); Mat A = A_strip.M; arma_debug_check( (A.is_square() == false), "inv(): given matrix is not square" ); const partial_unwrap tmp2(X.A.B); const partial_unwrap tmp3(X.B ); const typename partial_unwrap::stored_type& B = tmp2.M; const typename partial_unwrap::stored_type& C = tmp3.M; const bool use_alpha = partial_unwrap::do_times || partial_unwrap::do_times; const eT alpha = use_alpha ? (tmp2.get_val() * tmp3.get_val()) : eT(0); Mat BC; glue_times::apply < eT, partial_unwrap::do_trans, partial_unwrap::do_trans, (partial_unwrap::do_times || partial_unwrap::do_times) > (BC, B, C, alpha); arma_debug_assert_mul_size(A, BC, "matrix multiplication"); glue_solve::solve_direct( out, A, BC, A_strip.slow ); return; } if(strip_inv::do_inv == true) { // replace A*inv(B)*C with A*solve(B,C) arma_extra_debug_print("glue_times_redirect<3>::apply(): detected A*inv(B)*C"); const strip_inv B_strip(X.A.B); Mat B = B_strip.M; arma_debug_check( (B.is_square() == false), "inv(): given matrix is not square" ); const unwrap C_tmp(X.B); const Mat& C = C_tmp.M; arma_debug_assert_mul_size(B, C, "matrix multiplication"); Mat solve_result; glue_solve::solve_direct( solve_result, B, C, B_strip.slow ); const partial_unwrap_check tmp1(X.A.A, out); const typename partial_unwrap_check::stored_type& A = tmp1.M; const bool use_alpha = partial_unwrap_check::do_times; const eT alpha = use_alpha ? tmp1.get_val() : eT(0); glue_times::apply < eT, partial_unwrap_check::do_trans, false, partial_unwrap_check::do_times > (out, A, solve_result, alpha); return; } glue_times_redirect3_helper::apply(out, X); } template template arma_hot inline void glue_times_redirect::apply(Mat& out, const Glue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const partial_unwrap tmp1(X.A); const partial_unwrap tmp2(X.B); const typename partial_unwrap::stored_type& A = tmp1.M; const typename partial_unwrap::stored_type& B = tmp2.M; const bool use_alpha = partial_unwrap::do_times || partial_unwrap::do_times; const eT alpha = use_alpha ? (tmp1.get_val() * tmp2.get_val()) : eT(0); const bool alias = tmp1.is_alias(out) || tmp2.is_alias(out); if(alias == false) { glue_times::apply < eT, partial_unwrap::do_trans, partial_unwrap::do_trans, (partial_unwrap::do_times || partial_unwrap::do_times) > (out, A, B, alpha); } else { Mat tmp; glue_times::apply < eT, partial_unwrap::do_trans, partial_unwrap::do_trans, (partial_unwrap::do_times || partial_unwrap::do_times) > (tmp, A, B, alpha); out.steal_mem(tmp); } } template arma_hot inline void glue_times_redirect<2>::apply(Mat& out, const Glue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; glue_times_redirect2_helper< is_supported_blas_type::value >::apply(out, X); } template arma_hot inline void glue_times_redirect<3>::apply(Mat& out, const Glue< Glue, T3, glue_times>& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; glue_times_redirect3_helper< is_supported_blas_type::value >::apply(out, X); } template arma_hot inline void glue_times_redirect<4>::apply(Mat& out, const Glue< Glue< Glue, T3, glue_times>, T4, glue_times>& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; // there is exactly 4 objects // hence we can safely expand X as X.A.A.A, X.A.A.B, X.A.B and X.B const partial_unwrap tmp1(X.A.A.A); const partial_unwrap tmp2(X.A.A.B); const partial_unwrap tmp3(X.A.B ); const partial_unwrap tmp4(X.B ); const typename partial_unwrap::stored_type& A = tmp1.M; const typename partial_unwrap::stored_type& B = tmp2.M; const typename partial_unwrap::stored_type& C = tmp3.M; const typename partial_unwrap::stored_type& D = tmp4.M; const bool use_alpha = partial_unwrap::do_times || partial_unwrap::do_times || partial_unwrap::do_times || partial_unwrap::do_times; const eT alpha = use_alpha ? (tmp1.get_val() * tmp2.get_val() * tmp3.get_val() * tmp4.get_val()) : eT(0); const bool alias = tmp1.is_alias(out) || tmp2.is_alias(out) || tmp3.is_alias(out) || tmp4.is_alias(out); if(alias == false) { glue_times::apply < eT, partial_unwrap::do_trans, partial_unwrap::do_trans, partial_unwrap::do_trans, partial_unwrap::do_trans, (partial_unwrap::do_times || partial_unwrap::do_times || partial_unwrap::do_times || partial_unwrap::do_times) > (out, A, B, C, D, alpha); } else { Mat tmp; glue_times::apply < eT, partial_unwrap::do_trans, partial_unwrap::do_trans, partial_unwrap::do_trans, partial_unwrap::do_trans, (partial_unwrap::do_times || partial_unwrap::do_times || partial_unwrap::do_times || partial_unwrap::do_times) > (tmp, A, B, C, D, alpha); out.steal_mem(tmp); } } template arma_hot inline void glue_times::apply(Mat& out, const Glue& X) { arma_extra_debug_sigprint(); const sword N_mat = 1 + depth_lhs< glue_times, Glue >::num; arma_extra_debug_print(arma_boost::format("N_mat = %d") % N_mat); glue_times_redirect::apply(out, X); } template arma_hot inline void glue_times::apply_inplace(Mat& out, const T1& X) { arma_extra_debug_sigprint(); out = out * X; } template arma_hot inline void glue_times::apply_inplace_plus(Mat& out, const Glue& X, const sword sign) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; if( (is_outer_product::value) || (has_op_inv::value) || (has_op_inv::value) ) { // partial workaround for corner cases const Mat tmp(X); if(sign > sword(0)) { out += tmp; } else { out -= tmp; } return; } const partial_unwrap_check tmp1(X.A, out); const partial_unwrap_check tmp2(X.B, out); typedef typename partial_unwrap_check::stored_type TA; typedef typename partial_unwrap_check::stored_type TB; const TA& A = tmp1.M; const TB& B = tmp2.M; const bool do_trans_A = partial_unwrap_check::do_trans; const bool do_trans_B = partial_unwrap_check::do_trans; const bool use_alpha = partial_unwrap_check::do_times || partial_unwrap_check::do_times || (sign < sword(0)); const eT alpha = use_alpha ? ( tmp1.get_val() * tmp2.get_val() * ( (sign > sword(0)) ? eT(1) : eT(-1) ) ) : eT(0); arma_debug_assert_mul_size(A, B, do_trans_A, do_trans_B, "matrix multiplication"); const uword result_n_rows = (do_trans_A == false) ? (TA::is_row ? 1 : A.n_rows) : (TA::is_col ? 1 : A.n_cols); const uword result_n_cols = (do_trans_B == false) ? (TB::is_col ? 1 : B.n_cols) : (TB::is_row ? 1 : B.n_rows); arma_debug_assert_same_size(out.n_rows, out.n_cols, result_n_rows, result_n_cols, ( (sign > sword(0)) ? "addition" : "subtraction" ) ); if(out.n_elem == 0) { return; } if( (do_trans_A == false) && (do_trans_B == false) && (use_alpha == false) ) { if( ((A.n_rows == 1) || (TA::is_row)) && (is_cx::no) ) { gemv::apply(out.memptr(), B, A.memptr(), alpha, eT(1)); } else if( (B.n_cols == 1) || (TB::is_col) ) { gemv::apply(out.memptr(), A, B.memptr(), alpha, eT(1)); } else { gemm::apply(out, A, B, alpha, eT(1)); } } else if( (do_trans_A == false) && (do_trans_B == false) && (use_alpha == true) ) { if( ((A.n_rows == 1) || (TA::is_row)) && (is_cx::no) ) { gemv::apply(out.memptr(), B, A.memptr(), alpha, eT(1)); } else if( (B.n_cols == 1) || (TB::is_col) ) { gemv::apply(out.memptr(), A, B.memptr(), alpha, eT(1)); } else { gemm::apply(out, A, B, alpha, eT(1)); } } else if( (do_trans_A == true) && (do_trans_B == false) && (use_alpha == false) ) { if( ((A.n_cols == 1) || (TA::is_col)) && (is_cx::no) ) { gemv::apply(out.memptr(), B, A.memptr(), alpha, eT(1)); } else if( (B.n_cols == 1) || (TB::is_col) ) { gemv::apply(out.memptr(), A, B.memptr(), alpha, eT(1)); } else if( (void_ptr(&A) == void_ptr(&B)) && (is_cx::no) ) { syrk::apply(out, A, alpha, eT(1)); } else if( (void_ptr(&A) == void_ptr(&B)) && (is_cx::yes) ) { herk::apply(out, A, T(0), T(1)); } else { gemm::apply(out, A, B, alpha, eT(1)); } } else if( (do_trans_A == true) && (do_trans_B == false) && (use_alpha == true) ) { if( ((A.n_cols == 1) || (TA::is_col)) && (is_cx::no) ) { gemv::apply(out.memptr(), B, A.memptr(), alpha, eT(1)); } else if( (B.n_cols == 1) || (TB::is_col) ) { gemv::apply(out.memptr(), A, B.memptr(), alpha, eT(1)); } else if( (void_ptr(&A) == void_ptr(&B)) && (is_cx::no) ) { syrk::apply(out, A, alpha, eT(1)); } else { gemm::apply(out, A, B, alpha, eT(1)); } } else if( (do_trans_A == false) && (do_trans_B == true) && (use_alpha == false) ) { if( ((A.n_rows == 1) || (TA::is_row)) && (is_cx::no) ) { gemv::apply(out.memptr(), B, A.memptr(), alpha, eT(1)); } else if( ((B.n_rows == 1) || (TB::is_row)) && (is_cx::no) ) { gemv::apply(out.memptr(), A, B.memptr(), alpha, eT(1)); } else if( (void_ptr(&A) == void_ptr(&B)) && (is_cx::no) ) { syrk::apply(out, A, alpha, eT(1)); } else if( (void_ptr(&A) == void_ptr(&B)) && (is_cx::yes) ) { herk::apply(out, A, T(0), T(1)); } else { gemm::apply(out, A, B, alpha, eT(1)); } } else if( (do_trans_A == false) && (do_trans_B == true) && (use_alpha == true) ) { if( ((A.n_rows == 1) || (TA::is_row)) && (is_cx::no) ) { gemv::apply(out.memptr(), B, A.memptr(), alpha, eT(1)); } else if( ((B.n_rows == 1) || (TB::is_row)) && (is_cx::no) ) { gemv::apply(out.memptr(), A, B.memptr(), alpha, eT(1)); } else if( (void_ptr(&A) == void_ptr(&B)) && (is_cx::no) ) { syrk::apply(out, A, alpha, eT(1)); } else { gemm::apply(out, A, B, alpha, eT(1)); } } else if( (do_trans_A == true) && (do_trans_B == true) && (use_alpha == false) ) { if( ((A.n_cols == 1) || (TA::is_col)) && (is_cx::no) ) { gemv::apply(out.memptr(), B, A.memptr(), alpha, eT(1)); } else if( ((B.n_rows == 1) || (TB::is_row)) && (is_cx::no) ) { gemv::apply(out.memptr(), A, B.memptr(), alpha, eT(1)); } else { gemm::apply(out, A, B, alpha, eT(1)); } } else if( (do_trans_A == true) && (do_trans_B == true) && (use_alpha == true) ) { if( ((A.n_cols == 1) || (TA::is_col)) && (is_cx::no) ) { gemv::apply(out.memptr(), B, A.memptr(), alpha, eT(1)); } else if( ((B.n_rows == 1) || (TB::is_row)) && (is_cx::no) ) { gemv::apply(out.memptr(), A, B.memptr(), alpha, eT(1)); } else { gemm::apply(out, A, B, alpha, eT(1)); } } } template arma_inline uword glue_times::mul_storage_cost(const TA& A, const TB& B) { const uword final_A_n_rows = (do_trans_A == false) ? ( TA::is_row ? 1 : A.n_rows ) : ( TA::is_col ? 1 : A.n_cols ); const uword final_B_n_cols = (do_trans_B == false) ? ( TB::is_col ? 1 : B.n_cols ) : ( TB::is_row ? 1 : B.n_rows ); return final_A_n_rows * final_B_n_cols; } template < typename eT, const bool do_trans_A, const bool do_trans_B, const bool use_alpha, typename TA, typename TB > arma_hot inline void glue_times::apply ( Mat& out, const TA& A, const TB& B, const eT alpha ) { arma_extra_debug_sigprint(); //arma_debug_assert_mul_size(A, B, do_trans_A, do_trans_B, "matrix multiplication"); arma_debug_assert_trans_mul_size(A.n_rows, A.n_cols, B.n_rows, B.n_cols, "matrix multiplication"); const uword final_n_rows = (do_trans_A == false) ? (TA::is_row ? 1 : A.n_rows) : (TA::is_col ? 1 : A.n_cols); const uword final_n_cols = (do_trans_B == false) ? (TB::is_col ? 1 : B.n_cols) : (TB::is_row ? 1 : B.n_rows); out.set_size(final_n_rows, final_n_cols); if( (A.n_elem == 0) || (B.n_elem == 0) ) { out.zeros(); return; } if( (do_trans_A == false) && (do_trans_B == false) && (use_alpha == false) ) { if( ((A.n_rows == 1) || (TA::is_row)) && (is_cx::no) ) { gemv::apply(out.memptr(), B, A.memptr()); } else if( (B.n_cols == 1) || (TB::is_col) ) { gemv::apply(out.memptr(), A, B.memptr()); } else { gemm::apply(out, A, B ); } } else if( (do_trans_A == false) && (do_trans_B == false) && (use_alpha == true) ) { if( ((A.n_rows == 1) || (TA::is_row)) && (is_cx::no) ) { gemv::apply(out.memptr(), B, A.memptr(), alpha); } else if( (B.n_cols == 1) || (TB::is_col) ) { gemv::apply(out.memptr(), A, B.memptr(), alpha); } else { gemm::apply(out, A, B, alpha); } } else if( (do_trans_A == true) && (do_trans_B == false) && (use_alpha == false) ) { if( ((A.n_cols == 1) || (TA::is_col)) && (is_cx::no) ) { gemv::apply(out.memptr(), B, A.memptr()); } else if( (B.n_cols == 1) || (TB::is_col) ) { gemv::apply(out.memptr(), A, B.memptr()); } else if( (void_ptr(&A) == void_ptr(&B)) && (is_cx::no) ) { syrk::apply(out, A ); } else if( (void_ptr(&A) == void_ptr(&B)) && (is_cx::yes) ) { herk::apply(out, A ); } else { gemm::apply(out, A, B ); } } else if( (do_trans_A == true) && (do_trans_B == false) && (use_alpha == true) ) { if( ((A.n_cols == 1) || (TA::is_col)) && (is_cx::no) ) { gemv::apply(out.memptr(), B, A.memptr(), alpha); } else if( (B.n_cols == 1) || (TB::is_col) ) { gemv::apply(out.memptr(), A, B.memptr(), alpha); } else if( (void_ptr(&A) == void_ptr(&B)) && (is_cx::no) ) { syrk::apply(out, A, alpha); } else { gemm::apply(out, A, B, alpha); } } else if( (do_trans_A == false) && (do_trans_B == true) && (use_alpha == false) ) { if( ((A.n_rows == 1) || (TA::is_row)) && (is_cx::no) ) { gemv::apply(out.memptr(), B, A.memptr()); } else if( ((B.n_rows == 1) || (TB::is_row)) && (is_cx::no) ) { gemv::apply(out.memptr(), A, B.memptr()); } else if( (void_ptr(&A) == void_ptr(&B)) && (is_cx::no) ) { syrk::apply(out, A ); } else if( (void_ptr(&A) == void_ptr(&B)) && (is_cx::yes) ) { herk::apply(out, A ); } else { gemm::apply(out, A, B ); } } else if( (do_trans_A == false) && (do_trans_B == true) && (use_alpha == true) ) { if( ((A.n_rows == 1) || (TA::is_row)) && (is_cx::no) ) { gemv::apply(out.memptr(), B, A.memptr(), alpha); } else if( ((B.n_rows == 1) || (TB::is_row)) && (is_cx::no) ) { gemv::apply(out.memptr(), A, B.memptr(), alpha); } else if( (void_ptr(&A) == void_ptr(&B)) && (is_cx::no) ) { syrk::apply(out, A, alpha); } else { gemm::apply(out, A, B, alpha); } } else if( (do_trans_A == true) && (do_trans_B == true) && (use_alpha == false) ) { if( ((A.n_cols == 1) || (TA::is_col)) && (is_cx::no) ) { gemv::apply(out.memptr(), B, A.memptr()); } else if( ((B.n_rows == 1) || (TB::is_row)) && (is_cx::no) ) { gemv::apply(out.memptr(), A, B.memptr()); } else { gemm::apply(out, A, B ); } } else if( (do_trans_A == true) && (do_trans_B == true) && (use_alpha == true) ) { if( ((A.n_cols == 1) || (TA::is_col)) && (is_cx::no) ) { gemv::apply(out.memptr(), B, A.memptr(), alpha); } else if( ((B.n_rows == 1) || (TB::is_row)) && (is_cx::no) ) { gemv::apply(out.memptr(), A, B.memptr(), alpha); } else { gemm::apply(out, A, B, alpha); } } } template < typename eT, const bool do_trans_A, const bool do_trans_B, const bool do_trans_C, const bool use_alpha, typename TA, typename TB, typename TC > arma_hot inline void glue_times::apply ( Mat& out, const TA& A, const TB& B, const TC& C, const eT alpha ) { arma_extra_debug_sigprint(); Mat tmp; const uword storage_cost_AB = glue_times::mul_storage_cost(A, B); const uword storage_cost_BC = glue_times::mul_storage_cost(B, C); if(storage_cost_AB <= storage_cost_BC) { // out = (A*B)*C glue_times::apply(tmp, A, B, alpha); glue_times::apply(out, tmp, C, eT(0)); } else { // out = A*(B*C) glue_times::apply(tmp, B, C, alpha); glue_times::apply(out, A, tmp, eT(0)); } } template < typename eT, const bool do_trans_A, const bool do_trans_B, const bool do_trans_C, const bool do_trans_D, const bool use_alpha, typename TA, typename TB, typename TC, typename TD > arma_hot inline void glue_times::apply ( Mat& out, const TA& A, const TB& B, const TC& C, const TD& D, const eT alpha ) { arma_extra_debug_sigprint(); Mat tmp; const uword storage_cost_AC = glue_times::mul_storage_cost(A, C); const uword storage_cost_BD = glue_times::mul_storage_cost(B, D); if(storage_cost_AC <= storage_cost_BD) { // out = (A*B*C)*D glue_times::apply(tmp, A, B, C, alpha); glue_times::apply(out, tmp, D, eT(0)); } else { // out = A*(B*C*D) glue_times::apply(tmp, B, C, D, alpha); glue_times::apply(out, A, tmp, eT(0)); } } // // glue_times_diag template arma_hot inline void glue_times_diag::apply(Mat& out, const Glue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const strip_diagmat S1(X.A); const strip_diagmat S2(X.B); typedef typename strip_diagmat::stored_type T1_stripped; typedef typename strip_diagmat::stored_type T2_stripped; if( (strip_diagmat::do_diagmat == true) && (strip_diagmat::do_diagmat == false) ) { const diagmat_proxy_check A(S1.M, out); const unwrap_check tmp(X.B, out); const Mat& B = tmp.M; const uword A_n_elem = A.n_elem; const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; arma_debug_assert_mul_size(A_n_elem, A_n_elem, B_n_rows, B_n_cols, "matrix multiplication"); out.set_size(A_n_elem, B_n_cols); for(uword col=0; col < B_n_cols; ++col) { eT* out_coldata = out.colptr(col); const eT* B_coldata = B.colptr(col); uword i,j; for(i=0, j=1; j < B_n_rows; i+=2, j+=2) { eT tmp_i = A[i]; eT tmp_j = A[j]; tmp_i *= B_coldata[i]; tmp_j *= B_coldata[j]; out_coldata[i] = tmp_i; out_coldata[j] = tmp_j; } if(i < B_n_rows) { out_coldata[i] = A[i] * B_coldata[i]; } } } else if( (strip_diagmat::do_diagmat == false) && (strip_diagmat::do_diagmat == true) ) { const unwrap_check tmp(X.A, out); const Mat& A = tmp.M; const diagmat_proxy_check B(S2.M, out); const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword B_n_elem = B.n_elem; arma_debug_assert_mul_size(A_n_rows, A_n_cols, B_n_elem, B_n_elem, "matrix multiplication"); out.set_size(A_n_rows, B_n_elem); for(uword col=0; col < A_n_cols; ++col) { const eT val = B[col]; eT* out_coldata = out.colptr(col); const eT* A_coldata = A.colptr(col); uword i,j; for(i=0, j=1; j < A_n_rows; i+=2, j+=2) { const eT tmp_i = A_coldata[i] * val; const eT tmp_j = A_coldata[j] * val; out_coldata[i] = tmp_i; out_coldata[j] = tmp_j; } if(i < A_n_rows) { out_coldata[i] = A_coldata[i] * val; } } } else if( (strip_diagmat::do_diagmat == true) && (strip_diagmat::do_diagmat == true) ) { const diagmat_proxy_check A(S1.M, out); const diagmat_proxy_check B(S2.M, out); const uword A_n_elem = A.n_elem; const uword B_n_elem = B.n_elem; arma_debug_assert_mul_size(A_n_elem, A_n_elem, B_n_elem, B_n_elem, "matrix multiplication"); out.zeros(A_n_elem, A_n_elem); for(uword i=0; i < A_n_elem; ++i) { out.at(i,i) = A[i] * B[i]; } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_toeplitz_bones.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_toeplitz //! @{ class glue_toeplitz { public: template inline static void apply(Mat& out, const Glue& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/glue_toeplitz_meat.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup glue_toeplitz //! @{ template inline void glue_toeplitz::apply(Mat& out, const Glue& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_check tmp1(in.A, out); const unwrap_check tmp2(in.B, out); const Mat& A = tmp1.M; const Mat& B = tmp2.M; arma_debug_check ( ( ((A.is_vec() == false) && (A.is_empty() == false)) || ((B.is_vec() == false) && (B.is_empty() == false)) ), "toeplitz(): given object is not a vector" ); const uword A_N = A.n_elem; const uword B_N = B.n_elem; const eT* A_mem = A.memptr(); const eT* B_mem = B.memptr(); out.set_size(A_N, B_N); if( out.is_empty() ) { return; } for(uword col=0; col < B_N; ++col) { eT* col_mem = out.colptr(col); uword i = 0; for(uword row=col; row < A_N; ++row, ++i) { col_mem[row] = A_mem[i]; } } for(uword row=0; row < A_N; ++row) { uword i = 1; for(uword col=(row+1); col < B_N; ++col, ++i) { out.at(row,col) = B_mem[i]; } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/gmm_diag_bones.hpp ================================================ // Copyright (C) 2014 Conrad Sanderson // Copyright (C) 2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. struct gmm_dist_mode { const uword id; inline explicit gmm_dist_mode(const uword in_id) : id(in_id) {} }; inline bool operator==(const gmm_dist_mode& a, const gmm_dist_mode& b) { return (a.id == b.id); } inline bool operator!=(const gmm_dist_mode& a, const gmm_dist_mode& b) { return (a.id != b.id); } struct gmm_dist_eucl : public gmm_dist_mode { inline gmm_dist_eucl() : gmm_dist_mode(1) {} }; struct gmm_dist_maha : public gmm_dist_mode { inline gmm_dist_maha() : gmm_dist_mode(2) {} }; struct gmm_dist_prob : public gmm_dist_mode { inline gmm_dist_prob() : gmm_dist_mode(3) {} }; static const gmm_dist_eucl eucl_dist; static const gmm_dist_maha maha_dist; static const gmm_dist_prob prob_dist; struct gmm_seed_mode { const uword id; inline explicit gmm_seed_mode(const uword in_id) : id(in_id) {} }; inline bool operator==(const gmm_seed_mode& a, const gmm_seed_mode& b) { return (a.id == b.id); } inline bool operator!=(const gmm_seed_mode& a, const gmm_seed_mode& b) { return (a.id != b.id); } struct gmm_seed_keep_existing : public gmm_seed_mode { inline gmm_seed_keep_existing() : gmm_seed_mode(1) {} }; struct gmm_seed_static_subset : public gmm_seed_mode { inline gmm_seed_static_subset() : gmm_seed_mode(2) {} }; struct gmm_seed_static_spread : public gmm_seed_mode { inline gmm_seed_static_spread() : gmm_seed_mode(3) {} }; struct gmm_seed_random_subset : public gmm_seed_mode { inline gmm_seed_random_subset() : gmm_seed_mode(4) {} }; struct gmm_seed_random_spread : public gmm_seed_mode { inline gmm_seed_random_spread() : gmm_seed_mode(5) {} }; static const gmm_seed_keep_existing keep_existing; static const gmm_seed_static_subset static_subset; static const gmm_seed_static_spread static_spread; static const gmm_seed_random_subset random_subset; static const gmm_seed_random_spread random_spread; namespace gmm_priv { struct gmm_empty_arg {}; #if defined(_OPENMP) struct arma_omp_state { const int orig_dynamic_state; inline arma_omp_state() : orig_dynamic_state(omp_get_dynamic()) { omp_set_dynamic(0); } inline ~arma_omp_state() { omp_set_dynamic(orig_dynamic_state); } }; #else struct arma_omp_state {}; #endif template class gmm_diag { public: arma_aligned const Mat means; arma_aligned const Mat dcovs; arma_aligned const Row hefts; // // inline ~gmm_diag(); inline gmm_diag(); inline gmm_diag(const gmm_diag& x); inline const gmm_diag& operator=(const gmm_diag& x); inline gmm_diag(const uword in_n_dims, const uword in_n_gaus); inline void reset(const uword in_n_dims, const uword in_n_gaus); inline void reset(); template inline void set_params(const Base& in_means, const Base& in_dcovs, const Base& in_hefts); template inline void set_means(const Base& in_means); template inline void set_dcovs(const Base& in_dcovs); template inline void set_hefts(const Base& in_hefts); inline uword n_dims() const; inline uword n_gaus() const; inline bool load(const std::string name); inline bool save(const std::string name) const; inline Col generate() const; inline Mat generate(const uword N) const; template inline eT log_p(const T1& expr, const gmm_empty_arg& junk1 = gmm_empty_arg(), typename enable_if<((is_arma_type::value) && (resolves_to_colvector::value == true ))>::result* junk2 = 0) const; template inline eT log_p(const T1& expr, const uword gaus_id, typename enable_if<((is_arma_type::value) && (resolves_to_colvector::value == true ))>::result* junk2 = 0) const; template inline Row log_p(const T1& expr, const gmm_empty_arg& junk1 = gmm_empty_arg(), typename enable_if<((is_arma_type::value) && (resolves_to_colvector::value == false))>::result* junk2 = 0) const; template inline Row log_p(const T1& expr, const uword gaus_id, typename enable_if<((is_arma_type::value) && (resolves_to_colvector::value == false))>::result* junk2 = 0) const; template inline eT avg_log_p(const Base& expr) const; template inline eT avg_log_p(const Base& expr, const uword gaus_id) const; template inline uword assign(const T1& expr, const gmm_dist_mode& dist, typename enable_if<((is_arma_type::value) && (resolves_to_colvector::value == true ))>::result* junk = 0) const; template inline urowvec assign(const T1& expr, const gmm_dist_mode& dist, typename enable_if<((is_arma_type::value) && (resolves_to_colvector::value == false))>::result* junk = 0) const; template inline urowvec raw_hist(const Base& expr, const gmm_dist_mode& dist_mode) const; template inline Row norm_hist(const Base& expr, const gmm_dist_mode& dist_mode) const; template inline bool learn ( const Base& data, const uword n_gaus, const gmm_dist_mode& dist_mode, const gmm_seed_mode& seed_mode, const uword km_iter, const uword em_iter, const eT var_floor, const bool print_mode ); // protected: arma_aligned Row log_det_etc; arma_aligned Row log_hefts; arma_aligned Col mah_aux; // inline void init(const gmm_diag& x); inline void init(const uword in_n_dim, const uword in_n_gaus); inline void init_constants(); inline umat internal_gen_boundaries(const uword N) const; inline eT internal_scalar_log_p(const eT* x ) const; inline eT internal_scalar_log_p(const eT* x, const uword gaus_id) const; template inline Row internal_vec_log_p(const T1& X ) const; template inline Row internal_vec_log_p(const T1& X, const uword gaus_id) const; template inline eT internal_avg_log_p(const T1& X ) const; template inline eT internal_avg_log_p(const T1& X, const uword gaus_id) const; template inline uword internal_scalar_assign(const T1& X, const gmm_dist_mode& dist_mode) const; template inline void internal_vec_assign(urowvec& out, const T1& X, const gmm_dist_mode& dist_mode) const; inline void internal_raw_hist(urowvec& hist, const Mat& X, const gmm_dist_mode& dist_mode) const; // template inline void generate_initial_means(const Mat& X, const gmm_seed_mode& seed); template inline void generate_initial_dcovs_and_hefts(const Mat& X, const eT var_floor); template inline bool km_iterate(const Mat& X, const uword max_iter, const bool verbose); template inline void km_update_stats(const Mat& X, const uword start_index, const uword end_index, const Mat& old_means, field< running_mean_vec >& running_means) const; // inline bool em_iterate(const Mat& X, const uword max_iter, const eT var_floor, const bool verbose); inline void em_update_params(const Mat& X, const umat& boundaries, field< Mat >& t_acc_means, field< Mat >& t_acc_dcovs, field< Col >& t_acc_norm_lhoods, field< Col >& t_gaus_log_lhoods, Col& t_progress_log_lhoods); inline void em_generate_acc(const Mat& X, const uword start_index, const uword end_index, Mat& acc_means, Mat& acc_dcovs, Col& acc_norm_lhoods, Col& gaus_log_lhoods, eT& progress_log_lhood) const; inline void em_fix_params(const eT var_floor); }; } typedef gmm_priv::gmm_diag gmm_diag; typedef gmm_priv::gmm_diag fgmm_diag; ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/gmm_diag_meat.hpp ================================================ // Copyright (C) 2014 Conrad Sanderson // Copyright (C) 2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. namespace gmm_priv { template inline gmm_diag::~gmm_diag() { arma_extra_debug_sigprint_this(this); arma_type_check(( (is_same_type::value == false) && (is_same_type::value == false) )); } template inline gmm_diag::gmm_diag() { arma_extra_debug_sigprint_this(this); } template inline gmm_diag::gmm_diag(const gmm_diag& x) { arma_extra_debug_sigprint_this(this); init(x); } template inline const gmm_diag& gmm_diag::operator=(const gmm_diag& x) { arma_extra_debug_sigprint(); init(x); return *this; } template inline gmm_diag::gmm_diag(const uword in_n_dims, const uword in_n_gaus) { arma_extra_debug_sigprint_this(this); init(in_n_dims, in_n_gaus); } template inline void gmm_diag::reset() { arma_extra_debug_sigprint(); mah_aux.reset(); init(0, 0); } template inline void gmm_diag::reset(const uword in_n_dims, const uword in_n_gaus) { arma_extra_debug_sigprint(); mah_aux.reset(); init(in_n_dims, in_n_gaus); } template template inline void gmm_diag::set_params(const Base& in_means_expr, const Base& in_dcovs_expr, const Base& in_hefts_expr) { arma_extra_debug_sigprint(); const unwrap tmp1(in_means_expr.get_ref()); const unwrap tmp2(in_dcovs_expr.get_ref()); const unwrap tmp3(in_hefts_expr.get_ref()); const Mat& in_means = tmp1.M; const Mat& in_dcovs = tmp2.M; const Mat& in_hefts = tmp3.M; arma_debug_check ( (size(in_means) != size(in_dcovs)) || (in_hefts.n_cols != in_means.n_cols) || (in_hefts.n_rows != 1), "gmm_diag::set_params(): given parameters have inconsistent and/or wrong sizes" ); arma_debug_check( (in_means.is_finite() == false), "gmm_diag::set_params(): given means have non-finite values" ); arma_debug_check( (in_dcovs.is_finite() == false), "gmm_diag::set_params(): given dcovs have non-finite values" ); arma_debug_check( (in_hefts.is_finite() == false), "gmm_diag::set_params(): given hefts have non-finite values" ); arma_debug_check( (any(vectorise(in_dcovs) <= eT(0))), "gmm_diag::set_params(): given dcovs have negative or zero values" ); arma_debug_check( (any(vectorise(in_hefts) < eT(0))), "gmm_diag::set_params(): given hefts have negative values" ); const eT s = accu(in_hefts); arma_debug_check( ((s < (eT(1) - Datum::eps)) || (s > (eT(1) + Datum::eps))), "gmm_diag::set_params(): sum of given hefts is not 1" ); access::rw(means) = in_means; access::rw(dcovs) = in_dcovs; access::rw(hefts) = in_hefts; init_constants(); } template template inline void gmm_diag::set_means(const Base& in_means_expr) { arma_extra_debug_sigprint(); const unwrap tmp(in_means_expr.get_ref()); const Mat& in_means = tmp.M; arma_debug_check( (size(in_means) != size(means)), "gmm_diag::set_means(): given means have incompatible size" ); arma_debug_check( (in_means.is_finite() == false), "gmm_diag::set_means(): given means have non-finite values" ); access::rw(means) = in_means; } template template inline void gmm_diag::set_dcovs(const Base& in_dcovs_expr) { arma_extra_debug_sigprint(); const unwrap tmp(in_dcovs_expr.get_ref()); const Mat& in_dcovs = tmp.M; arma_debug_check( (size(in_dcovs) != size(dcovs)), "gmm_diag::set_dcovs(): given dcovs have incompatible size" ); arma_debug_check( (in_dcovs.is_finite() == false), "gmm_diag::set_dcovs(): given dcovs have non-finite values" ); arma_debug_check( (any(vectorise(in_dcovs) <= eT(0))), "gmm_diag::set_dcovs(): given dcovs have negative or zero values" ); access::rw(dcovs) = in_dcovs; init_constants(); } template template inline void gmm_diag::set_hefts(const Base& in_hefts_expr) { arma_extra_debug_sigprint(); const unwrap tmp(in_hefts_expr.get_ref()); const Mat& in_hefts = tmp.M; arma_debug_check( (size(in_hefts) != size(hefts)), "gmm_diag::set_hefts(): given hefts have incompatible size" ); arma_debug_check( (in_hefts.is_finite() == false), "gmm_diag::set_hefts(): given hefts have non-finite values" ); arma_debug_check( (any(vectorise(in_hefts) < eT(0))), "gmm_diag::set_hefts(): given hefts have negative values" ); const eT s = accu(in_hefts); arma_debug_check( ((s < (eT(1) - Datum::eps)) || (s > (eT(1) + Datum::eps))), "gmm_diag::set_hefts(): sum of given hefts is not 1" ); access::rw(hefts) = in_hefts; log_hefts = log(hefts); // TODO: possible issue when one of the hefts is zero } template inline uword gmm_diag::n_dims() const { return means.n_rows; } template inline uword gmm_diag::n_gaus() const { return means.n_cols; } template inline bool gmm_diag::load(const std::string name) { arma_extra_debug_sigprint(); Cube Q; bool status = Q.load(name, arma_binary); if( (status == false) || (Q.n_slices != 2) ) { reset(); return false; } if( (Q.n_rows < 2) || (Q.n_cols < 1) ) { reset(); return true; } access::rw(hefts) = Q.slice(0).row(0); access::rw(means) = Q.slice(0).submat(1, 0, Q.n_rows-1, Q.n_cols-1); access::rw(dcovs) = Q.slice(1).submat(1, 0, Q.n_rows-1, Q.n_cols-1); init_constants(); return true; } template inline bool gmm_diag::save(const std::string name) const { arma_extra_debug_sigprint(); Cube Q(means.n_rows + 1, means.n_cols, 2); if(Q.n_elem > 0) { Q.slice(0).row(0) = hefts; Q.slice(1).row(0).zeros(); // reserved for future use Q.slice(0).submat(1, 0, size(means)) = means; Q.slice(1).submat(1, 0, size(dcovs)) = dcovs; } const bool status = Q.save(name, arma_binary); return status; } template inline Col gmm_diag::generate() const { arma_extra_debug_sigprint(); const uword N_dims = means.n_rows; const uword N_gaus = means.n_cols; Col out( (N_gaus > 0) ? N_dims : uword(0) ); if(N_gaus > 0) { const double val = randu(); double csum = double(0); uword gaus_id = 0; for(uword j=0; j < N_gaus; ++j) { csum += hefts[j]; if(val <= csum) { gaus_id = j; break; } } out = randn< Col >(N_dims); out %= sqrt(dcovs.col(gaus_id)); out += means.col(gaus_id); } return out; } template inline Mat gmm_diag::generate(const uword N_vec) const { arma_extra_debug_sigprint(); const uword N_dims = means.n_rows; const uword N_gaus = means.n_cols; Mat out( ( (N_gaus > 0) ? N_dims : uword(0) ), N_vec ); if(N_gaus > 0) { const eT* hefts_mem = hefts.memptr(); for(uword i=0; i < N_vec; ++i) { const double val = randu(); double csum = double(0); uword gaus_id = 0; for(uword j=0; j < N_gaus; ++j) { csum += hefts_mem[j]; if(val <= csum) { gaus_id = j; break; } } subview_col out_col = out.col(i); out_col = randn< Col >(N_dims); out_col %= sqrt(dcovs.col(gaus_id)); out_col += means.col(gaus_id); } } return out; } template template inline eT gmm_diag::log_p(const T1& expr, const gmm_empty_arg& junk1, typename enable_if<((is_arma_type::value) && (resolves_to_colvector::value == true))>::result* junk2) const { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); const quasi_unwrap tmp(expr); arma_debug_check( (tmp.M.n_rows != means.n_rows), "gmm_diag::log_p(): incompatible dimensions" ); return internal_scalar_log_p( tmp.M.memptr() ); } template template inline eT gmm_diag::log_p(const T1& expr, const uword gaus_id, typename enable_if<((is_arma_type::value) && (resolves_to_colvector::value == true))>::result* junk2) const { arma_extra_debug_sigprint(); arma_ignore(junk2); const quasi_unwrap tmp(expr); arma_debug_check( (tmp.M.n_rows != means.n_rows), "gmm_diag::log_p(): incompatible dimensions" ); arma_debug_check( (gaus_id >= means.n_cols), "gmm_diag::log_p(): specified gaussian is out of range" ); return internal_scalar_log_p( tmp.M.memptr(), gaus_id ); } template template inline Row gmm_diag::log_p(const T1& expr, const gmm_empty_arg& junk1, typename enable_if<((is_arma_type::value) && (resolves_to_colvector::value == false))>::result* junk2) const { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); if(is_subview::value) { const subview& X = reinterpret_cast< const subview& >(expr); return internal_vec_log_p(X); } else { const unwrap tmp(expr); const Mat& X = tmp.M; return internal_vec_log_p(X); } } template template inline Row gmm_diag::log_p(const T1& expr, const uword gaus_id, typename enable_if<((is_arma_type::value) && (resolves_to_colvector::value == false))>::result* junk2) const { arma_extra_debug_sigprint(); arma_ignore(junk2); if(is_subview::value) { const subview& X = reinterpret_cast< const subview& >(expr); return internal_vec_log_p(X, gaus_id); } else { const unwrap tmp(expr); const Mat& X = tmp.M; return internal_vec_log_p(X, gaus_id); } } template template inline eT gmm_diag::avg_log_p(const Base& expr) const { arma_extra_debug_sigprint(); if(is_subview::value) { const subview& X = reinterpret_cast< const subview& >( expr.get_ref() ); return internal_avg_log_p(X); } else { const unwrap tmp(expr.get_ref()); const Mat& X = tmp.M; return internal_avg_log_p(X); } } template template inline eT gmm_diag::avg_log_p(const Base& expr, const uword gaus_id) const { arma_extra_debug_sigprint(); if(is_subview::value) { const subview& X = reinterpret_cast< const subview& >( expr.get_ref() ); return internal_avg_log_p(X, gaus_id); } else { const unwrap tmp(expr.get_ref()); const Mat& X = tmp.M; return internal_avg_log_p(X, gaus_id); } } template template inline uword gmm_diag::assign(const T1& expr, const gmm_dist_mode& dist, typename enable_if<((is_arma_type::value) && (resolves_to_colvector::value == true))>::result* junk) const { arma_extra_debug_sigprint(); arma_ignore(junk); if(is_subview_col::value) { const subview_col& X = reinterpret_cast< const subview_col& >(expr); return internal_scalar_assign(X, dist); } else { const unwrap tmp(expr); const Mat& X = tmp.M; return internal_scalar_assign(X, dist); } } template template inline urowvec gmm_diag::assign(const T1& expr, const gmm_dist_mode& dist, typename enable_if<((is_arma_type::value) && (resolves_to_colvector::value == false))>::result* junk) const { arma_extra_debug_sigprint(); arma_ignore(junk); urowvec out; if(is_subview::value) { const subview& X = reinterpret_cast< const subview& >(expr); internal_vec_assign(out, X, dist); } else { const unwrap tmp(expr); const Mat& X = tmp.M; internal_vec_assign(out, X, dist); } return out; } template template inline urowvec gmm_diag::raw_hist(const Base& expr, const gmm_dist_mode& dist_mode) const { arma_extra_debug_sigprint(); const unwrap tmp(expr.get_ref()); const Mat& X = tmp.M; arma_debug_check( (X.n_rows != means.n_rows), "gmm_diag::raw_hist(): incompatible dimensions" ); arma_debug_check( ((dist_mode != eucl_dist) && (dist_mode != prob_dist)), "gmm_diag::raw_hist(): unsupported distance mode" ); urowvec hist; internal_raw_hist(hist, X, dist_mode); return hist; } template template inline Row gmm_diag::norm_hist(const Base& expr, const gmm_dist_mode& dist_mode) const { arma_extra_debug_sigprint(); const unwrap tmp(expr.get_ref()); const Mat& X = tmp.M; arma_debug_check( (X.n_rows != means.n_rows), "gmm_diag::norm_hist(): incompatible dimensions" ); arma_debug_check( ((dist_mode != eucl_dist) && (dist_mode != prob_dist)), "gmm_diag::norm_hist(): unsupported distance mode" ); urowvec hist; internal_raw_hist(hist, X, dist_mode); const uword hist_n_elem = hist.n_elem; const uword* hist_mem = hist.memptr(); eT acc = eT(0); for(uword i=0; i out(hist_n_elem); eT* out_mem = out.memptr(); for(uword i=0; i template inline bool gmm_diag::learn ( const Base& data, const uword N_gaus, const gmm_dist_mode& dist_mode, const gmm_seed_mode& seed_mode, const uword km_iter, const uword em_iter, const eT var_floor, const bool print_mode ) { arma_extra_debug_sigprint(); const bool dist_mode_ok = (dist_mode == eucl_dist) || (dist_mode == maha_dist); const bool seed_mode_ok = \ (seed_mode == keep_existing) || (seed_mode == static_subset) || (seed_mode == static_spread) || (seed_mode == random_subset) || (seed_mode == random_spread); arma_debug_check( (dist_mode_ok == false), "gmm_diag::learn(): dist_mode must be eucl_dist or maha_dist" ); arma_debug_check( (seed_mode_ok == false), "gmm_diag::learn(): unknown seed_mode" ); arma_debug_check( (var_floor < eT(0) ), "gmm_diag::learn(): variance floor is negative" ); const unwrap tmp_X(data.get_ref()); const Mat& X = tmp_X.M; if(X.is_empty() ) { arma_warn(true, "gmm_diag::learn(): given matrix is empty" ); return false; } if(X.is_finite() == false) { arma_warn(true, "gmm_diag::learn(): given matrix has non-finite values"); return false; } if(N_gaus == 0) { reset(); return true; } if(dist_mode == maha_dist) { mah_aux = var(X,1,1); const uword mah_aux_n_elem = mah_aux.n_elem; eT* mah_aux_mem = mah_aux.memptr(); for(uword i=0; i < mah_aux_n_elem; ++i) { const eT val = mah_aux_mem[i]; mah_aux_mem[i] = ((val != eT(0)) && arma_isfinite(val)) ? eT(1) / val : eT(1); } } // copy current model, in case of failure by k-means and/or EM const gmm_diag orig = (*this); // initial means if(seed_mode == keep_existing) { if(means.is_empty() ) { arma_warn(true, "gmm_diag::learn(): no existing means" ); return false; } if(X.n_rows != means.n_rows) { arma_warn(true, "gmm_diag::learn(): dimensionality mismatch"); return false; } // TODO: also check for number of vectors? } else { if(X.n_cols < N_gaus) { arma_warn(true, "gmm_diag::learn(): number of vectors is less than number of gaussians"); return false; } reset(X.n_rows, N_gaus); if(print_mode) { get_stream_err2() << "gmm_diag::learn(): generating initial means\n"; } if(dist_mode == eucl_dist) { generate_initial_means<1>(X, seed_mode); } else if(dist_mode == maha_dist) { generate_initial_means<2>(X, seed_mode); } } // k-means if(km_iter > 0) { const arma_ostream_state stream_state(get_stream_err2()); bool status = false; if(dist_mode == eucl_dist) { status = km_iterate<1>(X, km_iter, print_mode); } else if(dist_mode == maha_dist) { status = km_iterate<2>(X, km_iter, print_mode); } stream_state.restore(get_stream_err2()); if(status == false) { arma_warn(true, "gmm_diag::learn(): k-means algorithm failed"); init(orig); return false; } } // initial dcovs const eT vfloor = (eT(var_floor) > eT(0)) ? eT(var_floor) : std::numeric_limits::min(); if(seed_mode != keep_existing) { if(print_mode) { get_stream_err2() << "gmm_diag::learn(): generating initial covariances\n"; } if(dist_mode == eucl_dist) { generate_initial_dcovs_and_hefts<1>(X, vfloor); } else if(dist_mode == maha_dist) { generate_initial_dcovs_and_hefts<2>(X, vfloor); } } // EM algorithm if(em_iter > 0) { const arma_ostream_state stream_state(get_stream_err2()); const bool status = em_iterate(X, em_iter, vfloor, print_mode); stream_state.restore(get_stream_err2()); if(status == false) { arma_warn(true, "gmm_diag::learn(): EM algorithm failed"); init(orig); return false; } } mah_aux.reset(); init_constants(); return true; } // // // template inline void gmm_diag::init(const gmm_diag& x) { arma_extra_debug_sigprint(); gmm_diag& t = *this; if(&t != &x) { access::rw(t.means) = x.means; access::rw(t.dcovs) = x.dcovs; access::rw(t.hefts) = x.hefts; init_constants(); } } template inline void gmm_diag::init(const uword in_n_dims, const uword in_n_gaus) { arma_extra_debug_sigprint(); access::rw(means).zeros(in_n_dims, in_n_gaus); access::rw(dcovs).ones(in_n_dims, in_n_gaus); access::rw(hefts).set_size(in_n_gaus); access::rw(hefts).fill(eT(1) / eT(in_n_gaus)); init_constants(); } template inline void gmm_diag::init_constants() { arma_extra_debug_sigprint(); const uword N_dims = means.n_rows; const uword N_gaus = means.n_cols; const eT tmp = (eT(N_dims)/eT(2)) * std::log(eT(2) * Datum::pi); log_det_etc.set_size(N_gaus); for(uword i=0; i inline umat gmm_diag::internal_gen_boundaries(const uword N) const { arma_extra_debug_sigprint(); #if defined(_OPENMP) // const uword n_cores = 0; const uword n_cores = uword(omp_get_num_procs()); const uword n_threads = (n_cores > 0) ? ( (n_cores <= N) ? n_cores : 1 ) : 1; #else // static const uword n_cores = 0; static const uword n_threads = 1; #endif // get_stream_err2() << "gmm_diag::internal_gen_boundaries(): n_cores: " << n_cores << '\n'; // get_stream_err2() << "gmm_diag::internal_gen_boundaries(): n_threads: " << n_threads << '\n'; umat boundaries(2, n_threads); if(N > 0) { const uword chunk_size = N / n_threads; uword count = 0; for(uword t=0; t arma_hot inline eT gmm_diag::internal_scalar_log_p(const eT* x) const { arma_extra_debug_sigprint(); const eT* log_hefts_mem = log_hefts.mem; const uword N_gaus = means.n_cols; if(N_gaus > 0) { eT log_sum = internal_scalar_log_p(x, 0) + log_hefts_mem[0]; for(uword g=1; g < N_gaus; ++g) { const eT tmp = internal_scalar_log_p(x, g) + log_hefts_mem[g]; log_sum = log_add_exp(log_sum, tmp); } return log_sum; } else { return -Datum::inf; } } template arma_hot inline eT gmm_diag::internal_scalar_log_p(const eT* x, const uword g) const { arma_extra_debug_sigprint(); const eT* mean = means.colptr(g); const eT* dcov = dcovs.colptr(g); const uword N_dims = means.n_rows; eT val_i = eT(0); eT val_j = eT(0); uword i,j; for(i=0, j=1; j template inline Row gmm_diag::internal_vec_log_p(const T1& X) const { arma_extra_debug_sigprint(); arma_debug_check( (X.n_rows != means.n_rows), "gmm_diag::log_p(): incompatible dimensions" ); const uword N = X.n_cols; Row out(N); if(N > 0) { #if defined(_OPENMP) { const arma_omp_state save_omp_state; const umat boundaries = internal_gen_boundaries(N); const uword n_threads = boundaries.n_cols; #pragma omp parallel for for(uword t=0; t < n_threads; ++t) { const uword start_index = boundaries.at(0,t); const uword end_index = boundaries.at(1,t); eT* out_mem = out.memptr(); for(uword i=start_index; i <= end_index; ++i) { out_mem[i] = internal_scalar_log_p( X.colptr(i) ); } } } #else { eT* out_mem = out.memptr(); for(uword i=0; i < N; ++i) { out_mem[i] = internal_scalar_log_p( X.colptr(i) ); } } #endif } return out; } template template inline Row gmm_diag::internal_vec_log_p(const T1& X, const uword gaus_id) const { arma_extra_debug_sigprint(); arma_debug_check( (X.n_rows != means.n_rows), "gmm_diag::log_p(): incompatible dimensions" ); arma_debug_check( (gaus_id >= means.n_cols), "gmm_diag::log_p(): gaus_id is out of range" ); const uword N = X.n_cols; Row out(N); if(N > 0) { #if defined(_OPENMP) { const arma_omp_state save_omp_state; const umat boundaries = internal_gen_boundaries(N); const uword n_threads = boundaries.n_cols; #pragma omp parallel for for(uword t=0; t < n_threads; ++t) { const uword start_index = boundaries.at(0,t); const uword end_index = boundaries.at(1,t); eT* out_mem = out.memptr(); for(uword i=start_index; i <= end_index; ++i) { out_mem[i] = internal_scalar_log_p( X.colptr(i), gaus_id ); } } } #else { eT* out_mem = out.memptr(); for(uword i=0; i < N; ++i) { out_mem[i] = internal_scalar_log_p( X.colptr(i), gaus_id ); } } #endif } return out; } template template inline eT gmm_diag::internal_avg_log_p(const T1& X) const { arma_extra_debug_sigprint(); arma_debug_check( (X.n_rows != means.n_rows), "gmm_diag::avg_log_p(): incompatible dimensions" ); const uword N = X.n_cols; if(N == 0) { return (-Datum::inf); } #if defined(_OPENMP) { const arma_omp_state save_omp_state; const umat boundaries = internal_gen_boundaries(N); const uword n_threads = boundaries.n_cols; field< running_mean_scalar > t_running_means(n_threads); #pragma omp parallel for for(uword t=0; t < n_threads; ++t) { const uword start_index = boundaries.at(0,t); const uword end_index = boundaries.at(1,t); running_mean_scalar& current_running_mean = t_running_means[t]; for(uword i=start_index; i <= end_index; ++i) { current_running_mean( internal_scalar_log_p( X.colptr(i) ) ); } } eT avg = eT(0); for(uword t=0; t < n_threads; ++t) { running_mean_scalar& current_running_mean = t_running_means[t]; const eT w = eT(current_running_mean.count()) / eT(N); avg += w * current_running_mean.mean(); } return avg; } #else { running_mean_scalar running_mean; for(uword i=0; i template inline eT gmm_diag::internal_avg_log_p(const T1& X, const uword gaus_id) const { arma_extra_debug_sigprint(); arma_debug_check( (X.n_rows != means.n_rows), "gmm_diag::avg_log_p(): incompatible dimensions" ); arma_debug_check( (gaus_id >= means.n_cols), "gmm_diag::avg_log_p(): specified gaussian is out of range" ); const uword N = X.n_cols; if(N == 0) { return (-Datum::inf); } #if defined(_OPENMP) { const arma_omp_state save_omp_state; const umat boundaries = internal_gen_boundaries(N); const uword n_threads = boundaries.n_cols; field< running_mean_scalar > t_running_means(n_threads); #pragma omp parallel for for(uword t=0; t < n_threads; ++t) { const uword start_index = boundaries.at(0,t); const uword end_index = boundaries.at(1,t); running_mean_scalar& current_running_mean = t_running_means[t]; for(uword i=start_index; i <= end_index; ++i) { current_running_mean( internal_scalar_log_p( X.colptr(i), gaus_id) ); } } eT avg = eT(0); for(uword t=0; t < n_threads; ++t) { running_mean_scalar& current_running_mean = t_running_means[t]; const eT w = eT(current_running_mean.count()) / eT(N); avg += w * current_running_mean.mean(); } return avg; } #else { running_mean_scalar running_mean; for(uword i=0; i template inline uword gmm_diag::internal_scalar_assign(const T1& X, const gmm_dist_mode& dist_mode) const { arma_extra_debug_sigprint(); const uword N_dims = means.n_rows; const uword N_gaus = means.n_cols; arma_debug_check( (X.n_rows != N_dims), "gmm_diag::assign(): incompatible dimensions" ); arma_debug_check( (N_gaus == 0), "gmm_diag::assign(): model has no means" ); const eT* X_mem = X.colptr(0); if(dist_mode == eucl_dist) { eT best_dist = Datum::inf; uword best_g = 0; for(uword g=0; g < N_gaus; ++g) { const eT tmp_dist = distance::eval(N_dims, X_mem, means.colptr(g), X_mem); if(tmp_dist <= best_dist) { best_dist = tmp_dist; best_g = g; } } return best_g; } else if(dist_mode == prob_dist) { const eT* log_hefts_mem = log_hefts.memptr(); eT best_p = -Datum::inf; uword best_g = 0; for(uword g=0; g < N_gaus; ++g) { const eT tmp_p = internal_scalar_log_p(X_mem, g) + log_hefts_mem[g]; if(tmp_p >= best_p) { best_p = tmp_p; best_g = g; } } return best_g; } else { arma_debug_check(true, "gmm_diag::assign(): unsupported distance mode"); } return uword(0); } template template inline void gmm_diag::internal_vec_assign(urowvec& out, const T1& X, const gmm_dist_mode& dist_mode) const { arma_extra_debug_sigprint(); const uword N_dims = means.n_rows; const uword N_gaus = means.n_cols; arma_debug_check( (X.n_rows != N_dims), "gmm_diag::assign(): incompatible dimensions" ); const uword X_n_cols = (N_gaus > 0) ? X.n_cols : 0; out.set_size(1,X_n_cols); uword* out_mem = out.memptr(); if(dist_mode == eucl_dist) { for(uword i=0; i::inf; uword best_g = 0; for(uword g=0; g::eval(N_dims, X_colptr, means.colptr(g), X_colptr); if(tmp_dist <= best_dist) { best_dist = tmp_dist; best_g = g; } } out_mem[i] = best_g; } } else if(dist_mode == prob_dist) { const eT* log_hefts_mem = log_hefts.memptr(); for(uword i=0; i::inf; uword best_g = 0; for(uword g=0; g= best_p) { best_p = tmp_p; best_g = g; } } out_mem[i] = best_g; } } else { arma_debug_check(true, "gmm_diag::assign(): unsupported distance mode"); } } template inline void gmm_diag::internal_raw_hist(urowvec& hist, const Mat& X, const gmm_dist_mode& dist_mode) const { arma_extra_debug_sigprint(); const uword N_dims = means.n_rows; const uword N_gaus = means.n_cols; const uword X_n_cols = X.n_cols; hist.zeros(N_gaus); if(N_gaus == 0) { return; } uword* hist_mem = hist.memptr(); if(dist_mode == eucl_dist) { for(uword i=0; i::inf; uword best_g = 0; for(uword g=0; g < N_gaus; ++g) { const eT tmp_dist = distance::eval(N_dims, X_colptr, means.colptr(g), X_colptr); if(tmp_dist <= best_dist) { best_dist = tmp_dist; best_g = g; } } hist_mem[best_g]++; } } else if(dist_mode == prob_dist) { const eT* log_hefts_mem = log_hefts.memptr(); for(uword i=0; i::inf; uword best_g = 0; for(uword g=0; g < N_gaus; ++g) { const eT tmp_p = internal_scalar_log_p(X_colptr, g) + log_hefts_mem[g]; if(tmp_p >= best_p) { best_p = tmp_p; best_g = g; } } hist_mem[best_g]++; } } } template template inline void gmm_diag::generate_initial_means(const Mat& X, const gmm_seed_mode& seed_mode) { const uword N_dims = means.n_rows; const uword N_gaus = means.n_cols; if( (seed_mode == static_subset) || (seed_mode == random_subset) ) { uvec initial_indices; if(seed_mode == static_subset) { initial_indices = linspace(0, X.n_cols-1, N_gaus); } else if(seed_mode == random_subset) { initial_indices = uvec(sort_index(randu(X.n_cols))).rows(0,N_gaus-1); } // not using randi() here as on some primitive systems it produces vectors with non-unique values // initial_indices.print("initial_indices:"); access::rw(means) = X.cols(initial_indices); } else if( (seed_mode == static_spread) || (seed_mode == random_spread) ) { uword start_index = 0; if(seed_mode == static_spread) { start_index = X.n_cols / 2; } else if(seed_mode == random_spread) { start_index = as_scalar(randi(1, distr_param(0,X.n_cols-1))); } access::rw(means).col(0) = X.unsafe_col(start_index); const eT* mah_aux_mem = mah_aux.memptr(); running_stat rs; for(uword g=1; g < N_gaus; ++g) { eT max_dist = eT(0); uword best_i = uword(0); for(uword i=0; i < X.n_cols; ++i) { rs.reset(); const eT* X_colptr = X.colptr(i); bool ignore_i = false; // find the average distance between sample i and the means so far for(uword h = 0; h < g; ++h) { const eT dist = distance::eval(N_dims, X_colptr, means.colptr(h), mah_aux_mem); // ignore sample already selected as a mean if(dist == eT(0)) { ignore_i = true; break; } else { rs(dist); } } if( (rs.mean() >= max_dist) && (ignore_i == false)) { max_dist = rs.mean(); best_i = i; } } // set the mean to the sample that is the furthest away from the means so far access::rw(means).col(g) = X.unsafe_col(best_i); } } // get_stream_err2() << "generate_initial_means():" << '\n'; // means.print(); } template template inline void gmm_diag::generate_initial_dcovs_and_hefts(const Mat& X, const eT var_floor) { const uword N_dims = means.n_rows; const uword N_gaus = means.n_cols; field< running_stat_vec< Col > > rs(N_gaus); const eT* mah_aux_mem = mah_aux.memptr(); for(uword i=0; i::inf; uword best_g = 0; for(uword g=0; g::eval(N_dims, X_colptr, means.colptr(g), mah_aux_mem); if(dist <= min_dist) { min_dist = dist; best_g = g; } } rs(best_g)(X.unsafe_col(i)); } for(uword g=0; g= eT(2) ) { access::rw(dcovs).col(g) = rs(g).var(1); } else { access::rw(dcovs).col(g).ones(); } access::rw(hefts)(g) = (std::max)(eT(1), rs(g).count()) / eT(X.n_cols); } em_fix_params(var_floor); } //! multi-threaded implementation of k-means, inspired by MapReduce template template inline bool gmm_diag::km_iterate(const Mat& X, const uword max_iter, const bool verbose) { arma_extra_debug_sigprint(); if(verbose) { get_stream_err2().unsetf(ios::showbase); get_stream_err2().unsetf(ios::uppercase); get_stream_err2().unsetf(ios::showpos); get_stream_err2().unsetf(ios::scientific); get_stream_err2().setf(ios::right); get_stream_err2().setf(ios::fixed); } const uword N_dims = means.n_rows; const uword N_gaus = means.n_cols; Mat old_means = means; Mat new_means = means; running_mean_scalar rs_delta; field< running_mean_vec > running_means(N_gaus); const eT* mah_aux_mem = mah_aux.memptr(); #if defined(_OPENMP) const arma_omp_state save_omp_state; const umat boundaries = internal_gen_boundaries(X.n_cols); const uword n_threads = boundaries.n_cols; field< field< running_mean_vec > > t_running_means(n_threads); for(uword t=0; t < n_threads; ++t) { t_running_means[t].set_size(N_gaus); } vec tmp_mean(N_dims); if(verbose) { get_stream_err2() << "gmm_diag::learn(): k-means: n_threads: " << n_threads << '\n'; } #endif for(uword iter=1; iter <= max_iter; ++iter) { #if defined(_OPENMP) { for(uword t=0; t < n_threads; ++t) { for(uword g=0; g < N_gaus; ++g) { t_running_means[t][g].reset(); } } // km_update_stats() is the "map" operation, which produces partial means #pragma omp parallel for for(uword t=0; t < n_threads; ++t) { field< running_mean_vec >& current_running_means = t_running_means[t]; km_update_stats(X, boundaries.at(0,t), boundaries.at(1,t), old_means, current_running_means); } // the "reduce" operation, which combines the partial means produced by the separate threads; // takes into account the counts for each mean for(uword g=0; g < N_gaus; ++g) { uword total_count = 0; for(uword t=0; t < n_threads; ++t) { total_count += t_running_means[t][g].count(); } tmp_mean.zeros(); bool dead = true; uword last_index = 0; if(total_count > 0) { for(uword t=0; t < n_threads; ++t) { const eT w = eT(t_running_means[t][g].count()) / eT(total_count); if(w > eT(0)) { tmp_mean += w * t_running_means[t][g].mean(); dead = false; last_index = t_running_means[t][g].last_index(); } } } running_means[g].reset(); if(dead == false) { running_means[g](tmp_mean, last_index); } } } #else { for(uword g=0; g < N_gaus; ++g) { running_means[g].reset(); } km_update_stats(X, 0, X.n_cols-1, old_means, running_means); } #endif uword n_dead_means = 0; for(uword g=0; g < N_gaus; ++g) { if(running_means[g].count() > 0) { new_means.col(g) = running_means[g].mean(); } else { n_dead_means++; } } if(n_dead_means > 0) { if(verbose) { get_stream_err2() << "gmm_diag::learn(): k-means: recovering from dead means\n"; } if(n_dead_means == 1) { uword dead_g = 0; uword populous_g = 0; uword populous_count = running_means(0).count(); for(uword g=1; g < N_gaus; ++g) { const uword count = running_means(g).count(); if(count == 0) { dead_g = g; } if(populous_count < count) { populous_count = count; populous_g = g; } } if( (populous_count <= 2) || (dead_g == populous_g) ) { return false; } new_means.col(dead_g) = X.unsafe_col( running_means(populous_g).last_index() ); } else { uword dead_g = 0; for(uword live_g = 0; live_g < N_gaus; ++live_g) { if(running_means(live_g).count() >= 2) { for(; dead_g < N_gaus; ++dead_g) { if(running_means(dead_g).count() == 0) { break; } } new_means.col(dead_g) = X.unsafe_col( running_means(live_g).last_index() ); dead_g++; } } } } rs_delta.reset(); for(uword g=0; g < N_gaus; ++g) { rs_delta( distance::eval(N_dims, old_means.colptr(g), new_means.colptr(g), mah_aux_mem) ); } if(verbose) { get_stream_err2() << "gmm_diag::learn(): k-means: iteration: "; get_stream_err2().unsetf(ios::scientific); get_stream_err2().setf(ios::fixed); get_stream_err2().width(std::streamsize(4)); get_stream_err2() << iter; get_stream_err2() << " delta: "; get_stream_err2().unsetf(ios::fixed); //get_stream_err2().setf(ios::scientific); get_stream_err2() << rs_delta.mean() << '\n'; } arma::swap(old_means, new_means); if(rs_delta.mean() <= Datum::eps) { break; } } access::rw(means) = old_means; return true; } template template inline void gmm_diag::km_update_stats(const Mat& X, const uword start_index, const uword end_index, const Mat& old_means, field< running_mean_vec >& running_means) const { arma_extra_debug_sigprint(); // get_stream_err2() << "km_update_stats(): start_index: " << start_index << '\n'; // get_stream_err2() << "km_update_stats(): end_index: " << end_index << '\n'; const uword N_dims = means.n_rows; const uword N_gaus = means.n_cols; const eT* mah_aux_mem = mah_aux.memptr(); for(uword i=start_index; i <= end_index; ++i) { const eT* X_colptr = X.colptr(i); double best_dist = Datum::inf; uword best_g = 0; for(uword g=0; g < N_gaus; ++g) { const double dist = distance::eval(N_dims, X_colptr, old_means.colptr(g), mah_aux_mem); // get_stream_err2() << "g: " << g << " dist: " << dist << '\n'; // old_means.col(g).print("old_means.col(g):"); // vec tmp(old_means.colptr(g), old_means.n_rows); // tmp.print("tmp:"); if(dist <= best_dist) { best_dist = dist; best_g = g; } } // get_stream_err2() << "best_g: " << best_g << '\n'; running_means[best_g]( X.unsafe_col(i), i ); } } //! multi-threaded implementation of Expectation-Maximisation, inspired by MapReduce template inline bool gmm_diag::em_iterate(const Mat& X, const uword max_iter, const eT var_floor, const bool verbose) { arma_extra_debug_sigprint(); const uword N_dims = means.n_rows; const uword N_gaus = means.n_cols; if(verbose) { get_stream_err2().unsetf(ios::showbase); get_stream_err2().unsetf(ios::uppercase); get_stream_err2().unsetf(ios::showpos); get_stream_err2().unsetf(ios::scientific); get_stream_err2().setf(ios::right); get_stream_err2().setf(ios::fixed); } #if defined(_OPENMP) const arma_omp_state save_omp_state; #endif const umat boundaries = internal_gen_boundaries(X.n_cols); const uword n_threads = boundaries.n_cols; field< Mat > t_acc_means(n_threads); field< Mat > t_acc_dcovs(n_threads); field< Col > t_acc_norm_lhoods(n_threads); field< Col > t_gaus_log_lhoods(n_threads); Col t_progress_log_lhood(n_threads); for(uword t=0; t::inf; for(uword iter=1; iter <= max_iter; ++iter) { init_constants(); em_update_params(X, boundaries, t_acc_means, t_acc_dcovs, t_acc_norm_lhoods, t_gaus_log_lhoods, t_progress_log_lhood); em_fix_params(var_floor); const eT new_avg_log_p = mean(t_progress_log_lhood); if(verbose) { get_stream_err2() << "gmm_diag::learn(): EM: iteration: "; get_stream_err2().unsetf(ios::scientific); get_stream_err2().setf(ios::fixed); get_stream_err2().width(std::streamsize(4)); get_stream_err2() << iter; get_stream_err2() << " avg_log_p: "; get_stream_err2().unsetf(ios::fixed); //get_stream_err2().setf(ios::scientific); get_stream_err2() << new_avg_log_p << '\n'; } if(is_finite(new_avg_log_p) == false) { return false; } if(std::abs(old_avg_log_p - new_avg_log_p) <= Datum::eps) { break; } old_avg_log_p = new_avg_log_p; } if(any(vectorise(dcovs) <= eT(0))) { return false; } if(means.is_finite() == false ) { return false; } if(dcovs.is_finite() == false ) { return false; } if(hefts.is_finite() == false ) { return false; } return true; } template inline void gmm_diag::em_update_params ( const Mat& X, const umat& boundaries, field< Mat >& t_acc_means, field< Mat >& t_acc_dcovs, field< Col >& t_acc_norm_lhoods, field< Col >& t_gaus_log_lhoods, Col& t_progress_log_lhood ) { arma_extra_debug_sigprint(); const uword n_threads = boundaries.n_cols; // em_generate_acc() is the "map" operation, which produces partial accumulators for means, diagonal covariances and hefts #if defined(_OPENMP) { #pragma omp parallel for for(uword t=0; t& acc_means = t_acc_means[t]; Mat& acc_dcovs = t_acc_dcovs[t]; Col& acc_norm_lhoods = t_acc_norm_lhoods[t]; Col& gaus_log_lhoods = t_gaus_log_lhoods[t]; eT& progress_log_lhood = t_progress_log_lhood[t]; em_generate_acc(X, boundaries.at(0,t), boundaries.at(1,t), acc_means, acc_dcovs, acc_norm_lhoods, gaus_log_lhoods, progress_log_lhood); } } #else { em_generate_acc(X, boundaries.at(0,0), boundaries.at(1,0), t_acc_means[0], t_acc_dcovs[0], t_acc_norm_lhoods[0], t_gaus_log_lhoods[0], t_progress_log_lhood[0]); } #endif const uword N_dims = means.n_rows; const uword N_gaus = means.n_cols; Mat& final_acc_means = t_acc_means[0]; Mat& final_acc_dcovs = t_acc_dcovs[0]; Col& final_acc_norm_lhoods = t_acc_norm_lhoods[0]; // the "reduce" operation, which combines the partial accumulators produced by the separate threads for(uword t=1; t inline void gmm_diag::em_generate_acc ( const Mat& X, const uword start_index, const uword end_index, Mat& acc_means, Mat& acc_dcovs, Col& acc_norm_lhoods, Col& gaus_log_lhoods, eT& progress_log_lhood ) const { arma_extra_debug_sigprint(); progress_log_lhood = eT(0); acc_means.zeros(); acc_dcovs.zeros(); acc_norm_lhoods.zeros(); gaus_log_lhoods.zeros(); const uword N_dims = means.n_rows; const uword N_gaus = means.n_cols; const eT* log_hefts_mem = log_hefts.memptr(); eT* gaus_log_lhoods_mem = gaus_log_lhoods.memptr(); for(uword i=start_index; i <= end_index; i++) { const eT* x = X.colptr(i); for(uword g=0; g < N_gaus; ++g) { gaus_log_lhoods_mem[g] = internal_scalar_log_p(x, g) + log_hefts_mem[g]; } eT log_lhood_sum = gaus_log_lhoods_mem[0]; for(uword g=1; g < N_gaus; ++g) { log_lhood_sum = log_add_exp(log_lhood_sum, gaus_log_lhoods_mem[g]); } progress_log_lhood += log_lhood_sum; for(uword g=0; g < N_gaus; ++g) { const eT norm_lhood = std::exp(gaus_log_lhoods_mem[g] - log_lhood_sum); acc_norm_lhoods[g] += norm_lhood; eT* acc_mean_mem = acc_means.colptr(g); eT* acc_dcov_mem = acc_dcovs.colptr(g); for(uword d=0; d < N_dims; ++d) { const eT x_d = x[d]; const eT y_d = x_d * norm_lhood; acc_mean_mem[d] += y_d; acc_dcov_mem[d] += y_d * x_d; // equivalent to x_d * x_d * norm_lhood } } } progress_log_lhood /= eT((end_index - start_index) + 1); } template inline void gmm_diag::em_fix_params(const eT var_floor) { arma_extra_debug_sigprint(); const uword N_dims = means.n_rows; const uword N_gaus = means.n_cols; for(uword g=0; g < N_gaus; ++g) { eT* dcov_mem = access::rw(dcovs).colptr(g); for(uword d=0; d < N_dims; ++d) { if(dcov_mem[d] < var_floor) { dcov_mem[d] = var_floor; } } } const eT heft_sum = accu(hefts); if(heft_sum != eT(1)) { access::rw(hefts) / heft_sum; } } } ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/gmm_misc_bones.hpp ================================================ // Copyright (C) 2014 Conrad Sanderson // Copyright (C) 2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. namespace gmm_priv { // running_mean_scalar template class running_mean_scalar { public: inline running_mean_scalar(); inline running_mean_scalar(const running_mean_scalar& in_rms); inline const running_mean_scalar& operator=(const running_mean_scalar& in_rms); arma_hot inline void operator() (const eT X); inline void reset(); inline uword count() const; inline eT mean() const; private: arma_aligned uword counter; arma_aligned eT r_mean; }; // running_mean_vec template class running_mean_vec { public: inline running_mean_vec(); inline running_mean_vec(const running_mean_vec& in_rmv); inline const running_mean_vec& operator=(const running_mean_vec& in_rmv); arma_hot inline void operator() (const Col& X, const uword index); inline void reset(); inline uword last_index() const; inline uword count() const; inline const Col& mean() const; private: arma_aligned uword last_i; arma_aligned uword counter; arma_aligned Col r_mean; }; // distance template struct distance {}; template struct distance { arma_inline arma_hot static eT eval(const uword N, const eT* A, const eT* B, const eT*); }; template struct distance { arma_inline arma_hot static eT eval(const uword N, const eT* A, const eT* B, const eT* C); }; } ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/gmm_misc_meat.hpp ================================================ // Copyright (C) 2014 Conrad Sanderson // Copyright (C) 2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. namespace gmm_priv { template inline running_mean_scalar::running_mean_scalar() : counter(uword(0)) , r_mean ( eT(0)) { arma_extra_debug_sigprint_this(this); } template inline running_mean_scalar::running_mean_scalar(const running_mean_scalar& in) : counter(in.counter) , r_mean (in.r_mean ) { arma_extra_debug_sigprint_this(this); } template inline const running_mean_scalar& running_mean_scalar::operator=(const running_mean_scalar& in) { arma_extra_debug_sigprint(); counter = in.counter; r_mean = in.r_mean; return *this; } template arma_hot inline void running_mean_scalar::operator() (const eT X) { arma_extra_debug_sigprint(); counter++; if(counter > 1) { const eT old_r_mean = r_mean; r_mean = old_r_mean + (X - old_r_mean)/counter; } else { r_mean = X; } } template inline void running_mean_scalar::reset() { arma_extra_debug_sigprint(); counter = 0; r_mean = eT(0); } template inline uword running_mean_scalar::count() const { return counter; } template inline eT running_mean_scalar::mean() const { return r_mean; } // // // template inline running_mean_vec::running_mean_vec() : last_i (0) , counter(0) { arma_extra_debug_sigprint_this(this); } template inline running_mean_vec::running_mean_vec(const running_mean_vec& in) : last_i (in.last_i ) , counter(in.counter) , r_mean (in.r_mean ) { arma_extra_debug_sigprint_this(this); } template inline const running_mean_vec& running_mean_vec::operator=(const running_mean_vec& in) { arma_extra_debug_sigprint(); last_i = in.last_i; counter = in.counter; r_mean = in.r_mean; return *this; } template arma_hot inline void running_mean_vec::operator() (const Col& X, const uword index) { arma_extra_debug_sigprint(); last_i = index; counter++; if(counter > 1) { const uword n_elem = r_mean.n_elem; eT* r_mean_mem = r_mean.memptr(); const eT* X_mem = X.memptr(); for(uword i=0; i inline void running_mean_vec::reset() { arma_extra_debug_sigprint(); last_i = 0; counter = 0; r_mean.reset(); } template inline uword running_mean_vec::last_index() const { return last_i; } template inline uword running_mean_vec::count() const { return counter; } template inline const Col& running_mean_vec::mean() const { return r_mean; } // // // template arma_inline arma_hot eT distance::eval(const uword N, const eT* A, const eT* B, const eT*) { eT acc1 = eT(0); eT acc2 = eT(0); uword i,j; for(i=0, j=1; j arma_inline arma_hot eT distance::eval(const uword N, const eT* A, const eT* B, const eT* C) { eT acc1 = eT(0); eT acc2 = eT(0); uword i,j; for(i=0, j=1; j inline hid_t get_hdf5_type() { return -1; // Return invalid. } //! Specializations for each valid element type //! (taken from all the possible typedefs of {u8, s8, ..., u64, s64} and the other native types. //! We can't use the actual u8/s8 typedefs because their relations to the H5T_... types are unclear. template<> inline hid_t get_hdf5_type< unsigned char >() { return arma_H5Tcopy(arma_H5T_NATIVE_UCHAR); } template<> inline hid_t get_hdf5_type< char >() { return arma_H5Tcopy(arma_H5T_NATIVE_CHAR); } template<> inline hid_t get_hdf5_type< short >() { return arma_H5Tcopy(arma_H5T_NATIVE_SHORT); } template<> inline hid_t get_hdf5_type< unsigned short >() { return arma_H5Tcopy(arma_H5T_NATIVE_USHORT); } template<> inline hid_t get_hdf5_type< int >() { return arma_H5Tcopy(arma_H5T_NATIVE_INT); } template<> inline hid_t get_hdf5_type< unsigned int >() { return arma_H5Tcopy(arma_H5T_NATIVE_UINT); } template<> inline hid_t get_hdf5_type< long >() { return arma_H5Tcopy(arma_H5T_NATIVE_LONG); } template<> inline hid_t get_hdf5_type< unsigned long >() { return arma_H5Tcopy(arma_H5T_NATIVE_ULONG); } #if defined(ARMA_USE_U64S64) && defined(ULLONG_MAX) template<> inline hid_t get_hdf5_type< long long >() { return arma_H5Tcopy(arma_H5T_NATIVE_LLONG); } template<> inline hid_t get_hdf5_type< unsigned long long >() { return arma_H5Tcopy(arma_H5T_NATIVE_ULLONG); } #endif template<> inline hid_t get_hdf5_type< float >() { return arma_H5Tcopy(arma_H5T_NATIVE_FLOAT); } template<> inline hid_t get_hdf5_type< double >() { return arma_H5Tcopy(arma_H5T_NATIVE_DOUBLE); } //! Utility hid_t since HOFFSET() won't work with std::complex. template struct hdf5_complex_t { eT real; eT imag; }; template<> inline hid_t get_hdf5_type< std::complex >() { hid_t type = arma_H5Tcreate(H5T_COMPOUND, sizeof(hdf5_complex_t)); arma_H5Tinsert(type, "real", HOFFSET(hdf5_complex_t, real), arma_H5T_NATIVE_FLOAT); arma_H5Tinsert(type, "imag", HOFFSET(hdf5_complex_t, imag), arma_H5T_NATIVE_FLOAT); return type; } template<> inline hid_t get_hdf5_type< std::complex >() { hid_t type = arma_H5Tcreate(H5T_COMPOUND, sizeof(hdf5_complex_t)); arma_H5Tinsert(type, "real", HOFFSET(hdf5_complex_t, real), arma_H5T_NATIVE_DOUBLE); arma_H5Tinsert(type, "imag", HOFFSET(hdf5_complex_t, imag), arma_H5T_NATIVE_DOUBLE); return type; } // Compare datatype against all supported types. inline bool is_supported_arma_hdf5_type(hid_t datatype) { hid_t search_type; bool is_equal; // start with most likely used types: double, complex, float, complex search_type = get_hdf5_type(); is_equal = ( arma_H5Tequal(datatype, search_type) > 0 ); arma_H5Tclose(search_type); if (is_equal) { return true; } search_type = get_hdf5_type< std::complex >(); is_equal = ( arma_H5Tequal(datatype, search_type) > 0 ); arma_H5Tclose(search_type); if (is_equal) { return true; } search_type = get_hdf5_type(); is_equal = ( arma_H5Tequal(datatype, search_type) > 0 ); arma_H5Tclose(search_type); if (is_equal) { return true; } search_type = get_hdf5_type< std::complex >(); is_equal = ( arma_H5Tequal(datatype, search_type) > 0 ); arma_H5Tclose(search_type); if (is_equal) { return true; } // remaining supported types: u8, s8, u16, s16, u32, s32, u64, s64, ulng_t, slng_t search_type = get_hdf5_type(); is_equal = ( arma_H5Tequal(datatype, search_type) > 0 ); arma_H5Tclose(search_type); if (is_equal) { return true; } search_type = get_hdf5_type(); is_equal = ( arma_H5Tequal(datatype, search_type) > 0 ); arma_H5Tclose(search_type); if (is_equal) { return true; } search_type = get_hdf5_type(); is_equal = ( arma_H5Tequal(datatype, search_type) > 0 ); arma_H5Tclose(search_type); if (is_equal) { return true; } search_type = get_hdf5_type(); is_equal = ( arma_H5Tequal(datatype, search_type) > 0 ); arma_H5Tclose(search_type); if (is_equal) { return true; } search_type = get_hdf5_type(); is_equal = ( arma_H5Tequal(datatype, search_type) > 0 ); arma_H5Tclose(search_type); if (is_equal) { return true; } search_type = get_hdf5_type(); is_equal = ( arma_H5Tequal(datatype, search_type) > 0 ); arma_H5Tclose(search_type); if (is_equal) { return true; } #if defined(ARMA_USE_U64S64) { search_type = get_hdf5_type(); is_equal = ( arma_H5Tequal(datatype, search_type) > 0 ); arma_H5Tclose(search_type); if (is_equal) { return true; } search_type = get_hdf5_type(); is_equal = ( arma_H5Tequal(datatype, search_type) > 0 ); arma_H5Tclose(search_type); if (is_equal) { return true; } } #endif #if defined(ARMA_ALLOW_LONG) { search_type = get_hdf5_type(); is_equal = ( arma_H5Tequal(datatype, search_type) > 0 ); arma_H5Tclose(search_type); if (is_equal) { return true; } search_type = get_hdf5_type(); is_equal = ( arma_H5Tequal(datatype, search_type) > 0 ); arma_H5Tclose(search_type); if (is_equal) { return true; } } #endif return false; } //! Auxiliary functions and structs for search_hdf5_file. struct hdf5_search_info { const std::vector& names; int num_dims; bool exact; hid_t best_match; size_t best_match_position; // Position of best match in names vector. }; inline herr_t hdf5_search_callback ( hid_t loc_id, const char* name, const H5O_info_t* info, void* operator_data // hdf5_search_info ) { hdf5_search_info* search_info = (hdf5_search_info*) operator_data; // We are looking for datasets. if (info->type == H5O_TYPE_DATASET) { // Check type of dataset to see if we could even load it. hid_t dataset = arma_H5Dopen(loc_id, name, H5P_DEFAULT); hid_t datatype = arma_H5Dget_type(dataset); const bool is_supported = is_supported_arma_hdf5_type(datatype); arma_H5Tclose(datatype); arma_H5Dclose(dataset); if(is_supported == false) { // Forget about it and move on. return 0; } // Now we have to check against our set of names. // Only check names which could be better. for (size_t string_pos = 0; string_pos < search_info->best_match_position; ++string_pos) { // name is the full path (/path/to/dataset); names[string_pos] may be // "dataset", "/to/dataset", or "/path/to/dataset". // So if we count the number of forward slashes in names[string_pos], // and then simply take the last substring of name containing that number of slashes, // we can do the comparison. // Count the number of forward slashes in names[string_pos]. uword count = 0; for (uword i = 0; i < search_info->names[string_pos].length(); ++i) { if ((search_info->names[string_pos])[i] == '/') { ++count; } } // Count the number of forward slashes in the full name. uword name_count = 0; const std::string str = std::string(name); for (uword i = 0; i < str.length(); ++i) { if (str[i] == '/') { ++count; } } // If we are asking for more slashes than we have, this can't be a match. // Skip to below, where we decide whether or not to keep it anyway based // on the exactness condition of the search. if (count <= name_count) { size_t start_pos = (count == 0) ? 0 : std::string::npos; while (count > 0) { // Move pointer to previous slash. start_pos = str.rfind('/', start_pos); // Break if we've run out of slashes. if (start_pos == std::string::npos) { break; } --count; } // Now take the substring (this may end up being the full string). const std::string substring = str.substr(start_pos); // Are they the same? if (substring == search_info->names[string_pos]) { // We have found the object; it must be better than our existing match. hid_t match_candidate = arma_H5Dopen(loc_id, name, H5P_DEFAULT); // arma_check(match_candidate < 0, "Mat::load(): cannot open an HDF5 dataset"); if(match_candidate < 0) { return -1; } // Ensure that the dataset is valid and of the correct dimensionality. hid_t filespace = arma_H5Dget_space(match_candidate); int num_dims = arma_H5Sget_simple_extent_ndims(filespace); if (num_dims <= search_info->num_dims) { // Valid dataset -- we'll keep it. // If we already have an existing match we have to close it. if (search_info->best_match != -1) { arma_H5Dclose(search_info->best_match); } search_info->best_match_position = string_pos; search_info->best_match = match_candidate; } arma_H5Sclose(filespace); } } // If they are not the same, but we have not found anything and we don't need an exact match, take this. if ((search_info->exact == false) && (search_info->best_match == -1)) { hid_t match_candidate = arma_H5Dopen(loc_id, name, H5P_DEFAULT); // arma_check(match_candidate < 0, "Mat::load(): cannot open an HDF5 dataset"); if(match_candidate < 0) { return -1; } hid_t filespace = arma_H5Dget_space(match_candidate); int num_dims = arma_H5Sget_simple_extent_ndims(filespace); if (num_dims <= search_info->num_dims) { // Valid dataset -- we'll keep it. search_info->best_match = arma_H5Dopen(loc_id, name, H5P_DEFAULT); } arma_H5Sclose(filespace); } } } return 0; } //! Search an HDF5 file for the given dataset names. //! If 'exact' is true, failure to find a dataset in the list of names means that -1 is returned. //! If 'exact' is false and no datasets are found, -1 is returned. //! The number of dimensions is used to help prune down invalid datasets; //! 2 dimensions is a matrix, 1 dimension is a vector, and 3 dimensions is a cube. //! If the number of dimensions in a dataset is less than or equal to num_dims, //! it will be considered -- for instance, a one-dimensional HDF5 vector can be loaded as a single-column matrix. inline hid_t search_hdf5_file ( const std::vector& names, hid_t hdf5_file, int num_dims = 2, bool exact = false ) { hdf5_search_info search_info = { names, num_dims, exact, -1, names.size() }; // We'll use the H5Ovisit to track potential entries. herr_t status = arma_H5Ovisit(hdf5_file, H5_INDEX_NAME, H5_ITER_NATIVE, hdf5_search_callback, void_ptr(&search_info)); // Return the best match; it will be -1 if there was a problem. return (status < 0) ? -1 : search_info.best_match; } //! Load an HDF5 matrix into an array of type specified by datatype, //! then convert that into the desired array 'dest'. //! This should only be called when eT is not the datatype. template inline hid_t load_and_convert_hdf5 ( eT *dest, hid_t dataset, hid_t datatype, uword n_elem ) { // We can't use nice template specializations here // as the determination of the type of 'datatype' must be done at runtime. // So we end up with this ugliness... hid_t search_type; bool is_equal; // u8 search_type = get_hdf5_type(); is_equal = (arma_H5Tequal(datatype, search_type) > 0); arma_H5Tclose(search_type); if(is_equal) { Col v(n_elem); hid_t status = arma_H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, void_ptr(v.memptr())); arrayops::convert(dest, v.memptr(), n_elem); return status; } // s8 search_type = get_hdf5_type(); is_equal = (arma_H5Tequal(datatype, search_type) > 0); arma_H5Tclose(search_type); if(is_equal) { Col v(n_elem); hid_t status = arma_H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, void_ptr(v.memptr())); arrayops::convert(dest, v.memptr(), n_elem); return status; } // u16 search_type = get_hdf5_type(); is_equal = (arma_H5Tequal(datatype, search_type) > 0); arma_H5Tclose(search_type); if(is_equal) { Col v(n_elem); hid_t status = arma_H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, void_ptr(v.memptr())); arrayops::convert(dest, v.memptr(), n_elem); return status; } // s16 search_type = get_hdf5_type(); is_equal = (arma_H5Tequal(datatype, search_type) > 0); arma_H5Tclose(search_type); if(is_equal) { Col v(n_elem); hid_t status = arma_H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, void_ptr(v.memptr())); arrayops::convert(dest, v.memptr(), n_elem); return status; } // u32 search_type = get_hdf5_type(); is_equal = (arma_H5Tequal(datatype, search_type) > 0); arma_H5Tclose(search_type); if(is_equal) { Col v(n_elem); hid_t status = arma_H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, void_ptr(v.memptr())); arrayops::convert(dest, v.memptr(), n_elem); return status; } // s32 search_type = get_hdf5_type(); is_equal = (arma_H5Tequal(datatype, search_type) > 0); arma_H5Tclose(search_type); if(is_equal) { Col v(n_elem); hid_t status = arma_H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, void_ptr(v.memptr())); arrayops::convert(dest, v.memptr(), n_elem); return status; } #if defined(ARMA_USE_U64S64) { // u64 search_type = get_hdf5_type(); is_equal = (arma_H5Tequal(datatype, search_type) > 0); arma_H5Tclose(search_type); if(is_equal) { Col v(n_elem); hid_t status = arma_H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, void_ptr(v.memptr())); arrayops::convert(dest, v.memptr(), n_elem); return status; } // s64 search_type = get_hdf5_type(); is_equal = (arma_H5Tequal(datatype, search_type) > 0); arma_H5Tclose(search_type); if(is_equal) { Col v(n_elem); hid_t status = arma_H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, void_ptr(v.memptr())); arrayops::convert(dest, v.memptr(), n_elem); return status; } } #endif #if defined(ARMA_ALLOW_LONG) { // ulng_t search_type = get_hdf5_type(); is_equal = (arma_H5Tequal(datatype, search_type) > 0); arma_H5Tclose(search_type); if(is_equal) { Col v(n_elem); hid_t status = arma_H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, void_ptr(v.memptr())); arrayops::convert(dest, v.memptr(), n_elem); return status; } // slng_t search_type = get_hdf5_type(); is_equal = (arma_H5Tequal(datatype, search_type) > 0); arma_H5Tclose(search_type); if(is_equal) { Col v(n_elem); hid_t status = arma_H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, void_ptr(v.memptr())); arrayops::convert(dest, v.memptr(), n_elem); return status; } } #endif // float search_type = get_hdf5_type(); is_equal = (arma_H5Tequal(datatype, search_type) > 0); arma_H5Tclose(search_type); if(is_equal) { Col v(n_elem); hid_t status = arma_H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, void_ptr(v.memptr())); arrayops::convert(dest, v.memptr(), n_elem); return status; } // double search_type = get_hdf5_type(); is_equal = (arma_H5Tequal(datatype, search_type) > 0); arma_H5Tclose(search_type); if(is_equal) { Col v(n_elem); hid_t status = arma_H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, void_ptr(v.memptr())); arrayops::convert(dest, v.memptr(), n_elem); return status; } // complex float search_type = get_hdf5_type< std::complex >(); is_equal = (arma_H5Tequal(datatype, search_type) > 0); arma_H5Tclose(search_type); if(is_equal) { if(is_complex::value == false) { return -1; // can't read complex data into non-complex matrix/cube } Col< std::complex > v(n_elem); hid_t status = arma_H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, void_ptr(v.memptr())); arrayops::convert_cx(dest, v.memptr(), n_elem); return status; } // complex double search_type = get_hdf5_type< std::complex >(); is_equal = (arma_H5Tequal(datatype, search_type) > 0); arma_H5Tclose(search_type); if(is_equal) { if(is_complex::value == false) { return -1; // can't read complex data into non-complex matrix/cube } Col< std::complex > v(n_elem); hid_t status = arma_H5Dread(dataset, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, void_ptr(v.memptr())); arrayops::convert_cx(dest, v.memptr(), n_elem); return status; } return -1; // Failure. } } // namespace hdf5_misc #endif // #if defined(ARMA_USE_HDF5) //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/include_atlas.hpp ================================================ // Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #if defined(ARMA_USE_ATLAS) #if !defined(ARMA_ATLAS_INCLUDE_DIR) extern "C" { #include #include } #else #define ARMA_STR1(x) x #define ARMA_STR2(x) ARMA_STR1(x) #define ARMA_CBLAS ARMA_STR2(ARMA_ATLAS_INCLUDE_DIR)ARMA_STR2(cblas.h) #define ARMA_CLAPACK ARMA_STR2(ARMA_ATLAS_INCLUDE_DIR)ARMA_STR2(clapack.h) extern "C" { #include ARMA_INCFILE_WRAP(ARMA_CBLAS) #include ARMA_INCFILE_WRAP(ARMA_CLAPACK) } #undef ARMA_STR1 #undef ARMA_STR2 #undef ARMA_CBLAS #undef ARMA_CLAPACK #endif #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/include_hdf5.hpp ================================================ // Copyright (C) 2014 Conrad Sanderson // Copyright (C) 2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #if defined(ARMA_USE_HDF5) #if !defined(ARMA_HDF5_INCLUDE_DIR) #include #else #define ARMA_STR1(x) x #define ARMA_STR2(x) ARMA_STR1(x) #define ARMA_HDF5_HEADER ARMA_STR2(ARMA_HDF5_INCLUDE_DIR)ARMA_STR2(hdf5.h) #include ARMA_INCFILE_WRAP(ARMA_HDF5_HEADER) #undef ARMA_STR1 #undef ARMA_STR2 #undef ARMA_HDF5_HEADER #endif #if defined(H5_USE_16_API_DEFAULT) || defined(H5_USE_16_API) #pragma message ("WARNING: disabling use of HDF5 due to its incompatible configuration") #undef ARMA_USE_HDF5 #endif #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/include_superlu.hpp ================================================ // This Source Code Form is a compilation of: // (1) source code written by Ryan Curtin and Conrad Sanderson, and // (2) extracts from SuperLU 4.3 source code. // This compilation is Copyright (C) 2015 Ryan Curtin and Conrad Sanderson // and is subject to the terms of the Mozilla Public License, v. 2.0. // // The source code that is distinct and separate from SuperLU 4.3 source code // is Copyright (C) 2015 Ryan Curtin and Conrad Sanderson and is subject to the // terms of the Mozilla Public License, v. 2.0. // // If a copy of the MPL was not distributed with this file, // You can obtain one at http://mozilla.org/MPL/2.0/. // // The original SuperLU 4.3 source code is licensed under a 3-clause BSD license, // as follows: // // Copyright (c) 2003, The Regents of the University of California, through // Lawrence Berkeley National Laboratory (subject to receipt of any required // approvals from U.S. Dept. of Energy) // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // (1) Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // (2) Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // (3) Neither the name of Lawrence Berkeley National Laboratory, U.S. Dept. of // Energy nor the names of its contributors may be used to endorse or promote // products derived from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #if defined(ARMA_USE_SUPERLU) #if defined(ARMA_USE_SUPERLU_HEADERS) || defined(ARMA_SUPERLU_INCLUDE_DIR) // Since we need to suport float, double, cx_float and cx_double, // as well as preserve the sanity of the user, // we cannot simply include all the SuperLU headers due to their messy state // (duplicate definitions, pollution of global namespace, bizarro defines). // As such we are forced to include only a subset of the headers // and manually specify a few SuperLU structures and function prototypes. // // CAVEAT: // This code requires SuperLU version 4.3, // and assumes that newer 4.x versions will have no API changes. namespace arma { namespace superlu { // slu_*defs.h has int typedef'fed to int_t. I'll just write it as int for // simplicity, where I can, but supermatrix.h needs int_t. typedef int int_t; // Include supermatrix.h. This gives us SuperMatrix. // Put it in the slu namespace. // For versions of SuperLU I am familiar with, supermatrix.h does not include any other files. // Therefore, putting it in the superlu namespace is reasonably safe. // This same reasoning is true for superlu_enum_consts.h. #if defined(ARMA_SUPERLU_INCLUDE_DIR) #define ARMA_SLU_STR(x) x #define ARMA_SLU_STR2(x) ARMA_SLU_STR(x) #define ARMA_SLU_SUPERMATRIX_H ARMA_SLU_STR2(ARMA_SUPERLU_INCLUDE_DIR)ARMA_SLU_STR2(supermatrix.h) #define ARMA_SLU_SUPERLU_ENUM_CONSTS_H ARMA_SLU_STR2(ARMA_SUPERLU_INCLUDE_DIR)ARMA_SLU_STR2(superlu_enum_consts.h) #else #define ARMA_SLU_SUPERMATRIX_H supermatrix.h #define ARMA_SLU_SUPERLU_ENUM_CONSTS_H superlu_enum_consts.h #endif #include ARMA_INCFILE_WRAP(ARMA_SLU_SUPERMATRIX_H) #include ARMA_INCFILE_WRAP(ARMA_SLU_SUPERLU_ENUM_CONSTS_H) #undef ARMA_SLU_SUPERMATRIX_H #undef ARMA_SLU_SUPERLU_ENUM_CONSTS_H typedef struct { int* panel_histo; double* utime; float* ops; int TinyPivots; int RefineSteps; int expansions; } SuperLUStat_t; typedef struct { fact_t Fact; yes_no_t Equil; colperm_t ColPerm; trans_t Trans; IterRefine_t IterRefine; double DiagPivotThresh; yes_no_t SymmetricMode; yes_no_t PivotGrowth; yes_no_t ConditionNumber; rowperm_t RowPerm; int ILU_DropRule; double ILU_DropTol; double ILU_FillFactor; norm_t ILU_Norm; double ILU_FillTol; milu_t ILU_MILU; double ILU_MILU_Dim; yes_no_t ParSymbFact; yes_no_t ReplaceTinyPivot; yes_no_t SolveInitialized; yes_no_t RefineInitialized; yes_no_t PrintStat; int nnzL, nnzU; int num_lookaheads; yes_no_t lookahead_etree; yes_no_t SymPattern; } superlu_options_t; } } #else // Not using any SuperLU headers, so define all required enums and structs. // // CAVEAT: // This code requires SuperLU version 4.3, // and assumes that newer 4.x versions will have no API changes. namespace arma { namespace superlu { typedef int int_t; typedef enum { SLU_NC, SLU_NCP, SLU_NR, SLU_SC, SLU_SCP, SLU_SR, SLU_DN, SLU_NR_loc } Stype_t; typedef enum { SLU_S, SLU_D, SLU_C, SLU_Z } Dtype_t; typedef enum { SLU_GE, SLU_TRLU, SLU_TRUU, SLU_TRL, SLU_TRU, SLU_SYL, SLU_SYU, SLU_HEL, SLU_HEU } Mtype_t; typedef struct { Stype_t Stype; Dtype_t Dtype; Mtype_t Mtype; int_t nrow; int_t ncol; void* Store; } SuperMatrix; typedef struct { int* panel_histo; double* utime; float* ops; int TinyPivots; int RefineSteps; int expansions; } SuperLUStat_t; typedef enum {NO, YES} yes_no_t; typedef enum {DOFACT, SamePattern, SamePattern_SameRowPerm, FACTORED} fact_t; typedef enum {NOROWPERM, LargeDiag, MY_PERMR} rowperm_t; typedef enum {NATURAL, MMD_ATA, MMD_AT_PLUS_A, COLAMD, METIS_AT_PLUS_A, PARMETIS, ZOLTAN, MY_PERMC} colperm_t; typedef enum {NOTRANS, TRANS, CONJ} trans_t; typedef enum {NOREFINE, SLU_SINGLE=1, SLU_DOUBLE, SLU_EXTRA} IterRefine_t; typedef enum {ONE_NORM, TWO_NORM, INF_NORM} norm_t; typedef enum {SILU, SMILU_1, SMILU_2, SMILU_3} milu_t; typedef struct { fact_t Fact; yes_no_t Equil; colperm_t ColPerm; trans_t Trans; IterRefine_t IterRefine; double DiagPivotThresh; yes_no_t SymmetricMode; yes_no_t PivotGrowth; yes_no_t ConditionNumber; rowperm_t RowPerm; int ILU_DropRule; double ILU_DropTol; double ILU_FillFactor; norm_t ILU_Norm; double ILU_FillTol; milu_t ILU_MILU; double ILU_MILU_Dim; yes_no_t ParSymbFact; yes_no_t ReplaceTinyPivot; yes_no_t SolveInitialized; yes_no_t RefineInitialized; yes_no_t PrintStat; int nnzL, nnzU; int num_lookaheads; yes_no_t lookahead_etree; yes_no_t SymPattern; } superlu_options_t; typedef struct { int_t nnz; void* nzval; int_t* rowind; int_t* colptr; } NCformat; typedef struct { int_t lda; void* nzval; } DNformat; } } #endif #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/injector_bones.hpp ================================================ // Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup injector //! @{ template class mat_injector_row { public: inline mat_injector_row(); inline void insert(const eT val) const; mutable uword n_cols; mutable podarray A; mutable podarray B; }; template class mat_injector { public: typedef typename T1::elem_type elem_type; inline void insert(const elem_type val) const; inline void end_of_row() const; inline ~mat_injector(); private: inline mat_injector(T1& in_X, const elem_type val); inline mat_injector(T1& in_X, const injector_end_of_row<>& x); T1& X; mutable uword n_rows; mutable podarray< mat_injector_row* >* AA; mutable podarray< mat_injector_row* >* BB; friend class Mat; friend class Row; friend class Col; }; // template class field_injector_row { public: inline field_injector_row(); inline ~field_injector_row(); inline void insert(const oT& val) const; mutable uword n_cols; mutable field* AA; mutable field* BB; }; template class field_injector { public: typedef typename T1::object_type object_type; inline void insert(const object_type& val) const; inline void end_of_row() const; inline ~field_injector(); private: inline field_injector(T1& in_X, const object_type& val); inline field_injector(T1& in_X, const injector_end_of_row<>& x); T1& X; mutable uword n_rows; mutable podarray< field_injector_row* >* AA; mutable podarray< field_injector_row* >* BB; friend class field; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/injector_meat.hpp ================================================ // Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup injector //! @{ template inline mat_injector_row::mat_injector_row() : n_cols(0) { arma_extra_debug_sigprint(); A.set_size( podarray_prealloc_n_elem::val ); } template inline void mat_injector_row::insert(const eT val) const { arma_extra_debug_sigprint(); if(n_cols < A.n_elem) { A[n_cols] = val; ++n_cols; } else { B.set_size(2 * A.n_elem); arrayops::copy(B.memptr(), A.memptr(), n_cols); B[n_cols] = val; ++n_cols; std::swap( access::rw(A.mem), access::rw(B.mem) ); std::swap( access::rw(A.n_elem), access::rw(B.n_elem) ); } } // // // template inline mat_injector::mat_injector(T1& in_X, const typename mat_injector::elem_type val) : X(in_X) , n_rows(1) { arma_extra_debug_sigprint(); typedef typename mat_injector::elem_type eT; AA = new podarray< mat_injector_row* >; BB = new podarray< mat_injector_row* >; podarray< mat_injector_row* >& A = *AA; A.set_size(n_rows); for(uword row=0; row; } (*(A[0])).insert(val); } template inline mat_injector::mat_injector(T1& in_X, const injector_end_of_row<>& x) : X(in_X) , n_rows(1) { arma_extra_debug_sigprint(); arma_ignore(x); typedef typename mat_injector::elem_type eT; AA = new podarray< mat_injector_row* >; BB = new podarray< mat_injector_row* >; podarray< mat_injector_row* >& A = *AA; A.set_size(n_rows); for(uword row=0; row; } (*this).end_of_row(); } template inline mat_injector::~mat_injector() { arma_extra_debug_sigprint(); typedef typename mat_injector::elem_type eT; podarray< mat_injector_row* >& A = *AA; if(n_rows > 0) { uword max_n_cols = (*(A[0])).n_cols; for(uword row=1; row::value == true) { X.set_size(max_n_rows, max_n_cols); for(uword row=0; row::value == true) { arma_debug_check( (max_n_rows > 1), "matrix initialisation: incompatible dimensions" ); const uword n_cols = (*(A[0])).n_cols; X.set_size(1, n_cols); arrayops::copy( X.memptr(), (*(A[0])).A.memptr(), n_cols ); } else if(is_Col::value == true) { const bool is_vec = ( (max_n_rows == 1) || (max_n_cols == 1) ); arma_debug_check( (is_vec == false), "matrix initialisation: incompatible dimensions" ); const uword n_elem = (std::max)(max_n_rows, max_n_cols); X.set_size(n_elem, 1); uword i = 0; for(uword row=0; row inline void mat_injector::insert(const typename mat_injector::elem_type val) const { arma_extra_debug_sigprint(); typedef typename mat_injector::elem_type eT; podarray< mat_injector_row* >& A = *AA; (*(A[n_rows-1])).insert(val); } template inline void mat_injector::end_of_row() const { arma_extra_debug_sigprint(); typedef typename mat_injector::elem_type eT; podarray< mat_injector_row* >& A = *AA; podarray< mat_injector_row* >& B = *BB; B.set_size( n_rows+1 ); arrayops::copy(B.memptr(), A.memptr(), n_rows); for(uword row=n_rows; row<(n_rows+1); ++row) { B[row] = new mat_injector_row; } std::swap(AA, BB); n_rows += 1; } template arma_inline const mat_injector& operator<<(const mat_injector& ref, const typename mat_injector::elem_type val) { arma_extra_debug_sigprint(); ref.insert(val); return ref; } template arma_inline const mat_injector& operator<<(const mat_injector& ref, const injector_end_of_row<>& x) { arma_extra_debug_sigprint(); arma_ignore(x); ref.end_of_row(); return ref; } //// using a mixture of operator << and , doesn't work yet //// e.g. A << 1, 2, 3 << endr //// in the above "3 << endr" requires special handling. //// similarly, special handling is necessary for "endr << 3" //// // template // arma_inline // const mat_injector& // operator,(const mat_injector& ref, const typename mat_injector::elem_type val) // { // arma_extra_debug_sigprint(); // // ref.insert(val); // // return ref; // } // template // arma_inline // const mat_injector& // operator,(const mat_injector& ref, const injector_end_of_row<>& x) // { // arma_extra_debug_sigprint(); // arma_ignore(x); // // ref.end_of_row(); // // return ref; // } // // // template inline field_injector_row::field_injector_row() : n_cols(0) { arma_extra_debug_sigprint(); AA = new field; BB = new field; field& A = *AA; A.set_size( field_prealloc_n_elem::val ); } template inline field_injector_row::~field_injector_row() { arma_extra_debug_sigprint(); delete AA; delete BB; } template inline void field_injector_row::insert(const oT& val) const { arma_extra_debug_sigprint(); field& A = *AA; field& B = *BB; if(n_cols < A.n_elem) { A[n_cols] = val; ++n_cols; } else { B.set_size(2 * A.n_elem); for(uword i=0; i inline field_injector::field_injector(T1& in_X, const typename field_injector::object_type& val) : X(in_X) , n_rows(1) { arma_extra_debug_sigprint(); typedef typename field_injector::object_type oT; AA = new podarray< field_injector_row* >; BB = new podarray< field_injector_row* >; podarray< field_injector_row* >& A = *AA; A.set_size(n_rows); for(uword row=0; row; } (*(A[0])).insert(val); } template inline field_injector::field_injector(T1& in_X, const injector_end_of_row<>& x) : X(in_X) , n_rows(1) { arma_extra_debug_sigprint(); arma_ignore(x); typedef typename field_injector::object_type oT; AA = new podarray< field_injector_row* >; BB = new podarray< field_injector_row* >; podarray< field_injector_row* >& A = *AA; A.set_size(n_rows); for(uword row=0; row; } (*this).end_of_row(); } template inline field_injector::~field_injector() { arma_extra_debug_sigprint(); typedef typename field_injector::object_type oT; podarray< field_injector_row* >& A = *AA; if(n_rows > 0) { uword max_n_cols = (*(A[0])).n_cols; for(uword row=1; row& tmp = *((*(A[row])).AA); X.at(row,col) = tmp[col]; } for(uword col=n_cols; col inline void field_injector::insert(const typename field_injector::object_type& val) const { arma_extra_debug_sigprint(); typedef typename field_injector::object_type oT; podarray< field_injector_row* >& A = *AA; (*(A[n_rows-1])).insert(val); } template inline void field_injector::end_of_row() const { arma_extra_debug_sigprint(); typedef typename field_injector::object_type oT; podarray< field_injector_row* >& A = *AA; podarray< field_injector_row* >& B = *BB; B.set_size( n_rows+1 ); for(uword row=0; row; } std::swap(AA, BB); n_rows += 1; } template arma_inline const field_injector& operator<<(const field_injector& ref, const typename field_injector::object_type& val) { arma_extra_debug_sigprint(); ref.insert(val); return ref; } template arma_inline const field_injector& operator<<(const field_injector& ref, const injector_end_of_row<>& x) { arma_extra_debug_sigprint(); arma_ignore(x); ref.end_of_row(); return ref; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/lapack_bones.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009 Edmund Highcock // Copyright (C) 2011 James Sanders // Copyright (C) 2012 Eric Jon Sundstrom // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifdef ARMA_USE_LAPACK #if !defined(ARMA_BLAS_CAPITALS) #define arma_sgetrf sgetrf #define arma_dgetrf dgetrf #define arma_cgetrf cgetrf #define arma_zgetrf zgetrf #define arma_sgetri sgetri #define arma_dgetri dgetri #define arma_cgetri cgetri #define arma_zgetri zgetri #define arma_strtri strtri #define arma_dtrtri dtrtri #define arma_ctrtri ctrtri #define arma_ztrtri ztrtri #define arma_ssyev ssyev #define arma_dsyev dsyev #define arma_cheev cheev #define arma_zheev zheev #define arma_ssyevd ssyevd #define arma_dsyevd dsyevd #define arma_cheevd cheevd #define arma_zheevd zheevd #define arma_sgeev sgeev #define arma_dgeev dgeev #define arma_cgeev cgeev #define arma_zgeev zgeev #define arma_sggev sggev #define arma_dggev dggev #define arma_cggev cggev #define arma_zggev zggev #define arma_spotrf spotrf #define arma_dpotrf dpotrf #define arma_cpotrf cpotrf #define arma_zpotrf zpotrf #define arma_spotri spotri #define arma_dpotri dpotri #define arma_cpotri cpotri #define arma_zpotri zpotri #define arma_sgeqrf sgeqrf #define arma_dgeqrf dgeqrf #define arma_cgeqrf cgeqrf #define arma_zgeqrf zgeqrf #define arma_sorgqr sorgqr #define arma_dorgqr dorgqr #define arma_cungqr cungqr #define arma_zungqr zungqr #define arma_sgesvd sgesvd #define arma_dgesvd dgesvd #define arma_cgesvd cgesvd #define arma_zgesvd zgesvd #define arma_sgesdd sgesdd #define arma_dgesdd dgesdd #define arma_cgesdd cgesdd #define arma_zgesdd zgesdd #define arma_sgesv sgesv #define arma_dgesv dgesv #define arma_cgesv cgesv #define arma_zgesv zgesv #define arma_sgels sgels #define arma_dgels dgels #define arma_cgels cgels #define arma_zgels zgels #define arma_strtrs strtrs #define arma_dtrtrs dtrtrs #define arma_ctrtrs ctrtrs #define arma_ztrtrs ztrtrs #define arma_sgees sgees #define arma_dgees dgees #define arma_cgees cgees #define arma_zgees zgees #define arma_strsyl strsyl #define arma_dtrsyl dtrsyl #define arma_ctrsyl ctrsyl #define arma_ztrsyl ztrsyl #define arma_ssytrf ssytrf #define arma_dsytrf dsytrf #define arma_csytrf csytrf #define arma_zsytrf zsytrf #define arma_ssytri ssytri #define arma_dsytri dsytri #define arma_csytri csytri #define arma_zsytri zsytri #define arma_sgges sgges #define arma_dgges dgges #define arma_cgges cgges #define arma_zgges zgges #else #define arma_sgetrf SGETRF #define arma_dgetrf DGETRF #define arma_cgetrf CGETRF #define arma_zgetrf ZGETRF #define arma_sgetri SGETRI #define arma_dgetri DGETRI #define arma_cgetri CGETRI #define arma_zgetri ZGETRI #define arma_strtri STRTRI #define arma_dtrtri DTRTRI #define arma_ctrtri CTRTRI #define arma_ztrtri ZTRTRI #define arma_ssyev SSYEV #define arma_dsyev DSYEV #define arma_cheev CHEEV #define arma_zheev ZHEEV #define arma_ssyevd SSYEVD #define arma_dsyevd DSYEVD #define arma_cheevd CHEEVD #define arma_zheevd ZHEEVD #define arma_sgeev SGEEV #define arma_dgeev DGEEV #define arma_cgeev CGEEV #define arma_zgeev ZGEEV #define arma_sggev SGGEV #define arma_dggev DGGEV #define arma_cggev CGGEV #define arma_zggev ZGGEV #define arma_spotrf SPOTRF #define arma_dpotrf DPOTRF #define arma_cpotrf CPOTRF #define arma_zpotrf ZPOTRF #define arma_spotri SPOTRI #define arma_dpotri DPOTRI #define arma_cpotri CPOTRI #define arma_zpotri ZPOTRI #define arma_sgeqrf SGEQRF #define arma_dgeqrf DGEQRF #define arma_cgeqrf CGEQRF #define arma_zgeqrf ZGEQRF #define arma_sorgqr SORGQR #define arma_dorgqr DORGQR #define arma_cungqr CUNGQR #define arma_zungqr ZUNGQR #define arma_sgesvd SGESVD #define arma_dgesvd DGESVD #define arma_cgesvd CGESVD #define arma_zgesvd ZGESVD #define arma_sgesdd SGESDD #define arma_dgesdd DGESDD #define arma_cgesdd CGESDD #define arma_zgesdd ZGESDD #define arma_sgesv SGESV #define arma_dgesv DGESV #define arma_cgesv CGESV #define arma_zgesv ZGESV #define arma_sgels SGELS #define arma_dgels DGELS #define arma_cgels CGELS #define arma_zgels ZGELS #define arma_strtrs STRTRS #define arma_dtrtrs DTRTRS #define arma_ctrtrs CTRTRS #define arma_ztrtrs ZTRTRS #define arma_sgees SGEES #define arma_dgees DGEES #define arma_cgees CGEES #define arma_zgees ZGEES #define arma_strsyl STRSYL #define arma_dtrsyl DTRSYL #define arma_ctrsyl CTRSYL #define arma_ztrsyl ZTRSYL #define arma_ssytrf SSYTRF #define arma_dsytrf DSYTRF #define arma_csytrf CSYTRF #define arma_zsytrf ZSYTRF #define arma_ssytri SSYTRI #define arma_dsytri DSYTRI #define arma_csytri CSYTRI #define arma_zsytri ZSYTRI #define arma_sgges SGGES #define arma_dgges DGGES #define arma_cgges CGGES #define arma_zgges ZGGES #endif extern "C" { // LU factorisation void arma_fortran(arma_sgetrf)(blas_int* m, blas_int* n, float* a, blas_int* lda, blas_int* ipiv, blas_int* info); void arma_fortran(arma_dgetrf)(blas_int* m, blas_int* n, double* a, blas_int* lda, blas_int* ipiv, blas_int* info); void arma_fortran(arma_cgetrf)(blas_int* m, blas_int* n, void* a, blas_int* lda, blas_int* ipiv, blas_int* info); void arma_fortran(arma_zgetrf)(blas_int* m, blas_int* n, void* a, blas_int* lda, blas_int* ipiv, blas_int* info); // matrix inversion (using LU factorisation result) void arma_fortran(arma_sgetri)(blas_int* n, float* a, blas_int* lda, blas_int* ipiv, float* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_dgetri)(blas_int* n, double* a, blas_int* lda, blas_int* ipiv, double* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_cgetri)(blas_int* n, void* a, blas_int* lda, blas_int* ipiv, void* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_zgetri)(blas_int* n, void* a, blas_int* lda, blas_int* ipiv, void* work, blas_int* lwork, blas_int* info); // matrix inversion (triangular matrices) void arma_fortran(arma_strtri)(char* uplo, char* diag, blas_int* n, float* a, blas_int* lda, blas_int* info); void arma_fortran(arma_dtrtri)(char* uplo, char* diag, blas_int* n, double* a, blas_int* lda, blas_int* info); void arma_fortran(arma_ctrtri)(char* uplo, char* diag, blas_int* n, void* a, blas_int* lda, blas_int* info); void arma_fortran(arma_ztrtri)(char* uplo, char* diag, blas_int* n, void* a, blas_int* lda, blas_int* info); // eigenvector decomposition of symmetric real matrices void arma_fortran(arma_ssyev)(char* jobz, char* uplo, blas_int* n, float* a, blas_int* lda, float* w, float* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_dsyev)(char* jobz, char* uplo, blas_int* n, double* a, blas_int* lda, double* w, double* work, blas_int* lwork, blas_int* info); // eigenvector decomposition of hermitian matrices (complex) void arma_fortran(arma_cheev)(char* jobz, char* uplo, blas_int* n, void* a, blas_int* lda, float* w, void* work, blas_int* lwork, float* rwork, blas_int* info); void arma_fortran(arma_zheev)(char* jobz, char* uplo, blas_int* n, void* a, blas_int* lda, double* w, void* work, blas_int* lwork, double* rwork, blas_int* info); // eigenvector decomposition of symmetric real matrices by divide and conquer void arma_fortran(arma_ssyevd)(char* jobz, char* uplo, blas_int* n, float* a, blas_int* lda, float* w, float* work, blas_int* lwork, blas_int* iwork, blas_int* liwork, blas_int* info); void arma_fortran(arma_dsyevd)(char* jobz, char* uplo, blas_int* n, double* a, blas_int* lda, double* w, double* work, blas_int* lwork, blas_int* iwork, blas_int* liwork, blas_int* info); // eigenvector decomposition of hermitian matrices (complex) by divide and conquer void arma_fortran(arma_cheevd)(char* jobz, char* uplo, blas_int* n, void* a, blas_int* lda, float* w, void* work, blas_int* lwork, float* rwork, blas_int* lrwork, blas_int* iwork, blas_int* liwork, blas_int* info); void arma_fortran(arma_zheevd)(char* jobz, char* uplo, blas_int* n, void* a, blas_int* lda, double* w, void* work, blas_int* lwork, double* rwork, blas_int* lrwork, blas_int* iwork, blas_int* liwork, blas_int* info); // eigenvector decomposition of general real matrices void arma_fortran(arma_sgeev)(char* jobvl, char* jobvr, blas_int* n, float* a, blas_int* lda, float* wr, float* wi, float* vl, blas_int* ldvl, float* vr, blas_int* ldvr, float* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_dgeev)(char* jobvl, char* jobvr, blas_int* n, double* a, blas_int* lda, double* wr, double* wi, double* vl, blas_int* ldvl, double* vr, blas_int* ldvr, double* work, blas_int* lwork, blas_int* info); // eigenvector decomposition of general complex matrices void arma_fortran(arma_cgeev)(char* jobvl, char* jobvr, blas_int* n, void* a, blas_int* lda, void* w, void* vl, blas_int* ldvl, void* vr, blas_int* ldvr, void* work, blas_int* lwork, float* rwork, blas_int* info); void arma_fortran(arma_zgeev)(char* jobvl, char* jobvr, blas_int* n, void* a, blas_int* lda, void* w, void* vl, blas_int* ldvl, void* vr, blas_int* ldvr, void* work, blas_int* lwork, double* rwork, blas_int* info); // eigenvector decomposition of general real matrix pair void arma_fortran(arma_sggev)(char* jobvl, char* jobvr, blas_int* n, float* a, blas_int* lda, float* b, blas_int* ldb, float* alphar, float* alphai, float* beta, float* vl, blas_int* ldvl, float* vr, blas_int* ldvr, float* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_dggev)(char* jobvl, char* jobvr, blas_int* n, double* a, blas_int* lda, double* b, blas_int* ldb, double* alphar, double* alphai, double* beta, double* vl, blas_int* ldvl, double* vr, blas_int* ldvr, double* work, blas_int* lwork, blas_int* info); // eigenvector decomposition of general complex matrix pair void arma_fortran(arma_cggev)(char* jobvl, char* jobvr, blas_int* n, void* a, blas_int* lda, void* b, blas_int* ldb, void* alpha, void* beta, void* vl, blas_int* ldvl, void* vr, blas_int* ldvr, void* work, blas_int* lwork, float* rwork, blas_int* info); void arma_fortran(arma_zggev)(char* jobvl, char* jobvr, blas_int* n, void* a, blas_int* lda, void* b, blas_int* ldb, void* alpha, void* beta, void* vl, blas_int* ldvl, void* vr, blas_int* ldvr, void* work, blas_int* lwork, double* rwork, blas_int* info); // Cholesky decomposition void arma_fortran(arma_spotrf)(char* uplo, blas_int* n, float* a, blas_int* lda, blas_int* info); void arma_fortran(arma_dpotrf)(char* uplo, blas_int* n, double* a, blas_int* lda, blas_int* info); void arma_fortran(arma_cpotrf)(char* uplo, blas_int* n, void* a, blas_int* lda, blas_int* info); void arma_fortran(arma_zpotrf)(char* uplo, blas_int* n, void* a, blas_int* lda, blas_int* info); // matrix inversion (using Cholesky decomposition result) void arma_fortran(arma_spotri)(char* uplo, blas_int* n, float* a, blas_int* lda, blas_int* info); void arma_fortran(arma_dpotri)(char* uplo, blas_int* n, double* a, blas_int* lda, blas_int* info); void arma_fortran(arma_cpotri)(char* uplo, blas_int* n, void* a, blas_int* lda, blas_int* info); void arma_fortran(arma_zpotri)(char* uplo, blas_int* n, void* a, blas_int* lda, blas_int* info); // QR decomposition void arma_fortran(arma_sgeqrf)(blas_int* m, blas_int* n, float* a, blas_int* lda, float* tau, float* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_dgeqrf)(blas_int* m, blas_int* n, double* a, blas_int* lda, double* tau, double* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_cgeqrf)(blas_int* m, blas_int* n, void* a, blas_int* lda, void* tau, void* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_zgeqrf)(blas_int* m, blas_int* n, void* a, blas_int* lda, void* tau, void* work, blas_int* lwork, blas_int* info); // Q matrix calculation from QR decomposition (real matrices) void arma_fortran(arma_sorgqr)(blas_int* m, blas_int* n, blas_int* k, float* a, blas_int* lda, float* tau, float* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_dorgqr)(blas_int* m, blas_int* n, blas_int* k, double* a, blas_int* lda, double* tau, double* work, blas_int* lwork, blas_int* info); // Q matrix calculation from QR decomposition (complex matrices) void arma_fortran(arma_cungqr)(blas_int* m, blas_int* n, blas_int* k, void* a, blas_int* lda, void* tau, void* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_zungqr)(blas_int* m, blas_int* n, blas_int* k, void* a, blas_int* lda, void* tau, void* work, blas_int* lwork, blas_int* info); // SVD (real matrices) void arma_fortran(arma_sgesvd)(char* jobu, char* jobvt, blas_int* m, blas_int* n, float* a, blas_int* lda, float* s, float* u, blas_int* ldu, float* vt, blas_int* ldvt, float* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_dgesvd)(char* jobu, char* jobvt, blas_int* m, blas_int* n, double* a, blas_int* lda, double* s, double* u, blas_int* ldu, double* vt, blas_int* ldvt, double* work, blas_int* lwork, blas_int* info); // SVD (complex matrices) void arma_fortran(arma_cgesvd)(char* jobu, char* jobvt, blas_int* m, blas_int* n, void* a, blas_int* lda, float* s, void* u, blas_int* ldu, void* vt, blas_int* ldvt, void* work, blas_int* lwork, float* rwork, blas_int* info); void arma_fortran(arma_zgesvd)(char* jobu, char* jobvt, blas_int* m, blas_int* n, void* a, blas_int* lda, double* s, void* u, blas_int* ldu, void* vt, blas_int* ldvt, void* work, blas_int* lwork, double* rwork, blas_int* info); // SVD (real matrices) by divide and conquer void arma_fortran(arma_sgesdd)(char* jobz, blas_int* m, blas_int* n, float* a, blas_int* lda, float* s, float* u, blas_int* ldu, float* vt, blas_int* ldvt, float* work, blas_int* lwork, blas_int* iwork, blas_int* info); void arma_fortran(arma_dgesdd)(char* jobz, blas_int* m, blas_int* n, double* a, blas_int* lda, double* s, double* u, blas_int* ldu, double* vt, blas_int* ldvt, double* work, blas_int* lwork, blas_int* iwork, blas_int* info); // SVD (complex matrices) by divide and conquer void arma_fortran(arma_cgesdd)(char* jobz, blas_int* m, blas_int* n, void* a, blas_int* lda, float* s, void* u, blas_int* ldu, void* vt, blas_int* ldvt, void* work, blas_int* lwork, float* rwork, blas_int* iwork, blas_int* info); void arma_fortran(arma_zgesdd)(char* jobz, blas_int* m, blas_int* n, void* a, blas_int* lda, double* s, void* u, blas_int* ldu, void* vt, blas_int* ldvt, void* work, blas_int* lwork, double* rwork, blas_int* iwork, blas_int* info); // solve system of linear equations, using LU decomposition void arma_fortran(arma_sgesv)(blas_int* n, blas_int* nrhs, float* a, blas_int* lda, blas_int* ipiv, float* b, blas_int* ldb, blas_int* info); void arma_fortran(arma_dgesv)(blas_int* n, blas_int* nrhs, double* a, blas_int* lda, blas_int* ipiv, double* b, blas_int* ldb, blas_int* info); void arma_fortran(arma_cgesv)(blas_int* n, blas_int* nrhs, void* a, blas_int* lda, blas_int* ipiv, void* b, blas_int* ldb, blas_int* info); void arma_fortran(arma_zgesv)(blas_int* n, blas_int* nrhs, void* a, blas_int* lda, blas_int* ipiv, void* b, blas_int* ldb, blas_int* info); // solve over/underdetermined system of linear equations void arma_fortran(arma_sgels)(char* trans, blas_int* m, blas_int* n, blas_int* nrhs, float* a, blas_int* lda, float* b, blas_int* ldb, float* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_dgels)(char* trans, blas_int* m, blas_int* n, blas_int* nrhs, double* a, blas_int* lda, double* b, blas_int* ldb, double* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_cgels)(char* trans, blas_int* m, blas_int* n, blas_int* nrhs, void* a, blas_int* lda, void* b, blas_int* ldb, void* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_zgels)(char* trans, blas_int* m, blas_int* n, blas_int* nrhs, void* a, blas_int* lda, void* b, blas_int* ldb, void* work, blas_int* lwork, blas_int* info); // solve a triangular system of linear equations void arma_fortran(arma_strtrs)(char* uplo, char* trans, char* diag, blas_int* n, blas_int* nrhs, const float* a, blas_int* lda, float* b, blas_int* ldb, blas_int* info); void arma_fortran(arma_dtrtrs)(char* uplo, char* trans, char* diag, blas_int* n, blas_int* nrhs, const double* a, blas_int* lda, double* b, blas_int* ldb, blas_int* info); void arma_fortran(arma_ctrtrs)(char* uplo, char* trans, char* diag, blas_int* n, blas_int* nrhs, const void* a, blas_int* lda, void* b, blas_int* ldb, blas_int* info); void arma_fortran(arma_ztrtrs)(char* uplo, char* trans, char* diag, blas_int* n, blas_int* nrhs, const void* a, blas_int* lda, void* b, blas_int* ldb, blas_int* info); // Schur decomposition (real matrices) void arma_fortran(arma_sgees)(char* jobvs, char* sort, blas_int* select, blas_int* n, float* a, blas_int* lda, blas_int* sdim, float* wr, float* wi, float* vs, blas_int* ldvs, float* work, blas_int* lwork, blas_int* bwork, blas_int* info); void arma_fortran(arma_dgees)(char* jobvs, char* sort, blas_int* select, blas_int* n, double* a, blas_int* lda, blas_int* sdim, double* wr, double* wi, double* vs, blas_int* ldvs, double* work, blas_int* lwork, blas_int* bwork, blas_int* info); // Schur decomposition (complex matrices) void arma_fortran(arma_cgees)(char* jobvs, char* sort, blas_int* select, blas_int* n, void* a, blas_int* lda, blas_int* sdim, void* w, void* vs, blas_int* ldvs, void* work, blas_int* lwork, float* rwork, blas_int* bwork, blas_int* info); void arma_fortran(arma_zgees)(char* jobvs, char* sort, blas_int* select, blas_int* n, void* a, blas_int* lda, blas_int* sdim, void* w, void* vs, blas_int* ldvs, void* work, blas_int* lwork, double* rwork, blas_int* bwork, blas_int* info); // solve a Sylvester equation ax + xb = c, with a and b assumed to be in Schur form void arma_fortran(arma_strsyl)(char* transa, char* transb, blas_int* isgn, blas_int* m, blas_int* n, const float* a, blas_int* lda, const float* b, blas_int* ldb, float* c, blas_int* ldc, float* scale, blas_int* info); void arma_fortran(arma_dtrsyl)(char* transa, char* transb, blas_int* isgn, blas_int* m, blas_int* n, const double* a, blas_int* lda, const double* b, blas_int* ldb, double* c, blas_int* ldc, double* scale, blas_int* info); void arma_fortran(arma_ctrsyl)(char* transa, char* transb, blas_int* isgn, blas_int* m, blas_int* n, const void* a, blas_int* lda, const void* b, blas_int* ldb, void* c, blas_int* ldc, float* scale, blas_int* info); void arma_fortran(arma_ztrsyl)(char* transa, char* transb, blas_int* isgn, blas_int* m, blas_int* n, const void* a, blas_int* lda, const void* b, blas_int* ldb, void* c, blas_int* ldc, double* scale, blas_int* info); void arma_fortran(arma_ssytrf)(char* uplo, blas_int* n, float* a, blas_int* lda, blas_int* ipiv, float* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_dsytrf)(char* uplo, blas_int* n, double* a, blas_int* lda, blas_int* ipiv, double* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_csytrf)(char* uplo, blas_int* n, void* a, blas_int* lda, blas_int* ipiv, void* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_zsytrf)(char* uplo, blas_int* n, void* a, blas_int* lda, blas_int* ipiv, void* work, blas_int* lwork, blas_int* info); void arma_fortran(arma_ssytri)(char* uplo, blas_int* n, float* a, blas_int* lda, blas_int* ipiv, float* work, blas_int* info); void arma_fortran(arma_dsytri)(char* uplo, blas_int* n, double* a, blas_int* lda, blas_int* ipiv, double* work, blas_int* info); void arma_fortran(arma_csytri)(char* uplo, blas_int* n, void* a, blas_int* lda, blas_int* ipiv, void* work, blas_int* info); void arma_fortran(arma_zsytri)(char* uplo, blas_int* n, void* a, blas_int* lda, blas_int* ipiv, void* work, blas_int* info); // QZ decomposition (real matrices) void arma_fortran(arma_sgges)(char* jobvsl, char* jobvsr, char* sort, char* selctg, blas_int* n, float* a, blas_int* lda, float* b, blas_int* ldb, blas_int* sdim, float* alphar, float* alphai, float* beta, float* vsl, blas_int* ldvsl, float* vsr, blas_int* ldvsr, float* work, blas_int* lwork, float* bwork, blas_int* info); void arma_fortran(arma_dgges)(char* jobvsl, char* jobvsr, char* sort, char* selctg, blas_int* n, double* a, blas_int* lda, double* b, blas_int* ldb, blas_int* sdim, double* alphar, double* alphai, double* beta, double* vsl, blas_int* ldvsl, double* vsr, blas_int* ldvsr, double* work, blas_int* lwork, double* bwork, blas_int* info); // QZ decomposition (complex matrices) void arma_fortran(arma_cgges)(char* jobvsl, char* jobvsr, char* sort, char* selctg, blas_int* n, void* a, blas_int* lda, void* b, blas_int* ldb, blas_int* sdim, void* alpha, void* beta, void* vsl, blas_int* ldvsl, void* vsr, blas_int* ldvsr, void* work, blas_int* lwork, float* rwork, float* bwork, blas_int* info); void arma_fortran(arma_zgges)(char* jobvsl, char* jobvsr, char* sort, char* selctg, blas_int* n, void* a, blas_int* lda, void* b, blas_int* ldb, blas_int* sdim, void* alpha, void* beta, void* vsl, blas_int* ldvsl, void* vsr, blas_int* ldvsr, void* work, blas_int* lwork, double* rwork, double* bwork, blas_int* info); // void arma_fortran(arma_dgeqp3)(blas_int* m, blas_int* n, double* a, blas_int* lda, blas_int* jpvt, double* tau, double* work, blas_int* lwork, blas_int* info); // void arma_fortran(arma_dormqr)(char* side, char* trans, blas_int* m, blas_int* n, blas_int* k, double* a, blas_int* lda, double* tau, double* c, blas_int* ldc, double* work, blas_int* lwork, blas_int* info); // void arma_fortran(arma_dposv)(char* uplo, blas_int* n, blas_int* nrhs, double* a, blas_int* lda, double* b, blas_int* ldb, blas_int* info); } #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/lapack_wrapper.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // Copyright (C) 2009 Edmund Highcock // Copyright (C) 2011 James Sanders // Copyright (C) 2012 Eric Jon Sundstrom // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifdef ARMA_USE_LAPACK //! \namespace lapack namespace for LAPACK functions namespace lapack { template inline void getrf(blas_int* m, blas_int* n, eT* a, blas_int* lda, blas_int* ipiv, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_sgetrf)(m, n, (T*)a, lda, ipiv, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dgetrf)(m, n, (T*)a, lda, ipiv, info); } else if(is_supported_complex_float::value) { typedef std::complex T; arma_fortran(arma_cgetrf)(m, n, (T*)a, lda, ipiv, info); } else if(is_supported_complex_double::value) { typedef std::complex T; arma_fortran(arma_zgetrf)(m, n, (T*)a, lda, ipiv, info); } } template inline void getri(blas_int* n, eT* a, blas_int* lda, blas_int* ipiv, eT* work, blas_int* lwork, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_sgetri)(n, (T*)a, lda, ipiv, (T*)work, lwork, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dgetri)(n, (T*)a, lda, ipiv, (T*)work, lwork, info); } else if(is_supported_complex_float::value) { typedef std::complex T; arma_fortran(arma_cgetri)(n, (T*)a, lda, ipiv, (T*)work, lwork, info); } else if(is_supported_complex_double::value) { typedef std::complex T; arma_fortran(arma_zgetri)(n, (T*)a, lda, ipiv, (T*)work, lwork, info); } } template inline void trtri(char* uplo, char* diag, blas_int* n, eT* a, blas_int* lda, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_strtri)(uplo, diag, n, (T*)a, lda, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dtrtri)(uplo, diag, n, (T*)a, lda, info); } else if(is_supported_complex_float::value) { typedef std::complex T; arma_fortran(arma_ctrtri)(uplo, diag, n, (T*)a, lda, info); } else if(is_supported_complex_double::value) { typedef std::complex T; arma_fortran(arma_ztrtri)(uplo, diag, n, (T*)a, lda, info); } } template inline void syev(char* jobz, char* uplo, blas_int* n, eT* a, blas_int* lda, eT* w, eT* work, blas_int* lwork, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_ssyev)(jobz, uplo, n, (T*)a, lda, (T*)w, (T*)work, lwork, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dsyev)(jobz, uplo, n, (T*)a, lda, (T*)w, (T*)work, lwork, info); } } template inline void syevd(char* jobz, char* uplo, blas_int* n, eT* a, blas_int* lda, eT* w, eT* work, blas_int* lwork, blas_int* iwork, blas_int* liwork, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_ssyevd)(jobz, uplo, n, (T*)a, lda, (T*)w, (T*)work, lwork, iwork, liwork, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dsyevd)(jobz, uplo, n, (T*)a, lda, (T*)w, (T*)work, lwork, iwork, liwork, info); } } template inline void heev ( char* jobz, char* uplo, blas_int* n, eT* a, blas_int* lda, typename eT::value_type* w, eT* work, blas_int* lwork, typename eT::value_type* rwork, blas_int* info ) { arma_type_check(( is_supported_blas_type::value == false )); if(is_supported_complex_float::value) { typedef float T; typedef typename std::complex cx_T; arma_fortran(arma_cheev)(jobz, uplo, n, (cx_T*)a, lda, (T*)w, (cx_T*)work, lwork, (T*)rwork, info); } else if(is_supported_complex_double::value) { typedef double T; typedef typename std::complex cx_T; arma_fortran(arma_zheev)(jobz, uplo, n, (cx_T*)a, lda, (T*)w, (cx_T*)work, lwork, (T*)rwork, info); } } template inline void heevd ( char* jobz, char* uplo, blas_int* n, eT* a, blas_int* lda, typename eT::value_type* w, eT* work, blas_int* lwork, typename eT::value_type* rwork, blas_int* lrwork, blas_int* iwork, blas_int* liwork, blas_int* info ) { arma_type_check(( is_supported_blas_type::value == false )); if(is_supported_complex_float::value) { typedef float T; typedef typename std::complex cx_T; arma_fortran(arma_cheevd)(jobz, uplo, n, (cx_T*)a, lda, (T*)w, (cx_T*)work, lwork, (T*)rwork, lrwork, iwork, liwork, info); } else if(is_supported_complex_double::value) { typedef double T; typedef typename std::complex cx_T; arma_fortran(arma_zheevd)(jobz, uplo, n, (cx_T*)a, lda, (T*)w, (cx_T*)work, lwork, (T*)rwork, lrwork, iwork, liwork, info); } } template inline void geev ( char* jobvl, char* jobvr, blas_int* n, eT* a, blas_int* lda, eT* wr, eT* wi, eT* vl, blas_int* ldvl, eT* vr, blas_int* ldvr, eT* work, blas_int* lwork, blas_int* info ) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_sgeev)(jobvl, jobvr, n, (T*)a, lda, (T*)wr, (T*)wi, (T*)vl, ldvl, (T*)vr, ldvr, (T*)work, lwork, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dgeev)(jobvl, jobvr, n, (T*)a, lda, (T*)wr, (T*)wi, (T*)vl, ldvl, (T*)vr, ldvr, (T*)work, lwork, info); } } template inline void cx_geev ( char* jobvl, char* jobvr, blas_int* n, eT* a, blas_int* lda, eT* w, eT* vl, blas_int* ldvl, eT* vr, blas_int* ldvr, eT* work, blas_int* lwork, typename eT::value_type* rwork, blas_int* info ) { arma_type_check(( is_supported_blas_type::value == false )); if(is_supported_complex_float::value) { typedef float T; typedef typename std::complex cx_T; arma_fortran(arma_cgeev)(jobvl, jobvr, n, (cx_T*)a, lda, (cx_T*)w, (cx_T*)vl, ldvl, (cx_T*)vr, ldvr, (cx_T*)work, lwork, (T*)rwork, info); } else if(is_supported_complex_double::value) { typedef double T; typedef typename std::complex cx_T; arma_fortran(arma_zgeev)(jobvl, jobvr, n, (cx_T*)a, lda, (cx_T*)w, (cx_T*)vl, ldvl, (cx_T*)vr, ldvr, (cx_T*)work, lwork, (T*)rwork, info); } } template inline void ggev ( char* jobvl, char* jobvr, blas_int* n, eT* a, blas_int* lda, eT* b, blas_int* ldb, eT* alphar, eT* alphai, eT* beta, eT* vl, blas_int* ldvl, eT* vr, blas_int* ldvr, eT* work, blas_int* lwork, blas_int* info ) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_sggev)(jobvl, jobvr, n, (T*)a, lda, (T*)b, ldb, (T*)alphar, (T*)alphai, (T*)beta, (T*)vl, ldvl, (T*)vr, ldvr, (T*)work, lwork, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dggev)(jobvl, jobvr, n, (T*)a, lda, (T*)b, ldb, (T*)alphar, (T*)alphai, (T*)beta, (T*)vl, ldvl, (T*)vr, ldvr, (T*)work, lwork, info); } } template inline void cx_ggev ( char* jobvl, char* jobvr, blas_int* n, eT* a, blas_int* lda, eT* b, blas_int* ldb, eT* alpha, eT* beta, eT* vl, blas_int* ldvl, eT* vr, blas_int* ldvr, eT* work, blas_int* lwork, typename eT::value_type* rwork, blas_int* info ) { arma_type_check(( is_supported_blas_type::value == false )); if(is_supported_complex_float::value) { typedef float T; typedef typename std::complex cx_T; arma_fortran(arma_cggev)(jobvl, jobvr, n, (cx_T*)a, lda, (cx_T*)b, ldb, (cx_T*)alpha, (cx_T*)beta, (cx_T*)vl, ldvl, (cx_T*)vr, ldvr, (cx_T*)work, lwork, (T*)rwork, info); } else if(is_supported_complex_double::value) { typedef double T; typedef typename std::complex cx_T; arma_fortran(arma_zggev)(jobvl, jobvr, n, (cx_T*)a, lda, (cx_T*)b, ldb, (cx_T*)alpha, (cx_T*)beta, (cx_T*)vl, ldvl, (cx_T*)vr, ldvr, (cx_T*)work, lwork, (T*)rwork, info); } } template inline void potrf(char* uplo, blas_int* n, eT* a, blas_int* lda, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_spotrf)(uplo, n, (T*)a, lda, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dpotrf)(uplo, n, (T*)a, lda, info); } else if(is_supported_complex_float::value) { typedef std::complex T; arma_fortran(arma_cpotrf)(uplo, n, (T*)a, lda, info); } else if(is_supported_complex_double::value) { typedef std::complex T; arma_fortran(arma_zpotrf)(uplo, n, (T*)a, lda, info); } } template inline void potri(char* uplo, blas_int* n, eT* a, blas_int* lda, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_spotri)(uplo, n, (T*)a, lda, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dpotri)(uplo, n, (T*)a, lda, info); } else if(is_supported_complex_float::value) { typedef std::complex T; arma_fortran(arma_cpotri)(uplo, n, (T*)a, lda, info); } else if(is_supported_complex_double::value) { typedef std::complex T; arma_fortran(arma_zpotri)(uplo, n, (T*)a, lda, info); } } template inline void geqrf(blas_int* m, blas_int* n, eT* a, blas_int* lda, eT* tau, eT* work, blas_int* lwork, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_sgeqrf)(m, n, (T*)a, lda, (T*)tau, (T*)work, lwork, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dgeqrf)(m, n, (T*)a, lda, (T*)tau, (T*)work, lwork, info); } else if(is_supported_complex_float::value) { typedef std::complex T; arma_fortran(arma_cgeqrf)(m, n, (T*)a, lda, (T*)tau, (T*)work, lwork, info); } else if(is_supported_complex_double::value) { typedef std::complex T; arma_fortran(arma_zgeqrf)(m, n, (T*)a, lda, (T*)tau, (T*)work, lwork, info); } } template inline void orgqr(blas_int* m, blas_int* n, blas_int* k, eT* a, blas_int* lda, eT* tau, eT* work, blas_int* lwork, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_sorgqr)(m, n, k, (T*)a, lda, (T*)tau, (T*)work, lwork, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dorgqr)(m, n, k, (T*)a, lda, (T*)tau, (T*)work, lwork, info); } } template inline void ungqr(blas_int* m, blas_int* n, blas_int* k, eT* a, blas_int* lda, eT* tau, eT* work, blas_int* lwork, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_supported_complex_float::value) { typedef float T; arma_fortran(arma_cungqr)(m, n, k, (T*)a, lda, (T*)tau, (T*)work, lwork, info); } else if(is_supported_complex_double::value) { typedef double T; arma_fortran(arma_zungqr)(m, n, k, (T*)a, lda, (T*)tau, (T*)work, lwork, info); } } template inline void gesvd ( char* jobu, char* jobvt, blas_int* m, blas_int* n, eT* a, blas_int* lda, eT* s, eT* u, blas_int* ldu, eT* vt, blas_int* ldvt, eT* work, blas_int* lwork, blas_int* info ) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_sgesvd)(jobu, jobvt, m, n, (T*)a, lda, (T*)s, (T*)u, ldu, (T*)vt, ldvt, (T*)work, lwork, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dgesvd)(jobu, jobvt, m, n, (T*)a, lda, (T*)s, (T*)u, ldu, (T*)vt, ldvt, (T*)work, lwork, info); } } template inline void cx_gesvd ( char* jobu, char* jobvt, blas_int* m, blas_int* n, std::complex* a, blas_int* lda, T* s, std::complex* u, blas_int* ldu, std::complex* vt, blas_int* ldvt, std::complex* work, blas_int* lwork, T* rwork, blas_int* info ) { arma_type_check(( is_supported_blas_type::value == false )); arma_type_check(( is_supported_blas_type< std::complex >::value == false )); if(is_float::value) { typedef float bT; arma_fortran(arma_cgesvd) ( jobu, jobvt, m, n, (std::complex*)a, lda, (bT*)s, (std::complex*)u, ldu, (std::complex*)vt, ldvt, (std::complex*)work, lwork, (bT*)rwork, info ); } else if(is_double::value) { typedef double bT; arma_fortran(arma_zgesvd) ( jobu, jobvt, m, n, (std::complex*)a, lda, (bT*)s, (std::complex*)u, ldu, (std::complex*)vt, ldvt, (std::complex*)work, lwork, (bT*)rwork, info ); } } template inline void gesdd ( char* jobz, blas_int* m, blas_int* n, eT* a, blas_int* lda, eT* s, eT* u, blas_int* ldu, eT* vt, blas_int* ldvt, eT* work, blas_int* lwork, blas_int* iwork, blas_int* info ) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_sgesdd)(jobz, m, n, (T*)a, lda, (T*)s, (T*)u, ldu, (T*)vt, ldvt, (T*)work, lwork, iwork, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dgesdd)(jobz, m, n, (T*)a, lda, (T*)s, (T*)u, ldu, (T*)vt, ldvt, (T*)work, lwork, iwork, info); } } template inline void cx_gesdd ( char* jobz, blas_int* m, blas_int* n, std::complex* a, blas_int* lda, T* s, std::complex* u, blas_int* ldu, std::complex* vt, blas_int* ldvt, std::complex* work, blas_int* lwork, T* rwork, blas_int* iwork, blas_int* info ) { arma_type_check(( is_supported_blas_type::value == false )); arma_type_check(( is_supported_blas_type< std::complex >::value == false )); if(is_float::value) { typedef float bT; arma_fortran(arma_cgesdd) ( jobz, m, n, (std::complex*)a, lda, (bT*)s, (std::complex*)u, ldu, (std::complex*)vt, ldvt, (std::complex*)work, lwork, (bT*)rwork, iwork, info ); } else if(is_double::value) { typedef double bT; arma_fortran(arma_zgesdd) ( jobz, m, n, (std::complex*)a, lda, (bT*)s, (std::complex*)u, ldu, (std::complex*)vt, ldvt, (std::complex*)work, lwork, (bT*)rwork, iwork, info ); } } template inline void gesv(blas_int* n, blas_int* nrhs, eT* a, blas_int* lda, blas_int* ipiv, eT* b, blas_int* ldb, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_sgesv)(n, nrhs, (T*)a, lda, ipiv, (T*)b, ldb, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dgesv)(n, nrhs, (T*)a, lda, ipiv, (T*)b, ldb, info); } else if(is_supported_complex_float::value) { typedef std::complex T; arma_fortran(arma_cgesv)(n, nrhs, (T*)a, lda, ipiv, (T*)b, ldb, info); } else if(is_supported_complex_double::value) { typedef std::complex T; arma_fortran(arma_zgesv)(n, nrhs, (T*)a, lda, ipiv, (T*)b, ldb, info); } } template inline void gels(char* trans, blas_int* m, blas_int* n, blas_int* nrhs, eT* a, blas_int* lda, eT* b, blas_int* ldb, eT* work, blas_int* lwork, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_sgels)(trans, m, n, nrhs, (T*)a, lda, (T*)b, ldb, (T*)work, lwork, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dgels)(trans, m, n, nrhs, (T*)a, lda, (T*)b, ldb, (T*)work, lwork, info); } else if(is_supported_complex_float::value) { typedef std::complex T; arma_fortran(arma_cgels)(trans, m, n, nrhs, (T*)a, lda, (T*)b, ldb, (T*)work, lwork, info); } else if(is_supported_complex_double::value) { typedef std::complex T; arma_fortran(arma_zgels)(trans, m, n, nrhs, (T*)a, lda, (T*)b, ldb, (T*)work, lwork, info); } } template inline void trtrs(char* uplo, char* trans, char* diag, blas_int* n, blas_int* nrhs, const eT* a, blas_int* lda, eT* b, blas_int* ldb, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_strtrs)(uplo, trans, diag, n, nrhs, (T*)a, lda, (T*)b, ldb, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dtrtrs)(uplo, trans, diag, n, nrhs, (T*)a, lda, (T*)b, ldb, info); } else if(is_supported_complex_float::value) { typedef std::complex T; arma_fortran(arma_ctrtrs)(uplo, trans, diag, n, nrhs, (T*)a, lda, (T*)b, ldb, info); } else if(is_supported_complex_double::value) { typedef std::complex T; arma_fortran(arma_ztrtrs)(uplo, trans, diag, n, nrhs, (T*)a, lda, (T*)b, ldb, info); } } template inline void gees(char* jobvs, char* sort, blas_int* select, blas_int* n, eT* a, blas_int* lda, blas_int* sdim, eT* wr, eT* wi, eT* vs, blas_int* ldvs, eT* work, blas_int* lwork, blas_int* bwork, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_sgees)(jobvs, sort, select, n, (T*)a, lda, sdim, (T*)wr, (T*)wi, (T*)vs, ldvs, (T*)work, lwork, bwork, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dgees)(jobvs, sort, select, n, (T*)a, lda, sdim, (T*)wr, (T*)wi, (T*)vs, ldvs, (T*)work, lwork, bwork, info); } } template inline void cx_gees(char* jobvs, char* sort, blas_int* select, blas_int* n, std::complex* a, blas_int* lda, blas_int* sdim, std::complex* w, std::complex* vs, blas_int* ldvs, std::complex* work, blas_int* lwork, T* rwork, blas_int* bwork, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); arma_type_check(( is_supported_blas_type< std::complex >::value == false )); if(is_float::value) { typedef float bT; typedef std::complex cT; arma_fortran(arma_cgees)(jobvs, sort, select, n, (cT*)a, lda, sdim, (cT*)w, (cT*)vs, ldvs, (cT*)work, lwork, (bT*)rwork, bwork, info); } else if(is_double::value) { typedef double bT; typedef std::complex cT; arma_fortran(arma_zgees)(jobvs, sort, select, n, (cT*)a, lda, sdim, (cT*)w, (cT*)vs, ldvs, (cT*)work, lwork, (bT*)rwork, bwork, info); } } template inline void trsyl(char* transa, char* transb, blas_int* isgn, blas_int* m, blas_int* n, const eT* a, blas_int* lda, const eT* b, blas_int* ldb, eT* c, blas_int* ldc, eT* scale, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_strsyl)(transa, transb, isgn, m, n, (T*)a, lda, (T*)b, ldb, (T*)c, ldc, (T*)scale, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dtrsyl)(transa, transb, isgn, m, n, (T*)a, lda, (T*)b, ldb, (T*)c, ldc, (T*)scale, info); } else if(is_supported_complex_float::value) { typedef std::complex T; arma_fortran(arma_ctrsyl)(transa, transb, isgn, m, n, (T*)a, lda, (T*)b, ldb, (T*)c, ldc, (float*)scale, info); } else if(is_supported_complex_double::value) { typedef std::complex T; arma_fortran(arma_ztrsyl)(transa, transb, isgn, m, n, (T*)a, lda, (T*)b, ldb, (T*)c, ldc, (double*)scale, info); } } template inline void sytrf(char* uplo, blas_int* n, eT* a, blas_int* lda, blas_int* ipiv, eT* work, blas_int* lwork, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_ssytrf)(uplo, n, (T*)a, lda, ipiv, (T*)work, lwork, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dsytrf)(uplo, n, (T*)a, lda, ipiv, (T*)work, lwork, info); } else if(is_supported_complex_float::value) { typedef std::complex T; arma_fortran(arma_csytrf)(uplo, n, (T*)a, lda, ipiv, (T*)work, lwork, info); } else if(is_supported_complex_double::value) { typedef std::complex T; arma_fortran(arma_zsytrf)(uplo, n, (T*)a, lda, ipiv, (T*)work, lwork, info); } } template inline void sytri(char* uplo, blas_int* n, eT* a, blas_int* lda, blas_int* ipiv, eT* work, blas_int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_ssytri)(uplo, n, (T*)a, lda, ipiv, (T*)work, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dsytri)(uplo, n, (T*)a, lda, ipiv, (T*)work, info); } else if(is_supported_complex_float::value) { typedef std::complex T; arma_fortran(arma_csytri)(uplo, n, (T*)a, lda, ipiv, (T*)work, info); } else if(is_supported_complex_double::value) { typedef std::complex T; arma_fortran(arma_zsytri)(uplo, n, (T*)a, lda, ipiv, (T*)work, info); } } template inline void gges ( char* jobvsl, char* jobvsr, char* sort, char* selctg, blas_int* n, eT* a, blas_int* lda, eT* b, blas_int* ldb, blas_int* sdim, eT* alphar, eT* alphai, eT* beta, eT* vsl, blas_int* ldvsl, eT* vsr, blas_int* ldvsr, eT* work, blas_int* lwork, eT* bwork, blas_int* info ) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { typedef float T; arma_fortran(arma_sgges)(jobvsl, jobvsr, sort, selctg, n, (T*)a, lda, (T*)b, ldb, sdim, (T*)alphar, (T*)alphai, (T*)beta, (T*)vsl, ldvsl, (T*)vsr, ldvsr, (T*)work, lwork, (T*)bwork, info); } else if(is_double::value) { typedef double T; arma_fortran(arma_dgges)(jobvsl, jobvsr, sort, selctg, n, (T*)a, lda, (T*)b, ldb, sdim, (T*)alphar, (T*)alphai, (T*)beta, (T*)vsl, ldvsl, (T*)vsr, ldvsr, (T*)work, lwork, (T*)bwork, info); } } template inline void cx_gges ( char* jobvsl, char* jobvsr, char* sort, char* selctg, blas_int* n, eT* a, blas_int* lda, eT* b, blas_int* ldb, blas_int* sdim, eT* alpha, eT* beta, eT* vsl, blas_int* ldvsl, eT* vsr, blas_int* ldvsr, eT* work, blas_int* lwork, typename eT::value_type* rwork, typename eT::value_type* bwork, blas_int* info ) { arma_type_check(( is_supported_blas_type::value == false )); if(is_supported_complex_float::value) { typedef float T; typedef typename std::complex cx_T; arma_fortran(arma_cgges)(jobvsl, jobvsr, sort, selctg, n, (cx_T*)a, lda, (cx_T*)b, ldb, sdim, (cx_T*)alpha, (cx_T*)beta, (cx_T*)vsl, ldvsl, (cx_T*)vsr, ldvsr, (cx_T*)work, lwork, (T*)rwork, (T*)bwork, info); } else if(is_supported_complex_double::value) { typedef double T; typedef typename std::complex cx_T; arma_fortran(arma_zgges)(jobvsl, jobvsr, sort, selctg, n, (cx_T*)a, lda, (cx_T*)b, ldb, sdim, (cx_T*)alpha, (cx_T*)beta, (cx_T*)vsl, ldvsl, (cx_T*)vsr, ldvsr, (cx_T*)work, lwork, (T*)rwork, (T*)bwork, info); } } } #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/memory.hpp ================================================ // Copyright (C) 2012-2014 Conrad Sanderson // Copyright (C) 2012-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup memory //! @{ class memory { public: arma_inline static uword enlarge_to_mult_of_chunksize(const uword n_elem); template inline arma_malloc static eT* acquire(const uword n_elem); template inline arma_malloc static eT* acquire_chunked(const uword n_elem); template arma_inline static void release(eT* mem); template arma_inline static bool is_aligned(const eT* mem); template arma_inline static void mark_as_aligned( eT*& mem); template arma_inline static void mark_as_aligned(const eT*& mem); }; arma_inline uword memory::enlarge_to_mult_of_chunksize(const uword n_elem) { const uword chunksize = arma_config::spmat_chunksize; // this relies on integer division const uword n_elem_mod = (n_elem > 0) ? (((n_elem-1) / chunksize) + 1) * chunksize : uword(0); return n_elem_mod; } template inline arma_malloc eT* memory::acquire(const uword n_elem) { arma_debug_check ( ( size_t(n_elem) > (std::numeric_limits::max() / sizeof(eT)) ), "arma::memory::acquire(): requested size is too large" ); eT* out_memptr; #if defined(ARMA_USE_TBB_ALLOC) { out_memptr = (eT *) scalable_malloc(sizeof(eT)*n_elem); } #elif defined(ARMA_USE_MKL_ALLOC) { out_memptr = (eT *) mkl_malloc( sizeof(eT)*n_elem, 128 ); } #elif defined(ARMA_HAVE_POSIX_MEMALIGN) { eT* memptr; const size_t alignment = 16; // change the 16 to 64 if you wish to align to the cache line int status = posix_memalign((void **)&memptr, ( (alignment >= sizeof(void*)) ? alignment : sizeof(void*) ), sizeof(eT)*n_elem); out_memptr = (status == 0) ? memptr : NULL; } #elif defined(_MSC_VER) { out_memptr = (eT *) _aligned_malloc( sizeof(eT)*n_elem, 16 ); // lives in malloc.h } #else { //return ( new(std::nothrow) eT[n_elem] ); out_memptr = (eT *) malloc(sizeof(eT)*n_elem); } #endif // TODO: for mingw, use __mingw_aligned_malloc if(n_elem > 0) { arma_check_bad_alloc( (out_memptr == NULL), "arma::memory::acquire(): out of memory" ); } return out_memptr; } //! get memory in multiples of chunks, holding at least n_elem template inline arma_malloc eT* memory::acquire_chunked(const uword n_elem) { const uword n_elem_mod = memory::enlarge_to_mult_of_chunksize(n_elem); return memory::acquire(n_elem_mod); } template arma_inline void memory::release(eT* mem) { #if defined(ARMA_USE_TBB_ALLOC) { scalable_free( (void *)(mem) ); } #elif defined(ARMA_USE_MKL_ALLOC) { mkl_free( (void *)(mem) ); } #elif defined(ARMA_HAVE_POSIX_MEMALIGN) { free( (void *)(mem) ); } #elif defined(_MSC_VER) { _aligned_free( (void *)(mem) ); } #else { //delete [] mem; free( (void *)(mem) ); } #endif // TODO: for mingw, use __mingw_aligned_free } template arma_inline bool memory::is_aligned(const eT* mem) { #if (defined(ARMA_HAVE_ICC_ASSUME_ALIGNED) || defined(ARMA_HAVE_GCC_ASSUME_ALIGNED)) && !defined(ARMA_DONT_CHECK_ALIGNMENT) { return (sizeof(std::size_t) >= sizeof(eT*)) ? ((std::size_t(mem) & 0x0F) == 0) : false; } #else { arma_ignore(mem); return false; } #endif } template arma_inline void memory::mark_as_aligned(eT*& mem) { #if defined(ARMA_HAVE_ICC_ASSUME_ALIGNED) { __assume_aligned(mem, 16); } #elif defined(ARMA_HAVE_GCC_ASSUME_ALIGNED) { mem = (eT*)__builtin_assume_aligned(mem, 16); } #else { arma_ignore(mem); } #endif // TODO: MSVC? __assume( (mem & 0x0F) == 0 ); // // http://comments.gmane.org/gmane.comp.gcc.patches/239430 // GCC __builtin_assume_aligned is similar to ICC's __assume_aligned, // so for lvalue first argument ICC's __assume_aligned can be emulated using // #define __assume_aligned(lvalueptr, align) lvalueptr = __builtin_assume_aligned (lvalueptr, align) // // http://www.inf.ethz.ch/personal/markusp/teaching/263-2300-ETH-spring11/slides/class19.pdf // http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/cpp/lin/index.htm // http://d3f8ykwhia686p.cloudfront.net/1live/intel/CompilerAutovectorizationGuide.pdf } template arma_inline void memory::mark_as_aligned(const eT*& mem) { #if defined(ARMA_HAVE_ICC_ASSUME_ALIGNED) { __assume_aligned(mem, 16); } #elif defined(ARMA_HAVE_GCC_ASSUME_ALIGNED) { mem = (const eT*)__builtin_assume_aligned(mem, 16); } #else { arma_ignore(mem); } #endif } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/mtGlueCube_bones.hpp ================================================ // Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup mtGlueCube //! @{ template class mtGlueCube : public BaseCube > { public: typedef out_eT elem_type; typedef typename get_pod_type::result pod_type; arma_inline mtGlueCube(const T1& in_A, const T2& in_B); arma_inline mtGlueCube(const T1& in_A, const T2& in_B, const uword in_aux_uword); arma_inline ~mtGlueCube(); arma_aligned const T1& A; //!< first operand arma_aligned const T2& B; //!< second operand arma_aligned uword aux_uword; //!< storage of auxiliary data, uword format }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/mtGlueCube_meat.hpp ================================================ // Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup mtGlueCube //! @{ template inline mtGlueCube::mtGlueCube(const T1& in_A, const T2& in_B) : A(in_A) , B(in_B) { arma_extra_debug_sigprint(); } template inline mtGlueCube::mtGlueCube(const T1& in_A, const T2& in_B, const uword in_aux_uword) : A(in_A) , B(in_B) , aux_uword(in_aux_uword) { arma_extra_debug_sigprint(); } template inline mtGlueCube::~mtGlueCube() { arma_extra_debug_sigprint(); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/mtGlue_bones.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup mtGlue //! @{ template class mtGlue : public Base > { public: typedef out_eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = ( is_glue_mixed_elem::value && (T1::is_row || T2::is_row) ) || ( is_glue_mixed_times::value && T1::is_row ); static const bool is_col = ( is_glue_mixed_elem::value && (T1::is_col || T2::is_col) ) || ( is_glue_mixed_times::value && T2::is_col ); arma_inline mtGlue(const T1& in_A, const T2& in_B); arma_inline mtGlue(const T1& in_A, const T2& in_B, const uword in_aux_uword); arma_inline ~mtGlue(); arma_aligned const T1& A; //!< first operand arma_aligned const T2& B; //!< second operand arma_aligned uword aux_uword; //!< storage of auxiliary data, uword format }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/mtGlue_meat.hpp ================================================ // Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup mtGlue //! @{ template inline mtGlue::mtGlue(const T1& in_A, const T2& in_B) : A(in_A) , B(in_B) { arma_extra_debug_sigprint(); } template inline mtGlue::mtGlue(const T1& in_A, const T2& in_B, const uword in_aux_uword) : A(in_A) , B(in_B) , aux_uword(in_aux_uword) { arma_extra_debug_sigprint(); } template inline mtGlue::~mtGlue() { arma_extra_debug_sigprint(); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/mtOpCube_bones.hpp ================================================ // Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup mtOpCube //! @{ template class mtOpCube : public BaseCube > { public: typedef out_eT elem_type; typedef typename get_pod_type::result pod_type; typedef typename T1::elem_type in_eT; inline explicit mtOpCube(const T1& in_m); inline mtOpCube(const T1& in_m, const in_eT in_aux); inline mtOpCube(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c); inline mtOpCube(const T1& in_m, const in_eT in_aux, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c); inline mtOpCube(const char junk, const T1& in_m, const out_eT in_aux); inline ~mtOpCube(); arma_aligned const T1& m; //!< storage of reference to the operand (eg. a matrix) arma_aligned in_eT aux; //!< storage of auxiliary data, using the element type as used by T1 arma_aligned out_eT aux_out_eT; //!< storage of auxiliary data, using the element type as specified by the out_eT template parameter arma_aligned uword aux_uword_a; //!< storage of auxiliary data, uword format arma_aligned uword aux_uword_b; //!< storage of auxiliary data, uword format arma_aligned uword aux_uword_c; //!< storage of auxiliary data, uword format }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/mtOpCube_meat.hpp ================================================ // Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup mtOpCube //! @{ template inline mtOpCube::mtOpCube(const T1& in_m) : m(in_m) { arma_extra_debug_sigprint(); } template inline mtOpCube::mtOpCube(const T1& in_m, const typename T1::elem_type in_aux) : m(in_m) , aux(in_aux) { arma_extra_debug_sigprint(); } template inline mtOpCube::mtOpCube(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c) : m(in_m) , aux_uword_a(in_aux_uword_a) , aux_uword_b(in_aux_uword_b) , aux_uword_c(in_aux_uword_c) { arma_extra_debug_sigprint(); } template inline mtOpCube::mtOpCube(const T1& in_m, const typename T1::elem_type in_aux, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c) : m(in_m) , aux(in_aux) , aux_uword_a(in_aux_uword_a) , aux_uword_b(in_aux_uword_b) , aux_uword_c(in_aux_uword_c) { arma_extra_debug_sigprint(); } template inline mtOpCube::mtOpCube(const char junk, const T1& in_m, const out_eT in_aux) : m(in_m) , aux_out_eT(in_aux) { arma_extra_debug_sigprint(); arma_ignore(junk); } template inline mtOpCube::~mtOpCube() { arma_extra_debug_sigprint(); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/mtOp_bones.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup mtOp //! @{ struct mtOp_dual_aux_indicator {}; template class mtOp : public Base > { public: typedef out_eT elem_type; typedef typename get_pod_type::result pod_type; typedef typename T1::elem_type in_eT; static const bool is_row = \ (T1::is_row && (is_op_mixed_elem::value || is_same_type::value || is_same_type::value || is_same_type::value || is_same_type::value)); static const bool is_col = \ (T1::is_col && (is_op_mixed_elem::value || is_same_type::value || is_same_type::value || is_same_type::value || is_same_type::value)) || (is_same_type::value) || (is_same_type::value) || (is_same_type::value) || (is_same_type::value); inline explicit mtOp(const T1& in_m); inline mtOp(const T1& in_m, const in_eT in_aux); inline mtOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b); inline mtOp(const T1& in_m, const in_eT in_aux, const uword in_aux_uword_a, const uword in_aux_uword_b); inline mtOp(const char junk, const T1& in_m, const out_eT in_aux); inline mtOp(const mtOp_dual_aux_indicator&, const T1& in_m, const in_eT in_aux_a, const out_eT in_aux_b); inline ~mtOp(); arma_aligned const T1& m; //!< storage of reference to the operand (eg. a matrix) arma_aligned in_eT aux; //!< storage of auxiliary data, using the element type as used by T1 arma_aligned out_eT aux_out_eT; //!< storage of auxiliary data, using the element type as specified by the out_eT template parameter arma_aligned uword aux_uword_a; //!< storage of auxiliary data, uword format arma_aligned uword aux_uword_b; //!< storage of auxiliary data, uword format }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/mtOp_meat.hpp ================================================ // Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup mtOp //! @{ template inline mtOp::mtOp(const T1& in_m) : m(in_m) { arma_extra_debug_sigprint(); } template inline mtOp::mtOp(const T1& in_m, const typename T1::elem_type in_aux) : m(in_m) , aux(in_aux) { arma_extra_debug_sigprint(); } template inline mtOp::mtOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b) : m(in_m) , aux_uword_a(in_aux_uword_a) , aux_uword_b(in_aux_uword_b) { arma_extra_debug_sigprint(); } template inline mtOp::mtOp(const T1& in_m, const typename T1::elem_type in_aux, const uword in_aux_uword_a, const uword in_aux_uword_b) : m(in_m) , aux(in_aux) , aux_uword_a(in_aux_uword_a) , aux_uword_b(in_aux_uword_b) { arma_extra_debug_sigprint(); } template inline mtOp::mtOp(const char junk, const T1& in_m, const out_eT in_aux) : m(in_m) , aux_out_eT(in_aux) { arma_ignore(junk); arma_extra_debug_sigprint(); } template inline mtOp::mtOp(const mtOp_dual_aux_indicator&, const T1& in_m, const typename T1::elem_type in_aux_a, const out_eT in_aux_b) : m (in_m ) , aux (in_aux_a) , aux_out_eT(in_aux_b) { arma_extra_debug_sigprint(); } template inline mtOp::~mtOp() { arma_extra_debug_sigprint(); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/mtSpOp_bones.hpp ================================================ // Copyright (C) 2012 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup mtSpOp //! @{ // Class for delayed multi-type sparse operations. These are operations where // the resulting type is different than the stored type. template class mtSpOp : public SpBase > { public: typedef out_eT elem_type; typedef typename get_pod_type::result pod_type; typedef typename T1::elem_type in_eT; static const bool is_row = false; static const bool is_col = false; inline explicit mtSpOp(const T1& in_m); inline mtSpOp(const T1& in_m, const uword aux_uword_a, const uword aux_uword_b); inline ~mtSpOp(); arma_aligned const T1& m; arma_aligned uword aux_uword_a; arma_aligned uword aux_uword_b; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/mtSpOp_meat.hpp ================================================ // Copyright (C) 2012 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup mtSpOp //! @{ template inline mtSpOp::mtSpOp(const T1& in_m) : m(in_m) { arma_extra_debug_sigprint(); } template inline mtSpOp::mtSpOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b) : m(in_m) , aux_uword_a(in_aux_uword_a) , aux_uword_b(in_aux_uword_b) { arma_extra_debug_sigprint(); } template inline mtSpOp::~mtSpOp() { arma_extra_debug_sigprint(); } ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/mul_gemm.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup gemm //! @{ //! for tiny square matrices, size <= 4x4 template class gemm_emul_tinysq { public: template arma_hot inline static void apply ( Mat& C, const TA& A, const TB& B, const eT alpha = eT(1), const eT beta = eT(0) ) { arma_extra_debug_sigprint(); switch(A.n_rows) { case 4: gemv_emul_tinysq::apply( C.colptr(3), A, B.colptr(3), alpha, beta ); case 3: gemv_emul_tinysq::apply( C.colptr(2), A, B.colptr(2), alpha, beta ); case 2: gemv_emul_tinysq::apply( C.colptr(1), A, B.colptr(1), alpha, beta ); case 1: gemv_emul_tinysq::apply( C.colptr(0), A, B.colptr(0), alpha, beta ); default: ; } } }; //! emulation of gemm(), for non-complex matrices only, as it assumes only simple transposes (ie. doesn't do hermitian transposes) template class gemm_emul_large { public: template arma_hot inline static void apply ( Mat& C, const TA& A, const TB& B, const eT alpha = eT(1), const eT beta = eT(0) ) { arma_extra_debug_sigprint(); const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; if( (do_trans_A == false) && (do_trans_B == false) ) { arma_aligned podarray tmp(A_n_cols); eT* A_rowdata = tmp.memptr(); for(uword row_A=0; row_A < A_n_rows; ++row_A) { tmp.copy_row(A, row_A); for(uword col_B=0; col_B < B_n_cols; ++col_B) { const eT acc = op_dot::direct_dot_arma(B_n_rows, A_rowdata, B.colptr(col_B)); if( (use_alpha == false) && (use_beta == false) ) { C.at(row_A,col_B) = acc; } else if( (use_alpha == true ) && (use_beta == false) ) { C.at(row_A,col_B) = alpha*acc; } else if( (use_alpha == false) && (use_beta == true ) ) { C.at(row_A,col_B) = acc + beta*C.at(row_A,col_B); } else if( (use_alpha == true ) && (use_beta == true ) ) { C.at(row_A,col_B) = alpha*acc + beta*C.at(row_A,col_B); } } } } else if( (do_trans_A == true) && (do_trans_B == false) ) { for(uword col_A=0; col_A < A_n_cols; ++col_A) { // col_A is interpreted as row_A when storing the results in matrix C const eT* A_coldata = A.colptr(col_A); for(uword col_B=0; col_B < B_n_cols; ++col_B) { const eT acc = op_dot::direct_dot_arma(B_n_rows, A_coldata, B.colptr(col_B)); if( (use_alpha == false) && (use_beta == false) ) { C.at(col_A,col_B) = acc; } else if( (use_alpha == true ) && (use_beta == false) ) { C.at(col_A,col_B) = alpha*acc; } else if( (use_alpha == false) && (use_beta == true ) ) { C.at(col_A,col_B) = acc + beta*C.at(col_A,col_B); } else if( (use_alpha == true ) && (use_beta == true ) ) { C.at(col_A,col_B) = alpha*acc + beta*C.at(col_A,col_B); } } } } else if( (do_trans_A == false) && (do_trans_B == true) ) { Mat BB; op_strans::apply_mat_noalias(BB, B); gemm_emul_large::apply(C, A, BB, alpha, beta); } else if( (do_trans_A == true) && (do_trans_B == true) ) { // mat B_tmp = trans(B); // dgemm_arma::apply(C, A, B_tmp, alpha, beta); // By using the trans(A)*trans(B) = trans(B*A) equivalency, // transpose operations are not needed arma_aligned podarray tmp(B.n_cols); eT* B_rowdata = tmp.memptr(); for(uword row_B=0; row_B < B_n_rows; ++row_B) { tmp.copy_row(B, row_B); for(uword col_A=0; col_A < A_n_cols; ++col_A) { const eT acc = op_dot::direct_dot_arma(A_n_rows, B_rowdata, A.colptr(col_A)); if( (use_alpha == false) && (use_beta == false) ) { C.at(col_A,row_B) = acc; } else if( (use_alpha == true ) && (use_beta == false) ) { C.at(col_A,row_B) = alpha*acc; } else if( (use_alpha == false) && (use_beta == true ) ) { C.at(col_A,row_B) = acc + beta*C.at(col_A,row_B); } else if( (use_alpha == true ) && (use_beta == true ) ) { C.at(col_A,row_B) = alpha*acc + beta*C.at(col_A,row_B); } } } } } }; template class gemm_emul { public: template arma_hot inline static void apply ( Mat& C, const TA& A, const TB& B, const eT alpha = eT(1), const eT beta = eT(0), const typename arma_not_cx::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); gemm_emul_large::apply(C, A, B, alpha, beta); } template arma_hot inline static void apply ( Mat& C, const Mat& A, const Mat& B, const eT alpha = eT(1), const eT beta = eT(0), const typename arma_cx_only::result* junk = 0 ) { arma_extra_debug_sigprint(); arma_ignore(junk); // "better than nothing" handling of hermitian transposes for complex number matrices Mat tmp_A; Mat tmp_B; if(do_trans_A) { op_htrans::apply_mat_noalias(tmp_A, A); } if(do_trans_B) { op_htrans::apply_mat_noalias(tmp_B, B); } const Mat& AA = (do_trans_A == false) ? A : tmp_A; const Mat& BB = (do_trans_B == false) ? B : tmp_B; gemm_emul_large::apply(C, AA, BB, alpha, beta); } }; //! \brief //! Wrapper for ATLAS/BLAS dgemm function, using template arguments to control the arguments passed to dgemm. //! Matrix 'C' is assumed to have been set to the correct size (i.e. taking into account transposes) template class gemm { public: template inline static void apply_blas_type( Mat& C, const TA& A, const TB& B, const eT alpha = eT(1), const eT beta = eT(0) ) { arma_extra_debug_sigprint(); if( (A.n_rows <= 4) && (A.n_rows == A.n_cols) && (A.n_rows == B.n_rows) && (B.n_rows == B.n_cols) && (is_cx::no) ) { if(do_trans_B == false) { gemm_emul_tinysq::apply(C, A, B, alpha, beta); } else { Mat BB(B.n_rows, B.n_rows); op_strans::apply_mat_noalias_tinysq(BB, B); gemm_emul_tinysq::apply(C, A, BB, alpha, beta); } } else { #if defined(ARMA_USE_ATLAS) { arma_extra_debug_print("atlas::cblas_gemm()"); arma_debug_assert_atlas_size(A,B); atlas::cblas_gemm ( atlas::CblasColMajor, (do_trans_A) ? ( is_cx::yes ? CblasConjTrans : atlas::CblasTrans ) : atlas::CblasNoTrans, (do_trans_B) ? ( is_cx::yes ? CblasConjTrans : atlas::CblasTrans ) : atlas::CblasNoTrans, C.n_rows, C.n_cols, (do_trans_A) ? A.n_rows : A.n_cols, (use_alpha) ? alpha : eT(1), A.mem, (do_trans_A) ? A.n_rows : C.n_rows, B.mem, (do_trans_B) ? C.n_cols : ( (do_trans_A) ? A.n_rows : A.n_cols ), (use_beta) ? beta : eT(0), C.memptr(), C.n_rows ); } #elif defined(ARMA_USE_BLAS) { arma_extra_debug_print("blas::gemm()"); arma_debug_assert_blas_size(A,B); const char trans_A = (do_trans_A) ? ( is_cx::yes ? 'C' : 'T' ) : 'N'; const char trans_B = (do_trans_B) ? ( is_cx::yes ? 'C' : 'T' ) : 'N'; const blas_int m = C.n_rows; const blas_int n = C.n_cols; const blas_int k = (do_trans_A) ? A.n_rows : A.n_cols; const eT local_alpha = (use_alpha) ? alpha : eT(1); const blas_int lda = (do_trans_A) ? k : m; const blas_int ldb = (do_trans_B) ? n : k; const eT local_beta = (use_beta) ? beta : eT(0); arma_extra_debug_print( arma_boost::format("blas::gemm(): trans_A = %c") % trans_A ); arma_extra_debug_print( arma_boost::format("blas::gemm(): trans_B = %c") % trans_B ); blas::gemm ( &trans_A, &trans_B, &m, &n, &k, &local_alpha, A.mem, &lda, B.mem, &ldb, &local_beta, C.memptr(), &m ); } #else { gemm_emul::apply(C,A,B,alpha,beta); } #endif } } //! immediate multiplication of matrices A and B, storing the result in C template inline static void apply( Mat& C, const TA& A, const TB& B, const eT alpha = eT(1), const eT beta = eT(0) ) { gemm_emul::apply(C,A,B,alpha,beta); } template arma_inline static void apply ( Mat& C, const TA& A, const TB& B, const float alpha = float(1), const float beta = float(0) ) { gemm::apply_blas_type(C,A,B,alpha,beta); } template arma_inline static void apply ( Mat& C, const TA& A, const TB& B, const double alpha = double(1), const double beta = double(0) ) { gemm::apply_blas_type(C,A,B,alpha,beta); } template arma_inline static void apply ( Mat< std::complex >& C, const TA& A, const TB& B, const std::complex alpha = std::complex(1), const std::complex beta = std::complex(0) ) { gemm::apply_blas_type(C,A,B,alpha,beta); } template arma_inline static void apply ( Mat< std::complex >& C, const TA& A, const TB& B, const std::complex alpha = std::complex(1), const std::complex beta = std::complex(0) ) { gemm::apply_blas_type(C,A,B,alpha,beta); } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/mul_gemm_mixed.hpp ================================================ // Copyright (C) 2008-2011 Conrad Sanderson // Copyright (C) 2008-2011 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup gemm_mixed //! @{ //! \brief //! Matrix multplication where the matrices have differing element types. //! Uses caching for speedup. //! Matrix 'C' is assumed to have been set to the correct size (i.e. taking into account transposes) template class gemm_mixed_large { public: template arma_hot inline static void apply ( Mat& C, const Mat& A, const Mat& B, const out_eT alpha = out_eT(1), const out_eT beta = out_eT(0) ) { arma_extra_debug_sigprint(); const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; if( (do_trans_A == false) && (do_trans_B == false) ) { podarray tmp(A_n_cols); in_eT1* A_rowdata = tmp.memptr(); for(uword row_A=0; row_A < A_n_rows; ++row_A) { tmp.copy_row(A, row_A); for(uword col_B=0; col_B < B_n_cols; ++col_B) { const in_eT2* B_coldata = B.colptr(col_B); out_eT acc = out_eT(0); for(uword i=0; i < B_n_rows; ++i) { acc += upgrade_val::apply(A_rowdata[i]) * upgrade_val::apply(B_coldata[i]); } if( (use_alpha == false) && (use_beta == false) ) { C.at(row_A,col_B) = acc; } else if( (use_alpha == true ) && (use_beta == false) ) { C.at(row_A,col_B) = alpha*acc; } else if( (use_alpha == false) && (use_beta == true ) ) { C.at(row_A,col_B) = acc + beta*C.at(row_A,col_B); } else if( (use_alpha == true ) && (use_beta == true ) ) { C.at(row_A,col_B) = alpha*acc + beta*C.at(row_A,col_B); } } } } else if( (do_trans_A == true) && (do_trans_B == false) ) { for(uword col_A=0; col_A < A_n_cols; ++col_A) { // col_A is interpreted as row_A when storing the results in matrix C const in_eT1* A_coldata = A.colptr(col_A); for(uword col_B=0; col_B < B_n_cols; ++col_B) { const in_eT2* B_coldata = B.colptr(col_B); out_eT acc = out_eT(0); for(uword i=0; i < B_n_rows; ++i) { acc += upgrade_val::apply(A_coldata[i]) * upgrade_val::apply(B_coldata[i]); } if( (use_alpha == false) && (use_beta == false) ) { C.at(col_A,col_B) = acc; } else if( (use_alpha == true ) && (use_beta == false) ) { C.at(col_A,col_B) = alpha*acc; } else if( (use_alpha == false) && (use_beta == true ) ) { C.at(col_A,col_B) = acc + beta*C.at(col_A,col_B); } else if( (use_alpha == true ) && (use_beta == true ) ) { C.at(col_A,col_B) = alpha*acc + beta*C.at(col_A,col_B); } } } } else if( (do_trans_A == false) && (do_trans_B == true) ) { Mat B_tmp; op_strans::apply_mat_noalias(B_tmp, B); gemm_mixed_large::apply(C, A, B_tmp, alpha, beta); } else if( (do_trans_A == true) && (do_trans_B == true) ) { // mat B_tmp = trans(B); // dgemm_arma::apply(C, A, B_tmp, alpha, beta); // By using the trans(A)*trans(B) = trans(B*A) equivalency, // transpose operations are not needed podarray tmp(B_n_cols); in_eT2* B_rowdata = tmp.memptr(); for(uword row_B=0; row_B < B_n_rows; ++row_B) { tmp.copy_row(B, row_B); for(uword col_A=0; col_A < A_n_cols; ++col_A) { const in_eT1* A_coldata = A.colptr(col_A); out_eT acc = out_eT(0); for(uword i=0; i < A_n_rows; ++i) { acc += upgrade_val::apply(B_rowdata[i]) * upgrade_val::apply(A_coldata[i]); } if( (use_alpha == false) && (use_beta == false) ) { C.at(col_A,row_B) = acc; } else if( (use_alpha == true ) && (use_beta == false) ) { C.at(col_A,row_B) = alpha*acc; } else if( (use_alpha == false) && (use_beta == true ) ) { C.at(col_A,row_B) = acc + beta*C.at(col_A,row_B); } else if( (use_alpha == true ) && (use_beta == true ) ) { C.at(col_A,row_B) = alpha*acc + beta*C.at(col_A,row_B); } } } } } }; //! Matrix multplication where the matrices have different element types. //! Simple version (no caching). //! Matrix 'C' is assumed to have been set to the correct size (i.e. taking into account transposes) template class gemm_mixed_small { public: template arma_hot inline static void apply ( Mat& C, const Mat& A, const Mat& B, const out_eT alpha = out_eT(1), const out_eT beta = out_eT(0) ) { arma_extra_debug_sigprint(); const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; if( (do_trans_A == false) && (do_trans_B == false) ) { for(uword row_A = 0; row_A < A_n_rows; ++row_A) { for(uword col_B = 0; col_B < B_n_cols; ++col_B) { const in_eT2* B_coldata = B.colptr(col_B); out_eT acc = out_eT(0); for(uword i = 0; i < B_n_rows; ++i) { const out_eT val1 = upgrade_val::apply(A.at(row_A,i)); const out_eT val2 = upgrade_val::apply(B_coldata[i]); acc += val1 * val2; //acc += upgrade_val::apply(A.at(row_A,i)) * upgrade_val::apply(B_coldata[i]); } if( (use_alpha == false) && (use_beta == false) ) { C.at(row_A,col_B) = acc; } else if( (use_alpha == true ) && (use_beta == false) ) { C.at(row_A,col_B) = alpha*acc; } else if( (use_alpha == false) && (use_beta == true ) ) { C.at(row_A,col_B) = acc + beta*C.at(row_A,col_B); } else if( (use_alpha == true ) && (use_beta == true ) ) { C.at(row_A,col_B) = alpha*acc + beta*C.at(row_A,col_B); } } } } else if( (do_trans_A == true) && (do_trans_B == false) ) { for(uword col_A=0; col_A < A_n_cols; ++col_A) { // col_A is interpreted as row_A when storing the results in matrix C const in_eT1* A_coldata = A.colptr(col_A); for(uword col_B=0; col_B < B_n_cols; ++col_B) { const in_eT2* B_coldata = B.colptr(col_B); out_eT acc = out_eT(0); for(uword i=0; i < B_n_rows; ++i) { acc += upgrade_val::apply(A_coldata[i]) * upgrade_val::apply(B_coldata[i]); } if( (use_alpha == false) && (use_beta == false) ) { C.at(col_A,col_B) = acc; } else if( (use_alpha == true ) && (use_beta == false) ) { C.at(col_A,col_B) = alpha*acc; } else if( (use_alpha == false) && (use_beta == true ) ) { C.at(col_A,col_B) = acc + beta*C.at(col_A,col_B); } else if( (use_alpha == true ) && (use_beta == true ) ) { C.at(col_A,col_B) = alpha*acc + beta*C.at(col_A,col_B); } } } } else if( (do_trans_A == false) && (do_trans_B == true) ) { for(uword row_A = 0; row_A < A_n_rows; ++row_A) { for(uword row_B = 0; row_B < B_n_rows; ++row_B) { out_eT acc = out_eT(0); for(uword i = 0; i < B_n_cols; ++i) { acc += upgrade_val::apply(A.at(row_A,i)) * upgrade_val::apply(B.at(row_B,i)); } if( (use_alpha == false) && (use_beta == false) ) { C.at(row_A,row_B) = acc; } else if( (use_alpha == true ) && (use_beta == false) ) { C.at(row_A,row_B) = alpha*acc; } else if( (use_alpha == false) && (use_beta == true ) ) { C.at(row_A,row_B) = acc + beta*C.at(row_A,row_B); } else if( (use_alpha == true ) && (use_beta == true ) ) { C.at(row_A,row_B) = alpha*acc + beta*C.at(row_A,row_B); } } } } else if( (do_trans_A == true) && (do_trans_B == true) ) { for(uword row_B=0; row_B < B_n_rows; ++row_B) { for(uword col_A=0; col_A < A_n_cols; ++col_A) { const in_eT1* A_coldata = A.colptr(col_A); out_eT acc = out_eT(0); for(uword i=0; i < A_n_rows; ++i) { acc += upgrade_val::apply(B.at(row_B,i)) * upgrade_val::apply(A_coldata[i]); } if( (use_alpha == false) && (use_beta == false) ) { C.at(col_A,row_B) = acc; } else if( (use_alpha == true ) && (use_beta == false) ) { C.at(col_A,row_B) = alpha*acc; } else if( (use_alpha == false) && (use_beta == true ) ) { C.at(col_A,row_B) = acc + beta*C.at(col_A,row_B); } else if( (use_alpha == true ) && (use_beta == true ) ) { C.at(col_A,row_B) = alpha*acc + beta*C.at(col_A,row_B); } } } } } }; //! \brief //! Matrix multplication where the matrices have differing element types. template class gemm_mixed { public: //! immediate multiplication of matrices A and B, storing the result in C template inline static void apply ( Mat& C, const Mat& A, const Mat& B, const out_eT alpha = out_eT(1), const out_eT beta = out_eT(0) ) { arma_extra_debug_sigprint(); Mat tmp_A; Mat tmp_B; const bool predo_trans_A = ( (do_trans_A == true) && (is_cx::yes) ); const bool predo_trans_B = ( (do_trans_B == true) && (is_cx::yes) ); if(do_trans_A) { op_htrans::apply_mat_noalias(tmp_A, A); } if(do_trans_B) { op_htrans::apply_mat_noalias(tmp_B, B); } const Mat& AA = (predo_trans_A == false) ? A : tmp_A; const Mat& BB = (predo_trans_B == false) ? B : tmp_B; if( (AA.n_elem <= 64u) && (BB.n_elem <= 64u) ) { gemm_mixed_small<((predo_trans_A) ? false : do_trans_A), ((predo_trans_B) ? false : do_trans_B), use_alpha, use_beta>::apply(C, AA, BB, alpha, beta); } else { gemm_mixed_large<((predo_trans_A) ? false : do_trans_A), ((predo_trans_B) ? false : do_trans_B), use_alpha, use_beta>::apply(C, AA, BB, alpha, beta); } } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/mul_gemv.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup gemv //! @{ //! for tiny square matrices, size <= 4x4 template class gemv_emul_tinysq { public: template struct pos { static const uword n2 = (do_trans_A == false) ? (row + col*2) : (col + row*2); static const uword n3 = (do_trans_A == false) ? (row + col*3) : (col + row*3); static const uword n4 = (do_trans_A == false) ? (row + col*4) : (col + row*4); }; template arma_hot arma_inline static void assign(eT* y, const eT acc, const eT alpha, const eT beta) { if(use_beta == false) { y[i] = (use_alpha == false) ? acc : alpha*acc; } else { const eT tmp = y[i]; y[i] = beta*tmp + ( (use_alpha == false) ? acc : alpha*acc ); } } template arma_hot inline static void apply( eT* y, const TA& A, const eT* x, const eT alpha = eT(1), const eT beta = eT(0) ) { arma_extra_debug_sigprint(); const eT* Am = A.memptr(); switch(A.n_rows) { case 1: { const eT acc = Am[0] * x[0]; assign(y, acc, alpha, beta); } break; case 2: { const eT x0 = x[0]; const eT x1 = x[1]; const eT acc0 = Am[pos<0,0>::n2]*x0 + Am[pos<0,1>::n2]*x1; const eT acc1 = Am[pos<1,0>::n2]*x0 + Am[pos<1,1>::n2]*x1; assign(y, acc0, alpha, beta); assign(y, acc1, alpha, beta); } break; case 3: { const eT x0 = x[0]; const eT x1 = x[1]; const eT x2 = x[2]; const eT acc0 = Am[pos<0,0>::n3]*x0 + Am[pos<0,1>::n3]*x1 + Am[pos<0,2>::n3]*x2; const eT acc1 = Am[pos<1,0>::n3]*x0 + Am[pos<1,1>::n3]*x1 + Am[pos<1,2>::n3]*x2; const eT acc2 = Am[pos<2,0>::n3]*x0 + Am[pos<2,1>::n3]*x1 + Am[pos<2,2>::n3]*x2; assign(y, acc0, alpha, beta); assign(y, acc1, alpha, beta); assign(y, acc2, alpha, beta); } break; case 4: { const eT x0 = x[0]; const eT x1 = x[1]; const eT x2 = x[2]; const eT x3 = x[3]; const eT acc0 = Am[pos<0,0>::n4]*x0 + Am[pos<0,1>::n4]*x1 + Am[pos<0,2>::n4]*x2 + Am[pos<0,3>::n4]*x3; const eT acc1 = Am[pos<1,0>::n4]*x0 + Am[pos<1,1>::n4]*x1 + Am[pos<1,2>::n4]*x2 + Am[pos<1,3>::n4]*x3; const eT acc2 = Am[pos<2,0>::n4]*x0 + Am[pos<2,1>::n4]*x1 + Am[pos<2,2>::n4]*x2 + Am[pos<2,3>::n4]*x3; const eT acc3 = Am[pos<3,0>::n4]*x0 + Am[pos<3,1>::n4]*x1 + Am[pos<3,2>::n4]*x2 + Am[pos<3,3>::n4]*x3; assign(y, acc0, alpha, beta); assign(y, acc1, alpha, beta); assign(y, acc2, alpha, beta); assign(y, acc3, alpha, beta); } break; default: ; } } }; class gemv_emul_helper { public: template arma_hot inline static typename arma_not_cx::result dot_row_col( const TA& A, const eT* x, const uword row, const uword N ) { eT acc1 = eT(0); eT acc2 = eT(0); uword i,j; for(i=0, j=1; j < N; i+=2, j+=2) { const eT xi = x[i]; const eT xj = x[j]; acc1 += A.at(row,i) * xi; acc2 += A.at(row,j) * xj; } if(i < N) { acc1 += A.at(row,i) * x[i]; } return (acc1 + acc2); } template arma_hot inline static typename arma_cx_only::result dot_row_col( const TA& A, const eT* x, const uword row, const uword N ) { typedef typename get_pod_type::result T; T val_real = T(0); T val_imag = T(0); for(uword i=0; i& Ai = A.at(row,i); const std::complex& xi = x[i]; const T a = Ai.real(); const T b = Ai.imag(); const T c = xi.real(); const T d = xi.imag(); val_real += (a*c) - (b*d); val_imag += (a*d) + (b*c); } return std::complex(val_real, val_imag); } }; //! \brief //! Partial emulation of ATLAS/BLAS gemv(). //! 'y' is assumed to have been set to the correct size (i.e. taking into account the transpose) template class gemv_emul { public: template arma_hot inline static void apply( eT* y, const TA& A, const eT* x, const eT alpha = eT(1), const eT beta = eT(0) ) { arma_extra_debug_sigprint(); const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; if(do_trans_A == false) { if(A_n_rows == 1) { const eT acc = op_dot::direct_dot_arma(A_n_cols, A.memptr(), x); if( (use_alpha == false) && (use_beta == false) ) { y[0] = acc; } else if( (use_alpha == true ) && (use_beta == false) ) { y[0] = alpha*acc; } else if( (use_alpha == false) && (use_beta == true ) ) { y[0] = acc + beta*y[0]; } else if( (use_alpha == true ) && (use_beta == true ) ) { y[0] = alpha*acc + beta*y[0]; } } else for(uword row=0; row < A_n_rows; ++row) { const eT acc = gemv_emul_helper::dot_row_col(A, x, row, A_n_cols); if( (use_alpha == false) && (use_beta == false) ) { y[row] = acc; } else if( (use_alpha == true ) && (use_beta == false) ) { y[row] = alpha*acc; } else if( (use_alpha == false) && (use_beta == true ) ) { y[row] = acc + beta*y[row]; } else if( (use_alpha == true ) && (use_beta == true ) ) { y[row] = alpha*acc + beta*y[row]; } } } else if(do_trans_A == true) { if(is_cx::no) { for(uword col=0; col < A_n_cols; ++col) { // col is interpreted as row when storing the results in 'y' // const eT* A_coldata = A.colptr(col); // // eT acc = eT(0); // for(uword row=0; row < A_n_rows; ++row) // { // acc += A_coldata[row] * x[row]; // } const eT acc = op_dot::direct_dot_arma(A_n_rows, A.colptr(col), x); if( (use_alpha == false) && (use_beta == false) ) { y[col] = acc; } else if( (use_alpha == true ) && (use_beta == false) ) { y[col] = alpha*acc; } else if( (use_alpha == false) && (use_beta == true ) ) { y[col] = acc + beta*y[col]; } else if( (use_alpha == true ) && (use_beta == true ) ) { y[col] = alpha*acc + beta*y[col]; } } } else { Mat AA; op_htrans::apply_mat_noalias(AA, A); gemv_emul::apply(y, AA, x, alpha, beta); } } } }; //! \brief //! Wrapper for ATLAS/BLAS gemv function, using template arguments to control the arguments passed to gemv. //! 'y' is assumed to have been set to the correct size (i.e. taking into account the transpose) template class gemv { public: template inline static void apply_blas_type( eT* y, const TA& A, const eT* x, const eT alpha = eT(1), const eT beta = eT(0) ) { arma_extra_debug_sigprint(); if( (A.n_rows <= 4) && (A.n_rows == A.n_cols) && (is_cx::no) ) { gemv_emul_tinysq::apply(y, A, x, alpha, beta); } else { #if defined(ARMA_USE_ATLAS) { arma_debug_assert_atlas_size(A); if(is_cx::no) { // use gemm() instead of gemv() to work around a speed issue in Atlas 3.8.4 arma_extra_debug_print("atlas::cblas_gemm()"); atlas::cblas_gemm ( atlas::CblasColMajor, (do_trans_A) ? ( is_cx::yes ? CblasConjTrans : atlas::CblasTrans ) : atlas::CblasNoTrans, atlas::CblasNoTrans, (do_trans_A) ? A.n_cols : A.n_rows, 1, (do_trans_A) ? A.n_rows : A.n_cols, (use_alpha) ? alpha : eT(1), A.mem, A.n_rows, x, (do_trans_A) ? A.n_rows : A.n_cols, (use_beta) ? beta : eT(0), y, (do_trans_A) ? A.n_cols : A.n_rows ); } else { arma_extra_debug_print("atlas::cblas_gemv()"); atlas::cblas_gemv ( atlas::CblasColMajor, (do_trans_A) ? ( is_cx::yes ? CblasConjTrans : atlas::CblasTrans ) : atlas::CblasNoTrans, A.n_rows, A.n_cols, (use_alpha) ? alpha : eT(1), A.mem, A.n_rows, x, 1, (use_beta) ? beta : eT(0), y, 1 ); } } #elif defined(ARMA_USE_BLAS) { arma_extra_debug_print("blas::gemv()"); arma_debug_assert_blas_size(A); const char trans_A = (do_trans_A) ? ( is_cx::yes ? 'C' : 'T' ) : 'N'; const blas_int m = A.n_rows; const blas_int n = A.n_cols; const eT local_alpha = (use_alpha) ? alpha : eT(1); //const blas_int lda = A.n_rows; const blas_int inc = 1; const eT local_beta = (use_beta) ? beta : eT(0); arma_extra_debug_print( arma_boost::format("blas::gemv(): trans_A = %c") % trans_A ); blas::gemv ( &trans_A, &m, &n, &local_alpha, A.mem, &m, // lda x, &inc, &local_beta, y, &inc ); } #else { gemv_emul::apply(y,A,x,alpha,beta); } #endif } } template arma_inline static void apply( eT* y, const TA& A, const eT* x, const eT alpha = eT(1), const eT beta = eT(0) ) { gemv_emul::apply(y,A,x,alpha,beta); } template arma_inline static void apply ( float* y, const TA& A, const float* x, const float alpha = float(1), const float beta = float(0) ) { gemv::apply_blas_type(y,A,x,alpha,beta); } template arma_inline static void apply ( double* y, const TA& A, const double* x, const double alpha = double(1), const double beta = double(0) ) { gemv::apply_blas_type(y,A,x,alpha,beta); } template arma_inline static void apply ( std::complex* y, const TA& A, const std::complex* x, const std::complex alpha = std::complex(1), const std::complex beta = std::complex(0) ) { gemv::apply_blas_type(y,A,x,alpha,beta); } template arma_inline static void apply ( std::complex* y, const TA& A, const std::complex* x, const std::complex alpha = std::complex(1), const std::complex beta = std::complex(0) ) { gemv::apply_blas_type(y,A,x,alpha,beta); } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/mul_herk.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup herk //! @{ class herk_helper { public: template inline static void inplace_conj_copy_upper_tri_to_lower_tri(Mat& C) { // under the assumption that C is a square matrix const uword N = C.n_rows; for(uword k=0; k < N; ++k) { eT* colmem = C.colptr(k); for(uword i=(k+1); i < N; ++i) { colmem[i] = std::conj( C.at(k,i) ); } } } template static arma_hot arma_pure inline eT dot_conj_row(const uword n_elem, const eT* const A, const Mat& B, const uword row) { arma_extra_debug_sigprint(); typedef typename get_pod_type::result T; T val_real = T(0); T val_imag = T(0); for(uword i=0; i& X = A[i]; const std::complex& Y = B.at(row,i); const T a = X.real(); const T b = X.imag(); const T c = Y.real(); const T d = Y.imag(); val_real += (a*c) + (b*d); val_imag += (b*c) - (a*d); } return std::complex(val_real, val_imag); } }; template class herk_vec { public: template arma_hot inline static void apply ( Mat< std::complex >& C, const TA& A, const T alpha = T(1), const T beta = T(0) ) { arma_extra_debug_sigprint(); typedef std::complex eT; const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; // for beta != 0, C is assumed to be hermitian // do_trans_A == false -> C = alpha * A * A^H + beta*C // do_trans_A == true -> C = alpha * A^H * A + beta*C const eT* A_mem = A.memptr(); if(do_trans_A == false) { if(A_n_rows == 1) { const eT acc = op_cdot::direct_cdot(A_n_cols, A_mem, A_mem); if( (use_alpha == false) && (use_beta == false) ) { C[0] = acc; } else if( (use_alpha == true ) && (use_beta == false) ) { C[0] = alpha*acc; } else if( (use_alpha == false) && (use_beta == true ) ) { C[0] = acc + beta*C[0]; } else if( (use_alpha == true ) && (use_beta == true ) ) { C[0] = alpha*acc + beta*C[0]; } } else for(uword row_A=0; row_A < A_n_rows; ++row_A) { const eT& A_rowdata = A_mem[row_A]; for(uword k=row_A; k < A_n_rows; ++k) { const eT acc = A_rowdata * std::conj( A_mem[k] ); if( (use_alpha == false) && (use_beta == false) ) { C.at(row_A, k) = acc; if(row_A != k) { C.at(k, row_A) = std::conj(acc); } } else if( (use_alpha == true) && (use_beta == false) ) { const eT val = alpha*acc; C.at(row_A, k) = val; if(row_A != k) { C.at(k, row_A) = std::conj(val); } } else if( (use_alpha == false) && (use_beta == true) ) { C.at(row_A, k) = acc + beta*C.at(row_A, k); if(row_A != k) { C.at(k, row_A) = std::conj(acc) + beta*C.at(k, row_A); } } else if( (use_alpha == true) && (use_beta == true) ) { const eT val = alpha*acc; C.at(row_A, k) = val + beta*C.at(row_A, k); if(row_A != k) { C.at(k, row_A) = std::conj(val) + beta*C.at(k, row_A); } } } } } else if(do_trans_A == true) { if(A_n_cols == 1) { const eT acc = op_cdot::direct_cdot(A_n_rows, A_mem, A_mem); if( (use_alpha == false) && (use_beta == false) ) { C[0] = acc; } else if( (use_alpha == true ) && (use_beta == false) ) { C[0] = alpha*acc; } else if( (use_alpha == false) && (use_beta == true ) ) { C[0] = acc + beta*C[0]; } else if( (use_alpha == true ) && (use_beta == true ) ) { C[0] = alpha*acc + beta*C[0]; } } else for(uword col_A=0; col_A < A_n_cols; ++col_A) { // col_A is interpreted as row_A when storing the results in matrix C const eT A_coldata = std::conj( A_mem[col_A] ); for(uword k=col_A; k < A_n_cols ; ++k) { const eT acc = A_coldata * A_mem[k]; if( (use_alpha == false) && (use_beta == false) ) { C.at(col_A, k) = acc; if(col_A != k) { C.at(k, col_A) = std::conj(acc); } } else if( (use_alpha == true ) && (use_beta == false) ) { const eT val = alpha*acc; C.at(col_A, k) = val; if(col_A != k) { C.at(k, col_A) = std::conj(val); } } else if( (use_alpha == false) && (use_beta == true ) ) { C.at(col_A, k) = acc + beta*C.at(col_A, k); if(col_A != k) { C.at(k, col_A) = std::conj(acc) + beta*C.at(k, col_A); } } else if( (use_alpha == true ) && (use_beta == true ) ) { const eT val = alpha*acc; C.at(col_A, k) = val + beta*C.at(col_A, k); if(col_A != k) { C.at(k, col_A) = std::conj(val) + beta*C.at(k, col_A); } } } } } } }; template class herk_emul { public: template arma_hot inline static void apply ( Mat< std::complex >& C, const TA& A, const T alpha = T(1), const T beta = T(0) ) { arma_extra_debug_sigprint(); typedef std::complex eT; // do_trans_A == false -> C = alpha * A * A^H + beta*C // do_trans_A == true -> C = alpha * A^H * A + beta*C if(do_trans_A == false) { Mat AA; op_htrans::apply_mat_noalias(AA, A); herk_emul::apply(C, AA, alpha, beta); } else if(do_trans_A == true) { const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; for(uword col_A=0; col_A < A_n_cols; ++col_A) { // col_A is interpreted as row_A when storing the results in matrix C const eT* A_coldata = A.colptr(col_A); for(uword k=col_A; k < A_n_cols ; ++k) { const eT acc = op_cdot::direct_cdot(A_n_rows, A_coldata, A.colptr(k)); if( (use_alpha == false) && (use_beta == false) ) { C.at(col_A, k) = acc; if(col_A != k) { C.at(k, col_A) = std::conj(acc); } } else if( (use_alpha == true) && (use_beta == false) ) { const eT val = alpha*acc; C.at(col_A, k) = val; if(col_A != k) { C.at(k, col_A) = std::conj(val); } } else if( (use_alpha == false) && (use_beta == true) ) { C.at(col_A, k) = acc + beta*C.at(col_A, k); if(col_A != k) { C.at(k, col_A) = std::conj(acc) + beta*C.at(k, col_A); } } else if( (use_alpha == true) && (use_beta == true) ) { const eT val = alpha*acc; C.at(col_A, k) = val + beta*C.at(col_A, k); if(col_A != k) { C.at(k, col_A) = std::conj(val) + beta*C.at(k, col_A); } } } } } } }; template class herk { public: template inline static void apply_blas_type( Mat >& C, const TA& A, const T alpha = T(1), const T beta = T(0) ) { arma_extra_debug_sigprint(); const uword threshold = 16; if(A.is_vec()) { // work around poor handling of vectors by herk() in ATLAS 3.8.4 and standard BLAS herk_vec::apply(C,A,alpha,beta); return; } if( (A.n_elem <= threshold) ) { herk_emul::apply(C,A,alpha,beta); } else { #if defined(ARMA_USE_ATLAS) { if(use_beta == true) { typedef typename std::complex eT; // use a temporary matrix, as we can't assume that matrix C is already symmetric Mat D(C.n_rows, C.n_cols); herk::apply_blas_type(D,A,alpha); // NOTE: assuming beta=1; this is okay for now, as currently glue_times only uses beta=1 arrayops::inplace_plus(C.memptr(), D.memptr(), C.n_elem); return; } atlas::cblas_herk ( atlas::CblasColMajor, atlas::CblasUpper, (do_trans_A) ? CblasConjTrans : atlas::CblasNoTrans, C.n_cols, (do_trans_A) ? A.n_rows : A.n_cols, (use_alpha) ? alpha : T(1), A.mem, (do_trans_A) ? A.n_rows : C.n_cols, (use_beta) ? beta : T(0), C.memptr(), C.n_cols ); herk_helper::inplace_conj_copy_upper_tri_to_lower_tri(C); } #elif defined(ARMA_USE_BLAS) { if(use_beta == true) { typedef typename std::complex eT; // use a temporary matrix, as we can't assume that matrix C is already symmetric Mat D(C.n_rows, C.n_cols); herk::apply_blas_type(D,A,alpha); // NOTE: assuming beta=1; this is okay for now, as currently glue_times only uses beta=1 arrayops::inplace_plus(C.memptr(), D.memptr(), C.n_elem); return; } arma_extra_debug_print("blas::herk()"); const char uplo = 'U'; const char trans_A = (do_trans_A) ? 'C' : 'N'; const blas_int n = C.n_cols; const blas_int k = (do_trans_A) ? A.n_rows : A.n_cols; const T local_alpha = (use_alpha) ? alpha : T(1); const T local_beta = (use_beta) ? beta : T(0); const blas_int lda = (do_trans_A) ? k : n; arma_extra_debug_print( arma_boost::format("blas::herk(): trans_A = %c") % trans_A ); blas::herk ( &uplo, &trans_A, &n, &k, &local_alpha, A.mem, &lda, &local_beta, C.memptr(), &n // &ldc ); herk_helper::inplace_conj_copy_upper_tri_to_lower_tri(C); } #else { herk_emul::apply(C,A,alpha,beta); } #endif } } template inline static void apply( Mat& C, const TA& A, const eT alpha = eT(1), const eT beta = eT(0), const typename arma_not_cx::result* junk = 0 ) { arma_ignore(C); arma_ignore(A); arma_ignore(alpha); arma_ignore(beta); arma_ignore(junk); // herk() cannot be used by non-complex matrices return; } template arma_inline static void apply ( Mat< std::complex >& C, const TA& A, const float alpha = float(1), const float beta = float(0) ) { herk::apply_blas_type(C,A,alpha,beta); } template arma_inline static void apply ( Mat< std::complex >& C, const TA& A, const double alpha = double(1), const double beta = double(0) ) { herk::apply_blas_type(C,A,alpha,beta); } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/mul_syrk.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup syrk //! @{ class syrk_helper { public: template inline static void inplace_copy_upper_tri_to_lower_tri(Mat& C) { // under the assumption that C is a square matrix const uword N = C.n_rows; for(uword k=0; k < N; ++k) { eT* colmem = C.colptr(k); uword i, j; for(i=(k+1), j=(k+2); j < N; i+=2, j+=2) { const eT tmp_i = C.at(k,i); const eT tmp_j = C.at(k,j); colmem[i] = tmp_i; colmem[j] = tmp_j; } if(i < N) { colmem[i] = C.at(k,i); } } } }; //! partial emulation of BLAS function syrk(), specialised for A being a vector template class syrk_vec { public: template arma_hot inline static void apply ( Mat& C, const TA& A, const eT alpha = eT(1), const eT beta = eT(0) ) { arma_extra_debug_sigprint(); const uword A_n1 = (do_trans_A == false) ? A.n_rows : A.n_cols; const uword A_n2 = (do_trans_A == false) ? A.n_cols : A.n_rows; const eT* A_mem = A.memptr(); if(A_n1 == 1) { const eT acc1 = op_dot::direct_dot(A_n2, A_mem, A_mem); if( (use_alpha == false) && (use_beta == false) ) { C[0] = acc1; } else if( (use_alpha == true ) && (use_beta == false) ) { C[0] = alpha*acc1; } else if( (use_alpha == false) && (use_beta == true ) ) { C[0] = acc1 + beta*C[0]; } else if( (use_alpha == true ) && (use_beta == true ) ) { C[0] = alpha*acc1 + beta*C[0]; } } else for(uword k=0; k < A_n1; ++k) { const eT A_k = A_mem[k]; uword i,j; for(i=(k), j=(k+1); j < A_n1; i+=2, j+=2) { const eT acc1 = A_k * A_mem[i]; const eT acc2 = A_k * A_mem[j]; if( (use_alpha == false) && (use_beta == false) ) { C.at(k, i) = acc1; C.at(k, j) = acc2; C.at(i, k) = acc1; C.at(j, k) = acc2; } else if( (use_alpha == true ) && (use_beta == false) ) { const eT val1 = alpha*acc1; const eT val2 = alpha*acc2; C.at(k, i) = val1; C.at(k, j) = val2; C.at(i, k) = val1; C.at(j, k) = val2; } else if( (use_alpha == false) && (use_beta == true) ) { C.at(k, i) = acc1 + beta*C.at(k, i); C.at(k, j) = acc2 + beta*C.at(k, j); if(i != k) { C.at(i, k) = acc1 + beta*C.at(i, k); } C.at(j, k) = acc2 + beta*C.at(j, k); } else if( (use_alpha == true ) && (use_beta == true) ) { const eT val1 = alpha*acc1; const eT val2 = alpha*acc2; C.at(k, i) = val1 + beta*C.at(k, i); C.at(k, j) = val2 + beta*C.at(k, j); if(i != k) { C.at(i, k) = val1 + beta*C.at(i, k); } C.at(j, k) = val2 + beta*C.at(j, k); } } if(i < A_n1) { const eT acc1 = A_k * A_mem[i]; if( (use_alpha == false) && (use_beta == false) ) { C.at(k, i) = acc1; C.at(i, k) = acc1; } else if( (use_alpha == true) && (use_beta == false) ) { const eT val1 = alpha*acc1; C.at(k, i) = val1; C.at(i, k) = val1; } else if( (use_alpha == false) && (use_beta == true) ) { C.at(k, i) = acc1 + beta*C.at(k, i); if(i != k) { C.at(i, k) = acc1 + beta*C.at(i, k); } } else if( (use_alpha == true) && (use_beta == true) ) { const eT val1 = alpha*acc1; C.at(k, i) = val1 + beta*C.at(k, i); if(i != k) { C.at(i, k) = val1 + beta*C.at(i, k); } } } } } }; //! partial emulation of BLAS function syrk() template class syrk_emul { public: template arma_hot inline static void apply ( Mat& C, const TA& A, const eT alpha = eT(1), const eT beta = eT(0) ) { arma_extra_debug_sigprint(); // do_trans_A == false -> C = alpha * A * A^T + beta*C // do_trans_A == true -> C = alpha * A^T * A + beta*C if(do_trans_A == false) { Mat AA; op_strans::apply_mat_noalias(AA, A); syrk_emul::apply(C, AA, alpha, beta); } else if(do_trans_A == true) { const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; for(uword col_A=0; col_A < A_n_cols; ++col_A) { // col_A is interpreted as row_A when storing the results in matrix C const eT* A_coldata = A.colptr(col_A); for(uword k=col_A; k < A_n_cols; ++k) { const eT acc = op_dot::direct_dot_arma(A_n_rows, A_coldata, A.colptr(k)); if( (use_alpha == false) && (use_beta == false) ) { C.at(col_A, k) = acc; C.at(k, col_A) = acc; } else if( (use_alpha == true ) && (use_beta == false) ) { const eT val = alpha*acc; C.at(col_A, k) = val; C.at(k, col_A) = val; } else if( (use_alpha == false) && (use_beta == true ) ) { C.at(col_A, k) = acc + beta*C.at(col_A, k); if(col_A != k) { C.at(k, col_A) = acc + beta*C.at(k, col_A); } } else if( (use_alpha == true ) && (use_beta == true ) ) { const eT val = alpha*acc; C.at(col_A, k) = val + beta*C.at(col_A, k); if(col_A != k) { C.at(k, col_A) = val + beta*C.at(k, col_A); } } } } } } }; template class syrk { public: template inline static void apply_blas_type( Mat& C, const TA& A, const eT alpha = eT(1), const eT beta = eT(0) ) { arma_extra_debug_sigprint(); if(A.is_vec()) { // work around poor handling of vectors by syrk() in ATLAS 3.8.4 and standard BLAS syrk_vec::apply(C,A,alpha,beta); return; } const uword threshold = (is_cx::yes ? 16u : 48u); if( A.n_elem <= threshold ) { syrk_emul::apply(C,A,alpha,beta); } else { #if defined(ARMA_USE_ATLAS) { if(use_beta == true) { // use a temporary matrix, as we can't assume that matrix C is already symmetric Mat D(C.n_rows, C.n_cols); syrk::apply_blas_type(D,A,alpha); // NOTE: assuming beta=1; this is okay for now, as currently glue_times only uses beta=1 arrayops::inplace_plus(C.memptr(), D.memptr(), C.n_elem); return; } atlas::cblas_syrk ( atlas::CblasColMajor, atlas::CblasUpper, (do_trans_A) ? atlas::CblasTrans : atlas::CblasNoTrans, C.n_cols, (do_trans_A) ? A.n_rows : A.n_cols, (use_alpha) ? alpha : eT(1), A.mem, (do_trans_A) ? A.n_rows : C.n_cols, (use_beta) ? beta : eT(0), C.memptr(), C.n_cols ); syrk_helper::inplace_copy_upper_tri_to_lower_tri(C); } #elif defined(ARMA_USE_BLAS) { if(use_beta == true) { // use a temporary matrix, as we can't assume that matrix C is already symmetric Mat D(C.n_rows, C.n_cols); syrk::apply_blas_type(D,A,alpha); // NOTE: assuming beta=1; this is okay for now, as currently glue_times only uses beta=1 arrayops::inplace_plus(C.memptr(), D.memptr(), C.n_elem); return; } arma_extra_debug_print("blas::syrk()"); const char uplo = 'U'; const char trans_A = (do_trans_A) ? 'T' : 'N'; const blas_int n = C.n_cols; const blas_int k = (do_trans_A) ? A.n_rows : A.n_cols; const eT local_alpha = (use_alpha) ? alpha : eT(1); const eT local_beta = (use_beta) ? beta : eT(0); const blas_int lda = (do_trans_A) ? k : n; arma_extra_debug_print( arma_boost::format("blas::syrk(): trans_A = %c") % trans_A ); blas::syrk ( &uplo, &trans_A, &n, &k, &local_alpha, A.mem, &lda, &local_beta, C.memptr(), &n // &ldc ); syrk_helper::inplace_copy_upper_tri_to_lower_tri(C); } #else { syrk_emul::apply(C,A,alpha,beta); } #endif } } template inline static void apply( Mat& C, const TA& A, const eT alpha = eT(1), const eT beta = eT(0) ) { if(is_cx::no) { if(A.is_vec()) { syrk_vec::apply(C,A,alpha,beta); } else { syrk_emul::apply(C,A,alpha,beta); } } else { // handling of complex matrix by syrk_emul() is not yet implemented return; } } template arma_inline static void apply ( Mat& C, const TA& A, const float alpha = float(1), const float beta = float(0) ) { syrk::apply_blas_type(C,A,alpha,beta); } template arma_inline static void apply ( Mat& C, const TA& A, const double alpha = double(1), const double beta = double(0) ) { syrk::apply_blas_type(C,A,alpha,beta); } template arma_inline static void apply ( Mat< std::complex >& C, const TA& A, const std::complex alpha = std::complex(1), const std::complex beta = std::complex(0) ) { arma_ignore(C); arma_ignore(A); arma_ignore(alpha); arma_ignore(beta); // handling of complex matrix by syrk() is not yet implemented return; } template arma_inline static void apply ( Mat< std::complex >& C, const TA& A, const std::complex alpha = std::complex(1), const std::complex beta = std::complex(0) ) { arma_ignore(C); arma_ignore(A); arma_ignore(alpha); arma_ignore(beta); // handling of complex matrix by syrk() is not yet implemented return; } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_all_bones.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_all //! @{ class op_all { public: template static inline bool all_vec_helper(const Base& X); template static inline bool all_vec_helper ( const mtOp& X, const typename arma_op_rel_only::result junk1 = 0, const typename arma_not_cx::result junk2 = 0 ); template static inline bool all_vec_helper ( const mtGlue& X, const typename arma_glue_rel_only::result junk1 = 0, const typename arma_not_cx::result junk2 = 0, const typename arma_not_cx::result junk3 = 0 ); template static inline bool all_vec(T1& X); template static inline void apply_helper(Mat& out, const Proxy& P, const uword dim); template static inline void apply(Mat& out, const mtOp& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_all_meat.hpp ================================================ // Copyright (C) 2013-2014 Conrad Sanderson // Copyright (C) 2013-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_all //! @{ template inline bool op_all::all_vec_helper(const Base& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(X.get_ref()); const uword n_elem = P.get_n_elem(); uword count = 0; if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i inline bool op_all::all_vec_helper ( const mtOp& X, const typename arma_op_rel_only::result junk1, const typename arma_not_cx::result junk2 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); typedef typename T1::elem_type eT; const eT val = X.aux; const Proxy P(X.m); const uword n_elem = P.get_n_elem(); uword count = 0; if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i < n_elem; ++i) { const eT tmp = Pea[i]; if(is_same_type::yes) { count += (val < tmp) ? uword(1) : uword(0); } else if(is_same_type::yes) { count += (tmp < val) ? uword(1) : uword(0); } else if(is_same_type::yes) { count += (val > tmp) ? uword(1) : uword(0); } else if(is_same_type::yes) { count += (tmp > val) ? uword(1) : uword(0); } else if(is_same_type::yes) { count += (val <= tmp) ? uword(1) : uword(0); } else if(is_same_type::yes) { count += (tmp <= val) ? uword(1) : uword(0); } else if(is_same_type::yes) { count += (val >= tmp) ? uword(1) : uword(0); } else if(is_same_type::yes) { count += (tmp >= val) ? uword(1) : uword(0); } else if(is_same_type::yes) { count += (tmp == val) ? uword(1) : uword(0); } else if(is_same_type::yes) { count += (tmp != val) ? uword(1) : uword(0); } } } else { const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { const eT tmp = P.at(row,col); if(is_same_type::yes) { if(val < tmp) { ++count; } } else if(is_same_type::yes) { if(tmp < val) { ++count; } } else if(is_same_type::yes) { if(val > tmp) { ++count; } } else if(is_same_type::yes) { if(tmp > val) { ++count; } } else if(is_same_type::yes) { if(val <= tmp) { ++count; } } else if(is_same_type::yes) { if(tmp <= val) { ++count; } } else if(is_same_type::yes) { if(val >= tmp) { ++count; } } else if(is_same_type::yes) { if(tmp >= val) { ++count; } } else if(is_same_type::yes) { if(tmp == val) { ++count; } } else if(is_same_type::yes) { if(tmp != val) { ++count; } } } } return (n_elem == count); } template inline bool op_all::all_vec_helper ( const mtGlue& X, const typename arma_glue_rel_only::result junk1, const typename arma_not_cx::result junk2, const typename arma_not_cx::result junk3 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); arma_ignore(junk3); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename Proxy::ea_type ea_type1; typedef typename Proxy::ea_type ea_type2; const Proxy A(X.A); const Proxy B(X.B); arma_debug_assert_same_size(A, B, "relational operator"); const uword n_elem = A.get_n_elem(); uword count = 0; const bool prefer_at_accessor = Proxy::prefer_at_accessor || Proxy::prefer_at_accessor; if(prefer_at_accessor == false) { ea_type1 PA = A.get_ea(); ea_type2 PB = B.get_ea(); for(uword i=0; i::yes) { count += (tmp1 < tmp2) ? uword(1) : uword(0); } else if(is_same_type::yes) { count += (tmp1 > tmp2) ? uword(1) : uword(0); } else if(is_same_type::yes) { count += (tmp1 <= tmp2) ? uword(1) : uword(0); } else if(is_same_type::yes) { count += (tmp1 >= tmp2) ? uword(1) : uword(0); } else if(is_same_type::yes) { count += (tmp1 == tmp2) ? uword(1) : uword(0); } else if(is_same_type::yes) { count += (tmp1 != tmp2) ? uword(1) : uword(0); } else if(is_same_type::yes) { count += (tmp1 && tmp2) ? uword(1) : uword(0); } else if(is_same_type::yes) { count += (tmp1 || tmp2) ? uword(1) : uword(0); } } } else { const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { const eT1 tmp1 = A.at(row,col); const eT2 tmp2 = B.at(row,col); if(is_same_type::yes) { if(tmp1 < tmp2) { ++count; } } else if(is_same_type::yes) { if(tmp1 > tmp2) { ++count; } } else if(is_same_type::yes) { if(tmp1 <= tmp2) { ++count; } } else if(is_same_type::yes) { if(tmp1 >= tmp2) { ++count; } } else if(is_same_type::yes) { if(tmp1 == tmp2) { ++count; } } else if(is_same_type::yes) { if(tmp1 != tmp2) { ++count; } } else if(is_same_type::yes) { if(tmp1 && tmp2) { ++count; } } else if(is_same_type::yes) { if(tmp1 || tmp2) { ++count; } } } } return (n_elem == count); } template inline bool op_all::all_vec(T1& X) { arma_extra_debug_sigprint(); return op_all::all_vec_helper(X); } template inline void op_all::apply_helper(Mat& out, const Proxy& P, const uword dim) { arma_extra_debug_sigprint(); const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); typedef typename Proxy::elem_type eT; if(dim == 0) // traverse rows (ie. process each column) { out.zeros(1, n_cols); if(out.n_elem == 0) { return; } uword* out_mem = out.memptr(); if(is_Mat::stored_type>::value) { const unwrap::stored_type> U(P.Q); for(uword col=0; col < n_cols; ++col) { const eT* colmem = U.M.colptr(col); uword count = 0; for(uword row=0; row < n_rows; ++row) { count += (colmem[row] != eT(0)) ? uword(1) : uword(0); } out_mem[col] = (n_rows == count) ? uword(1) : uword(0); } } else { for(uword col=0; col < n_cols; ++col) { uword count = 0; for(uword row=0; row < n_rows; ++row) { if(P.at(row,col) != eT(0)) { ++count; } } out_mem[col] = (n_rows == count) ? uword(1) : uword(0); } } } else { out.zeros(n_rows, 1); uword* out_mem = out.memptr(); // internal dual use of 'out': keep the counts for each row if(is_Mat::stored_type>::value) { const unwrap::stored_type> U(P.Q); for(uword col=0; col < n_cols; ++col) { const eT* colmem = U.M.colptr(col); for(uword row=0; row < n_rows; ++row) { out_mem[row] += (colmem[row] != eT(0)) ? uword(1) : uword(0); } } } else { for(uword col=0; col < n_cols; ++col) { for(uword row=0; row < n_rows; ++row) { if(P.at(row,col) != eT(0)) { ++out_mem[row]; } } } } // see what the counts tell us for(uword row=0; row < n_rows; ++row) { out_mem[row] = (n_cols == out_mem[row]) ? uword(1) : uword(0); } } } template inline void op_all::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); const uword dim = X.aux_uword_a; const Proxy P(X.m); if(P.is_alias(out) == false) { op_all::apply_helper(out, P, dim); } else { Mat out2; op_all::apply_helper(out2, P, dim); out.steal_mem(out2); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_any_bones.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_any //! @{ class op_any { public: template static inline bool any_vec_helper(const Base& X); template static inline bool any_vec_helper ( const mtOp& X, const typename arma_op_rel_only::result junk1 = 0, const typename arma_not_cx::result junk2 = 0 ); template static inline bool any_vec_helper ( const mtGlue& X, const typename arma_glue_rel_only::result junk1 = 0, const typename arma_not_cx::result junk2 = 0, const typename arma_not_cx::result junk3 = 0 ); template static inline bool any_vec(T1& X); template static inline void apply_helper(Mat& out, const Proxy& P, const uword dim); template static inline void apply(Mat& out, const mtOp& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_any_meat.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_any //! @{ template inline bool op_any::any_vec_helper(const Base& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(X.get_ref()); const uword n_elem = P.get_n_elem(); if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i inline bool op_any::any_vec_helper ( const mtOp& X, const typename arma_op_rel_only::result junk1, const typename arma_not_cx::result junk2 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); typedef typename T1::elem_type eT; const eT val = X.aux; const Proxy P(X.m); if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type Pea = P.get_ea(); const uword n_elem = P.get_n_elem(); for(uword i=0; i < n_elem; ++i) { const eT tmp = Pea[i]; if(is_same_type::yes) { if(val < tmp) { return true; } } else if(is_same_type::yes) { if(tmp < val) { return true; } } else if(is_same_type::yes) { if(val > tmp) { return true; } } else if(is_same_type::yes) { if(tmp > val) { return true; } } else if(is_same_type::yes) { if(val <= tmp) { return true; } } else if(is_same_type::yes) { if(tmp <= val) { return true; } } else if(is_same_type::yes) { if(val >= tmp) { return true; } } else if(is_same_type::yes) { if(tmp >= val) { return true; } } else if(is_same_type::yes) { if(tmp == val) { return true; } } else if(is_same_type::yes) { if(tmp != val) { return true; } } } } else { const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { const eT tmp = P.at(row,col); if(is_same_type::yes) { if(val < tmp) { return true; } } else if(is_same_type::yes) { if(tmp < val) { return true; } } else if(is_same_type::yes) { if(val > tmp) { return true; } } else if(is_same_type::yes) { if(tmp > val) { return true; } } else if(is_same_type::yes) { if(val <= tmp) { return true; } } else if(is_same_type::yes) { if(tmp <= val) { return true; } } else if(is_same_type::yes) { if(val >= tmp) { return true; } } else if(is_same_type::yes) { if(tmp >= val) { return true; } } else if(is_same_type::yes) { if(tmp == val) { return true; } } else if(is_same_type::yes) { if(tmp != val) { return true; } } } } return false; } template inline bool op_any::any_vec_helper ( const mtGlue& X, const typename arma_glue_rel_only::result junk1, const typename arma_not_cx::result junk2, const typename arma_not_cx::result junk3 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); arma_ignore(junk3); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename Proxy::ea_type ea_type1; typedef typename Proxy::ea_type ea_type2; const Proxy A(X.A); const Proxy B(X.B); arma_debug_assert_same_size(A, B, "relational operator"); const bool prefer_at_accessor = Proxy::prefer_at_accessor || Proxy::prefer_at_accessor; if(prefer_at_accessor == false) { ea_type1 PA = A.get_ea(); ea_type2 PB = B.get_ea(); const uword n_elem = A.get_n_elem(); for(uword i=0; i::yes) { if(tmp1 < tmp2) { return true; } } else if(is_same_type::yes) { if(tmp1 > tmp2) { return true; } } else if(is_same_type::yes) { if(tmp1 <= tmp2) { return true; } } else if(is_same_type::yes) { if(tmp1 >= tmp2) { return true; } } else if(is_same_type::yes) { if(tmp1 == tmp2) { return true; } } else if(is_same_type::yes) { if(tmp1 != tmp2) { return true; } } else if(is_same_type::yes) { if(tmp1 && tmp2) { return true; } } else if(is_same_type::yes) { if(tmp1 || tmp2) { return true; } } } } else { const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { const eT1 tmp1 = A.at(row,col); const eT2 tmp2 = B.at(row,col); if(is_same_type::yes) { if(tmp1 < tmp2) { return true; } } else if(is_same_type::yes) { if(tmp1 > tmp2) { return true; } } else if(is_same_type::yes) { if(tmp1 <= tmp2) { return true; } } else if(is_same_type::yes) { if(tmp1 >= tmp2) { return true; } } else if(is_same_type::yes) { if(tmp1 == tmp2) { return true; } } else if(is_same_type::yes) { if(tmp1 != tmp2) { return true; } } else if(is_same_type::yes) { if(tmp1 && tmp2) { return true; } } else if(is_same_type::yes) { if(tmp1 || tmp2) { return true; } } } } return false; } template inline bool op_any::any_vec(T1& X) { arma_extra_debug_sigprint(); return op_any::any_vec_helper(X); } template inline void op_any::apply_helper(Mat& out, const Proxy& P, const uword dim) { arma_extra_debug_sigprint(); const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); typedef typename Proxy::elem_type eT; if(dim == 0) // traverse rows (ie. process each column) { out.zeros(1, n_cols); uword* out_mem = out.memptr(); if(is_Mat::stored_type>::value) { const unwrap::stored_type> U(P.Q); for(uword col=0; col < n_cols; ++col) { const eT* colmem = U.M.colptr(col); for(uword row=0; row < n_rows; ++row) { if(colmem[row] != eT(0)) { out_mem[col] = uword(1); break; } } } } else { for(uword col=0; col < n_cols; ++col) { for(uword row=0; row < n_rows; ++row) { if(P.at(row,col) != eT(0)) { out_mem[col] = uword(1); break; } } } } } else { out.zeros(n_rows, 1); uword* out_mem = out.memptr(); if(is_Mat::stored_type>::value) { const unwrap::stored_type> U(P.Q); for(uword col=0; col < n_cols; ++col) { const eT* colmem = U.M.colptr(col); for(uword row=0; row < n_rows; ++row) { if(colmem[row] != eT(0)) { out_mem[row] = uword(1); } } } } else { for(uword col=0; col < n_cols; ++col) { for(uword row=0; row < n_rows; ++row) { if(P.at(row,col) != eT(0)) { out_mem[row] = uword(1); } } } } } } template inline void op_any::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); const uword dim = X.aux_uword_a; const Proxy P(X.m); if(P.is_alias(out) == false) { op_any::apply_helper(out, P, dim); } else { Mat out2; op_any::apply_helper(out2, P, dim); out.steal_mem(out2); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_chol_bones.hpp ================================================ // Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_chol //! @{ class op_chol { public: template inline static void apply(Mat& out, const Op& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_chol_meat.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_chol //! @{ template inline void op_chol::apply(Mat& out, const Op& X) { arma_extra_debug_sigprint(); const bool status = auxlib::chol(out, X.m, X.aux_uword_a); if(status == false) { out.reset(); arma_bad("chol(): failed to converge"); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_clamp_bones.hpp ================================================ // Copyright (C) 2014 Conrad Sanderson // Copyright (C) 2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_clamp //! @{ class op_clamp { public: template inline static void apply(Mat& out, const mtOp& in); template inline static void apply_noalias(Mat& out, const Proxy& P, const typename T1::elem_type min_val, const typename T1::elem_type max_val); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_clamp_meat.hpp ================================================ // Copyright (C) 2014 Conrad Sanderson // Copyright (C) 2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_clamp //! @{ template inline void op_clamp::apply(Mat& out, const mtOp& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(in.m); if(P.is_alias(out) && (is_Mat::value == false)) { Mat tmp; op_clamp::apply_noalias(tmp, P, in.aux, in.aux_out_eT); out.steal_mem(tmp); } else { op_clamp::apply_noalias(out, P, in.aux, in.aux_out_eT); } } template inline void op_clamp::apply_noalias(Mat& out, const Proxy& P, const typename T1::elem_type min_val, const typename T1::elem_type max_val) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); out.set_size(n_rows, n_cols); eT* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { const uword N = P.get_n_elem(); typename Proxy::ea_type A = P.get_ea(); uword i,j; for(i=0, j=1; j max_val) { val_i = max_val; } if(val_j < min_val) { val_j = min_val; } else if(val_j > max_val) { val_j = max_val; } out_mem[i] = val_i; out_mem[j] = val_j; } if(i < N) { eT val_i = A[i]; if(val_i < min_val) { val_i = min_val; } else if(val_i > max_val) { val_i = max_val; } out_mem[i] = val_i; } } else { for(uword col=0; col max_val) { val = max_val; } (*out_mem) = val; ++out_mem; } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_cor_bones.hpp ================================================ // Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_cor //! @{ class op_cor { public: template inline static void direct_cor(Mat& out, const Mat& X, const uword norm_type); template inline static void direct_cor(Mat< std::complex >& out, const Mat< std::complex >& X, const uword norm_type); template inline static void apply(Mat& out, const Op& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_cor_meat.hpp ================================================ // Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_cor //! @{ template inline void op_cor::direct_cor(Mat& out, const Mat& A, const uword norm_type) { arma_extra_debug_sigprint(); if(A.is_empty()) { out.reset(); return; } if(A.is_vec()) { out.set_size(1,1); out[0] = eT(1); } else { const uword N = A.n_rows; const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N); const Row acc = sum(A); const Row sd = stddev(A); out = (trans(A) * A); out -= (trans(acc) * acc)/eT(N); out /= norm_val; out /= trans(sd) * sd; } } template inline void op_cor::direct_cor(Mat< std::complex >& out, const Mat< std::complex >& A, const uword norm_type) { arma_extra_debug_sigprint(); typedef typename std::complex eT; if(A.is_empty()) { out.reset(); return; } if(A.is_vec()) { out.set_size(1,1); out[0] = eT(1); } else { const uword N = A.n_rows; const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N); const Row acc = sum(A); const Row sd = stddev(A); out = trans(A) * A; // out = strans(conj(A)) * A; out -= (trans(acc) * acc)/eT(N); // out -= (strans(conj(acc)) * acc)/eT(N); out /= norm_val; //out = out / (trans(sd) * sd); out /= conv_to< Mat >::from(trans(sd) * sd); } } template inline void op_cor::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_check tmp(in.m, out); const Mat& A = tmp.M; const uword norm_type = in.aux_uword_a; op_cor::direct_cor(out, A, norm_type); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_cov_bones.hpp ================================================ // Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_cov //! @{ class op_cov { public: template inline static void direct_cov(Mat& out, const Mat& X, const uword norm_type); template inline static void direct_cov(Mat< std::complex >& out, const Mat< std::complex >& X, const uword norm_type); template inline static void apply(Mat& out, const Op& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_cov_meat.hpp ================================================ // Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_cov //! @{ template inline void op_cov::direct_cov(Mat& out, const Mat& A, const uword norm_type) { arma_extra_debug_sigprint(); if(A.is_vec()) { if(A.n_rows == 1) { out = var(trans(A), norm_type); } else { out = var(A, norm_type); } } else { const uword N = A.n_rows; const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N); const Row acc = sum(A); out = trans(A) * A; out -= (trans(acc) * acc)/eT(N); out /= norm_val; } } template inline void op_cov::direct_cov(Mat< std::complex >& out, const Mat< std::complex >& A, const uword norm_type) { arma_extra_debug_sigprint(); typedef typename std::complex eT; if(A.is_vec()) { if(A.n_rows == 1) { const Mat tmp_mat = var(trans(A), norm_type); out.set_size(1,1); out[0] = tmp_mat[0]; } else { const Mat tmp_mat = var(A, norm_type); out.set_size(1,1); out[0] = tmp_mat[0]; } } else { const uword N = A.n_rows; const eT norm_val = (norm_type == 0) ? ( (N > 1) ? eT(N-1) : eT(1) ) : eT(N); const Row acc = sum(A); out = trans(A) * A; // out = strans(conj(A)) * A; out -= (trans(acc) * acc)/eT(N); // out -= (strans(conj(acc)) * acc)/eT(N); out /= norm_val; } } template inline void op_cov::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_check tmp(in.m, out); const Mat& A = tmp.M; const uword norm_type = in.aux_uword_a; op_cov::direct_cov(out, A, norm_type); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_cumsum_bones.hpp ================================================ // Copyright (C) 2010-2015 Conrad Sanderson // Copyright (C) 2010-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_cumsum //! @{ class op_cumsum_mat { public: template inline static void apply_noalias(Mat& out, const Mat& X, const uword dim); template inline static void apply(Mat& out, const Op& in); }; class op_cumsum_vec { public: template inline static void apply_noalias(Mat& out, const Mat& X); template inline static void apply(Mat& out, const Op& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_cumsum_meat.hpp ================================================ // Copyright (C) 2010-2015 Conrad Sanderson // Copyright (C) 2010-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_cumsum //! @{ template inline void op_cumsum_mat::apply_noalias(Mat& out, const Mat& X, const uword dim) { arma_extra_debug_sigprint(); out.copy_size(X); const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; if(dim == 0) { arma_extra_debug_print("op_cumsum_mat::apply(): dim = 0"); for(uword col=0; col inline void op_cumsum_mat::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap tmp(in.m); const Mat& X = tmp.M; const uword dim = in.aux_uword_a; arma_debug_check( (dim > 1), "cumsum(): parameter 'dim' must be 0 or 1" ); if(&out == &X) { Mat out2; op_cumsum_mat::apply_noalias(out2, X, dim); out.steal_mem(out2); } else { op_cumsum_mat::apply_noalias(out, X, dim); } } template inline void op_cumsum_vec::apply_noalias(Mat& out, const Mat& X) { arma_extra_debug_sigprint(); const uword n_elem = X.n_elem; out.copy_size(X); eT* out_mem = out.memptr(); const eT* X_mem = X.memptr(); eT acc = eT(0); for(uword i=0; i inline void op_cumsum_vec::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const quasi_unwrap U(in.m); const Mat& X = U.M; if(U.is_alias(out)) { Mat out2; op_cumsum_vec::apply_noalias(out2, X); out.steal_mem(out2); } else { op_cumsum_vec::apply_noalias(out, X); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_cx_scalar_bones.hpp ================================================ // Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_cx_scalar //! @{ class op_cx_scalar_times { public: template inline static void apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_times>& X ); template inline static void apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_times>& X ); }; class op_cx_scalar_plus { public: template inline static void apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_plus>& X ); template inline static void apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_plus>& X ); }; class op_cx_scalar_minus_pre { public: template inline static void apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_minus_pre>& X ); template inline static void apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_minus_pre>& X ); }; class op_cx_scalar_minus_post { public: template inline static void apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_minus_post>& X ); template inline static void apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_minus_post>& X ); }; class op_cx_scalar_div_pre { public: template inline static void apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_div_pre>& X ); template inline static void apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_div_pre>& X ); }; class op_cx_scalar_div_post { public: template inline static void apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_div_post>& X ); template inline static void apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_div_post>& X ); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_cx_scalar_meat.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_cx_scalar //! @{ template inline void op_cx_scalar_times::apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_times>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const Proxy A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); out.set_size(n_rows, n_cols); const eT k = X.aux_out_eT; eT* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { const uword n_elem = A.get_n_elem(); for(uword i=0; i inline void op_cx_scalar_plus::apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_plus>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const Proxy A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); out.set_size(n_rows, n_cols); const eT k = X.aux_out_eT; eT* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { const uword n_elem = A.get_n_elem(); for(uword i=0; i inline void op_cx_scalar_minus_pre::apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_minus_pre>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const Proxy A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); out.set_size(n_rows, n_cols); const eT k = X.aux_out_eT; eT* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { const uword n_elem = A.get_n_elem(); for(uword i=0; i inline void op_cx_scalar_minus_post::apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_minus_post>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const Proxy A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); out.set_size(n_rows, n_cols); const eT k = X.aux_out_eT; eT* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { const uword n_elem = A.get_n_elem(); for(uword i=0; i inline void op_cx_scalar_div_pre::apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_div_pre>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const Proxy A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); out.set_size(n_rows, n_cols); const eT k = X.aux_out_eT; eT* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { const uword n_elem = A.get_n_elem(); for(uword i=0; i inline void op_cx_scalar_div_post::apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_div_post>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const Proxy A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); out.set_size(n_rows, n_cols); const eT k = X.aux_out_eT; eT* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { const uword n_elem = A.get_n_elem(); for(uword i=0; i inline void op_cx_scalar_times::apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_times>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const ProxyCube A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); const uword n_slices = A.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); const eT k = X.aux_out_eT; const uword n_elem = out.n_elem; eT* out_mem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { for(uword i=0; i inline void op_cx_scalar_plus::apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_plus>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const ProxyCube A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); const uword n_slices = A.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); const eT k = X.aux_out_eT; const uword n_elem = out.n_elem; eT* out_mem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { for(uword i=0; i inline void op_cx_scalar_minus_pre::apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_minus_pre>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const ProxyCube A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); const uword n_slices = A.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); const eT k = X.aux_out_eT; const uword n_elem = out.n_elem; eT* out_mem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { for(uword i=0; i inline void op_cx_scalar_minus_post::apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_minus_post>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const ProxyCube A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); const uword n_slices = A.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); const eT k = X.aux_out_eT; const uword n_elem = out.n_elem; eT* out_mem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { for(uword i=0; i inline void op_cx_scalar_div_pre::apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_div_pre>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const ProxyCube A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); const uword n_slices = A.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); const eT k = X.aux_out_eT; const uword n_elem = out.n_elem; eT* out_mem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { for(uword i=0; i inline void op_cx_scalar_div_post::apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_div_post>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const ProxyCube A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); const uword n_slices = A.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); const eT k = X.aux_out_eT; const uword n_elem = out.n_elem; eT* out_mem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { for(uword i=0; i inline static void apply(Mat& out, const Op& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_diagmat_meat.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_diagmat //! @{ template inline void op_diagmat::apply(Mat& out, const Op& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(X.m); const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); const bool P_is_vec = (n_rows == 1) || (n_cols == 1); if(P.is_alias(out) == false) { if(P_is_vec) // generate a diagonal matrix out of a vector { const uword N = (n_rows == 1) ? n_cols : n_rows; out.zeros(N, N); if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type P_ea = P.get_ea(); for(uword i=0; i < N; ++i) { out.at(i,i) = P_ea[i]; } } else { if(n_rows == 1) { for(uword i=0; i < N; ++i) { out.at(i,i) = P.at(0,i); } } else { for(uword i=0; i < N; ++i) { out.at(i,i) = P.at(i,0); } } } } else // generate a diagonal matrix out of a matrix { arma_debug_check( (n_rows != n_cols), "diagmat(): given matrix is not square" ); out.zeros(n_rows, n_rows); for(uword i=0; i < n_rows; ++i) { out.at(i,i) = P.at(i,i); } } } else // we have aliasing { if(P_is_vec) // generate a diagonal matrix out of a vector { const uword N = (n_rows == 1) ? n_cols : n_rows; podarray tmp(N); eT* tmp_mem = tmp.memptr(); if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type P_ea = P.get_ea(); for(uword i=0; i < N; ++i) { tmp_mem[i] = P_ea[i]; } } else { if(n_rows == 1) { for(uword i=0; i < N; ++i) { tmp_mem[i] = P.at(0,i); } } else { for(uword i=0; i < N; ++i) { tmp_mem[i] = P.at(i,0); } } } out.zeros(N, N); for(uword i=0; i < N; ++i) { out.at(i,i) = tmp_mem[i]; } } else // generate a diagonal matrix out of a matrix { arma_debug_check( (n_rows != n_cols), "diagmat(): given matrix is not square" ); if( (Proxy::has_subview == false) && (Proxy::fake_mat == false) ) { // NOTE: we have aliasing and it's not due to a subview, hence we're assuming that the output matrix already has the correct size for(uword i=0; i < n_rows; ++i) { const eT val = P.at(i,i); arrayops::fill_zeros(out.colptr(i), n_rows); out.at(i,i) = val; } } else { podarray tmp(n_rows); eT* tmp_mem = tmp.memptr(); for(uword i=0; i < n_rows; ++i) { tmp_mem[i] = P.at(i,i); } out.zeros(n_rows, n_rows); for(uword i=0; i < n_rows; ++i) { out.at(i,i) = tmp_mem[i]; } } } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_diagvec_bones.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_diagvec //! @{ class op_diagvec { public: template inline static void apply(Mat& out, const Op& X); template arma_hot inline static void apply_unwrap(Mat& out, const T1& X, const uword row_offset, const uword col_offset, const uword len); template arma_hot inline static void apply_proxy(Mat& out, const Proxy& P, const uword row_offset, const uword col_offset, const uword len); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_diagvec_meat.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_diagvec //! @{ template inline void op_diagvec::apply(Mat& out, const Op& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword a = X.aux_uword_a; const uword b = X.aux_uword_b; const uword row_offset = (b > 0) ? a : 0; const uword col_offset = (b == 0) ? a : 0; const Proxy P(X.m); const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); arma_debug_check ( ((row_offset > 0) && (row_offset >= n_rows)) || ((col_offset > 0) && (col_offset >= n_cols)), "diagvec(): requested diagonal is out of bounds" ); const uword len = (std::min)(n_rows - row_offset, n_cols - col_offset); if( (is_Mat::stored_type>::value) && (Proxy::fake_mat == false) ) { op_diagvec::apply_unwrap(out, P.Q, row_offset, col_offset, len); } else { if(P.is_alias(out) == false) { op_diagvec::apply_proxy(out, P, row_offset, col_offset, len); } else { Mat tmp; op_diagvec::apply_proxy(tmp, P, row_offset, col_offset, len); out.steal_mem(tmp); } } } template arma_hot inline void op_diagvec::apply_unwrap(Mat& out, const T1& X, const uword row_offset, const uword col_offset, const uword len) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_check tmp_A(X, out); const Mat& A = tmp_A.M; out.set_size(len, 1); eT* out_mem = out.memptr(); uword i,j; for(i=0, j=1; j < len; i+=2, j+=2) { const eT tmp_i = A.at( i + row_offset, i + col_offset ); const eT tmp_j = A.at( j + row_offset, j + col_offset ); out_mem[i] = tmp_i; out_mem[j] = tmp_j; } if(i < len) { out_mem[i] = A.at( i + row_offset, i + col_offset ); } } template arma_hot inline void op_diagvec::apply_proxy(Mat& out, const Proxy& P, const uword row_offset, const uword col_offset, const uword len) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; out.set_size(len, 1); eT* out_mem = out.memptr(); uword i,j; for(i=0, j=1; j < len; i+=2, j+=2) { const eT tmp_i = P.at( i + row_offset, i + col_offset ); const eT tmp_j = P.at( j + row_offset, j + col_offset ); out_mem[i] = tmp_i; out_mem[j] = tmp_j; } if(i < len) { out_mem[i] = P.at( i + row_offset, i + col_offset ); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_dot_bones.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_dot //! @{ //! \brief //! dot product operation class op_dot { public: template arma_hot arma_pure arma_inline static typename arma_not_cx::result direct_dot_arma(const uword n_elem, const eT* const A, const eT* const B); template arma_hot arma_pure inline static typename arma_cx_only::result direct_dot_arma(const uword n_elem, const eT* const A, const eT* const B); template arma_hot arma_pure inline static typename arma_real_only::result direct_dot(const uword n_elem, const eT* const A, const eT* const B); template arma_hot arma_pure inline static typename arma_cx_only::result direct_dot(const uword n_elem, const eT* const A, const eT* const B); template arma_hot arma_pure inline static typename arma_integral_only::result direct_dot(const uword n_elem, const eT* const A, const eT* const B); template arma_hot arma_pure inline static eT direct_dot(const uword n_elem, const eT* const A, const eT* const B, const eT* C); template arma_hot inline static typename T1::elem_type apply(const T1& X, const T2& Y); template arma_hot inline static typename arma_not_cx::result apply_proxy(const Proxy& PA, const Proxy& PB); template arma_hot inline static typename arma_cx_only::result apply_proxy(const Proxy& PA, const Proxy& PB); }; //! \brief //! normalised dot product operation class op_norm_dot { public: template arma_hot inline static typename T1::elem_type apply(const T1& X, const T2& Y); }; //! \brief //! complex conjugate dot product operation class op_cdot { public: template arma_hot inline static eT direct_cdot_arma(const uword n_elem, const eT* const A, const eT* const B); template arma_hot inline static eT direct_cdot(const uword n_elem, const eT* const A, const eT* const B); template arma_hot inline static typename T1::elem_type apply (const T1& X, const T2& Y); template arma_hot inline static typename T1::elem_type apply_unwrap(const T1& X, const T2& Y); template arma_hot inline static typename T1::elem_type apply_proxy (const T1& X, const T2& Y); }; class op_dot_mixed { public: template arma_hot inline static typename promote_type::result apply(const T1& A, const T2& B); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_dot_meat.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_dot //! @{ //! for two arrays, generic version for non-complex values template arma_hot arma_pure arma_inline typename arma_not_cx::result op_dot::direct_dot_arma(const uword n_elem, const eT* const A, const eT* const B) { arma_extra_debug_sigprint(); #if defined(__FINITE_MATH_ONLY__) && (__FINITE_MATH_ONLY__ > 0) { eT val = eT(0); for(uword i=0; i arma_hot arma_pure inline typename arma_cx_only::result op_dot::direct_dot_arma(const uword n_elem, const eT* const A, const eT* const B) { arma_extra_debug_sigprint(); typedef typename get_pod_type::result T; T val_real = T(0); T val_imag = T(0); for(uword i=0; i& X = A[i]; const std::complex& Y = B[i]; const T a = X.real(); const T b = X.imag(); const T c = Y.real(); const T d = Y.imag(); val_real += (a*c) - (b*d); val_imag += (a*d) + (b*c); } return std::complex(val_real, val_imag); } //! for two arrays, float and double version template arma_hot arma_pure inline typename arma_real_only::result op_dot::direct_dot(const uword n_elem, const eT* const A, const eT* const B) { arma_extra_debug_sigprint(); if( n_elem <= 32u ) { return op_dot::direct_dot_arma(n_elem, A, B); } else { #if defined(ARMA_USE_ATLAS) { arma_extra_debug_print("atlas::cblas_dot()"); return atlas::cblas_dot(n_elem, A, B); } #elif defined(ARMA_USE_BLAS) { arma_extra_debug_print("blas::dot()"); return blas::dot(n_elem, A, B); } #else { return op_dot::direct_dot_arma(n_elem, A, B); } #endif } } //! for two arrays, complex version template inline arma_hot arma_pure typename arma_cx_only::result op_dot::direct_dot(const uword n_elem, const eT* const A, const eT* const B) { if( n_elem <= 16u ) { return op_dot::direct_dot_arma(n_elem, A, B); } else { #if defined(ARMA_USE_ATLAS) { arma_extra_debug_print("atlas::cx_cblas_dot()"); return atlas::cx_cblas_dot(n_elem, A, B); } #elif defined(ARMA_USE_BLAS) { arma_extra_debug_print("blas::dot()"); return blas::dot(n_elem, A, B); } #else { return op_dot::direct_dot_arma(n_elem, A, B); } #endif } } //! for two arrays, integral version template arma_hot arma_pure inline typename arma_integral_only::result op_dot::direct_dot(const uword n_elem, const eT* const A, const eT* const B) { return op_dot::direct_dot_arma(n_elem, A, B); } //! for three arrays template arma_hot arma_pure inline eT op_dot::direct_dot(const uword n_elem, const eT* const A, const eT* const B, const eT* C) { arma_extra_debug_sigprint(); eT val = eT(0); for(uword i=0; i arma_hot inline typename T1::elem_type op_dot::apply(const T1& X, const T2& Y) { arma_extra_debug_sigprint(); const bool prefer_at_accessor = (Proxy::prefer_at_accessor) || (Proxy::prefer_at_accessor); const bool have_direct_mem = ((is_Mat::value || is_subview_col::value) && (is_Mat::value || is_subview_col::value)); if(prefer_at_accessor || have_direct_mem) { const quasi_unwrap A(X); const quasi_unwrap B(Y); arma_debug_check( (A.M.n_elem != B.M.n_elem), "dot(): objects must have the same number of elements" ); return op_dot::direct_dot(A.M.n_elem, A.M.memptr(), B.M.memptr()); } else { if(is_subview_row::value && is_subview_row::value) { typedef typename T1::elem_type eT; const subview_row& A = reinterpret_cast< const subview_row& >(X); const subview_row& B = reinterpret_cast< const subview_row& >(Y); if( (A.m.n_rows == 1) && (B.m.n_rows == 1) ) { arma_debug_check( (A.n_elem != B.n_elem), "dot(): objects must have the same number of elements" ); const eT* A_mem = A.m.memptr(); const eT* B_mem = B.m.memptr(); return op_dot::direct_dot(A.n_elem, &A_mem[A.aux_col1], &B_mem[B.aux_col1]); } } const Proxy PA(X); const Proxy PB(Y); arma_debug_check( (PA.get_n_elem() != PB.get_n_elem()), "dot(): objects must have the same number of elements" ); if(is_Mat::stored_type>::value && is_Mat::stored_type>::value) { const quasi_unwrap::stored_type> A(PA.Q); const quasi_unwrap::stored_type> B(PB.Q); return op_dot::direct_dot(A.M.n_elem, A.M.memptr(), B.M.memptr()); } return op_dot::apply_proxy(PA,PB); } } template arma_hot inline typename arma_not_cx::result op_dot::apply_proxy(const Proxy& PA, const Proxy& PB) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename Proxy::ea_type ea_type1; typedef typename Proxy::ea_type ea_type2; const uword N = PA.get_n_elem(); ea_type1 A = PA.get_ea(); ea_type2 B = PB.get_ea(); eT val1 = eT(0); eT val2 = eT(0); uword i,j; for(i=0, j=1; j arma_hot inline typename arma_cx_only::result op_dot::apply_proxy(const Proxy& PA, const Proxy& PB) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; typedef typename Proxy::ea_type ea_type1; typedef typename Proxy::ea_type ea_type2; const uword N = PA.get_n_elem(); ea_type1 A = PA.get_ea(); ea_type2 B = PB.get_ea(); T val_real = T(0); T val_imag = T(0); for(uword i=0; i xx = A[i]; const std::complex yy = B[i]; const T a = xx.real(); const T b = xx.imag(); const T c = yy.real(); const T d = yy.imag(); val_real += (a*c) - (b*d); val_imag += (a*d) + (b*c); } return std::complex(val_real, val_imag); } // // op_norm_dot template arma_hot inline typename T1::elem_type op_norm_dot::apply(const T1& X, const T2& Y) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename T1::pod_type T; const quasi_unwrap tmp1(X); const quasi_unwrap tmp2(Y); const Col A( const_cast(tmp1.M.memptr()), tmp1.M.n_elem, false ); const Col B( const_cast(tmp2.M.memptr()), tmp2.M.n_elem, false ); arma_debug_check( (A.n_elem != B.n_elem), "norm_dot(): objects must have the same number of elements" ); const T denom = norm(A,2) * norm(B,2); return (denom != T(0)) ? ( op_dot::apply(A,B) / denom ) : eT(0); } // // op_cdot template arma_hot arma_pure inline eT op_cdot::direct_cdot_arma(const uword n_elem, const eT* const A, const eT* const B) { arma_extra_debug_sigprint(); typedef typename get_pod_type::result T; T val_real = T(0); T val_imag = T(0); for(uword i=0; i& X = A[i]; const std::complex& Y = B[i]; const T a = X.real(); const T b = X.imag(); const T c = Y.real(); const T d = Y.imag(); val_real += (a*c) + (b*d); val_imag += (a*d) - (b*c); } return std::complex(val_real, val_imag); } template arma_hot arma_pure inline eT op_cdot::direct_cdot(const uword n_elem, const eT* const A, const eT* const B) { arma_extra_debug_sigprint(); if( n_elem <= 32u ) { return op_cdot::direct_cdot_arma(n_elem, A, B); } else { #if defined(ARMA_USE_BLAS) { arma_extra_debug_print("blas::gemv()"); // using gemv() workaround due to compatibility issues with cdotc() and zdotc() const char trans = 'C'; const blas_int m = blas_int(n_elem); const blas_int n = 1; //const blas_int lda = (n_elem > 0) ? blas_int(n_elem) : blas_int(1); const blas_int inc = 1; const eT alpha = eT(1); const eT beta = eT(0); eT result[2]; // paranoia: using two elements instead of one //blas::gemv(&trans, &m, &n, &alpha, A, &lda, B, &inc, &beta, &result[0], &inc); blas::gemv(&trans, &m, &n, &alpha, A, &m, B, &inc, &beta, &result[0], &inc); return result[0]; } #elif defined(ARMA_USE_ATLAS) { // TODO: use dedicated atlas functions cblas_cdotc_sub() and cblas_zdotc_sub() and retune threshold return op_cdot::direct_cdot_arma(n_elem, A, B); } #else { return op_cdot::direct_cdot_arma(n_elem, A, B); } #endif } } template arma_hot inline typename T1::elem_type op_cdot::apply(const T1& X, const T2& Y) { arma_extra_debug_sigprint(); if( (is_Mat::value == true) && (is_Mat::value == true) ) { return op_cdot::apply_unwrap(X,Y); } else { return op_cdot::apply_proxy(X,Y); } } template arma_hot inline typename T1::elem_type op_cdot::apply_unwrap(const T1& X, const T2& Y) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap tmp1(X); const unwrap tmp2(Y); const Mat& A = tmp1.M; const Mat& B = tmp2.M; arma_debug_check( (A.n_elem != B.n_elem), "cdot(): objects must have the same number of elements" ); return op_cdot::direct_cdot( A.n_elem, A.mem, B.mem ); } template arma_hot inline typename T1::elem_type op_cdot::apply_proxy(const T1& X, const T2& Y) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; typedef typename Proxy::ea_type ea_type1; typedef typename Proxy::ea_type ea_type2; const bool prefer_at_accessor = (Proxy::prefer_at_accessor) || (Proxy::prefer_at_accessor); if(prefer_at_accessor == false) { const Proxy PA(X); const Proxy PB(Y); const uword N = PA.get_n_elem(); arma_debug_check( (N != PB.get_n_elem()), "cdot(): objects must have the same number of elements" ); ea_type1 A = PA.get_ea(); ea_type2 B = PB.get_ea(); T val_real = T(0); T val_imag = T(0); for(uword i=0; i AA = A[i]; const std::complex BB = B[i]; const T a = AA.real(); const T b = AA.imag(); const T c = BB.real(); const T d = BB.imag(); val_real += (a*c) + (b*d); val_imag += (a*d) - (b*c); } return std::complex(val_real, val_imag); } else { return op_cdot::apply_unwrap( X, Y ); } } template arma_hot inline typename promote_type::result op_dot_mixed::apply(const T1& A, const T2& B) { arma_extra_debug_sigprint(); typedef typename T1::elem_type in_eT1; typedef typename T2::elem_type in_eT2; typedef typename promote_type::result out_eT; const Proxy PA(A); const Proxy PB(B); const uword N = PA.get_n_elem(); arma_debug_check( (N != PB.get_n_elem()), "dot(): objects must have the same number of elements" ); out_eT acc = out_eT(0); for(uword i=0; i < N; ++i) { acc += upgrade_val::apply(PA[i]) * upgrade_val::apply(PB[i]); } return acc; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_dotext_bones.hpp ================================================ // Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_dotext //! @{ class op_dotext { public: template inline static eT direct_rowvec_mat_colvec (const eT* A_mem, const Mat& B, const eT* C_mem); template inline static eT direct_rowvec_transmat_colvec (const eT* A_mem, const Mat& B, const eT* C_mem); template inline static eT direct_rowvec_diagmat_colvec (const eT* A_mem, const Mat& B, const eT* C_mem); template inline static eT direct_rowvec_invdiagmat_colvec(const eT* A_mem, const Mat& B, const eT* C_mem); template inline static eT direct_rowvec_invdiagvec_colvec(const eT* A_mem, const Mat& B, const eT* C_mem); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_dotext_meat.hpp ================================================ // Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_dotext //! @{ template inline eT op_dotext::direct_rowvec_mat_colvec ( const eT* A_mem, const Mat& B, const eT* C_mem ) { arma_extra_debug_sigprint(); const uword cost_AB = B.n_cols; const uword cost_BC = B.n_rows; if(cost_AB <= cost_BC) { podarray tmp(B.n_cols); for(uword col=0; col tmp(B.n_rows); for(uword row=0; row inline eT op_dotext::direct_rowvec_transmat_colvec ( const eT* A_mem, const Mat& B, const eT* C_mem ) { arma_extra_debug_sigprint(); const uword cost_AB = B.n_rows; const uword cost_BC = B.n_cols; if(cost_AB <= cost_BC) { podarray tmp(B.n_rows); for(uword row=0; row tmp(B.n_cols); for(uword col=0; col inline eT op_dotext::direct_rowvec_diagmat_colvec ( const eT* A_mem, const Mat& B, const eT* C_mem ) { arma_extra_debug_sigprint(); eT val = eT(0); for(uword i=0; i inline eT op_dotext::direct_rowvec_invdiagmat_colvec ( const eT* A_mem, const Mat& B, const eT* C_mem ) { arma_extra_debug_sigprint(); eT val = eT(0); for(uword i=0; i inline eT op_dotext::direct_rowvec_invdiagvec_colvec ( const eT* A_mem, const Mat& B, const eT* C_mem ) { arma_extra_debug_sigprint(); const eT* B_mem = B.mem; eT val = eT(0); for(uword i=0; i inline static void apply(Mat& out, const Op& expr); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_expmat_meat.hpp ================================================ // Copyright (C) 2014 Conrad Sanderson // Copyright (C) 2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_expmat //! @{ //! implementation based on: //! Cleve Moler, Charles Van Loan. //! Nineteen Dubious Ways to Compute the Exponential of a Matrix, Twenty-Five Years Later. //! SIAM Review, Vol. 45, No. 1, 2003, pp. 3-49. //! http://dx.doi.org/10.1137/S00361445024180 template inline void op_expmat::apply(Mat& out, const Op& expr) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename T1::pod_type T; if(is_op_diagmat::value) { out = expr.m; // force the evaluation of diagmat() const uword n_rows = out.n_rows; for(uword i=0; i tmp(expr.m); const Mat& A = tmp.M; arma_debug_check( (A.is_square() == false), "expmat(): given matrix is not square sized" ); const T norm_val = arma::norm(A, "inf"); const double log2_val = (norm_val > T(0)) ? double(eop_aux::log2(norm_val)) : double(0); int exponent = int(0); std::frexp(log2_val, &exponent); const uword s = uword( (std::max)(int(0), exponent + int(1)) ); const Mat AA = A / eT(eop_aux::pow(double(2), double(s))); T c = T(0.5); Mat E(AA.n_rows, AA.n_rows, fill::eye); E += c * AA; Mat D(AA.n_rows, AA.n_rows, fill::eye); D -= c * AA; Mat X = AA; bool positive = true; const uword N = 6; for(uword i = 2; i <= N; ++i) { c = c * T(N - i + 1) / T(i * (2*N - i + 1)); X = AA * X; E += c * X; if(positive) { D += c * X; } else { D -= c * X; } positive = (positive) ? false : true; } out = solve(D, E); for(uword i=0; i < s; ++i) { out = out * out; } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_fft_bones.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_fft //! @{ class op_fft_real { public: template inline static void apply( Mat< std::complex >& out, const mtOp,T1,op_fft_real>& in ); }; class op_fft_cx { public: template inline static void apply( Mat& out, const Op& in ); template inline static void apply_noalias(Mat& out, const Proxy& P, const uword a, const uword b); template arma_hot inline static void copy_vec (typename Proxy::elem_type* dest, const Proxy& P, const uword N); template arma_hot inline static void copy_vec_proxy (typename Proxy::elem_type* dest, const Proxy& P, const uword N); template arma_hot inline static void copy_vec_unwrap(typename Proxy::elem_type* dest, const Proxy& P, const uword N); }; class op_ifft_cx { public: template inline static void apply( Mat& out, const Op& in ); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_fft_meat.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_fft //! @{ // // op_fft_real template inline void op_fft_real::apply( Mat< std::complex >& out, const mtOp,T1,op_fft_real>& in ) { arma_extra_debug_sigprint(); typedef typename T1::pod_type in_eT; typedef typename std::complex out_eT; const Proxy P(in.m); const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); const uword n_elem = P.get_n_elem(); const bool is_vec = ( (n_rows == 1) || (n_cols == 1) ); const uword N_orig = (is_vec) ? n_elem : n_rows; const uword N_user = (in.aux_uword_b == 0) ? in.aux_uword_a : N_orig; fft_engine worker(N_user); // no need to worry about aliasing, as we're going from a real object to complex complex, which by definition cannot alias if(is_vec) { (n_cols == 1) ? out.set_size(N_user, 1) : out.set_size(1, N_user); if( (out.n_elem == 0) || (N_orig == 0) ) { out.zeros(); return; } if( (N_user == 1) && (N_orig >= 1) ) { out[0] = out_eT( P[0] ); return; } podarray data(N_user); out_eT* data_mem = data.memptr(); if(N_user > N_orig) { arrayops::fill_zeros( &data_mem[N_orig], (N_user - N_orig) ); } const uword N = (std::min)(N_user, N_orig); if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type X = P.get_ea(); for(uword i=0; i < N; ++i) { data_mem[i] = out_eT( X[i], in_eT(0) ); } } else { if(n_cols == 1) { for(uword i=0; i < N; ++i) { data_mem[i] = out_eT( P.at(i,0), in_eT(0) ); } } else { for(uword i=0; i < N; ++i) { data_mem[i] = out_eT( P.at(0,i), in_eT(0) ); } } } worker.run( out.memptr(), data_mem ); } else { // process each column seperately out.set_size(N_user, n_cols); if( (out.n_elem == 0) || (N_orig == 0) ) { out.zeros(); return; } if( (N_user == 1) && (N_orig >= 1) ) { for(uword col=0; col < n_cols; ++col) { out.at(0,col) = out_eT( P.at(0,col) ); } return; } podarray data(N_user); out_eT* data_mem = data.memptr(); if(N_user > N_orig) { arrayops::fill_zeros( &data_mem[N_orig], (N_user - N_orig) ); } const uword N = (std::min)(N_user, N_orig); for(uword col=0; col < n_cols; ++col) { for(uword i=0; i < N; ++i) { data_mem[i] = P.at(i, col); } worker.run( out.colptr(col), data_mem ); } } } // // op_fft_cx template inline void op_fft_cx::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(in.m); if(P.is_alias(out) == false) { op_fft_cx::apply_noalias(out, P, in.aux_uword_a, in.aux_uword_b); } else { Mat tmp; op_fft_cx::apply_noalias(tmp, P, in.aux_uword_a, in.aux_uword_b); out.steal_mem(tmp); } } template inline void op_fft_cx::apply_noalias(Mat& out, const Proxy& P, const uword a, const uword b) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); const uword n_elem = P.get_n_elem(); const bool is_vec = ( (n_rows == 1) || (n_cols == 1) ); const uword N_orig = (is_vec) ? n_elem : n_rows; const uword N_user = (b == 0) ? a : N_orig; fft_engine worker(N_user); if(is_vec) { (n_cols == 1) ? out.set_size(N_user, 1) : out.set_size(1, N_user); if( (out.n_elem == 0) || (N_orig == 0) ) { out.zeros(); return; } if( (N_user == 1) && (N_orig >= 1) ) { out[0] = P[0]; return; } if( (N_user > N_orig) || (is_Mat::stored_type>::value == false) ) { podarray data(N_user); eT* data_mem = data.memptr(); if(N_user > N_orig) { arrayops::fill_zeros( &data_mem[N_orig], (N_user - N_orig) ); } op_fft_cx::copy_vec( data_mem, P, (std::min)(N_user, N_orig) ); worker.run( out.memptr(), data_mem ); } else { const unwrap< typename Proxy::stored_type > tmp(P.Q); worker.run( out.memptr(), tmp.M.memptr() ); } } else { // process each column seperately out.set_size(N_user, n_cols); if( (out.n_elem == 0) || (N_orig == 0) ) { out.zeros(); return; } if( (N_user == 1) && (N_orig >= 1) ) { for(uword col=0; col < n_cols; ++col) { out.at(0,col) = P.at(0,col); } return; } if( (N_user > N_orig) || (is_Mat::stored_type>::value == false) ) { podarray data(N_user); eT* data_mem = data.memptr(); if(N_user > N_orig) { arrayops::fill_zeros( &data_mem[N_orig], (N_user - N_orig) ); } const uword N = (std::min)(N_user, N_orig); for(uword col=0; col < n_cols; ++col) { for(uword i=0; i < N; ++i) { data_mem[i] = P.at(i, col); } worker.run( out.colptr(col), data_mem ); } } else { const unwrap< typename Proxy::stored_type > tmp(P.Q); for(uword col=0; col < n_cols; ++col) { worker.run( out.colptr(col), tmp.M.colptr(col) ); } } } // correct the scaling for the inverse transform if(inverse == true) { typedef typename get_pod_type::result T; const T k = T(1) / T(N_user); eT* out_mem = out.memptr(); const uword out_n_elem = out.n_elem; for(uword i=0; i < out_n_elem; ++i) { out_mem[i] *= k; } } } template arma_hot inline void op_fft_cx::copy_vec(typename Proxy::elem_type* dest, const Proxy& P, const uword N) { arma_extra_debug_sigprint(); if(is_Mat< typename Proxy::stored_type >::value == true) { op_fft_cx::copy_vec_unwrap(dest, P, N); } else { op_fft_cx::copy_vec_proxy(dest, P, N); } } template arma_hot inline void op_fft_cx::copy_vec_unwrap(typename Proxy::elem_type* dest, const Proxy& P, const uword N) { arma_extra_debug_sigprint(); const unwrap< typename Proxy::stored_type > tmp(P.Q); arrayops::copy(dest, tmp.M.memptr(), N); } template arma_hot inline void op_fft_cx::copy_vec_proxy(typename Proxy::elem_type* dest, const Proxy& P, const uword N) { arma_extra_debug_sigprint(); if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type X = P.get_ea(); for(uword i=0; i < N; ++i) { dest[i] = X[i]; } } else { if(P.get_n_cols() == 1) { for(uword i=0; i < N; ++i) { dest[i] = P.at(i,0); } } else { for(uword i=0; i < N; ++i) { dest[i] = P.at(0,i); } } } } // // op_ifft_cx template inline void op_ifft_cx::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(in.m); if(P.is_alias(out) == false) { op_fft_cx::apply_noalias(out, P, in.aux_uword_a, in.aux_uword_b); } else { Mat tmp; op_fft_cx::apply_noalias(tmp, P, in.aux_uword_a, in.aux_uword_b); out.steal_mem(tmp); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_find_bones.hpp ================================================ // Copyright (C) 2010-2014 Conrad Sanderson // Copyright (C) 2010-2014 NICTA (www.nicta.com.au) // Copyright (C) 2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_find //! @{ class op_find { public: template inline static uword helper ( Mat& indices, const Base& X ); template inline static uword helper ( Mat& indices, const mtOp& X, const typename arma_op_rel_only::result junk1 = 0, const typename arma_not_cx::result junk2 = 0 ); template inline static uword helper ( Mat& indices, const mtOp& X, const typename arma_op_rel_only::result junk1 = 0, const typename arma_cx_only::result junk2 = 0 ); template inline static uword helper ( Mat& indices, const mtGlue& X, const typename arma_glue_rel_only::result junk1 = 0, const typename arma_not_cx::result junk2 = 0, const typename arma_not_cx::result junk3 = 0 ); template inline static uword helper ( Mat& indices, const mtGlue& X, const typename arma_glue_rel_only::result junk1 = 0, const typename arma_cx_only::result junk2 = 0, const typename arma_cx_only::result junk3 = 0 ); template inline static void apply(Mat& out, const mtOp& X); }; class op_find_simple { public: template inline static void apply(Mat& out, const mtOp& X); }; class op_find_finite { public: template inline static void apply(Mat& out, const mtOp& X); }; class op_find_nonfinite { public: template inline static void apply(Mat& out, const mtOp& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_find_meat.hpp ================================================ // Copyright (C) 2010-2014 Conrad Sanderson // Copyright (C) 2010-2014 NICTA (www.nicta.com.au) // Copyright (C) 2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_find //! @{ template inline uword op_find::helper ( Mat& indices, const Base& X ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy A(X.get_ref()); const uword n_elem = A.get_n_elem(); indices.set_size(n_elem, 1); uword* indices_mem = indices.memptr(); uword n_nz = 0; if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type PA = A.get_ea(); for(uword i=0; i inline uword op_find::helper ( Mat& indices, const mtOp& X, const typename arma_op_rel_only::result junk1, const typename arma_not_cx::result junk2 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); typedef typename T1::elem_type eT; const eT val = X.aux; const Proxy A(X.m); const uword n_elem = A.get_n_elem(); indices.set_size(n_elem, 1); uword* indices_mem = indices.memptr(); uword n_nz = 0; if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type PA = A.get_ea(); uword i,j; for(i=0, j=1; j < n_elem; i+=2, j+=2) { const eT tpi = PA[i]; const eT tpj = PA[j]; bool not_zero_i; bool not_zero_j; if(is_same_type::yes) { not_zero_i = (val < tpi); } else if(is_same_type::yes) { not_zero_i = (tpi < val); } else if(is_same_type::yes) { not_zero_i = (val > tpi); } else if(is_same_type::yes) { not_zero_i = (tpi > val); } else if(is_same_type::yes) { not_zero_i = (val <= tpi); } else if(is_same_type::yes) { not_zero_i = (tpi <= val); } else if(is_same_type::yes) { not_zero_i = (val >= tpi); } else if(is_same_type::yes) { not_zero_i = (tpi >= val); } else if(is_same_type::yes) { not_zero_i = (tpi == val); } else if(is_same_type::yes) { not_zero_i = (tpi != val); } else not_zero_i = false; if(is_same_type::yes) { not_zero_j = (val < tpj); } else if(is_same_type::yes) { not_zero_j = (tpj < val); } else if(is_same_type::yes) { not_zero_j = (val > tpj); } else if(is_same_type::yes) { not_zero_j = (tpj > val); } else if(is_same_type::yes) { not_zero_j = (val <= tpj); } else if(is_same_type::yes) { not_zero_j = (tpj <= val); } else if(is_same_type::yes) { not_zero_j = (val >= tpj); } else if(is_same_type::yes) { not_zero_j = (tpj >= val); } else if(is_same_type::yes) { not_zero_j = (tpj == val); } else if(is_same_type::yes) { not_zero_j = (tpj != val); } else not_zero_j = false; if(not_zero_i == true) { indices_mem[n_nz] = i; ++n_nz; } if(not_zero_j == true) { indices_mem[n_nz] = j; ++n_nz; } } if(i < n_elem) { bool not_zero; const eT tmp = PA[i]; if(is_same_type::yes) { not_zero = (val < tmp); } else if(is_same_type::yes) { not_zero = (tmp < val); } else if(is_same_type::yes) { not_zero = (val > tmp); } else if(is_same_type::yes) { not_zero = (tmp > val); } else if(is_same_type::yes) { not_zero = (val <= tmp); } else if(is_same_type::yes) { not_zero = (tmp <= val); } else if(is_same_type::yes) { not_zero = (val >= tmp); } else if(is_same_type::yes) { not_zero = (tmp >= val); } else if(is_same_type::yes) { not_zero = (tmp == val); } else if(is_same_type::yes) { not_zero = (tmp != val); } else not_zero = false; if(not_zero == true) { indices_mem[n_nz] = i; ++n_nz; } } } else { const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); uword i = 0; for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { const eT tmp = A.at(row,col); bool not_zero; if(is_same_type::yes) { not_zero = (val < tmp); } else if(is_same_type::yes) { not_zero = (tmp < val); } else if(is_same_type::yes) { not_zero = (val > tmp); } else if(is_same_type::yes) { not_zero = (tmp > val); } else if(is_same_type::yes) { not_zero = (val <= tmp); } else if(is_same_type::yes) { not_zero = (tmp <= val); } else if(is_same_type::yes) { not_zero = (val >= tmp); } else if(is_same_type::yes) { not_zero = (tmp >= val); } else if(is_same_type::yes) { not_zero = (tmp == val); } else if(is_same_type::yes) { not_zero = (tmp != val); } else not_zero = false; if(not_zero == true) { indices_mem[n_nz] = i; ++n_nz; } ++i; } } return n_nz; } template inline uword op_find::helper ( Mat& indices, const mtOp& X, const typename arma_op_rel_only::result junk1, const typename arma_cx_only::result junk2 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); typedef typename T1::elem_type eT; typedef typename Proxy::ea_type ea_type; const eT val = X.aux; const Proxy A(X.m); ea_type PA = A.get_ea(); const uword n_elem = A.get_n_elem(); indices.set_size(n_elem, 1); uword* indices_mem = indices.memptr(); uword n_nz = 0; if(Proxy::prefer_at_accessor == false) { for(uword i=0; i::yes) { not_zero = (tmp == val); } else if(is_same_type::yes) { not_zero = (tmp != val); } else not_zero = false; if(not_zero == true) { indices_mem[n_nz] = i; ++n_nz; } } } else { const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); uword i = 0; for(uword col=0; col::yes) { not_zero = (tmp == val); } else if(is_same_type::yes) { not_zero = (tmp != val); } else not_zero = false; if(not_zero == true) { indices_mem[n_nz] = i; ++n_nz; } i++; } } return n_nz; } template inline uword op_find::helper ( Mat& indices, const mtGlue& X, const typename arma_glue_rel_only::result junk1, const typename arma_not_cx::result junk2, const typename arma_not_cx::result junk3 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); arma_ignore(junk3); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename Proxy::ea_type ea_type1; typedef typename Proxy::ea_type ea_type2; const Proxy A(X.A); const Proxy B(X.B); arma_debug_assert_same_size(A, B, "relational operator"); ea_type1 PA = A.get_ea(); ea_type2 PB = B.get_ea(); const uword n_elem = B.get_n_elem(); indices.set_size(n_elem, 1); uword* indices_mem = indices.memptr(); uword n_nz = 0; for(uword i=0; i::yes) { not_zero = (tmp1 < tmp2); } else if(is_same_type::yes) { not_zero = (tmp1 > tmp2); } else if(is_same_type::yes) { not_zero = (tmp1 <= tmp2); } else if(is_same_type::yes) { not_zero = (tmp1 >= tmp2); } else if(is_same_type::yes) { not_zero = (tmp1 == tmp2); } else if(is_same_type::yes) { not_zero = (tmp1 != tmp2); } else if(is_same_type::yes) { not_zero = (tmp1 && tmp2); } else if(is_same_type::yes) { not_zero = (tmp1 || tmp2); } else not_zero = false; if(not_zero == true) { indices_mem[n_nz] = i; ++n_nz; } } return n_nz; } template inline uword op_find::helper ( Mat& indices, const mtGlue& X, const typename arma_glue_rel_only::result junk1, const typename arma_cx_only::result junk2, const typename arma_cx_only::result junk3 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); arma_ignore(junk3); typedef typename Proxy::ea_type ea_type1; typedef typename Proxy::ea_type ea_type2; const Proxy A(X.A); const Proxy B(X.B); arma_debug_assert_same_size(A, B, "relational operator"); ea_type1 PA = A.get_ea(); ea_type2 PB = B.get_ea(); const uword n_elem = B.get_n_elem(); indices.set_size(n_elem, 1); uword* indices_mem = indices.memptr(); uword n_nz = 0; if(Proxy::prefer_at_accessor == false) { for(uword i=0; i::yes) { not_zero = (PA[i] == PB[i]); } else if(is_same_type::yes) { not_zero = (PA[i] != PB[i]); } else not_zero = false; if(not_zero == true) { indices_mem[n_nz] = i; ++n_nz; } } } else { const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); uword i = 0; for(uword col=0; col::yes) { not_zero = (A.at(row,col) == B.at(row,col)); } else if(is_same_type::yes) { not_zero = (A.at(row,col) != B.at(row,col)); } else not_zero = false; if(not_zero == true) { indices_mem[n_nz] = i; ++n_nz; } i++; } } return n_nz; } template inline void op_find::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); const uword k = X.aux_uword_a; const uword type = X.aux_uword_b; Mat indices; const uword n_nz = op_find::helper(indices, X.m); if(n_nz > 0) { if(type == 0) // "first" { out = (k > 0 && k <= n_nz) ? indices.rows(0, k-1 ) : indices.rows(0, n_nz-1); } else // "last" { out = (k > 0 && k <= n_nz) ? indices.rows(n_nz-k, n_nz-1) : indices.rows(0, n_nz-1); } } else { out.set_size(0,1); // empty column vector } } // template inline void op_find_simple::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); Mat indices; const uword n_nz = op_find::helper(indices, X.m); out.steal_mem_col(indices, n_nz); } // template inline void op_find_finite::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); const Proxy P(X.m); const uword n_elem = P.get_n_elem(); Mat indices(n_elem,1); uword* indices_mem = indices.memptr(); uword count = 0; if(Proxy::prefer_at_accessor == false) { const typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i inline void op_find_nonfinite::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); const Proxy P(X.m); const uword n_elem = P.get_n_elem(); Mat indices(n_elem,1); uword* indices_mem = indices.memptr(); uword count = 0; if(Proxy::prefer_at_accessor == false) { const typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i inline static void apply(Mat& out, const Op& in); }; class op_fliplr { public: template inline static void apply(Mat& out, const Op& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_flip_meat.hpp ================================================ // Copyright (C) 2010-2015 Conrad Sanderson // Copyright (C) 2010-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_flip //! @{ template inline void op_flipud::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap tmp(in.m); const Mat& X = tmp.M; const uword X_n_rows = X.n_rows; if(&out != &X) { out.copy_size(X); if(T1::is_col || X.is_colvec()) { for(uword i=0; i inline void op_fliplr::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap tmp(in.m); const Mat& X = tmp.M; const uword X_n_cols = X.n_cols; if(&out != &X) { out.copy_size(X); if(T1::is_row || X.is_rowvec()) { for(uword i=0; i inline static void apply(Mat& out, const mtOp& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_hist_meat.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_hist //! @{ template inline void op_hist::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword n_bins = X.aux_uword_a; const unwrap_check_mixed tmp(X.m, out); const Mat& A = tmp.M; uword A_n_elem = A.n_elem; const eT* A_mem = A.memptr(); eT min_val = priv::most_pos(); eT max_val = priv::most_neg(); uword i,j; for(i=0, j=1; j < A_n_elem; i+=2, j+=2) { const eT val_i = A_mem[i]; const eT val_j = A_mem[j]; if(min_val > val_i) { min_val = val_i; } if(min_val > val_j) { min_val = val_j; } if(max_val < val_i) { max_val = val_i; } if(max_val < val_j) { max_val = val_j; } } if(i < A_n_elem) { const eT val_i = A_mem[i]; if(min_val > val_i) { min_val = val_i; } if(max_val < val_i) { max_val = val_i; } } if(arma_isfinite(min_val) == false) { min_val = priv::most_neg(); } if(arma_isfinite(max_val) == false) { max_val = priv::most_pos(); } if(n_bins >= 1) { Col c(n_bins); eT* c_mem = c.memptr(); for(uword ii=0; ii < n_bins; ++ii) { c_mem[ii] = (0.5 + ii) / double(n_bins); // TODO: may need to be modified for integer matrices } c = ((max_val - min_val) * c) + min_val; out = hist(A, c); } else { out.reset(); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_htrans_bones.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_htrans //! @{ //! 'hermitian transpose' operation class op_htrans { public: template arma_hot arma_inline static void apply_mat_noalias(Mat& out, const Mat& A, const typename arma_not_cx::result* junk = 0); template arma_hot inline static void apply_mat_noalias(Mat& out, const Mat& A, const typename arma_cx_only::result* junk = 0); // template arma_hot arma_inline static void apply_mat_inplace(Mat& out, const typename arma_not_cx::result* junk = 0); template arma_hot inline static void apply_mat_inplace(Mat& out, const typename arma_cx_only::result* junk = 0); // template arma_hot arma_inline static void apply_mat(Mat& out, const Mat& A, const typename arma_not_cx::result* junk = 0); template arma_hot inline static void apply_mat(Mat& out, const Mat& A, const typename arma_cx_only::result* junk = 0); // template arma_hot inline static void apply_proxy(Mat& out, const T1& X); // template arma_hot inline static void apply(Mat& out, const Op& in, const typename arma_not_cx::result* junk = 0); template arma_hot inline static void apply(Mat& out, const Op& in, const typename arma_cx_only::result* junk = 0); // template arma_hot inline static void apply(Mat& out, const Op< Op, op_htrans>& in); }; class op_htrans2 { public: template arma_hot inline static void apply_noalias(Mat& out, const Mat& A, const eT val); template arma_hot inline static void apply(Mat& out, const Mat& A, const eT val); // template arma_hot inline static void apply_proxy(Mat& out, const T1& X, const typename T1::elem_type val); // template arma_hot inline static void apply(Mat& out, const Op& in, const typename arma_not_cx::result* junk = 0); template arma_hot inline static void apply(Mat& out, const Op& in, const typename arma_cx_only::result* junk = 0); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_htrans_meat.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // Copyright (C) 2012 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_htrans //! @{ template arma_hot arma_inline void op_htrans::apply_mat_noalias(Mat& out, const Mat& A, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); op_strans::apply_mat_noalias(out, A); } template arma_hot inline void op_htrans::apply_mat_noalias(Mat& out, const Mat& A, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; out.set_size(A_n_cols, A_n_rows); if( (A_n_cols == 1) || (A_n_rows == 1) ) { const uword n_elem = A.n_elem; const eT* A_mem = A.memptr(); eT* out_mem = out.memptr(); for(uword i=0; i < n_elem; ++i) { out_mem[i] = std::conj(A_mem[i]); } } else { eT* outptr = out.memptr(); for(uword k=0; k < A_n_rows; ++k) { const eT* Aptr = &(A.at(k,0)); for(uword j=0; j < A_n_cols; ++j) { (*outptr) = std::conj(*Aptr); Aptr += A_n_rows; outptr++; } } } } template arma_hot arma_inline void op_htrans::apply_mat_inplace(Mat& out, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); op_strans::apply_mat_inplace(out); } template arma_hot inline void op_htrans::apply_mat_inplace(Mat& out, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const uword n_rows = out.n_rows; const uword n_cols = out.n_cols; if(n_rows == n_cols) { arma_extra_debug_print("doing in-place hermitian transpose of a square matrix"); for(uword col=0; col < n_cols; ++col) { eT* coldata = out.colptr(col); out.at(col,col) = std::conj( out.at(col,col) ); for(uword row=(col+1); row < n_rows; ++row) { const eT val1 = std::conj(coldata[row]); const eT val2 = std::conj(out.at(col,row)); out.at(col,row) = val1; coldata[row] = val2; } } } else { Mat tmp; op_htrans::apply_mat_noalias(tmp, out); out.steal_mem(tmp); } } template arma_hot arma_inline void op_htrans::apply_mat(Mat& out, const Mat& A, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); op_strans::apply_mat(out, A); } template arma_hot inline void op_htrans::apply_mat(Mat& out, const Mat& A, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); if(&out != &A) { op_htrans::apply_mat_noalias(out, A); } else { op_htrans::apply_mat_inplace(out); } } template arma_hot inline void op_htrans::apply_proxy(Mat& out, const T1& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(X); // allow detection of in-place transpose if( (is_Mat::stored_type>::value == true) && (Proxy::fake_mat == false) ) { const unwrap::stored_type> tmp(P.Q); op_htrans::apply_mat(out, tmp.M); } else { const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); const bool is_alias = P.is_alias(out); if( (resolves_to_vector::value == true) && (Proxy::prefer_at_accessor == false) ) { if(is_alias == false) { out.set_size(n_cols, n_rows); eT* out_mem = out.memptr(); const uword n_elem = P.get_n_elem(); typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i < n_elem; ++i) { out_mem[i] = std::conj(Pea[i]); } } else // aliasing { Mat out2(n_cols, n_rows); eT* out_mem = out2.memptr(); const uword n_elem = P.get_n_elem(); typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i < n_elem; ++i) { out_mem[i] = std::conj(Pea[i]); } out.steal_mem(out2); } } else { if(is_alias == false) { out.set_size(n_cols, n_rows); eT* outptr = out.memptr(); for(uword k=0; k < n_rows; ++k) { for(uword j=0; j < n_cols; ++j) { (*outptr) = std::conj(P.at(k,j)); outptr++; } } } else // aliasing { Mat out2(n_cols, n_rows); eT* out2ptr = out2.memptr(); for(uword k=0; k < n_rows; ++k) { for(uword j=0; j < n_cols; ++j) { (*out2ptr) = std::conj(P.at(k,j)); out2ptr++; } } out.steal_mem(out2); } } } } template arma_hot inline void op_htrans::apply(Mat& out, const Op& in, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); op_strans::apply_proxy(out, in.m); } template arma_hot inline void op_htrans::apply(Mat& out, const Op& in, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); op_htrans::apply_proxy(out, in.m); } template arma_hot inline void op_htrans::apply(Mat& out, const Op< Op, op_htrans>& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap tmp(in.m.m); const Mat& A = tmp.M; const bool upper = in.m.aux_uword_a; op_trimat::apply_htrans(out, A, upper); } // // op_htrans2 template arma_hot arma_inline void op_htrans2::apply_noalias(Mat& out, const Mat& A, const eT val) { arma_extra_debug_sigprint(); const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; out.set_size(A_n_cols, A_n_rows); if( (A_n_cols == 1) || (A_n_rows == 1) ) { const uword n_elem = A.n_elem; const eT* A_mem = A.memptr(); eT* out_mem = out.memptr(); for(uword i=0; i < n_elem; ++i) { out_mem[i] = val * std::conj(A_mem[i]); } } else { eT* outptr = out.memptr(); for(uword k=0; k < A_n_rows; ++k) { const eT* Aptr = &(A.at(k,0)); for(uword j=0; j < A_n_cols; ++j) { (*outptr) = val * std::conj(*Aptr); Aptr += A_n_rows; outptr++; } } } } template arma_hot inline void op_htrans2::apply(Mat& out, const Mat& A, const eT val) { arma_extra_debug_sigprint(); if(&out != &A) { op_htrans2::apply_noalias(out, A, val); } else { const uword n_rows = out.n_rows; const uword n_cols = out.n_cols; if(n_rows == n_cols) { arma_extra_debug_print("doing in-place hermitian transpose of a square matrix"); // TODO: do multiplication while swapping for(uword col=0; col < n_cols; ++col) { eT* coldata = out.colptr(col); out.at(col,col) = std::conj( out.at(col,col) ); for(uword row=(col+1); row < n_rows; ++row) { const eT val1 = std::conj(coldata[row]); const eT val2 = std::conj(out.at(col,row)); out.at(col,row) = val1; coldata[row] = val2; } } arrayops::inplace_mul( out.memptr(), val, out.n_elem ); } else { Mat tmp; op_htrans2::apply_noalias(tmp, A, val); out.steal_mem(tmp); } } } template arma_hot inline void op_htrans2::apply_proxy(Mat& out, const T1& X, const typename T1::elem_type val) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(X); // allow detection of in-place transpose if( (is_Mat::stored_type>::value == true) && (Proxy::fake_mat == false) ) { const unwrap::stored_type> tmp(P.Q); op_htrans2::apply(out, tmp.M, val); } else { const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); const bool is_alias = P.is_alias(out); if( (resolves_to_vector::value == true) && (Proxy::prefer_at_accessor == false) ) { if(is_alias == false) { out.set_size(n_cols, n_rows); eT* out_mem = out.memptr(); const uword n_elem = P.get_n_elem(); typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i < n_elem; ++i) { out_mem[i] = val * std::conj(Pea[i]); } } else // aliasing { Mat out2(n_cols, n_rows); eT* out_mem = out2.memptr(); const uword n_elem = P.get_n_elem(); typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i < n_elem; ++i) { out_mem[i] = val * std::conj(Pea[i]); } out.steal_mem(out2); } } else { if(is_alias == false) { out.set_size(n_cols, n_rows); eT* outptr = out.memptr(); for(uword k=0; k < n_rows; ++k) { for(uword j=0; j < n_cols; ++j) { (*outptr) = val * std::conj(P.at(k,j)); outptr++; } } } else // aliasing { Mat out2(n_cols, n_rows); eT* out2ptr = out2.memptr(); for(uword k=0; k < n_rows; ++k) { for(uword j=0; j < n_cols; ++j) { (*out2ptr) = val * std::conj(P.at(k,j)); out2ptr++; } } out.steal_mem(out2); } } } } template arma_hot inline void op_htrans2::apply(Mat& out, const Op& in, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); op_strans2::apply_proxy(out, in.m, in.aux); } template arma_hot inline void op_htrans2::apply(Mat& out, const Op& in, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); op_htrans2::apply_proxy(out, in.m, in.aux); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_inv_bones.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_inv //! @{ //! 'invert matrix' operation (general matrices) class op_inv { public: template inline static void apply(Mat& out, const Mat& A, const bool slow = false); template inline static void apply(Mat& out, const Op& in); template inline static bool apply_diagmat(Mat& out, const T1& X); }; //! 'invert matrix' operation (triangular matrices) class op_inv_tr { public: template inline static void apply(Mat& out, const Op& in); }; //! 'invert matrix' operation (symmetric positive definite matrices) class op_inv_sympd { public: template inline static void apply(Mat& out, const Op& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_inv_meat.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_inv //! @{ //! immediate inverse of a matrix, storing the result in a dense matrix template inline void op_inv::apply(Mat& out, const Mat& A, const bool slow) { arma_extra_debug_sigprint(); // no need to check for aliasing, due to: // - auxlib::inv() copies A to out before inversion // - for 2x2 and 3x3 matrices the code is alias safe bool status = auxlib::inv(out, A, slow); if(status == false) { out.reset(); arma_bad("inv(): matrix appears to be singular"); } } //! immediate inverse of T1, storing the result in a dense matrix template inline void op_inv::apply(Mat& out, const Op& X) { arma_extra_debug_sigprint(); const strip_diagmat strip(X.m); bool status; if(strip.do_diagmat == true) { status = op_inv::apply_diagmat(out, strip.M); } else { const uword mode = X.aux_uword_a; status = (mode == 0) ? auxlib::inv(out, X.m) : auxlib::inv(out, X.m, true); } if(status == false) { out.reset(); arma_bad("inv(): matrix appears to be singular"); } } template inline bool op_inv::apply_diagmat(Mat& out, const T1& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const diagmat_proxy A(X); const uword N = A.n_elem; bool status = true; if(A.is_alias(out) == false) { out.zeros(N,N); for(uword i=0; i tmp(N, N, fill::zeros); for(uword i=0; i inline void op_inv_tr::apply(Mat& out, const Op& X) { arma_extra_debug_sigprint(); const bool status = auxlib::inv_tr(out, X.m, X.aux_uword_a); if(status == false) { out.reset(); arma_bad("inv(): matrix appears to be singular"); } } //! inverse of T1 (symmetric positive definite matrices) template inline void op_inv_sympd::apply(Mat& out, const Op& X) { arma_extra_debug_sigprint(); const bool status = auxlib::inv_sympd(out, X.m, X.aux_uword_a); if(status == false) { out.reset(); arma_bad("inv_sympd(): matrix appears to be singular"); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_max_bones.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_max //! @{ class op_max { public: template inline static void apply(Mat& out, const Op& in); template inline static void apply_noalias(Mat& out, const Mat& X, const uword dim, const typename arma_not_cx::result* junk = 0); template inline static void apply_noalias(Mat& out, const Mat& X, const uword dim, const typename arma_cx_only::result* junk = 0); // // for non-complex numbers template inline static eT direct_max(const eT* const X, const uword N); template inline static eT direct_max(const eT* const X, const uword N, uword& index_of_max_val); template inline static eT direct_max(const Mat& X, const uword row); template inline static eT max(const subview& X); template inline static typename arma_not_cx::result max(const Base& X); template inline static typename arma_not_cx::result max_with_index(const Proxy& P, uword& index_of_max_val); // // for complex numbers template inline static std::complex direct_max(const std::complex* const X, const uword n_elem); template inline static std::complex direct_max(const std::complex* const X, const uword n_elem, uword& index_of_max_val); template inline static std::complex direct_max(const Mat< std::complex >& X, const uword row); template inline static std::complex max(const subview< std::complex >& X); template inline static typename arma_cx_only::result max(const Base& X); template inline static typename arma_cx_only::result max_with_index(const Proxy& P, uword& index_of_max_val); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_max_meat.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_max //! @{ template inline void op_max::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword dim = in.aux_uword_a; arma_debug_check( (dim > 1), "max(): parameter 'dim' must be 0 or 1"); const unwrap U(in.m); const Mat& X = U.M; if(&out != &X) { op_max::apply_noalias(out, X, dim); } else { Mat tmp; op_max::apply_noalias(tmp, X, dim); out.steal_mem(tmp); } } template inline void op_max::apply_noalias(Mat& out, const Mat& X, const uword dim, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; if(dim == 0) { arma_extra_debug_print("op_max::apply(): dim = 0"); out.set_size((X_n_rows > 0) ? 1 : 0, X_n_cols); if(X_n_rows == 0) { return; } eT* out_mem = out.memptr(); for(uword col=0; col 0) ? 1 : 0); if(X_n_cols == 0) { return; } eT* out_mem = out.memptr(); arrayops::copy(out_mem, X.colptr(0), X_n_rows); for(uword col=1; col out_mem[row]) { out_mem[row] = col_val; } } } } } template inline void op_max::apply_noalias(Mat& out, const Mat& X, const uword dim, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; if(dim == 0) { arma_extra_debug_print("op_max::apply(): dim = 0"); out.set_size((X_n_rows > 0) ? 1 : 0, X_n_cols); if(X_n_rows == 0) { return; } eT* out_mem = out.memptr(); for(uword col=0; col 0) ? 1 : 0); if(X_n_cols == 0) { return; } eT* out_mem = out.memptr(); for(uword row=0; row arma_pure inline eT op_max::direct_max(const eT* const X, const uword n_elem) { arma_extra_debug_sigprint(); eT max_val = priv::most_neg(); uword i,j; for(i=0, j=1; j max_val) { max_val = X_i; } if(X_j > max_val) { max_val = X_j; } } if(i < n_elem) { const eT X_i = X[i]; if(X_i > max_val) { max_val = X_i; } } return max_val; } template inline eT op_max::direct_max(const eT* const X, const uword n_elem, uword& index_of_max_val) { arma_extra_debug_sigprint(); eT max_val = priv::most_neg(); uword best_index = 0; uword i,j; for(i=0, j=1; j max_val) { max_val = X_i; best_index = i; } if(X_j > max_val) { max_val = X_j; best_index = j; } } if(i < n_elem) { const eT X_i = X[i]; if(X_i > max_val) { max_val = X_i; best_index = i; } } index_of_max_val = best_index; return max_val; } template inline eT op_max::direct_max(const Mat& X, const uword row) { arma_extra_debug_sigprint(); const uword X_n_cols = X.n_cols; eT max_val = priv::most_neg(); uword i,j; for(i=0, j=1; j < X_n_cols; i+=2, j+=2) { const eT tmp_i = X.at(row,i); const eT tmp_j = X.at(row,j); if(tmp_i > max_val) { max_val = tmp_i; } if(tmp_j > max_val) { max_val = tmp_j; } } if(i < X_n_cols) { const eT tmp_i = X.at(row,i); if(tmp_i > max_val) { max_val = tmp_i; } } return max_val; } template inline eT op_max::max(const subview& X) { arma_extra_debug_sigprint(); if(X.n_elem == 0) { arma_debug_check(true, "max(): object has no elements"); return Datum::nan; } const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; eT max_val = priv::most_neg(); if(X_n_rows == 1) { const Mat& A = X.m; const uword start_row = X.aux_row1; const uword start_col = X.aux_col1; const uword end_col_p1 = start_col + X_n_cols; uword i,j; for(i=start_col, j=start_col+1; j < end_col_p1; i+=2, j+=2) { const eT tmp_i = A.at(start_row, i); const eT tmp_j = A.at(start_row, j); if(tmp_i > max_val) { max_val = tmp_i; } if(tmp_j > max_val) { max_val = tmp_j; } } if(i < end_col_p1) { const eT tmp_i = A.at(start_row, i); if(tmp_i > max_val) { max_val = tmp_i; } } } else { for(uword col=0; col < X_n_cols; ++col) { max_val = (std::max)(max_val, op_max::direct_max(X.colptr(col), X_n_rows)); } } return max_val; } template inline typename arma_not_cx::result op_max::max(const Base& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(X.get_ref()); const uword n_elem = P.get_n_elem(); if(n_elem == 0) { arma_debug_check(true, "max(): object has no elements"); return Datum::nan; } eT max_val = priv::most_neg(); if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; ea_type A = P.get_ea(); uword i,j; for(i=0, j=1; j max_val) { max_val = tmp_i; } if(tmp_j > max_val) { max_val = tmp_j; } } if(i < n_elem) { const eT tmp_i = A[i]; if(tmp_i > max_val) { max_val = tmp_i; } } } else { const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); if(n_rows == 1) { uword i,j; for(i=0, j=1; j < n_cols; i+=2, j+=2) { const eT tmp_i = P.at(0,i); const eT tmp_j = P.at(0,j); if(tmp_i > max_val) { max_val = tmp_i; } if(tmp_j > max_val) { max_val = tmp_j; } } if(i < n_cols) { const eT tmp_i = P.at(0,i); if(tmp_i > max_val) { max_val = tmp_i; } } } else { for(uword col=0; col < n_cols; ++col) { uword i,j; for(i=0, j=1; j < n_rows; i+=2, j+=2) { const eT tmp_i = P.at(i,col); const eT tmp_j = P.at(j,col); if(tmp_i > max_val) { max_val = tmp_i; } if(tmp_j > max_val) { max_val = tmp_j; } } if(i < n_rows) { const eT tmp_i = P.at(i,col); if(tmp_i > max_val) { max_val = tmp_i; } } } } } return max_val; } template inline typename arma_not_cx::result op_max::max_with_index(const Proxy& P, uword& index_of_max_val) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword n_elem = P.get_n_elem(); if(n_elem == 0) { arma_debug_check(true, "max(): object has no elements"); return Datum::nan; } eT best_val = priv::most_neg(); uword best_index = 0; if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; ea_type A = P.get_ea(); for(uword i=0; i best_val) { best_val = tmp; best_index = i; } } } else { const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); if(n_rows == 1) { for(uword i=0; i < n_cols; ++i) { const eT tmp = P.at(0,i); if(tmp > best_val) { best_val = tmp; best_index = i; } } } else if(n_cols == 1) { for(uword i=0; i < n_rows; ++i) { const eT tmp = P.at(i,0); if(tmp > best_val) { best_val = tmp; best_index = i; } } } else { uword count = 0; for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { const eT tmp = P.at(row,col); if(tmp > best_val) { best_val = tmp; best_index = count; } ++count; } } } index_of_max_val = best_index; return best_val; } template inline std::complex op_max::direct_max(const std::complex* const X, const uword n_elem) { arma_extra_debug_sigprint(); uword index = 0; T max_val = priv::most_neg(); for(uword i=0; i max_val) { max_val = tmp_val; index = i; } } return X[index]; } template inline std::complex op_max::direct_max(const std::complex* const X, const uword n_elem, uword& index_of_max_val) { arma_extra_debug_sigprint(); uword index = 0; T max_val = priv::most_neg(); for(uword i=0; i max_val) { max_val = tmp_val; index = i; } } index_of_max_val = index; return X[index]; } template inline std::complex op_max::direct_max(const Mat< std::complex >& X, const uword row) { arma_extra_debug_sigprint(); const uword X_n_cols = X.n_cols; uword index = 0; T max_val = priv::most_neg(); for(uword col=0; col max_val) { max_val = tmp_val; index = col; } } return X.at(row,index); } template inline std::complex op_max::max(const subview< std::complex >& X) { arma_extra_debug_sigprint(); typedef typename std::complex eT; if(X.n_elem == 0) { arma_debug_check(true, "max(): object has no elements"); return Datum::nan; } const Mat& A = X.m; const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; const uword start_row = X.aux_row1; const uword start_col = X.aux_col1; const uword end_row_p1 = start_row + X_n_rows; const uword end_col_p1 = start_col + X_n_cols; T max_val = priv::most_neg(); uword best_row = 0; uword best_col = 0; if(X_n_rows == 1) { best_col = 0; for(uword col=start_col; col < end_col_p1; ++col) { const T tmp_val = std::abs( A.at(start_row, col) ); if(tmp_val > max_val) { max_val = tmp_val; best_col = col; } } best_row = start_row; } else { for(uword col=start_col; col < end_col_p1; ++col) for(uword row=start_row; row < end_row_p1; ++row) { const T tmp_val = std::abs( A.at(row, col) ); if(tmp_val > max_val) { max_val = tmp_val; best_row = row; best_col = col; } } } return A.at(best_row, best_col); } template inline typename arma_cx_only::result op_max::max(const Base& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; const Proxy P(X.get_ref()); const uword n_elem = P.get_n_elem(); if(n_elem == 0) { arma_debug_check(true, "max(): object has no elements"); return Datum::nan; } T max_val = priv::most_neg(); if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; ea_type A = P.get_ea(); uword index = 0; for(uword i=0; i max_val) { max_val = tmp; index = i; } } return( A[index] ); } else { const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); uword best_row = 0; uword best_col = 0; if(n_rows == 1) { for(uword col=0; col < n_cols; ++col) { const T tmp = std::abs(P.at(0,col)); if(tmp > max_val) { max_val = tmp; best_col = col; } } } else { for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { const T tmp = std::abs(P.at(row,col)); if(tmp > max_val) { max_val = tmp; best_row = row; best_col = col; } } } return P.at(best_row, best_col); } } template inline typename arma_cx_only::result op_max::max_with_index(const Proxy& P, uword& index_of_max_val) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; const uword n_elem = P.get_n_elem(); if(n_elem == 0) { arma_debug_check(true, "max(): object has no elements"); return Datum::nan; } T best_val = priv::most_neg(); if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; ea_type A = P.get_ea(); uword best_index = 0; for(uword i=0; i best_val) { best_val = tmp; best_index = i; } } index_of_max_val = best_index; return( A[best_index] ); } else { const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); uword best_row = 0; uword best_col = 0; uword best_index = 0; if(n_rows == 1) { for(uword col=0; col < n_cols; ++col) { const T tmp = std::abs(P.at(0,col)); if(tmp > best_val) { best_val = tmp; best_col = col; } } best_index = best_col; } else if(n_cols == 1) { for(uword row=0; row < n_rows; ++row) { const T tmp = std::abs(P.at(row,0)); if(tmp > best_val) { best_val = tmp; best_row = row; } } best_index = best_row; } else { uword count = 0; for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { const T tmp = std::abs(P.at(row,col)); if(tmp > best_val) { best_val = tmp; best_row = row; best_col = col; best_index = count; } ++count; } } index_of_max_val = best_index; return P.at(best_row, best_col); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_mean_bones.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_mean //! @{ //! Class for finding mean values of a matrix class op_mean { public: template inline static void apply(Mat& out, const Op& in); template inline static void apply_noalias(Mat& out, const Proxy& P, const uword dim); template inline static void apply_noalias_unwrap(Mat& out, const Proxy& P, const uword dim); template inline static void apply_noalias_proxy(Mat& out, const Proxy& P, const uword dim); // template inline static eT direct_mean(const eT* const X, const uword N); template inline static eT direct_mean_robust(const eT* const X, const uword N); // template inline static eT direct_mean(const Mat& X, const uword row); template inline static eT direct_mean_robust(const Mat& X, const uword row); // template inline static eT mean_all(const subview& X); template inline static eT mean_all_robust(const subview& X); // template inline static eT mean_all(const diagview& X); template inline static eT mean_all_robust(const diagview& X); // template inline static typename T1::elem_type mean_all(const Base& X); // template arma_inline static eT robust_mean(const eT A, const eT B); template arma_inline static std::complex robust_mean(const std::complex& A, const std::complex& B); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_mean_meat.hpp ================================================ // Copyright (C) 2009-2015 Conrad Sanderson // Copyright (C) 2009-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_mean //! @{ template inline void op_mean::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword dim = in.aux_uword_a; arma_debug_check( (dim > 1), "mean(): parameter 'dim' must be 0 or 1" ); const Proxy P(in.m); if(P.is_alias(out) == false) { op_mean::apply_noalias(out, P, dim); } else { Mat tmp; op_mean::apply_noalias(tmp, P, dim); out.steal_mem(tmp); } } template inline void op_mean::apply_noalias(Mat& out, const Proxy& P, const uword dim) { arma_extra_debug_sigprint(); if(is_Mat::stored_type>::value) { op_mean::apply_noalias_unwrap(out, P, dim); } else { op_mean::apply_noalias_proxy(out, P, dim); } } template inline void op_mean::apply_noalias_unwrap(Mat& out, const Proxy& P, const uword dim) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; typedef typename Proxy::stored_type P_stored_type; const unwrap tmp(P.Q); const typename unwrap::stored_type& X = tmp.M; const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; if(dim == 0) { out.set_size((X_n_rows > 0) ? 1 : 0, X_n_cols); if(X_n_rows == 0) { return; } eT* out_mem = out.memptr(); for(uword col=0; col < X_n_cols; ++col) { out_mem[col] = op_mean::direct_mean( X.colptr(col), X_n_rows ); } } else if(dim == 1) { out.zeros(X_n_rows, (X_n_cols > 0) ? 1 : 0); if(X_n_cols == 0) { return; } eT* out_mem = out.memptr(); for(uword col=0; col < X_n_cols; ++col) { const eT* col_mem = X.colptr(col); for(uword row=0; row < X_n_rows; ++row) { out_mem[row] += col_mem[row]; } } out /= T(X_n_cols); for(uword row=0; row < X_n_rows; ++row) { if(arma_isfinite(out_mem[row]) == false) { out_mem[row] = op_mean::direct_mean_robust( X, row ); } } } } template arma_hot inline void op_mean::apply_noalias_proxy(Mat& out, const Proxy& P, const uword dim) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; const uword P_n_rows = P.get_n_rows(); const uword P_n_cols = P.get_n_cols(); if(dim == 0) { out.set_size((P_n_rows > 0) ? 1 : 0, P_n_cols); if(P_n_rows == 0) { return; } eT* out_mem = out.memptr(); for(uword col=0; col < P_n_cols; ++col) { eT val1 = eT(0); eT val2 = eT(0); uword i,j; for(i=0, j=1; j < P_n_rows; i+=2, j+=2) { val1 += P.at(i,col); val2 += P.at(j,col); } if(i < P_n_rows) { val1 += P.at(i,col); } out_mem[col] = (val1 + val2) / T(P_n_rows); } } else if(dim == 1) { out.zeros(P_n_rows, (P_n_cols > 0) ? 1 : 0); if(P_n_cols == 0) { return; } eT* out_mem = out.memptr(); for(uword col=0; col < P_n_cols; ++col) for(uword row=0; row < P_n_rows; ++row) { out_mem[row] += P.at(row,col); } out /= T(P_n_cols); } if(out.is_finite() == false) { // TODO: replace with dedicated handling to avoid unwrapping op_mean::apply_noalias_unwrap(out, P, dim); } } template arma_pure inline eT op_mean::direct_mean(const eT* const X, const uword n_elem) { arma_extra_debug_sigprint(); typedef typename get_pod_type::result T; const eT result = arrayops::accumulate(X, n_elem) / T(n_elem); return arma_isfinite(result) ? result : op_mean::direct_mean_robust(X, n_elem); } template arma_pure inline eT op_mean::direct_mean_robust(const eT* const X, const uword n_elem) { arma_extra_debug_sigprint(); // use an adapted form of the mean finding algorithm from the running_stat class typedef typename get_pod_type::result T; uword i,j; eT r_mean = eT(0); for(i=0, j=1; j inline eT op_mean::direct_mean(const Mat& X, const uword row) { arma_extra_debug_sigprint(); typedef typename get_pod_type::result T; const uword X_n_cols = X.n_cols; eT val = eT(0); uword i,j; for(i=0, j=1; j < X_n_cols; i+=2, j+=2) { val += X.at(row,i); val += X.at(row,j); } if(i < X_n_cols) { val += X.at(row,i); } const eT result = val / T(X_n_cols); return arma_isfinite(result) ? result : op_mean::direct_mean_robust(X, row); } template inline eT op_mean::direct_mean_robust(const Mat& X, const uword row) { arma_extra_debug_sigprint(); typedef typename get_pod_type::result T; const uword X_n_cols = X.n_cols; eT r_mean = eT(0); for(uword col=0; col < X_n_cols; ++col) { r_mean = r_mean + (X.at(row,col) - r_mean)/T(col+1); } return r_mean; } template inline eT op_mean::mean_all(const subview& X) { arma_extra_debug_sigprint(); typedef typename get_pod_type::result T; const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; const uword X_n_elem = X.n_elem; if(X_n_elem == 0) { arma_debug_check(true, "mean(): object has no elements"); return Datum::nan; } eT val = eT(0); if(X_n_rows == 1) { const Mat& A = X.m; const uword start_row = X.aux_row1; const uword start_col = X.aux_col1; const uword end_col_p1 = start_col + X_n_cols; uword i,j; for(i=start_col, j=start_col+1; j < end_col_p1; i+=2, j+=2) { val += A.at(start_row, i); val += A.at(start_row, j); } if(i < end_col_p1) { val += A.at(start_row, i); } } else { for(uword col=0; col < X_n_cols; ++col) { val += arrayops::accumulate(X.colptr(col), X_n_rows); } } const eT result = val / T(X_n_elem); return arma_isfinite(result) ? result : op_mean::mean_all_robust(X); } template inline eT op_mean::mean_all_robust(const subview& X) { arma_extra_debug_sigprint(); typedef typename get_pod_type::result T; const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; const uword start_row = X.aux_row1; const uword start_col = X.aux_col1; const uword end_row_p1 = start_row + X_n_rows; const uword end_col_p1 = start_col + X_n_cols; const Mat& A = X.m; eT r_mean = eT(0); if(X_n_rows == 1) { uword i=0; for(uword col = start_col; col < end_col_p1; ++col, ++i) { r_mean = r_mean + (A.at(start_row,col) - r_mean)/T(i+1); } } else { uword i=0; for(uword col = start_col; col < end_col_p1; ++col) for(uword row = start_row; row < end_row_p1; ++row, ++i) { r_mean = r_mean + (A.at(row,col) - r_mean)/T(i+1); } } return r_mean; } template inline eT op_mean::mean_all(const diagview& X) { arma_extra_debug_sigprint(); typedef typename get_pod_type::result T; const uword X_n_elem = X.n_elem; if(X_n_elem == 0) { arma_debug_check(true, "mean(): object has no elements"); return Datum::nan; } eT val = eT(0); for(uword i=0; i inline eT op_mean::mean_all_robust(const diagview& X) { arma_extra_debug_sigprint(); typedef typename get_pod_type::result T; const uword X_n_elem = X.n_elem; eT r_mean = eT(0); for(uword i=0; i inline typename T1::elem_type op_mean::mean_all(const Base& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap tmp(X.get_ref()); const Mat& A = tmp.M; const uword A_n_elem = A.n_elem; if(A_n_elem == 0) { arma_debug_check(true, "mean(): object has no elements"); return Datum::nan; } return op_mean::direct_mean(A.memptr(), A_n_elem); } template arma_inline eT op_mean::robust_mean(const eT A, const eT B) { return A + (B - A)/eT(2); } template arma_inline std::complex op_mean::robust_mean(const std::complex& A, const std::complex& B) { return A + (B - A)/T(2); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_median_bones.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_median //! @{ template struct arma_cx_median_packet { T val; uword index; }; template arma_inline bool operator< (const arma_cx_median_packet& A, const arma_cx_median_packet& B) { return A.val < B.val; } //! Class for finding median values of a matrix class op_median { public: template inline static void apply(Mat& out, const Op& in); template inline static void apply(Mat< std::complex >& out, const Op& in); // // template inline static typename T1::elem_type median_vec(const T1& X, const typename arma_not_cx::result* junk = 0); template inline static typename T1::elem_type median_vec(const T1& X, const typename arma_cx_only::result* junk = 0); // // template inline static eT direct_median(std::vector& X); template inline static void direct_cx_median_index(uword& out_index1, uword& out_index2, std::vector< arma_cx_median_packet >& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_median_meat.hpp ================================================ // Copyright (C) 2009-2015 Conrad Sanderson // Copyright (C) 2009-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_median //! @{ //! \brief //! For each row or for each column, find the median value. //! The result is stored in a dense matrix that has either one column or one row. //! The dimension, for which the medians are found, is set via the median() function. template inline void op_median::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword dim = in.aux_uword_a; arma_debug_check( (dim > 1), "median(): parameter 'dim' must be 0 or 1" ); const Proxy P(in.m); typedef typename Proxy::stored_type P_stored_type; const bool is_alias = P.is_alias(out); if( (is_Mat::value == true) || is_alias ) { const unwrap_check tmp(P.Q, is_alias); const typename unwrap_check::stored_type& X = tmp.M; const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; if(dim == 0) // in each column { arma_extra_debug_print("op_median::apply(): dim = 0"); out.set_size((X_n_rows > 0) ? 1 : 0, X_n_cols); if(X_n_rows > 0) { std::vector tmp_vec(X_n_rows); for(uword col=0; col < X_n_cols; ++col) { arrayops::copy( &(tmp_vec[0]), X.colptr(col), X_n_rows ); out[col] = op_median::direct_median(tmp_vec); } } } else // in each row { arma_extra_debug_print("op_median::apply(): dim = 1"); out.set_size(X_n_rows, (X_n_cols > 0) ? 1 : 0); if(X_n_cols > 0) { std::vector tmp_vec(X_n_cols); for(uword row=0; row < X_n_rows; ++row) { for(uword col=0; col < X_n_cols; ++col) { tmp_vec[col] = X.at(row,col); } out[row] = op_median::direct_median(tmp_vec); } } } } else { const uword P_n_rows = P.get_n_rows(); const uword P_n_cols = P.get_n_cols(); if(dim == 0) // in each column { arma_extra_debug_print("op_median::apply(): dim = 0"); out.set_size((P_n_rows > 0) ? 1 : 0, P_n_cols); if(P_n_rows > 0) { std::vector tmp_vec(P_n_rows); for(uword col=0; col < P_n_cols; ++col) { for(uword row=0; row < P_n_rows; ++row) { tmp_vec[row] = P.at(row,col); } out[col] = op_median::direct_median(tmp_vec); } } } else // in each row { arma_extra_debug_print("op_median::apply(): dim = 1"); out.set_size(P_n_rows, (P_n_cols > 0) ? 1 : 0); if(P_n_cols > 0) { std::vector tmp_vec(P_n_cols); for(uword row=0; row < P_n_rows; ++row) { for(uword col=0; col < P_n_cols; ++col) { tmp_vec[col] = P.at(row,col); } out[row] = op_median::direct_median(tmp_vec); } } } } } //! Implementation for complex numbers template inline void op_median::apply(Mat< std::complex >& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename std::complex eT; arma_type_check(( is_same_type::no )); const unwrap_check tmp(in.m, out); const Mat& X = tmp.M; const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; const uword dim = in.aux_uword_a; arma_debug_check( (dim > 1), "median(): parameter 'dim' must be 0 or 1" ); if(dim == 0) // in each column { arma_extra_debug_print("op_median::apply(): dim = 0"); out.set_size((X_n_rows > 0) ? 1 : 0, X_n_cols); if(X_n_rows > 0) { std::vector< arma_cx_median_packet > tmp_vec(X_n_rows); for(uword col=0; col 0) ? 1 : 0); if(X_n_cols > 0) { std::vector< arma_cx_median_packet > tmp_vec(X_n_cols); for(uword row=0; row inline typename T1::elem_type op_median::median_vec ( const T1& X, const typename arma_not_cx::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typedef typename Proxy::stored_type P_stored_type; const Proxy P(X); const uword n_elem = P.get_n_elem(); if(n_elem == 0) { arma_debug_check(true, "median(): object has no elements"); return Datum::nan; } std::vector tmp_vec(n_elem); if(is_Mat::value == true) { const unwrap tmp(P.Q); const typename unwrap::stored_type& Y = tmp.M; arrayops::copy( &(tmp_vec[0]), Y.memptr(), n_elem ); } else { if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; ea_type A = P.get_ea(); for(uword i=0; i inline typename T1::elem_type op_median::median_vec ( const T1& X, const typename arma_cx_only::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typedef typename T1::pod_type T; const Proxy P(X); const uword n_elem = P.get_n_elem(); if(n_elem == 0) { arma_debug_check(true, "median(): object has no elements"); return Datum::nan; } std::vector< arma_cx_median_packet > tmp_vec(n_elem); if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; ea_type A = P.get_ea(); for(uword i=0; i inline eT op_median::direct_median(std::vector& X) { arma_extra_debug_sigprint(); const uword n_elem = uword(X.size()); const uword half = n_elem/2; typename std::vector::iterator first = X.begin(); typename std::vector::iterator nth = first + half; typename std::vector::iterator pastlast = X.end(); std::nth_element(first, nth, pastlast); if((n_elem % 2) == 0) // even number of elements { typename std::vector::iterator start = X.begin(); typename std::vector::iterator pastend = start + half; const eT val1 = (*nth); const eT val2 = (*(std::max_element(start, pastend))); return op_mean::robust_mean(val1, val2); } else // odd number of elements { return (*nth); } } template inline void op_median::direct_cx_median_index ( uword& out_index1, uword& out_index2, std::vector< arma_cx_median_packet >& X ) { arma_extra_debug_sigprint(); typedef arma_cx_median_packet eT; const uword n_elem = uword(X.size()); const uword half = n_elem/2; typename std::vector::iterator first = X.begin(); typename std::vector::iterator nth = first + half; typename std::vector::iterator pastlast = X.end(); std::nth_element(first, nth, pastlast); out_index1 = (*nth).index; if((n_elem % 2) == 0) // even number of elements { typename std::vector::iterator start = X.begin(); typename std::vector::iterator pastend = start + half; out_index2 = (*(std::max_element(start, pastend))).index; } else // odd number of elements { out_index2 = out_index1; } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_min_bones.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_min //! @{ class op_min { public: template inline static void apply(Mat& out, const Op& in); template inline static void apply_noalias(Mat& out, const Mat& X, const uword dim, const typename arma_not_cx::result* junk = 0); template inline static void apply_noalias(Mat& out, const Mat& X, const uword dim, const typename arma_cx_only::result* junk = 0); // // for non-complex numbers template inline static eT direct_min(const eT* const X, const uword N); template inline static eT direct_min(const eT* const X, const uword N, uword& index_of_min_val); template inline static eT direct_min(const Mat& X, const uword row); template inline static eT min(const subview& X); template inline static typename arma_not_cx::result min(const Base& X); template inline static typename arma_not_cx::result min_with_index(const Proxy& P, uword& index_of_min_val); // // for complex numbers template inline static std::complex direct_min(const std::complex* const X, const uword n_elem); template inline static std::complex direct_min(const std::complex* const X, const uword n_elem, uword& index_of_min_val); template inline static std::complex direct_min(const Mat< std::complex >& X, const uword row); template inline static std::complex min(const subview< std::complex >&X); template inline static typename arma_cx_only::result min(const Base& X); template inline static typename arma_cx_only::result min_with_index(const Proxy& P, uword& index_of_min_val); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_min_meat.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_min //! @{ template inline void op_min::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword dim = in.aux_uword_a; arma_debug_check( (dim > 1), "min(): parameter 'dim' must be 0 or 1"); const unwrap U(in.m); const Mat& X = U.M; if(&out != &X) { op_min::apply_noalias(out, X, dim); } else { Mat tmp; op_min::apply_noalias(tmp, X, dim); out.steal_mem(tmp); } } template inline void op_min::apply_noalias(Mat& out, const Mat& X, const uword dim, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; if(dim == 0) { arma_extra_debug_print("op_min::apply(): dim = 0"); out.set_size((X_n_rows > 0) ? 1 : 0, X_n_cols); if(X_n_rows == 0) { return; } eT* out_mem = out.memptr(); for(uword col=0; col 0) ? 1 : 0); if(X_n_cols == 0) { return; } eT* out_mem = out.memptr(); arrayops::copy(out_mem, X.colptr(0), X_n_rows); for(uword col=1; col inline void op_min::apply_noalias(Mat& out, const Mat& X, const uword dim, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; if(dim == 0) { arma_extra_debug_print("op_min::apply(): dim = 0"); out.set_size((X_n_rows > 0) ? 1 : 0, X_n_cols); if(X_n_rows == 0) { return; } eT* out_mem = out.memptr(); for(uword col=0; col 0) ? 1 : 0); if(X_n_cols == 0) { return; } eT* out_mem = out.memptr(); for(uword row=0; row arma_pure inline eT op_min::direct_min(const eT* const X, const uword n_elem) { arma_extra_debug_sigprint(); eT min_val = priv::most_pos(); uword i,j; for(i=0, j=1; j inline eT op_min::direct_min(const eT* const X, const uword n_elem, uword& index_of_min_val) { arma_extra_debug_sigprint(); eT min_val = priv::most_pos(); uword best_index = 0; uword i,j; for(i=0, j=1; j inline eT op_min::direct_min(const Mat& X, const uword row) { arma_extra_debug_sigprint(); const uword X_n_cols = X.n_cols; eT min_val = priv::most_pos(); uword i,j; for(i=0, j=1; j < X_n_cols; i+=2, j+=2) { const eT tmp_i = X.at(row,i); const eT tmp_j = X.at(row,j); if(tmp_i < min_val) { min_val = tmp_i; } if(tmp_j < min_val) { min_val = tmp_j; } } if(i < X_n_cols) { const eT tmp_i = X.at(row,i); if(tmp_i < min_val) { min_val = tmp_i; } } return min_val; } template inline eT op_min::min(const subview& X) { arma_extra_debug_sigprint(); if(X.n_elem == 0) { arma_debug_check(true, "min(): object has no elements"); return Datum::nan; } const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; eT min_val = priv::most_pos(); if(X_n_rows == 1) { const Mat& A = X.m; const uword start_row = X.aux_row1; const uword start_col = X.aux_col1; const uword end_col_p1 = start_col + X_n_cols; uword i,j; for(i=start_col, j=start_col+1; j < end_col_p1; i+=2, j+=2) { const eT tmp_i = A.at(start_row, i); const eT tmp_j = A.at(start_row, j); if(tmp_i < min_val) { min_val = tmp_i; } if(tmp_j < min_val) { min_val = tmp_j; } } if(i < end_col_p1) { const eT tmp_i = A.at(start_row, i); if(tmp_i < min_val) { min_val = tmp_i; } } } else { for(uword col=0; col < X_n_cols; ++col) { min_val = (std::min)(min_val, op_min::direct_min(X.colptr(col), X_n_rows)); } } return min_val; } template inline typename arma_not_cx::result op_min::min(const Base& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(X.get_ref()); const uword n_elem = P.get_n_elem(); if(n_elem == 0) { arma_debug_check(true, "min(): object has no elements"); return Datum::nan; } eT min_val = priv::most_pos(); if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; ea_type A = P.get_ea(); uword i,j; for(i=0, j=1; j inline typename arma_not_cx::result op_min::min_with_index(const Proxy& P, uword& index_of_min_val) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword n_elem = P.get_n_elem(); if(n_elem == 0) { arma_debug_check(true, "min(): object has no elements"); return Datum::nan; } eT best_val = priv::most_pos(); uword best_index = 0; if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; ea_type A = P.get_ea(); for(uword i=0; i inline std::complex op_min::direct_min(const std::complex* const X, const uword n_elem) { arma_extra_debug_sigprint(); uword index = 0; T min_val = priv::most_pos(); for(uword i=0; i inline std::complex op_min::direct_min(const std::complex* const X, const uword n_elem, uword& index_of_min_val) { arma_extra_debug_sigprint(); uword index = 0; T min_val = priv::most_pos(); for(uword i=0; i inline std::complex op_min::direct_min(const Mat< std::complex >& X, const uword row) { arma_extra_debug_sigprint(); const uword X_n_cols = X.n_cols; uword index = 0; T min_val = priv::most_pos(); for(uword col=0; col inline std::complex op_min::min(const subview< std::complex >& X) { arma_extra_debug_sigprint(); typedef typename std::complex eT; if(X.n_elem == 0) { arma_debug_check(true, "min(): object has no elements"); return Datum::nan; } const Mat& A = X.m; const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; const uword start_row = X.aux_row1; const uword start_col = X.aux_col1; const uword end_row_p1 = start_row + X_n_rows; const uword end_col_p1 = start_col + X_n_cols; T min_val = priv::most_pos(); uword best_row = 0; uword best_col = 0; if(X_n_rows == 1) { best_col = 0; for(uword col=start_col; col < end_col_p1; ++col) { const T tmp_val = std::abs( A.at(start_row, col) ); if(tmp_val < min_val) { min_val = tmp_val; best_col = col; } } best_row = start_row; } else { for(uword col=start_col; col < end_col_p1; ++col) for(uword row=start_row; row < end_row_p1; ++row) { const T tmp_val = std::abs( A.at(row, col) ); if(tmp_val < min_val) { min_val = tmp_val; best_row = row; best_col = col; } } } return A.at(best_row, best_col); } template inline typename arma_cx_only::result op_min::min(const Base& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; const Proxy P(X.get_ref()); const uword n_elem = P.get_n_elem(); if(n_elem == 0) { arma_debug_check(true, "min(): object has no elements"); return Datum::nan; } T min_val = priv::most_pos(); if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; ea_type A = P.get_ea(); uword index = 0; for(uword i=0; i inline typename arma_cx_only::result op_min::min_with_index(const Proxy& P, uword& index_of_min_val) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; const uword n_elem = P.get_n_elem(); if(n_elem == 0) { arma_debug_check(true, "min(): object has no elements"); return Datum::nan; } T best_val = priv::most_pos(); if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; ea_type A = P.get_ea(); uword best_index = 0; for(uword i=0; i inline static void apply( Mat& out, const mtOp& X); template inline static void apply( Cube& out, const mtOpCube& X); }; class op_imag { public: template inline static void apply( Mat& out, const mtOp& X); template inline static void apply( Cube& out, const mtOpCube& X); }; class op_abs { public: template inline static void apply( Mat& out, const mtOp& X); template inline static void apply( Cube& out, const mtOpCube& X); }; class op_orth { public: template inline static void apply(Mat& out, const Op& expr); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_misc_meat.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_misc //! @{ template inline void op_real::apply( Mat& out, const mtOp& X ) { arma_extra_debug_sigprint(); typedef typename T1::pod_type T; const Proxy P(X.m); const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); out.set_size(n_rows, n_cols); T* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; const uword n_elem = P.get_n_elem(); ea_type A = P.get_ea(); for(uword i=0; i < n_elem; ++i) { out_mem[i] = std::real( A[i] ); } } else { for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { *out_mem = std::real( P.at(row,col) ); out_mem++; } } } template inline void op_real::apply( Cube& out, const mtOpCube& X ) { arma_extra_debug_sigprint(); typedef typename T1::pod_type T; const ProxyCube P(X.m); const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); const uword n_slices = P.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); T* out_mem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { typedef typename ProxyCube::ea_type ea_type; const uword n_elem = P.get_n_elem(); ea_type A = P.get_ea(); for(uword i=0; i < n_elem; ++i) { out_mem[i] = std::real( A[i] ); } } else { for(uword slice=0; slice < n_slices; ++slice) for(uword col=0; col < n_cols; ++col ) for(uword row=0; row < n_rows; ++row ) { *out_mem = std::real( P.at(row,col,slice) ); out_mem++; } } } template inline void op_imag::apply( Mat& out, const mtOp& X ) { arma_extra_debug_sigprint(); typedef typename T1::pod_type T; const Proxy P(X.m); const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); out.set_size(n_rows, n_cols); T* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; const uword n_elem = P.get_n_elem(); ea_type A = P.get_ea(); for(uword i=0; i < n_elem; ++i) { out_mem[i] = std::imag( A[i] ); } } else { for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { *out_mem = std::imag( P.at(row,col) ); out_mem++; } } } template inline void op_imag::apply( Cube& out, const mtOpCube& X ) { arma_extra_debug_sigprint(); typedef typename T1::pod_type T; const ProxyCube P(X.m); const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); const uword n_slices = P.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); T* out_mem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { typedef typename ProxyCube::ea_type ea_type; const uword n_elem = P.get_n_elem(); ea_type A = P.get_ea(); for(uword i=0; i < n_elem; ++i) { out_mem[i] = std::imag( A[i] ); } } else { for(uword slice=0; slice < n_slices; ++slice) for(uword col=0; col < n_cols; ++col ) for(uword row=0; row < n_rows; ++row ) { *out_mem = std::imag( P.at(row,col,slice) ); out_mem++; } } } template inline void op_abs::apply( Mat& out, const mtOp& X ) { arma_extra_debug_sigprint(); typedef typename T1::pod_type T; const Proxy P(X.m); const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); out.set_size(n_rows, n_cols); T* out_mem = out.memptr(); if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; const uword n_elem = P.get_n_elem(); ea_type A = P.get_ea(); for(uword i=0; i < n_elem; ++i) { out_mem[i] = std::abs( A[i] ); } } else { for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { *out_mem = std::abs( P.at(row,col) ); out_mem++; } } } template inline void op_abs::apply( Cube& out, const mtOpCube& X ) { arma_extra_debug_sigprint(); typedef typename T1::pod_type T; const ProxyCube P(X.m); const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); const uword n_slices = P.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); T* out_mem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { typedef typename ProxyCube::ea_type ea_type; const uword n_elem = P.get_n_elem(); ea_type A = P.get_ea(); for(uword i=0; i < n_elem; ++i) { out_mem[i] = std::abs( A[i] ); } } else { for(uword slice=0; slice < n_slices; ++slice) for(uword col=0; col < n_cols; ++col ) for(uword row=0; row < n_rows; ++row ) { *out_mem = std::abs( P.at(row,col,slice) ); out_mem++; } } } template inline void op_orth::apply( Mat& out, const Op& expr ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename T1::pod_type T; T tol = access::tmp_real(expr.aux); arma_debug_check((tol < T(0)), "orth(): tolerance must be >= 0"); const unwrap tmp(expr.m); const Mat& X = tmp.M; Mat U; Col< T> s; Mat V; //const bool status = auxlib::svd_econ(U, s, V, X, 'l'); //const bool status = auxlib::svd_dc(U, s, V, X); const bool status = auxlib::svd_dc_econ(U, s, V, X); V.reset(); if(status == false) { out.reset(); arma_bad("orth(): svd failed"); return; } if(s.is_empty()) { out.reset(); return; } const uword s_n_elem = s.n_elem; const T* s_mem = s.memptr(); // set tolerance to default if it hasn't been specified if(tol == T(0)) { tol = (std::max)(X.n_rows, X.n_cols) * s_mem[0] * std::numeric_limits::epsilon(); } uword count = 0; for(uword i=0; i < s_n_elem; ++i) { count += (s_mem[i] > tol) ? uword(1) : uword(0); } if(count > 0) { out = U.head_cols(count); // out *= eT(-1); } else { out.set_size(X.n_rows, 0); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_nonzeros_bones.hpp ================================================ // Copyright (C) 2015 Conrad Sanderson // Copyright (C) 2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_nonzeros //! @{ class op_nonzeros { public: // for dense matrices template static inline void apply_noalias(Mat& out, const Proxy& P); template static inline void apply(Mat& out, const Op& X); // for sparse matrices template static inline void apply_noalias(Mat& out, const SpBase& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_nonzeros_meat.hpp ================================================ // Copyright (C) 2015 Conrad Sanderson // Copyright (C) 2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_nonzeros //! @{ template inline void op_nonzeros::apply_noalias(Mat& out, const Proxy& P) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword N_max = P.get_n_elem(); Mat tmp(N_max, 1); eT* tmp_mem = tmp.memptr(); uword N_nz = 0; if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i inline void op_nonzeros::apply(Mat& out, const Op& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(X.m); if(P.get_n_elem() == 0) { out.set_size(0,1); return; } if(P.is_alias(out)) { Mat out2; op_nonzeros::apply_noalias(out2, P); out.steal_mem(out2); } else { op_nonzeros::apply_noalias(out, P); } } template inline void op_nonzeros::apply_noalias(Mat& out, const SpBase& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const SpProxy P(X.get_ref()); const uword N = P.get_n_nonzero(); out.set_size(N,1); if(N > 0) { if(is_SpMat::stored_type>::value) { const unwrap_spmat::stored_type> U(P.Q); arrayops::copy(out.memptr(), U.M.values, N); } else { eT* out_mem = out.memptr(); typename SpProxy::const_iterator_type it = P.begin(); for(uword i=0; i inline static void apply(Mat& out, const Op& in); }; class op_normalise_rowvec { public: template inline static void apply(Mat& out, const Op& in); }; class op_normalise_mat { public: template inline static void apply(Mat& out, const Op& in); template inline static void apply(Mat& out, const Mat& A, const uword p, const uword dim); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_normalise_meat.hpp ================================================ // Copyright (C) 2014 Conrad Sanderson // Copyright (C) 2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_normalise //! @{ template inline void op_normalise_colvec::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::pod_type T; const uword p = in.aux_uword_a; arma_debug_check( (p == 0), "normalise(): parameter 'p' must be greater than zero" ); const quasi_unwrap tmp(in.m); const T norm_val_a = norm(tmp.M, p); const T norm_val_b = (norm_val_a != T(0)) ? norm_val_a : T(1); out = tmp.M / norm_val_b; } template inline void op_normalise_rowvec::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::pod_type T; const uword p = in.aux_uword_a; arma_debug_check( (p == 0), "normalise(): parameter 'p' must be greater than zero" ); const unwrap tmp(in.m); const T norm_val_a = norm(tmp.M, p); const T norm_val_b = (norm_val_a != T(0)) ? norm_val_a : T(1); out = tmp.M / norm_val_b; } template inline void op_normalise_mat::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword p = in.aux_uword_a; const uword dim = in.aux_uword_b; arma_debug_check( (p == 0), "normalise(): parameter 'p' must be greater than zero" ); arma_debug_check( (dim > 1), "normalise(): parameter 'dim' must be 0 or 1" ); const unwrap tmp(in.m); const Mat& A = tmp.M; const bool alias = ( (&out) == (&A) ); if(alias) { Mat out2; op_normalise_mat::apply(out2, A, p, dim); out.steal_mem(out2); } else { op_normalise_mat::apply(out, A, p, dim); } } template inline void op_normalise_mat::apply(Mat& out, const Mat& A, const uword p, const uword dim) { arma_extra_debug_sigprint(); typedef typename get_pod_type::result T; out.copy_size(A); if(A.n_elem == 0) { return; } if(dim == 0) { const uword n_cols = A.n_cols; for(uword i=0; i inline static void apply(Mat& out, const Op& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_pinv_meat.hpp ================================================ // Copyright (C) 2009-2015 Conrad Sanderson // Copyright (C) 2009-2015 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // Copyright (C) 2011 Stanislav Funiak // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_pinv //! @{ template inline void op_pinv::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; const bool use_divide_and_conquer = (in.aux_uword_a == 1); T tol = access::tmp_real(in.aux); arma_debug_check((tol < T(0)), "pinv(): tolerance must be >= 0"); const Proxy P(in.m); const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); if( (n_rows*n_cols) == 0 ) { out.set_size(n_cols,n_rows); return; } // economical SVD decomposition Mat U; Col< T> s; Mat V; bool status = false; if(use_divide_and_conquer) { status = (n_cols > n_rows) ? auxlib::svd_dc_econ(U, s, V, trans(P.Q)) : auxlib::svd_dc_econ(U, s, V, P.Q); } else { status = (n_cols > n_rows) ? auxlib::svd_econ(U, s, V, trans(P.Q), 'b') : auxlib::svd_econ(U, s, V, P.Q, 'b'); } if(status == false) { out.reset(); arma_bad("pinv(): svd failed"); return; } const uword s_n_elem = s.n_elem; const T* s_mem = s.memptr(); // set tolerance to default if it hasn't been specified if( (tol == T(0)) && (s_n_elem > 0) ) { tol = (std::max)(n_rows, n_cols) * s_mem[0] * std::numeric_limits::epsilon(); } uword count = 0; for(uword i = 0; i < s_n_elem; ++i) { count += (s_mem[i] >= tol) ? uword(1) : uword(0); } if(count > 0) { Col s2(count); T* s2_mem = s2.memptr(); uword count2 = 0; for(uword i=0; i < s_n_elem; ++i) { const T val = s_mem[i]; if(val >= tol) { s2_mem[count2] = T(1) / val; ++count2; } } if(n_rows >= n_cols) { out = ( (V.n_cols > count) ? V.cols(0,count-1) : V ) * diagmat(s2) * trans( (U.n_cols > count) ? U.cols(0,count-1) : U ); } else { out = ( (U.n_cols > count) ? U.cols(0,count-1) : U ) * diagmat(s2) * trans( (V.n_cols > count) ? V.cols(0,count-1) : V ); } } else { out.zeros(n_cols, n_rows); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_princomp_bones.hpp ================================================ // Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_princomp //! @{ class op_princomp { public: // // real element versions template inline static bool direct_princomp ( Mat& coeff_out, const Base& X, const typename arma_not_cx::result* junk = 0 ); template inline static bool direct_princomp ( Mat& coeff_out, Mat& score_out, const Base& X, const typename arma_not_cx::result* junk = 0 ); template inline static bool direct_princomp ( Mat& coeff_out, Mat& score_out, Col& latent_out, const Base& X, const typename arma_not_cx::result* junk = 0 ); template inline static bool direct_princomp ( Mat& coeff_out, Mat& score_out, Col& latent_out, Col& tsquared_out, const Base& X, const typename arma_not_cx::result* junk = 0 ); // // complex element versions template inline static bool direct_princomp ( Mat< std::complex >& coeff_out, const Base< std::complex, T1 >& X, const typename arma_cx_only::result* junk = 0 ); template inline static bool direct_princomp ( Mat< std::complex >& coeff_out, Mat< std::complex >& score_out, const Base< std::complex, T1 >& X, const typename arma_cx_only::result* junk = 0 ); template inline static bool direct_princomp ( Mat< std::complex >& coeff_out, Mat< std::complex >& score_out, Col< typename T1::pod_type >& latent_out, const Base< std::complex, T1 >& X, const typename arma_cx_only::result* junk = 0 ); template inline static bool direct_princomp ( Mat< std::complex >& coeff_out, Mat< std::complex >& score_out, Col< typename T1::pod_type >& latent_out, Col< std::complex >& tsquared_out, const Base< std::complex, T1 >& X, const typename arma_cx_only::result* junk = 0 ); template inline static void apply(Mat& out, const Op& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_princomp_meat.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // Copyright (C) 2010 Dimitrios Bouzas // Copyright (C) 2011 Stanislav Funiak // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_princomp //! @{ //! \brief //! principal component analysis -- 4 arguments version //! computation is done via singular value decomposition //! coeff_out -> principal component coefficients //! score_out -> projected samples //! latent_out -> eigenvalues of principal vectors //! tsquared_out -> Hotelling's T^2 statistic template inline bool op_princomp::direct_princomp ( Mat& coeff_out, Mat& score_out, Col& latent_out, Col& tsquared_out, const Base& X, const typename arma_not_cx::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; const unwrap_check Y( X.get_ref(), score_out ); const Mat& in = Y.M; const uword n_rows = in.n_rows; const uword n_cols = in.n_cols; if(n_rows > 1) // more than one sample { // subtract the mean - use score_out as temporary matrix score_out = in; score_out.each_row() -= mean(in); // singular value decomposition Mat U; Col s; const bool svd_ok = svd(U, s, coeff_out, score_out); if(svd_ok == false) { return false; } // normalize the eigenvalues s /= std::sqrt( double(n_rows - 1) ); // project the samples to the principals score_out *= coeff_out; if(n_rows <= n_cols) // number of samples is less than their dimensionality { score_out.cols(n_rows-1,n_cols-1).zeros(); //Col s_tmp = zeros< Col >(n_cols); Col s_tmp(n_cols); s_tmp.zeros(); s_tmp.rows(0,n_rows-2) = s.rows(0,n_rows-2); s = s_tmp; // compute the Hotelling's T-squared s_tmp.rows(0,n_rows-2) = eT(1) / s_tmp.rows(0,n_rows-2); const Mat S = score_out * diagmat(Col(s_tmp)); tsquared_out = sum(S%S,1); } else { // compute the Hotelling's T-squared const Mat S = score_out * diagmat(Col( eT(1) / s)); tsquared_out = sum(S%S,1); } // compute the eigenvalues of the principal vectors latent_out = s%s; } else // 0 or 1 samples { coeff_out.eye(n_cols, n_cols); score_out.copy_size(in); score_out.zeros(); latent_out.set_size(n_cols); latent_out.zeros(); tsquared_out.set_size(n_rows); tsquared_out.zeros(); } return true; } //! \brief //! principal component analysis -- 3 arguments version //! computation is done via singular value decomposition //! coeff_out -> principal component coefficients //! score_out -> projected samples //! latent_out -> eigenvalues of principal vectors template inline bool op_princomp::direct_princomp ( Mat& coeff_out, Mat& score_out, Col& latent_out, const Base& X, const typename arma_not_cx::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; const unwrap_check Y( X.get_ref(), score_out ); const Mat& in = Y.M; const uword n_rows = in.n_rows; const uword n_cols = in.n_cols; if(n_rows > 1) // more than one sample { // subtract the mean - use score_out as temporary matrix score_out = in; score_out.each_row() -= mean(in); // singular value decomposition Mat U; Col s; const bool svd_ok = svd(U, s, coeff_out, score_out); if(svd_ok == false) { return false; } // normalize the eigenvalues s /= std::sqrt( double(n_rows - 1) ); // project the samples to the principals score_out *= coeff_out; if(n_rows <= n_cols) // number of samples is less than their dimensionality { score_out.cols(n_rows-1,n_cols-1).zeros(); Col s_tmp = zeros< Col >(n_cols); s_tmp.rows(0,n_rows-2) = s.rows(0,n_rows-2); s = s_tmp; } // compute the eigenvalues of the principal vectors latent_out = s%s; } else // 0 or 1 samples { coeff_out.eye(n_cols, n_cols); score_out.copy_size(in); score_out.zeros(); latent_out.set_size(n_cols); latent_out.zeros(); } return true; } //! \brief //! principal component analysis -- 2 arguments version //! computation is done via singular value decomposition //! coeff_out -> principal component coefficients //! score_out -> projected samples template inline bool op_princomp::direct_princomp ( Mat& coeff_out, Mat& score_out, const Base& X, const typename arma_not_cx::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; const unwrap_check Y( X.get_ref(), score_out ); const Mat& in = Y.M; const uword n_rows = in.n_rows; const uword n_cols = in.n_cols; if(n_rows > 1) // more than one sample { // subtract the mean - use score_out as temporary matrix score_out = in; score_out.each_row() -= mean(in); // singular value decomposition Mat U; Col s; const bool svd_ok = svd(U, s, coeff_out, score_out); if(svd_ok == false) { return false; } // normalize the eigenvalues s /= std::sqrt( double(n_rows - 1) ); // project the samples to the principals score_out *= coeff_out; if(n_rows <= n_cols) // number of samples is less than their dimensionality { score_out.cols(n_rows-1,n_cols-1).zeros(); Col s_tmp = zeros< Col >(n_cols); s_tmp.rows(0,n_rows-2) = s.rows(0,n_rows-2); s = s_tmp; } } else // 0 or 1 samples { coeff_out.eye(n_cols, n_cols); score_out.copy_size(in); score_out.zeros(); } return true; } //! \brief //! principal component analysis -- 1 argument version //! computation is done via singular value decomposition //! coeff_out -> principal component coefficients template inline bool op_princomp::direct_princomp ( Mat& coeff_out, const Base& X, const typename arma_not_cx::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; const unwrap Y( X.get_ref() ); const Mat& in = Y.M; if(in.n_elem != 0) { Mat tmp = in; tmp.each_row() -= mean(in); // singular value decomposition Mat U; Col s; const bool svd_ok = svd(U, s, coeff_out, tmp); if(svd_ok == false) { return false; } } else { coeff_out.eye(in.n_cols, in.n_cols); } return true; } //! \brief //! principal component analysis -- 4 arguments complex version //! computation is done via singular value decomposition //! coeff_out -> principal component coefficients //! score_out -> projected samples //! latent_out -> eigenvalues of principal vectors //! tsquared_out -> Hotelling's T^2 statistic template inline bool op_princomp::direct_princomp ( Mat< std::complex >& coeff_out, Mat< std::complex >& score_out, Col< typename T1::pod_type >& latent_out, Col< std::complex >& tsquared_out, const Base< std::complex, T1 >& X, const typename arma_cx_only::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::pod_type T; typedef std::complex eT; const unwrap_check Y( X.get_ref(), score_out ); const Mat& in = Y.M; const uword n_rows = in.n_rows; const uword n_cols = in.n_cols; if(n_rows > 1) // more than one sample { // subtract the mean - use score_out as temporary matrix score_out = in; score_out.each_row() -= mean(in); // singular value decomposition Mat U; Col< T> s; const bool svd_ok = svd(U, s, coeff_out, score_out); if(svd_ok == false) { return false; } // normalize the eigenvalues s /= std::sqrt( double(n_rows - 1) ); // project the samples to the principals score_out *= coeff_out; if(n_rows <= n_cols) // number of samples is less than their dimensionality { score_out.cols(n_rows-1,n_cols-1).zeros(); Col s_tmp = zeros< Col >(n_cols); s_tmp.rows(0,n_rows-2) = s.rows(0,n_rows-2); s = s_tmp; // compute the Hotelling's T-squared s_tmp.rows(0,n_rows-2) = 1.0 / s_tmp.rows(0,n_rows-2); const Mat S = score_out * diagmat(Col(s_tmp)); tsquared_out = sum(S%S,1); } else { // compute the Hotelling's T-squared const Mat S = score_out * diagmat(Col(T(1) / s)); tsquared_out = sum(S%S,1); } // compute the eigenvalues of the principal vectors latent_out = s%s; } else // 0 or 1 samples { coeff_out.eye(n_cols, n_cols); score_out.copy_size(in); score_out.zeros(); latent_out.set_size(n_cols); latent_out.zeros(); tsquared_out.set_size(n_rows); tsquared_out.zeros(); } return true; } //! \brief //! principal component analysis -- 3 arguments complex version //! computation is done via singular value decomposition //! coeff_out -> principal component coefficients //! score_out -> projected samples //! latent_out -> eigenvalues of principal vectors template inline bool op_princomp::direct_princomp ( Mat< std::complex >& coeff_out, Mat< std::complex >& score_out, Col< typename T1::pod_type >& latent_out, const Base< std::complex, T1 >& X, const typename arma_cx_only::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::pod_type T; typedef std::complex eT; const unwrap_check Y( X.get_ref(), score_out ); const Mat& in = Y.M; const uword n_rows = in.n_rows; const uword n_cols = in.n_cols; if(n_rows > 1) // more than one sample { // subtract the mean - use score_out as temporary matrix score_out = in; score_out.each_row() -= mean(in); // singular value decomposition Mat U; Col< T> s; const bool svd_ok = svd(U, s, coeff_out, score_out); if(svd_ok == false) { return false; } // normalize the eigenvalues s /= std::sqrt( double(n_rows - 1) ); // project the samples to the principals score_out *= coeff_out; if(n_rows <= n_cols) // number of samples is less than their dimensionality { score_out.cols(n_rows-1,n_cols-1).zeros(); Col s_tmp = zeros< Col >(n_cols); s_tmp.rows(0,n_rows-2) = s.rows(0,n_rows-2); s = s_tmp; } // compute the eigenvalues of the principal vectors latent_out = s%s; } else // 0 or 1 samples { coeff_out.eye(n_cols, n_cols); score_out.copy_size(in); score_out.zeros(); latent_out.set_size(n_cols); latent_out.zeros(); } return true; } //! \brief //! principal component analysis -- 2 arguments complex version //! computation is done via singular value decomposition //! coeff_out -> principal component coefficients //! score_out -> projected samples template inline bool op_princomp::direct_princomp ( Mat< std::complex >& coeff_out, Mat< std::complex >& score_out, const Base< std::complex, T1 >& X, const typename arma_cx_only::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::pod_type T; typedef std::complex eT; const unwrap_check Y( X.get_ref(), score_out ); const Mat& in = Y.M; const uword n_rows = in.n_rows; const uword n_cols = in.n_cols; if(n_rows > 1) // more than one sample { // subtract the mean - use score_out as temporary matrix score_out = in; score_out.each_row() -= mean(in); // singular value decomposition Mat U; Col< T> s; const bool svd_ok = svd(U, s, coeff_out, score_out); if(svd_ok == false) { return false; } // normalize the eigenvalues s /= std::sqrt( double(n_rows - 1) ); // project the samples to the principals score_out *= coeff_out; if(n_rows <= n_cols) // number of samples is less than their dimensionality { score_out.cols(n_rows-1,n_cols-1).zeros(); } } else // 0 or 1 samples { coeff_out.eye(n_cols, n_cols); score_out.copy_size(in); score_out.zeros(); } return true; } //! \brief //! principal component analysis -- 1 argument complex version //! computation is done via singular value decomposition //! coeff_out -> principal component coefficients template inline bool op_princomp::direct_princomp ( Mat< std::complex >& coeff_out, const Base< std::complex, T1 >& X, const typename arma_cx_only::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::pod_type T; typedef std::complex eT; const unwrap Y( X.get_ref() ); const Mat& in = Y.M; if(in.n_elem != 0) { // singular value decomposition Mat U; Col< T> s; Mat tmp = in; tmp.each_row() -= mean(in); const bool svd_ok = svd(U, s, coeff_out, tmp); if(svd_ok == false) { return false; } } else { coeff_out.eye(in.n_cols, in.n_cols); } return true; } template inline void op_princomp::apply ( Mat& out, const Op& in ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_check tmp(in.m, out); const Mat& A = tmp.M; const bool status = op_princomp::direct_princomp(out, A); if(status == false) { out.reset(); arma_bad("princomp(): failed to converge"); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_prod_bones.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_prod //! @{ //! Class for finding products of values in a matrix (e.g. along rows or columns) class op_prod { public: template inline static void apply(Mat& out, const Op& in); template inline static eT prod(const subview& S); template inline static typename T1::elem_type prod(const Base& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_prod_meat.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_prod //! @{ //! \brief //! Immediate product of elements of a matrix along a specified dimension (either rows or columns). //! The result is stored in a dense matrix that has either one column or one row. //! See the prod() function for more details. template inline void op_prod::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword dim = in.aux_uword_a; arma_debug_check( (dim > 1), "prod(): parameter 'dim' must be 0 or 1" ); const unwrap_check tmp(in.m, out); const Mat& X = tmp.M; const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; if(dim == 0) // traverse across rows (i.e. find the product in each column) { out.set_size(1, X_n_cols); eT* out_mem = out.memptr(); for(uword col=0; col inline eT op_prod::prod(const subview& X) { arma_extra_debug_sigprint(); eT val = eT(1); const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; if(X_n_rows == 1) { const Mat& A = X.m; const uword start_row = X.aux_row1; const uword start_col = X.aux_col1; const uword end_col_p1 = start_col + X_n_cols; uword i,j; for(i=start_col, j=start_col+1; j < end_col_p1; i+=2, j+=2) { val *= A.at(start_row, i); val *= A.at(start_row, j); } if(i < end_col_p1) { val *= A.at(start_row, i); } } else { for(uword col=0; col < X_n_cols; ++col) { val *= arrayops::product( X.colptr(col), X_n_rows ); } } return val; } template inline typename T1::elem_type op_prod::prod(const Base& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(X.get_ref()); eT val = eT(1); if(Proxy::prefer_at_accessor == false) { typedef typename Proxy::ea_type ea_type; const ea_type A = P.get_ea(); const uword n_elem = P.get_n_elem(); uword i,j; for(i=0, j=1; j < n_elem; i+=2, j+=2) { val *= A[i]; val *= A[j]; } if(i < n_elem) { val *= A[i]; } } else { const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); if(n_rows == 1) { uword i,j; for(i=0, j=1; j < n_cols; i+=2, j+=2) { val *= P.at(0,i); val *= P.at(0,j); } if(i < n_cols) { val *= P.at(0,i); } } else { for(uword col=0; col < n_cols; ++col) { uword i,j; for(i=0, j=1; j < n_rows; i+=2, j+=2) { val *= P.at(i,col); val *= P.at(j,col); } if(i < n_rows) { val *= P.at(i,col); } } } } return val; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_relational_bones.hpp ================================================ // Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_relational //! @{ class op_rel_lt_pre { public: template inline static void apply(Mat& out, const mtOp& X); template inline static void apply(Cube& out, const mtOpCube& X); }; class op_rel_lt_post { public: template inline static void apply(Mat& out, const mtOp& X); template inline static void apply(Cube& out, const mtOpCube& X); }; class op_rel_gt_pre { public: template inline static void apply(Mat& out, const mtOp& X); template inline static void apply(Cube& out, const mtOpCube& X); }; class op_rel_gt_post { public: template inline static void apply(Mat& out, const mtOp& X); template inline static void apply(Cube& out, const mtOpCube& X); }; class op_rel_lteq_pre { public: template inline static void apply(Mat& out, const mtOp& X); template inline static void apply(Cube& out, const mtOpCube& X); }; class op_rel_lteq_post { public: template inline static void apply(Mat& out, const mtOp& X); template inline static void apply(Cube& out, const mtOpCube& X); }; class op_rel_gteq_pre { public: template inline static void apply(Mat& out, const mtOp& X); template inline static void apply(Cube& out, const mtOpCube& X); }; class op_rel_gteq_post { public: template inline static void apply(Mat& out, const mtOp& X); template inline static void apply(Cube& out, const mtOpCube& X); }; class op_rel_eq { public: template inline static void apply(Mat& out, const mtOp& X); template inline static void apply(Cube& out, const mtOpCube& X); }; class op_rel_noteq { public: template inline static void apply(Mat& out, const mtOp& X); template inline static void apply(Cube& out, const mtOpCube& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_relational_meat.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_relational //! @{ #undef operator_rel #undef arma_applier_mat_pre #undef arma_applier_mat_post #undef arma_applier_cube_pre #undef arma_applier_cube_post #define arma_applier_mat_pre(operator_rel) \ {\ typedef typename T1::elem_type eT;\ typedef typename Proxy::ea_type ea_type;\ \ const eT val = X.aux;\ \ const Proxy P(X.m);\ \ const uword n_rows = P.get_n_rows();\ const uword n_cols = P.get_n_cols();\ \ const bool bad_alias = ( Proxy::has_subview && P.is_alias(out) );\ \ if(bad_alias == false)\ {\ out.set_size(n_rows, n_cols);\ \ uword* out_mem = out.memptr();\ \ if(Proxy::prefer_at_accessor == false)\ {\ ea_type PA = P.get_ea();\ const uword n_elem = out.n_elem;\ \ for(uword i=0; i tmp(P.Q);\ \ out = (val) operator_rel (tmp);\ }\ } #define arma_applier_mat_post(operator_rel) \ {\ typedef typename T1::elem_type eT;\ typedef typename Proxy::ea_type ea_type;\ \ const eT val = X.aux;\ \ const Proxy P(X.m);\ \ const uword n_rows = P.get_n_rows();\ const uword n_cols = P.get_n_cols();\ \ const bool bad_alias = ( Proxy::has_subview && P.is_alias(out) );\ \ if(bad_alias == false)\ {\ out.set_size(n_rows, n_cols);\ \ uword* out_mem = out.memptr();\ \ if(Proxy::prefer_at_accessor == false)\ {\ ea_type PA = P.get_ea();\ const uword n_elem = out.n_elem;\ \ for(uword i=0; i tmp(P.Q);\ \ out = (tmp) operator_rel (val);\ }\ } #define arma_applier_cube_pre(operator_rel) \ {\ typedef typename T1::elem_type eT;\ typedef typename ProxyCube::ea_type ea_type;\ \ const eT val = X.aux;\ \ const ProxyCube P(X.m);\ \ const uword n_rows = P.get_n_rows();\ const uword n_cols = P.get_n_cols();\ const uword n_slices = P.get_n_slices();\ \ const bool bad_alias = ( ProxyCube::has_subview && P.is_alias(out) );\ \ if(bad_alias == false)\ {\ out.set_size(n_rows, n_cols, n_slices);\ \ uword* out_mem = out.memptr();\ \ if(ProxyCube::prefer_at_accessor == false)\ {\ ea_type PA = P.get_ea();\ const uword n_elem = out.n_elem;\ \ for(uword i=0; i::stored_type> tmp(P.Q);\ \ out = (val) operator_rel (tmp.M);\ }\ } #define arma_applier_cube_post(operator_rel) \ {\ typedef typename T1::elem_type eT;\ typedef typename ProxyCube::ea_type ea_type;\ \ const eT val = X.aux;\ \ const ProxyCube P(X.m);\ \ const uword n_rows = P.get_n_rows();\ const uword n_cols = P.get_n_cols();\ const uword n_slices = P.get_n_slices();\ \ const bool bad_alias = ( ProxyCube::has_subview && P.is_alias(out) );\ \ if(bad_alias == false)\ {\ out.set_size(n_rows, n_cols, n_slices);\ \ uword* out_mem = out.memptr();\ \ if(ProxyCube::prefer_at_accessor == false)\ {\ ea_type PA = P.get_ea();\ const uword n_elem = out.n_elem;\ \ for(uword i=0; i::stored_type> tmp(P.Q);\ \ out = (tmp.M) operator_rel (val);\ }\ } template inline void op_rel_lt_pre::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); arma_applier_mat_pre( < ); } template inline void op_rel_gt_pre::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); arma_applier_mat_pre( > ); } template inline void op_rel_lteq_pre::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); arma_applier_mat_pre( <= ); } template inline void op_rel_gteq_pre::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); arma_applier_mat_pre( >= ); } template inline void op_rel_lt_post::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); arma_applier_mat_post( < ); } template inline void op_rel_gt_post::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); arma_applier_mat_post( > ); } template inline void op_rel_lteq_post::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); arma_applier_mat_post( <= ); } template inline void op_rel_gteq_post::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); arma_applier_mat_post( >= ); } template inline void op_rel_eq::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); arma_applier_mat_post( == ); } template inline void op_rel_noteq::apply(Mat& out, const mtOp& X) { arma_extra_debug_sigprint(); arma_applier_mat_post( != ); } // // // template inline void op_rel_lt_pre::apply(Cube& out, const mtOpCube& X) { arma_extra_debug_sigprint(); arma_applier_cube_pre( < ); } template inline void op_rel_gt_pre::apply(Cube& out, const mtOpCube& X) { arma_extra_debug_sigprint(); arma_applier_cube_pre( > ); } template inline void op_rel_lteq_pre::apply(Cube& out, const mtOpCube& X) { arma_extra_debug_sigprint(); arma_applier_cube_pre( <= ); } template inline void op_rel_gteq_pre::apply(Cube& out, const mtOpCube& X) { arma_extra_debug_sigprint(); arma_applier_cube_pre( >= ); } template inline void op_rel_lt_post::apply(Cube& out, const mtOpCube& X) { arma_extra_debug_sigprint(); arma_applier_cube_post( < ); } template inline void op_rel_gt_post::apply(Cube& out, const mtOpCube& X) { arma_extra_debug_sigprint(); arma_applier_cube_post( > ); } template inline void op_rel_lteq_post::apply(Cube& out, const mtOpCube& X) { arma_extra_debug_sigprint(); arma_applier_cube_post( <= ); } template inline void op_rel_gteq_post::apply(Cube& out, const mtOpCube& X) { arma_extra_debug_sigprint(); arma_applier_cube_post( >= ); } template inline void op_rel_eq::apply(Cube& out, const mtOpCube& X) { arma_extra_debug_sigprint(); arma_applier_cube_post( == ); } template inline void op_rel_noteq::apply(Cube& out, const mtOpCube& X) { arma_extra_debug_sigprint(); arma_applier_cube_post( != ); } #undef arma_applier_mat_pre #undef arma_applier_mat_post #undef arma_applier_cube_pre #undef arma_applier_cube_post //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_repmat_bones.hpp ================================================ // Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_repmat //! @{ class op_repmat { public: template inline static void apply(Mat& out, const Op& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_repmat_meat.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_repmat //! @{ //! \brief //! implementation of the 'repeat matrix' operation, used for constructing matrices template inline void op_repmat::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_check tmp(in.m, out); const Mat& X = tmp.M; const uword copies_per_row = in.aux_uword_a; const uword copies_per_col = in.aux_uword_b; const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; out.set_size(X_n_rows * copies_per_row, X_n_cols * copies_per_col); const uword out_n_rows = out.n_rows; const uword out_n_cols = out.n_cols; // if( (out_n_rows > 0) && (out_n_cols > 0) ) // { // for(uword col = 0; col < out_n_cols; col += X_n_cols) // for(uword row = 0; row < out_n_rows; row += X_n_rows) // { // out.submat(row, col, row+X_n_rows-1, col+X_n_cols-1) = X; // } // } if( (out_n_rows > 0) && (out_n_cols > 0) ) { if(copies_per_row != 1) { for(uword col_copy=0; col_copy < copies_per_col; ++col_copy) { const uword out_col_offset = X_n_cols * col_copy; for(uword col=0; col < X_n_cols; ++col) { eT* out_colptr = out.colptr(col + out_col_offset); const eT* X_colptr = X.colptr(col); for(uword row_copy=0; row_copy < copies_per_row; ++row_copy) { const uword out_row_offset = X_n_rows * row_copy; arrayops::copy( &out_colptr[out_row_offset], X_colptr, X_n_rows ); } } } } else { for(uword col_copy=0; col_copy < copies_per_col; ++col_copy) { const uword out_col_offset = X_n_cols * col_copy; for(uword col=0; col < X_n_cols; ++col) { eT* out_colptr = out.colptr(col + out_col_offset); const eT* X_colptr = X.colptr(col); arrayops::copy( out_colptr, X_colptr, X_n_rows ); } } } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_reshape_bones.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_reshape //! @{ class op_reshape { public: template inline static void apply_unwrap(Mat& out, const Mat& A, const uword in_n_rows, const uword in_n_cols, const uword in_dim); template inline static void apply_proxy (Mat& out, const Proxy& P, const uword in_n_rows, const uword in_n_cols); template inline static void apply (Mat& out, const Op& in); }; class op_reshape_ext { public: template inline static void apply( Mat& out, const Op& in); template inline static void apply(Cube& out, const OpCube& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_reshape_meat.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_reshape //! @{ template inline void op_reshape::apply_unwrap(Mat& out, const Mat& A, const uword in_n_rows, const uword in_n_cols, const uword in_dim) { arma_extra_debug_sigprint(); const bool is_alias = (&out == &A); const uword in_n_elem = in_n_rows * in_n_cols; if(A.n_elem == in_n_elem) { if(in_dim == 0) { if(is_alias == false) { out.set_size(in_n_rows, in_n_cols); arrayops::copy( out.memptr(), A.memptr(), out.n_elem ); } else // &out == &A, i.e. inplace resize { out.set_size(in_n_rows, in_n_cols); // set_size() doesn't destroy data as long as the number of elements in the matrix remains the same } } else { unwrap_check< Mat > B_tmp(A, is_alias); const Mat& B = B_tmp.M; out.set_size(in_n_rows, in_n_cols); eT* out_mem = out.memptr(); const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; for(uword row=0; row > B_tmp(A, is_alias); const Mat& B = B_tmp.M; const uword n_elem_to_copy = (std::min)(B.n_elem, in_n_elem); out.set_size(in_n_rows, in_n_cols); eT* out_mem = out.memptr(); if(in_dim == 0) { arrayops::copy( out_mem, B.memptr(), n_elem_to_copy ); } else { uword row = 0; uword col = 0; const uword B_n_cols = B.n_cols; for(uword i=0; i= B_n_cols) { col = 0; ++row; } } } for(uword i=n_elem_to_copy; i inline void op_reshape::apply_proxy(Mat& out, const Proxy& P, const uword in_n_rows, const uword in_n_cols) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; out.set_size(in_n_rows, in_n_cols); eT* out_mem = out.memptr(); const uword in_n_elem = in_n_rows * in_n_cols; if(P.get_n_elem() == in_n_elem) { if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i::prefer_at_accessor == false) { typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i= n_elem_to_copy) { goto nested_loop_end; } out_mem[i] = P.at(row,col); ++i; } nested_loop_end: ; } for(uword i=n_elem_to_copy; i inline void op_reshape::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(in.m); const uword in_n_rows = in.aux_uword_a; const uword in_n_cols = in.aux_uword_b; if( (is_Mat::stored_type>::value == true) && (Proxy::fake_mat == false) ) { // not checking for aliasing here, as this might be an inplace reshape const unwrap::stored_type> tmp(P.Q); op_reshape::apply_unwrap(out, tmp.M, in_n_rows, in_n_cols, uword(0)); } else { if(P.is_alias(out)) { Mat tmp; op_reshape::apply_proxy(tmp, P, in_n_rows, in_n_cols); out.steal_mem(tmp); } else { op_reshape::apply_proxy(out, P, in_n_rows, in_n_cols); } } } template inline void op_reshape_ext::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); const unwrap tmp(in.m); const uword in_n_rows = in.aux_uword_a; const uword in_n_cols = in.aux_uword_b; const uword in_dim = in.aux_uword_c; op_reshape::apply_unwrap(out, tmp.M, in_n_rows, in_n_cols, in_dim); } template inline void op_reshape_ext::apply(Cube& out, const OpCube& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_cube A_tmp(in.m); const Cube& A = A_tmp.M; const uword in_n_rows = in.aux_uword_a; const uword in_n_cols = in.aux_uword_b; const uword in_n_slices = in.aux_uword_c; const uword in_dim = in.aux_uword_d; const uword in_n_elem = in_n_rows * in_n_cols * in_n_slices; if(A.n_elem == in_n_elem) { if(in_dim == 0) { if(&out != &A) { out.set_size(in_n_rows, in_n_cols, in_n_slices); arrayops::copy( out.memptr(), A.memptr(), out.n_elem ); } else // &out == &A, i.e. inplace resize { out.set_size(in_n_rows, in_n_cols, in_n_slices); // set_size() doesn't destroy data as long as the number of elements in the cube remains the same } } else { unwrap_cube_check< Cube > B_tmp(A, out); const Cube& B = B_tmp.M; out.set_size(in_n_rows, in_n_cols, in_n_slices); eT* out_mem = out.memptr(); const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; const uword B_n_slices = B.n_slices; for(uword slice = 0; slice < B_n_slices; ++slice) for(uword row = 0; row < B_n_rows; ++row ) for(uword col = 0; col < B_n_cols; ++col ) { *out_mem = B.at(row,col,slice); out_mem++; } } } else { const unwrap_cube_check< Cube > B_tmp(A, out); const Cube& B = B_tmp.M; const uword n_elem_to_copy = (std::min)(B.n_elem, in_n_elem); out.set_size(in_n_rows, in_n_cols, in_n_slices); eT* out_mem = out.memptr(); if(in_dim == 0) { arrayops::copy( out_mem, B.memptr(), n_elem_to_copy ); } else { uword row = 0; uword col = 0; uword slice = 0; const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; for(uword i=0; i= B_n_cols) { col = 0; ++row; if(row >= B_n_rows) { row = 0; ++slice; } } } } for(uword i=n_elem_to_copy; i inline static void apply( Mat& out, const Op& in); template inline static void apply(Cube& out, const OpCube& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_resize_meat.hpp ================================================ // Copyright (C) 2011-2013 Conrad Sanderson // Copyright (C) 2011-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_resize //! @{ template inline void op_resize::apply(Mat& actual_out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword out_n_rows = in.aux_uword_a; const uword out_n_cols = in.aux_uword_b; const unwrap tmp(in.m); const Mat& A = tmp.M; const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const bool alias = (&actual_out == &A); if(alias) { if( (A_n_rows == out_n_rows) && (A_n_cols == out_n_cols) ) { return; } if(actual_out.is_empty()) { actual_out.zeros(out_n_rows, out_n_cols); return; } } Mat B; Mat& out = alias ? B : actual_out; out.set_size(out_n_rows, out_n_cols); if( (out_n_rows > A_n_rows) || (out_n_cols > A_n_cols) ) { out.zeros(); } if( (out.n_elem > 0) && (A.n_elem > 0) ) { const uword end_row = (std::min)(out_n_rows, A_n_rows) - 1; const uword end_col = (std::min)(out_n_cols, A_n_cols) - 1; out.submat(0, 0, end_row, end_col) = A.submat(0, 0, end_row, end_col); } if(alias) { actual_out.steal_mem(B); } } template inline void op_resize::apply(Cube& actual_out, const OpCube& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword out_n_rows = in.aux_uword_a; const uword out_n_cols = in.aux_uword_b; const uword out_n_slices = in.aux_uword_c; const unwrap_cube tmp(in.m); const Cube& A = tmp.M; const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword A_n_slices = A.n_slices; const bool alias = (&actual_out == &A); if(alias) { if( (A_n_rows == out_n_rows) && (A_n_cols == out_n_cols) && (A_n_slices == out_n_slices) ) { return; } if(actual_out.is_empty()) { actual_out.zeros(out_n_rows, out_n_cols, out_n_slices); return; } } Cube B; Cube& out = alias ? B : actual_out; out.set_size(out_n_rows, out_n_cols, out_n_slices); if( (out_n_rows > A_n_rows) || (out_n_cols > A_n_cols) || (out_n_slices > A_n_slices) ) { out.zeros(); } if( (out.n_elem > 0) && (A.n_elem > 0) ) { const uword end_row = (std::min)(out_n_rows, A_n_rows) - 1; const uword end_col = (std::min)(out_n_cols, A_n_cols) - 1; const uword end_slice = (std::min)(out_n_slices, A_n_slices) - 1; out.subcube(0, 0, 0, end_row, end_col, end_slice) = A.subcube(0, 0, 0, end_row, end_col, end_slice); } if(alias) { actual_out.steal_mem(B); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_shuffle_bones.hpp ================================================ // Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_shuffle //! @{ class op_shuffle { public: template inline static void apply(Mat& out, const Op& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_shuffle_meat.hpp ================================================ // Copyright (C) 2009-2013 Conrad Sanderson // Copyright (C) 2009-2013 NICTA (www.nicta.com.au) // Copyright (C) 2009-2010 Dimitrios Bouzas // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_shuffle //! @{ template inline void op_shuffle::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap tmp(in.m); const Mat& X = tmp.M; if(X.is_empty()) { out.copy_size(X); return; } const uword dim = in.aux_uword_a; arma_debug_check( (dim > 1), "shuffle(): parameter 'dim' must be 0 or 1" ); const uword N = (dim == 0) ? X.n_rows : X.n_cols; // see op_sort_index_bones.hpp for the definition of arma_sort_index_packet // and the associated comparison functor std::vector< arma_sort_index_packet > packet_vec(N); for(uword i=0; i()); packet_vec[i].index = i; } arma_sort_index_helper_ascend comparator; std::sort( packet_vec.begin(), packet_vec.end(), comparator ); const bool is_alias = (&out == &X); if(X.is_vec() == false) { if(is_alias == false) { arma_extra_debug_print("op_shuffle::apply(): matrix"); out.copy_size(X); if(dim == 0) { for(uword i=0; i 1) // i.e. column vector { for(uword i=0; i 1) // i.e. row vector { for(uword i=0; i 1) // i.e. column vector { for(uword i=0; i 1) // i.e. row vector { for(uword i=0; i inline static void copy_row(eT* X, const Mat& A, const uword row); template inline static void copy_row(Mat& A, const eT* X, const uword row); template inline static void direct_sort(eT* X, const uword N, const uword sort_type = 0); template inline static void direct_sort_ascending(eT* X, const uword N); template inline static void apply_noalias(Mat& out, const Mat& X, const uword sort_type, const uword dim); template inline static void apply(Mat& out, const Op& in); }; template struct arma_ascend_sort_helper { arma_inline bool operator() (const eT a, const eT b) const { return (a < b); } }; template struct arma_descend_sort_helper { arma_inline bool operator() (const eT a, const eT b) const { return (a > b); } }; template struct arma_ascend_sort_helper< std::complex > { typedef typename std::complex eT; inline bool operator() (const eT& a, const eT& b) const { return (std::abs(a) < std::abs(b)); } }; template struct arma_descend_sort_helper< std::complex > { typedef typename std::complex eT; inline bool operator() (const eT& a, const eT& b) const { return (std::abs(a) > std::abs(b)); } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_sort_index_bones.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_sort_index //! @{ class op_sort_index { public: template static inline bool apply_noalias(Mat& out, const Proxy& P, const uword sort_type); template static inline void apply(Mat& out, const mtOp& in); }; class op_stable_sort_index { public: template static inline bool apply_noalias(Mat& out, const Proxy& P, const uword sort_type); template static inline void apply(Mat& out, const mtOp& in); }; template struct arma_sort_index_packet { T1 val; T2 index; }; class arma_sort_index_helper_ascend { public: template arma_inline bool operator() (const arma_sort_index_packet& A, const arma_sort_index_packet& B) const { return (A.val < B.val); } }; class arma_sort_index_helper_descend { public: template arma_inline bool operator() (const arma_sort_index_packet& A, const arma_sort_index_packet& B) const { return (A.val > B.val); } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_sort_index_meat.hpp ================================================ // Copyright (C) 2009-2015 Conrad Sanderson // Copyright (C) 2009-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_sort_index //! @{ template inline bool arma_sort_index_helper(Mat& out, const Proxy& P, const uword sort_type, typename arma_not_cx::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; const uword n_elem = P.get_n_elem(); out.set_size(n_elem, 1); std::vector< arma_sort_index_packet > packet_vec(n_elem); if(Proxy::prefer_at_accessor == false) { for(uword i=0; i inline bool arma_sort_index_helper(Mat& out, const Proxy& P, const uword sort_type, typename arma_cx_only::result* junk = 0) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; const uword n_elem = P.get_n_elem(); out.set_size(n_elem, 1); std::vector< arma_sort_index_packet > packet_vec(n_elem); if(Proxy::prefer_at_accessor == false) { for(uword i=0; i inline bool op_sort_index::apply_noalias(Mat& out, const Proxy& P, const uword sort_type) { arma_extra_debug_sigprint(); return arma_sort_index_helper(out, P, sort_type); } template inline void op_sort_index::apply(Mat& out, const mtOp& in) { arma_extra_debug_sigprint(); const Proxy P(in.m); if(P.get_n_elem() == 0) { out.set_size(0,1); return; } const uword sort_type = in.aux_uword_a; bool all_non_nan = false; if(P.is_alias(out)) { Mat out2; all_non_nan = op_sort_index::apply_noalias(out2, P, sort_type); out.steal_mem(out2); } else { all_non_nan = op_sort_index::apply_noalias(out, P, sort_type); } arma_debug_check( (all_non_nan == false), "sort_index(): detected NaN" ); } template inline bool op_stable_sort_index::apply_noalias(Mat& out, const Proxy& P, const uword sort_type) { arma_extra_debug_sigprint(); return arma_sort_index_helper(out, P, sort_type); } template inline void op_stable_sort_index::apply(Mat& out, const mtOp& in) { arma_extra_debug_sigprint(); const Proxy P(in.m); if(P.get_n_elem() == 0) { out.set_size(0,1); return; } const uword sort_type = in.aux_uword_a; bool all_non_nan = false; if(P.is_alias(out)) { Mat out2; all_non_nan = op_stable_sort_index::apply_noalias(out2, P, sort_type); out.steal_mem(out2); } else { all_non_nan = op_stable_sort_index::apply_noalias(out, P, sort_type); } arma_debug_check( (all_non_nan == false), "stable_sort_index(): detected NaN" ); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_sort_meat.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_sort //! @{ template inline void op_sort::direct_sort(eT* X, const uword n_elem, const uword sort_type) { arma_extra_debug_sigprint(); if(sort_type == 0) { arma_ascend_sort_helper comparator; std::sort(&X[0], &X[n_elem], comparator); } else { arma_descend_sort_helper comparator; std::sort(&X[0], &X[n_elem], comparator); } } template inline void op_sort::direct_sort_ascending(eT* X, const uword n_elem) { arma_extra_debug_sigprint(); arma_ascend_sort_helper comparator; std::sort(&X[0], &X[n_elem], comparator); } template inline void op_sort::copy_row(eT* X, const Mat& A, const uword row) { const uword N = A.n_cols; uword i,j; for(i=0, j=1; j inline void op_sort::copy_row(Mat& A, const eT* X, const uword row) { const uword N = A.n_cols; uword i,j; for(i=0, j=1; j inline void op_sort::apply_noalias(Mat& out, const Mat& X, const uword sort_type, const uword dim) { arma_extra_debug_sigprint(); if( (X.n_rows * X.n_cols) <= 1 ) { out = X; return; } if(dim == 0) // sort the contents of each column { arma_extra_debug_print("op_sort::apply(): dim = 0"); out = X; const uword n_rows = out.n_rows; const uword n_cols = out.n_cols; for(uword col=0; col < n_cols; ++col) { op_sort::direct_sort( out.colptr(col), n_rows, sort_type ); } } else if(dim == 1) // sort the contents of each row { if(X.n_rows == 1) // a row vector { arma_extra_debug_print("op_sort::apply(): dim = 1, vector specific"); out = X; op_sort::direct_sort(out.memptr(), out.n_elem, sort_type); } else // not a row vector { arma_extra_debug_print("op_sort::apply(): dim = 1, generic"); out.copy_size(X); const uword n_rows = out.n_rows; const uword n_cols = out.n_cols; podarray tmp_array(n_cols); for(uword row=0; row < n_rows; ++row) { op_sort::copy_row(tmp_array.memptr(), X, row); op_sort::direct_sort( tmp_array.memptr(), n_cols, sort_type ); op_sort::copy_row(out, tmp_array.memptr(), row); } } } } template inline void op_sort::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const quasi_unwrap U(in.m); const Mat& X = U.M; const uword sort_type = in.aux_uword_a; const uword dim = in.aux_uword_b; arma_debug_check( (sort_type > 1), "sort(): parameter 'sort_type' must be 0 or 1" ); arma_debug_check( (dim > 1), "sort(): parameter 'dim' must be 0 or 1" ); arma_debug_check( (X.has_nan()), "sort(): detected NaN" ); if(U.is_alias(out)) { Mat out2; op_sort::apply_noalias(out2, X, sort_type, dim); out.steal_mem(out2); } else { apply_noalias(out, X, sort_type, dim); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_stddev_bones.hpp ================================================ // Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_stddev //! @{ //! Class for finding the standard deviation class op_stddev { public: template inline static void apply(Mat& out, const mtOp& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_stddev_meat.hpp ================================================ // Copyright (C) 2009-2015 Conrad Sanderson // Copyright (C) 2009-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_stddev //! @{ //! \brief //! For each row or for each column, find the standard deviation. //! The result is stored in a dense matrix that has either one column or one row. //! The dimension for which the standard deviations are found is set via the stddev() function. template inline void op_stddev::apply(Mat& out, const mtOp& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type in_eT; typedef typename T1::pod_type out_eT; const unwrap_check_mixed tmp(in.m, out); const Mat& X = tmp.M; const uword norm_type = in.aux_uword_a; const uword dim = in.aux_uword_b; arma_debug_check( (norm_type > 1), "stddev(): parameter 'norm_type' must be 0 or 1" ); arma_debug_check( (dim > 1), "stddev(): parameter 'dim' must be 0 or 1" ); const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; if(dim == 0) { arma_extra_debug_print("op_stddev::apply(): dim = 0"); out.set_size((X_n_rows > 0) ? 1 : 0, X_n_cols); if(X_n_rows > 0) { out_eT* out_mem = out.memptr(); for(uword col=0; col 0) ? 1 : 0); if(X_n_cols > 0) { podarray dat(X_n_cols); in_eT* dat_mem = dat.memptr(); out_eT* out_mem = out.memptr(); for(uword row=0; row struct pos { static const uword n2 = (do_flip == false) ? (row + col*2) : (col + row*2); static const uword n3 = (do_flip == false) ? (row + col*3) : (col + row*3); static const uword n4 = (do_flip == false) ? (row + col*4) : (col + row*4); }; template arma_hot inline static void apply_mat_noalias_tinysq(Mat& out, const TA& A); template arma_hot inline static void apply_mat_noalias(Mat& out, const TA& A); template arma_hot inline static void apply_mat_inplace(Mat& out); template arma_hot inline static void apply_mat(Mat& out, const TA& A); template arma_hot inline static void apply_proxy(Mat& out, const T1& X); template arma_hot inline static void apply(Mat& out, const Op& in); }; class op_strans2 { public: template struct pos { static const uword n2 = (do_flip == false) ? (row + col*2) : (col + row*2); static const uword n3 = (do_flip == false) ? (row + col*3) : (col + row*3); static const uword n4 = (do_flip == false) ? (row + col*4) : (col + row*4); }; template arma_hot inline static void apply_noalias_tinysq(Mat& out, const TA& A, const eT val); template arma_hot inline static void apply_noalias(Mat& out, const TA& A, const eT val); template arma_hot inline static void apply(Mat& out, const TA& A, const eT val); template arma_hot inline static void apply_proxy(Mat& out, const T1& X, const typename T1::elem_type val); // NOTE: there is no direct handling of Op, as op_strans2::apply_proxy() is currently only called by op_htrans2 for non-complex numbers }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_strans_meat.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // Copyright (C) 2012 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_strans //! @{ //! for tiny square matrices (size <= 4x4) template arma_hot inline void op_strans::apply_mat_noalias_tinysq(Mat& out, const TA& A) { const eT* Am = A.memptr(); eT* outm = out.memptr(); switch(A.n_rows) { case 1: { outm[0] = Am[0]; } break; case 2: { outm[pos::n2] = Am[pos::n2]; outm[pos::n2] = Am[pos::n2]; outm[pos::n2] = Am[pos::n2]; outm[pos::n2] = Am[pos::n2]; } break; case 3: { outm[pos::n3] = Am[pos::n3]; outm[pos::n3] = Am[pos::n3]; outm[pos::n3] = Am[pos::n3]; outm[pos::n3] = Am[pos::n3]; outm[pos::n3] = Am[pos::n3]; outm[pos::n3] = Am[pos::n3]; outm[pos::n3] = Am[pos::n3]; outm[pos::n3] = Am[pos::n3]; outm[pos::n3] = Am[pos::n3]; } break; case 4: { outm[pos::n4] = Am[pos::n4]; outm[pos::n4] = Am[pos::n4]; outm[pos::n4] = Am[pos::n4]; outm[pos::n4] = Am[pos::n4]; outm[pos::n4] = Am[pos::n4]; outm[pos::n4] = Am[pos::n4]; outm[pos::n4] = Am[pos::n4]; outm[pos::n4] = Am[pos::n4]; outm[pos::n4] = Am[pos::n4]; outm[pos::n4] = Am[pos::n4]; outm[pos::n4] = Am[pos::n4]; outm[pos::n4] = Am[pos::n4]; outm[pos::n4] = Am[pos::n4]; outm[pos::n4] = Am[pos::n4]; outm[pos::n4] = Am[pos::n4]; outm[pos::n4] = Am[pos::n4]; } break; default: ; } } //! Immediate transpose of a dense matrix template arma_hot inline void op_strans::apply_mat_noalias(Mat& out, const TA& A) { arma_extra_debug_sigprint(); const uword A_n_cols = A.n_cols; const uword A_n_rows = A.n_rows; out.set_size(A_n_cols, A_n_rows); if( (TA::is_row) || (TA::is_col) || (A_n_cols == 1) || (A_n_rows == 1) ) { arrayops::copy( out.memptr(), A.memptr(), A.n_elem ); } else { if( (A_n_rows <= 4) && (A_n_rows == A_n_cols) ) { op_strans::apply_mat_noalias_tinysq(out, A); } else { eT* outptr = out.memptr(); for(uword k=0; k < A_n_rows; ++k) { const eT* Aptr = &(A.at(k,0)); uword j; for(j=1; j < A_n_cols; j+=2) { const eT tmp_i = (*Aptr); Aptr += A_n_rows; const eT tmp_j = (*Aptr); Aptr += A_n_rows; (*outptr) = tmp_i; outptr++; (*outptr) = tmp_j; outptr++; } if((j-1) < A_n_cols) { (*outptr) = (*Aptr); outptr++;; } } } } } template arma_hot inline void op_strans::apply_mat_inplace(Mat& out) { arma_extra_debug_sigprint(); const uword n_rows = out.n_rows; const uword n_cols = out.n_cols; if(n_rows == n_cols) { arma_extra_debug_print("op_strans::apply(): doing in-place transpose of a square matrix"); const uword N = n_rows; for(uword k=0; k < N; ++k) { eT* colptr = &(out.at(k,k)); eT* rowptr = colptr; colptr++; rowptr += N; uword j; for(j=(k+2); j < N; j+=2) { std::swap( (*rowptr), (*colptr) ); rowptr += N; colptr++; std::swap( (*rowptr), (*colptr) ); rowptr += N; colptr++; } if((j-1) < N) { std::swap( (*rowptr), (*colptr) ); } } } else { Mat tmp; op_strans::apply_mat_noalias(tmp, out); out.steal_mem(tmp); } } template arma_hot inline void op_strans::apply_mat(Mat& out, const TA& A) { arma_extra_debug_sigprint(); if(&out != &A) { op_strans::apply_mat_noalias(out, A); } else { op_strans::apply_mat_inplace(out); } } template arma_hot inline void op_strans::apply_proxy(Mat& out, const T1& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(X); // allow detection of in-place transpose if( (is_Mat::stored_type>::value == true) && (Proxy::fake_mat == false) ) { const unwrap::stored_type> tmp(P.Q); op_strans::apply_mat(out, tmp.M); } else { const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); const bool is_alias = P.is_alias(out); if( (resolves_to_vector::value == true) && (Proxy::prefer_at_accessor == false) ) { if(is_alias == false) { out.set_size(n_cols, n_rows); eT* out_mem = out.memptr(); const uword n_elem = P.get_n_elem(); typename Proxy::ea_type Pea = P.get_ea(); uword i,j; for(i=0, j=1; j < n_elem; i+=2, j+=2) { const eT tmp_i = Pea[i]; const eT tmp_j = Pea[j]; out_mem[i] = tmp_i; out_mem[j] = tmp_j; } if(i < n_elem) { out_mem[i] = Pea[i]; } } else // aliasing { Mat out2(n_cols, n_rows); eT* out_mem = out2.memptr(); const uword n_elem = P.get_n_elem(); typename Proxy::ea_type Pea = P.get_ea(); uword i,j; for(i=0, j=1; j < n_elem; i+=2, j+=2) { const eT tmp_i = Pea[i]; const eT tmp_j = Pea[j]; out_mem[i] = tmp_i; out_mem[j] = tmp_j; } if(i < n_elem) { out_mem[i] = Pea[i]; } out.steal_mem(out2); } } else // general matrix transpose { if(is_alias == false) { out.set_size(n_cols, n_rows); eT* outptr = out.memptr(); for(uword k=0; k < n_rows; ++k) { uword j; for(j=1; j < n_cols; j+=2) { const uword i = j-1; const eT tmp_i = P.at(k,i); const eT tmp_j = P.at(k,j); (*outptr) = tmp_i; outptr++; (*outptr) = tmp_j; outptr++; } const uword i = j-1; if(i < n_cols) { (*outptr) = P.at(k,i); outptr++; } } } else // aliasing { Mat out2(n_cols, n_rows); eT* out2ptr = out2.memptr(); for(uword k=0; k < n_rows; ++k) { uword j; for(j=1; j < n_cols; j+=2) { const uword i = j-1; const eT tmp_i = P.at(k,i); const eT tmp_j = P.at(k,j); (*out2ptr) = tmp_i; out2ptr++; (*out2ptr) = tmp_j; out2ptr++; } const uword i = j-1; if(i < n_cols) { (*out2ptr) = P.at(k,i); out2ptr++; } } out.steal_mem(out2); } } } } template arma_hot inline void op_strans::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); op_strans::apply_proxy(out, in.m); } // // op_strans2 //! for tiny square matrices (size <= 4x4) template arma_hot inline void op_strans2::apply_noalias_tinysq(Mat& out, const TA& A, const eT val) { const eT* Am = A.memptr(); eT* outm = out.memptr(); switch(A.n_rows) { case 1: { outm[0] = val * Am[0]; } break; case 2: { outm[pos::n2] = val * Am[pos::n2]; outm[pos::n2] = val * Am[pos::n2]; outm[pos::n2] = val * Am[pos::n2]; outm[pos::n2] = val * Am[pos::n2]; } break; case 3: { outm[pos::n3] = val * Am[pos::n3]; outm[pos::n3] = val * Am[pos::n3]; outm[pos::n3] = val * Am[pos::n3]; outm[pos::n3] = val * Am[pos::n3]; outm[pos::n3] = val * Am[pos::n3]; outm[pos::n3] = val * Am[pos::n3]; outm[pos::n3] = val * Am[pos::n3]; outm[pos::n3] = val * Am[pos::n3]; outm[pos::n3] = val * Am[pos::n3]; } break; case 4: { outm[pos::n4] = val * Am[pos::n4]; outm[pos::n4] = val * Am[pos::n4]; outm[pos::n4] = val * Am[pos::n4]; outm[pos::n4] = val * Am[pos::n4]; outm[pos::n4] = val * Am[pos::n4]; outm[pos::n4] = val * Am[pos::n4]; outm[pos::n4] = val * Am[pos::n4]; outm[pos::n4] = val * Am[pos::n4]; outm[pos::n4] = val * Am[pos::n4]; outm[pos::n4] = val * Am[pos::n4]; outm[pos::n4] = val * Am[pos::n4]; outm[pos::n4] = val * Am[pos::n4]; outm[pos::n4] = val * Am[pos::n4]; outm[pos::n4] = val * Am[pos::n4]; outm[pos::n4] = val * Am[pos::n4]; outm[pos::n4] = val * Am[pos::n4]; } break; default: ; } } template arma_hot inline void op_strans2::apply_noalias(Mat& out, const TA& A, const eT val) { arma_extra_debug_sigprint(); const uword A_n_cols = A.n_cols; const uword A_n_rows = A.n_rows; out.set_size(A_n_cols, A_n_rows); if( (TA::is_col) || (TA::is_row) || (A_n_cols == 1) || (A_n_rows == 1) ) { const uword N = A.n_elem; const eT* A_mem = A.memptr(); eT* out_mem = out.memptr(); uword i,j; for(i=0, j=1; j < N; i+=2, j+=2) { const eT tmp_i = A_mem[i]; const eT tmp_j = A_mem[j]; out_mem[i] = val * tmp_i; out_mem[j] = val * tmp_j; } if(i < N) { out_mem[i] = val * A_mem[i]; } } else { if( (A_n_rows <= 4) && (A_n_rows == A_n_cols) ) { op_strans2::apply_noalias_tinysq(out, A, val); } else { eT* outptr = out.memptr(); for(uword k=0; k < A_n_rows; ++k) { const eT* Aptr = &(A.at(k,0)); uword j; for(j=1; j < A_n_cols; j+=2) { const eT tmp_i = (*Aptr); Aptr += A_n_rows; const eT tmp_j = (*Aptr); Aptr += A_n_rows; (*outptr) = val * tmp_i; outptr++; (*outptr) = val * tmp_j; outptr++; } if((j-1) < A_n_cols) { (*outptr) = val * (*Aptr); outptr++;; } } } } } template arma_hot inline void op_strans2::apply(Mat& out, const TA& A, const eT val) { arma_extra_debug_sigprint(); if(&out != &A) { op_strans2::apply_noalias(out, A, val); } else { const uword n_rows = out.n_rows; const uword n_cols = out.n_cols; if(n_rows == n_cols) { arma_extra_debug_print("op_strans2::apply(): doing in-place transpose of a square matrix"); const uword N = n_rows; // TODO: do multiplication while swapping for(uword k=0; k < N; ++k) { eT* colptr = out.colptr(k); uword i,j; for(i=(k+1), j=(k+2); j < N; i+=2, j+=2) { std::swap(out.at(k,i), colptr[i]); std::swap(out.at(k,j), colptr[j]); } if(i < N) { std::swap(out.at(k,i), colptr[i]); } } arrayops::inplace_mul( out.memptr(), val, out.n_elem ); } else { Mat tmp; op_strans2::apply_noalias(tmp, A, val); out.steal_mem(tmp); } } } template arma_hot inline void op_strans2::apply_proxy(Mat& out, const T1& X, const typename T1::elem_type val) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(X); // allow detection of in-place transpose if( (is_Mat::stored_type>::value == true) && (Proxy::fake_mat == false) ) { const unwrap::stored_type> tmp(P.Q); op_strans2::apply(out, tmp.M, val); } else { const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); const bool is_alias = P.is_alias(out); if( (resolves_to_vector::value == true) && (Proxy::prefer_at_accessor == false) ) { if(is_alias == false) { out.set_size(n_cols, n_rows); eT* out_mem = out.memptr(); const uword n_elem = P.get_n_elem(); typename Proxy::ea_type Pea = P.get_ea(); uword i,j; for(i=0, j=1; j < n_elem; i+=2, j+=2) { const eT tmp_i = Pea[i]; const eT tmp_j = Pea[j]; out_mem[i] = val * tmp_i; out_mem[j] = val * tmp_j; } if(i < n_elem) { out_mem[i] = val * Pea[i]; } } else // aliasing { Mat out2(n_cols, n_rows); eT* out_mem = out2.memptr(); const uword n_elem = P.get_n_elem(); typename Proxy::ea_type Pea = P.get_ea(); uword i,j; for(i=0, j=1; j < n_elem; i+=2, j+=2) { const eT tmp_i = Pea[i]; const eT tmp_j = Pea[j]; out_mem[i] = val * tmp_i; out_mem[j] = val * tmp_j; } if(i < n_elem) { out_mem[i] = val * Pea[i]; } out.steal_mem(out2); } } else // general matrix transpose { if(is_alias == false) { out.set_size(n_cols, n_rows); eT* outptr = out.memptr(); for(uword k=0; k < n_rows; ++k) { uword j; for(j=1; j < n_cols; j+=2) { const uword i = j-1; const eT tmp_i = P.at(k,i); const eT tmp_j = P.at(k,j); (*outptr) = val * tmp_i; outptr++; (*outptr) = val * tmp_j; outptr++; } const uword i = j-1; if(i < n_cols) { (*outptr) = val * P.at(k,i); outptr++; } } } else // aliasing { Mat out2(n_cols, n_rows); eT* out2ptr = out2.memptr(); for(uword k=0; k < n_rows; ++k) { uword j; for(j=1; j < n_cols; j+=2) { const uword i = j-1; const eT tmp_i = P.at(k,i); const eT tmp_j = P.at(k,j); (*out2ptr) = val * tmp_i; out2ptr++; (*out2ptr) = val * tmp_j; out2ptr++; } const uword i = j-1; if(i < n_cols) { (*out2ptr) = val * P.at(k,i); out2ptr++; } } out.steal_mem(out2); } } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_sum_bones.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_sum //! @{ class op_sum { public: template arma_hot inline static void apply(Mat& out, const Op& in); template arma_hot inline static void apply_noalias(Mat& out, const Proxy& P, const uword dim); template arma_hot inline static void apply_noalias_unwrap(Mat& out, const Proxy& P, const uword dim); template arma_hot inline static void apply_noalias_proxy(Mat& out, const Proxy& P, const uword dim); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_sum_meat.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_sum //! @{ template arma_hot inline void op_sum::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword dim = in.aux_uword_a; arma_debug_check( (dim > 1), "sum(): parameter 'dim' must be 0 or 1" ); const Proxy P(in.m); if(P.is_alias(out) == false) { op_sum::apply_noalias(out, P, dim); } else { Mat tmp; op_sum::apply_noalias(tmp, P, dim); out.steal_mem(tmp); } } template arma_hot inline void op_sum::apply_noalias(Mat& out, const Proxy& P, const uword dim) { arma_extra_debug_sigprint(); if(is_Mat::stored_type>::value) { op_sum::apply_noalias_unwrap(out, P, dim); } else { op_sum::apply_noalias_proxy(out, P, dim); } } template arma_hot inline void op_sum::apply_noalias_unwrap(Mat& out, const Proxy& P, const uword dim) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename Proxy::stored_type P_stored_type; const unwrap tmp(P.Q); const typename unwrap::stored_type& X = tmp.M; const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; if(dim == 0) { out.set_size(1, X_n_cols); eT* out_mem = out.memptr(); for(uword col=0; col < X_n_cols; ++col) { out_mem[col] = arrayops::accumulate( X.colptr(col), X_n_rows ); } } else { out.zeros(X_n_rows, 1); eT* out_mem = out.memptr(); for(uword col=0; col < X_n_cols; ++col) { const eT* col_mem = X.colptr(col); for(uword row=0; row < X_n_rows; ++row) { out_mem[row] += col_mem[row]; } } } } template arma_hot inline void op_sum::apply_noalias_proxy(Mat& out, const Proxy& P, const uword dim) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword P_n_rows = P.get_n_rows(); const uword P_n_cols = P.get_n_cols(); if(dim == 0) { out.set_size(1, P_n_cols); eT* out_mem = out.memptr(); for(uword col=0; col < P_n_cols; ++col) { eT val1 = eT(0); eT val2 = eT(0); uword i,j; for(i=0, j=1; j < P_n_rows; i+=2, j+=2) { val1 += P.at(i,col); val2 += P.at(j,col); } if(i < P_n_rows) { val1 += P.at(i,col); } out_mem[col] = (val1 + val2); } } else { out.zeros(P_n_rows, 1); eT* out_mem = out.memptr(); for(uword col=0; col < P_n_cols; ++col) for(uword row=0; row < P_n_rows; ++row) { out_mem[row] += P.at(row,col); } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_symmat_bones.hpp ================================================ // Copyright (C) 2011-2014 Conrad Sanderson // Copyright (C) 2011-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_symmat //! @{ class op_symmat { public: template inline static void apply(Mat& out, const Op& in); }; class op_symmat_cx { public: template inline static void apply(Mat& out, const Op& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_symmat_meat.hpp ================================================ // Copyright (C) 2011-2014 Conrad Sanderson // Copyright (C) 2011-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_symmat //! @{ template inline void op_symmat::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap tmp(in.m); const Mat& A = tmp.M; arma_debug_check( (A.is_square() == false), "symmatu()/symmatl(): given matrix must be square" ); const uword N = A.n_rows; const bool upper = (in.aux_uword_a == 0); if(&out != &A) { out.copy_size(A); if(upper) { // upper triangular: copy the diagonal and the elements above the diagonal for(uword i=0; i inline void op_symmat_cx::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap tmp(in.m); const Mat& A = tmp.M; arma_debug_check( (A.is_square() == false), "symmatu()/symmatl(): given matrix must be square" ); const uword N = A.n_rows; const bool upper = (in.aux_uword_a == 0); const bool do_conj = (in.aux_uword_b == 1); if(&out != &A) { out.copy_size(A); if(upper) { // upper triangular: copy the diagonal and the elements above the diagonal for(uword i=0; i inline static void apply(Mat& out, const Op& in); }; class op_toeplitz_c { public: template inline static void apply(Mat& out, const Op& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_toeplitz_meat.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // Copyright (C) 2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_toeplitz //! @{ template inline void op_toeplitz::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_check tmp(in.m, out); const Mat& X = tmp.M; arma_debug_check( ((X.is_vec() == false) && (X.is_empty() == false)), "toeplitz(): given object is not a vector" ); const uword N = X.n_elem; const eT* X_mem = X.memptr(); out.set_size(N,N); for(uword col=0; col < N; ++col) { eT* col_mem = out.colptr(col); uword i; i = col; for(uword row=0; row < col; ++row, --i) { col_mem[row] = X_mem[i]; } i = 0; for(uword row=col; row < N; ++row, ++i) { col_mem[row] = X_mem[i]; } } } template inline void op_toeplitz_c::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_check tmp(in.m, out); const Mat& X = tmp.M; arma_debug_check( ((X.is_vec() == false) && (X.is_empty() == false)), "circ_toeplitz(): given object is not a vector" ); const uword N = X.n_elem; const eT* X_mem = X.memptr(); out.set_size(N,N); if(X.is_rowvec() == true) { for(uword row=0; row < N; ++row) { uword i; i = row; for(uword col=0; col < row; ++col, --i) { out.at(row,col) = X_mem[N-i]; } i = 0; for(uword col=row; col < N; ++col, ++i) { out.at(row,col) = X_mem[i]; } } } else { for(uword col=0; col < N; ++col) { eT* col_mem = out.colptr(col); uword i; i = col; for(uword row=0; row < col; ++row, --i) { col_mem[row] = X_mem[N-i]; } i = 0; for(uword row=col; row < N; ++row, ++i) { col_mem[row] = X_mem[i]; } } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_trimat_bones.hpp ================================================ // Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2011 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_trimat //! @{ class op_trimat { public: template inline static void fill_zeros(Mat& A, const bool upper); // template inline static void apply(Mat& out, const Op& in); template inline static void apply(Mat& out, const Op, op_trimat>& in); // template inline static void apply_htrans(Mat& out, const Mat& A, const bool upper, const typename arma_not_cx::result* junk = 0); template inline static void apply_htrans(Mat& out, const Mat& A, const bool upper, const typename arma_cx_only::result* junk = 0); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_trimat_meat.hpp ================================================ // Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2011 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_trimat //! @{ template inline void op_trimat::fill_zeros(Mat& out, const bool upper) { arma_extra_debug_sigprint(); const uword N = out.n_rows; if(upper) { // upper triangular: set all elements below the diagonal to zero for(uword i=0; i inline void op_trimat::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap tmp(in.m); const Mat& A = tmp.M; arma_debug_check( (A.is_square() == false), "trimatu()/trimatl(): given matrix must be square" ); const uword N = A.n_rows; const bool upper = (in.aux_uword_a == 0); if(&out != &A) { out.copy_size(A); if(upper) { // upper triangular: copy the diagonal and the elements above the diagonal for(uword i=0; i inline void op_trimat::apply(Mat& out, const Op, op_trimat>& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap tmp(in.m.m); const Mat& A = tmp.M; const bool upper = (in.aux_uword_a == 0); op_trimat::apply_htrans(out, A, upper); } template inline void op_trimat::apply_htrans ( Mat& out, const Mat& A, const bool upper, const typename arma_not_cx::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); // This specialisation is for trimatl(trans(X)) = trans(trimatu(X)) and also // trimatu(trans(X)) = trans(trimatl(X)). We want to avoid the creation of an // extra temporary. // It doesn't matter if the input and output matrices are the same; we will // pull data from the upper or lower triangular to the lower or upper // triangular (respectively) and then set the rest to 0, so overwriting issues // aren't present. arma_debug_check( (A.is_square() == false), "trimatu()/trimatl(): given matrix must be square" ); const uword N = A.n_rows; if(&out != &A) { out.copy_size(A); } // We can't really get away with any array copy operations here, // unfortunately... if(upper) { // Upper triangular: but since we're transposing, we're taking the lower // triangular and putting it in the upper half. for(uword row = 0; row < N; ++row) { eT* out_colptr = out.colptr(row); for(uword col = 0; col <= row; ++col) { //out.at(col, row) = A.at(row, col); out_colptr[col] = A.at(row, col); } } } else { // Lower triangular: but since we're transposing, we're taking the upper // triangular and putting it in the lower half. for(uword row = 0; row < N; ++row) { for(uword col = row; col < N; ++col) { out.at(col, row) = A.at(row, col); } } } op_trimat::fill_zeros(out, upper); } template inline void op_trimat::apply_htrans ( Mat& out, const Mat& A, const bool upper, const typename arma_cx_only::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); arma_debug_check( (A.is_square() == false), "trimatu()/trimatl(): given matrix must be square" ); const uword N = A.n_rows; if(&out != &A) { out.copy_size(A); } if(upper) { // Upper triangular: but since we're transposing, we're taking the lower // triangular and putting it in the upper half. for(uword row = 0; row < N; ++row) { eT* out_colptr = out.colptr(row); for(uword col = 0; col <= row; ++col) { //out.at(col, row) = std::conj( A.at(row, col) ); out_colptr[col] = std::conj( A.at(row, col) ); } } } else { // Lower triangular: but since we're transposing, we're taking the upper // triangular and putting it in the lower half. for(uword row = 0; row < N; ++row) { for(uword col = row; col < N; ++col) { out.at(col, row) = std::conj( A.at(row, col) ); } } } op_trimat::fill_zeros(out, upper); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_unique_bones.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 Arnold Wiliem // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_unique //! @{ class op_unique { public: template inline static void apply(Mat& out, const Op& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_unique_meat.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 Arnold Wiliem // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_unique //! @{ // TODO: add an efficient implementation for complex numbers template inline void op_unique::apply(Mat& out, const Op& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy P(X.m); const uword in_n_rows = P.get_n_rows(); const uword in_n_cols = P.get_n_cols(); const uword in_n_elem = P.get_n_elem(); if(in_n_elem <= 1) { if(in_n_elem == 1) { const eT tmp = P[0]; out.set_size(in_n_rows, in_n_cols); out[0] = tmp; } else { out.set_size(in_n_rows, in_n_cols); } return; } std::vector lvec(in_n_elem); if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type Pea = P.get_ea(); uword i,j; for(i=0, j=1; j < in_n_elem; i+=2, j+=2) { const eT tmp_i = Pea[i]; const eT tmp_j = Pea[j]; lvec[i] = tmp_i; lvec[j] = tmp_j; } if(i < in_n_elem) { lvec[i] = Pea[i]; } } else { uword i = 0; for(uword col=0; col < in_n_cols; ++col) for(uword row=0; row < in_n_rows; ++row, ++i) { lvec[i] = P.at(row,col); } } std::sort( lvec.begin(), lvec.end() ); uword N_unique = 1; for(uword i=1; i < in_n_elem; ++i) { const eT a = lvec[i-1]; const eT b = lvec[i ]; const eT diff = a - b; if(diff != eT(0)) { ++N_unique; } } uword out_n_rows; uword out_n_cols; if( (in_n_rows == 1) || (in_n_cols == 1) ) { if(in_n_rows == 1) { out_n_rows = 1; out_n_cols = N_unique; } else { out_n_rows = N_unique; out_n_cols = 1; } } else { out_n_rows = N_unique; out_n_cols = 1; } // we don't need to worry about aliasing at this stage, as all the data is stored in lvec out.set_size(out_n_rows, out_n_cols); eT* out_mem = out.memptr(); if(in_n_elem > 0) { out_mem[0] = lvec[0]; } N_unique = 1; for(uword i=1; i < in_n_elem; ++i) { const eT a = lvec[i-1]; const eT b = lvec[i ]; const eT diff = a - b; if(diff != eT(0)) { out_mem[N_unique] = b; ++N_unique; } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_var_bones.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_var //! @{ //! Class for finding variance values of a matrix class op_var { public: template inline static void apply(Mat& out, const mtOp& in); // template inline static typename get_pod_type::result var_vec(const subview_col& X, const uword norm_type = 0); template inline static typename get_pod_type::result var_vec(const subview_row& X, const uword norm_type = 0); template inline static typename T1::pod_type var_vec(const Base& X, const uword norm_type = 0); // template inline static eT direct_var(const eT* const X, const uword N, const uword norm_type = 0); template inline static eT direct_var_robust(const eT* const X, const uword N, const uword norm_type = 0); // template inline static T direct_var(const std::complex* const X, const uword N, const uword norm_type = 0); template inline static T direct_var_robust(const std::complex* const X, const uword N, const uword norm_type = 0); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_var_meat.hpp ================================================ // Copyright (C) 2009-2015 Conrad Sanderson // Copyright (C) 2009-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_var //! @{ //! \brief //! For each row or for each column, find the variance. //! The result is stored in a dense matrix that has either one column or one row. //! The dimension, for which the variances are found, is set via the var() function. template inline void op_var::apply(Mat& out, const mtOp& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type in_eT; typedef typename T1::pod_type out_eT; const unwrap_check_mixed tmp(in.m, out); const Mat& X = tmp.M; const uword norm_type = in.aux_uword_a; const uword dim = in.aux_uword_b; arma_debug_check( (norm_type > 1), "var(): parameter 'norm_type' must be 0 or 1" ); arma_debug_check( (dim > 1), "var(): parameter 'dim' must be 0 or 1" ); const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; if(dim == 0) { arma_extra_debug_print("op_var::apply(): dim = 0"); out.set_size((X_n_rows > 0) ? 1 : 0, X_n_cols); if(X_n_rows > 0) { out_eT* out_mem = out.memptr(); for(uword col=0; col 0) ? 1 : 0); if(X_n_cols > 0) { podarray dat(X_n_cols); in_eT* dat_mem = dat.memptr(); out_eT* out_mem = out.memptr(); for(uword row=0; row inline typename T1::pod_type op_var::var_vec(const Base& X, const uword norm_type) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; arma_debug_check( (norm_type > 1), "var(): parameter 'norm_type' must be 0 or 1" ); const Proxy P(X.get_ref()); const podarray tmp(P); return op_var::direct_var(tmp.memptr(), tmp.n_elem, norm_type); } template inline typename get_pod_type::result op_var::var_vec(const subview_col& X, const uword norm_type) { arma_extra_debug_sigprint(); arma_debug_check( (norm_type > 1), "var(): parameter 'norm_type' must be 0 or 1" ); return op_var::direct_var(X.colptr(0), X.n_rows, norm_type); } template inline typename get_pod_type::result op_var::var_vec(const subview_row& X, const uword norm_type) { arma_extra_debug_sigprint(); arma_debug_check( (norm_type > 1), "var(): parameter 'norm_type' must be 0 or 1" ); const Mat& A = X.m; const uword start_row = X.aux_row1; const uword start_col = X.aux_col1; const uword end_col_p1 = start_col + X.n_cols; podarray tmp(X.n_elem); eT* tmp_mem = tmp.memptr(); for(uword i=0, col=start_col; col < end_col_p1; ++col, ++i) { tmp_mem[i] = A.at(start_row, col); } return op_var::direct_var(tmp.memptr(), tmp.n_elem, norm_type); } //! find the variance of an array template inline eT op_var::direct_var(const eT* const X, const uword n_elem, const uword norm_type) { arma_extra_debug_sigprint(); if(n_elem >= 2) { const eT acc1 = op_mean::direct_mean(X, n_elem); eT acc2 = eT(0); eT acc3 = eT(0); uword i,j; for(i=0, j=1; j inline eT op_var::direct_var_robust(const eT* const X, const uword n_elem, const uword norm_type) { arma_extra_debug_sigprint(); if(n_elem > 1) { eT r_mean = X[0]; eT r_var = eT(0); for(uword i=1; i inline T op_var::direct_var(const std::complex* const X, const uword n_elem, const uword norm_type) { arma_extra_debug_sigprint(); typedef typename std::complex eT; if(n_elem >= 2) { const eT acc1 = op_mean::direct_mean(X, n_elem); T acc2 = T(0); eT acc3 = eT(0); for(uword i=0; i inline T op_var::direct_var_robust(const std::complex* const X, const uword n_elem, const uword norm_type) { arma_extra_debug_sigprint(); typedef typename std::complex eT; if(n_elem > 1) { eT r_mean = X[0]; T r_var = T(0); for(uword i=1; i inline static void apply( Mat& out, const Op& in); template inline static void apply_proxy( Mat& out, const Proxy& P); }; class op_vectorise_row { public: template inline static void apply( Mat& out, const Op& in); template inline static void apply_proxy( Mat& out, const Proxy& P); }; class op_vectorise_all { public: template inline static void apply( Mat& out, const Op& in); }; class op_vectorise_cube_col { public: template inline static void apply( Mat& out, const BaseCube& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/op_vectorise_meat.hpp ================================================ // Copyright (C) 2013-2015 Conrad Sanderson // Copyright (C) 2013-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup op_vectorise //! @{ template inline void op_vectorise_col::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); const Proxy P(in.m); op_vectorise_col::apply_proxy(out, P); } template inline void op_vectorise_col::apply_proxy(Mat& out, const Proxy& P) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; if(P.is_alias(out) == false) { const uword N = P.get_n_elem(); out.set_size(N, 1); if(is_Mat::stored_type>::value == true) { const unwrap::stored_type> tmp(P.Q); arrayops::copy(out.memptr(), tmp.M.memptr(), N); } else { eT* outmem = out.memptr(); if(Proxy::prefer_at_accessor == false) { // TODO: add handling of aligned access ? typename Proxy::ea_type A = P.get_ea(); uword i,j; for(i=0, j=1; j < N; i+=2, j+=2) { const eT tmp_i = A[i]; const eT tmp_j = A[j]; outmem[i] = tmp_i; outmem[j] = tmp_j; } if(i < N) { outmem[i] = A[i]; } } else { const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); if(n_rows == 1) { for(uword i=0; i < n_cols; ++i) { outmem[i] = P.at(0,i); } } else { for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { *outmem = P.at(row,col); outmem++; } } } } } else // we have aliasing { arma_extra_debug_print("op_vectorise_col::apply(): aliasing detected"); if( (is_Mat::stored_type>::value == true) && (Proxy::fake_mat == false) ) { out.set_size(out.n_elem, 1); // set_size() doesn't destroy data as long as the number of elements in the matrix remains the same } else { Mat tmp; op_vectorise_col::apply_proxy(tmp, P); out.steal_mem(tmp); } } } template inline void op_vectorise_row::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); const Proxy P(in.m); op_vectorise_row::apply_proxy(out, P); } template inline void op_vectorise_row::apply_proxy(Mat& out, const Proxy& P) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; if(P.is_alias(out) == false) { out.set_size( 1, P.get_n_elem() ); eT* outmem = out.memptr(); const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); for(uword row=0; row < n_rows; ++row) { uword i,j; for(i=0, j=1; j < n_cols; i+=2, j+=2) { const eT tmp_i = P.at(row,i); const eT tmp_j = P.at(row,j); *outmem = tmp_i; outmem++; *outmem = tmp_j; outmem++; } if(i < n_cols) { *outmem = P.at(row,i); outmem++; } } } else // we have aliasing { arma_extra_debug_print("op_vectorise_row::apply(): aliasing detected"); Mat tmp; op_vectorise_row::apply_proxy(tmp, P); out.steal_mem(tmp); } } template inline void op_vectorise_all::apply(Mat& out, const Op& in) { arma_extra_debug_sigprint(); const Proxy P(in.m); const uword dim = in.aux_uword_a; if(dim == 0) { op_vectorise_col::apply_proxy(out, P); } else { op_vectorise_row::apply_proxy(out, P); } } // template inline void op_vectorise_cube_col::apply(Mat& out, const BaseCube& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; ProxyCube P(in.get_ref()); const uword N = P.get_n_elem(); out.set_size(N, 1); if(is_Cube::stored_type>::value == true) { const unwrap_cube::stored_type> tmp(P.Q); arrayops::copy(out.memptr(), tmp.M.memptr(), N); } else { eT* outmem = out.memptr(); if(ProxyCube::prefer_at_accessor == false) { typename ProxyCube::ea_type A = P.get_ea(); uword i,j; for(i=0, j=1; j < N; i+=2, j+=2) { const eT tmp_i = A[i]; const eT tmp_j = A[j]; outmem[i] = tmp_i; outmem[j] = tmp_j; } if(i < N) { outmem[i] = A[i]; } } else { const uword n_rows = P.get_n_rows(); const uword n_cols = P.get_n_cols(); const uword n_slices = P.get_n_slices(); for(uword slice=0; slice < n_slices; ++slice) for(uword col=0; col < n_cols; ++col ) for(uword row=0; row < n_rows; ++row ) { *outmem = P.at(row,col,slice); outmem++; } } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/operator_cube_div.hpp ================================================ // Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup operator_cube_div //! @{ //! BaseCube / scalar template arma_inline const eOpCube operator/ ( const BaseCube& X, const typename T1::elem_type k ) { arma_extra_debug_sigprint(); return eOpCube(X.get_ref(), k); } //! scalar / BaseCube template arma_inline const eOpCube operator/ ( const typename T1::elem_type k, const BaseCube& X ) { arma_extra_debug_sigprint(); return eOpCube(X.get_ref(), k); } //! complex scalar / non-complex BaseCube (experimental) template arma_inline const mtOpCube, T1, op_cx_scalar_div_pre> operator/ ( const std::complex& k, const BaseCube& X ) { arma_extra_debug_sigprint(); return mtOpCube, T1, op_cx_scalar_div_pre>('j', X.get_ref(), k); } //! non-complex BaseCube / complex scalar (experimental) template arma_inline const mtOpCube, T1, op_cx_scalar_div_post> operator/ ( const BaseCube& X, const std::complex& k ) { arma_extra_debug_sigprint(); return mtOpCube, T1, op_cx_scalar_div_post>('j', X.get_ref(), k); } //! element-wise division of BaseCube objects with same element type template arma_inline const eGlueCube operator/ ( const BaseCube& X, const BaseCube& Y ) { arma_extra_debug_sigprint(); return eGlueCube(X.get_ref(), Y.get_ref()); } //! element-wise division of BaseCube objects with different element types template inline const mtGlueCube::result, T1, T2, glue_mixed_div> operator/ ( const BaseCube< typename force_different_type::T1_result, T1>& X, const BaseCube< typename force_different_type::T2_result, T2>& Y ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); return mtGlueCube( X.get_ref(), Y.get_ref() ); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/operator_cube_minus.hpp ================================================ // Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup operator_cube_minus //! @{ //! unary - template arma_inline const eOpCube operator- ( const BaseCube& X ) { arma_extra_debug_sigprint(); return eOpCube(X.get_ref()); } //! cancellation of two consecutive negations: -(-T1) template arma_inline const typename ProxyCube::stored_type& operator- ( const eOpCube& X ) { arma_extra_debug_sigprint(); return X.P.Q; } //! BaseCube - scalar template arma_inline const eOpCube operator- ( const BaseCube& X, const typename T1::elem_type k ) { arma_extra_debug_sigprint(); return eOpCube(X.get_ref(), k); } //! scalar - BaseCube template arma_inline const eOpCube operator- ( const typename T1::elem_type k, const BaseCube& X ) { arma_extra_debug_sigprint(); return eOpCube(X.get_ref(), k); } //! complex scalar - non-complex BaseCube (experimental) template arma_inline const mtOpCube, T1, op_cx_scalar_minus_pre> operator- ( const std::complex& k, const BaseCube& X ) { arma_extra_debug_sigprint(); return mtOpCube, T1, op_cx_scalar_minus_pre>('j', X.get_ref(), k); } //! non-complex BaseCube - complex scalar (experimental) template arma_inline const mtOpCube, T1, op_cx_scalar_minus_post> operator- ( const BaseCube& X, const std::complex& k ) { arma_extra_debug_sigprint(); return mtOpCube, T1, op_cx_scalar_minus_post>('j', X.get_ref(), k); } //! subtraction of BaseCube objects with same element type template arma_inline const eGlueCube operator- ( const BaseCube& X, const BaseCube& Y ) { arma_extra_debug_sigprint(); return eGlueCube(X.get_ref(), Y.get_ref()); } //! subtraction of BaseCube objects with different element types template inline const mtGlueCube::result, T1, T2, glue_mixed_minus> operator- ( const BaseCube< typename force_different_type::T1_result, T1>& X, const BaseCube< typename force_different_type::T2_result, T2>& Y ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); return mtGlueCube( X.get_ref(), Y.get_ref() ); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/operator_cube_plus.hpp ================================================ // Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup operator_cube_plus //! @{ //! unary plus operation (does nothing, but is required for completeness) template arma_inline const BaseCube& operator+ ( const BaseCube& X ) { arma_extra_debug_sigprint(); return X; } //! BaseCube + scalar template arma_inline const eOpCube operator+ ( const BaseCube& X, const typename T1::elem_type k ) { arma_extra_debug_sigprint(); return eOpCube(X.get_ref(), k); } //! scalar + BaseCube template arma_inline const eOpCube operator+ ( const typename T1::elem_type k, const BaseCube& X ) { arma_extra_debug_sigprint(); return eOpCube(X.get_ref(), k); } //! non-complex BaseCube + complex scalar (experimental) template arma_inline const mtOpCube, T1, op_cx_scalar_plus> operator+ ( const BaseCube& X, const std::complex& k ) { arma_extra_debug_sigprint(); return mtOpCube, T1, op_cx_scalar_plus>('j', X.get_ref(), k); } //! complex scalar + non-complex BaseCube (experimental) template arma_inline const mtOpCube, T1, op_cx_scalar_plus> operator+ ( const std::complex& k, const BaseCube& X ) { arma_extra_debug_sigprint(); return mtOpCube, T1, op_cx_scalar_plus>('j', X.get_ref(), k); // NOTE: order is swapped } //! addition of BaseCube objects with same element type template arma_inline const eGlueCube operator+ ( const BaseCube& X, const BaseCube& Y ) { arma_extra_debug_sigprint(); return eGlueCube(X.get_ref(), Y.get_ref()); } //! addition of BaseCube objects with different element types template inline const mtGlueCube::result, T1, T2, glue_mixed_plus> operator+ ( const BaseCube< typename force_different_type::T1_result, T1>& X, const BaseCube< typename force_different_type::T2_result, T2>& Y ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); return mtGlueCube( X.get_ref(), Y.get_ref() ); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/operator_cube_relational.hpp ================================================ // Copyright (C) 2009-2014 Conrad Sanderson // Copyright (C) 2009-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup operator_cube_relational //! @{ // < : lt // > : gt // <= : lteq // >= : gteq // == : eq // != : noteq // && : and // || : or template inline const mtGlueCube operator< (const BaseCube::result,T1>& X, const BaseCube::result,T2>& Y) { arma_extra_debug_sigprint(); return mtGlueCube( X.get_ref(), Y.get_ref() ); } template inline const mtGlueCube operator> (const BaseCube::result,T1>& X, const BaseCube::result,T2>& Y) { arma_extra_debug_sigprint(); return mtGlueCube( X.get_ref(), Y.get_ref() ); } template inline const mtGlueCube operator<= (const BaseCube::result,T1>& X, const BaseCube::result,T2>& Y) { arma_extra_debug_sigprint(); return mtGlueCube( X.get_ref(), Y.get_ref() ); } template inline const mtGlueCube operator>= (const BaseCube::result,T1>& X, const BaseCube::result,T2>& Y) { arma_extra_debug_sigprint(); return mtGlueCube( X.get_ref(), Y.get_ref() ); } template inline const mtGlueCube operator== (const BaseCube& X, const BaseCube& Y) { arma_extra_debug_sigprint(); return mtGlueCube( X.get_ref(), Y.get_ref() ); } template inline const mtGlueCube operator!= (const BaseCube& X, const BaseCube& Y) { arma_extra_debug_sigprint(); return mtGlueCube( X.get_ref(), Y.get_ref() ); } template inline const mtGlueCube operator&& (const BaseCube::result,T1>& X, const BaseCube::result,T2>& Y) { arma_extra_debug_sigprint(); return mtGlueCube( X.get_ref(), Y.get_ref() ); } template inline const mtGlueCube operator|| (const BaseCube::result,T1>& X, const BaseCube::result,T2>& Y) { arma_extra_debug_sigprint(); return mtGlueCube( X.get_ref(), Y.get_ref() ); } // // // template inline const mtOpCube operator< (const typename arma_not_cx::result val, const BaseCube::result,T1>& X) { arma_extra_debug_sigprint(); return mtOpCube(X.get_ref(), val); } template inline const mtOpCube operator< (const BaseCube::result,T1>& X, const typename arma_not_cx::result val) { arma_extra_debug_sigprint(); return mtOpCube(X.get_ref(), val); } template inline const mtOpCube operator> (const typename arma_not_cx::result val, const BaseCube::result,T1>& X) { arma_extra_debug_sigprint(); return mtOpCube(X.get_ref(), val); } template inline const mtOpCube operator> (const BaseCube::result,T1>& X, const typename arma_not_cx::result val) { arma_extra_debug_sigprint(); return mtOpCube(X.get_ref(), val); } template inline const mtOpCube operator<= (const typename arma_not_cx::result val, const BaseCube::result,T1>& X) { arma_extra_debug_sigprint(); return mtOpCube(X.get_ref(), val); } template inline const mtOpCube operator<= (const BaseCube::result,T1>& X, const typename arma_not_cx::result val) { arma_extra_debug_sigprint(); return mtOpCube(X.get_ref(), val); } template inline const mtOpCube operator>= (const typename arma_not_cx::result val, const BaseCube::result,T1>& X) { arma_extra_debug_sigprint(); return mtOpCube(X.get_ref(), val); } template inline const mtOpCube operator>= (const BaseCube::result,T1>& X, const typename arma_not_cx::result val) { arma_extra_debug_sigprint(); return mtOpCube(X.get_ref(), val); } template inline const mtOpCube operator== (const typename T1::elem_type val, const BaseCube& X) { arma_extra_debug_sigprint(); return mtOpCube(X.get_ref(), val); } template inline const mtOpCube operator== (const BaseCube& X, const typename T1::elem_type val) { arma_extra_debug_sigprint(); return mtOpCube(X.get_ref(), val); } template inline const mtOpCube operator!= (const typename T1::elem_type val, const BaseCube& X) { arma_extra_debug_sigprint(); return mtOpCube(X.get_ref(), val); } template inline const mtOpCube operator!= (const BaseCube& X, const typename T1::elem_type val) { arma_extra_debug_sigprint(); return mtOpCube(X.get_ref(), val); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/operator_cube_schur.hpp ================================================ // Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup operator_cube_schur //! @{ // operator %, which we define it to do a schur product (element-wise multiplication) //! element-wise multiplication of BaseCube objects with same element type template arma_inline const eGlueCube operator% ( const BaseCube& X, const BaseCube& Y ) { arma_extra_debug_sigprint(); return eGlueCube(X.get_ref(), Y.get_ref()); } //! element-wise multiplication of BaseCube objects with different element types template inline const mtGlueCube::result, T1, T2, glue_mixed_schur> operator% ( const BaseCube< typename force_different_type::T1_result, T1>& X, const BaseCube< typename force_different_type::T2_result, T2>& Y ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); return mtGlueCube( X.get_ref(), Y.get_ref() ); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/operator_cube_times.hpp ================================================ // Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup operator_cube_times //! @{ //! BaseCube * scalar template arma_inline const eOpCube operator* ( const BaseCube& X, const typename T1::elem_type k ) { arma_extra_debug_sigprint(); return eOpCube(X.get_ref(), k); } //! scalar * BaseCube template arma_inline const eOpCube operator* ( const typename T1::elem_type k, const BaseCube& X ) { arma_extra_debug_sigprint(); return eOpCube(X.get_ref(), k); } //! non-complex BaseCube * complex scalar (experimental) template arma_inline const mtOpCube, T1, op_cx_scalar_times> operator* ( const BaseCube& X, const std::complex& k ) { arma_extra_debug_sigprint(); return mtOpCube, T1, op_cx_scalar_times>('j', X.get_ref(), k); } //! complex scalar * non-complex BaseCube (experimental) template arma_inline const mtOpCube, T1, op_cx_scalar_times> operator* ( const std::complex& k, const BaseCube& X ) { arma_extra_debug_sigprint(); return mtOpCube, T1, op_cx_scalar_times>('j', X.get_ref(), k); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/operator_div.hpp ================================================ // Copyright (C) 2009-2012 Conrad Sanderson // Copyright (C) 2009-2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup operator_div //! @{ //! Base / scalar template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result operator/ ( const T1& X, const typename T1::elem_type k ) { arma_extra_debug_sigprint(); return eOp(X, k); } //! scalar / Base template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result operator/ ( const typename T1::elem_type k, const T1& X ) { arma_extra_debug_sigprint(); return eOp(X, k); } //! complex scalar / non-complex Base template arma_inline typename enable_if2 < (is_arma_type::value && is_cx::no), const mtOp, T1, op_cx_scalar_div_pre> >::result operator/ ( const std::complex& k, const T1& X ) { arma_extra_debug_sigprint(); return mtOp, T1, op_cx_scalar_div_pre>('j', X, k); } //! non-complex Base / complex scalar template arma_inline typename enable_if2 < (is_arma_type::value && is_cx::no), const mtOp, T1, op_cx_scalar_div_post> >::result operator/ ( const T1& X, const std::complex& k ) { arma_extra_debug_sigprint(); return mtOp, T1, op_cx_scalar_div_post>('j', X, k); } //! element-wise division of Base objects with same element type template arma_inline typename enable_if2 < (is_arma_type::value && is_arma_type::value && is_same_type::value), const eGlue >::result operator/ ( const T1& X, const T2& Y ) { arma_extra_debug_sigprint(); return eGlue(X, Y); } //! element-wise division of Base objects with different element types template inline typename enable_if2 < (is_arma_type::value && is_arma_type::value && (is_same_type::no)), const mtGlue::result, T1, T2, glue_mixed_div> >::result operator/ ( const T1& X, const T2& Y ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); return mtGlue( X, Y ); } //! element-wise division of sparse matrix by scalar template inline typename enable_if2::value, SpMat >::result operator/ ( const T1& X, const typename T1::elem_type y ) { arma_extra_debug_sigprint(); SpMat result(X); result /= y; return result; } //! element-wise division of one sparse and one dense object template inline typename enable_if2 < (is_arma_sparse_type::value && is_arma_type::value && is_same_type::value), SpMat >::result operator/ ( const T1& x, const T2& y ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const SpProxy pa(x); const Proxy pb(y); const uword n_rows = pa.get_n_rows(); const uword n_cols = pa.get_n_cols(); arma_debug_assert_same_size(n_rows, n_cols, pb.get_n_rows(), pb.get_n_cols(), "element-wise division"); SpMat result(n_rows, n_cols); uword new_n_nonzero = 0; for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { const eT val = pa.at(row,col) / pb.at(row, col); if(val != eT(0)) { ++new_n_nonzero; } } result.mem_resize(new_n_nonzero); uword cur_pos = 0; for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { const eT val = pa.at(row,col) / pb.at(row, col); if(val != eT(0)) { access::rw(result.values[cur_pos]) = val; access::rw(result.row_indices[cur_pos]) = row; ++access::rw(result.col_ptrs[col + 1]); ++cur_pos; } } // Fix column pointers for(uword col = 1; col <= result.n_cols; ++col) { access::rw(result.col_ptrs[col]) += result.col_ptrs[col - 1]; } return result; } //! element-wise division of one dense and one sparse object template inline typename enable_if2 < (is_arma_type::value && is_arma_sparse_type::value && is_same_type::value), Mat >::result operator/ ( const T1& x, const T2& y ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy pa(x); const SpProxy pb(y); const uword n_rows = pa.get_n_rows(); const uword n_cols = pa.get_n_cols(); arma_debug_assert_same_size(n_rows, n_cols, pb.get_n_rows(), pb.get_n_cols(), "element-wise division"); Mat result(n_rows, n_cols); for(uword col=0; col < n_cols; ++col) for(uword row=0; row < n_rows; ++row) { result.at(row, col) = pa.at(row, col) / pb.at(row, col); } return result; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/operator_minus.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup operator_minus //! @{ //! unary - template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result operator- (const T1& X) { arma_extra_debug_sigprint(); return eOp(X); } //! cancellation of two consecutive negations: -(-T1) template arma_inline const typename Proxy::stored_type& operator- (const eOp& X) { arma_extra_debug_sigprint(); return X.P.Q; } //! Base - scalar template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result operator- ( const T1& X, const typename T1::elem_type k ) { arma_extra_debug_sigprint(); return eOp(X, k); } //! scalar - Base template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result operator- ( const typename T1::elem_type k, const T1& X ) { arma_extra_debug_sigprint(); return eOp(X, k); } //! complex scalar - non-complex Base template arma_inline typename enable_if2 < (is_arma_type::value && is_cx::no), const mtOp, T1, op_cx_scalar_minus_pre> >::result operator- ( const std::complex& k, const T1& X ) { arma_extra_debug_sigprint(); return mtOp, T1, op_cx_scalar_minus_pre>('j', X, k); } //! non-complex Base - complex scalar template arma_inline typename enable_if2 < (is_arma_type::value && is_cx::no), const mtOp, T1, op_cx_scalar_minus_post> >::result operator- ( const T1& X, const std::complex& k ) { arma_extra_debug_sigprint(); return mtOp, T1, op_cx_scalar_minus_post>('j', X, k); } //! subtraction of Base objects with same element type template arma_inline typename enable_if2 < is_arma_type::value && is_arma_type::value && is_same_type::value, const eGlue >::result operator- ( const T1& X, const T2& Y ) { arma_extra_debug_sigprint(); return eGlue(X, Y); } //! subtraction of Base objects with different element types template inline typename enable_if2 < (is_arma_type::value && is_arma_type::value && (is_same_type::no)), const mtGlue::result, T1, T2, glue_mixed_minus> >::result operator- ( const T1& X, const T2& Y ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); return mtGlue( X, Y ); } //! unary "-" for sparse objects template inline typename enable_if2 < is_arma_sparse_type::value && is_signed::value, SpOp >::result operator- (const T1& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; return SpOp(X, eT(-1)); } //! subtraction of two sparse objects template inline typename enable_if2 < (is_arma_sparse_type::value && is_arma_sparse_type::value && is_same_type::value), const SpGlue >::result operator- ( const T1& X, const T2& Y ) { arma_extra_debug_sigprint(); return SpGlue(X,Y); } //! subtraction of one sparse and one dense object template inline typename enable_if2 < (is_arma_sparse_type::value && is_arma_type::value && is_same_type::value), Mat >::result operator- ( const T1& x, const T2& y ) { arma_extra_debug_sigprint(); const SpProxy pa(x); Mat result(-y); arma_debug_assert_same_size( pa.get_n_rows(), pa.get_n_cols(), result.n_rows, result.n_cols, "subtraction" ); typename SpProxy::const_iterator_type it = pa.begin(); typename SpProxy::const_iterator_type it_end = pa.end(); while(it != it_end) { result.at(it.row(), it.col()) += (*it); ++it; } return result; } //! subtraction of one dense and one sparse object template inline typename enable_if2 < (is_arma_type::value && is_arma_sparse_type::value && is_same_type::value), Mat >::result operator- ( const T1& x, const T2& y ) { arma_extra_debug_sigprint(); Mat result(x); const SpProxy pb(y.get_ref()); arma_debug_assert_same_size( result.n_rows, result.n_cols, pb.get_n_rows(), pb.get_n_cols(), "subtraction" ); typename SpProxy::const_iterator_type it = pb.begin(); typename SpProxy::const_iterator_type it_end = pb.end(); while(it != it_end) { result.at(it.row(), it.col()) -= (*it); ++it; } return result; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/operator_ostream.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup operator_ostream //! @{ template inline std::ostream& operator<< (std::ostream& o, const Base& X) { arma_extra_debug_sigprint(); const unwrap tmp(X.get_ref()); arma_ostream::print(o, tmp.M, true); return o; } template inline std::ostream& operator<< (std::ostream& o, const SpBase& X) { arma_extra_debug_sigprint(); const unwrap_spmat tmp(X.get_ref()); arma_ostream::print(o, tmp.M, true); return o; } template inline std::ostream& operator<< (std::ostream& o, const SpValProxy& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; o << eT(X); return o; } template inline std::ostream& operator<< (std::ostream& o, const BaseCube& X) { arma_extra_debug_sigprint(); const unwrap_cube tmp(X.get_ref()); arma_ostream::print(o, tmp.M, true); return o; } //! Print the contents of a field to the specified stream. template inline std::ostream& operator<< (std::ostream& o, const field& X) { arma_extra_debug_sigprint(); arma_ostream::print(o, X); return o; } //! Print the contents of a subfield to the specified stream template inline std::ostream& operator<< (std::ostream& o, const subview_field& X) { arma_extra_debug_sigprint(); arma_ostream::print(o, X); return o; } inline std::ostream& operator<< (std::ostream& o, const SizeMat& S) { arma_extra_debug_sigprint(); arma_ostream::print(o, S); return o; } inline std::ostream& operator<< (std::ostream& o, const SizeCube& S) { arma_extra_debug_sigprint(); arma_ostream::print(o, S); return o; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/operator_plus.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup operator_plus //! @{ //! unary plus operation (does nothing, but is required for completeness) template arma_inline typename enable_if2< is_arma_type::value, const T1& >::result operator+ (const T1& X) { arma_extra_debug_sigprint(); return X; } //! Base + scalar template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result operator+ (const T1& X, const typename T1::elem_type k) { arma_extra_debug_sigprint(); return eOp(X, k); } //! scalar + Base template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result operator+ (const typename T1::elem_type k, const T1& X) { arma_extra_debug_sigprint(); return eOp(X, k); // NOTE: order is swapped } //! non-complex Base + complex scalar template arma_inline typename enable_if2 < (is_arma_type::value && is_cx::no), const mtOp, T1, op_cx_scalar_plus> >::result operator+ ( const T1& X, const std::complex& k ) { arma_extra_debug_sigprint(); return mtOp, T1, op_cx_scalar_plus>('j', X, k); } //! complex scalar + non-complex Base template arma_inline typename enable_if2 < (is_arma_type::value && is_cx::no), const mtOp, T1, op_cx_scalar_plus> >::result operator+ ( const std::complex& k, const T1& X ) { arma_extra_debug_sigprint(); return mtOp, T1, op_cx_scalar_plus>('j', X, k); // NOTE: order is swapped } //! addition of user-accessible Armadillo objects with same element type template arma_inline typename enable_if2 < is_arma_type::value && is_arma_type::value && is_same_type::value, const eGlue >::result operator+ ( const T1& X, const T2& Y ) { arma_extra_debug_sigprint(); return eGlue(X, Y); } //! addition of user-accessible Armadillo objects with different element types template inline typename enable_if2 < (is_arma_type::value && is_arma_type::value && (is_same_type::no)), const mtGlue::result, T1, T2, glue_mixed_plus> >::result operator+ ( const T1& X, const T2& Y ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); return mtGlue( X, Y ); } //! addition of two sparse objects template inline arma_hot typename enable_if2 < (is_arma_sparse_type::value && is_arma_sparse_type::value && is_same_type::value), SpGlue >::result operator+ ( const T1& x, const T2& y ) { arma_extra_debug_sigprint(); return SpGlue(x, y); } //! addition of sparse and non-sparse object template inline typename enable_if2 < (is_arma_type::value && is_arma_sparse_type::value && is_same_type::value), Mat >::result operator+ ( const T1& x, const T2& y ) { arma_extra_debug_sigprint(); Mat result(x); const SpProxy pb(y); arma_debug_assert_same_size( result.n_rows, result.n_cols, pb.get_n_rows(), pb.get_n_cols(), "addition" ); typename SpProxy::const_iterator_type it = pb.begin(); typename SpProxy::const_iterator_type it_end = pb.end(); while(it != it_end) { result.at(it.row(), it.col()) += (*it); ++it; } return result; } //! addition of sparse and non-sparse object template inline typename enable_if2 < (is_arma_sparse_type::value && is_arma_type::value && is_same_type::value), Mat >::result operator+ ( const T1& x, const T2& y ) { arma_extra_debug_sigprint(); // Just call the other order (these operations are commutative) return (y + x); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/operator_relational.hpp ================================================ // Copyright (C) 2009-2014 Conrad Sanderson // Copyright (C) 2009-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup operator_relational //! @{ // < : lt // > : gt // <= : lteq // >= : gteq // == : eq // != : noteq // && : and // || : or template inline typename enable_if2 < (is_arma_type::value && is_arma_type::value && (is_cx::no) && (is_cx::no)), const mtGlue >::result operator< (const T1& X, const T2& Y) { arma_extra_debug_sigprint(); return mtGlue( X, Y ); } template inline typename enable_if2 < (is_arma_type::value && is_arma_type::value && (is_cx::no) && (is_cx::no)), const mtGlue >::result operator> (const T1& X, const T2& Y) { arma_extra_debug_sigprint(); return mtGlue( X, Y ); } template inline typename enable_if2 < (is_arma_type::value && is_arma_type::value && (is_cx::no) && (is_cx::no)), const mtGlue >::result operator<= (const T1& X, const T2& Y) { arma_extra_debug_sigprint(); return mtGlue( X, Y ); } template inline typename enable_if2 < (is_arma_type::value && is_arma_type::value && (is_cx::no) && (is_cx::no)), const mtGlue >::result operator>= (const T1& X, const T2& Y) { arma_extra_debug_sigprint(); return mtGlue( X, Y ); } template inline typename enable_if2 < (is_arma_type::value && is_arma_type::value), const mtGlue >::result operator== (const T1& X, const T2& Y) { arma_extra_debug_sigprint(); return mtGlue( X, Y ); } template inline typename enable_if2 < (is_arma_type::value && is_arma_type::value), const mtGlue >::result operator!= (const T1& X, const T2& Y) { arma_extra_debug_sigprint(); return mtGlue( X, Y ); } template inline typename enable_if2 < (is_arma_type::value && is_arma_type::value && (is_cx::no) && (is_cx::no)), const mtGlue >::result operator&& (const T1& X, const T2& Y) { arma_extra_debug_sigprint(); return mtGlue( X, Y ); } template inline typename enable_if2 < (is_arma_type::value && is_arma_type::value && (is_cx::no) && (is_cx::no)), const mtGlue >::result operator|| (const T1& X, const T2& Y) { arma_extra_debug_sigprint(); return mtGlue( X, Y ); } // // // template inline typename enable_if2 < (is_arma_type::value && (is_cx::no)), const mtOp >::result operator< (const typename T1::elem_type val, const T1& X) { arma_extra_debug_sigprint(); return mtOp(X, val); } template inline typename enable_if2 < (is_arma_type::value && (is_cx::no)), const mtOp >::result operator< (const T1& X, const typename T1::elem_type val) { arma_extra_debug_sigprint(); return mtOp(X, val); } template inline typename enable_if2 < (is_arma_type::value && (is_cx::no)), const mtOp >::result operator> (const typename T1::elem_type val, const T1& X) { arma_extra_debug_sigprint(); return mtOp(X, val); } template inline typename enable_if2 < (is_arma_type::value && (is_cx::no)), const mtOp >::result operator> (const T1& X, const typename T1::elem_type val) { arma_extra_debug_sigprint(); return mtOp(X, val); } template inline typename enable_if2 < (is_arma_type::value && (is_cx::no)), const mtOp >::result operator<= (const typename T1::elem_type val, const T1& X) { arma_extra_debug_sigprint(); return mtOp(X, val); } template inline typename enable_if2 < (is_arma_type::value && (is_cx::no)), const mtOp >::result operator<= (const T1& X, const typename T1::elem_type val) { arma_extra_debug_sigprint(); return mtOp(X, val); } template inline typename enable_if2 < (is_arma_type::value && (is_cx::no)), const mtOp >::result operator>= (const typename T1::elem_type val, const T1& X) { arma_extra_debug_sigprint(); return mtOp(X, val); } template inline typename enable_if2 < (is_arma_type::value && (is_cx::no)), const mtOp >::result operator>= (const T1& X, const typename T1::elem_type val) { arma_extra_debug_sigprint(); return mtOp(X, val); } template inline typename enable_if2 < is_arma_type::value, const mtOp >::result operator== (const typename T1::elem_type val, const T1& X) { arma_extra_debug_sigprint(); return mtOp(X, val); } template inline typename enable_if2 < is_arma_type::value, const mtOp >::result operator== (const T1& X, const typename T1::elem_type val) { arma_extra_debug_sigprint(); return mtOp(X, val); } template inline typename enable_if2 < is_arma_type::value, const mtOp >::result operator!= (const typename T1::elem_type val, const T1& X) { arma_extra_debug_sigprint(); return mtOp(X, val); } template inline typename enable_if2 < is_arma_type::value, const mtOp >::result operator!= (const T1& X, const typename T1::elem_type val) { arma_extra_debug_sigprint(); return mtOp(X, val); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/operator_schur.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup operator_schur //! @{ // operator %, which we define it to do a schur product (element-wise multiplication) //! element-wise multiplication of user-accessible Armadillo objects with same element type template arma_inline typename enable_if2 < is_arma_type::value && is_arma_type::value && is_same_type::value, const eGlue >::result operator% ( const T1& X, const T2& Y ) { arma_extra_debug_sigprint(); return eGlue(X, Y); } //! element-wise multiplication of user-accessible Armadillo objects with different element types template inline typename enable_if2 < (is_arma_type::value && is_arma_type::value && (is_same_type::no)), const mtGlue::result, T1, T2, glue_mixed_schur> >::result operator% ( const T1& X, const T2& Y ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); return mtGlue( X, Y ); } //! element-wise multiplication of two sparse matrices template inline typename enable_if2 < (is_arma_sparse_type::value && is_arma_sparse_type::value && is_same_type::value), SpMat >::result operator% ( const SpBase& x, const SpBase& y ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const SpProxy pa(x.get_ref()); const SpProxy pb(y.get_ref()); arma_debug_assert_same_size(pa.get_n_rows(), pa.get_n_cols(), pb.get_n_rows(), pb.get_n_cols(), "element-wise multiplication"); SpMat result(pa.get_n_rows(), pa.get_n_cols()); if( (pa.get_n_nonzero() != 0) && (pb.get_n_nonzero() != 0) ) { // Resize memory to correct size. result.mem_resize(n_unique(x, y, op_n_unique_mul())); // Now iterate across both matrices. typename SpProxy::const_iterator_type x_it = pa.begin(); typename SpProxy::const_iterator_type y_it = pb.begin(); typename SpProxy::const_iterator_type x_end = pa.end(); typename SpProxy::const_iterator_type y_end = pb.end(); uword cur_val = 0; while((x_it != x_end) || (y_it != y_end)) { if(x_it == y_it) { const eT val = (*x_it) * (*y_it); if (val != eT(0)) { access::rw(result.values[cur_val]) = val; access::rw(result.row_indices[cur_val]) = x_it.row(); ++access::rw(result.col_ptrs[x_it.col() + 1]); ++cur_val; } ++x_it; ++y_it; } else { const uword x_it_row = x_it.row(); const uword x_it_col = x_it.col(); const uword y_it_row = y_it.row(); const uword y_it_col = y_it.col(); if((x_it_col < y_it_col) || ((x_it_col == y_it_col) && (x_it_row < y_it_row))) // if y is closer to the end { ++x_it; } else { ++y_it; } } } // Fix column pointers to be cumulative. for(uword c = 1; c <= result.n_cols; ++c) { access::rw(result.col_ptrs[c]) += result.col_ptrs[c - 1]; } } return result; } //! element-wise multiplication of one dense and one sparse object template inline typename enable_if2 < (is_arma_type::value && is_arma_sparse_type::value && is_same_type::value), SpMat >::result operator% ( const T1& x, const T2& y ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const Proxy pa(x); const SpProxy pb(y); arma_debug_assert_same_size(pa.get_n_rows(), pa.get_n_cols(), pb.get_n_rows(), pb.get_n_cols(), "element-wise multiplication"); SpMat result(pa.get_n_rows(), pa.get_n_cols()); // count new size uword new_n_nonzero = 0; typename SpProxy::const_iterator_type it = pb.begin(); typename SpProxy::const_iterator_type it_end = pb.end(); while(it != it_end) { if( ((*it) * pa.at(it.row(), it.col())) != eT(0) ) { ++new_n_nonzero; } ++it; } // Resize memory accordingly. result.mem_resize(new_n_nonzero); uword cur_val = 0; typename SpProxy::const_iterator_type it2 = pb.begin(); while(it2 != it_end) { const uword it2_row = it2.row(); const uword it2_col = it2.col(); const eT val = (*it2) * pa.at(it2_row, it2_col); if(val != eT(0)) { access::rw(result.values[cur_val]) = val; access::rw(result.row_indices[cur_val]) = it2_row; ++access::rw(result.col_ptrs[it2_col + 1]); ++cur_val; } ++it2; } // Fix column pointers. for(uword c = 1; c <= result.n_cols; ++c) { access::rw(result.col_ptrs[c]) += result.col_ptrs[c - 1]; } return result; } //! element-wise multiplication of one sparse and one dense object template inline typename enable_if2 < (is_arma_sparse_type::value && is_arma_type::value && is_same_type::value), SpMat >::result operator% ( const T1& x, const T2& y ) { arma_extra_debug_sigprint(); // This operation is commutative. return (y % x); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/operator_times.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // Copyright (C) 2012 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup operator_times //! @{ //! Base * scalar template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result operator* (const T1& X, const typename T1::elem_type k) { arma_extra_debug_sigprint(); return eOp(X,k); } //! scalar * Base template arma_inline typename enable_if2< is_arma_type::value, const eOp >::result operator* (const typename T1::elem_type k, const T1& X) { arma_extra_debug_sigprint(); return eOp(X,k); // NOTE: order is swapped } //! non-complex Base * complex scalar template arma_inline typename enable_if2 < (is_arma_type::value && is_cx::no), const mtOp, T1, op_cx_scalar_times> >::result operator* ( const T1& X, const std::complex& k ) { arma_extra_debug_sigprint(); return mtOp, T1, op_cx_scalar_times>('j', X, k); } //! complex scalar * non-complex Base template arma_inline typename enable_if2 < (is_arma_type::value && is_cx::no), const mtOp, T1, op_cx_scalar_times> >::result operator* ( const std::complex& k, const T1& X ) { arma_extra_debug_sigprint(); return mtOp, T1, op_cx_scalar_times>('j', X, k); } //! scalar * trans(T1) template arma_inline const Op operator* (const typename T1::elem_type k, const Op& X) { arma_extra_debug_sigprint(); return Op(X.m, k); } //! trans(T1) * scalar template arma_inline const Op operator* (const Op& X, const typename T1::elem_type k) { arma_extra_debug_sigprint(); return Op(X.m, k); } //! Base * diagmat template arma_inline typename enable_if2 < (is_arma_type::value && is_same_type::value), const Glue, glue_times_diag> >::result operator* (const T1& X, const Op& Y) { arma_extra_debug_sigprint(); return Glue, glue_times_diag>(X, Y); } //! diagmat * Base template arma_inline typename enable_if2 < (is_arma_type::value && is_same_type::value), const Glue, T2, glue_times_diag> >::result operator* (const Op& X, const T2& Y) { arma_extra_debug_sigprint(); return Glue, T2, glue_times_diag>(X, Y); } //! diagmat * diagmat template inline Mat< typename promote_type::result > operator* (const Op& X, const Op& Y) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); const diagmat_proxy A(X.m); const diagmat_proxy B(Y.m); arma_debug_assert_mul_size(A.n_elem, A.n_elem, B.n_elem, B.n_elem, "matrix multiplication"); const uword N = A.n_elem; Mat out(N,N); out.zeros(); for(uword i=0; i::apply( A[i] ) * upgrade_val::apply( B[i] ); } return out; } //! multiplication of Base objects with same element type template arma_inline typename enable_if2 < is_arma_type::value && is_arma_type::value && is_same_type::value, const Glue >::result operator* (const T1& X, const T2& Y) { arma_extra_debug_sigprint(); return Glue(X, Y); } //! multiplication of Base objects with different element types template inline typename enable_if2 < (is_arma_type::value && is_arma_type::value && (is_same_type::no)), const mtGlue< typename promote_type::result, T1, T2, glue_mixed_times > >::result operator* ( const T1& X, const T2& Y ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT1; typedef typename T2::elem_type eT2; typedef typename promote_type::result out_eT; promote_type::check(); return mtGlue( X, Y ); } //! sparse multiplied by scalar template inline typename enable_if2 < is_arma_sparse_type::value, SpOp >::result operator* ( const T1& X, const typename T1::elem_type k ) { arma_extra_debug_sigprint(); return SpOp(X, k); } template inline typename enable_if2 < is_arma_sparse_type::value, SpOp >::result operator* ( const typename T1::elem_type k, const T1& X ) { arma_extra_debug_sigprint(); return SpOp(X, k); } //! multiplication of two sparse objects template inline arma_hot typename enable_if2 < (is_arma_sparse_type::value && is_arma_sparse_type::value && is_same_type::value), const SpGlue >::result operator* ( const T1& x, const T2& y ) { arma_extra_debug_sigprint(); return SpGlue(x, y); } //! convert "(sparse + sparse) * scalar" to specialised operation "scalar * (sparse + sparse)" template inline const SpGlue operator* ( const SpGlue& X, const typename T1::elem_type k ) { arma_extra_debug_sigprint(); return SpGlue(X.A, X.B, k); } //! convert "scalar * (sparse + sparse)" to specialised operation template inline const SpGlue operator* ( const typename T1::elem_type k, const SpGlue& X ) { arma_extra_debug_sigprint(); return SpGlue(X.A, X.B, k); } //! convert "(sparse - sparse) * scalar" to specialised operation "scalar * (sparse - sparse)" template inline const SpGlue operator* ( const SpGlue& X, const typename T1::elem_type k ) { arma_extra_debug_sigprint(); return SpGlue(X.A, X.B, k); } //! convert "scalar * (sparse - sparse)" to specialised operation template inline const SpGlue operator* ( const typename T1::elem_type k, const SpGlue& X ) { arma_extra_debug_sigprint(); return SpGlue(X.A, X.B, k); } //! convert "(sparse*sparse) * scalar" to specialised operation "scalar * (sparse*sparse)" template inline const SpGlue operator* ( const SpGlue& X, const typename T1::elem_type k ) { arma_extra_debug_sigprint(); return SpGlue(X.A, X.B, k); } //! convert "scalar * (sparse*sparse)" to specialised operation template inline const SpGlue operator* ( const typename T1::elem_type k, const SpGlue& X ) { arma_extra_debug_sigprint(); return SpGlue(X.A, X.B, k); } //! convert "(scalar*sparse) * sparse" to specialised operation "scalar * (sparse*sparse)" template inline typename enable_if2 < is_arma_sparse_type::value, const SpGlue >::result operator* ( const SpOp& X, const T2& Y ) { arma_extra_debug_sigprint(); return SpGlue(X.m, Y, X.aux); } //! convert "sparse * (scalar*sparse)" to specialised operation "scalar * (sparse*sparse)" template inline typename enable_if2 < is_arma_sparse_type::value, const SpGlue >::result operator* ( const T1& X, const SpOp& Y ) { arma_extra_debug_sigprint(); return SpGlue(X, Y.m, Y.aux); } //! multiplication of one sparse and one dense object template inline typename enable_if2 < (is_arma_sparse_type::value && is_arma_type::value && is_same_type::value), Mat >::result operator* ( const T1& x, const T2& y ) { arma_extra_debug_sigprint(); const SpProxy pa(x); const Proxy pb(y); arma_debug_assert_mul_size(pa.get_n_rows(), pa.get_n_cols(), pb.get_n_rows(), pb.get_n_cols(), "matrix multiplication"); Mat result(pa.get_n_rows(), pb.get_n_cols()); result.zeros(); if( (pa.get_n_nonzero() > 0) && (pb.get_n_elem() > 0) ) { typename SpProxy::const_iterator_type x_it = pa.begin(); typename SpProxy::const_iterator_type x_it_end = pa.end(); const uword result_n_cols = result.n_cols; while(x_it != x_it_end) { for(uword col = 0; col < result_n_cols; ++col) { result.at(x_it.row(), col) += (*x_it) * pb.at(x_it.col(), col); } ++x_it; } } return result; } //! multiplication of one dense and one sparse object template inline typename enable_if2 < (is_arma_type::value && is_arma_sparse_type::value && is_same_type::value), Mat >::result operator* ( const T1& x, const T2& y ) { arma_extra_debug_sigprint(); const Proxy pa(x); const SpProxy pb(y); arma_debug_assert_mul_size(pa.get_n_rows(), pa.get_n_cols(), pb.get_n_rows(), pb.get_n_cols(), "matrix multiplication"); Mat result(pa.get_n_rows(), pb.get_n_cols()); result.zeros(); if( (pa.get_n_elem() > 0) && (pb.get_n_nonzero() > 0) ) { typename SpProxy::const_iterator_type y_col_it = pb.begin(); typename SpProxy::const_iterator_type y_col_it_end = pb.end(); const uword result_n_rows = result.n_rows; while(y_col_it != y_col_it_end) { for(uword row = 0; row < result_n_rows; ++row) { result.at(row, y_col_it.col()) += pa.at(row, y_col_it.row()) * (*y_col_it); } ++y_col_it; } } return result; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/podarray_bones.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup podarray //! @{ struct podarray_prealloc_n_elem { static const uword val = 16; }; //! A lightweight array for POD types. For internal use only! template class podarray { public: arma_aligned const uword n_elem; //!< number of elements held arma_aligned eT* mem; //!< pointer to memory used by the object protected: //! internal memory, to avoid calling the 'new' operator for small amounts of memory. arma_align_mem eT mem_local[ podarray_prealloc_n_elem::val ]; public: inline ~podarray(); inline podarray(); inline podarray (const podarray& x); inline const podarray& operator=(const podarray& x); arma_inline explicit podarray(const uword new_N); arma_inline explicit podarray(const eT* X, const uword new_N); template inline explicit podarray(const Proxy& P); arma_inline eT& operator[] (const uword i); arma_inline eT operator[] (const uword i) const; arma_inline eT& operator() (const uword i); arma_inline eT operator() (const uword i) const; inline void set_min_size(const uword min_n_elem); inline void set_size(const uword new_n_elem); inline void reset(); inline void fill(const eT val); inline void zeros(); inline void zeros(const uword new_n_elem); arma_inline eT* memptr(); arma_inline const eT* memptr() const; arma_hot inline void copy_row(const Mat& A, const uword row); protected: inline void init_cold(const uword new_n_elem); inline void init_warm(const uword new_n_elem); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/podarray_meat.hpp ================================================ // Copyright (C) 2008-2012 Conrad Sanderson // Copyright (C) 2008-2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup podarray //! @{ template arma_hot inline podarray::~podarray() { arma_extra_debug_sigprint_this(this); if(n_elem > podarray_prealloc_n_elem::val ) { memory::release( mem ); } } template inline podarray::podarray() : n_elem(0) , mem (0) { arma_extra_debug_sigprint_this(this); } template inline podarray::podarray(const podarray& x) : n_elem(x.n_elem) { arma_extra_debug_sigprint(); const uword x_n_elem = x.n_elem; init_cold(x_n_elem); arrayops::copy( memptr(), x.memptr(), x_n_elem ); } template inline const podarray& podarray::operator=(const podarray& x) { arma_extra_debug_sigprint(); if(this != &x) { const uword x_n_elem = x.n_elem; init_warm(x_n_elem); arrayops::copy( memptr(), x.memptr(), x_n_elem ); } return *this; } template arma_hot arma_inline podarray::podarray(const uword new_n_elem) : n_elem(new_n_elem) { arma_extra_debug_sigprint_this(this); init_cold(new_n_elem); } template arma_inline podarray::podarray(const eT* X, const uword new_n_elem) : n_elem(new_n_elem) { arma_extra_debug_sigprint_this(this); init_cold(new_n_elem); arrayops::copy( memptr(), X, new_n_elem ); } template template inline podarray::podarray(const Proxy& P) : n_elem(P.get_n_elem()) { arma_extra_debug_sigprint_this(this); const uword P_n_elem = P.get_n_elem(); init_cold(P_n_elem); eT* out_mem = (*this).memptr(); if(Proxy::prefer_at_accessor == false) { typename Proxy::ea_type A = P.get_ea(); uword i,j; for(i=0, j=1; j < P_n_elem; i+=2, j+=2) { const eT val_i = A[i]; const eT val_j = A[j]; out_mem[i] = val_i; out_mem[j] = val_j; } if(i < P_n_elem) { out_mem[i] = A[i]; } } else { const uword P_n_rows = P.get_n_rows(); const uword P_n_cols = P.get_n_cols(); if(P_n_rows != 1) { uword count = 0; for(uword col=0; col < P_n_cols; ++col) for(uword row=0; row < P_n_rows; ++row, ++count) { out_mem[count] = P.at(row,col); } } else { for(uword col=0; col < P_n_cols; ++col) { out_mem[col] = P.at(0,col); } } } } template arma_inline eT podarray::operator[] (const uword i) const { return mem[i]; } template arma_inline eT& podarray::operator[] (const uword i) { return access::rw(mem[i]); } template arma_inline eT podarray::operator() (const uword i) const { arma_debug_check( (i >= n_elem), "podarray::operator(): index out of bounds"); return mem[i]; } template arma_inline eT& podarray::operator() (const uword i) { arma_debug_check( (i >= n_elem), "podarray::operator(): index out of bounds"); return access::rw(mem[i]); } template inline void podarray::set_min_size(const uword min_n_elem) { arma_extra_debug_sigprint(); if(min_n_elem > n_elem) { init_warm(min_n_elem); } } template inline void podarray::set_size(const uword new_n_elem) { arma_extra_debug_sigprint(); init_warm(new_n_elem); } template inline void podarray::reset() { arma_extra_debug_sigprint(); init_warm(0); } template inline void podarray::fill(const eT val) { arma_extra_debug_sigprint(); arrayops::inplace_set(memptr(), val, n_elem); } template inline void podarray::zeros() { arma_extra_debug_sigprint(); arrayops::fill_zeros(memptr(), n_elem); } template inline void podarray::zeros(const uword new_n_elem) { arma_extra_debug_sigprint(); init_warm(new_n_elem); arrayops::fill_zeros(memptr(), n_elem); } template arma_inline eT* podarray::memptr() { return mem; } template arma_inline const eT* podarray::memptr() const { return mem; } template arma_hot inline void podarray::copy_row(const Mat& A, const uword row) { const uword cols = A.n_cols; // note: this function assumes that the podarray has been set to the correct size beforehand eT* out = memptr(); switch(cols) { default: { uword i,j; for(i=0, j=1; j < cols; i+=2, j+=2) { const eT tmp_i = A.at(row, i); const eT tmp_j = A.at(row, j); out[i] = tmp_i; out[j] = tmp_j; } if(i < cols) { out[i] = A.at(row, i); } } break; case 8: out[7] = A.at(row, 7); case 7: out[6] = A.at(row, 6); case 6: out[5] = A.at(row, 5); case 5: out[4] = A.at(row, 4); case 4: out[3] = A.at(row, 3); case 3: out[2] = A.at(row, 2); case 2: out[1] = A.at(row, 1); case 1: out[0] = A.at(row, 0); case 0: ; } } template arma_hot inline void podarray::init_cold(const uword new_n_elem) { arma_extra_debug_sigprint(); if(new_n_elem <= podarray_prealloc_n_elem::val ) { mem = mem_local; } else { mem = memory::acquire(new_n_elem); } } template inline void podarray::init_warm(const uword new_n_elem) { arma_extra_debug_sigprint(); if(n_elem == new_n_elem) { return; } if(n_elem > podarray_prealloc_n_elem::val ) { memory::release( mem ); } if(new_n_elem <= podarray_prealloc_n_elem::val ) { mem = mem_local; } else { mem = memory::acquire(new_n_elem); } access::rw(n_elem) = new_n_elem; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/promote_type.hpp ================================================ // Copyright (C) 2009-2013 Conrad Sanderson // Copyright (C) 2009-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup promote_type //! @{ template struct is_promotable { static const bool value = false; typedef T1 result; }; struct is_promotable_ok { static const bool value = true; }; template struct is_promotable : public is_promotable_ok { typedef T result; }; template struct is_promotable, T> : public is_promotable_ok { typedef std::complex result; }; template<> struct is_promotable, std::complex > : public is_promotable_ok { typedef std::complex result; }; template<> struct is_promotable, float> : public is_promotable_ok { typedef std::complex result; }; template<> struct is_promotable, double> : public is_promotable_ok { typedef std::complex result; }; #if defined(ARMA_USE_U64S64) template struct is_promotable, u64> : public is_promotable_ok { typedef std::complex result; }; template struct is_promotable, s64> : public is_promotable_ok { typedef std::complex result; }; #endif #if defined(ARMA_ALLOW_LONG) template struct is_promotable, ulng_t> : public is_promotable_ok { typedef std::complex result; }; template struct is_promotable, slng_t> : public is_promotable_ok { typedef std::complex result; }; #endif template struct is_promotable, s32> : public is_promotable_ok { typedef std::complex result; }; template struct is_promotable, u32> : public is_promotable_ok { typedef std::complex result; }; template struct is_promotable, s16> : public is_promotable_ok { typedef std::complex result; }; template struct is_promotable, u16> : public is_promotable_ok { typedef std::complex result; }; template struct is_promotable, s8> : public is_promotable_ok { typedef std::complex result; }; template struct is_promotable, u8> : public is_promotable_ok { typedef std::complex result; }; template<> struct is_promotable : public is_promotable_ok { typedef double result; }; #if defined(ARMA_USE_U64S64) template<> struct is_promotable : public is_promotable_ok { typedef double result; }; template<> struct is_promotable : public is_promotable_ok { typedef double result; }; #endif #if defined(ARMA_ALLOW_LONG) template<> struct is_promotable : public is_promotable_ok { typedef double result; }; template<> struct is_promotable : public is_promotable_ok { typedef double result; }; #endif template<> struct is_promotable : public is_promotable_ok { typedef double result; }; template<> struct is_promotable : public is_promotable_ok { typedef double result; }; template<> struct is_promotable : public is_promotable_ok { typedef double result; }; template<> struct is_promotable : public is_promotable_ok { typedef double result; }; template<> struct is_promotable : public is_promotable_ok { typedef double result; }; template<> struct is_promotable : public is_promotable_ok { typedef double result; }; #if defined(ARMA_USE_U64S64) template<> struct is_promotable : public is_promotable_ok { typedef float result; }; template<> struct is_promotable : public is_promotable_ok { typedef float result; }; #endif #if defined(ARMA_ALLOW_LONG) template<> struct is_promotable : public is_promotable_ok { typedef float result; }; template<> struct is_promotable : public is_promotable_ok { typedef float result; }; #endif template<> struct is_promotable : public is_promotable_ok { typedef float result; }; template<> struct is_promotable : public is_promotable_ok { typedef float result; }; template<> struct is_promotable : public is_promotable_ok { typedef float result; }; template<> struct is_promotable : public is_promotable_ok { typedef float result; }; template<> struct is_promotable : public is_promotable_ok { typedef float result; }; template<> struct is_promotable : public is_promotable_ok { typedef float result; }; #if defined(ARMA_USE_U64S64) template<> struct is_promotable : public is_promotable_ok { typedef u64 result; }; template<> struct is_promotable : public is_promotable_ok { typedef u64 result; }; template<> struct is_promotable : public is_promotable_ok { typedef u64 result; }; #endif #if defined(ARMA_USE_U64S64) template<> struct is_promotable : public is_promotable_ok { typedef s64 result; }; // float ? template<> struct is_promotable : public is_promotable_ok { typedef s64 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s64 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s64 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s64 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s64 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s64 result; }; #endif template<> struct is_promotable : public is_promotable_ok { typedef s32 result; }; // float ? template<> struct is_promotable : public is_promotable_ok { typedef s32 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s32 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s32 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s32 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s32 result; }; // float ? template<> struct is_promotable : public is_promotable_ok { typedef u32 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s32 result; }; // float ? template<> struct is_promotable : public is_promotable_ok { typedef u32 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s16 result; }; // s32 ? template<> struct is_promotable : public is_promotable_ok { typedef s16 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s16 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s16 result; }; // s32 ? template<> struct is_promotable : public is_promotable_ok { typedef u16 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s8 result; }; // s16 ? // // mirrored versions template struct is_promotable > : public is_promotable_ok { typedef std::complex result; }; template<> struct is_promotable, std::complex > : public is_promotable_ok { typedef std::complex result; }; template<> struct is_promotable > : public is_promotable_ok { typedef std::complex result; }; template<> struct is_promotable > : public is_promotable_ok { typedef std::complex result; }; #if defined(ARMA_USE_U64S64) template struct is_promotable > : public is_promotable_ok { typedef std::complex result; }; template struct is_promotable > : public is_promotable_ok { typedef std::complex result; }; #endif #if defined(ARMA_ALLOW_LONG) template struct is_promotable > : public is_promotable_ok { typedef std::complex result; }; template struct is_promotable > : public is_promotable_ok { typedef std::complex result; }; #endif template struct is_promotable > : public is_promotable_ok { typedef std::complex result; }; template struct is_promotable > : public is_promotable_ok { typedef std::complex result; }; template struct is_promotable > : public is_promotable_ok { typedef std::complex result; }; template struct is_promotable > : public is_promotable_ok { typedef std::complex result; }; template struct is_promotable > : public is_promotable_ok { typedef std::complex result; }; template struct is_promotable > : public is_promotable_ok { typedef std::complex result; }; template<> struct is_promotable : public is_promotable_ok { typedef double result; }; #if defined(ARMA_USE_U64S64) template<> struct is_promotable : public is_promotable_ok { typedef double result; }; template<> struct is_promotable : public is_promotable_ok { typedef double result; }; #endif #if defined(ARMA_ALLOW_LONG) template<> struct is_promotable : public is_promotable_ok { typedef double result; }; template<> struct is_promotable : public is_promotable_ok { typedef double result; }; #endif template<> struct is_promotable : public is_promotable_ok { typedef double result; }; template<> struct is_promotable : public is_promotable_ok { typedef double result; }; template<> struct is_promotable : public is_promotable_ok { typedef double result; }; template<> struct is_promotable : public is_promotable_ok { typedef double result; }; template<> struct is_promotable : public is_promotable_ok { typedef double result; }; template<> struct is_promotable : public is_promotable_ok { typedef double result; }; #if defined(ARMA_USE_U64S64) template<> struct is_promotable : public is_promotable_ok { typedef float result; }; template<> struct is_promotable : public is_promotable_ok { typedef float result; }; #endif #if defined(ARMA_ALLOW_LONG) template<> struct is_promotable : public is_promotable_ok { typedef float result; }; template<> struct is_promotable : public is_promotable_ok { typedef float result; }; #endif template<> struct is_promotable : public is_promotable_ok { typedef float result; }; template<> struct is_promotable : public is_promotable_ok { typedef float result; }; template<> struct is_promotable : public is_promotable_ok { typedef float result; }; template<> struct is_promotable : public is_promotable_ok { typedef float result; }; template<> struct is_promotable : public is_promotable_ok { typedef float result; }; template<> struct is_promotable : public is_promotable_ok { typedef float result; }; #if defined(ARMA_USE_U64S64) template<> struct is_promotable : public is_promotable_ok { typedef u64 result; }; template<> struct is_promotable : public is_promotable_ok { typedef u64 result; }; template<> struct is_promotable : public is_promotable_ok { typedef u64 result; }; #endif #if defined(ARMA_USE_U64S64) template<> struct is_promotable : public is_promotable_ok { typedef s64 result; }; // float ? template<> struct is_promotable : public is_promotable_ok { typedef s64 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s64 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s64 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s64 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s64 result; }; #endif template<> struct is_promotable : public is_promotable_ok { typedef s32 result; }; // float ? template<> struct is_promotable : public is_promotable_ok { typedef s32 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s32 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s32 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s32 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s32 result; }; // float ? template<> struct is_promotable : public is_promotable_ok { typedef u32 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s32 result; }; // float ? template<> struct is_promotable : public is_promotable_ok { typedef u32 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s16 result; }; // s32 ? template<> struct is_promotable : public is_promotable_ok { typedef s16 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s16 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s16 result; }; // s32 ? template<> struct is_promotable : public is_promotable_ok { typedef u16 result; }; template<> struct is_promotable : public is_promotable_ok { typedef s8 result; }; // s16 ? template struct promote_type { inline static void check() { arma_type_check(( is_promotable::value == false )); } typedef typename is_promotable::result result; }; template struct eT_promoter { typedef typename promote_type::result eT; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/restrictors.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup restrictors //! @{ // structures for template based restrictions of input/output arguments // (part of the SFINAE approach) // http://en.wikipedia.org/wiki/SFINAE template struct arma_scalar_only { }; template<> struct arma_scalar_only { typedef u8 result; }; template<> struct arma_scalar_only { typedef s8 result; }; template<> struct arma_scalar_only { typedef u16 result; }; template<> struct arma_scalar_only { typedef s16 result; }; template<> struct arma_scalar_only { typedef u32 result; }; template<> struct arma_scalar_only { typedef s32 result; }; #if defined(ARMA_USE_U64S64) template<> struct arma_scalar_only { typedef u64 result; }; template<> struct arma_scalar_only { typedef s64 result; }; #endif template<> struct arma_scalar_only { typedef float result; }; template<> struct arma_scalar_only { typedef double result; }; #if defined(ARMA_ALLOW_LONG) template<> struct arma_scalar_only { typedef ulng_t result; }; template<> struct arma_scalar_only { typedef slng_t result; }; #endif template struct arma_scalar_only< std::complex > { typedef std::complex result; }; template struct arma_integral_only { }; template<> struct arma_integral_only { typedef u8 result; }; template<> struct arma_integral_only { typedef s8 result; }; template<> struct arma_integral_only { typedef u16 result; }; template<> struct arma_integral_only { typedef s16 result; }; template<> struct arma_integral_only { typedef u32 result; }; template<> struct arma_integral_only { typedef s32 result; }; #if defined(ARMA_USE_U64S64) template<> struct arma_integral_only { typedef u64 result; }; template<> struct arma_integral_only { typedef s64 result; }; #endif #if defined(ARMA_ALLOW_LONG) template<> struct arma_integral_only { typedef ulng_t result; }; template<> struct arma_integral_only { typedef slng_t result; }; #endif template struct arma_unsigned_integral_only { }; template<> struct arma_unsigned_integral_only { typedef u8 result; }; template<> struct arma_unsigned_integral_only { typedef u16 result; }; template<> struct arma_unsigned_integral_only { typedef u32 result; }; #if defined(ARMA_USE_U64S64) template<> struct arma_unsigned_integral_only { typedef u64 result; }; #endif #if defined(ARMA_ALLOW_LONG) template<> struct arma_unsigned_integral_only { typedef ulng_t result; }; #endif template struct arma_signed_integral_only { }; template<> struct arma_signed_integral_only { typedef s8 result; }; template<> struct arma_signed_integral_only { typedef s16 result; }; template<> struct arma_signed_integral_only { typedef s32 result; }; #if defined(ARMA_USE_U64S64) template<> struct arma_signed_integral_only { typedef s64 result; }; #endif #if defined(ARMA_ALLOW_LONG) template<> struct arma_signed_integral_only { typedef slng_t result; }; #endif template struct arma_signed_only { }; template<> struct arma_signed_only { typedef s8 result; }; template<> struct arma_signed_only { typedef s16 result; }; template<> struct arma_signed_only { typedef s32 result; }; #if defined(ARMA_USE_U64S64) template<> struct arma_signed_only { typedef s64 result; }; #endif template<> struct arma_signed_only { typedef float result; }; template<> struct arma_signed_only { typedef double result; }; #if defined(ARMA_ALLOW_LONG) template<> struct arma_signed_only { typedef slng_t result; }; #endif template struct arma_signed_only< std::complex > { typedef std::complex result; }; template struct arma_real_only { }; template<> struct arma_real_only { typedef float result; }; template<> struct arma_real_only { typedef double result; }; template struct arma_real_or_cx_only { }; template<> struct arma_real_or_cx_only< float > { typedef float result; }; template<> struct arma_real_or_cx_only< double > { typedef double result; }; template<> struct arma_real_or_cx_only< std::complex > { typedef std::complex result; }; template<> struct arma_real_or_cx_only< std::complex > { typedef std::complex result; }; template struct arma_cx_only { }; template<> struct arma_cx_only< std::complex > { typedef std::complex result; }; template<> struct arma_cx_only< std::complex > { typedef std::complex result; }; template struct arma_not_cx { typedef T result; }; template struct arma_not_cx< std::complex > { }; template struct arma_blas_type_only { }; template<> struct arma_blas_type_only< float > { typedef float result; }; template<> struct arma_blas_type_only< double > { typedef double result; }; template<> struct arma_blas_type_only< std::complex > { typedef std::complex result; }; template<> struct arma_blas_type_only< std::complex > { typedef std::complex result; }; template struct arma_not_blas_type { typedef T result; }; template<> struct arma_not_blas_type< float > { }; template<> struct arma_not_blas_type< double > { }; template<> struct arma_not_blas_type< std::complex > { }; template<> struct arma_not_blas_type< std::complex > { }; template struct arma_op_rel_only { }; template<> struct arma_op_rel_only< op_rel_lt_pre > { typedef int result; }; template<> struct arma_op_rel_only< op_rel_lt_post > { typedef int result; }; template<> struct arma_op_rel_only< op_rel_gt_pre > { typedef int result; }; template<> struct arma_op_rel_only< op_rel_gt_post > { typedef int result; }; template<> struct arma_op_rel_only< op_rel_lteq_pre > { typedef int result; }; template<> struct arma_op_rel_only< op_rel_lteq_post > { typedef int result; }; template<> struct arma_op_rel_only< op_rel_gteq_pre > { typedef int result; }; template<> struct arma_op_rel_only< op_rel_gteq_post > { typedef int result; }; template<> struct arma_op_rel_only< op_rel_eq > { typedef int result; }; template<> struct arma_op_rel_only< op_rel_noteq > { typedef int result; }; template struct arma_not_op_rel { typedef int result; }; template<> struct arma_not_op_rel< op_rel_lt_pre > { }; template<> struct arma_not_op_rel< op_rel_lt_post > { }; template<> struct arma_not_op_rel< op_rel_gt_pre > { }; template<> struct arma_not_op_rel< op_rel_gt_post > { }; template<> struct arma_not_op_rel< op_rel_lteq_pre > { }; template<> struct arma_not_op_rel< op_rel_lteq_post > { }; template<> struct arma_not_op_rel< op_rel_gteq_pre > { }; template<> struct arma_not_op_rel< op_rel_gteq_post > { }; template<> struct arma_not_op_rel< op_rel_eq > { }; template<> struct arma_not_op_rel< op_rel_noteq > { }; template struct arma_glue_rel_only { }; template<> struct arma_glue_rel_only< glue_rel_lt > { typedef int result; }; template<> struct arma_glue_rel_only< glue_rel_gt > { typedef int result; }; template<> struct arma_glue_rel_only< glue_rel_lteq > { typedef int result; }; template<> struct arma_glue_rel_only< glue_rel_gteq > { typedef int result; }; template<> struct arma_glue_rel_only< glue_rel_eq > { typedef int result; }; template<> struct arma_glue_rel_only< glue_rel_noteq > { typedef int result; }; template<> struct arma_glue_rel_only< glue_rel_and > { typedef int result; }; template<> struct arma_glue_rel_only< glue_rel_or > { typedef int result; }; template struct arma_Mat_Col_Row_only { }; template struct arma_Mat_Col_Row_only< Mat > { typedef Mat result; }; template struct arma_Mat_Col_Row_only< Col > { typedef Col result; }; template struct arma_Mat_Col_Row_only< Row > { typedef Row result; }; template struct arma_Cube_only { }; template struct arma_Cube_only< Cube > { typedef Cube result; }; template struct arma_SpMat_SpCol_SpRow_only { }; template struct arma_SpMat_SpCol_SpRow_only< SpMat > { typedef SpMat result; }; template struct arma_SpMat_SpCol_SpRow_only< SpCol > { typedef SpCol result; }; template struct arma_SpMat_SpCol_SpRow_only< SpRow > { typedef SpRow result; }; template struct enable_if { }; template<> struct enable_if { typedef int result; }; template struct enable_if2 { }; template< typename result_type > struct enable_if2 { typedef result_type result; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/running_stat_bones.hpp ================================================ // Copyright (C) 2009-2013 Conrad Sanderson // Copyright (C) 2009-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup running_stat //! @{ template class arma_counter { public: inline ~arma_counter(); inline arma_counter(); inline const arma_counter& operator++(); inline void operator++(int); inline void reset(); inline eT value() const; inline eT value_plus_1() const; inline eT value_minus_1() const; private: arma_aligned eT d_count; arma_aligned uword i_count; }; //! Class for keeping statistics of a continuously sampled process / signal. //! Useful if the storage of individual samples is not necessary or desired. //! Also useful if the number of samples is not known beforehand or exceeds //! available memory. template class running_stat { public: typedef typename get_pod_type::result T; inline ~running_stat(); inline running_stat(); inline void operator() (const T sample); inline void operator() (const std::complex& sample); inline void reset(); inline eT mean() const; inline T var (const uword norm_type = 0) const; inline T stddev(const uword norm_type = 0) const; inline eT min() const; inline eT max() const; inline T count() const; // // private: arma_aligned arma_counter counter; arma_aligned eT r_mean; arma_aligned T r_var; arma_aligned eT min_val; arma_aligned eT max_val; arma_aligned T min_val_norm; arma_aligned T max_val_norm; friend class running_stat_aux; }; class running_stat_aux { public: template inline static void update_stats(running_stat& x, const eT sample, const typename arma_not_cx::result* junk = 0); template inline static void update_stats(running_stat& x, const std::complex& sample, const typename arma_not_cx::result* junk = 0); template inline static void update_stats(running_stat& x, const typename eT::value_type sample, const typename arma_cx_only::result* junk = 0); template inline static void update_stats(running_stat& x, const eT& sample, const typename arma_cx_only::result* junk = 0); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/running_stat_meat.hpp ================================================ // Copyright (C) 2009-2011 Conrad Sanderson // Copyright (C) 2009-2011 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup running_stat //! @{ template inline arma_counter::~arma_counter() { arma_extra_debug_sigprint_this(this); } template inline arma_counter::arma_counter() : d_count( eT(0)) , i_count(uword(0)) { arma_extra_debug_sigprint_this(this); } template inline const arma_counter& arma_counter::operator++() { if(i_count < ARMA_MAX_UWORD) { i_count++; } else { d_count += eT(ARMA_MAX_UWORD); i_count = 1; } return *this; } template inline void arma_counter::operator++(int) { operator++(); } template inline void arma_counter::reset() { d_count = eT(0); i_count = uword(0); } template inline eT arma_counter::value() const { return d_count + eT(i_count); } template inline eT arma_counter::value_plus_1() const { if(i_count < ARMA_MAX_UWORD) { return d_count + eT(i_count + 1); } else { return d_count + eT(ARMA_MAX_UWORD) + eT(1); } } template inline eT arma_counter::value_minus_1() const { if(i_count > 0) { return d_count + eT(i_count - 1); } else { return d_count - eT(1); } } // template inline running_stat::~running_stat() { arma_extra_debug_sigprint_this(this); } template inline running_stat::running_stat() : r_mean ( eT(0)) , r_var (typename running_stat::T(0)) , min_val ( eT(0)) , max_val ( eT(0)) , min_val_norm(typename running_stat::T(0)) , max_val_norm(typename running_stat::T(0)) { arma_extra_debug_sigprint_this(this); } //! update statistics to reflect new sample template inline void running_stat::operator() (const typename running_stat::T sample) { arma_extra_debug_sigprint(); if( arma_isfinite(sample) == false ) { arma_warn(true, "running_stat: sample ignored as it is non-finite" ); return; } running_stat_aux::update_stats(*this, sample); } //! update statistics to reflect new sample (version for complex numbers) template inline void running_stat::operator() (const std::complex< typename running_stat::T >& sample) { arma_extra_debug_sigprint(); if( arma_isfinite(sample) == false ) { arma_warn(true, "running_stat: sample ignored as it is non-finite" ); return; } running_stat_aux::update_stats(*this, sample); } //! set all statistics to zero template inline void running_stat::reset() { arma_extra_debug_sigprint(); // typedef typename running_stat::T T; counter.reset(); r_mean = eT(0); r_var = T(0); min_val = eT(0); max_val = eT(0); min_val_norm = T(0); max_val_norm = T(0); } //! mean or average value template inline eT running_stat::mean() const { arma_extra_debug_sigprint(); return r_mean; } //! variance template inline typename running_stat::T running_stat::var(const uword norm_type) const { arma_extra_debug_sigprint(); const T N = counter.value(); if(N > T(1)) { if(norm_type == 0) { return r_var; } else { const T N_minus_1 = counter.value_minus_1(); return (N_minus_1/N) * r_var; } } else { return T(0); } } //! standard deviation template inline typename running_stat::T running_stat::stddev(const uword norm_type) const { arma_extra_debug_sigprint(); return std::sqrt( (*this).var(norm_type) ); } //! minimum value template inline eT running_stat::min() const { arma_extra_debug_sigprint(); return min_val; } //! maximum value template inline eT running_stat::max() const { arma_extra_debug_sigprint(); return max_val; } //! number of samples so far template inline typename get_pod_type::result running_stat::count() const { arma_extra_debug_sigprint(); return counter.value(); } //! update statistics to reflect new sample (version for non-complex numbers, non-complex sample) template inline void running_stat_aux::update_stats(running_stat& x, const eT sample, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename running_stat::T T; const T N = x.counter.value(); if(N > T(0)) { if(sample < x.min_val) { x.min_val = sample; } if(sample > x.max_val) { x.max_val = sample; } const T N_plus_1 = x.counter.value_plus_1(); const T N_minus_1 = x.counter.value_minus_1(); // note: variance has to be updated before the mean const eT tmp = sample - x.r_mean; x.r_var = N_minus_1/N * x.r_var + (tmp*tmp)/N_plus_1; x.r_mean = x.r_mean + (sample - x.r_mean)/N_plus_1; //x.r_mean = (N/N_plus_1)*x.r_mean + sample/N_plus_1; //x.r_mean = (x.r_mean + sample/N) * N/N_plus_1; } else { x.r_mean = sample; x.min_val = sample; x.max_val = sample; // r_var is initialised to zero // in the constructor and reset() } x.counter++; } //! update statistics to reflect new sample (version for non-complex numbers, complex sample) template inline void running_stat_aux::update_stats(running_stat& x, const std::complex& sample, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); running_stat_aux::update_stats(x, std::real(sample)); } //! update statistics to reflect new sample (version for complex numbers, non-complex sample) template inline void running_stat_aux::update_stats(running_stat& x, const typename eT::value_type sample, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename eT::value_type T; running_stat_aux::update_stats(x, std::complex(sample)); } //! alter statistics to reflect new sample (version for complex numbers, complex sample) template inline void running_stat_aux::update_stats(running_stat& x, const eT& sample, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename eT::value_type T; const T sample_norm = std::norm(sample); const T N = x.counter.value(); if(N > T(0)) { if(sample_norm < x.min_val_norm) { x.min_val_norm = sample_norm; x.min_val = sample; } if(sample_norm > x.max_val_norm) { x.max_val_norm = sample_norm; x.max_val = sample; } const T N_plus_1 = x.counter.value_plus_1(); const T N_minus_1 = x.counter.value_minus_1(); x.r_var = N_minus_1/N * x.r_var + std::norm(sample - x.r_mean)/N_plus_1; x.r_mean = x.r_mean + (sample - x.r_mean)/N_plus_1; //x.r_mean = (N/N_plus_1)*x.r_mean + sample/N_plus_1; //x.r_mean = (x.r_mean + sample/N) * N/N_plus_1; } else { x.r_mean = sample; x.min_val = sample; x.max_val = sample; x.min_val_norm = sample_norm; x.max_val_norm = sample_norm; // r_var is initialised to zero // in the constructor and reset() } x.counter++; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/running_stat_vec_bones.hpp ================================================ // Copyright (C) 2009-2013 Conrad Sanderson // Copyright (C) 2009-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup running_stat_vec //! @{ template struct rsv_get_elem_type { }; template struct rsv_get_elem_type { typedef obj_type elem_type; }; template struct rsv_get_elem_type { typedef typename obj_type::elem_type elem_type; }; //! Class for keeping statistics of a continuously sampled process / signal. //! Useful if the storage of individual samples is not necessary or desired. //! Also useful if the number of samples is not known beforehand or exceeds //! available memory. template class running_stat_vec { public: // voodoo for compatibility with old user code typedef typename rsv_get_elem_type::value>::elem_type eT; typedef typename get_pod_type::result T; inline ~running_stat_vec(); inline running_stat_vec(const bool in_calc_cov = false); // TODO: investigate char* overload, eg. "calc_cov", "no_calc_cov" inline running_stat_vec(const running_stat_vec& in_rsv); inline const running_stat_vec& operator=(const running_stat_vec& in_rsv); template arma_hot inline void operator() (const Base< T, T1>& X); template arma_hot inline void operator() (const Base, T1>& X); inline void reset(); inline const Mat& mean() const; inline const Mat< T>& var (const uword norm_type = 0); inline Mat< T> stddev(const uword norm_type = 0) const; inline const Mat& cov (const uword norm_type = 0); inline const Mat& min() const; inline const Mat& max() const; inline T count() const; // // private: const bool calc_cov; arma_aligned arma_counter counter; arma_aligned Mat r_mean; arma_aligned Mat< T> r_var; arma_aligned Mat r_cov; arma_aligned Mat min_val; arma_aligned Mat max_val; arma_aligned Mat< T> min_val_norm; arma_aligned Mat< T> max_val_norm; arma_aligned Mat< T> r_var_dummy; arma_aligned Mat r_cov_dummy; arma_aligned Mat tmp1; arma_aligned Mat tmp2; friend class running_stat_vec_aux; }; class running_stat_vec_aux { public: template inline static void update_stats ( running_stat_vec& x, const Mat::eT>& sample, const typename arma_not_cx::eT>::result* junk = 0 ); template inline static void update_stats ( running_stat_vec& x, const Mat::T > >& sample, const typename arma_not_cx::eT>::result* junk = 0 ); template inline static void update_stats ( running_stat_vec& x, const Mat< typename running_stat_vec::T >& sample, const typename arma_cx_only::eT>::result* junk = 0 ); template inline static void update_stats ( running_stat_vec& x, const Mat::eT>& sample, const typename arma_cx_only::eT>::result* junk = 0 ); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/running_stat_vec_meat.hpp ================================================ // Copyright (C) 2009-2013 Conrad Sanderson // Copyright (C) 2009-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup running_stat_vec //! @{ template inline running_stat_vec::~running_stat_vec() { arma_extra_debug_sigprint_this(this); } template inline running_stat_vec::running_stat_vec(const bool in_calc_cov) : calc_cov(in_calc_cov) { arma_extra_debug_sigprint_this(this); } template inline running_stat_vec::running_stat_vec(const running_stat_vec& in_rsv) : calc_cov (in_rsv.calc_cov) , counter (in_rsv.counter) , r_mean (in_rsv.r_mean) , r_var (in_rsv.r_var) , r_cov (in_rsv.r_cov) , min_val (in_rsv.min_val) , max_val (in_rsv.max_val) , min_val_norm(in_rsv.min_val_norm) , max_val_norm(in_rsv.max_val_norm) { arma_extra_debug_sigprint_this(this); } template inline const running_stat_vec& running_stat_vec::operator=(const running_stat_vec& in_rsv) { arma_extra_debug_sigprint(); access::rw(calc_cov) = in_rsv.calc_cov; counter = in_rsv.counter; r_mean = in_rsv.r_mean; r_var = in_rsv.r_var; r_cov = in_rsv.r_cov; min_val = in_rsv.min_val; max_val = in_rsv.max_val; min_val_norm = in_rsv.min_val_norm; max_val_norm = in_rsv.max_val_norm; return *this; } //! update statistics to reflect new sample template template arma_hot inline void running_stat_vec::operator() (const Base::T, T1>& X) { arma_extra_debug_sigprint(); const quasi_unwrap tmp(X.get_ref()); const Mat& sample = tmp.M; if( sample.is_empty() ) { return; } if( sample.is_finite() == false ) { arma_warn(true, "running_stat_vec: sample ignored as it has non-finite elements"); return; } running_stat_vec_aux::update_stats(*this, sample); } template template arma_hot inline void running_stat_vec::operator() (const Base< std::complex::T>, T1>& X) { arma_extra_debug_sigprint(); const quasi_unwrap tmp(X.get_ref()); const Mat< std::complex >& sample = tmp.M; if( sample.is_empty() ) { return; } if( sample.is_finite() == false ) { arma_warn(true, "running_stat_vec: sample ignored as it has non-finite elements"); return; } running_stat_vec_aux::update_stats(*this, sample); } //! set all statistics to zero template inline void running_stat_vec::reset() { arma_extra_debug_sigprint(); counter.reset(); r_mean.reset(); r_var.reset(); r_cov.reset(); min_val.reset(); max_val.reset(); min_val_norm.reset(); max_val_norm.reset(); r_var_dummy.reset(); r_cov_dummy.reset(); tmp1.reset(); tmp2.reset(); } //! mean or average value template inline const Mat< typename running_stat_vec::eT >& running_stat_vec::mean() const { arma_extra_debug_sigprint(); return r_mean; } //! variance template inline const Mat< typename running_stat_vec::T >& running_stat_vec::var(const uword norm_type) { arma_extra_debug_sigprint(); const T N = counter.value(); if(N > T(1)) { if(norm_type == 0) { return r_var; } else { const T N_minus_1 = counter.value_minus_1(); r_var_dummy = (N_minus_1/N) * r_var; return r_var_dummy; } } else { r_var_dummy.zeros(r_mean.n_rows, r_mean.n_cols); return r_var_dummy; } } //! standard deviation template inline Mat< typename running_stat_vec::T > running_stat_vec::stddev(const uword norm_type) const { arma_extra_debug_sigprint(); const T N = counter.value(); if(N > T(1)) { if(norm_type == 0) { return sqrt(r_var); } else { const T N_minus_1 = counter.value_minus_1(); return sqrt( (N_minus_1/N) * r_var ); } } else { return Mat(); } } //! covariance template inline const Mat< typename running_stat_vec::eT >& running_stat_vec::cov(const uword norm_type) { arma_extra_debug_sigprint(); if(calc_cov == true) { const T N = counter.value(); if(N > T(1)) { if(norm_type == 0) { return r_cov; } else { const T N_minus_1 = counter.value_minus_1(); r_cov_dummy = (N_minus_1/N) * r_cov; return r_cov_dummy; } } else { r_cov_dummy.zeros(r_mean.n_rows, r_mean.n_cols); return r_cov_dummy; } } else { r_cov_dummy.reset(); return r_cov_dummy; } } //! vector with minimum values template inline const Mat< typename running_stat_vec::eT >& running_stat_vec::min() const { arma_extra_debug_sigprint(); return min_val; } //! vector with maximum values template inline const Mat< typename running_stat_vec::eT >& running_stat_vec::max() const { arma_extra_debug_sigprint(); return max_val; } //! number of samples so far template inline typename running_stat_vec::T running_stat_vec::count() const { arma_extra_debug_sigprint(); return counter.value(); } // //! update statistics to reflect new sample (version for non-complex numbers) template inline void running_stat_vec_aux::update_stats ( running_stat_vec& x, const Mat::eT>& sample, const typename arma_not_cx::eT>::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename running_stat_vec::eT eT; typedef typename running_stat_vec::T T; const T N = x.counter.value(); if(N > T(0)) { arma_debug_assert_same_size(x.r_mean, sample, "running_stat_vec(): dimensionality mismatch"); const uword n_elem = sample.n_elem; const eT* sample_mem = sample.memptr(); eT* r_mean_mem = x.r_mean.memptr(); T* r_var_mem = x.r_var.memptr(); eT* min_val_mem = x.min_val.memptr(); eT* max_val_mem = x.max_val.memptr(); const T N_plus_1 = x.counter.value_plus_1(); const T N_minus_1 = x.counter.value_minus_1(); if(x.calc_cov == true) { Mat& tmp1 = x.tmp1; Mat& tmp2 = x.tmp2; tmp1 = sample - x.r_mean; if(sample.n_cols == 1) { tmp2 = tmp1*trans(tmp1); } else { tmp2 = trans(tmp1)*tmp1; } x.r_cov *= (N_minus_1/N); x.r_cov += tmp2 / N_plus_1; } for(uword i=0; i max_val_mem[i]) { max_val_mem[i] = val; } const eT r_mean_val = r_mean_mem[i]; const eT tmp = val - r_mean_val; r_var_mem[i] = N_minus_1/N * r_var_mem[i] + (tmp*tmp)/N_plus_1; r_mean_mem[i] = r_mean_val + (val - r_mean_val)/N_plus_1; } } else { arma_debug_check( (sample.is_vec() == false), "running_stat_vec(): given sample is not a vector"); x.r_mean.set_size(sample.n_rows, sample.n_cols); x.r_var.zeros(sample.n_rows, sample.n_cols); if(x.calc_cov == true) { x.r_cov.zeros(sample.n_elem, sample.n_elem); } x.min_val.set_size(sample.n_rows, sample.n_cols); x.max_val.set_size(sample.n_rows, sample.n_cols); const uword n_elem = sample.n_elem; const eT* sample_mem = sample.memptr(); eT* r_mean_mem = x.r_mean.memptr(); eT* min_val_mem = x.min_val.memptr(); eT* max_val_mem = x.max_val.memptr(); for(uword i=0; i inline void running_stat_vec_aux::update_stats ( running_stat_vec& x, const Mat::T > >& sample, const typename arma_not_cx::eT>::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename running_stat_vec::eT eT; running_stat_vec_aux::update_stats(x, conv_to< Mat >::from(sample)); } //! update statistics to reflect new sample (version for complex numbers, non-complex sample) template inline void running_stat_vec_aux::update_stats ( running_stat_vec& x, const Mat::T >& sample, const typename arma_cx_only::eT>::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename running_stat_vec::eT eT; running_stat_vec_aux::update_stats(x, conv_to< Mat >::from(sample)); } //! alter statistics to reflect new sample (version for complex numbers, complex sample) template inline void running_stat_vec_aux::update_stats ( running_stat_vec& x, const Mat::eT>& sample, const typename arma_cx_only::eT>::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename running_stat_vec::eT eT; typedef typename running_stat_vec::T T; const T N = x.counter.value(); if(N > T(0)) { arma_debug_assert_same_size(x.r_mean, sample, "running_stat_vec(): dimensionality mismatch"); const uword n_elem = sample.n_elem; const eT* sample_mem = sample.memptr(); eT* r_mean_mem = x.r_mean.memptr(); T* r_var_mem = x.r_var.memptr(); eT* min_val_mem = x.min_val.memptr(); eT* max_val_mem = x.max_val.memptr(); T* min_val_norm_mem = x.min_val_norm.memptr(); T* max_val_norm_mem = x.max_val_norm.memptr(); const T N_plus_1 = x.counter.value_plus_1(); const T N_minus_1 = x.counter.value_minus_1(); if(x.calc_cov == true) { Mat& tmp1 = x.tmp1; Mat& tmp2 = x.tmp2; tmp1 = sample - x.r_mean; if(sample.n_cols == 1) { tmp2 = arma::conj(tmp1)*strans(tmp1); } else { tmp2 = trans(tmp1)*tmp1; //tmp2 = strans(conj(tmp1))*tmp1; } x.r_cov *= (N_minus_1/N); x.r_cov += tmp2 / N_plus_1; } for(uword i=0; i max_val_norm_mem[i]) { max_val_norm_mem[i] = val_norm; max_val_mem[i] = val; } const eT& r_mean_val = r_mean_mem[i]; r_var_mem[i] = N_minus_1/N * r_var_mem[i] + std::norm(val - r_mean_val)/N_plus_1; r_mean_mem[i] = r_mean_val + (val - r_mean_val)/N_plus_1; } } else { arma_debug_check( (sample.is_vec() == false), "running_stat_vec(): given sample is not a vector"); x.r_mean.set_size(sample.n_rows, sample.n_cols); x.r_var.zeros(sample.n_rows, sample.n_cols); if(x.calc_cov == true) { x.r_cov.zeros(sample.n_elem, sample.n_elem); } x.min_val.set_size(sample.n_rows, sample.n_cols); x.max_val.set_size(sample.n_rows, sample.n_cols); x.min_val_norm.set_size(sample.n_rows, sample.n_cols); x.max_val_norm.set_size(sample.n_rows, sample.n_cols); const uword n_elem = sample.n_elem; const eT* sample_mem = sample.memptr(); eT* r_mean_mem = x.r_mean.memptr(); eT* min_val_mem = x.min_val.memptr(); eT* max_val_mem = x.max_val.memptr(); T* min_val_norm_mem = x.min_val_norm.memptr(); T* max_val_norm_mem = x.max_val_norm.memptr(); for(uword i=0; i inline static bool eigs_sym(Col& eigval, Mat& eigvec, const SpBase& X, const uword n_eigvals, const char* form_str, const eT default_tol); // // eigs_gen() via ARPACK template inline static bool eigs_gen(Col< std::complex >& eigval, Mat< std::complex >& eigvec, const SpBase& X, const uword n_eigvals, const char* form_str, const T default_tol); template inline static bool eigs_gen(Col< std::complex >& eigval, Mat< std::complex >& eigvec, const SpBase< std::complex, T1>& X, const uword n_eigvals, const char* form_str, const T default_tol); // // spsolve() via SuperLU template inline static bool spsolve(Mat& out, const SpBase& A, const Base& B, const superlu_opts& user_opts); #if defined(ARMA_USE_SUPERLU) template inline static bool convert_to_supermatrix(superlu::SuperMatrix& out, const SpMat& A); template inline static bool convert_to_supermatrix(superlu::SuperMatrix& out, const Mat& A); inline static void destroy_supermatrix(superlu::SuperMatrix& out); #endif private: // calls arpack saupd()/naupd() because the code is so similar for each // all of the extra variables are later used by seupd()/neupd(), but those // functions are very different and we can't combine their code template inline static void run_aupd ( const uword n_eigvals, char* which, const SpProxy& p, const bool sym, blas_int& n, eT& tol, podarray& resid, blas_int& ncv, podarray& v, blas_int& ldv, podarray& iparam, podarray& ipntr, podarray& workd, podarray& workl, blas_int& lworkl, podarray& rwork, blas_int& info ); }; ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/sp_auxlib_meat.hpp ================================================ // Copyright (C) 2013-2015 Ryan Curtin // Copyright (C) 2013-2015 Conrad Sanderson // Copyright (C) 2013-2015 NICTA // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup sp_auxlib //! @{ inline sp_auxlib::form_type sp_auxlib::interpret_form_str(const char* form_str) { arma_extra_debug_sigprint(); // the order of the 3 if statements below is important if( form_str == NULL ) { return form_none; } if( form_str[0] == char(0) ) { return form_none; } if( form_str[1] == char(0) ) { return form_none; } const char c1 = form_str[0]; const char c2 = form_str[1]; if(c1 == 'l') { if(c2 == 'm') { return form_lm; } if(c2 == 'r') { return form_lr; } if(c2 == 'i') { return form_li; } if(c2 == 'a') { return form_la; } } else if(c1 == 's') { if(c2 == 'm') { return form_sm; } if(c2 == 'r') { return form_sr; } if(c2 == 'i') { return form_si; } if(c2 == 'a') { return form_sa; } } return form_none; } //! immediate eigendecomposition of symmetric real sparse object template inline bool sp_auxlib::eigs_sym(Col& eigval, Mat& eigvec, const SpBase& X, const uword n_eigvals, const char* form_str, const eT default_tol) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_ARPACK) { const form_type form_val = sp_auxlib::interpret_form_str(form_str); arma_debug_check( (form_val != form_lm) && (form_val != form_sm) && (form_val != form_la) && (form_val != form_sa), "eigs_sym(): unknown form specified" ); char which_sm[3] = "SM"; char which_lm[3] = "LM"; char which_sa[3] = "SA"; char which_la[3] = "LA"; char* which; switch (form_val) { case form_sm: which = which_sm; break; case form_lm: which = which_lm; break; case form_sa: which = which_sa; break; case form_la: which = which_la; break; default: which = which_lm; break; } // Make a sparse proxy object. SpProxy p(X.get_ref()); // Make sure it's square. arma_debug_check( (p.get_n_rows() != p.get_n_cols()), "eigs_sym(): given sparse matrix is not square"); // Make sure we aren't asking for every eigenvalue. arma_debug_check( (n_eigvals + 1 >= p.get_n_rows()), "eigs_sym(): n_eigvals + 1 must be less than the number of rows in the matrix"); // If the matrix is empty, the case is trivial. if(p.get_n_cols() == 0) // We already know n_cols == n_rows. { eigval.reset(); eigvec.reset(); return true; } // Set up variables that get used for neupd(). blas_int n, ncv, ldv, lworkl, info; eT tol = default_tol; podarray resid, v, workd, workl; podarray iparam, ipntr; podarray rwork; // Not used in this case. run_aupd(n_eigvals, which, p, true /* sym, not gen */, n, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, rwork, info); if(info != 0) { return false; } // The process has converged, and now we need to recover the actual eigenvectors using seupd() blas_int rvec = 1; // .TRUE blas_int nev = n_eigvals; char howmny = 'A'; char bmat = 'I'; // We are considering the standard eigenvalue problem. podarray select(ncv); // Logical array of dimension NCV. blas_int ldz = n; // seupd() will output directly into the eigval and eigvec objects. eigval.set_size(n_eigvals); eigvec.set_size(n, n_eigvals); arpack::seupd(&rvec, &howmny, select.memptr(), eigval.memptr(), eigvec.memptr(), &ldz, (eT*) NULL, &bmat, &n, which, &nev, &tol, resid.memptr(), &ncv, v.memptr(), &ldv, iparam.memptr(), ipntr.memptr(), workd.memptr(), workl.memptr(), &lworkl, &info); // Check for errors. if(info != 0) { std::stringstream tmp; tmp << "eigs_sym(): ARPACK error " << info << " in seupd()"; arma_debug_warn(true, tmp.str()); return false; } return (info == 0); } #else { arma_ignore(eigval); arma_ignore(eigvec); arma_ignore(X); arma_ignore(n_eigvals); arma_ignore(form_str); arma_ignore(default_tol); arma_stop("eigs_sym(): use of ARPACK needs to be enabled"); return false; } #endif } //! immediate eigendecomposition of non-symmetric real sparse object template inline bool sp_auxlib::eigs_gen(Col< std::complex >& eigval, Mat< std::complex >& eigvec, const SpBase& X, const uword n_eigvals, const char* form_str, const T default_tol) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_ARPACK) { const form_type form_val = sp_auxlib::interpret_form_str(form_str); arma_debug_check( (form_val == form_none), "eigs_gen(): unknown form specified" ); char which_lm[3] = "LM"; char which_sm[3] = "SM"; char which_lr[3] = "LR"; char which_sr[3] = "SR"; char which_li[3] = "LI"; char which_si[3] = "SI"; char* which; switch(form_val) { case form_lm: which = which_lm; break; case form_sm: which = which_sm; break; case form_lr: which = which_lr; break; case form_sr: which = which_sr; break; case form_li: which = which_li; break; case form_si: which = which_si; break; default: which = which_lm; } // Make a sparse proxy object. SpProxy p(X.get_ref()); // Make sure it's square. arma_debug_check( (p.get_n_rows() != p.get_n_cols()), "eigs_gen(): given sparse matrix is not square"); // Make sure we aren't asking for every eigenvalue. arma_debug_check( (n_eigvals + 1 >= p.get_n_rows()), "eigs_gen(): n_eigvals + 1 must be less than the number of rows in the matrix"); // If the matrix is empty, the case is trivial. if(p.get_n_cols() == 0) // We already know n_cols == n_rows. { eigval.reset(); eigvec.reset(); return true; } // Set up variables that get used for neupd(). blas_int n, ncv, ldv, lworkl, info; T tol = default_tol; podarray resid, v, workd, workl; podarray iparam, ipntr; podarray rwork; // Not used in the real case. run_aupd(n_eigvals, which, p, false /* gen, not sym */, n, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, rwork, info); if(info != 0) { return false; } // The process has converged, and now we need to recover the actual eigenvectors using neupd(). blas_int rvec = 1; // .TRUE blas_int nev = n_eigvals; char howmny = 'A'; char bmat = 'I'; // We are considering the standard eigenvalue problem. podarray select(ncv); // Logical array of dimension NCV. podarray dr(nev + 1); // Real array of dimension NEV + 1. podarray di(nev + 1); // Real array of dimension NEV + 1. podarray z(n * (nev + 1)); // Real N by NEV array if HOWMNY = 'A'. blas_int ldz = n; podarray workev(3 * ncv); arpack::neupd(&rvec, &howmny, select.memptr(), dr.memptr(), di.memptr(), z.memptr(), &ldz, (T*) NULL, (T*) NULL, workev.memptr(), &bmat, &n, which, &nev, &tol, resid.memptr(), &ncv, v.memptr(), &ldv, iparam.memptr(), ipntr.memptr(), workd.memptr(), workl.memptr(), &lworkl, rwork.memptr(), &info); // Check for errors. if(info != 0) { std::stringstream tmp; tmp << "eigs_gen(): ARPACK error " << info << " in neupd()"; arma_debug_warn(true, tmp.str()); return false; } // Put it into the outputs. eigval.set_size(n_eigvals); eigvec.set_size(n, n_eigvals); for (uword i = 0; i < n_eigvals; ++i) { eigval[i] = std::complex(dr[i], di[i]); } // Now recover the eigenvectors. for (uword i = 0; i < n_eigvals; ++i) { // ARPACK ?neupd lays things out kinda odd in memory; so does LAPACK // ?geev (see auxlib::eig_gen()). if((i < n_eigvals - 1) && (eigval[i] == std::conj(eigval[i + 1]))) { for (uword j = 0; j < n; ++j) { eigvec.at(j, i) = std::complex(z[n * i + j], z[n * (i + 1) + j]); eigvec.at(j, i + 1) = std::complex(z[n * i + j], -z[n * (i + 1) + j]); } ++i; // Skip the next one. } else if((i == n_eigvals - 1) && (std::complex(eigval[i]).imag() != 0.0)) { // We don't have the matched conjugate eigenvalue. for (uword j = 0; j < n; ++j) { eigvec.at(j, i) = std::complex(z[n * i + j], z[n * (i + 1) + j]); } } else { // The eigenvector is entirely real. for (uword j = 0; j < n; ++j) { eigvec.at(j, i) = std::complex(z[n * i + j], T(0)); } } } return (info == 0); } #else { arma_ignore(eigval); arma_ignore(eigvec); arma_ignore(X); arma_ignore(n_eigvals); arma_ignore(form_str); arma_ignore(default_tol); arma_stop("eigs_gen(): use of ARPACK needs to be enabled"); return false; } #endif } //! immediate eigendecomposition of non-symmetric complex sparse object template inline bool sp_auxlib::eigs_gen(Col< std::complex >& eigval, Mat< std::complex >& eigvec, const SpBase< std::complex, T1>& X, const uword n_eigvals, const char* form_str, const T default_tol) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_ARPACK) { const form_type form_val = sp_auxlib::interpret_form_str(form_str); arma_debug_check( (form_val == form_none), "eigs_gen(): unknown form specified" ); char which_lm[3] = "LM"; char which_sm[3] = "SM"; char which_lr[3] = "LR"; char which_sr[3] = "SR"; char which_li[3] = "LI"; char which_si[3] = "SI"; char* which; switch(form_val) { case form_lm: which = which_lm; break; case form_sm: which = which_sm; break; case form_lr: which = which_lr; break; case form_sr: which = which_sr; break; case form_li: which = which_li; break; case form_si: which = which_si; break; default: which = which_lm; } // Make a sparse proxy object. SpProxy p(X.get_ref()); // Make sure it's square. arma_debug_check( (p.get_n_rows() != p.get_n_cols()), "eigs_gen(): given sparse matrix is not square"); // Make sure we aren't asking for every eigenvalue. arma_debug_check( (n_eigvals + 1 >= p.get_n_rows()), "eigs_gen(): n_eigvals + 1 must be less than the number of rows in the matrix"); // If the matrix is empty, the case is trivial. if(p.get_n_cols() == 0) // We already know n_cols == n_rows. { eigval.reset(); eigvec.reset(); return true; } // Set up variables that get used for neupd(). blas_int n, ncv, ldv, lworkl, info; T tol = default_tol; podarray< std::complex > resid, v, workd, workl; podarray iparam, ipntr; podarray rwork; run_aupd(n_eigvals, which, p, false /* gen, not sym */, n, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, rwork, info); if(info != 0) { return false; } // The process has converged, and now we need to recover the actual eigenvectors using neupd(). blas_int rvec = 1; // .TRUE blas_int nev = n_eigvals; char howmny = 'A'; char bmat = 'I'; // We are considering the standard eigenvalue problem. podarray select(ncv); // Logical array of dimension NCV. podarray > d(nev + 1); // Real array of dimension NEV + 1. podarray > z(n * nev); // Real N by NEV array if HOWMNY = 'A'. blas_int ldz = n; podarray > workev(2 * ncv); // Prepare the outputs; neupd() will write directly to them. eigval.set_size(n_eigvals); eigvec.set_size(n, n_eigvals); std::complex sigma; arpack::neupd(&rvec, &howmny, select.memptr(), eigval.memptr(), (std::complex*) NULL, eigvec.memptr(), &ldz, (std::complex*) &sigma, (std::complex*) NULL, workev.memptr(), &bmat, &n, which, &nev, &tol, resid.memptr(), &ncv, v.memptr(), &ldv, iparam.memptr(), ipntr.memptr(), workd.memptr(), workl.memptr(), &lworkl, rwork.memptr(), &info); // Check for errors. if(info != 0) { std::stringstream tmp; tmp << "eigs_gen(): ARPACK error " << info << " in neupd()"; arma_debug_warn(true, tmp.str()); return false; } return (info == 0); } #else { arma_ignore(eigval); arma_ignore(eigvec); arma_ignore(X); arma_ignore(n_eigvals); arma_ignore(form_str); arma_ignore(default_tol); arma_stop("eigs_gen(): use of ARPACK needs to be enabled"); return false; } #endif } template inline bool sp_auxlib::spsolve(Mat& X, const SpBase& A_expr, const Base& B_expr, const superlu_opts& user_opts) { arma_extra_debug_sigprint(); #if defined(ARMA_USE_SUPERLU) { // The goal is to solve the system A*X = B for the matrix X. // The first thing we need to do is create SuperMatrix structures to call // the SuperLU functions with. SuperLU will overwrite the B matrix with // the output matrix, so we'll unwrap B into X temporarily. typedef typename T1::elem_type eT; const unwrap_spmat tmp1(A_expr.get_ref()); const SpMat& A = tmp1.M; X = B_expr.get_ref(); if(A.n_rows > A.n_cols) { arma_stop("spsolve(): solving over-determined systems currently not supported"); X.reset(); return false; } else if(A.n_rows < A.n_cols) { arma_stop("spsolve(): solving under-determined systems currently not supported"); X.reset(); return false; } arma_debug_check( (A.n_rows != X.n_rows), "spsolve(): number of rows in the given objects must be the same" ); if(A.is_empty() || X.is_empty()) { X.zeros(A.n_cols, X.n_cols); return true; } if(arma_config::debug) { bool overflow; overflow = (A.n_nonzero > INT_MAX); overflow = (A.n_rows > INT_MAX) || overflow; overflow = (A.n_cols > INT_MAX) || overflow; overflow = (X.n_rows > INT_MAX) || overflow; overflow = (X.n_cols > INT_MAX) || overflow; if(overflow) { arma_bad("spsolve(): integer overflow: matrix dimensions are too large for integer type used by SuperLU"); } } superlu::SuperMatrix x; arrayops::inplace_set(reinterpret_cast(&x), char(0), sizeof(superlu::SuperMatrix)); superlu::SuperMatrix a; arrayops::inplace_set(reinterpret_cast(&a), char(0), sizeof(superlu::SuperMatrix)); const bool status_x = convert_to_supermatrix(x, X); const bool status_a = convert_to_supermatrix(a, A); if( (status_x == false) || (status_a == false) ) { destroy_supermatrix(a); destroy_supermatrix(x); X.reset(); return false; } superlu::SuperMatrix l; arrayops::inplace_set(reinterpret_cast(&l), char(0), sizeof(superlu::SuperMatrix)); superlu::SuperMatrix u; arrayops::inplace_set(reinterpret_cast(&u), char(0), sizeof(superlu::SuperMatrix)); // Use default options. superlu::superlu_options_t options; superlu::set_default_opts(&options); // process user_opts if(user_opts.equilibrate == true) { options.Equil = superlu::YES; } if(user_opts.equilibrate == false) { options.Equil = superlu::NO; } if(user_opts.symmetric == true) { options.SymmetricMode = superlu::YES; } if(user_opts.symmetric == false) { options.SymmetricMode = superlu::NO; } options.DiagPivotThresh = user_opts.pivot_thresh; if(user_opts.permutation == superlu_opts::NATURAL) { options.ColPerm = superlu::NATURAL; } if(user_opts.permutation == superlu_opts::MMD_ATA) { options.ColPerm = superlu::MMD_ATA; } if(user_opts.permutation == superlu_opts::MMD_AT_PLUS_A) { options.ColPerm = superlu::MMD_AT_PLUS_A; } if(user_opts.permutation == superlu_opts::COLAMD) { options.ColPerm = superlu::COLAMD; } if(user_opts.refine == superlu_opts::REF_NONE) { options.IterRefine = superlu::NOREFINE; } if(user_opts.refine == superlu_opts::REF_SINGLE) { options.IterRefine = superlu::SLU_SINGLE; } if(user_opts.refine == superlu_opts::REF_DOUBLE) { options.IterRefine = superlu::SLU_DOUBLE; } if(user_opts.refine == superlu_opts::REF_EXTRA) { options.IterRefine = superlu::SLU_EXTRA; } // paranoia: use SuperLU's memory allocation, in case it reallocs int* perm_c = (int*) superlu::malloc( (A.n_cols+1) * sizeof(int)); // extra paranoia: increase array length by 1 int* perm_r = (int*) superlu::malloc( (A.n_rows+1) * sizeof(int)); arrayops::inplace_set(perm_c, 0, A.n_cols+1); arrayops::inplace_set(perm_r, 0, A.n_rows+1); superlu::SuperLUStat_t stat; superlu::init_stat(&stat); int info = 0; // Return code. superlu::gssv(&options, &a, perm_c, perm_r, &l, &u, &x, &stat, &info); // Process the return code. if( (info > 0) && (info <= int(A.n_cols)) ) { std::stringstream tmp; tmp << "spsolve(): could not solve system; LU factorisation completed, but detected zero in U(" << (info-1) << ',' << (info-1) << ')'; arma_debug_warn(true, tmp.str()); } else if(info > int(A.n_cols)) { std::stringstream tmp; tmp << "spsolve(): memory allocation failure: could not allocate " << (info - int(A.n_cols)) << " bytes"; arma_debug_warn(true, tmp.str()); } else if(info < 0) { std::stringstream tmp; tmp << "spsolve(): unknown SuperLU error code from gssv(): " << info; arma_debug_warn(true, tmp.str()); } superlu::free_stat(&stat); superlu::free(perm_c); superlu::free(perm_r); // No need to extract the matrix, since it's still using the same memory. destroy_supermatrix(u); destroy_supermatrix(l); destroy_supermatrix(a); destroy_supermatrix(x); return (info == 0); } #else { arma_ignore(X); arma_ignore(A_expr); arma_ignore(B_expr); arma_stop("spsolve(): use of SuperLU needs to be enabled"); return false; } #endif } #if defined(ARMA_USE_SUPERLU) template inline bool sp_auxlib::convert_to_supermatrix(superlu::SuperMatrix& out, const SpMat& A) { arma_extra_debug_sigprint(); // We store in column-major CSC. out.Stype = superlu::SLU_NC; if(is_float::value) { out.Dtype = superlu::SLU_S; } else if(is_double::value) { out.Dtype = superlu::SLU_D; } else if(is_supported_complex_float::value) { out.Dtype = superlu::SLU_C; } else if(is_supported_complex_double::value) { out.Dtype = superlu::SLU_Z; } out.Mtype = superlu::SLU_GE; // Just a general matrix. We don't know more now. // We have to actually create the object which stores the data. // This gets cleaned by destroy_supermatrix(). // We have to use SuperLU's stupid memory allocation routines since they are // not guaranteed to be new and delete. See the comments in superlu_bones.hpp superlu::NCformat* nc = (superlu::NCformat*)superlu::malloc(sizeof(superlu::NCformat)); if(nc == NULL) { return false; } nc->nnz = A.n_nonzero; nc->nzval = (void*) superlu::malloc(sizeof(eT) * A.n_nonzero ); nc->colptr = (superlu::int_t*)superlu::malloc(sizeof(superlu::int_t) * (A.n_cols + 1)); nc->rowind = (superlu::int_t*)superlu::malloc(sizeof(superlu::int_t) * A.n_nonzero ); if( (nc->nzval == NULL) || (nc->colptr == NULL) || (nc->rowind == NULL) ) { return false; } // Fill the matrix. arrayops::copy((eT*) nc->nzval, A.values, A.n_nonzero); // // These have to be copied by hand, because the types may differ. // for (uword i = 0; i <= A.n_cols; ++i) { nc->colptr[i] = (int_t) A.col_ptrs[i]; } // for (uword i = 0; i < A.n_nonzero; ++i) { nc->rowind[i] = (int_t) A.row_indices[i]; } arrayops::convert(nc->colptr, A.col_ptrs, A.n_cols+1 ); arrayops::convert(nc->rowind, A.row_indices, A.n_nonzero); out.nrow = A.n_rows; out.ncol = A.n_cols; out.Store = (void*) nc; return true; } template inline bool sp_auxlib::convert_to_supermatrix(superlu::SuperMatrix& out, const Mat& A) { arma_extra_debug_sigprint(); // This is being stored as a dense matrix. out.Stype = superlu::SLU_DN; if(is_float::value) { out.Dtype = superlu::SLU_S; } else if(is_double::value) { out.Dtype = superlu::SLU_D; } else if(is_supported_complex_float::value) { out.Dtype = superlu::SLU_C; } else if(is_supported_complex_double::value) { out.Dtype = superlu::SLU_Z; } out.Mtype = superlu::SLU_GE; // We have to create the object that stores the data. superlu::DNformat* dn = (superlu::DNformat*)superlu::malloc(sizeof(superlu::DNformat)); if(dn == NULL) { return false; } dn->lda = A.n_rows; dn->nzval = (void*) A.memptr(); // re-use memory instead of copying out.nrow = A.n_rows; out.ncol = A.n_cols; out.Store = (void*) dn; return true; } inline void sp_auxlib::destroy_supermatrix(superlu::SuperMatrix& out) { arma_extra_debug_sigprint(); // Clean up. if(out.Stype == superlu::SLU_NC) { superlu::destroy_compcol_mat(&out); } else if(out.Stype == superlu::SLU_DN) { // superlu::destroy_dense_mat(&out); // since dn->nzval is set to re-use memory from a Mat object (which manages its own memory), // we cannot simply call superlu::destroy_dense_mat(). // Only the out.Store structure can be freed. superlu::DNformat* dn = (superlu::DNformat*) out.Store; if(dn != NULL) { superlu::free(dn); } } else if(out.Stype == superlu::SLU_SC) { superlu::destroy_supernode_mat(&out); } else { // Uh, crap. std::stringstream tmp; tmp << "sp_auxlib::destroy_supermatrix(): unhandled Stype" << std::endl; tmp << "Stype val: " << out.Stype << std::endl; tmp << "Stype name: "; if(out.Stype == superlu::SLU_NC) { tmp << "SLU_NC"; } if(out.Stype == superlu::SLU_NCP) { tmp << "SLU_NCP"; } if(out.Stype == superlu::SLU_NR) { tmp << "SLU_NR"; } if(out.Stype == superlu::SLU_SC) { tmp << "SLU_SC"; } if(out.Stype == superlu::SLU_SCP) { tmp << "SLU_SCP"; } if(out.Stype == superlu::SLU_SR) { tmp << "SLU_SR"; } if(out.Stype == superlu::SLU_DN) { tmp << "SLU_DN"; } if(out.Stype == superlu::SLU_NR_loc) { tmp << "SLU_NR_loc"; } arma_debug_warn(true, tmp.str()); arma_bad("sp_auxlib::destroy_supermatrix(): internal error"); } } #endif template inline void sp_auxlib::run_aupd ( const uword n_eigvals, char* which, const SpProxy& p, const bool sym, blas_int& n, eT& tol, podarray& resid, blas_int& ncv, podarray& v, blas_int& ldv, podarray& iparam, podarray& ipntr, podarray& workd, podarray& workl, blas_int& lworkl, podarray& rwork, blas_int& info ) { #if defined(ARMA_USE_ARPACK) { // ARPACK provides a "reverse communication interface" which is an // entertainingly archaic FORTRAN software engineering technique that // basically means that we call saupd()/naupd() and it tells us with some // return code what we need to do next (usually a matrix-vector product) and // then call it again. So this results in some type of iterative process // where we call saupd()/naupd() many times. blas_int ido = 0; // This must be 0 for the first call. char bmat = 'I'; // We are considering the standard eigenvalue problem. n = p.get_n_rows(); // The size of the matrix. blas_int nev = n_eigvals; resid.set_size(n); // "NCV must satisfy the two inequalities 2 <= NCV-NEV and NCV <= N". // "It is recommended that NCV >= 2 * NEV". ncv = 2 + nev; if (ncv < 2 * nev) { ncv = 2 * nev; } if (ncv > n) { ncv = n; } v.set_size(n * ncv); // Array N by NCV (output). rwork.set_size(ncv); // Work array of size NCV for complex calls. ldv = n; // "Leading dimension of V exactly as declared in the calling program." // IPARAM: integer array of length 11. iparam.zeros(11); iparam(0) = 1; // Exact shifts (not provided by us). iparam(2) = 1000; // Maximum iterations; all the examples use 300, but they were written in the ancient times. iparam(6) = 1; // Mode 1: A * x = lambda * x. // IPNTR: integer array of length 14 (output). ipntr.set_size(14); // Real work array used in the basic Arnoldi iteration for reverse communication. workd.set_size(3 * n); // lworkl must be at least 3 * NCV^2 + 6 * NCV. lworkl = 3 * (ncv * ncv) + 6 * ncv; // Real work array of length lworkl. workl.set_size(lworkl); info = 0; // Set to 0 initially to use random initial vector. // All the parameters have been set or created. Time to loop a lot. while (ido != 99) { // Call saupd() or naupd() with the current parameters. if(sym) arpack::saupd(&ido, &bmat, &n, which, &nev, &tol, resid.memptr(), &ncv, v.memptr(), &ldv, iparam.memptr(), ipntr.memptr(), workd.memptr(), workl.memptr(), &lworkl, &info); else arpack::naupd(&ido, &bmat, &n, which, &nev, &tol, resid.memptr(), &ncv, v.memptr(), &ldv, iparam.memptr(), ipntr.memptr(), workd.memptr(), workl.memptr(), &lworkl, rwork.memptr(), &info); // What do we do now? switch (ido) { case -1: case 1: { // We need to calculate the matrix-vector multiplication y = OP * x // where x is of length n and starts at workd(ipntr(0)), and y is of // length n and starts at workd(ipntr(1)). // operator*(sp_mat, vec) doesn't properly put the result into the // right place so we'll just reimplement it here for now... // Set the output to point at the right memory. We have to subtract // one from FORTRAN pointers... Col out(workd.memptr() + ipntr(1) - 1, n, false /* don't copy */); // Set the input to point at the right memory. Col in(workd.memptr() + ipntr(0) - 1, n, false /* don't copy */); out.zeros(); typename SpProxy::const_iterator_type x_it = p.begin(); typename SpProxy::const_iterator_type x_it_end = p.end(); while(x_it != x_it_end) { out[x_it.row()] += (*x_it) * in[x_it.col()]; ++x_it; } // No need to modify memory further since it was all done in-place. break; } case 99: // Nothing to do here, things have converged. break; default: { return; // Parent frame can look at the value of info. } } } // The process has ended; check the return code. if( (info != 0) && (info != 1) ) { // Print warnings if there was a failure. std::stringstream tmp; if(sym) { tmp << "eigs_sym(): ARPACK error " << info << " in saupd()"; } else { tmp << "eigs_gen(): ARPACK error " << info << " in naupd()"; } arma_debug_warn(true, tmp.str()); return; // Parent frame can look at the value of info. } } #else arma_ignore(n_eigvals); arma_ignore(which); arma_ignore(p); arma_ignore(sym); arma_ignore(n); arma_ignore(tol); arma_ignore(resid); arma_ignore(ncv); arma_ignore(v); arma_ignore(ldv); arma_ignore(iparam); arma_ignore(ipntr); arma_ignore(workd); arma_ignore(workl); arma_ignore(lworkl); arma_ignore(rwork); arma_ignore(info); #endif } ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/span.hpp ================================================ // Copyright (C) 2010-2012 Conrad Sanderson // Copyright (C) 2010-2012 NICTA (www.nicta.com.au) // Copyright (C) 2011 Stanislav Funiak // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup span //! @{ struct span_alt {}; template class span_base { public: static const span_alt all; }; template const span_alt span_base::all = span_alt(); class span : public span_base<> { public: uword a; uword b; bool whole; inline span() : whole(true) { } inline span(const span_alt&) : whole(true) { } // TODO: // if the "explicit" keyword is removed or commented out, // the compiler will be able to automatically convert integers to an instance of the span class. // this is useful for Cube::operator()(span&, span&, span&), // but it might have unintended consequences or interactions elsewhere. // as such, removal of "explicit" needs thorough testing. inline explicit span(const uword in_a) : a(in_a) , b(in_a) , whole(false) { } // the "explicit" keyword is required here to prevent a C++11 compiler // automatically converting {a,b} into an instance of span() when submatrices are specified inline explicit span(const uword in_a, const uword in_b) : a(in_a) , b(in_b) , whole(false) { } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spdiagview_bones.hpp ================================================ // Copyright (C) 2015 Conrad Sanderson // Copyright (C) 2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spdiagview //! @{ //! Class for storing data required to extract and set the diagonals of a sparse matrix template class spdiagview : public Base > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; arma_aligned const SpMat& m; static const bool is_row = false; static const bool is_col = true; const uword row_offset; const uword col_offset; const uword n_rows; // equal to n_elem const uword n_elem; static const uword n_cols = 1; protected: arma_inline spdiagview(const SpMat& in_m, const uword in_row_offset, const uword in_col_offset, const uword len); public: inline ~spdiagview(); inline void operator=(const spdiagview& x); inline void operator+=(const eT val); inline void operator-=(const eT val); inline void operator*=(const eT val); inline void operator/=(const eT val); template inline void operator= (const Base& x); template inline void operator+=(const Base& x); template inline void operator-=(const Base& x); template inline void operator%=(const Base& x); template inline void operator/=(const Base& x); template inline void operator= (const SpBase& x); template inline void operator+=(const SpBase& x); template inline void operator-=(const SpBase& x); template inline void operator%=(const SpBase& x); template inline void operator/=(const SpBase& x); inline eT at_alt (const uword ii) const; inline SpValProxy< SpMat > operator[](const uword ii); inline eT operator[](const uword ii) const; inline SpValProxy< SpMat > at(const uword ii); inline eT at(const uword ii) const; inline SpValProxy< SpMat > operator()(const uword ii); inline eT operator()(const uword ii) const; inline SpValProxy< SpMat > at(const uword in_n_row, const uword); inline eT at(const uword in_n_row, const uword) const; inline SpValProxy< SpMat > operator()(const uword in_n_row, const uword in_n_col); inline eT operator()(const uword in_n_row, const uword in_n_col) const; inline void fill(const eT val); inline void zeros(); inline void ones(); inline void randu(); inline void randn(); inline static void extract(Mat& out, const spdiagview& in); private: friend class SpMat; spdiagview(); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spdiagview_meat.hpp ================================================ // Copyright (C) 2015 Conrad Sanderson // Copyright (C) 2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spdiagview //! @{ template inline spdiagview::~spdiagview() { arma_extra_debug_sigprint(); } template arma_inline spdiagview::spdiagview(const SpMat& in_m, const uword in_row_offset, const uword in_col_offset, const uword in_len) : m(in_m) , row_offset(in_row_offset) , col_offset(in_col_offset) , n_rows(in_len) , n_elem(in_len) { arma_extra_debug_sigprint(); } //! set a diagonal of our matrix using a diagonal from a foreign matrix template inline void spdiagview::operator= (const spdiagview& x) { arma_extra_debug_sigprint(); spdiagview& d = *this; arma_debug_check( (d.n_elem != x.n_elem), "spdiagview: diagonals have incompatible lengths"); SpMat& d_m = const_cast< SpMat& >(d.m); const SpMat& x_m = x.m; if(&d_m != &x_m) { const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const uword x_row_offset = x.row_offset; const uword x_col_offset = x.col_offset; for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) = x_m.at(i + x_row_offset, i + x_col_offset); } } else { const Mat tmp = x; (*this).operator=(tmp); } } template inline void spdiagview::operator+=(const eT val) { arma_extra_debug_sigprint(); SpMat& t_m = const_cast< SpMat& >(m); const uword t_n_elem = n_elem; const uword t_row_offset = row_offset; const uword t_col_offset = col_offset; for(uword i=0; i < t_n_elem; ++i) { t_m.at(i + t_row_offset, i + t_col_offset) += val; } } template inline void spdiagview::operator-=(const eT val) { arma_extra_debug_sigprint(); SpMat& t_m = const_cast< SpMat& >(m); const uword t_n_elem = n_elem; const uword t_row_offset = row_offset; const uword t_col_offset = col_offset; for(uword i=0; i < t_n_elem; ++i) { t_m.at(i + t_row_offset, i + t_col_offset) -= val; } } template inline void spdiagview::operator*=(const eT val) { arma_extra_debug_sigprint(); SpMat& t_m = const_cast< SpMat& >(m); const uword t_n_elem = n_elem; const uword t_row_offset = row_offset; const uword t_col_offset = col_offset; for(uword i=0; i < t_n_elem; ++i) { t_m.at(i + t_row_offset, i + t_col_offset) *= val; } } template inline void spdiagview::operator/=(const eT val) { arma_extra_debug_sigprint(); SpMat& t_m = const_cast< SpMat& >(m); const uword t_n_elem = n_elem; const uword t_row_offset = row_offset; const uword t_col_offset = col_offset; for(uword i=0; i < t_n_elem; ++i) { t_m.at(i + t_row_offset, i + t_col_offset) /= val; } } //! set a diagonal of our matrix using data from a foreign object template template inline void spdiagview::operator= (const Base& o) { arma_extra_debug_sigprint(); spdiagview& d = *this; SpMat& d_m = const_cast< SpMat& >(d.m); const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const Proxy P( o.get_ref() ); arma_debug_check ( ( (d_n_elem != P.get_n_elem()) || ((P.get_n_rows() != 1) && (P.get_n_cols() != 1)) ), "spdiagview: given object has incompatible size" ); if( (is_Mat::stored_type>::value) || (Proxy::prefer_at_accessor) ) { const unwrap::stored_type> tmp(P.Q); const Mat& x = tmp.M; const eT* x_mem = x.memptr(); for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) = x_mem[i]; } } else { typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) = Pea[i]; } } } template template inline void spdiagview::operator+=(const Base& o) { arma_extra_debug_sigprint(); spdiagview& d = *this; SpMat& d_m = const_cast< SpMat& >(d.m); const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const Proxy P( o.get_ref() ); arma_debug_check ( ( (d_n_elem != P.get_n_elem()) || ((P.get_n_rows() != 1) && (P.get_n_cols() != 1)) ), "spdiagview: given object has incompatible size" ); if( (is_Mat::stored_type>::value) || (Proxy::prefer_at_accessor) ) { const unwrap::stored_type> tmp(P.Q); const Mat& x = tmp.M; const eT* x_mem = x.memptr(); for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) += x_mem[i]; } } else { typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) += Pea[i]; } } } template template inline void spdiagview::operator-=(const Base& o) { arma_extra_debug_sigprint(); spdiagview& d = *this; SpMat& d_m = const_cast< SpMat& >(d.m); const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const Proxy P( o.get_ref() ); arma_debug_check ( ( (d_n_elem != P.get_n_elem()) || ((P.get_n_rows() != 1) && (P.get_n_cols() != 1)) ), "spdiagview: given object has incompatible size" ); if( (is_Mat::stored_type>::value) || (Proxy::prefer_at_accessor) ) { const unwrap::stored_type> tmp(P.Q); const Mat& x = tmp.M; const eT* x_mem = x.memptr(); for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) -= x_mem[i]; } } else { typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) -= Pea[i]; } } } template template inline void spdiagview::operator%=(const Base& o) { arma_extra_debug_sigprint(); spdiagview& d = *this; SpMat& d_m = const_cast< SpMat& >(d.m); const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const Proxy P( o.get_ref() ); arma_debug_check ( ( (d_n_elem != P.get_n_elem()) || ((P.get_n_rows() != 1) && (P.get_n_cols() != 1)) ), "spdiagview: given object has incompatible size" ); if( (is_Mat::stored_type>::value) || (Proxy::prefer_at_accessor) ) { const unwrap::stored_type> tmp(P.Q); const Mat& x = tmp.M; const eT* x_mem = x.memptr(); for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) *= x_mem[i]; } } else { typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) *= Pea[i]; } } } template template inline void spdiagview::operator/=(const Base& o) { arma_extra_debug_sigprint(); spdiagview& d = *this; SpMat& d_m = const_cast< SpMat& >(d.m); const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const Proxy P( o.get_ref() ); arma_debug_check ( ( (d_n_elem != P.get_n_elem()) || ((P.get_n_rows() != 1) && (P.get_n_cols() != 1)) ), "spdiagview: given object has incompatible size" ); if( (is_Mat::stored_type>::value) || (Proxy::prefer_at_accessor) ) { const unwrap::stored_type> tmp(P.Q); const Mat& x = tmp.M; const eT* x_mem = x.memptr(); for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) /= x_mem[i]; } } else { typename Proxy::ea_type Pea = P.get_ea(); for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) /= Pea[i]; } } } //! set a diagonal of our matrix using data from a foreign object template template inline void spdiagview::operator= (const SpBase& o) { arma_extra_debug_sigprint(); spdiagview& d = *this; SpMat& d_m = const_cast< SpMat& >(d.m); const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const SpProxy P( o.get_ref() ); arma_debug_check ( ( (d_n_elem != P.get_n_elem()) || ((P.get_n_rows() != 1) && (P.get_n_cols() != 1)) ), "spdiagview: given object has incompatible size" ); if( SpProxy::must_use_iterator || P.is_alias(d_m) ) { const SpMat tmp(P.Q); if(tmp.n_cols == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) = tmp.at(i,0); } } else if(tmp.n_rows == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) = tmp.at(0,i); } } } else { if(P.get_n_cols() == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) = P.at(i,0); } } else if(P.get_n_rows() == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) = P.at(0,i); } } } } template template inline void spdiagview::operator+=(const SpBase& o) { arma_extra_debug_sigprint(); spdiagview& d = *this; SpMat& d_m = const_cast< SpMat& >(d.m); const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const SpProxy P( o.get_ref() ); arma_debug_check ( ( (d_n_elem != P.get_n_elem()) || ((P.get_n_rows() != 1) && (P.get_n_cols() != 1)) ), "spdiagview: given object has incompatible size" ); if( SpProxy::must_use_iterator || P.is_alias(d_m) ) { const SpMat tmp(P.Q); if(tmp.n_cols == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) += tmp.at(i,0); } } else if(tmp.n_rows == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) += tmp.at(0,i); } } } else { if(P.get_n_cols() == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) += P.at(i,0); } } else if(P.get_n_rows() == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) += P.at(0,i); } } } } template template inline void spdiagview::operator-=(const SpBase& o) { arma_extra_debug_sigprint(); spdiagview& d = *this; SpMat& d_m = const_cast< SpMat& >(d.m); const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const SpProxy P( o.get_ref() ); arma_debug_check ( ( (d_n_elem != P.get_n_elem()) || ((P.get_n_rows() != 1) && (P.get_n_cols() != 1)) ), "spdiagview: given object has incompatible size" ); if( SpProxy::must_use_iterator || P.is_alias(d_m) ) { const SpMat tmp(P.Q); if(tmp.n_cols == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) -= tmp.at(i,0); } } else if(tmp.n_rows == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) -= tmp.at(0,i); } } } else { if(P.get_n_cols() == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) -= P.at(i,0); } } else if(P.get_n_rows() == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) -= P.at(0,i); } } } } template template inline void spdiagview::operator%=(const SpBase& o) { arma_extra_debug_sigprint(); spdiagview& d = *this; SpMat& d_m = const_cast< SpMat& >(d.m); const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const SpProxy P( o.get_ref() ); arma_debug_check ( ( (d_n_elem != P.get_n_elem()) || ((P.get_n_rows() != 1) && (P.get_n_cols() != 1)) ), "spdiagview: given object has incompatible size" ); if( SpProxy::must_use_iterator || P.is_alias(d_m) ) { const SpMat tmp(P.Q); if(tmp.n_cols == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) *= tmp.at(i,0); } } else if(tmp.n_rows == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) *= tmp.at(0,i); } } } else { if(P.get_n_cols() == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) *= P.at(i,0); } } else if(P.get_n_rows() == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) *= P.at(0,i); } } } } template template inline void spdiagview::operator/=(const SpBase& o) { arma_extra_debug_sigprint(); spdiagview& d = *this; SpMat& d_m = const_cast< SpMat& >(d.m); const uword d_n_elem = d.n_elem; const uword d_row_offset = d.row_offset; const uword d_col_offset = d.col_offset; const SpProxy P( o.get_ref() ); arma_debug_check ( ( (d_n_elem != P.get_n_elem()) || ((P.get_n_rows() != 1) && (P.get_n_cols() != 1)) ), "spdiagview: given object has incompatible size" ); if( SpProxy::must_use_iterator || P.is_alias(d_m) ) { const SpMat tmp(P.Q); if(tmp.n_cols == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) /= tmp.at(i,0); } } else if(tmp.n_rows == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) /= tmp.at(0,i); } } } else { if(P.get_n_cols() == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) /= P.at(i,0); } } else if(P.get_n_rows() == 1) { for(uword i=0; i < d_n_elem; ++i) { d_m.at(i + d_row_offset, i + d_col_offset) /= P.at(0,i); } } } } //! extract a diagonal and store it as a dense column vector template inline void spdiagview::extract(Mat& out, const spdiagview& in) { arma_extra_debug_sigprint(); // NOTE: we're assuming that the 'out' matrix has already been set to the correct size; // size setting is done by either the Mat contructor or Mat::operator=() const SpMat& in_m = in.m; const uword in_n_elem = in.n_elem; const uword in_row_offset = in.row_offset; const uword in_col_offset = in.col_offset; eT* out_mem = out.memptr(); for(uword i=0; i < in_n_elem; ++i) { out_mem[i] = in_m.at(i + in_row_offset, i + in_col_offset ); } } template inline eT spdiagview::at_alt(const uword i) const { return m.at(i+row_offset, i+col_offset); } template inline SpValProxy< SpMat > spdiagview::operator[](const uword i) { return (const_cast< SpMat& >(m)).at(i+row_offset, i+col_offset); } template inline eT spdiagview::operator[](const uword i) const { return m.at(i+row_offset, i+col_offset); } template inline SpValProxy< SpMat > spdiagview::at(const uword i) { return (const_cast< SpMat& >(m)).at(i+row_offset, i+col_offset); } template inline eT spdiagview::at(const uword i) const { return m.at(i+row_offset, i+col_offset); } template inline SpValProxy< SpMat > spdiagview::operator()(const uword i) { arma_debug_check( (i >= n_elem), "spdiagview::operator(): out of bounds" ); return (const_cast< SpMat& >(m)).at(i+row_offset, i+col_offset); } template inline eT spdiagview::operator()(const uword i) const { arma_debug_check( (i >= n_elem), "spdiagview::operator(): out of bounds" ); return m.at(i+row_offset, i+col_offset); } template inline SpValProxy< SpMat > spdiagview::at(const uword row, const uword) { return (const_cast< SpMat& >(m)).at(row+row_offset, row+col_offset); } template inline eT spdiagview::at(const uword row, const uword) const { return m.at(row+row_offset, row+col_offset); } template inline SpValProxy< SpMat > spdiagview::operator()(const uword row, const uword col) { arma_debug_check( ((row >= n_elem) || (col > 0)), "spdiagview::operator(): out of bounds" ); return (const_cast< SpMat& >(m)).at(row+row_offset, row+col_offset); } template inline eT spdiagview::operator()(const uword row, const uword col) const { arma_debug_check( ((row >= n_elem) || (col > 0)), "spdiagview::operator(): out of bounds" ); return m.at(row+row_offset, row+col_offset); } template inline void spdiagview::fill(const eT val) { arma_extra_debug_sigprint(); SpMat& x = const_cast< SpMat& >(m); const uword local_n_elem = n_elem; for(uword i=0; i < local_n_elem; ++i) { x.at(i+row_offset, i+col_offset) = val; } } template inline void spdiagview::zeros() { arma_extra_debug_sigprint(); (*this).fill(eT(0)); } template inline void spdiagview::ones() { arma_extra_debug_sigprint(); (*this).fill(eT(1)); } template inline void spdiagview::randu() { arma_extra_debug_sigprint(); SpMat& x = const_cast< SpMat& >(m); const uword local_n_elem = n_elem; for(uword i=0; i < local_n_elem; ++i) { x.at(i+row_offset, i+col_offset) = eT(arma_rng::randu()); } } template inline void spdiagview::randn() { arma_extra_debug_sigprint(); SpMat& x = const_cast< SpMat& >(m); const uword local_n_elem = n_elem; for(uword i=0; i < local_n_elem; ++i) { x.at(i+row_offset, i+col_offset) = eT(arma_rng::randn()); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spglue_join_bones.hpp ================================================ // Copyright (C) 2015 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spglue_join //! @{ class spglue_join_cols { public: template inline static void apply(SpMat& out, const SpGlue& X); template inline static void apply_noalias(SpMat& out, const SpMat& A, const SpMat& B); }; class spglue_join_rows { public: template inline static void apply(SpMat& out, const SpGlue& X); template inline static void apply_noalias(SpMat& out, const SpMat& A, const SpMat& B); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spglue_join_meat.hpp ================================================ // Copyright (C) 2015 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spglue_join //! @{ template inline void spglue_join_cols::apply(SpMat& out, const SpGlue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_spmat A_tmp(X.A); const unwrap_spmat B_tmp(X.B); const SpMat& A = A_tmp.M; const SpMat& B = B_tmp.M; if( (&out != &A) && (&out != &B) ) { spglue_join_cols::apply_noalias(out, A, B); } else { SpMat tmp; spglue_join_cols::apply_noalias(tmp, A, B); out.steal_mem(tmp); } } template inline void spglue_join_cols::apply_noalias(SpMat& out, const SpMat& A, const SpMat& B) { arma_extra_debug_sigprint(); const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; arma_debug_check ( ( (A_n_cols != B_n_cols) && ( (A_n_rows > 0) || (A_n_cols > 0) ) && ( (B_n_rows > 0) || (B_n_cols > 0) ) ), "join_cols() / join_vert(): number of columns must be the same" ); out.set_size( A_n_rows + B_n_rows, (std::max)(A_n_cols, B_n_cols) ); if( out.n_elem > 0 ) { if(A.is_empty() == false) { out.submat(0, 0, A_n_rows-1, out.n_cols-1) = A; } if(B.is_empty() == false) { out.submat(A_n_rows, 0, out.n_rows-1, out.n_cols-1) = B; } } } template inline void spglue_join_rows::apply(SpMat& out, const SpGlue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_spmat A_tmp(X.A); const unwrap_spmat B_tmp(X.B); const SpMat& A = A_tmp.M; const SpMat& B = B_tmp.M; if( (&out != &A) && (&out != &B) ) { spglue_join_rows::apply_noalias(out, A, B); } else { SpMat tmp; spglue_join_rows::apply_noalias(tmp, A, B); out.steal_mem(tmp); } } template inline void spglue_join_rows::apply_noalias(SpMat& out, const SpMat& A, const SpMat& B) { arma_extra_debug_sigprint(); const uword A_n_rows = A.n_rows; const uword A_n_cols = A.n_cols; const uword B_n_rows = B.n_rows; const uword B_n_cols = B.n_cols; arma_debug_check ( ( (A_n_rows != B.n_rows) && ( (A_n_rows > 0) || (A_n_cols > 0) ) && ( (B_n_rows > 0) || (B_n_cols > 0) ) ), "join_rows() / join_horiz(): number of rows must be the same" ); out.set_size( (std::max)(A_n_rows, B_n_rows), A_n_cols + B_n_cols ); if( out.n_elem > 0 ) { if(A.is_empty() == false) { out.submat(0, 0, out.n_rows-1, A.n_cols-1) = A; } if(B.is_empty() == false) { out.submat(0, A_n_cols, out.n_rows-1, out.n_cols-1) = B; } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spglue_minus_bones.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spglue_minus //! @{ class spglue_minus { public: template arma_hot inline static void apply(SpMat& out, const SpGlue& X); template arma_hot inline static void apply_noalias(SpMat& result, const SpProxy& pa, const SpProxy& pb); }; class spglue_minus2 { public: template arma_hot inline static void apply(SpMat& out, const SpGlue& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spglue_minus_meat.hpp ================================================ // Copyright (C) 2012-2014 Ryan Curtin // Copyright (C) 2012-2014 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spglue_minus //! @{ template arma_hot inline void spglue_minus::apply(SpMat& out, const SpGlue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const SpProxy pa(X.A); const SpProxy pb(X.B); const bool is_alias = pa.is_alias(out) || pb.is_alias(out); if(is_alias == false) { spglue_minus::apply_noalias(out, pa, pb); } else { SpMat tmp; spglue_minus::apply_noalias(tmp, pa, pb); out.steal_mem(tmp); } } template arma_hot inline void spglue_minus::apply_noalias(SpMat& result, const SpProxy& pa, const SpProxy& pb) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(pa.get_n_rows(), pa.get_n_cols(), pb.get_n_rows(), pb.get_n_cols(), "subtraction"); if( (pa.get_n_nonzero() != 0) && (pb.get_n_nonzero() != 0) ) { result.zeros(pa.get_n_rows(), pa.get_n_cols()); // Resize memory to correct size. result.mem_resize(n_unique(pa, pb, op_n_unique_sub())); // Now iterate across both matrices. typename SpProxy::const_iterator_type x_it = pa.begin(); typename SpProxy::const_iterator_type y_it = pb.begin(); typename SpProxy::const_iterator_type x_end = pa.end(); typename SpProxy::const_iterator_type y_end = pb.end(); uword cur_val = 0; while((x_it != x_end) || (y_it != y_end)) { if(x_it == y_it) { const eT val = (*x_it) - (*y_it); if(val != eT(0)) { access::rw(result.values[cur_val]) = val; access::rw(result.row_indices[cur_val]) = x_it.row(); ++access::rw(result.col_ptrs[x_it.col() + 1]); ++cur_val; } ++x_it; ++y_it; } else { const uword x_it_row = x_it.row(); const uword x_it_col = x_it.col(); const uword y_it_row = y_it.row(); const uword y_it_col = y_it.col(); if((x_it_col < y_it_col) || ((x_it_col == y_it_col) && (x_it_row < y_it_row))) // if y is closer to the end { const eT val = (*x_it); if(val != eT(0)) { access::rw(result.values[cur_val]) = val; access::rw(result.row_indices[cur_val]) = x_it_row; ++access::rw(result.col_ptrs[x_it_col + 1]); ++cur_val; } ++x_it; } else { const eT val = (*y_it); if(val != eT(0)) { access::rw(result.values[cur_val]) = -(val); // take the negative access::rw(result.row_indices[cur_val]) = y_it_row; ++access::rw(result.col_ptrs[y_it_col + 1]); ++cur_val; } ++y_it; } } } // Fix column pointers to be cumulative. for(uword c = 1; c <= result.n_cols; ++c) { access::rw(result.col_ptrs[c]) += result.col_ptrs[c - 1]; } } else { if(pa.get_n_nonzero() == 0) { result = pb.Q; result *= eT(-1); return; } if(pb.get_n_nonzero() == 0) { result = pa.Q; return; } } } // // // spglue_minus2: scalar*(A - B) template arma_hot inline void spglue_minus2::apply(SpMat& out, const SpGlue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const SpProxy pa(X.A); const SpProxy pb(X.B); const bool is_alias = pa.is_alias(out) || pb.is_alias(out); if(is_alias == false) { spglue_minus::apply_noalias(out, pa, pb); } else { SpMat tmp; spglue_minus::apply_noalias(tmp, pa, pb); out.steal_mem(tmp); } out *= X.aux; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spglue_plus_bones.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spglue_plus //! @{ class spglue_plus { public: template arma_hot inline static void apply(SpMat& out, const SpGlue& X); template arma_hot inline static void apply_noalias(SpMat& out, const SpProxy& pa, const SpProxy& pb); }; class spglue_plus2 { public: template arma_hot inline static void apply(SpMat& out, const SpGlue& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spglue_plus_meat.hpp ================================================ // Copyright (C) 2012-2014 Ryan Curtin // Copyright (C) 2012-2014 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spglue_plus //! @{ template arma_hot inline void spglue_plus::apply(SpMat& out, const SpGlue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const SpProxy pa(X.A); const SpProxy pb(X.B); const bool is_alias = pa.is_alias(out) || pb.is_alias(out); if(is_alias == false) { spglue_plus::apply_noalias(out, pa, pb); } else { SpMat tmp; spglue_plus::apply_noalias(tmp, pa, pb); out.steal_mem(tmp); } } template arma_hot inline void spglue_plus::apply_noalias(SpMat& out, const SpProxy& pa, const SpProxy& pb) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(pa.get_n_rows(), pa.get_n_cols(), pb.get_n_rows(), pb.get_n_cols(), "addition"); if( (pa.get_n_nonzero() != 0) && (pb.get_n_nonzero() != 0) ) { out.zeros(pa.get_n_rows(), pa.get_n_cols()); // Resize memory to correct size. out.mem_resize(n_unique(pa, pb, op_n_unique_add())); // Now iterate across both matrices. typename SpProxy::const_iterator_type x_it = pa.begin(); typename SpProxy::const_iterator_type y_it = pb.begin(); typename SpProxy::const_iterator_type x_end = pa.end(); typename SpProxy::const_iterator_type y_end = pb.end(); uword cur_val = 0; while( (x_it != x_end) || (y_it != y_end) ) { if(x_it == y_it) { const eT val = (*x_it) + (*y_it); if(val != eT(0)) { access::rw(out.values[cur_val]) = val; access::rw(out.row_indices[cur_val]) = x_it.row(); ++access::rw(out.col_ptrs[x_it.col() + 1]); ++cur_val; } ++x_it; ++y_it; } else { const uword x_it_row = x_it.row(); const uword x_it_col = x_it.col(); const uword y_it_row = y_it.row(); const uword y_it_col = y_it.col(); if((x_it_col < y_it_col) || ((x_it_col == y_it_col) && (x_it_row < y_it_row))) // if y is closer to the end { const eT val = (*x_it); if(val != eT(0)) { access::rw(out.values[cur_val]) = val; access::rw(out.row_indices[cur_val]) = x_it_row; ++access::rw(out.col_ptrs[x_it_col + 1]); ++cur_val; } ++x_it; } else { const eT val = (*y_it); if(val != eT(0)) { access::rw(out.values[cur_val]) = val; access::rw(out.row_indices[cur_val]) = y_it_row; ++access::rw(out.col_ptrs[y_it_col + 1]); ++cur_val; } ++y_it; } } } const uword out_n_cols = out.n_cols; uword* col_ptrs = access::rwp(out.col_ptrs); // Fix column pointers to be cumulative. for(uword c = 1; c <= out_n_cols; ++c) { col_ptrs[c] += col_ptrs[c - 1]; } } else { if(pa.get_n_nonzero() == 0) { out = pb.Q; return; } if(pb.get_n_nonzero() == 0) { out = pa.Q; return; } } } // // // spglue_plus2: scalar*(A + B) template arma_hot inline void spglue_plus2::apply(SpMat& out, const SpGlue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const SpProxy pa(X.A); const SpProxy pb(X.B); const bool is_alias = pa.is_alias(out) || pb.is_alias(out); if(is_alias == false) { spglue_plus::apply_noalias(out, pa, pb); } else { SpMat tmp; spglue_plus::apply_noalias(tmp, pa, pb); out.steal_mem(tmp); } out *= X.aux; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spglue_times_bones.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spglue_times //! @{ class spglue_times { public: template inline static void apply(SpMat& out, const SpGlue& X); template arma_hot inline static void apply_noalias(SpMat& c, const SpProxy& pa, const SpProxy& pb); }; class spglue_times2 { public: template inline static void apply(SpMat& out, const SpGlue& X); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spglue_times_meat.hpp ================================================ // Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012-2015 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spglue_times //! @{ template inline void spglue_times::apply(SpMat& out, const SpGlue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; // unconditionally unwrapping, as the column iterator in SpSubview is slow const unwrap_spmat tmp1(X.A); const unwrap_spmat tmp2(X.B); const SpProxy::stored_type> pa(tmp1.M); const SpProxy::stored_type> pb(tmp2.M); const bool is_alias = pa.is_alias(out) || pb.is_alias(out); if(is_alias == false) { spglue_times::apply_noalias(out, pa, pb); } else { SpMat tmp; spglue_times::apply_noalias(tmp, pa, pb); out.steal_mem(tmp); } } template arma_hot inline void spglue_times::apply_noalias(SpMat& c, const SpProxy& pa, const SpProxy& pb) { arma_extra_debug_sigprint(); const uword x_n_rows = pa.get_n_rows(); const uword x_n_cols = pa.get_n_cols(); const uword y_n_rows = pb.get_n_rows(); const uword y_n_cols = pb.get_n_cols(); arma_debug_assert_mul_size(x_n_rows, x_n_cols, y_n_rows, y_n_cols, "matrix multiplication"); // First we must determine the structure of the new matrix (column pointers). // This follows the algorithm described in 'Sparse Matrix Multiplication // Package (SMMP)' (R.E. Bank and C.C. Douglas, 2001). Their description of // "SYMBMM" does not include anything about memory allocation. In addition it // does not consider that there may be elements which space may be allocated // for but which evaluate to zero anyway. So we have to modify the algorithm // to work that way. For the "SYMBMM" implementation we will not determine // the row indices but instead just the column pointers. //SpMat c(x_n_rows, y_n_cols); // Initializes col_ptrs to 0. c.zeros(x_n_rows, y_n_cols); //if( (pa.get_n_elem() == 0) || (pb.get_n_elem() == 0) ) if( (pa.get_n_nonzero() == 0) || (pb.get_n_nonzero() == 0) ) { return; } // Auxiliary storage which denotes when items have been found. podarray index(x_n_rows); index.fill(x_n_rows); // Fill with invalid links. typename SpProxy::const_iterator_type y_it = pb.begin(); typename SpProxy::const_iterator_type y_end = pb.end(); // SYMBMM: calculate column pointers for resultant matrix to obtain a good // upper bound on the number of nonzero elements. uword cur_col_length = 0; uword last_ind = x_n_rows + 1; do { const uword y_it_row = y_it.row(); // Look through the column that this point (*y_it) could affect. typename SpProxy::const_iterator_type x_it = pa.begin_col(y_it_row); while(x_it.col() == y_it_row) { // A point at x(i, j) and y(j, k) implies a point at c(i, k). if(index[x_it.row()] == x_n_rows) { index[x_it.row()] = last_ind; last_ind = x_it.row(); ++cur_col_length; } ++x_it; } const uword old_col = y_it.col(); ++y_it; // See if column incremented. if(old_col != y_it.col()) { // Set column pointer (this is not a cumulative count; that is done later). access::rw(c.col_ptrs[old_col + 1]) = cur_col_length; cur_col_length = 0; // Return index markers to zero. Use last_ind for traversal. while(last_ind != x_n_rows + 1) { const uword tmp = index[last_ind]; index[last_ind] = x_n_rows; last_ind = tmp; } } } while(y_it != y_end); // Accumulate column pointers. for(uword i = 0; i < c.n_cols; ++i) { access::rw(c.col_ptrs[i + 1]) += c.col_ptrs[i]; } // Now that we know a decent bound on the number of nonzero elements, allocate // the memory and fill it. c.mem_resize(c.col_ptrs[c.n_cols]); // Now the implementation of the NUMBMM algorithm. uword cur_pos = 0; // Current position in c matrix. podarray sums(x_n_rows); // Partial sums. sums.zeros(); // setting the size of 'sorted_indices' to x_n_rows is a better-than-nothing guess; // the correct minimum size is determined later podarray sorted_indices(x_n_rows); // last_ind is already set to x_n_rows, and cur_col_length is already set to 0. // We will loop through all columns as necessary. uword cur_col = 0; while(cur_col < c.n_cols) { // Skip to next column with elements in it. while((cur_col < c.n_cols) && (c.col_ptrs[cur_col] == c.col_ptrs[cur_col + 1])) { // Update current column pointer to actual number of nonzero elements up // to this point. access::rw(c.col_ptrs[cur_col]) = cur_pos; ++cur_col; } if(cur_col == c.n_cols) { break; } // Update current column pointer. access::rw(c.col_ptrs[cur_col]) = cur_pos; // Check all elements in this column. typename SpProxy::const_iterator_type y_col_it = pb.begin_col(cur_col); while(y_col_it.col() == cur_col) { // Check all elements in the column of the other matrix corresponding to // the row of this column. typename SpProxy::const_iterator_type x_col_it = pa.begin_col(y_col_it.row()); const eT y_value = (*y_col_it); while(x_col_it.col() == y_col_it.row()) { // A point at x(i, j) and y(j, k) implies a point at c(i, k). // Add to partial sum. const eT x_value = (*x_col_it); sums[x_col_it.row()] += (x_value * y_value); // Add point if it hasn't already been marked. if(index[x_col_it.row()] == x_n_rows) { index[x_col_it.row()] = last_ind; last_ind = x_col_it.row(); } ++x_col_it; } ++y_col_it; } // Now sort the indices that were used in this column. //podarray sorted_indices(c.col_ptrs[cur_col + 1] - c.col_ptrs[cur_col]); sorted_indices.set_min_size(c.col_ptrs[cur_col + 1] - c.col_ptrs[cur_col]); // .set_min_size() can only enlarge the array to the specified size, // hence if we request a smaller size than already allocated, // no new memory allocation is done uword cur_index = 0; while(last_ind != x_n_rows + 1) { const uword tmp = last_ind; // Check that it wasn't a "fake" nonzero element. if(sums[tmp] != eT(0)) { // Assign to next open position. sorted_indices[cur_index] = tmp; ++cur_index; } last_ind = index[tmp]; index[tmp] = x_n_rows; } // Now sort the indices. if (cur_index != 0) { op_sort::direct_sort_ascending(sorted_indices.memptr(), cur_index); for(uword k = 0; k < cur_index; ++k) { const uword row = sorted_indices[k]; access::rw(c.row_indices[cur_pos]) = row; access::rw(c.values[cur_pos]) = sums[row]; sums[row] = eT(0); ++cur_pos; } } // Move to next column. ++cur_col; } // Update last column pointer and resize to actual memory size. access::rw(c.col_ptrs[c.n_cols]) = cur_pos; c.mem_resize(cur_pos); } // // // spglue_times2: scalar*(A * B) template inline void spglue_times2::apply(SpMat& out, const SpGlue& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const SpProxy pa(X.A); const SpProxy pb(X.B); const bool is_alias = pa.is_alias(out) || pb.is_alias(out); if(is_alias == false) { spglue_times::apply_noalias(out, pa, pb); } else { SpMat tmp; spglue_times::apply_noalias(tmp, pa, pb); out.steal_mem(tmp); } out *= X.aux; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spop_htrans_bones.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_htrans //! @{ //! hermitian transpose operation for sparse matrices class spop_htrans { public: template arma_hot inline static void apply(SpMat& out, const SpOp& in, const typename arma_not_cx::result* junk = 0); template arma_hot inline static void apply(SpMat& out, const SpOp& in, const typename arma_cx_only::result* junk = 0); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spop_htrans_meat.hpp ================================================ // Copyright (C) 2012-2014 Ryan Curtin // Copyright (C) 2012-2014 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_htrans //! @{ template arma_hot inline void spop_htrans::apply(SpMat& out, const SpOp& in, const typename arma_not_cx::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); spop_strans::apply(out, in); } template arma_hot inline void spop_htrans::apply(SpMat& out, const SpOp& in, const typename arma_cx_only::result* junk) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typedef typename umat::elem_type ueT; const SpProxy p(in.m); const uword N = p.get_n_nonzero(); if(N == uword(0)) { out.zeros(p.get_n_cols(), p.get_n_rows()); return; } umat locs(2, N); Col vals(N); eT* vals_ptr = vals.memptr(); typename SpProxy::const_iterator_type it = p.begin(); for(uword count = 0; count < N; ++count) { ueT* locs_ptr = locs.colptr(count); locs_ptr[0] = it.col(); locs_ptr[1] = it.row(); vals_ptr[count] = std::conj(*it); ++it; } SpMat tmp(locs, vals, p.get_n_cols(), p.get_n_rows()); out.steal_mem(tmp); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spop_max_bones.hpp ================================================ // Copyright (C) 2012-2015 Conrad Sanderson // Copyright (C) 2012-2014 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_max //! @{ class spop_max { public: template inline static void apply(SpMat& out, const SpOp& in); // template inline static void apply_proxy(SpMat& out, const SpProxy& p, const uword dim, const typename arma_not_cx::result* junk = 0); template inline static typename T1::elem_type vector_max(const T1& X, const typename arma_not_cx::result* junk = 0); template inline static typename arma_not_cx::result max(const SpBase& X); template inline static typename arma_not_cx::result max_with_index(const SpProxy& P, uword& index_of_max_val); // template inline static void apply_proxy(SpMat& out, const SpProxy& p, const uword dim, const typename arma_cx_only::result* junk = 0); template inline static typename T1::elem_type vector_max(const T1& X, const typename arma_cx_only::result* junk = 0); template inline static typename arma_cx_only::result max(const SpBase& X); template inline static typename arma_cx_only::result max_with_index(const SpProxy& P, uword& index_of_max_val); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spop_max_meat.hpp ================================================ // Copyright (C) 2012-2014 Ryan Curtin // Copyright (C) 2012-2015 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_max //! @{ template inline void spop_max::apply(SpMat& out, const SpOp& in) { arma_extra_debug_sigprint(); const uword dim = in.aux_uword_a; arma_debug_check( (dim > 1), "max(): parameter 'dim' must be 0 or 1" ); const SpProxy p(in.m); const uword p_n_rows = p.get_n_rows(); const uword p_n_cols = p.get_n_cols(); if( (p_n_rows == 0) || (p_n_cols == 0) || (p.get_n_nonzero() == 0) ) { if(dim == 0) { out.zeros((p_n_rows > 0) ? 1 : 0, p_n_cols); } if(dim == 1) { out.zeros(p_n_rows, (p_n_cols > 0) ? 1 : 0); } return; } spop_max::apply_proxy(out, p, dim); } template inline void spop_max::apply_proxy ( SpMat& out, const SpProxy& p, const uword dim, const typename arma_not_cx::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); const uword p_n_cols = p.get_n_cols(); const uword p_n_rows = p.get_n_rows(); if(dim == 0) // find the maximum in each column { Row value(p_n_cols, fill::zeros); urowvec count(p_n_cols, fill::zeros); while(it != it_end) { const uword col = it.col(); value[col] = (count[col] == 0) ? (*it) : (std::max)(value[col], (*it)); count[col]++; ++it; } for(uword col=0; col value(p_n_rows, fill::zeros); ucolvec count(p_n_rows, fill::zeros); while(it != it_end) { const uword row = it.row(); value[row] = (count[row] == 0) ? (*it) : (std::max)(value[row], (*it)); count[row]++; ++it; } for(uword row=0; row inline typename T1::elem_type spop_max::vector_max ( const T1& x, const typename arma_not_cx::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; const SpProxy p(x); if(p.get_n_elem() == 0) { arma_debug_check(true, "max(): object has no elements"); return Datum::nan; } if(p.get_n_nonzero() == 0) { return eT(0); } if(SpProxy::must_use_iterator == false) { // direct access of values if(p.get_n_nonzero() == p.get_n_elem()) { return op_max::direct_max(p.get_values(), p.get_n_nonzero()); } else { return std::max(eT(0), op_max::direct_max(p.get_values(), p.get_n_nonzero())); } } else { // use iterator typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); eT result = (*it); ++it; while(it != it_end) { if((*it) > result) { result = (*it); } ++it; } if(p.get_n_nonzero() == p.get_n_elem()) { return result; } else { return std::max(eT(0), result); } } } template inline typename arma_not_cx::result spop_max::max(const SpBase& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const SpProxy P(X.get_ref()); const uword n_elem = P.get_n_elem(); const uword n_nonzero = P.get_n_nonzero(); if(n_elem == 0) { arma_debug_check(true, "max(): object has no elements"); return Datum::nan; } eT max_val = priv::most_neg(); if(SpProxy::must_use_iterator) { // We have to iterate over the elements. typedef typename SpProxy::const_iterator_type it_type; it_type it = P.begin(); it_type it_end = P.end(); while (it != it_end) { if ((*it) > max_val) { max_val = *it; } ++it; } } else { // We can do direct access of the values, row_indices, and col_ptrs. // We don't need the location of the max value, so we can just call out to // other functions... max_val = op_max::direct_max(P.get_values(), n_nonzero); } if(n_elem == n_nonzero) { return max_val; } else { return std::max(eT(0), max_val); } } template inline typename arma_not_cx::result spop_max::max_with_index(const SpProxy& P, uword& index_of_max_val) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword n_elem = P.get_n_elem(); const uword n_nonzero = P.get_n_nonzero(); const uword n_rows = P.get_n_rows(); if(n_elem == 0) { arma_debug_check(true, "max(): object has no elements"); return Datum::nan; } eT max_val = priv::most_neg(); if(SpProxy::must_use_iterator) { // We have to iterate over the elements. typedef typename SpProxy::const_iterator_type it_type; it_type it = P.begin(); it_type it_end = P.end(); while (it != it_end) { if ((*it) > max_val) { max_val = *it; index_of_max_val = it.row() + it.col() * n_rows; } ++it; } } else { // We can do direct access. max_val = op_max::direct_max(P.get_values(), n_nonzero, index_of_max_val); // Convert to actual position in matrix. const uword row = P.get_row_indices()[index_of_max_val]; uword col = 0; while (P.get_col_ptrs()[++col] <= index_of_max_val) { } index_of_max_val = (col - 1) * n_rows + row; } if(n_elem != n_nonzero) { max_val = std::max(eT(0), max_val); // If the max_val is a nonzero element, we need its actual position in the matrix. if(max_val == eT(0)) { // Find first zero element. uword last_row = 0; uword last_col = 0; typedef typename SpProxy::const_iterator_type it_type; it_type it = P.begin(); it_type it_end = P.end(); while (it != it_end) { // Have we moved more than one position from the last place? if ((it.col() == last_col) && (it.row() - last_row > 1)) { index_of_max_val = it.col() * n_rows + last_row + 1; break; } else if ((it.col() >= last_col + 1) && (last_row < n_rows - 1)) { index_of_max_val = last_col * n_rows + last_row + 1; break; } else if ((it.col() == last_col + 1) && (it.row() > 0)) { index_of_max_val = it.col() * n_rows; break; } else if (it.col() > last_col + 1) { index_of_max_val = (last_col + 1) * n_rows; break; } last_row = it.row(); last_col = it.col(); ++it; } } } return max_val; } template inline void spop_max::apply_proxy ( SpMat& out, const SpProxy& p, const uword dim, const typename arma_cx_only::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); const uword p_n_cols = p.get_n_cols(); const uword p_n_rows = p.get_n_rows(); if(dim == 0) // find the maximum in each column { Row rawval(p_n_cols, fill::zeros); Row< T> absval(p_n_cols, fill::zeros); while(it != it_end) { const uword col = it.col(); const eT& v = (*it); const T a = std::abs(v); if(a > absval[col]) { absval[col] = a; rawval[col] = v; } ++it; } out = rawval; } else if(dim == 1) // find the maximum in each row { Col rawval(p_n_rows, fill::zeros); Col< T> absval(p_n_rows, fill::zeros); while(it != it_end) { const uword row = it.row(); const eT& v = (*it); const T a = std::abs(v); if(a > absval[row]) { absval[row] = a; rawval[row] = v; } ++it; } out = rawval; } } template inline typename T1::elem_type spop_max::vector_max ( const T1& x, const typename arma_cx_only::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; const SpProxy p(x); if(p.get_n_elem() == 0) { arma_debug_check(true, "max(): object has no elements"); return Datum::nan; } if(p.get_n_nonzero() == 0) { return eT(0); } if(SpProxy::must_use_iterator == false) { // direct access of values if(p.get_n_nonzero() == p.get_n_elem()) { return op_max::direct_max(p.get_values(), p.get_n_nonzero()); } else { const eT val1 = eT(0); const eT val2 = op_max::direct_max(p.get_values(), p.get_n_nonzero()); return ( std::abs(val1) >= std::abs(val2) ) ? val1 : val2; } } else { // use iterator typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); eT best_val_orig = *it; T best_val_abs = std::abs(best_val_orig); ++it; while(it != it_end) { eT val_orig = *it; T val_abs = std::abs(val_orig); if(val_abs > best_val_abs) { best_val_abs = val_abs; best_val_orig = val_orig; } ++it; } if(p.get_n_nonzero() == p.get_n_elem()) { return best_val_orig; } else { const eT val1 = eT(0); return ( std::abs(val1) >= best_val_abs ) ? val1 : best_val_orig; } } } template inline typename arma_cx_only::result spop_max::max(const SpBase& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; const SpProxy P(X.get_ref()); const uword n_elem = P.get_n_elem(); const uword n_nonzero = P.get_n_nonzero(); if(n_elem == 0) { arma_debug_check(true, "max(): object has no elements"); return Datum::nan; } T max_val = priv::most_neg(); eT ret_val; if(SpProxy::must_use_iterator) { // We have to iterate over the elements. typedef typename SpProxy::const_iterator_type it_type; it_type it = P.begin(); it_type it_end = P.end(); while (it != it_end) { const T tmp_val = std::abs(*it); if (tmp_val > max_val) { max_val = tmp_val; ret_val = *it; } ++it; } } else { // We can do direct access of the values, row_indices, and col_ptrs. // We don't need the location of the max value, so we can just call out to // other functions... ret_val = op_max::direct_max(P.get_values(), n_nonzero); max_val = std::abs(ret_val); } if(n_elem == n_nonzero) { return max_val; } else { if (T(0) > max_val) return eT(0); else return ret_val; } } template inline typename arma_cx_only::result spop_max::max_with_index(const SpProxy& P, uword& index_of_max_val) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; const uword n_elem = P.get_n_elem(); const uword n_nonzero = P.get_n_nonzero(); const uword n_rows = P.get_n_rows(); if(n_elem == 0) { arma_debug_check(true, "max(): object has no elements"); return Datum::nan; } T max_val = priv::most_neg(); if(SpProxy::must_use_iterator) { // We have to iterate over the elements. typedef typename SpProxy::const_iterator_type it_type; it_type it = P.begin(); it_type it_end = P.end(); while (it != it_end) { const T tmp_val = std::abs(*it); if (tmp_val > max_val) { max_val = tmp_val; index_of_max_val = it.row() + it.col() * n_rows; } ++it; } } else { // We can do direct access. max_val = std::abs(op_max::direct_max(P.get_values(), n_nonzero, index_of_max_val)); // Convert to actual position in matrix. const uword row = P.get_row_indices()[index_of_max_val]; uword col = 0; while (P.get_col_ptrs()[++col] <= index_of_max_val) { } index_of_max_val = (col - 1) * n_rows + row; } if(n_elem != n_nonzero) { max_val = std::max(T(0), max_val); // If the max_val is a nonzero element, we need its actual position in the matrix. if(max_val == T(0)) { // Find first zero element. uword last_row = 0; uword last_col = 0; typedef typename SpProxy::const_iterator_type it_type; it_type it = P.begin(); it_type it_end = P.end(); while (it != it_end) { // Have we moved more than one position from the last place? if ((it.col() == last_col) && (it.row() - last_row > 1)) { index_of_max_val = it.col() * n_rows + last_row + 1; break; } else if ((it.col() >= last_col + 1) && (last_row < n_rows - 1)) { index_of_max_val = last_col * n_rows + last_row + 1; break; } else if ((it.col() == last_col + 1) && (it.row() > 0)) { index_of_max_val = it.col() * n_rows; break; } else if (it.col() > last_col + 1) { index_of_max_val = (last_col + 1) * n_rows; break; } last_row = it.row(); last_col = it.col(); ++it; } } } return P[index_of_max_val]; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spop_mean_bones.hpp ================================================ // Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012-2015 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_mean //! @{ //! Class for finding mean values of a sparse matrix class spop_mean { public: // Apply mean into an output sparse matrix (or vector). template inline static void apply(SpMat& out, const SpOp& in); template inline static void apply_noalias_fast(SpMat& out, const SpProxy& p, const uword dim); template inline static void apply_noalias_slow(SpMat& out, const SpProxy& p, const uword dim); // Take direct mean of a set of values. Length of array and number of values can be different. template inline static eT direct_mean(const eT* const X, const uword length, const uword N); template inline static eT direct_mean_robust(const eT* const X, const uword length, const uword N); template inline static typename T1::elem_type mean_all(const SpBase& X); // Take the mean using an iterator. template inline static eT iterator_mean(T1& it, const T1& end, const uword n_zero, const eT junk); template inline static eT iterator_mean_robust(T1& it, const T1& end, const uword n_zero, const eT junk); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spop_mean_meat.hpp ================================================ // Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012-2015 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_mean //! @{ template inline void spop_mean::apply(SpMat& out, const SpOp& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword dim = in.aux_uword_a; arma_debug_check( (dim > 1), "mean(): parameter 'dim' must be 0 or 1" ); const SpProxy p(in.m); if(p.is_alias(out) == false) { spop_mean::apply_noalias_fast(out, p, dim); } else { SpMat tmp; spop_mean::apply_noalias_fast(tmp, p, dim); out.steal_mem(tmp); } } template inline void spop_mean::apply_noalias_fast ( SpMat& out, const SpProxy& p, const uword dim ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename T1::pod_type T; const uword p_n_rows = p.get_n_rows(); const uword p_n_cols = p.get_n_cols(); if( (p_n_rows == 0) || (p_n_cols == 0) || (p.get_n_nonzero() == 0) ) { if(dim == 0) { out.zeros((p_n_rows > 0) ? 1 : 0, p_n_cols); } if(dim == 1) { out.zeros(p_n_rows, (p_n_cols > 0) ? 1 : 0); } return; } if(dim == 0) // find the mean in each column { Row acc(p_n_cols, fill::zeros); if(SpProxy::must_use_iterator) { typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); while(it != it_end) { acc[it.col()] += (*it); ++it; } acc /= T(p_n_rows); } else { for(uword col = 0; col < p_n_cols; ++col) { acc[col] = arrayops::accumulate ( &p.get_values()[p.get_col_ptrs()[col]], p.get_col_ptrs()[col + 1] - p.get_col_ptrs()[col] ) / T(p_n_rows); } } out = acc; } else if(dim == 1) // find the mean in each row { Col acc(p_n_rows, fill::zeros); typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); while(it != it_end) { acc[it.row()] += (*it); ++it; } acc /= T(p_n_cols); out = acc; } if(out.is_finite() == false) { spop_mean::apply_noalias_slow(out, p, dim); } } template inline void spop_mean::apply_noalias_slow ( SpMat& out, const SpProxy& p, const uword dim ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword p_n_rows = p.get_n_rows(); const uword p_n_cols = p.get_n_cols(); if(dim == 0) // find the mean in each column { arma_extra_debug_print("spop_mean::apply_noalias(): dim = 0"); out.set_size((p_n_rows > 0) ? 1 : 0, p_n_cols); if( (p_n_rows == 0) || (p.get_n_nonzero() == 0) ) { return; } for(uword col = 0; col < p_n_cols; ++col) { // Do we have to use an iterator or can we use memory directly? if(SpProxy::must_use_iterator) { typename SpProxy::const_iterator_type it = p.begin_col(col); typename SpProxy::const_iterator_type end = p.begin_col(col + 1); const uword n_zero = p_n_rows - (end.pos() - it.pos()); out.at(0,col) = spop_mean::iterator_mean(it, end, n_zero, eT(0)); } else { out.at(0,col) = spop_mean::direct_mean ( &p.get_values()[p.get_col_ptrs()[col]], p.get_col_ptrs()[col + 1] - p.get_col_ptrs()[col], p_n_rows ); } } } else if(dim == 1) // find the mean in each row { arma_extra_debug_print("spop_mean::apply_noalias(): dim = 1"); out.set_size(p_n_rows, (p_n_cols > 0) ? 1 : 0); if( (p_n_cols == 0) || (p.get_n_nonzero() == 0) ) { return; } for(uword row = 0; row < p_n_rows; ++row) { // We must use an iterator regardless of how it is stored. typename SpProxy::const_row_iterator_type it = p.begin_row(row); typename SpProxy::const_row_iterator_type end = p.end_row(row); const uword n_zero = p_n_cols - (end.pos() - it.pos()); out.at(row,0) = spop_mean::iterator_mean(it, end, n_zero, eT(0)); } } } template inline eT spop_mean::direct_mean ( const eT* const X, const uword length, const uword N ) { arma_extra_debug_sigprint(); typedef typename get_pod_type::result T; const eT result = ((length > 0) && (N > 0)) ? eT(arrayops::accumulate(X, length) / T(N)) : eT(0); return arma_isfinite(result) ? result : spop_mean::direct_mean_robust(X, length, N); } template inline eT spop_mean::direct_mean_robust ( const eT* const X, const uword length, const uword N ) { arma_extra_debug_sigprint(); typedef typename get_pod_type::result T; uword i, j; eT r_mean = eT(0); const uword diff = (N - length); // number of zeros for(i = 0, j = 1; j < length; i += 2, j += 2) { const eT Xi = X[i]; const eT Xj = X[j]; r_mean += (Xi - r_mean) / T(diff + j); r_mean += (Xj - r_mean) / T(diff + j + 1); } if(i < length) { const eT Xi = X[i]; r_mean += (Xi - r_mean) / T(diff + i + 1); } return r_mean; } template inline typename T1::elem_type spop_mean::mean_all(const SpBase& X) { arma_extra_debug_sigprint(); SpProxy p(X.get_ref()); if(SpProxy::must_use_iterator) { typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type end = p.end(); return spop_mean::iterator_mean(it, end, p.get_n_elem() - p.get_n_nonzero(), typename T1::elem_type(0)); } else // must_use_iterator == false; that is, we can directly access the values array { return spop_mean::direct_mean(p.get_values(), p.get_n_nonzero(), p.get_n_elem()); } } template inline eT spop_mean::iterator_mean(T1& it, const T1& end, const uword n_zero, const eT junk) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename get_pod_type::result T; eT acc = eT(0); T1 backup_it(it); // in case we have to use robust iterator_mean const uword it_begin_pos = it.pos(); while (it != end) { acc += (*it); ++it; } const uword count = n_zero + (it.pos() - it_begin_pos); const eT result = (count > 0) ? eT(acc / T(count)) : eT(0); return arma_isfinite(result) ? result : spop_mean::iterator_mean_robust(backup_it, end, n_zero, eT(0)); } template inline eT spop_mean::iterator_mean_robust(T1& it, const T1& end, const uword n_zero, const eT junk) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename get_pod_type::result T; eT r_mean = eT(0); const uword it_begin_pos = it.pos(); while (it != end) { r_mean += ((*it - r_mean) / T(n_zero + (it.pos() - it_begin_pos) + 1)); ++it; } return r_mean; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spop_min_bones.hpp ================================================ // Copyright (C) 2012-2015 Conrad Sanderson // Copyright (C) 2012-2014 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_min //! @{ class spop_min { public: template inline static void apply(SpMat& out, const SpOp& in); // template inline static void apply_proxy(SpMat& out, const SpProxy& p, const uword dim, const typename arma_not_cx::result* junk = 0); template inline static typename T1::elem_type vector_min(const T1& X, const typename arma_not_cx::result* junk = 0); template inline static typename arma_not_cx::result min(const SpBase& X); template inline static typename arma_not_cx::result min_with_index(const SpProxy& P, uword& index_of_min_val); // template inline static void apply_proxy(SpMat& out, const SpProxy& p, const uword dim, const typename arma_cx_only::result* junk = 0); template inline static typename T1::elem_type vector_min(const T1& X, const typename arma_cx_only::result* junk = 0); template inline static typename arma_cx_only::result min(const SpBase& X); template inline static typename arma_cx_only::result min_with_index(const SpProxy& P, uword& index_of_min_val); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spop_min_meat.hpp ================================================ // Copyright (C) 2012-2014 Ryan Curtin // Copyright (C) 2012-2015 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_min //! @{ template inline void spop_min::apply(SpMat& out, const SpOp& in) { arma_extra_debug_sigprint(); const uword dim = in.aux_uword_a; arma_debug_check( (dim > 1), "min(): parameter 'dim' must be 0 or 1" ); const SpProxy p(in.m); const uword p_n_rows = p.get_n_rows(); const uword p_n_cols = p.get_n_cols(); if( (p_n_rows == 0) || (p_n_cols == 0) || (p.get_n_nonzero() == 0) ) { if(dim == 0) { out.zeros((p_n_rows > 0) ? 1 : 0, p_n_cols); } if(dim == 1) { out.zeros(p_n_rows, (p_n_cols > 0) ? 1 : 0); } return; } spop_min::apply_proxy(out, p, dim); } template inline void spop_min::apply_proxy ( SpMat& out, const SpProxy& p, const uword dim, const typename arma_not_cx::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); const uword p_n_cols = p.get_n_cols(); const uword p_n_rows = p.get_n_rows(); if(dim == 0) // find the minimum in each column { Row value(p_n_cols, fill::zeros); urowvec count(p_n_cols, fill::zeros); while(it != it_end) { const uword col = it.col(); value[col] = (count[col] == 0) ? (*it) : (std::min)(value[col], (*it)); count[col]++; ++it; } for(uword col=0; col value(p_n_rows, fill::zeros); ucolvec count(p_n_rows, fill::zeros); while(it != it_end) { const uword row = it.row(); value[row] = (count[row] == 0) ? (*it) : (std::min)(value[row], (*it)); count[row]++; ++it; } for(uword row=0; row inline typename T1::elem_type spop_min::vector_min ( const T1& x, const typename arma_not_cx::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; const SpProxy p(x); if(p.get_n_elem() == 0) { arma_debug_check(true, "min(): object has no elements"); return Datum::nan; } if(p.get_n_nonzero() == 0) { return eT(0); } if(SpProxy::must_use_iterator == false) { // direct access of values if(p.get_n_nonzero() == p.get_n_elem()) { return op_min::direct_min(p.get_values(), p.get_n_nonzero()); } else { return std::min(eT(0), op_min::direct_min(p.get_values(), p.get_n_nonzero())); } } else { // use iterator typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); eT result = (*it); ++it; while(it != it_end) { if((*it) < result) { result = (*it); } ++it; } if(p.get_n_nonzero() == p.get_n_elem()) { return result; } else { return std::min(eT(0), result); } } } template inline typename arma_not_cx::result spop_min::min(const SpBase& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const SpProxy P(X.get_ref()); const uword n_elem = P.get_n_elem(); const uword n_nonzero = P.get_n_nonzero(); if(n_elem == 0) { arma_debug_check(true, "min(): object has no elements"); return Datum::nan; } eT min_val = priv::most_pos(); if(SpProxy::must_use_iterator) { // We have to iterate over the elements. typedef typename SpProxy::const_iterator_type it_type; it_type it = P.begin(); it_type it_end = P.end(); while (it != it_end) { if ((*it) < min_val) { min_val = *it; } ++it; } } else { // We can do direct access of the values, row_indices, and col_ptrs. // We don't need the location of the min value, so we can just call out to // other functions... min_val = op_min::direct_min(P.get_values(), n_nonzero); } if(n_elem == n_nonzero) { return min_val; } else { return std::min(eT(0), min_val); } } template inline typename arma_not_cx::result spop_min::min_with_index(const SpProxy& P, uword& index_of_min_val) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword n_elem = P.get_n_elem(); const uword n_nonzero = P.get_n_nonzero(); const uword n_rows = P.get_n_rows(); if(n_elem == 0) { arma_debug_check(true, "min(): object has no elements"); return Datum::nan; } eT min_val = priv::most_pos(); if(SpProxy::must_use_iterator) { // We have to iterate over the elements. typedef typename SpProxy::const_iterator_type it_type; it_type it = P.begin(); it_type it_end = P.end(); while (it != it_end) { if ((*it) < min_val) { min_val = *it; index_of_min_val = it.row() + it.col() * n_rows; } ++it; } } else { // We can do direct access. min_val = op_min::direct_min(P.get_values(), n_nonzero, index_of_min_val); // Convert to actual position in matrix. const uword row = P.get_row_indices()[index_of_min_val]; uword col = 0; while (P.get_col_ptrs()[++col] < index_of_min_val + 1) { } index_of_min_val = (col - 1) * n_rows + row; } if(n_elem != n_nonzero) { min_val = std::min(eT(0), min_val); // If the min_val is a nonzero element, we need its actual position in the matrix. if(min_val == eT(0)) { // Find first zero element. uword last_row = 0; uword last_col = 0; typedef typename SpProxy::const_iterator_type it_type; it_type it = P.begin(); it_type it_end = P.end(); while (it != it_end) { // Have we moved more than one position from the last place? if ((it.col() == last_col) && (it.row() - last_row > 1)) { index_of_min_val = it.col() * n_rows + last_row + 1; break; } else if ((it.col() >= last_col + 1) && (last_row < n_rows - 1)) { index_of_min_val = last_col * n_rows + last_row + 1; break; } else if ((it.col() == last_col + 1) && (it.row() > 0)) { index_of_min_val = it.col() * n_rows; break; } else if (it.col() > last_col + 1) { index_of_min_val = (last_col + 1) * n_rows; break; } last_row = it.row(); last_col = it.col(); ++it; } } } return min_val; } template inline void spop_min::apply_proxy ( SpMat& out, const SpProxy& p, const uword dim, const typename arma_cx_only::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); const uword p_n_cols = p.get_n_cols(); const uword p_n_rows = p.get_n_rows(); if(dim == 0) // find the minimum in each column { Row rawval(p_n_cols, fill::zeros); Row< T> absval(p_n_cols, fill::zeros); urowvec count(p_n_cols, fill::zeros); while(it != it_end) { const uword col = it.col(); const eT& v = (*it); const T a = std::abs(v); if(count[col] == 0) { absval[col] = a; rawval[col] = v; } else { if(a < absval[col]) { absval[col] = a; rawval[col] = v; } } count[col]++; ++it; } for(uword col=0; col < p_n_cols; ++col) { if(count[col] < p_n_rows) { if(T(0) < absval[col]) { rawval[col] = eT(0); } } } out = rawval; } else if(dim == 1) // find the minimum in each row { Col rawval(p_n_rows, fill::zeros); Col< T> absval(p_n_rows, fill::zeros); ucolvec count(p_n_rows, fill::zeros); while(it != it_end) { const uword row = it.row(); const eT& v = (*it); const T a = std::abs(v); if(count[row] == 0) { absval[row] = a; rawval[row] = v; } else { if(a < absval[row]) { absval[row] = a; rawval[row] = v; } } count[row]++; ++it; } for(uword row=0; row < p_n_rows; ++row) { if(count[row] < p_n_cols) { if(T(0) < absval[row]) { rawval[row] = eT(0); } } } out = rawval; } } template inline typename T1::elem_type spop_min::vector_min ( const T1& x, const typename arma_cx_only::result* junk ) { arma_extra_debug_sigprint(); arma_ignore(junk); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; const SpProxy p(x); if(p.get_n_elem() == 0) { arma_debug_check(true, "min(): object has no elements"); return Datum::nan; } if(p.get_n_nonzero() == 0) { return eT(0); } if(SpProxy::must_use_iterator == false) { // direct access of values if(p.get_n_nonzero() == p.get_n_elem()) { return op_min::direct_min(p.get_values(), p.get_n_nonzero()); } else { const eT val1 = eT(0); const eT val2 = op_min::direct_min(p.get_values(), p.get_n_nonzero()); return ( std::abs(val1) < std::abs(val2) ) ? val1 : val2; } } else { // use iterator typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); eT best_val_orig = *it; T best_val_abs = std::abs(best_val_orig); ++it; while(it != it_end) { eT val_orig = *it; T val_abs = std::abs(val_orig); if(val_abs < best_val_abs) { best_val_abs = val_abs; best_val_orig = val_orig; } ++it; } if(p.get_n_nonzero() == p.get_n_elem()) { return best_val_orig; } else { const eT val1 = eT(0); return ( std::abs(val1) < best_val_abs ) ? val1 : best_val_orig; } } } template inline typename arma_cx_only::result spop_min::min(const SpBase& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; const SpProxy P(X.get_ref()); const uword n_elem = P.get_n_elem(); const uword n_nonzero = P.get_n_nonzero(); if(n_elem == 0) { arma_debug_check(true, "min(): object has no elements"); return Datum::nan; } T min_val = priv::most_pos(); eT ret_val; if(SpProxy::must_use_iterator) { // We have to iterate over the elements. typedef typename SpProxy::const_iterator_type it_type; it_type it = P.begin(); it_type it_end = P.end(); while (it != it_end) { const T tmp_val = std::abs(*it); if (tmp_val < min_val) { min_val = tmp_val; ret_val = *it; } ++it; } } else { // We can do direct access of the values, row_indices, and col_ptrs. // We don't need the location of the min value, so we can just call out to // other functions... ret_val = op_min::direct_min(P.get_values(), n_nonzero); min_val = std::abs(ret_val); } if(n_elem == n_nonzero) { return ret_val; } else { if (T(0) < min_val) return eT(0); else return ret_val; } } template inline typename arma_cx_only::result spop_min::min_with_index(const SpProxy& P, uword& index_of_min_val) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename get_pod_type::result T; const uword n_elem = P.get_n_elem(); const uword n_nonzero = P.get_n_nonzero(); const uword n_rows = P.get_n_rows(); if(n_elem == 0) { arma_debug_check(true, "min(): object has no elements"); return Datum::nan; } T min_val = priv::most_pos(); if(SpProxy::must_use_iterator) { // We have to iterate over the elements. typedef typename SpProxy::const_iterator_type it_type; it_type it = P.begin(); it_type it_end = P.end(); while (it != it_end) { const T tmp_val = std::abs(*it); if (tmp_val < min_val) { min_val = tmp_val; index_of_min_val = it.row() + it.col() * n_rows; } ++it; } } else { // We can do direct access. min_val = std::abs(op_min::direct_min(P.get_values(), n_nonzero, index_of_min_val)); // Convert to actual position in matrix. const uword row = P.get_row_indices()[index_of_min_val]; uword col = 0; while (P.get_col_ptrs()[++col] < index_of_min_val + 1) { } index_of_min_val = (col - 1) * n_rows + row; } if(n_elem != n_nonzero) { min_val = std::min(T(0), min_val); // If the min_val is a nonzero element, we need its actual position in the matrix. if(min_val == T(0)) { // Find first zero element. uword last_row = 0; uword last_col = 0; typedef typename SpProxy::const_iterator_type it_type; it_type it = P.begin(); it_type it_end = P.end(); while (it != it_end) { // Have we moved more than one position from the last place? if ((it.col() == last_col) && (it.row() - last_row > 1)) { index_of_min_val = it.col() * n_rows + last_row + 1; break; } else if ((it.col() >= last_col + 1) && (last_row < n_rows - 1)) { index_of_min_val = last_col * n_rows + last_row + 1; break; } else if ((it.col() == last_col + 1) && (it.row() > 0)) { index_of_min_val = it.col() * n_rows; break; } else if (it.col() > last_col + 1) { index_of_min_val = (last_col + 1) * n_rows; break; } last_row = it.row(); last_col = it.col(); ++it; } } } return P[index_of_min_val]; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spop_misc_bones.hpp ================================================ // Copyright (C) 2012-2015 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_misc //! @{ class spop_scalar_times { public: template inline static void apply(SpMat& out, const SpOp& in); }; class spop_square { public: template inline static void apply(SpMat& out, const SpOp& in); }; class spop_sqrt { public: template inline static void apply(SpMat& out, const SpOp& in); }; class spop_abs { public: template inline static void apply(SpMat& out, const SpOp& in); }; class spop_cx_abs { public: template inline static void apply(SpMat& out, const mtSpOp& in); }; class spop_real { public: template inline static void apply(SpMat& out, const mtSpOp& in); }; class spop_imag { public: template inline static void apply(SpMat& out, const mtSpOp& in); }; class spop_conj { public: template inline static void apply(SpMat& out, const SpOp& in); }; class spop_repmat { public: template inline static void apply(SpMat& out, const SpOp& in); }; class spop_reshape { public: template inline static void apply(SpMat& out, const SpOp& in); }; class spop_resize { public: template inline static void apply(SpMat& out, const SpOp& in); }; class spop_diagmat { public: template inline static void apply(SpMat& out, const SpOp& in); template inline static void apply_noalias(SpMat& out, const SpProxy& p); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spop_misc_meat.hpp ================================================ // Copyright (C) 2012-2015 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_misc //! @{ namespace priv { template struct functor_scalar_times { const eT k; functor_scalar_times(const eT in_k) : k(in_k) {} arma_inline eT operator()(const eT val) const { return val * k; } }; } template inline void spop_scalar_times::apply(SpMat& out, const SpOp& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; if(in.aux != eT(0)) { out.init_xform(in.m, priv::functor_scalar_times(in.aux)); } else { const SpProxy P(in.m); out.zeros( P.get_n_rows(), P.get_n_cols() ); } } namespace priv { struct functor_square { template arma_inline eT operator()(const eT val) const { return val*val; } }; } template inline void spop_square::apply(SpMat& out, const SpOp& in) { arma_extra_debug_sigprint(); out.init_xform(in.m, priv::functor_square()); } namespace priv { struct functor_sqrt { template arma_inline eT operator()(const eT val) const { return eop_aux::sqrt(val); } }; } template inline void spop_sqrt::apply(SpMat& out, const SpOp& in) { arma_extra_debug_sigprint(); out.init_xform(in.m, priv::functor_sqrt()); } namespace priv { struct functor_abs { template arma_inline eT operator()(const eT val) const { return eop_aux::arma_abs(val); } }; } template inline void spop_abs::apply(SpMat& out, const SpOp& in) { arma_extra_debug_sigprint(); out.init_xform(in.m, priv::functor_abs()); } namespace priv { struct functor_cx_abs { template arma_inline T operator()(const std::complex& val) const { return std::abs(val); } }; } template inline void spop_cx_abs::apply(SpMat& out, const mtSpOp& in) { arma_extra_debug_sigprint(); out.init_xform_mt(in.m, priv::functor_cx_abs()); } namespace priv { struct functor_real { template arma_inline T operator()(const std::complex& val) const { return val.real(); } }; } template inline void spop_real::apply(SpMat& out, const mtSpOp& in) { arma_extra_debug_sigprint(); out.init_xform_mt(in.m, priv::functor_real()); } namespace priv { struct functor_imag { template arma_inline T operator()(const std::complex& val) const { return val.imag(); } }; } template inline void spop_imag::apply(SpMat& out, const mtSpOp& in) { arma_extra_debug_sigprint(); out.init_xform_mt(in.m, priv::functor_imag()); } namespace priv { struct functor_conj { template arma_inline eT operator()(const eT val) const { return eop_aux::conj(val); } }; } template inline void spop_conj::apply(SpMat& out, const SpOp& in) { arma_extra_debug_sigprint(); out.init_xform(in.m, priv::functor_conj()); } template inline void spop_repmat::apply(SpMat& out, const SpOp& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const unwrap_spmat U(in.m); const SpMat& X = U.M; const uword X_n_rows = X.n_rows; const uword X_n_cols = X.n_cols; const uword copies_per_row = in.aux_uword_a; const uword copies_per_col = in.aux_uword_b; // out.set_size(X_n_rows * copies_per_row, X_n_cols * copies_per_col); // // const uword out_n_rows = out.n_rows; // const uword out_n_cols = out.n_cols; // // if( (out_n_rows > 0) && (out_n_cols > 0) ) // { // for(uword col = 0; col < out_n_cols; col += X_n_cols) // for(uword row = 0; row < out_n_rows; row += X_n_rows) // { // out.submat(row, col, row+X_n_rows-1, col+X_n_cols-1) = X; // } // } SpMat tmp(X_n_rows * copies_per_row, X_n_cols); if(tmp.n_elem > 0) { for(uword row = 0; row < tmp.n_rows; row += X_n_rows) { tmp.submat(row, 0, row+X_n_rows-1, X_n_cols-1) = X; } } // tmp contains copies of the input matrix, so no need to check for aliasing out.set_size(X_n_rows * copies_per_row, X_n_cols * copies_per_col); const uword out_n_rows = out.n_rows; const uword out_n_cols = out.n_cols; if( (out_n_rows > 0) && (out_n_cols > 0) ) { for(uword col = 0; col < out_n_cols; col += X_n_cols) { out.submat(0, col, out_n_rows-1, col+X_n_cols-1) = tmp; } } } template inline void spop_reshape::apply(SpMat& out, const SpOp& in) { arma_extra_debug_sigprint(); out = in.m; out.reshape(in.aux_uword_a, in.aux_uword_b); } template inline void spop_resize::apply(SpMat& out, const SpOp& in) { arma_extra_debug_sigprint(); out = in.m; out.resize(in.aux_uword_a, in.aux_uword_b); } template inline void spop_diagmat::apply(SpMat& out, const SpOp& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const SpProxy p(in.m); if(p.is_alias(out) == false) { spop_diagmat::apply_noalias(out, p); } else { SpMat tmp; spop_diagmat::apply_noalias(tmp, p); out.steal_mem(tmp); } } template inline void spop_diagmat::apply_noalias(SpMat& out, const SpProxy& p) { arma_extra_debug_sigprint(); const uword n_rows = p.get_n_rows(); const uword n_cols = p.get_n_cols(); const bool p_is_vec = (n_rows == 1) || (n_cols == 1); if(p_is_vec) // generate a diagonal matrix out of a vector { const uword N = (n_rows == 1) ? n_cols : n_rows; out.zeros(N, N); if(p.get_n_nonzero() == 0) { return; } typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); if(n_cols == 1) { while(it != it_end) { const uword row = it.row(); out.at(row,row) = (*it); ++it; } } else if(n_rows == 1) { while(it != it_end) { const uword col = it.col(); out.at(col,col) = (*it); ++it; } } } else // generate a diagonal matrix out of a matrix { arma_debug_check( (n_rows != n_cols), "diagmat(): given matrix is not square" ); out.zeros(n_rows, n_rows); if(p.get_n_nonzero() == 0) { return; } typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); while(it != it_end) { const uword row = it.row(); const uword col = it.col(); if(row == col) { out.at(row,row) = (*it); } ++it; } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spop_strans_bones.hpp ================================================ // Copyright (C) 2012-2014 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_strans //! @{ //! simple transpose operation (no complex conjugates) for sparse matrices class spop_strans { public: template arma_hot inline static void apply_spmat(SpMat& out, const SpMat& X); template arma_hot inline static void apply_proxy(SpMat& out, const T1& X); template arma_hot inline static void apply(SpMat& out, const SpOp& in); template arma_hot inline static void apply(SpMat& out, const SpOp& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spop_strans_meat.hpp ================================================ // Copyright (C) 2012-2014 Ryan Curtin // Copyright (C) 2012-2014 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_strans //! @{ template arma_hot inline void spop_strans::apply_spmat(SpMat& out, const SpMat& X) { arma_extra_debug_sigprint(); typedef typename umat::elem_type ueT; const uword N = X.n_nonzero; if(N == uword(0)) { out.zeros(X.n_cols, X.n_rows); return; } umat locs(2, N); typename SpMat::const_iterator it = X.begin(); for(uword count = 0; count < N; ++count) { ueT* locs_ptr = locs.colptr(count); locs_ptr[0] = it.col(); locs_ptr[1] = it.row(); ++it; } const Col vals(const_cast(X.values), N, false); SpMat tmp(locs, vals, X.n_cols, X.n_rows); out.steal_mem(tmp); } template arma_hot inline void spop_strans::apply_proxy(SpMat& out, const T1& X) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; typedef typename umat::elem_type ueT; const SpProxy p(X); const uword N = p.get_n_nonzero(); if(N == uword(0)) { out.zeros(p.get_n_cols(), p.get_n_rows()); return; } umat locs(2, N); Col vals(N); eT* vals_ptr = vals.memptr(); typename SpProxy::const_iterator_type it = p.begin(); for(uword count = 0; count < N; ++count) { ueT* locs_ptr = locs.colptr(count); locs_ptr[0] = it.col(); locs_ptr[1] = it.row(); vals_ptr[count] = (*it); ++it; } SpMat tmp(locs, vals, p.get_n_cols(), p.get_n_rows()); out.steal_mem(tmp); } template arma_hot inline void spop_strans::apply(SpMat& out, const SpOp& in) { arma_extra_debug_sigprint(); if(is_SpMat::value) { const unwrap_spmat tmp(in.m); spop_strans::apply_spmat(out, tmp.M); } else { spop_strans::apply_proxy(out, in.m); } } //! for transpose of non-complex matrices, redirected from spop_htrans::apply() template arma_hot inline void spop_strans::apply(SpMat& out, const SpOp& in) { arma_extra_debug_sigprint(); if(is_SpMat::value) { const unwrap_spmat tmp(in.m); spop_strans::apply_spmat(out, tmp.M); } else { spop_strans::apply_proxy(out, in.m); } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spop_sum_bones.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_sum //! @{ class spop_sum { public: template arma_hot inline static void apply(SpMat& out, const SpOp& in); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spop_sum_meat.hpp ================================================ // Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012-2015 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_sum //! @{ template arma_hot inline void spop_sum::apply(SpMat& out, const SpOp& in) { arma_extra_debug_sigprint(); typedef typename T1::elem_type eT; const uword dim = in.aux_uword_a; arma_debug_check( (dim > 1), "sum(): parameter 'dim' must be 0 or 1" ); const SpProxy p(in.m); const uword p_n_rows = p.get_n_rows(); const uword p_n_cols = p.get_n_cols(); if(p.get_n_nonzero() == 0) { if(dim == 0) { out.zeros(1,p_n_cols); } if(dim == 1) { out.zeros(p_n_rows,1); } return; } if(dim == 0) // find the sum in each column { Row acc(p_n_cols, fill::zeros); if(SpProxy::must_use_iterator) { typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); while(it != it_end) { acc[it.col()] += (*it); ++it; } } else { for(uword col = 0; col < p_n_cols; ++col) { acc[col] = arrayops::accumulate ( &p.get_values()[p.get_col_ptrs()[col]], p.get_col_ptrs()[col + 1] - p.get_col_ptrs()[col] ); } } out = acc; } else if(dim == 1) // find the sum in each row { Col acc(p_n_rows, fill::zeros); typename SpProxy::const_iterator_type it = p.begin(); typename SpProxy::const_iterator_type it_end = p.end(); while(it != it_end) { acc[it.row()] += (*it); ++it; } out = acc; } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spop_var_bones.hpp ================================================ // Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_var //! @{ //! Class for finding variance values of a sparse matrix class spop_var { public: template inline static void apply(SpMat& out, const mtSpOp& in); template inline static void apply_noalias(SpMat& out, const SpProxy& p, const uword norm_type, const uword dim); // Calculate variance of a sparse vector, where we can directly use the memory. template inline static typename T1::pod_type var_vec(const T1& X, const uword norm_type = 0); // Calculate the variance directly. Because this is for sparse matrices, we // specify both the number of elements in the array (the length of the array) // as well as the actual number of elements when zeros are included. template inline static eT direct_var(const eT* const X, const uword length, const uword N, const uword norm_type = 0); // For complex numbers. template inline static T direct_var(const std::complex* const X, const uword length, const uword N, const uword norm_type = 0); // Calculate the variance using iterators, for non-complex numbers. template inline static eT iterator_var(T1& it, const T1& end, const uword n_zero, const uword norm_type, const eT junk1, const typename arma_not_cx::result* junk2 = 0); // Calculate the variance using iterators, for complex numbers. template inline static typename get_pod_type::result iterator_var(T1& it, const T1& end, const uword n_zero, const uword norm_type, const eT junk1, const typename arma_cx_only::result* junk2 = 0); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/spop_var_meat.hpp ================================================ // Copyright (C) 2012 Ryan Curtin // Copyright (C) 2012-2015 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_var //! @{ template inline void spop_var::apply(SpMat& out, const mtSpOp& in) { arma_extra_debug_sigprint(); //typedef typename T1::elem_type in_eT; typedef typename T1::pod_type out_eT; const uword norm_type = in.aux_uword_a; const uword dim = in.aux_uword_b; arma_debug_check( (norm_type > 1), "var(): parameter 'norm_type' must be 0 or 1" ); arma_debug_check( (dim > 1), "var(): parameter 'dim' must be 0 or 1" ); const SpProxy p(in.m); if(p.is_alias(out) == false) { spop_var::apply_noalias(out, p, norm_type, dim); } else { SpMat tmp; spop_var::apply_noalias(tmp, p, norm_type, dim); out.steal_mem(tmp); } } template inline void spop_var::apply_noalias ( SpMat& out, const SpProxy& p, const uword norm_type, const uword dim ) { arma_extra_debug_sigprint(); typedef typename T1::elem_type in_eT; //typedef typename T1::pod_type out_eT; const uword p_n_rows = p.get_n_rows(); const uword p_n_cols = p.get_n_cols(); // TODO: this is slow; rewrite based on the approach used by sparse mean() if(dim == 0) // find variance in each column { arma_extra_debug_print("spop_var::apply_noalias(): dim = 0"); out.set_size((p_n_rows > 0) ? 1 : 0, p_n_cols); if( (p_n_rows == 0) || (p.get_n_nonzero() == 0) ) { return; } for(uword col = 0; col < p_n_cols; ++col) { if(SpProxy::must_use_iterator) { // We must use an iterator; we can't access memory directly. typename SpProxy::const_iterator_type it = p.begin_col(col); typename SpProxy::const_iterator_type end = p.begin_col(col + 1); const uword n_zero = p_n_rows - (end.pos() - it.pos()); // in_eT is used just to get the specialization right (complex / noncomplex) out.at(0, col) = spop_var::iterator_var(it, end, n_zero, norm_type, in_eT(0)); } else { // We can use direct memory access to calculate the variance. out.at(0, col) = spop_var::direct_var ( &p.get_values()[p.get_col_ptrs()[col]], p.get_col_ptrs()[col + 1] - p.get_col_ptrs()[col], p_n_rows, norm_type ); } } } else if(dim == 1) // find variance in each row { arma_extra_debug_print("spop_var::apply_noalias(): dim = 1"); out.set_size(p_n_rows, (p_n_cols > 0) ? 1 : 0); if( (p_n_cols == 0) || (p.get_n_nonzero() == 0) ) { return; } for(uword row = 0; row < p_n_rows; ++row) { // We have to use an iterator here regardless of whether or not we can // directly access memory. typename SpProxy::const_row_iterator_type it = p.begin_row(row); typename SpProxy::const_row_iterator_type end = p.end_row(row); const uword n_zero = p_n_cols - (end.pos() - it.pos()); out.at(row, 0) = spop_var::iterator_var(it, end, n_zero, norm_type, in_eT(0)); } } } template inline typename T1::pod_type spop_var::var_vec ( const T1& X, const uword norm_type ) { arma_extra_debug_sigprint(); arma_debug_check( (norm_type > 1), "var(): parameter 'norm_type' must be 0 or 1" ); // conditionally unwrap it into a temporary and then directly operate. const unwrap_spmat tmp(X); return direct_var(tmp.M.values, tmp.M.n_nonzero, tmp.M.n_elem, norm_type); } template inline eT spop_var::direct_var ( const eT* const X, const uword length, const uword N, const uword norm_type ) { arma_extra_debug_sigprint(); if(length >= 2 && N >= 2) { const eT acc1 = spop_mean::direct_mean(X, length, N); eT acc2 = eT(0); eT acc3 = eT(0); uword i, j; for(i = 0, j = 1; j < length; i += 2, j += 2) { const eT Xi = X[i]; const eT Xj = X[j]; const eT tmpi = acc1 - Xi; const eT tmpj = acc1 - Xj; acc2 += tmpi * tmpi + tmpj * tmpj; acc3 += tmpi + tmpj; } if(i < length) { const eT Xi = X[i]; const eT tmpi = acc1 - Xi; acc2 += tmpi * tmpi; acc3 += tmpi; } // Now add in all zero elements. acc2 += (N - length) * (acc1 * acc1); acc3 += (N - length) * acc1; const eT norm_val = (norm_type == 0) ? eT(N - 1) : eT(N); const eT var_val = (acc2 - (acc3 * acc3) / eT(N)) / norm_val; return var_val; } else if(length == 1 && N > 1) // if N == 1, then variance is zero. { const eT mean = X[0] / eT(N); const eT val = mean - X[0]; const eT acc2 = (val * val) + (N - length) * (mean * mean); const eT acc3 = val + (N - length) * mean; const eT norm_val = (norm_type == 0) ? eT(N - 1) : eT(N); const eT var_val = (acc2 - (acc3 * acc3) / eT(N)) / norm_val; return var_val; } else { return eT(0); } } template inline T spop_var::direct_var ( const std::complex* const X, const uword length, const uword N, const uword norm_type ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; if(length >= 2 && N >= 2) { const eT acc1 = spop_mean::direct_mean(X, length, N); T acc2 = T(0); eT acc3 = eT(0); for (uword i = 0; i < length; ++i) { const eT tmp = acc1 - X[i]; acc2 += std::norm(tmp); acc3 += tmp; } // Add zero elements to sums acc2 += std::norm(acc1) * T(N - length); acc3 += acc1 * T(N - length); const T norm_val = (norm_type == 0) ? T(N - 1) : T(N); const T var_val = (acc2 - std::norm(acc3) / T(N)) / norm_val; return var_val; } else if(length == 1 && N > 1) // if N == 1, then variance is zero. { const eT mean = X[0] / T(N); const eT val = mean - X[0]; const T acc2 = std::norm(val) + (N - length) * std::norm(mean); const eT acc3 = val + T(N - length) * mean; const T norm_val = (norm_type == 0) ? T(N - 1) : T(N); const T var_val = (acc2 - std::norm(acc3) / T(N)) / norm_val; return var_val; } else { return T(0); // All elements are zero } } template inline eT spop_var::iterator_var ( T1& it, const T1& end, const uword n_zero, const uword norm_type, const eT junk1, const typename arma_not_cx::result* junk2 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); T1 new_it(it); // for mean // T1 backup_it(it); // in case we have to call robust iterator_var eT mean = spop_mean::iterator_mean(new_it, end, n_zero, eT(0)); eT acc2 = eT(0); eT acc3 = eT(0); const uword it_begin_pos = it.pos(); while (it != end) { const eT tmp = mean - (*it); acc2 += (tmp * tmp); acc3 += (tmp); ++it; } const uword n_nonzero = (it.pos() - it_begin_pos); if (n_nonzero == 0) { return eT(0); } if (n_nonzero + n_zero == 1) { return eT(0); // only one element } // Add in entries for zeros. acc2 += eT(n_zero) * (mean * mean); acc3 += eT(n_zero) * mean; const eT norm_val = (norm_type == 0) ? eT(n_zero + n_nonzero - 1) : eT(n_zero + n_nonzero); const eT var_val = (acc2 - (acc3 * acc3) / eT(n_nonzero + n_zero)) / norm_val; return var_val; } template inline typename get_pod_type::result spop_var::iterator_var ( T1& it, const T1& end, const uword n_zero, const uword norm_type, const eT junk1, const typename arma_cx_only::result* junk2 ) { arma_extra_debug_sigprint(); arma_ignore(junk1); arma_ignore(junk2); typedef typename get_pod_type::result T; T1 new_it(it); // for mean // T1 backup_it(it); // in case we have to call robust iterator_var eT mean = spop_mean::iterator_mean(new_it, end, n_zero, eT(0)); T acc2 = T(0); eT acc3 = eT(0); const uword it_begin_pos = it.pos(); while (it != end) { eT tmp = mean - (*it); acc2 += std::norm(tmp); acc3 += (tmp); ++it; } const uword n_nonzero = (it.pos() - it_begin_pos); if (n_nonzero == 0) { return T(0); } if (n_nonzero + n_zero == 1) { return T(0); // only one element } // Add in entries for zero elements. acc2 += T(n_zero) * std::norm(mean); acc3 += T(n_zero) * mean; const T norm_val = (norm_type == 0) ? T(n_zero + n_nonzero - 1) : T(n_zero + n_nonzero); const T var_val = (acc2 - std::norm(acc3) / T(n_nonzero + n_zero)) / norm_val; return var_val; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/strip.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup strip //! @{ template struct strip_diagmat { typedef T1 stored_type; arma_hot inline strip_diagmat(const T1& X) : M(X) { arma_extra_debug_sigprint(); } static const bool do_diagmat = false; const T1& M; }; template struct strip_diagmat< Op > { typedef T1 stored_type; arma_hot inline strip_diagmat(const Op& X) : M(X.m) { arma_extra_debug_sigprint(); } static const bool do_diagmat = true; const T1& M; }; template struct strip_inv { typedef T1 stored_type; arma_hot inline strip_inv(const T1& X) : M(X) { arma_extra_debug_sigprint(); } const T1& M; static const bool slow = false; static const bool do_inv = false; }; template struct strip_inv< Op > { typedef T1 stored_type; arma_hot inline strip_inv(const Op& X) : M(X.m) , slow(X.aux_uword_a == 1) { arma_extra_debug_sigprint(); } const T1& M; const bool slow; static const bool do_inv = true; }; template struct strip_inv< Op > { typedef T1 stored_type; arma_hot inline strip_inv(const Op& X) : M(X.m) , slow(X.aux_uword_a == 1) { arma_extra_debug_sigprint(); } const T1& M; const bool slow; static const bool do_inv = true; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/subview_bones.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // Copyright (C) 2011 James Sanders // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup subview //! @{ //! Class for storing data required to construct or apply operations to a submatrix //! (i.e. where the submatrix starts and ends as well as a reference/pointer to the original matrix), template class subview : public Base > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; arma_aligned const Mat& m; static const bool is_row = false; static const bool is_col = false; const uword aux_row1; const uword aux_col1; const uword n_rows; const uword n_cols; const uword n_elem; protected: arma_inline subview(const Mat& in_m, const uword in_row1, const uword in_col1, const uword in_n_rows, const uword in_n_cols); public: inline ~subview(); inline void operator= (const eT val); inline void operator+= (const eT val); inline void operator-= (const eT val); inline void operator*= (const eT val); inline void operator/= (const eT val); // deliberately returning void template inline void operator= (const Base& x); template inline void operator+= (const Base& x); template inline void operator-= (const Base& x); template inline void operator%= (const Base& x); template inline void operator/= (const Base& x); template inline void operator= (const SpBase& x); template inline void operator+=(const SpBase& x); template inline void operator-=(const SpBase& x); template inline void operator%=(const SpBase& x); template inline void operator/=(const SpBase& x); inline void operator= (const subview& x); inline void operator+= (const subview& x); inline void operator-= (const subview& x); inline void operator%= (const subview& x); inline void operator/= (const subview& x); template inline typename enable_if2< is_same_type::value, void>::result operator=(const Gen& x); inline static void extract(Mat& out, const subview& in); inline static void plus_inplace(Mat& out, const subview& in); inline static void minus_inplace(Mat& out, const subview& in); inline static void schur_inplace(Mat& out, const subview& in); inline static void div_inplace(Mat& out, const subview& in); template inline void transform(functor F); template inline void imbue(functor F); inline void fill(const eT val); inline void zeros(); inline void ones(); inline void eye(); inline void randu(); inline void randn(); inline eT at_alt (const uword ii) const; inline eT& operator[](const uword ii); inline eT operator[](const uword ii) const; inline eT& operator()(const uword ii); inline eT operator()(const uword ii) const; inline eT& operator()(const uword in_row, const uword in_col); inline eT operator()(const uword in_row, const uword in_col) const; inline eT& at(const uword in_row, const uword in_col); inline eT at(const uword in_row, const uword in_col) const; arma_inline eT* colptr(const uword in_col); arma_inline const eT* colptr(const uword in_col) const; inline bool check_overlap(const subview& x) const; inline arma_warn_unused bool is_vec() const; inline arma_warn_unused bool is_finite() const; inline arma_warn_unused bool has_inf() const; inline arma_warn_unused bool has_nan() const; inline subview_row row(const uword row_num); inline const subview_row row(const uword row_num) const; inline subview_row operator()(const uword row_num, const span& col_span); inline const subview_row operator()(const uword row_num, const span& col_span) const; inline subview_col col(const uword col_num); inline const subview_col col(const uword col_num) const; inline subview_col operator()(const span& row_span, const uword col_num); inline const subview_col operator()(const span& row_span, const uword col_num) const; inline Col unsafe_col(const uword col_num); inline const Col unsafe_col(const uword col_num) const; inline subview rows(const uword in_row1, const uword in_row2); inline const subview rows(const uword in_row1, const uword in_row2) const; inline subview cols(const uword in_col1, const uword in_col2); inline const subview cols(const uword in_col1, const uword in_col2) const; inline subview submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2); inline const subview submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) const; inline subview submat (const span& row_span, const span& col_span); inline const subview submat (const span& row_span, const span& col_span) const; inline subview operator()(const span& row_span, const span& col_span); inline const subview operator()(const span& row_span, const span& col_span) const; inline subview_each1< subview, 0 > each_col(); inline subview_each1< subview, 1 > each_row(); template inline subview_each2< subview, 0, T1 > each_col(const Base& indices); template inline subview_each2< subview, 1, T1 > each_row(const Base& indices); inline diagview diag(const sword in_id = 0); inline const diagview diag(const sword in_id = 0) const; inline void swap_rows(const uword in_row1, const uword in_row2); inline void swap_cols(const uword in_col1, const uword in_col2); private: friend class Mat; subview(); }; template class subview_col : public subview { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = false; static const bool is_col = true; const eT* colmem; inline void operator= (const subview& x); inline void operator= (const subview_col& x); inline void operator= (const eT val); template inline void operator= (const Base& x); template inline typename enable_if2< is_same_type::value, void>::result operator=(const Gen& x); arma_inline const Op,op_htrans> t() const; arma_inline const Op,op_htrans> ht() const; arma_inline const Op,op_strans> st() const; inline void fill(const eT val); inline void zeros(); inline void ones(); arma_inline eT at_alt (const uword i) const; arma_inline eT& operator[](const uword i); arma_inline eT operator[](const uword i) const; inline eT& operator()(const uword i); inline eT operator()(const uword i) const; inline eT& operator()(const uword in_row, const uword in_col); inline eT operator()(const uword in_row, const uword in_col) const; inline eT& at(const uword in_row, const uword in_col); inline eT at(const uword in_row, const uword in_col) const; arma_inline eT* colptr(const uword in_col); arma_inline const eT* colptr(const uword in_col) const; inline subview_col rows(const uword in_row1, const uword in_row2); inline const subview_col rows(const uword in_row1, const uword in_row2) const; inline subview_col subvec(const uword in_row1, const uword in_row2); inline const subview_col subvec(const uword in_row1, const uword in_row2) const; inline subview_col head(const uword N); inline const subview_col head(const uword N) const; inline subview_col tail(const uword N); inline const subview_col tail(const uword N) const; protected: inline subview_col(const Mat& in_m, const uword in_col); inline subview_col(const Mat& in_m, const uword in_col, const uword in_row1, const uword in_n_rows); private: friend class Mat; friend class Col; friend class subview; subview_col(); }; template class subview_row : public subview { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = true; static const bool is_col = false; inline void operator= (const subview& x); inline void operator= (const subview_row& x); inline void operator= (const eT val); template inline void operator= (const Base& x); template inline typename enable_if2< is_same_type::value, void>::result operator=(const Gen& x); arma_inline const Op,op_htrans> t() const; arma_inline const Op,op_htrans> ht() const; arma_inline const Op,op_strans> st() const; inline eT at_alt (const uword i) const; inline eT& operator[](const uword i); inline eT operator[](const uword i) const; inline eT& operator()(const uword i); inline eT operator()(const uword i) const; inline eT& operator()(const uword in_row, const uword in_col); inline eT operator()(const uword in_row, const uword in_col) const; inline eT& at(const uword in_row, const uword in_col); inline eT at(const uword in_row, const uword in_col) const; inline subview_row cols(const uword in_col1, const uword in_col2); inline const subview_row cols(const uword in_col1, const uword in_col2) const; inline subview_row subvec(const uword in_col1, const uword in_col2); inline const subview_row subvec(const uword in_col1, const uword in_col2) const; inline subview_row head(const uword N); inline const subview_row head(const uword N) const; inline subview_row tail(const uword N); inline const subview_row tail(const uword N) const; protected: inline subview_row(const Mat& in_m, const uword in_row); inline subview_row(const Mat& in_m, const uword in_row, const uword in_col1, const uword in_n_cols); private: friend class Mat; friend class Row; friend class subview; subview_row(); }; template class subview_row_strans : public Base > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = false; static const bool is_col = true; arma_aligned const subview_row& sv_row; const uword n_rows; // equal to n_elem const uword n_elem; static const uword n_cols = 1; inline explicit subview_row_strans(const subview_row& in_sv_row); inline void extract(Mat& out) const; inline eT at_alt (const uword i) const; inline eT operator[](const uword i) const; inline eT operator()(const uword i) const; inline eT operator()(const uword in_row, const uword in_col) const; inline eT at(const uword in_row, const uword in_col) const; }; template class subview_row_htrans : public Base > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = false; static const bool is_col = true; arma_aligned const subview_row& sv_row; const uword n_rows; // equal to n_elem const uword n_elem; static const uword n_cols = 1; inline explicit subview_row_htrans(const subview_row& in_sv_row); inline void extract(Mat& out) const; inline eT at_alt (const uword i) const; inline eT operator[](const uword i) const; inline eT operator()(const uword i) const; inline eT operator()(const uword in_row, const uword in_col) const; inline eT at(const uword in_row, const uword in_col) const; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/subview_cube_bones.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup subview_cube //! @{ //! Class for storing data required to construct or apply operations to a subcube //! (i.e. where the subcube starts and ends as well as a reference/pointer to the original cube), template class subview_cube : public BaseCube > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; arma_aligned const Cube& m; const uword aux_row1; const uword aux_col1; const uword aux_slice1; const uword n_rows; const uword n_cols; const uword n_elem_slice; const uword n_slices; const uword n_elem; protected: arma_inline subview_cube(const Cube& in_m, const uword in_row1, const uword in_col1, const uword in_slice1, const uword in_n_rows, const uword in_n_cols, const uword in_n_slices); public: inline ~subview_cube(); inline void operator= (const eT val); inline void operator+= (const eT val); inline void operator-= (const eT val); inline void operator*= (const eT val); inline void operator/= (const eT val); // deliberately returning void template inline void operator= (const BaseCube& x); template inline void operator+= (const BaseCube& x); template inline void operator-= (const BaseCube& x); template inline void operator%= (const BaseCube& x); template inline void operator/= (const BaseCube& x); inline void operator= (const subview_cube& x); inline void operator+= (const subview_cube& x); inline void operator-= (const subview_cube& x); inline void operator%= (const subview_cube& x); inline void operator/= (const subview_cube& x); template inline void operator= (const Base& x); template inline void operator+= (const Base& x); template inline void operator-= (const Base& x); template inline void operator%= (const Base& x); template inline void operator/= (const Base& x); inline static void extract(Cube& out, const subview_cube& in); inline static void plus_inplace(Cube& out, const subview_cube& in); inline static void minus_inplace(Cube& out, const subview_cube& in); inline static void schur_inplace(Cube& out, const subview_cube& in); inline static void div_inplace(Cube& out, const subview_cube& in); inline static void extract(Mat& out, const subview_cube& in); inline static void plus_inplace(Mat& out, const subview_cube& in); inline static void minus_inplace(Mat& out, const subview_cube& in); inline static void schur_inplace(Mat& out, const subview_cube& in); inline static void div_inplace(Mat& out, const subview_cube& in); template inline void transform(functor F); template inline void imbue(functor F); inline void fill(const eT val); inline void zeros(); inline void ones(); inline void randu(); inline void randn(); inline arma_warn_unused bool is_finite() const; inline arma_warn_unused bool has_inf() const; inline arma_warn_unused bool has_nan() const; inline arma_warn_unused eT min() const; inline arma_warn_unused eT max() const; inline eT at_alt (const uword i) const; inline eT& operator[](const uword i); inline eT operator[](const uword i) const; inline eT& operator()(const uword i); inline eT operator()(const uword i) const; arma_inline eT& operator()(const uword in_row, const uword in_col, const uword in_slice); arma_inline eT operator()(const uword in_row, const uword in_col, const uword in_slice) const; arma_inline eT& at(const uword in_row, const uword in_col, const uword in_slice); arma_inline eT at(const uword in_row, const uword in_col, const uword in_slice) const; arma_inline eT* slice_colptr(const uword in_slice, const uword in_col); arma_inline const eT* slice_colptr(const uword in_slice, const uword in_col) const; inline bool check_overlap(const subview_cube& x) const; inline bool check_overlap(const Mat& x) const; private: friend class Mat; friend class Cube; subview_cube(); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/subview_cube_meat.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup subview_cube //! @{ template inline subview_cube::~subview_cube() { arma_extra_debug_sigprint(); } template arma_inline subview_cube::subview_cube ( const Cube& in_m, const uword in_row1, const uword in_col1, const uword in_slice1, const uword in_n_rows, const uword in_n_cols, const uword in_n_slices ) : m (in_m) , aux_row1 (in_row1) , aux_col1 (in_col1) , aux_slice1 (in_slice1) , n_rows (in_n_rows) , n_cols (in_n_cols) , n_elem_slice(in_n_rows * in_n_cols) , n_slices (in_n_slices) , n_elem (n_elem_slice * in_n_slices) { arma_extra_debug_sigprint(); } template inline void subview_cube::operator= (const eT val) { arma_extra_debug_sigprint(); if(n_elem != 1) { arma_debug_assert_same_size(n_rows, n_cols, n_slices, 1, 1, 1, "copy into subcube"); } Cube& Q = const_cast< Cube& >(m); Q.at(aux_row1, aux_col1, aux_slice1) = val; } template inline void subview_cube::operator+= (const eT val) { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; for(uword slice = 0; slice < local_n_slices; ++slice) { for(uword col = 0; col < local_n_cols; ++col) { arrayops::inplace_plus( slice_colptr(slice,col), val, local_n_rows ); } } } template inline void subview_cube::operator-= (const eT val) { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; for(uword slice = 0; slice < local_n_slices; ++slice) { for(uword col = 0; col < local_n_cols; ++col) { arrayops::inplace_minus( slice_colptr(slice,col), val, local_n_rows ); } } } template inline void subview_cube::operator*= (const eT val) { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; for(uword slice = 0; slice < local_n_slices; ++slice) { for(uword col = 0; col < local_n_cols; ++col) { arrayops::inplace_mul( slice_colptr(slice,col), val, local_n_rows ); } } } template inline void subview_cube::operator/= (const eT val) { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; for(uword slice = 0; slice < local_n_slices; ++slice) { for(uword col = 0; col < local_n_cols; ++col) { arrayops::inplace_div( slice_colptr(slice,col), val, local_n_rows ); } } } template template inline void subview_cube::operator= (const BaseCube& in) { arma_extra_debug_sigprint(); const unwrap_cube tmp(in.get_ref()); const Cube& x = tmp.M; subview_cube& t = *this; arma_debug_assert_same_size(t, x, "copy into subcube"); const uword t_n_rows = t.n_rows; const uword t_n_cols = t.n_cols; const uword t_n_slices = t.n_slices; for(uword slice = 0; slice < t_n_slices; ++slice) { for(uword col = 0; col < t_n_cols; ++col) { arrayops::copy( t.slice_colptr(slice,col), x.slice_colptr(slice,col), t_n_rows ); } } } template template inline void subview_cube::operator+= (const BaseCube& in) { arma_extra_debug_sigprint(); const unwrap_cube tmp(in.get_ref()); const Cube& x = tmp.M; subview_cube& t = *this; arma_debug_assert_same_size(t, x, "addition"); const uword t_n_rows = t.n_rows; const uword t_n_cols = t.n_cols; const uword t_n_slices = t.n_slices; for(uword slice = 0; slice < t_n_slices; ++slice) { for(uword col = 0; col < t_n_cols; ++col) { arrayops::inplace_plus( t.slice_colptr(slice,col), x.slice_colptr(slice,col), t_n_rows ); } } } template template inline void subview_cube::operator-= (const BaseCube& in) { arma_extra_debug_sigprint(); const unwrap_cube tmp(in.get_ref()); const Cube& x = tmp.M; subview_cube& t = *this; arma_debug_assert_same_size(t, x, "subtraction"); const uword t_n_rows = t.n_rows; const uword t_n_cols = t.n_cols; const uword t_n_slices = t.n_slices; for(uword slice = 0; slice < t_n_slices; ++slice) { for(uword col = 0; col < t_n_cols; ++col) { arrayops::inplace_minus( t.slice_colptr(slice,col), x.slice_colptr(slice,col), t_n_rows ); } } } template template inline void subview_cube::operator%= (const BaseCube& in) { arma_extra_debug_sigprint(); const unwrap_cube tmp(in.get_ref()); const Cube& x = tmp.M; subview_cube& t = *this; arma_debug_assert_same_size(t, x, "element-wise multiplication"); const uword t_n_rows = t.n_rows; const uword t_n_cols = t.n_cols; const uword t_n_slices = t.n_slices; for(uword slice = 0; slice < t_n_slices; ++slice) { for(uword col = 0; col < t_n_cols; ++col) { arrayops::inplace_mul( t.slice_colptr(slice,col), x.slice_colptr(slice,col), t_n_rows ); } } } template template inline void subview_cube::operator/= (const BaseCube& in) { arma_extra_debug_sigprint(); const unwrap_cube tmp(in.get_ref()); const Cube& x = tmp.M; subview_cube& t = *this; arma_debug_assert_same_size(t, x, "element-wise division"); const uword t_n_rows = t.n_rows; const uword t_n_cols = t.n_cols; const uword t_n_slices = t.n_slices; for(uword slice = 0; slice < t_n_slices; ++slice) { for(uword col = 0; col < t_n_cols; ++col) { arrayops::inplace_div( t.slice_colptr(slice,col), x.slice_colptr(slice,col), t_n_rows ); } } } //! x.subcube(...) = y.subcube(...) template inline void subview_cube::operator= (const subview_cube& x) { arma_extra_debug_sigprint(); if(check_overlap(x)) { const Cube tmp(x); (*this).operator=(tmp); return; } subview_cube& t = *this; arma_debug_assert_same_size(t, x, "copy into subcube"); const uword t_n_rows = t.n_rows; const uword t_n_cols = t.n_cols; const uword t_n_slices = t.n_slices; for(uword slice = 0; slice < t_n_slices; ++slice) { for(uword col = 0; col < t_n_cols; ++col) { arrayops::copy( t.slice_colptr(slice,col), x.slice_colptr(slice,col), t_n_rows ); } } } template inline void subview_cube::operator+= (const subview_cube& x) { arma_extra_debug_sigprint(); if(check_overlap(x)) { const Cube tmp(x); (*this).operator+=(tmp); return; } subview_cube& t = *this; arma_debug_assert_same_size(t, x, "addition"); const uword t_n_rows = t.n_rows; const uword t_n_cols = t.n_cols; const uword t_n_slices = t.n_slices; for(uword slice = 0; slice < t_n_slices; ++slice) { for(uword col = 0; col < t_n_cols; ++col) { arrayops::inplace_plus( t.slice_colptr(slice,col), x.slice_colptr(slice,col), t_n_rows ); } } } template inline void subview_cube::operator-= (const subview_cube& x) { arma_extra_debug_sigprint(); if(check_overlap(x)) { const Cube tmp(x); (*this).operator-=(tmp); return; } subview_cube& t = *this; arma_debug_assert_same_size(t, x, "subtraction"); const uword t_n_rows = t.n_rows; const uword t_n_cols = t.n_cols; const uword t_n_slices = t.n_slices; for(uword slice = 0; slice < t_n_slices; ++slice) { for(uword col = 0; col < t_n_cols; ++col) { arrayops::inplace_minus( t.slice_colptr(slice,col), x.slice_colptr(slice,col), t_n_rows ); } } } template inline void subview_cube::operator%= (const subview_cube& x) { arma_extra_debug_sigprint(); if(check_overlap(x)) { const Cube tmp(x); (*this).operator%=(tmp); return; } subview_cube& t = *this; arma_debug_assert_same_size(t, x, "element-wise multiplication"); const uword t_n_rows = t.n_rows; const uword t_n_cols = t.n_cols; const uword t_n_slices = t.n_slices; for(uword slice = 0; slice < t_n_slices; ++slice) { for(uword col = 0; col < t_n_cols; ++col) { arrayops::inplace_mul( t.slice_colptr(slice,col), x.slice_colptr(slice,col), t_n_rows ); } } } template inline void subview_cube::operator/= (const subview_cube& x) { arma_extra_debug_sigprint(); if(check_overlap(x)) { const Cube tmp(x); (*this).operator/=(tmp); return; } subview_cube& t = *this; arma_debug_assert_same_size(t, x, "element-wise division"); const uword t_n_rows = t.n_rows; const uword t_n_cols = t.n_cols; const uword t_n_slices = t.n_slices; for(uword slice = 0; slice < t_n_slices; ++slice) { for(uword col = 0; col < t_n_cols; ++col) { arrayops::inplace_div( t.slice_colptr(slice,col), x.slice_colptr(slice,col), t_n_rows ); } } } template template inline void subview_cube::operator= (const Base& in) { arma_extra_debug_sigprint(); const unwrap tmp(in.get_ref()); const Mat& x = tmp.M; subview_cube& t = *this; const uword t_n_rows = t.n_rows; const uword t_n_cols = t.n_cols; const uword t_n_slices = t.n_slices; const uword x_n_rows = x.n_rows; const uword x_n_cols = x.n_cols; if( ((x_n_rows == 1) || (x_n_cols == 1)) && (t_n_rows == 1) && (t_n_cols == 1) && (x.n_elem == t_n_slices) ) { Cube& Q = const_cast< Cube& >(t.m); const uword t_aux_row1 = t.aux_row1; const uword t_aux_col1 = t.aux_col1; const uword t_aux_slice1 = t.aux_slice1; const eT* x_mem = x.memptr(); uword i,j; for(i=0, j=1; j < t_n_slices; i+=2, j+=2) { const eT tmp_i = x_mem[i]; const eT tmp_j = x_mem[j]; Q.at(t_aux_row1, t_aux_col1, t_aux_slice1 + i) = tmp_i; Q.at(t_aux_row1, t_aux_col1, t_aux_slice1 + j) = tmp_j; } if(i < t_n_slices) { Q.at(t_aux_row1, t_aux_col1, t_aux_slice1 + i) = x_mem[i]; } } else if( (t_n_rows == x_n_rows) && (t_n_cols == x_n_cols) && (t_n_slices == 1) ) { // interpret the matrix as a cube with one slice for(uword col = 0; col < t_n_cols; ++col) { arrayops::copy( t.slice_colptr(0, col), x.colptr(col), t_n_rows ); } } else if( (t_n_rows == x_n_rows) && (t_n_cols == 1) && (t_n_slices == x_n_cols) ) { for(uword i=0; i < t_n_slices; ++i) { arrayops::copy( t.slice_colptr(i, 0), x.colptr(i), t_n_rows ); } } else if( (t_n_rows == 1) && (t_n_cols == x_n_rows) && (t_n_slices == x_n_cols) ) { Cube& Q = const_cast< Cube& >(t.m); const uword t_aux_row1 = t.aux_row1; const uword t_aux_col1 = t.aux_col1; const uword t_aux_slice1 = t.aux_slice1; for(uword slice=0; slice < t_n_slices; ++slice) { const uword mod_slice = t_aux_slice1 + slice; const eT* x_colptr = x.colptr(slice); uword i,j; for(i=0, j=1; j < t_n_cols; i+=2, j+=2) { const eT tmp_i = x_colptr[i]; const eT tmp_j = x_colptr[j]; Q.at(t_aux_row1, t_aux_col1 + i, mod_slice) = tmp_i; Q.at(t_aux_row1, t_aux_col1 + j, mod_slice) = tmp_j; } if(i < t_n_cols) { Q.at(t_aux_row1, t_aux_col1 + i, mod_slice) = x_colptr[i]; } } } else { if(arma_config::debug == true) { arma_stop( arma_incompat_size_string(t, x, "copy into subcube") ); } } } template template inline void subview_cube::operator+= (const Base& in) { arma_extra_debug_sigprint(); const unwrap tmp(in.get_ref()); const Mat& x = tmp.M; subview_cube& t = *this; const uword t_n_rows = t.n_rows; const uword t_n_cols = t.n_cols; const uword t_n_slices = t.n_slices; const uword x_n_rows = x.n_rows; const uword x_n_cols = x.n_cols; if( ((x_n_rows == 1) || (x_n_cols == 1)) && (t_n_rows == 1) && (t_n_cols == 1) && (x.n_elem == t_n_slices) ) { Cube& Q = const_cast< Cube& >(t.m); const uword t_aux_row1 = t.aux_row1; const uword t_aux_col1 = t.aux_col1; const uword t_aux_slice1 = t.aux_slice1; const eT* x_mem = x.memptr(); uword i,j; for(i=0, j=1; j < t_n_slices; i+=2, j+=2) { const eT tmp_i = x_mem[i]; const eT tmp_j = x_mem[j]; Q.at(t_aux_row1, t_aux_col1, t_aux_slice1 + i) += tmp_i; Q.at(t_aux_row1, t_aux_col1, t_aux_slice1 + j) += tmp_j; } if(i < t_n_slices) { Q.at(t_aux_row1, t_aux_col1, t_aux_slice1 + i) += x_mem[i]; } } else if( (t_n_rows == x_n_rows) && (t_n_cols == x_n_cols) && (t_n_slices == 1) ) { for(uword col = 0; col < t_n_cols; ++col) { arrayops::inplace_plus( t.slice_colptr(0, col), x.colptr(col), t_n_rows ); } } else if( (t_n_rows == x_n_rows) && (t_n_cols == 1) && (t_n_slices == x_n_cols) ) { for(uword i=0; i < t_n_slices; ++i) { arrayops::inplace_plus( t.slice_colptr(i, 0), x.colptr(i), t_n_rows ); } } else if( (t_n_rows == 1) && (t_n_cols == x_n_rows) && (t_n_slices == x_n_cols) ) { Cube& Q = const_cast< Cube& >(t.m); const uword t_aux_row1 = t.aux_row1; const uword t_aux_col1 = t.aux_col1; const uword t_aux_slice1 = t.aux_slice1; for(uword slice=0; slice < t_n_slices; ++slice) { const uword mod_slice = t_aux_slice1 + slice; const eT* x_colptr = x.colptr(slice); uword i,j; for(i=0, j=1; j < t_n_cols; i+=2, j+=2) { const eT tmp_i = x_colptr[i]; const eT tmp_j = x_colptr[j]; Q.at(t_aux_row1, t_aux_col1 + i, mod_slice) += tmp_i; Q.at(t_aux_row1, t_aux_col1 + j, mod_slice) += tmp_j; } if(i < t_n_cols) { Q.at(t_aux_row1, t_aux_col1 + i, mod_slice) += x_colptr[i]; } } } else { if(arma_config::debug == true) { arma_stop( arma_incompat_size_string(t, x, "addition") ); } } } template template inline void subview_cube::operator-= (const Base& in) { arma_extra_debug_sigprint(); const unwrap tmp(in.get_ref()); const Mat& x = tmp.M; subview_cube& t = *this; const uword t_n_rows = t.n_rows; const uword t_n_cols = t.n_cols; const uword t_n_slices = t.n_slices; const uword x_n_rows = x.n_rows; const uword x_n_cols = x.n_cols; if( ((x_n_rows == 1) || (x_n_cols == 1)) && (t_n_rows == 1) && (t_n_cols == 1) && (x.n_elem == t_n_slices) ) { Cube& Q = const_cast< Cube& >(t.m); const uword t_aux_row1 = t.aux_row1; const uword t_aux_col1 = t.aux_col1; const uword t_aux_slice1 = t.aux_slice1; const eT* x_mem = x.memptr(); uword i,j; for(i=0, j=1; j < t_n_slices; i+=2, j+=2) { const eT tmp_i = x_mem[i]; const eT tmp_j = x_mem[j]; Q.at(t_aux_row1, t_aux_col1, t_aux_slice1 + i) -= tmp_i; Q.at(t_aux_row1, t_aux_col1, t_aux_slice1 + j) -= tmp_j; } if(i < t_n_slices) { Q.at(t_aux_row1, t_aux_col1, t_aux_slice1 + i) -= x_mem[i]; } } else if( (t_n_rows == x_n_rows) && (t_n_cols == x_n_cols) && (t_n_slices == 1) ) { for(uword col = 0; col < t_n_cols; ++col) { arrayops::inplace_minus( t.slice_colptr(0, col), x.colptr(col), t_n_rows ); } } else if( (t_n_rows == x_n_rows) && (t_n_cols == 1) && (t_n_slices == x_n_cols) ) { for(uword i=0; i < t_n_slices; ++i) { arrayops::inplace_minus( t.slice_colptr(i, 0), x.colptr(i), t_n_rows ); } } else if( (t_n_rows == 1) && (t_n_cols == x_n_rows) && (t_n_slices == x_n_cols) ) { Cube& Q = const_cast< Cube& >(t.m); const uword t_aux_row1 = t.aux_row1; const uword t_aux_col1 = t.aux_col1; const uword t_aux_slice1 = t.aux_slice1; for(uword slice=0; slice < t_n_slices; ++slice) { const uword mod_slice = t_aux_slice1 + slice; const eT* x_colptr = x.colptr(slice); uword i,j; for(i=0, j=1; j < t_n_cols; i+=2, j+=2) { const eT tmp_i = x_colptr[i]; const eT tmp_j = x_colptr[j]; Q.at(t_aux_row1, t_aux_col1 + i, mod_slice) -= tmp_i; Q.at(t_aux_row1, t_aux_col1 + j, mod_slice) -= tmp_j; } if(i < t_n_cols) { Q.at(t_aux_row1, t_aux_col1 + i, mod_slice) -= x_colptr[i]; } } } else { if(arma_config::debug == true) { arma_stop( arma_incompat_size_string(t, x, "subtraction") ); } } } template template inline void subview_cube::operator%= (const Base& in) { arma_extra_debug_sigprint(); const unwrap tmp(in.get_ref()); const Mat& x = tmp.M; subview_cube& t = *this; const uword t_n_rows = t.n_rows; const uword t_n_cols = t.n_cols; const uword t_n_slices = t.n_slices; const uword x_n_rows = x.n_rows; const uword x_n_cols = x.n_cols; if( ((x_n_rows == 1) || (x_n_cols == 1)) && (t_n_rows == 1) && (t_n_cols == 1) && (x.n_elem == t_n_slices) ) { Cube& Q = const_cast< Cube& >(t.m); const uword t_aux_row1 = t.aux_row1; const uword t_aux_col1 = t.aux_col1; const uword t_aux_slice1 = t.aux_slice1; const eT* x_mem = x.memptr(); uword i,j; for(i=0, j=1; j < t_n_slices; i+=2, j+=2) { const eT tmp_i = x_mem[i]; const eT tmp_j = x_mem[j]; Q.at(t_aux_row1, t_aux_col1, t_aux_slice1 + i) *= tmp_i; Q.at(t_aux_row1, t_aux_col1, t_aux_slice1 + j) *= tmp_j; } if(i < t_n_slices) { Q.at(t_aux_row1, t_aux_col1, t_aux_slice1 + i) *= x_mem[i]; } } else if( (t_n_rows == x_n_rows) && (t_n_cols == x_n_cols) && (t_n_slices == 1) ) { for(uword col = 0; col < t_n_cols; ++col) { arrayops::inplace_mul( t.slice_colptr(0, col), x.colptr(col), t_n_rows ); } } else if( (t_n_rows == x_n_rows) && (t_n_cols == 1) && (t_n_slices == x_n_cols) ) { for(uword i=0; i < t_n_slices; ++i) { arrayops::inplace_mul( t.slice_colptr(i, 0), x.colptr(i), t_n_rows ); } } else if( (t_n_rows == 1) && (t_n_cols == x_n_rows) && (t_n_slices == x_n_cols) ) { Cube& Q = const_cast< Cube& >(t.m); const uword t_aux_row1 = t.aux_row1; const uword t_aux_col1 = t.aux_col1; const uword t_aux_slice1 = t.aux_slice1; for(uword slice=0; slice < t_n_slices; ++slice) { const uword mod_slice = t_aux_slice1 + slice; const eT* x_colptr = x.colptr(slice); uword i,j; for(i=0, j=1; j < t_n_cols; i+=2, j+=2) { const eT tmp_i = x_colptr[i]; const eT tmp_j = x_colptr[j]; Q.at(t_aux_row1, t_aux_col1 + i, mod_slice) *= tmp_i; Q.at(t_aux_row1, t_aux_col1 + j, mod_slice) *= tmp_j; } if(i < t_n_cols) { Q.at(t_aux_row1, t_aux_col1 + i, mod_slice) *= x_colptr[i]; } } } else { if(arma_config::debug == true) { arma_stop( arma_incompat_size_string(t, x, "element-wise multiplication") ); } } } template template inline void subview_cube::operator/= (const Base& in) { arma_extra_debug_sigprint(); const unwrap tmp(in.get_ref()); const Mat& x = tmp.M; subview_cube& t = *this; const uword t_n_rows = t.n_rows; const uword t_n_cols = t.n_cols; const uword t_n_slices = t.n_slices; const uword x_n_rows = x.n_rows; const uword x_n_cols = x.n_cols; if( ((x_n_rows == 1) || (x_n_cols == 1)) && (t_n_rows == 1) && (t_n_cols == 1) && (x.n_elem == t_n_slices) ) { Cube& Q = const_cast< Cube& >(t.m); const uword t_aux_row1 = t.aux_row1; const uword t_aux_col1 = t.aux_col1; const uword t_aux_slice1 = t.aux_slice1; const eT* x_mem = x.memptr(); uword i,j; for(i=0, j=1; j < t_n_slices; i+=2, j+=2) { const eT tmp_i = x_mem[i]; const eT tmp_j = x_mem[j]; Q.at(t_aux_row1, t_aux_col1, t_aux_slice1 + i) /= tmp_i; Q.at(t_aux_row1, t_aux_col1, t_aux_slice1 + j) /= tmp_j; } if(i < t_n_slices) { Q.at(t_aux_row1, t_aux_col1, t_aux_slice1 + i) /= x_mem[i]; } } else if( (t_n_rows == x_n_rows) && (t_n_cols == x_n_cols) && (t_n_slices == 1) ) { for(uword col = 0; col < t_n_cols; ++col) { arrayops::inplace_div( t.slice_colptr(0, col), x.colptr(col), t_n_rows ); } } else if( (t_n_rows == x_n_rows) && (t_n_cols == 1) && (t_n_slices == x_n_cols) ) { for(uword i=0; i < t_n_slices; ++i) { arrayops::inplace_div( t.slice_colptr(i, 0), x.colptr(i), t_n_rows ); } } else if( (t_n_rows == 1) && (t_n_cols == x_n_rows) && (t_n_slices == x_n_cols) ) { Cube& Q = const_cast< Cube& >(t.m); const uword t_aux_row1 = t.aux_row1; const uword t_aux_col1 = t.aux_col1; const uword t_aux_slice1 = t.aux_slice1; for(uword slice=0; slice < t_n_slices; ++slice) { const uword mod_slice = t_aux_slice1 + slice; const eT* x_colptr = x.colptr(slice); uword i,j; for(i=0, j=1; j < t_n_cols; i+=2, j+=2) { const eT tmp_i = x_colptr[i]; const eT tmp_j = x_colptr[j]; Q.at(t_aux_row1, t_aux_col1 + i, mod_slice) /= tmp_i; Q.at(t_aux_row1, t_aux_col1 + j, mod_slice) /= tmp_j; } if(i < t_n_cols) { Q.at(t_aux_row1, t_aux_col1 + i, mod_slice) /= x_colptr[i]; } } } else { if(arma_config::debug == true) { arma_stop( arma_incompat_size_string(t, x, "element-wise division") ); } } } //! transform each element in the subview using a functor template template inline void subview_cube::transform(functor F) { arma_extra_debug_sigprint(); Cube& Q = const_cast< Cube& >(m); const uword start_col = aux_col1; const uword start_row = aux_row1; const uword start_slice = aux_slice1; const uword end_col_plus1 = start_col + n_cols; const uword end_row_plus1 = start_row + n_rows; const uword end_slice_plus1 = start_slice + n_slices; for(uword uslice = start_slice; uslice < end_slice_plus1; ++uslice) for(uword ucol = start_col; ucol < end_col_plus1; ++ucol ) for(uword urow = start_row; urow < end_row_plus1; ++urow ) { Q.at(urow, ucol, uslice) = eT( F( Q.at(urow, ucol, uslice) ) ); } } //! imbue (fill) the subview with values provided by a functor template template inline void subview_cube::imbue(functor F) { arma_extra_debug_sigprint(); Cube& Q = const_cast< Cube& >(m); const uword start_col = aux_col1; const uword start_row = aux_row1; const uword start_slice = aux_slice1; const uword end_col_plus1 = start_col + n_cols; const uword end_row_plus1 = start_row + n_rows; const uword end_slice_plus1 = start_slice + n_slices; for(uword uslice = start_slice; uslice < end_slice_plus1; ++uslice) for(uword ucol = start_col; ucol < end_col_plus1; ++ucol ) for(uword urow = start_row; urow < end_row_plus1; ++urow ) { Q.at(urow, ucol, uslice) = eT( F() ); } } template inline void subview_cube::fill(const eT val) { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; for(uword slice = 0; slice < local_n_slices; ++slice) { for(uword col = 0; col < local_n_cols; ++col) { arrayops::inplace_set( slice_colptr(slice,col), val, local_n_rows ); } } } template inline void subview_cube::zeros() { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; for(uword slice = 0; slice < local_n_slices; ++slice) { for(uword col = 0; col < local_n_cols; ++col) { arrayops::fill_zeros( slice_colptr(slice,col), local_n_rows ); } } } template inline void subview_cube::ones() { arma_extra_debug_sigprint(); fill(eT(1)); } template inline void subview_cube::randu() { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; for(uword slice = 0; slice < local_n_slices; ++slice) { for(uword col = 0; col < local_n_cols; ++col) { arma_rng::randu::fill( slice_colptr(slice,col), local_n_rows ); } } } template inline void subview_cube::randn() { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; for(uword slice = 0; slice < local_n_slices; ++slice) { for(uword col = 0; col < local_n_cols; ++col) { arma_rng::randn::fill( slice_colptr(slice,col), local_n_rows ); } } } template inline arma_warn_unused bool subview_cube::is_finite() const { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; for(uword slice = 0; slice < local_n_slices; ++slice) { for(uword col = 0; col < local_n_cols; ++col) { if(arrayops::is_finite(slice_colptr(slice,col), local_n_rows) == false) { return false; } } } return true; } template inline arma_warn_unused bool subview_cube::has_inf() const { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; for(uword slice = 0; slice < local_n_slices; ++slice) { for(uword col = 0; col < local_n_cols; ++col) { if(arrayops::has_inf(slice_colptr(slice,col), local_n_rows)) { return true; } } } return false; } template inline arma_warn_unused bool subview_cube::has_nan() const { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; for(uword slice = 0; slice < local_n_slices; ++slice) { for(uword col = 0; col < local_n_cols; ++col) { if(arrayops::has_nan(slice_colptr(slice,col), local_n_rows)) { return true; } } } return false; } template inline arma_warn_unused eT subview_cube::min() const { arma_extra_debug_sigprint(); if(n_elem == 0) { arma_debug_check(true, "subview_cube::min(): object has no elements"); return Datum::nan; } const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; eT min_val = at(0,0,0); for(uword si=0; si < local_n_slices; ++si) for(uword ci=0; ci < local_n_cols; ++ci) { min_val = (std::min)( min_val, op_min::direct_min(slice_colptr(si,ci), local_n_rows) ); } return min_val; } template inline arma_warn_unused eT subview_cube::max() const { arma_extra_debug_sigprint(); if(n_elem == 0) { arma_debug_check(true, "subview_cube::max(): object has no elements"); return Datum::nan; } const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword local_n_slices = n_slices; eT max_val = at(0,0,0); for(uword si=0; si < local_n_slices; ++si) for(uword ci=0; ci < local_n_cols; ++ci) { max_val = (std::max)( max_val, op_max::direct_max(slice_colptr(si,ci), local_n_rows) ); } return max_val; } template inline eT subview_cube::at_alt(const uword i) const { return operator[](i); } template inline eT& subview_cube::operator[](const uword i) { const uword in_slice = i / n_elem_slice; const uword offset = in_slice * n_elem_slice; const uword j = i - offset; const uword in_col = j / n_rows; const uword in_row = j % n_rows; const uword index = (in_slice + aux_slice1)*m.n_elem_slice + (in_col + aux_col1)*m.n_rows + aux_row1 + in_row; return access::rw( (const_cast< Cube& >(m)).mem[index] ); } template inline eT subview_cube::operator[](const uword i) const { const uword in_slice = i / n_elem_slice; const uword offset = in_slice * n_elem_slice; const uword j = i - offset; const uword in_col = j / n_rows; const uword in_row = j % n_rows; const uword index = (in_slice + aux_slice1)*m.n_elem_slice + (in_col + aux_col1)*m.n_rows + aux_row1 + in_row; return m.mem[index]; } template inline eT& subview_cube::operator()(const uword i) { arma_debug_check( (i >= n_elem), "subview_cube::operator(): index out of bounds"); const uword in_slice = i / n_elem_slice; const uword offset = in_slice * n_elem_slice; const uword j = i - offset; const uword in_col = j / n_rows; const uword in_row = j % n_rows; const uword index = (in_slice + aux_slice1)*m.n_elem_slice + (in_col + aux_col1)*m.n_rows + aux_row1 + in_row; return access::rw( (const_cast< Cube& >(m)).mem[index] ); } template inline eT subview_cube::operator()(const uword i) const { arma_debug_check( (i >= n_elem), "subview_cube::operator(): index out of bounds"); const uword in_slice = i / n_elem_slice; const uword offset = in_slice * n_elem_slice; const uword j = i - offset; const uword in_col = j / n_rows; const uword in_row = j % n_rows; const uword index = (in_slice + aux_slice1)*m.n_elem_slice + (in_col + aux_col1)*m.n_rows + aux_row1 + in_row; return m.mem[index]; } template arma_inline eT& subview_cube::operator()(const uword in_row, const uword in_col, const uword in_slice) { arma_debug_check( ( (in_row >= n_rows) || (in_col >= n_cols) || (in_slice >= n_slices) ), "subview_cube::operator(): location out of bounds"); const uword index = (in_slice + aux_slice1)*m.n_elem_slice + (in_col + aux_col1)*m.n_rows + aux_row1 + in_row; return access::rw( (const_cast< Cube& >(m)).mem[index] ); } template arma_inline eT subview_cube::operator()(const uword in_row, const uword in_col, const uword in_slice) const { arma_debug_check( ( (in_row >= n_rows) || (in_col >= n_cols) || (in_slice >= n_slices) ), "subview_cube::operator(): location out of bounds"); const uword index = (in_slice + aux_slice1)*m.n_elem_slice + (in_col + aux_col1)*m.n_rows + aux_row1 + in_row; return m.mem[index]; } template arma_inline eT& subview_cube::at(const uword in_row, const uword in_col, const uword in_slice) { const uword index = (in_slice + aux_slice1)*m.n_elem_slice + (in_col + aux_col1)*m.n_rows + aux_row1 + in_row; return access::rw( (const_cast< Cube& >(m)).mem[index] ); } template arma_inline eT subview_cube::at(const uword in_row, const uword in_col, const uword in_slice) const { const uword index = (in_slice + aux_slice1)*m.n_elem_slice + (in_col + aux_col1)*m.n_rows + aux_row1 + in_row; return m.mem[index]; } template arma_inline eT* subview_cube::slice_colptr(const uword in_slice, const uword in_col) { return & access::rw((const_cast< Cube& >(m)).mem[ (in_slice + aux_slice1)*m.n_elem_slice + (in_col + aux_col1)*m.n_rows + aux_row1 ]); } template arma_inline const eT* subview_cube::slice_colptr(const uword in_slice, const uword in_col) const { return & m.mem[ (in_slice + aux_slice1)*m.n_elem_slice + (in_col + aux_col1)*m.n_rows + aux_row1 ]; } template inline bool subview_cube::check_overlap(const subview_cube& x) const { const subview_cube& t = *this; if(&t.m != &x.m) { return false; } else { if( (t.n_elem == 0) || (x.n_elem == 0) ) { return false; } else { const uword t_row_start = t.aux_row1; const uword t_row_end_p1 = t_row_start + t.n_rows; const uword t_col_start = t.aux_col1; const uword t_col_end_p1 = t_col_start + t.n_cols; const uword t_slice_start = t.aux_slice1; const uword t_slice_end_p1 = t_slice_start + t.n_slices; const uword x_row_start = x.aux_row1; const uword x_row_end_p1 = x_row_start + x.n_rows; const uword x_col_start = x.aux_col1; const uword x_col_end_p1 = x_col_start + x.n_cols; const uword x_slice_start = x.aux_slice1; const uword x_slice_end_p1 = x_slice_start + x.n_slices; const bool outside_rows = ( (x_row_start >= t_row_end_p1 ) || (t_row_start >= x_row_end_p1 ) ); const bool outside_cols = ( (x_col_start >= t_col_end_p1 ) || (t_col_start >= x_col_end_p1 ) ); const bool outside_slices = ( (x_slice_start >= t_slice_end_p1) || (t_slice_start >= x_slice_end_p1) ); return ( (outside_rows == false) && (outside_cols == false) && (outside_slices == false) ); } } } template inline bool subview_cube::check_overlap(const Mat& x) const { const subview_cube& t = *this; const uword t_aux_slice1 = t.aux_slice1; const uword t_aux_slice2_plus_1 = t_aux_slice1 + t.n_slices; for(uword slice = t_aux_slice1; slice < t_aux_slice2_plus_1; ++slice) { if(t.m.mat_ptrs[slice] != NULL) { const Mat& y = *(t.m.mat_ptrs[slice]); if( x.memptr() == y.memptr() ) { return true; } } } return false; } //! cube X = Y.subcube(...) template inline void subview_cube::extract(Cube& out, const subview_cube& in) { arma_extra_debug_sigprint(); // NOTE: we're assuming that the cube has already been set to the correct size and there is no aliasing; // size setting and alias checking is done by either the Cube contructor or operator=() const uword n_rows = in.n_rows; const uword n_cols = in.n_cols; const uword n_slices = in.n_slices; arma_extra_debug_print(arma_boost::format("out.n_rows = %d out.n_cols = %d out.n_slices = %d in.m.n_rows = %d in.m.n_cols = %d in.m.n_slices = %d") % out.n_rows % out.n_cols % out.n_slices % in.m.n_rows % in.m.n_cols % in.m.n_slices); for(uword slice = 0; slice < n_slices; ++slice) { for(uword col = 0; col < n_cols; ++col) { arrayops::copy( out.slice_colptr(slice,col), in.slice_colptr(slice,col), n_rows ); } } } //! cube X += Y.subcube(...) template inline void subview_cube::plus_inplace(Cube& out, const subview_cube& in) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out, in, "addition"); const uword n_rows = out.n_rows; const uword n_cols = out.n_cols; const uword n_slices = out.n_slices; for(uword slice = 0; slice inline void subview_cube::minus_inplace(Cube& out, const subview_cube& in) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out, in, "subtraction"); const uword n_rows = out.n_rows; const uword n_cols = out.n_cols; const uword n_slices = out.n_slices; for(uword slice = 0; slice inline void subview_cube::schur_inplace(Cube& out, const subview_cube& in) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out, in, "element-wise multiplication"); const uword n_rows = out.n_rows; const uword n_cols = out.n_cols; const uword n_slices = out.n_slices; for(uword slice = 0; slice inline void subview_cube::div_inplace(Cube& out, const subview_cube& in) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out, in, "element-wise division"); const uword n_rows = out.n_rows; const uword n_cols = out.n_cols; const uword n_slices = out.n_slices; for(uword slice = 0; slice inline void subview_cube::extract(Mat& out, const subview_cube& in) { arma_extra_debug_sigprint(); arma_debug_assert_cube_as_mat(out, in, "copy into matrix", false); const uword in_n_rows = in.n_rows; const uword in_n_cols = in.n_cols; const uword in_n_slices = in.n_slices; const uword out_vec_state = out.vec_state; if(in_n_slices == 1) { out.set_size(in_n_rows, in_n_cols); for(uword col=0; col < in_n_cols; ++col) { arrayops::copy( out.colptr(col), in.slice_colptr(0, col), in_n_rows ); } } else { if(out_vec_state == 0) { if(in_n_cols == 1) { out.set_size(in_n_rows, in_n_slices); for(uword i=0; i < in_n_slices; ++i) { arrayops::copy( out.colptr(i), in.slice_colptr(i, 0), in_n_rows ); } } else if(in_n_rows == 1) { const Cube& Q = in.m; const uword in_aux_row1 = in.aux_row1; const uword in_aux_col1 = in.aux_col1; const uword in_aux_slice1 = in.aux_slice1; out.set_size(in_n_cols, in_n_slices); for(uword slice=0; slice < in_n_slices; ++slice) { const uword mod_slice = in_aux_slice1 + slice; eT* out_colptr = out.colptr(slice); uword i,j; for(i=0, j=1; j < in_n_cols; i+=2, j+=2) { const eT tmp_i = Q.at(in_aux_row1, in_aux_col1 + i, mod_slice); const eT tmp_j = Q.at(in_aux_row1, in_aux_col1 + j, mod_slice); out_colptr[i] = tmp_i; out_colptr[j] = tmp_j; } if(i < in_n_cols) { out_colptr[i] = Q.at(in_aux_row1, in_aux_col1 + i, mod_slice); } } } } else { out.set_size(in_n_slices); eT* out_mem = out.memptr(); const Cube& Q = in.m; const uword in_aux_row1 = in.aux_row1; const uword in_aux_col1 = in.aux_col1; const uword in_aux_slice1 = in.aux_slice1; for(uword i=0; i inline void subview_cube::plus_inplace(Mat& out, const subview_cube& in) { arma_extra_debug_sigprint(); arma_debug_assert_cube_as_mat(out, in, "addition", true); const uword in_n_rows = in.n_rows; const uword in_n_cols = in.n_cols; const uword in_n_slices = in.n_slices; const uword out_n_rows = out.n_rows; const uword out_n_cols = out.n_cols; const uword out_vec_state = out.vec_state; if(in_n_slices == 1) { for(uword col=0; col < in_n_cols; ++col) { arrayops::inplace_plus( out.colptr(col), in.slice_colptr(0, col), in_n_rows ); } } else { if(out_vec_state == 0) { if( (in_n_rows == out_n_rows) && (in_n_cols == 1) && (in_n_slices == out_n_cols) ) { for(uword i=0; i < in_n_slices; ++i) { arrayops::inplace_plus( out.colptr(i), in.slice_colptr(i, 0), in_n_rows ); } } else if( (in_n_rows == 1) && (in_n_cols == out_n_rows) && (in_n_slices == out_n_cols) ) { const Cube& Q = in.m; const uword in_aux_row1 = in.aux_row1; const uword in_aux_col1 = in.aux_col1; const uword in_aux_slice1 = in.aux_slice1; for(uword slice=0; slice < in_n_slices; ++slice) { const uword mod_slice = in_aux_slice1 + slice; eT* out_colptr = out.colptr(slice); uword i,j; for(i=0, j=1; j < in_n_cols; i+=2, j+=2) { const eT tmp_i = Q.at(in_aux_row1, in_aux_col1 + i, mod_slice); const eT tmp_j = Q.at(in_aux_row1, in_aux_col1 + j, mod_slice); out_colptr[i] += tmp_i; out_colptr[j] += tmp_j; } if(i < in_n_cols) { out_colptr[i] += Q.at(in_aux_row1, in_aux_col1 + i, mod_slice); } } } } else { eT* out_mem = out.memptr(); const Cube& Q = in.m; const uword in_aux_row1 = in.aux_row1; const uword in_aux_col1 = in.aux_col1; const uword in_aux_slice1 = in.aux_slice1; for(uword i=0; i inline void subview_cube::minus_inplace(Mat& out, const subview_cube& in) { arma_extra_debug_sigprint(); arma_debug_assert_cube_as_mat(out, in, "subtraction", true); const uword in_n_rows = in.n_rows; const uword in_n_cols = in.n_cols; const uword in_n_slices = in.n_slices; const uword out_n_rows = out.n_rows; const uword out_n_cols = out.n_cols; const uword out_vec_state = out.vec_state; if(in_n_slices == 1) { for(uword col=0; col < in_n_cols; ++col) { arrayops::inplace_minus( out.colptr(col), in.slice_colptr(0, col), in_n_rows ); } } else { if(out_vec_state == 0) { if( (in_n_rows == out_n_rows) && (in_n_cols == 1) && (in_n_slices == out_n_cols) ) { for(uword i=0; i < in_n_slices; ++i) { arrayops::inplace_minus( out.colptr(i), in.slice_colptr(i, 0), in_n_rows ); } } else if( (in_n_rows == 1) && (in_n_cols == out_n_rows) && (in_n_slices == out_n_cols) ) { const Cube& Q = in.m; const uword in_aux_row1 = in.aux_row1; const uword in_aux_col1 = in.aux_col1; const uword in_aux_slice1 = in.aux_slice1; for(uword slice=0; slice < in_n_slices; ++slice) { const uword mod_slice = in_aux_slice1 + slice; eT* out_colptr = out.colptr(slice); uword i,j; for(i=0, j=1; j < in_n_cols; i+=2, j+=2) { const eT tmp_i = Q.at(in_aux_row1, in_aux_col1 + i, mod_slice); const eT tmp_j = Q.at(in_aux_row1, in_aux_col1 + j, mod_slice); out_colptr[i] -= tmp_i; out_colptr[j] -= tmp_j; } if(i < in_n_cols) { out_colptr[i] -= Q.at(in_aux_row1, in_aux_col1 + i, mod_slice); } } } } else { eT* out_mem = out.memptr(); const Cube& Q = in.m; const uword in_aux_row1 = in.aux_row1; const uword in_aux_col1 = in.aux_col1; const uword in_aux_slice1 = in.aux_slice1; for(uword i=0; i inline void subview_cube::schur_inplace(Mat& out, const subview_cube& in) { arma_extra_debug_sigprint(); arma_debug_assert_cube_as_mat(out, in, "element-wise multiplication", true); const uword in_n_rows = in.n_rows; const uword in_n_cols = in.n_cols; const uword in_n_slices = in.n_slices; const uword out_n_rows = out.n_rows; const uword out_n_cols = out.n_cols; const uword out_vec_state = out.vec_state; if(in_n_slices == 1) { for(uword col=0; col < in_n_cols; ++col) { arrayops::inplace_mul( out.colptr(col), in.slice_colptr(0, col), in_n_rows ); } } else { if(out_vec_state == 0) { if( (in_n_rows == out_n_rows) && (in_n_cols == 1) && (in_n_slices == out_n_cols) ) { for(uword i=0; i < in_n_slices; ++i) { arrayops::inplace_mul( out.colptr(i), in.slice_colptr(i, 0), in_n_rows ); } } else if( (in_n_rows == 1) && (in_n_cols == out_n_rows) && (in_n_slices == out_n_cols) ) { const Cube& Q = in.m; const uword in_aux_row1 = in.aux_row1; const uword in_aux_col1 = in.aux_col1; const uword in_aux_slice1 = in.aux_slice1; for(uword slice=0; slice < in_n_slices; ++slice) { const uword mod_slice = in_aux_slice1 + slice; eT* out_colptr = out.colptr(slice); uword i,j; for(i=0, j=1; j < in_n_cols; i+=2, j+=2) { const eT tmp_i = Q.at(in_aux_row1, in_aux_col1 + i, mod_slice); const eT tmp_j = Q.at(in_aux_row1, in_aux_col1 + j, mod_slice); out_colptr[i] *= tmp_i; out_colptr[j] *= tmp_j; } if(i < in_n_cols) { out_colptr[i] *= Q.at(in_aux_row1, in_aux_col1 + i, mod_slice); } } } } else { eT* out_mem = out.memptr(); const Cube& Q = in.m; const uword in_aux_row1 = in.aux_row1; const uword in_aux_col1 = in.aux_col1; const uword in_aux_slice1 = in.aux_slice1; for(uword i=0; i inline void subview_cube::div_inplace(Mat& out, const subview_cube& in) { arma_extra_debug_sigprint(); arma_debug_assert_cube_as_mat(out, in, "element-wise division", true); const uword in_n_rows = in.n_rows; const uword in_n_cols = in.n_cols; const uword in_n_slices = in.n_slices; const uword out_n_rows = out.n_rows; const uword out_n_cols = out.n_cols; const uword out_vec_state = out.vec_state; if(in_n_slices == 1) { for(uword col=0; col < in_n_cols; ++col) { arrayops::inplace_div( out.colptr(col), in.slice_colptr(0, col), in_n_rows ); } } else { if(out_vec_state == 0) { if( (in_n_rows == out_n_rows) && (in_n_cols == 1) && (in_n_slices == out_n_cols) ) { for(uword i=0; i < in_n_slices; ++i) { arrayops::inplace_div( out.colptr(i), in.slice_colptr(i, 0), in_n_rows ); } } else if( (in_n_rows == 1) && (in_n_cols == out_n_rows) && (in_n_slices == out_n_cols) ) { const Cube& Q = in.m; const uword in_aux_row1 = in.aux_row1; const uword in_aux_col1 = in.aux_col1; const uword in_aux_slice1 = in.aux_slice1; for(uword slice=0; slice < in_n_slices; ++slice) { const uword mod_slice = in_aux_slice1 + slice; eT* out_colptr = out.colptr(slice); uword i,j; for(i=0, j=1; j < in_n_cols; i+=2, j+=2) { const eT tmp_i = Q.at(in_aux_row1, in_aux_col1 + i, mod_slice); const eT tmp_j = Q.at(in_aux_row1, in_aux_col1 + j, mod_slice); out_colptr[i] /= tmp_i; out_colptr[j] /= tmp_j; } if(i < in_n_cols) { out_colptr[i] /= Q.at(in_aux_row1, in_aux_col1 + i, mod_slice); } } } } else { eT* out_mem = out.memptr(); const Cube& Q = in.m; const uword in_aux_row1 = in.aux_row1; const uword in_aux_col1 = in.aux_col1; const uword in_aux_slice1 = in.aux_slice1; for(uword i=0; i class subview_each_common { public: typedef typename parent::elem_type eT; protected: parent& p; arma_inline subview_each_common(parent& in_p); arma_inline const Mat& get_mat_ref_helper(const Mat & X) const; arma_inline const Mat& get_mat_ref_helper(const subview& X) const; arma_inline const Mat& get_mat_ref() const; inline void check_size(const Mat& A) const; arma_cold inline const std::string incompat_size_string(const Mat& A) const; private: subview_each_common(); }; template class subview_each1 : public subview_each_common { protected: arma_inline subview_each1(parent& in_p); public: typedef typename parent::elem_type eT; inline ~subview_each1(); // deliberately returning void template inline void operator= (const Base& x); template inline void operator+= (const Base& x); template inline void operator-= (const Base& x); template inline void operator%= (const Base& x); template inline void operator/= (const Base& x); private: friend class Mat; friend class subview; subview_each1(); }; template class subview_each2 : public subview_each_common { protected: const Base& base_indices; inline subview_each2(parent& in_p, const Base& in_indices); inline void check_indices(const Mat& indices) const; public: typedef typename parent::elem_type eT; inline ~subview_each2(); // deliberately returning void template inline void operator= (const Base& x); template inline void operator+= (const Base& x); template inline void operator-= (const Base& x); template inline void operator%= (const Base& x); template inline void operator/= (const Base& x); // TODO: add handling of scalars private: friend class Mat; friend class subview; subview_each2(); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/subview_each_meat.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup subview_each //! @{ // // // subview_each_common template inline subview_each_common::subview_each_common(parent& in_p) : p(in_p) { arma_extra_debug_sigprint(); } template arma_inline const Mat& subview_each_common::get_mat_ref_helper(const Mat& X) const { return X; } template arma_inline const Mat& subview_each_common::get_mat_ref_helper(const subview& X) const { return X.m; } template arma_inline const Mat& subview_each_common::get_mat_ref() const { return get_mat_ref_helper(p); } template inline void subview_each_common::check_size(const Mat& A) const { if(arma_config::debug == true) { if(mode == 0) { if( (A.n_rows != p.n_rows) || (A.n_cols != 1) ) { arma_stop( incompat_size_string(A) ); } } else { if( (A.n_rows != 1) || (A.n_cols != p.n_cols) ) { arma_stop( incompat_size_string(A) ); } } } } template arma_cold inline const std::string subview_each_common::incompat_size_string(const Mat& A) const { std::stringstream tmp; if(mode == 0) { tmp << "each_col(): incompatible size; expected " << p.n_rows << "x1" << ", got " << A.n_rows << 'x' << A.n_cols; } else { tmp << "each_row(): incompatible size; expected 1x" << p.n_cols << ", got " << A.n_rows << 'x' << A.n_cols; } return tmp.str(); } // // // subview_each1 template inline subview_each1::~subview_each1() { arma_extra_debug_sigprint(); } template inline subview_each1::subview_each1(parent& in_p) : subview_each_common::subview_each_common(in_p) { arma_extra_debug_sigprint(); } template template inline void subview_each1::operator= (const Base& in) { arma_extra_debug_sigprint(); parent& p = subview_each_common::p; const unwrap_check tmp( in.get_ref(), (*this).get_mat_ref() ); const Mat& A = tmp.M; subview_each_common::check_size(A); const eT* A_mem = A.memptr(); const uword p_n_rows = p.n_rows; const uword p_n_cols = p.n_cols; if(mode == 0) // each column { for(uword i=0; i < p_n_cols; ++i) { arrayops::copy( p.colptr(i), A_mem, p_n_rows ); } } else // each row { for(uword i=0; i < p_n_cols; ++i) { arrayops::inplace_set( p.colptr(i), A_mem[i], p_n_rows); } } } template template inline void subview_each1::operator+= (const Base& in) { arma_extra_debug_sigprint(); parent& p = subview_each_common::p; const unwrap_check tmp( in.get_ref(), (*this).get_mat_ref() ); const Mat& A = tmp.M; subview_each_common::check_size(A); const eT* A_mem = A.memptr(); const uword p_n_rows = p.n_rows; const uword p_n_cols = p.n_cols; if(mode == 0) // each column { for(uword i=0; i < p_n_cols; ++i) { arrayops::inplace_plus( p.colptr(i), A_mem, p_n_rows ); } } else // each row { for(uword i=0; i < p_n_cols; ++i) { arrayops::inplace_plus( p.colptr(i), A_mem[i], p_n_rows); } } } template template inline void subview_each1::operator-= (const Base& in) { arma_extra_debug_sigprint(); parent& p = subview_each_common::p; const unwrap_check tmp( in.get_ref(), (*this).get_mat_ref() ); const Mat& A = tmp.M; subview_each_common::check_size(A); const eT* A_mem = A.memptr(); const uword p_n_rows = p.n_rows; const uword p_n_cols = p.n_cols; if(mode == 0) // each column { for(uword i=0; i < p_n_cols; ++i) { arrayops::inplace_minus( p.colptr(i), A_mem, p_n_rows ); } } else // each row { for(uword i=0; i < p_n_cols; ++i) { arrayops::inplace_minus( p.colptr(i), A_mem[i], p_n_rows); } } } template template inline void subview_each1::operator%= (const Base& in) { arma_extra_debug_sigprint(); parent& p = subview_each_common::p; const unwrap_check tmp( in.get_ref(), (*this).get_mat_ref() ); const Mat& A = tmp.M; subview_each_common::check_size(A); const eT* A_mem = A.memptr(); const uword p_n_rows = p.n_rows; const uword p_n_cols = p.n_cols; if(mode == 0) // each column { for(uword i=0; i < p_n_cols; ++i) { arrayops::inplace_mul( p.colptr(i), A_mem, p_n_rows ); } } else // each row { for(uword i=0; i < p_n_cols; ++i) { arrayops::inplace_mul( p.colptr(i), A_mem[i], p_n_rows); } } } template template inline void subview_each1::operator/= (const Base& in) { arma_extra_debug_sigprint(); parent& p = subview_each_common::p; const unwrap_check tmp( in.get_ref(), (*this).get_mat_ref() ); const Mat& A = tmp.M; subview_each_common::check_size(A); const eT* A_mem = A.memptr(); const uword p_n_rows = p.n_rows; const uword p_n_cols = p.n_cols; if(mode == 0) // each column { for(uword i=0; i < p_n_cols; ++i) { arrayops::inplace_div( p.colptr(i), A_mem, p_n_rows ); } } else // each row { for(uword i=0; i < p_n_cols; ++i) { arrayops::inplace_div( p.colptr(i), A_mem[i], p_n_rows); } } } // // // subview_each2 template inline subview_each2::~subview_each2() { arma_extra_debug_sigprint(); } template inline subview_each2::subview_each2(parent& in_p, const Base& in_indices) : subview_each_common::subview_each_common(in_p) , base_indices(in_indices) { arma_extra_debug_sigprint(); } template inline void subview_each2::check_indices(const Mat& indices) const { if(mode == 0) { arma_debug_check( ((indices.is_vec() == false) && (indices.is_empty() == false)), "each_col(): list of indices must be a vector" ); } else { arma_debug_check( ((indices.is_vec() == false) && (indices.is_empty() == false)), "each_row(): list of indices must be a vector" ); } } template template inline void subview_each2::operator= (const Base& in) { arma_extra_debug_sigprint(); parent& p = subview_each_common::p; const unwrap_check tmp( in.get_ref(), (*this).get_mat_ref() ); const Mat& A = tmp.M; subview_each_common::check_size(A); const unwrap_check_mixed tmp_indices( base_indices.get_ref(), (*this).get_mat_ref() ); const Mat& indices = tmp_indices.M; check_indices(indices); const eT* A_mem = A.memptr(); const uword p_n_rows = p.n_rows; const uword p_n_cols = p.n_cols; const uword* indices_mem = indices.memptr(); const uword N = indices.n_elem; if(mode == 0) // each column { for(uword i=0; i < N; ++i) { const uword col = indices_mem[i]; arma_debug_check( (col > p_n_cols), "each_col(): index out of bounds" ); arrayops::copy( p.colptr(col), A_mem, p_n_rows ); } } else // each row { for(uword i=0; i < N; ++i) { const uword row = indices_mem[i]; arma_debug_check( (row > p_n_rows), "each_row(): index out of bounds" ); for(uword col=0; col < p_n_cols; ++col) { p.at(row,col) = A_mem[col]; } } } } template template inline void subview_each2::operator+= (const Base& in) { arma_extra_debug_sigprint(); parent& p = subview_each_common::p; const unwrap_check tmp( in.get_ref(), (*this).get_mat_ref() ); const Mat& A = tmp.M; subview_each_common::check_size(A); const unwrap_check_mixed tmp_indices( base_indices.get_ref(), (*this).get_mat_ref() ); const Mat& indices = tmp_indices.M; check_indices(indices); const eT* A_mem = A.memptr(); const uword p_n_rows = p.n_rows; const uword p_n_cols = p.n_cols; const uword* indices_mem = indices.memptr(); const uword N = indices.n_elem; if(mode == 0) // each column { for(uword i=0; i < N; ++i) { const uword col = indices_mem[i]; arma_debug_check( (col > p_n_cols), "each_col(): index out of bounds" ); arrayops::inplace_plus( p.colptr(col), A_mem, p_n_rows ); } } else // each row { for(uword i=0; i < N; ++i) { const uword row = indices_mem[i]; arma_debug_check( (row > p_n_rows), "each_row(): index out of bounds" ); for(uword col=0; col < p_n_cols; ++col) { p.at(row,col) += A_mem[col]; } } } } template template inline void subview_each2::operator-= (const Base& in) { arma_extra_debug_sigprint(); parent& p = subview_each_common::p; const unwrap_check tmp( in.get_ref(), (*this).get_mat_ref() ); const Mat& A = tmp.M; subview_each_common::check_size(A); const unwrap_check_mixed tmp_indices( base_indices.get_ref(), (*this).get_mat_ref() ); const Mat& indices = tmp_indices.M; check_indices(indices); const eT* A_mem = A.memptr(); const uword p_n_rows = p.n_rows; const uword p_n_cols = p.n_cols; const uword* indices_mem = indices.memptr(); const uword N = indices.n_elem; if(mode == 0) // each column { for(uword i=0; i < N; ++i) { const uword col = indices_mem[i]; arma_debug_check( (col > p_n_cols), "each_col(): index out of bounds" ); arrayops::inplace_minus( p.colptr(col), A_mem, p_n_rows ); } } else // each row { for(uword i=0; i < N; ++i) { const uword row = indices_mem[i]; arma_debug_check( (row > p_n_rows), "each_row(): index out of bounds" ); for(uword col=0; col < p_n_cols; ++col) { p.at(row,col) -= A_mem[col]; } } } } template template inline void subview_each2::operator%= (const Base& in) { arma_extra_debug_sigprint(); parent& p = subview_each_common::p; const unwrap_check tmp( in.get_ref(), (*this).get_mat_ref() ); const Mat& A = tmp.M; subview_each_common::check_size(A); const unwrap_check_mixed tmp_indices( base_indices.get_ref(), (*this).get_mat_ref() ); const Mat& indices = tmp_indices.M; check_indices(indices); const eT* A_mem = A.memptr(); const uword p_n_rows = p.n_rows; const uword p_n_cols = p.n_cols; const uword* indices_mem = indices.memptr(); const uword N = indices.n_elem; if(mode == 0) // each column { for(uword i=0; i < N; ++i) { const uword col = indices_mem[i]; arma_debug_check( (col > p_n_cols), "each_col(): index out of bounds" ); arrayops::inplace_mul( p.colptr(col), A_mem, p_n_rows ); } } else // each row { for(uword i=0; i < N; ++i) { const uword row = indices_mem[i]; arma_debug_check( (row > p_n_rows), "each_row(): index out of bounds" ); for(uword col=0; col < p_n_cols; ++col) { p.at(row,col) *= A_mem[col]; } } } } template template inline void subview_each2::operator/= (const Base& in) { arma_extra_debug_sigprint(); parent& p = subview_each_common::p; const unwrap_check tmp( in.get_ref(), (*this).get_mat_ref() ); const Mat& A = tmp.M; subview_each_common::check_size(A); const unwrap_check_mixed tmp_indices( base_indices.get_ref(), (*this).get_mat_ref() ); const Mat& indices = tmp_indices.M; check_indices(indices); const eT* A_mem = A.memptr(); const uword p_n_rows = p.n_rows; const uword p_n_cols = p.n_cols; const uword* indices_mem = indices.memptr(); const uword N = indices.n_elem; if(mode == 0) // each column { for(uword i=0; i < N; ++i) { const uword col = indices_mem[i]; arma_debug_check( (col > p_n_cols), "each_col(): index out of bounds" ); arrayops::inplace_div( p.colptr(col), A_mem, p_n_rows ); } } else // each row { for(uword i=0; i < N; ++i) { const uword row = indices_mem[i]; arma_debug_check( (row > p_n_rows), "each_row(): index out of bounds" ); for(uword col=0; col < p_n_cols; ++col) { p.at(row,col) /= A_mem[col]; } } } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/subview_elem1_bones.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup subview_elem1 //! @{ template class subview_elem1 : public Base > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = false; static const bool is_col = true; arma_aligned const Mat fake_m; arma_aligned const Mat& m; arma_aligned const Base& a; protected: arma_inline subview_elem1(const Mat& in_m, const Base& in_a); arma_inline subview_elem1(const Cube& in_q, const Base& in_a); public: inline ~subview_elem1(); template inline void inplace_op(const eT val); template inline void inplace_op(const subview_elem1& x ); template inline void inplace_op(const Base& x ); arma_inline const Op,op_htrans> t() const; arma_inline const Op,op_htrans> ht() const; arma_inline const Op,op_strans> st() const; inline void fill(const eT val); inline void zeros(); inline void ones(); inline void randu(); inline void randn(); inline void operator+= (const eT val); inline void operator-= (const eT val); inline void operator*= (const eT val); inline void operator/= (const eT val); // deliberately returning void template inline void operator_equ(const subview_elem1& x); template inline void operator= (const subview_elem1& x); inline void operator= (const subview_elem1& x); template inline void operator+= (const subview_elem1& x); template inline void operator-= (const subview_elem1& x); template inline void operator%= (const subview_elem1& x); template inline void operator/= (const subview_elem1& x); template inline void operator= (const Base& x); template inline void operator+= (const Base& x); template inline void operator-= (const Base& x); template inline void operator%= (const Base& x); template inline void operator/= (const Base& x); inline static void extract(Mat& out, const subview_elem1& in); template inline static void mat_inplace_op(Mat& out, const subview_elem1& in); inline static void plus_inplace(Mat& out, const subview_elem1& in); inline static void minus_inplace(Mat& out, const subview_elem1& in); inline static void schur_inplace(Mat& out, const subview_elem1& in); inline static void div_inplace(Mat& out, const subview_elem1& in); private: friend class Mat; friend class Cube; subview_elem1(); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/subview_elem1_meat.hpp ================================================ // Copyright (C) 2010-2013 Conrad Sanderson // Copyright (C) 2010-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup subview_elem1 //! @{ template inline subview_elem1::~subview_elem1() { arma_extra_debug_sigprint(); } template arma_inline subview_elem1::subview_elem1(const Mat& in_m, const Base& in_a) : m(in_m) , a(in_a) { arma_extra_debug_sigprint(); } template arma_inline subview_elem1::subview_elem1(const Cube& in_q, const Base& in_a) : fake_m( const_cast< eT* >(in_q.memptr()), in_q.n_elem, 1, false ) , m( fake_m ) , a( in_a ) { arma_extra_debug_sigprint(); } template template inline void subview_elem1::inplace_op(const eT val) { arma_extra_debug_sigprint(); Mat& m_local = const_cast< Mat& >(m); eT* m_mem = m_local.memptr(); const uword m_n_elem = m_local.n_elem; const unwrap_check_mixed tmp(a.get_ref(), m_local); const umat& aa = tmp.M; arma_debug_check ( ( (aa.is_vec() == false) && (aa.is_empty() == false) ), "Mat::elem(): given object is not a vector" ); const uword* aa_mem = aa.memptr(); const uword aa_n_elem = aa.n_elem; uword iq,jq; for(iq=0, jq=1; jq < aa_n_elem; iq+=2, jq+=2) { const uword ii = aa_mem[iq]; const uword jj = aa_mem[jq]; arma_debug_check( ( (ii >= m_n_elem) || (jj >= m_n_elem) ), "Mat::elem(): index out of bounds" ); if(is_same_type::yes) { m_mem[ii] = val; m_mem[jj] = val; } else if(is_same_type::yes) { m_mem[ii] += val; m_mem[jj] += val; } else if(is_same_type::yes) { m_mem[ii] -= val; m_mem[jj] -= val; } else if(is_same_type::yes) { m_mem[ii] *= val; m_mem[jj] *= val; } else if(is_same_type::yes) { m_mem[ii] /= val; m_mem[jj] /= val; } } if(iq < aa_n_elem) { const uword ii = aa_mem[iq]; arma_debug_check( (ii >= m_n_elem) , "Mat::elem(): index out of bounds" ); if(is_same_type::yes) { m_mem[ii] = val; } else if(is_same_type::yes) { m_mem[ii] += val; } else if(is_same_type::yes) { m_mem[ii] -= val; } else if(is_same_type::yes) { m_mem[ii] *= val; } else if(is_same_type::yes) { m_mem[ii] /= val; } } } template template inline void subview_elem1::inplace_op(const subview_elem1& x) { arma_extra_debug_sigprint(); subview_elem1& s = *this; if(&(s.m) == &(x.m)) { arma_extra_debug_print("subview_elem1::inplace_op(): aliasing detected"); const Mat tmp(x); if(is_same_type::yes) { s.operator= (tmp); } else if(is_same_type::yes) { s.operator+=(tmp); } else if(is_same_type::yes) { s.operator-=(tmp); } else if(is_same_type::yes) { s.operator%=(tmp); } else if(is_same_type::yes) { s.operator/=(tmp); } } else { Mat& s_m_local = const_cast< Mat& >(s.m); const Mat& x_m_local = x.m; const unwrap_check_mixed s_tmp(s.a.get_ref(), s_m_local); const unwrap_check_mixed x_tmp(x.a.get_ref(), s_m_local); const umat& s_aa = s_tmp.M; const umat& x_aa = x_tmp.M; arma_debug_check ( ( ((s_aa.is_vec() == false) && (s_aa.is_empty() == false)) || ((x_aa.is_vec() == false) && (x_aa.is_empty() == false)) ), "Mat::elem(): given object is not a vector" ); const uword* s_aa_mem = s_aa.memptr(); const uword* x_aa_mem = x_aa.memptr(); const uword s_aa_n_elem = s_aa.n_elem; arma_debug_check( (s_aa_n_elem != x_aa.n_elem), "Mat::elem(): size mismatch" ); eT* s_m_mem = s_m_local.memptr(); const uword s_m_n_elem = s_m_local.n_elem; const eT* x_m_mem = x_m_local.memptr(); const uword x_m_n_elem = x_m_local.n_elem; uword iq,jq; for(iq=0, jq=1; jq < s_aa_n_elem; iq+=2, jq+=2) { const uword s_ii = s_aa_mem[iq]; const uword s_jj = s_aa_mem[jq]; const uword x_ii = x_aa_mem[iq]; const uword x_jj = x_aa_mem[jq]; arma_debug_check ( (s_ii >= s_m_n_elem) || (s_jj >= s_m_n_elem) || (x_ii >= x_m_n_elem) || (x_jj >= x_m_n_elem), "Mat::elem(): index out of bounds" ); if(is_same_type::yes) { s_m_mem[s_ii] = x_m_mem[x_ii]; s_m_mem[s_jj] = x_m_mem[x_jj]; } else if(is_same_type::yes) { s_m_mem[s_ii] += x_m_mem[x_ii]; s_m_mem[s_jj] += x_m_mem[x_jj]; } else if(is_same_type::yes) { s_m_mem[s_ii] -= x_m_mem[x_ii]; s_m_mem[s_jj] -= x_m_mem[x_jj]; } else if(is_same_type::yes) { s_m_mem[s_ii] *= x_m_mem[x_ii]; s_m_mem[s_jj] *= x_m_mem[x_jj]; } else if(is_same_type::yes) { s_m_mem[s_ii] /= x_m_mem[x_ii]; s_m_mem[s_jj] /= x_m_mem[x_jj]; } } if(iq < s_aa_n_elem) { const uword s_ii = s_aa_mem[iq]; const uword x_ii = x_aa_mem[iq]; arma_debug_check ( ( (s_ii >= s_m_n_elem) || (x_ii >= x_m_n_elem) ), "Mat::elem(): index out of bounds" ); if(is_same_type::yes) { s_m_mem[s_ii] = x_m_mem[x_ii]; } else if(is_same_type::yes) { s_m_mem[s_ii] += x_m_mem[x_ii]; } else if(is_same_type::yes) { s_m_mem[s_ii] -= x_m_mem[x_ii]; } else if(is_same_type::yes) { s_m_mem[s_ii] *= x_m_mem[x_ii]; } else if(is_same_type::yes) { s_m_mem[s_ii] /= x_m_mem[x_ii]; } } } } template template inline void subview_elem1::inplace_op(const Base& x) { arma_extra_debug_sigprint(); Mat& m_local = const_cast< Mat& >(m); eT* m_mem = m_local.memptr(); const uword m_n_elem = m_local.n_elem; const unwrap_check_mixed aa_tmp(a.get_ref(), m_local); const umat& aa = aa_tmp.M; arma_debug_check ( ( (aa.is_vec() == false) && (aa.is_empty() == false) ), "Mat::elem(): given object is not a vector" ); const uword* aa_mem = aa.memptr(); const uword aa_n_elem = aa.n_elem; const Proxy P(x.get_ref()); arma_debug_check( (aa_n_elem != P.get_n_elem()), "Mat::elem(): size mismatch" ); const bool is_alias = P.is_alias(m); if( (is_alias == false) && (Proxy::prefer_at_accessor == false) ) { typename Proxy::ea_type X = P.get_ea(); uword iq,jq; for(iq=0, jq=1; jq < aa_n_elem; iq+=2, jq+=2) { const uword ii = aa_mem[iq]; const uword jj = aa_mem[jq]; arma_debug_check( ( (ii >= m_n_elem) || (jj >= m_n_elem) ), "Mat::elem(): index out of bounds" ); if(is_same_type::yes) { m_mem[ii] = X[iq]; m_mem[jj] = X[jq]; } else if(is_same_type::yes) { m_mem[ii] += X[iq]; m_mem[jj] += X[jq]; } else if(is_same_type::yes) { m_mem[ii] -= X[iq]; m_mem[jj] -= X[jq]; } else if(is_same_type::yes) { m_mem[ii] *= X[iq]; m_mem[jj] *= X[jq]; } else if(is_same_type::yes) { m_mem[ii] /= X[iq]; m_mem[jj] /= X[jq]; } } if(iq < aa_n_elem) { const uword ii = aa_mem[iq]; arma_debug_check( (ii >= m_n_elem) , "Mat::elem(): index out of bounds" ); if(is_same_type::yes) { m_mem[ii] = X[iq]; } else if(is_same_type::yes) { m_mem[ii] += X[iq]; } else if(is_same_type::yes) { m_mem[ii] -= X[iq]; } else if(is_same_type::yes) { m_mem[ii] *= X[iq]; } else if(is_same_type::yes) { m_mem[ii] /= X[iq]; } } } else { arma_extra_debug_print("subview_elem1::inplace_op(): aliasing or prefer_at_accessor detected"); const unwrap_check::stored_type> tmp(P.Q, is_alias); const Mat& M = tmp.M; const eT* X = M.memptr(); uword iq,jq; for(iq=0, jq=1; jq < aa_n_elem; iq+=2, jq+=2) { const uword ii = aa_mem[iq]; const uword jj = aa_mem[jq]; arma_debug_check( ( (ii >= m_n_elem) || (jj >= m_n_elem) ), "Mat::elem(): index out of bounds" ); if(is_same_type::yes) { m_mem[ii] = X[iq]; m_mem[jj] = X[jq]; } else if(is_same_type::yes) { m_mem[ii] += X[iq]; m_mem[jj] += X[jq]; } else if(is_same_type::yes) { m_mem[ii] -= X[iq]; m_mem[jj] -= X[jq]; } else if(is_same_type::yes) { m_mem[ii] *= X[iq]; m_mem[jj] *= X[jq]; } else if(is_same_type::yes) { m_mem[ii] /= X[iq]; m_mem[jj] /= X[jq]; } } if(iq < aa_n_elem) { const uword ii = aa_mem[iq]; arma_debug_check( (ii >= m_n_elem) , "Mat::elem(): index out of bounds" ); if(is_same_type::yes) { m_mem[ii] = X[iq]; } else if(is_same_type::yes) { m_mem[ii] += X[iq]; } else if(is_same_type::yes) { m_mem[ii] -= X[iq]; } else if(is_same_type::yes) { m_mem[ii] *= X[iq]; } else if(is_same_type::yes) { m_mem[ii] /= X[iq]; } } } } // // template arma_inline const Op,op_htrans> subview_elem1::t() const { return Op,op_htrans>(*this); } template arma_inline const Op,op_htrans> subview_elem1::ht() const { return Op,op_htrans>(*this); } template arma_inline const Op,op_strans> subview_elem1::st() const { return Op,op_strans>(*this); } template inline void subview_elem1::fill(const eT val) { arma_extra_debug_sigprint(); inplace_op(val); } template inline void subview_elem1::zeros() { arma_extra_debug_sigprint(); inplace_op(eT(0)); } template inline void subview_elem1::ones() { arma_extra_debug_sigprint(); inplace_op(eT(1)); } template inline void subview_elem1::randu() { arma_extra_debug_sigprint(); Mat& m_local = const_cast< Mat& >(m); eT* m_mem = m_local.memptr(); const uword m_n_elem = m_local.n_elem; const unwrap_check_mixed tmp(a.get_ref(), m_local); const umat& aa = tmp.M; arma_debug_check ( ( (aa.is_vec() == false) && (aa.is_empty() == false) ), "Mat::elem(): given object is not a vector" ); const uword* aa_mem = aa.memptr(); const uword aa_n_elem = aa.n_elem; uword iq,jq; for(iq=0, jq=1; jq < aa_n_elem; iq+=2, jq+=2) { const uword ii = aa_mem[iq]; const uword jj = aa_mem[jq]; arma_debug_check( ( (ii >= m_n_elem) || (jj >= m_n_elem) ), "Mat::elem(): index out of bounds" ); const eT val1 = eT(arma_rng::randu()); const eT val2 = eT(arma_rng::randu()); m_mem[ii] = val1; m_mem[jj] = val2; } if(iq < aa_n_elem) { const uword ii = aa_mem[iq]; arma_debug_check( (ii >= m_n_elem) , "Mat::elem(): index out of bounds" ); m_mem[ii] = eT(arma_rng::randu()); } } template inline void subview_elem1::randn() { arma_extra_debug_sigprint(); Mat& m_local = const_cast< Mat& >(m); eT* m_mem = m_local.memptr(); const uword m_n_elem = m_local.n_elem; const unwrap_check_mixed tmp(a.get_ref(), m_local); const umat& aa = tmp.M; arma_debug_check ( ( (aa.is_vec() == false) && (aa.is_empty() == false) ), "Mat::elem(): given object is not a vector" ); const uword* aa_mem = aa.memptr(); const uword aa_n_elem = aa.n_elem; uword iq,jq; for(iq=0, jq=1; jq < aa_n_elem; iq+=2, jq+=2) { const uword ii = aa_mem[iq]; const uword jj = aa_mem[jq]; arma_debug_check( ( (ii >= m_n_elem) || (jj >= m_n_elem) ), "Mat::elem(): index out of bounds" ); arma_rng::randn::dual_val( m_mem[ii], m_mem[jj] ); } if(iq < aa_n_elem) { const uword ii = aa_mem[iq]; arma_debug_check( (ii >= m_n_elem) , "Mat::elem(): index out of bounds" ); m_mem[ii] = eT(arma_rng::randn()); } } template inline void subview_elem1::operator+= (const eT val) { arma_extra_debug_sigprint(); inplace_op(val); } template inline void subview_elem1::operator-= (const eT val) { arma_extra_debug_sigprint(); inplace_op(val); } template inline void subview_elem1::operator*= (const eT val) { arma_extra_debug_sigprint(); inplace_op(val); } template inline void subview_elem1::operator/= (const eT val) { arma_extra_debug_sigprint(); inplace_op(val); } // // template template inline void subview_elem1::operator_equ(const subview_elem1& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem1::operator= (const subview_elem1& x) { arma_extra_debug_sigprint(); (*this).operator_equ(x); } //! work around compiler bugs template inline void subview_elem1::operator= (const subview_elem1& x) { arma_extra_debug_sigprint(); (*this).operator_equ(x); } template template inline void subview_elem1::operator+= (const subview_elem1& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem1::operator-= (const subview_elem1& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem1::operator%= (const subview_elem1& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem1::operator/= (const subview_elem1& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem1::operator= (const Base& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem1::operator+= (const Base& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem1::operator-= (const Base& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem1::operator%= (const Base& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem1::operator/= (const Base& x) { arma_extra_debug_sigprint(); inplace_op(x); } // // template inline void subview_elem1::extract(Mat& actual_out, const subview_elem1& in) { arma_extra_debug_sigprint(); const unwrap_check_mixed tmp1(in.a.get_ref(), actual_out); const umat& aa = tmp1.M; arma_debug_check ( ( (aa.is_vec() == false) && (aa.is_empty() == false) ), "Mat::elem(): given object is not a vector" ); const uword* aa_mem = aa.memptr(); const uword aa_n_elem = aa.n_elem; const Mat& m_local = in.m; const eT* m_mem = m_local.memptr(); const uword m_n_elem = m_local.n_elem; const bool alias = (&actual_out == &m_local); arma_extra_debug_warn(alias, "subview_elem1::extract(): aliasing detected"); Mat* tmp_out = alias ? new Mat() : 0; Mat& out = alias ? *tmp_out : actual_out; out.set_size(aa_n_elem, 1); eT* out_mem = out.memptr(); uword i,j; for(i=0, j=1; j= m_n_elem) || (jj >= m_n_elem) ), "Mat::elem(): index out of bounds" ); out_mem[i] = m_mem[ii]; out_mem[j] = m_mem[jj]; } if(i < aa_n_elem) { const uword ii = aa_mem[i]; arma_debug_check( (ii >= m_n_elem) , "Mat::elem(): index out of bounds" ); out_mem[i] = m_mem[ii]; } if(alias == true) { actual_out.steal_mem(out); delete tmp_out; } } template template inline void subview_elem1::mat_inplace_op(Mat& out, const subview_elem1& in) { arma_extra_debug_sigprint(); const unwrap tmp1(in.a.get_ref()); const umat& aa = tmp1.M; arma_debug_check ( ( (aa.is_vec() == false) && (aa.is_empty() == false) ), "Mat::elem(): given object is not a vector" ); const uword* aa_mem = aa.memptr(); const uword aa_n_elem = aa.n_elem; const unwrap_check< Mat > tmp2(in.m, out); const Mat& m_local = tmp2.M; const eT* m_mem = m_local.memptr(); const uword m_n_elem = m_local.n_elem; arma_debug_check( (out.n_elem != aa_n_elem), "Mat::elem(): size mismatch" ); eT* out_mem = out.memptr(); uword i,j; for(i=0, j=1; j= m_n_elem) || (jj >= m_n_elem) ), "Mat::elem(): index out of bounds" ); if(is_same_type::yes) { out_mem[i] += m_mem[ii]; out_mem[j] += m_mem[jj]; } else if(is_same_type::yes) { out_mem[i] -= m_mem[ii]; out_mem[j] -= m_mem[jj]; } else if(is_same_type::yes) { out_mem[i] *= m_mem[ii]; out_mem[j] *= m_mem[jj]; } else if(is_same_type::yes) { out_mem[i] /= m_mem[ii]; out_mem[j] /= m_mem[jj]; } } if(i < aa_n_elem) { const uword ii = aa_mem[i]; arma_debug_check( (ii >= m_n_elem) , "Mat::elem(): index out of bounds" ); if(is_same_type::yes) { out_mem[i] += m_mem[ii]; } else if(is_same_type::yes) { out_mem[i] -= m_mem[ii]; } else if(is_same_type::yes) { out_mem[i] *= m_mem[ii]; } else if(is_same_type::yes) { out_mem[i] /= m_mem[ii]; } } } template inline void subview_elem1::plus_inplace(Mat& out, const subview_elem1& in) { arma_extra_debug_sigprint(); mat_inplace_op(out, in); } template inline void subview_elem1::minus_inplace(Mat& out, const subview_elem1& in) { arma_extra_debug_sigprint(); mat_inplace_op(out, in); } template inline void subview_elem1::schur_inplace(Mat& out, const subview_elem1& in) { arma_extra_debug_sigprint(); mat_inplace_op(out, in); } template inline void subview_elem1::div_inplace(Mat& out, const subview_elem1& in) { arma_extra_debug_sigprint(); mat_inplace_op(out, in); } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/subview_elem2_bones.hpp ================================================ // Copyright (C) 2012 Conrad Sanderson // Copyright (C) 2012 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup subview_elem2 //! @{ template class subview_elem2 : public Base > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = false; static const bool is_col = false; arma_aligned const Mat& m; arma_aligned const Base& base_ri; arma_aligned const Base& base_ci; const bool all_rows; const bool all_cols; protected: arma_inline subview_elem2(const Mat& in_m, const Base& in_ri, const Base& in_ci, const bool in_all_rows, const bool in_all_cols); public: inline ~subview_elem2(); template inline void inplace_op(const eT val); template inline void inplace_op(const Base& x); inline void fill(const eT val); inline void zeros(); inline void ones(); inline void operator+= (const eT val); inline void operator-= (const eT val); inline void operator*= (const eT val); inline void operator/= (const eT val); // deliberately returning void template inline void operator_equ(const subview_elem2& x); template inline void operator= (const subview_elem2& x); inline void operator= (const subview_elem2& x); template inline void operator+= (const subview_elem2& x); template inline void operator-= (const subview_elem2& x); template inline void operator%= (const subview_elem2& x); template inline void operator/= (const subview_elem2& x); template inline void operator= (const Base& x); template inline void operator+= (const Base& x); template inline void operator-= (const Base& x); template inline void operator%= (const Base& x); template inline void operator/= (const Base& x); inline static void extract(Mat& out, const subview_elem2& in); inline static void plus_inplace(Mat& out, const subview_elem2& in); inline static void minus_inplace(Mat& out, const subview_elem2& in); inline static void schur_inplace(Mat& out, const subview_elem2& in); inline static void div_inplace(Mat& out, const subview_elem2& in); private: friend class Mat; subview_elem2(); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/subview_elem2_meat.hpp ================================================ // Copyright (C) 2012-2013 Conrad Sanderson // Copyright (C) 2012-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup subview_elem2 //! @{ template inline subview_elem2::~subview_elem2() { arma_extra_debug_sigprint(); } template arma_inline subview_elem2::subview_elem2 ( const Mat& in_m, const Base& in_ri, const Base& in_ci, const bool in_all_rows, const bool in_all_cols ) : m (in_m ) , base_ri (in_ri ) , base_ci (in_ci ) , all_rows (in_all_rows) , all_cols (in_all_cols) { arma_extra_debug_sigprint(); } template template inline void subview_elem2::inplace_op(const eT val) { arma_extra_debug_sigprint(); Mat& m_local = const_cast< Mat& >(m); const uword m_n_rows = m_local.n_rows; const uword m_n_cols = m_local.n_cols; if( (all_rows == false) && (all_cols == false) ) { const unwrap_check_mixed tmp1(base_ri.get_ref(), m_local); const unwrap_check_mixed tmp2(base_ci.get_ref(), m_local); const umat& ri = tmp1.M; const umat& ci = tmp2.M; arma_debug_check ( ( ((ri.is_vec() == false) && (ri.is_empty() == false)) || ((ci.is_vec() == false) && (ci.is_empty() == false)) ), "Mat::elem(): given object is not a vector" ); const uword* ri_mem = ri.memptr(); const uword ri_n_elem = ri.n_elem; const uword* ci_mem = ci.memptr(); const uword ci_n_elem = ci.n_elem; for(uword ci_count=0; ci_count < ci_n_elem; ++ci_count) { const uword col = ci_mem[ci_count]; arma_debug_check( (col > m_n_cols), "Mat::elem(): index out of bounds" ); for(uword ri_count=0; ri_count < ri_n_elem; ++ri_count) { const uword row = ri_mem[ri_count]; arma_debug_check( (row > m_n_rows), "Mat::elem(): index out of bounds" ); if(is_same_type::yes) { m_local.at(row,col) = val; } else if(is_same_type::yes) { m_local.at(row,col) += val; } else if(is_same_type::yes) { m_local.at(row,col) -= val; } else if(is_same_type::yes) { m_local.at(row,col) *= val; } else if(is_same_type::yes) { m_local.at(row,col) /= val; } } } } else if( (all_rows == true) && (all_cols == false) ) { const unwrap_check_mixed tmp2(base_ci.get_ref(), m_local); const umat& ci = tmp2.M; arma_debug_check ( ( (ci.is_vec() == false) && (ci.is_empty() == false) ), "Mat::elem(): given object is not a vector" ); const uword* ci_mem = ci.memptr(); const uword ci_n_elem = ci.n_elem; for(uword ci_count=0; ci_count < ci_n_elem; ++ci_count) { const uword col = ci_mem[ci_count]; arma_debug_check( (col > m_n_cols), "Mat::elem(): index out of bounds" ); eT* colptr = m_local.colptr(col); if(is_same_type::yes) { arrayops::inplace_set (colptr, val, m_n_rows); } else if(is_same_type::yes) { arrayops::inplace_plus (colptr, val, m_n_rows); } else if(is_same_type::yes) { arrayops::inplace_minus(colptr, val, m_n_rows); } else if(is_same_type::yes) { arrayops::inplace_mul (colptr, val, m_n_rows); } else if(is_same_type::yes) { arrayops::inplace_div (colptr, val, m_n_rows); } } } else if( (all_rows == false) && (all_cols == true) ) { const unwrap_check_mixed tmp1(base_ri.get_ref(), m_local); const umat& ri = tmp1.M; arma_debug_check ( ( (ri.is_vec() == false) && (ri.is_empty() == false) ), "Mat::elem(): given object is not a vector" ); const uword* ri_mem = ri.memptr(); const uword ri_n_elem = ri.n_elem; for(uword col=0; col < m_n_cols; ++col) { for(uword ri_count=0; ri_count < ri_n_elem; ++ri_count) { const uword row = ri_mem[ri_count]; arma_debug_check( (row > m_n_rows), "Mat::elem(): index out of bounds" ); if(is_same_type::yes) { m_local.at(row,col) = val; } else if(is_same_type::yes) { m_local.at(row,col) += val; } else if(is_same_type::yes) { m_local.at(row,col) -= val; } else if(is_same_type::yes) { m_local.at(row,col) *= val; } else if(is_same_type::yes) { m_local.at(row,col) /= val; } } } } } template template inline void subview_elem2::inplace_op(const Base& x) { arma_extra_debug_sigprint(); Mat& m_local = const_cast< Mat& >(m); const uword m_n_rows = m_local.n_rows; const uword m_n_cols = m_local.n_cols; const unwrap_check tmp(x.get_ref(), m_local); const Mat& X = tmp.M; if( (all_rows == false) && (all_cols == false) ) { const unwrap_check_mixed tmp1(base_ri.get_ref(), m_local); const unwrap_check_mixed tmp2(base_ci.get_ref(), m_local); const umat& ri = tmp1.M; const umat& ci = tmp2.M; arma_debug_check ( ( ((ri.is_vec() == false) && (ri.is_empty() == false)) || ((ci.is_vec() == false) && (ci.is_empty() == false)) ), "Mat::elem(): given object is not a vector" ); const uword* ri_mem = ri.memptr(); const uword ri_n_elem = ri.n_elem; const uword* ci_mem = ci.memptr(); const uword ci_n_elem = ci.n_elem; arma_debug_assert_same_size( ri_n_elem, ci_n_elem, X.n_rows, X.n_cols, "Mat::elem()" ); for(uword ci_count=0; ci_count < ci_n_elem; ++ci_count) { const uword col = ci_mem[ci_count]; arma_debug_check( (col > m_n_cols), "Mat::elem(): index out of bounds" ); for(uword ri_count=0; ri_count < ri_n_elem; ++ri_count) { const uword row = ri_mem[ri_count]; arma_debug_check( (row > m_n_rows), "Mat::elem(): index out of bounds" ); if(is_same_type::yes) { m_local.at(row,col) = X.at(ri_count, ci_count); } else if(is_same_type::yes) { m_local.at(row,col) += X.at(ri_count, ci_count); } else if(is_same_type::yes) { m_local.at(row,col) -= X.at(ri_count, ci_count); } else if(is_same_type::yes) { m_local.at(row,col) *= X.at(ri_count, ci_count); } else if(is_same_type::yes) { m_local.at(row,col) /= X.at(ri_count, ci_count); } } } } else if( (all_rows == true) && (all_cols == false) ) { const unwrap_check_mixed tmp2(base_ci.get_ref(), m_local); const umat& ci = tmp2.M; arma_debug_check ( ( (ci.is_vec() == false) && (ci.is_empty() == false) ), "Mat::elem(): given object is not a vector" ); const uword* ci_mem = ci.memptr(); const uword ci_n_elem = ci.n_elem; arma_debug_assert_same_size( m_n_rows, ci_n_elem, X.n_rows, X.n_cols, "Mat::elem()" ); for(uword ci_count=0; ci_count < ci_n_elem; ++ci_count) { const uword col = ci_mem[ci_count]; arma_debug_check( (col > m_n_cols), "Mat::elem(): index out of bounds" ); eT* m_colptr = m_local.colptr(col); const eT* X_colptr = X.colptr(ci_count); if(is_same_type::yes) { arrayops::copy (m_colptr, X_colptr, m_n_rows); } else if(is_same_type::yes) { arrayops::inplace_plus (m_colptr, X_colptr, m_n_rows); } else if(is_same_type::yes) { arrayops::inplace_minus(m_colptr, X_colptr, m_n_rows); } else if(is_same_type::yes) { arrayops::inplace_mul (m_colptr, X_colptr, m_n_rows); } else if(is_same_type::yes) { arrayops::inplace_div (m_colptr, X_colptr, m_n_rows); } } } else if( (all_rows == false) && (all_cols == true) ) { const unwrap_check_mixed tmp1(base_ri.get_ref(), m_local); const umat& ri = tmp1.M; arma_debug_check ( ( (ri.is_vec() == false) && (ri.is_empty() == false) ), "Mat::elem(): given object is not a vector" ); const uword* ri_mem = ri.memptr(); const uword ri_n_elem = ri.n_elem; arma_debug_assert_same_size( ri_n_elem, m_n_cols, X.n_rows, X.n_cols, "Mat::elem()" ); for(uword col=0; col < m_n_cols; ++col) { for(uword ri_count=0; ri_count < ri_n_elem; ++ri_count) { const uword row = ri_mem[ri_count]; arma_debug_check( (row > m_n_rows), "Mat::elem(): index out of bounds" ); if(is_same_type::yes) { m_local.at(row,col) = X.at(ri_count, col); } else if(is_same_type::yes) { m_local.at(row,col) += X.at(ri_count, col); } else if(is_same_type::yes) { m_local.at(row,col) -= X.at(ri_count, col); } else if(is_same_type::yes) { m_local.at(row,col) *= X.at(ri_count, col); } else if(is_same_type::yes) { m_local.at(row,col) /= X.at(ri_count, col); } } } } } // // template inline void subview_elem2::fill(const eT val) { arma_extra_debug_sigprint(); inplace_op(val); } template inline void subview_elem2::zeros() { arma_extra_debug_sigprint(); inplace_op(eT(0)); } template inline void subview_elem2::ones() { arma_extra_debug_sigprint(); inplace_op(eT(1)); } template inline void subview_elem2::operator+= (const eT val) { arma_extra_debug_sigprint(); inplace_op(val); } template inline void subview_elem2::operator-= (const eT val) { arma_extra_debug_sigprint(); inplace_op(val); } template inline void subview_elem2::operator*= (const eT val) { arma_extra_debug_sigprint(); inplace_op(val); } template inline void subview_elem2::operator/= (const eT val) { arma_extra_debug_sigprint(); inplace_op(val); } // // template template inline void subview_elem2::operator_equ(const subview_elem2& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem2::operator= (const subview_elem2& x) { arma_extra_debug_sigprint(); (*this).operator_equ(x); } //! work around compiler bugs template inline void subview_elem2::operator= (const subview_elem2& x) { arma_extra_debug_sigprint(); (*this).operator_equ(x); } template template inline void subview_elem2::operator+= (const subview_elem2& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem2::operator-= (const subview_elem2& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem2::operator%= (const subview_elem2& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem2::operator/= (const subview_elem2& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem2::operator= (const Base& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem2::operator+= (const Base& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem2::operator-= (const Base& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem2::operator%= (const Base& x) { arma_extra_debug_sigprint(); inplace_op(x); } template template inline void subview_elem2::operator/= (const Base& x) { arma_extra_debug_sigprint(); inplace_op(x); } // // template inline void subview_elem2::extract(Mat& actual_out, const subview_elem2& in) { arma_extra_debug_sigprint(); Mat& m_local = const_cast< Mat& >(in.m); const uword m_n_rows = m_local.n_rows; const uword m_n_cols = m_local.n_cols; const bool alias = (&actual_out == &m_local); arma_extra_debug_warn(alias, "subview_elem2::extract(): aliasing detected"); Mat* tmp_out = alias ? new Mat() : 0; Mat& out = alias ? *tmp_out : actual_out; if( (in.all_rows == false) && (in.all_cols == false) ) { const unwrap_check_mixed tmp1(in.base_ri.get_ref(), actual_out); const unwrap_check_mixed tmp2(in.base_ci.get_ref(), actual_out); const umat& ri = tmp1.M; const umat& ci = tmp2.M; arma_debug_check ( ( ((ri.is_vec() == false) && (ri.is_empty() == false)) || ((ci.is_vec() == false) && (ci.is_empty() == false)) ), "Mat::elem(): given object is not a vector" ); const uword* ri_mem = ri.memptr(); const uword ri_n_elem = ri.n_elem; const uword* ci_mem = ci.memptr(); const uword ci_n_elem = ci.n_elem; out.set_size(ri_n_elem, ci_n_elem); eT* out_mem = out.memptr(); uword out_count = 0; for(uword ci_count=0; ci_count < ci_n_elem; ++ci_count) { const uword col = ci_mem[ci_count]; arma_debug_check( (col > m_n_cols), "Mat::elem(): index out of bounds" ); for(uword ri_count=0; ri_count < ri_n_elem; ++ri_count) { const uword row = ri_mem[ri_count]; arma_debug_check( (row > m_n_rows), "Mat::elem(): index out of bounds" ); out_mem[out_count] = m_local.at(row,col); ++out_count; } } } else if( (in.all_rows == true) && (in.all_cols == false) ) { const unwrap_check_mixed tmp2(in.base_ci.get_ref(), m_local); const umat& ci = tmp2.M; arma_debug_check ( ( (ci.is_vec() == false) && (ci.is_empty() == false) ), "Mat::elem(): given object is not a vector" ); const uword* ci_mem = ci.memptr(); const uword ci_n_elem = ci.n_elem; out.set_size(m_n_rows, ci_n_elem); for(uword ci_count=0; ci_count < ci_n_elem; ++ci_count) { const uword col = ci_mem[ci_count]; arma_debug_check( (col > m_n_cols), "Mat::elem(): index out of bounds" ); arrayops::copy( out.colptr(ci_count), m_local.colptr(col), m_n_rows ); } } else if( (in.all_rows == false) && (in.all_cols == true) ) { const unwrap_check_mixed tmp1(in.base_ri.get_ref(), m_local); const umat& ri = tmp1.M; arma_debug_check ( ( (ri.is_vec() == false) && (ri.is_empty() == false) ), "Mat::elem(): given object is not a vector" ); const uword* ri_mem = ri.memptr(); const uword ri_n_elem = ri.n_elem; out.set_size(ri_n_elem, m_n_cols); for(uword col=0; col < m_n_cols; ++col) { for(uword ri_count=0; ri_count < ri_n_elem; ++ri_count) { const uword row = ri_mem[ri_count]; arma_debug_check( (row > m_n_rows), "Mat::elem(): index out of bounds" ); out.at(ri_count,col) = m_local.at(row,col); } } } if(alias) { actual_out.steal_mem(out); delete tmp_out; } } // TODO: implement a dedicated function instead of creating a temporary (but lots of potential aliasing issues) template inline void subview_elem2::plus_inplace(Mat& out, const subview_elem2& in) { arma_extra_debug_sigprint(); const Mat tmp(in); out += tmp; } template inline void subview_elem2::minus_inplace(Mat& out, const subview_elem2& in) { arma_extra_debug_sigprint(); const Mat tmp(in); out -= tmp; } template inline void subview_elem2::schur_inplace(Mat& out, const subview_elem2& in) { arma_extra_debug_sigprint(); const Mat tmp(in); out %= tmp; } template inline void subview_elem2::div_inplace(Mat& out, const subview_elem2& in) { arma_extra_debug_sigprint(); const Mat tmp(in); out /= tmp; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/subview_field_bones.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup subview_field //! @{ //! Class for storing data required to construct or apply operations to a subfield //! (i.e. where the subfield starts and ends as well as a reference/pointer to the original field), template class subview_field { public: typedef oT object_type; const field& f; const uword aux_row1; const uword aux_col1; const uword aux_slice1; const uword n_rows; const uword n_cols; const uword n_slices; const uword n_elem; protected: arma_inline subview_field(const field& in_f, const uword in_row1, const uword in_col1, const uword in_n_rows, const uword in_n_cols); arma_inline subview_field(const field& in_f, const uword in_row1, const uword in_col1, const uword in_slice1, const uword in_n_rows, const uword in_n_cols, const uword in_n_slices); public: inline ~subview_field(); inline void operator= (const field& x); inline void operator= (const subview_field& x); arma_inline oT& operator[](const uword i); arma_inline const oT& operator[](const uword i) const; arma_inline oT& operator()(const uword i); arma_inline const oT& operator()(const uword i) const; arma_inline oT& at(const uword row, const uword col); arma_inline const oT& at(const uword row, const uword col) const; arma_inline oT& at(const uword row, const uword col, const uword slice); arma_inline const oT& at(const uword row, const uword col, const uword slice) const; arma_inline oT& operator()(const uword row, const uword col); arma_inline const oT& operator()(const uword row, const uword col) const; arma_inline oT& operator()(const uword row, const uword col, const uword slice); arma_inline const oT& operator()(const uword row, const uword col, const uword slice) const; inline bool check_overlap(const subview_field& x) const; inline void print(const std::string extra_text = "") const; inline void print(std::ostream& user_stream, const std::string extra_text = "") const; inline static void extract(field& out, const subview_field& in); private: friend class field; subview_field(); //subview_field(const subview_field&); }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/subview_field_meat.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup subview_field //! @{ template inline subview_field::~subview_field() { arma_extra_debug_sigprint(); } template arma_inline subview_field::subview_field ( const field& in_f, const uword in_row1, const uword in_col1, const uword in_n_rows, const uword in_n_cols ) : f(in_f) , aux_row1(in_row1) , aux_col1(in_col1) , aux_slice1(0) , n_rows(in_n_rows) , n_cols(in_n_cols) , n_slices(1) , n_elem(in_n_rows*in_n_cols) { arma_extra_debug_sigprint(); } template arma_inline subview_field::subview_field ( const field& in_f, const uword in_row1, const uword in_col1, const uword in_slice1, const uword in_n_rows, const uword in_n_cols, const uword in_n_slices ) : f(in_f) , aux_row1(in_row1) , aux_col1(in_col1) , aux_slice1(in_slice1) , n_rows(in_n_rows) , n_cols(in_n_cols) , n_slices(in_n_slices) , n_elem(in_n_rows*in_n_cols*in_n_slices) { arma_extra_debug_sigprint(); } template inline void subview_field::operator= (const field& x) { arma_extra_debug_sigprint(); subview_field& t = *this; arma_debug_check( (t.n_rows != x.n_rows) || (t.n_cols != x.n_cols) || (t.n_slices != x.n_slices), "incompatible field dimensions"); if(t.n_slices == 1) { for(uword col=0; col < t.n_cols; ++col) for(uword row=0; row < t.n_rows; ++row) { t.at(row,col) = x.at(row,col); } } else { for(uword slice=0; slice < t.n_slices; ++slice) for(uword col=0; col < t.n_cols; ++col ) for(uword row=0; row < t.n_rows; ++row ) { t.at(row,col,slice) = x.at(row,col,slice); } } } //! x.subfield(...) = y.subfield(...) template inline void subview_field::operator= (const subview_field& x) { arma_extra_debug_sigprint(); if(check_overlap(x)) { const field tmp(x); (*this).operator=(tmp); return; } subview_field& t = *this; arma_debug_check( (t.n_rows != x.n_rows) || (t.n_cols != x.n_cols) || (t.n_slices != x.n_slices), "incompatible field dimensions"); if(t.n_slices == 1) { for(uword col=0; col < t.n_cols; ++col) for(uword row=0; row < t.n_rows; ++row) { t.at(row,col) = x.at(row,col); } } else { for(uword slice=0; slice < t.n_slices; ++slice) for(uword col=0; col < t.n_cols; ++col ) for(uword row=0; row < t.n_rows; ++row ) { t.at(row,col,slice) = x.at(row,col,slice); } } } template arma_inline oT& subview_field::operator[](const uword i) { uword index; if(n_slices == 1) { const uword in_col = i / n_rows; const uword in_row = i % n_rows; index = (in_col + aux_col1)*f.n_rows + aux_row1 + in_row; } else { const uword n_elem_slice = n_rows*n_cols; const uword in_slice = i / n_elem_slice; const uword offset = in_slice * n_elem_slice; const uword j = i - offset; const uword in_col = j / n_rows; const uword in_row = j % n_rows; index = (in_slice + aux_slice1)*(f.n_rows*f.n_cols) + (in_col + aux_col1)*f.n_rows + aux_row1 + in_row; } return *((const_cast< field& >(f)).mem[index]); } template arma_inline const oT& subview_field::operator[](const uword i) const { uword index; if(n_slices == 1) { const uword in_col = i / n_rows; const uword in_row = i % n_rows; index = (in_col + aux_col1)*f.n_rows + aux_row1 + in_row; } else { const uword n_elem_slice = n_rows*n_cols; const uword in_slice = i / n_elem_slice; const uword offset = in_slice * n_elem_slice; const uword j = i - offset; const uword in_col = j / n_rows; const uword in_row = j % n_rows; index = (in_slice + aux_slice1)*(f.n_rows*f.n_cols) + (in_col + aux_col1)*f.n_rows + aux_row1 + in_row; } return *(f.mem[index]); } template arma_inline oT& subview_field::operator()(const uword i) { arma_debug_check( (i >= n_elem), "subview_field::operator(): index out of bounds"); return operator[](i); } template arma_inline const oT& subview_field::operator()(const uword i) const { arma_debug_check( (i >= n_elem), "subview_field::operator(): index out of bounds"); return operator[](i); } template arma_inline oT& subview_field::operator()(const uword in_row, const uword in_col) { arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "subview_field::operator(): index out of bounds"); const uword index = (in_col + aux_col1)*f.n_rows + aux_row1 + in_row; return *((const_cast< field& >(f)).mem[index]); } template arma_inline const oT& subview_field::operator()(const uword in_row, const uword in_col) const { arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "subview_field::operator(): index out of bounds"); const uword index = (in_col + aux_col1)*f.n_rows + aux_row1 + in_row; return *(f.mem[index]); } template arma_inline oT& subview_field::operator()(const uword in_row, const uword in_col, const uword in_slice) { arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols) || (in_slice >= n_slices)), "subview_field::operator(): index out of bounds"); const uword index = (in_slice + aux_slice1)*(f.n_rows*f.n_cols) + (in_col + aux_col1)*f.n_rows + aux_row1 + in_row; return *((const_cast< field& >(f)).mem[index]); } template arma_inline const oT& subview_field::operator()(const uword in_row, const uword in_col, const uword in_slice) const { arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols) || (in_slice >= n_slices)), "subview_field::operator(): index out of bounds"); const uword index = (in_slice + aux_slice1)*(f.n_rows*f.n_cols) + (in_col + aux_col1)*f.n_rows + aux_row1 + in_row; return *(f.mem[index]); } template arma_inline oT& subview_field::at(const uword in_row, const uword in_col) { const uword index = (in_col + aux_col1)*f.n_rows + aux_row1 + in_row; return *((const_cast< field& >(f)).mem[index]); } template arma_inline const oT& subview_field::at(const uword in_row, const uword in_col) const { const uword index = (in_col + aux_col1)*f.n_rows + aux_row1 + in_row; return *(f.mem[index]); } template arma_inline oT& subview_field::at(const uword in_row, const uword in_col, const uword in_slice) { const uword index = (in_slice + aux_slice1)*(f.n_rows*f.n_cols) + (in_col + aux_col1)*f.n_rows + aux_row1 + in_row; return *((const_cast< field& >(f)).mem[index]); } template arma_inline const oT& subview_field::at(const uword in_row, const uword in_col, const uword in_slice) const { const uword index = (in_slice + aux_slice1)*(f.n_rows*f.n_cols) + (in_col + aux_col1)*f.n_rows + aux_row1 + in_row; return *(f.mem[index]); } template inline bool subview_field::check_overlap(const subview_field& x) const { const subview_field& t = *this; if(&t.f != &x.f) { return false; } else { if( (t.n_elem == 0) || (x.n_elem == 0) ) { return false; } else { const uword t_row_start = t.aux_row1; const uword t_row_end_p1 = t_row_start + t.n_rows; const uword t_col_start = t.aux_col1; const uword t_col_end_p1 = t_col_start + t.n_cols; const uword t_slice_start = t.aux_slice1; const uword t_slice_end_p1 = t_slice_start + t.n_slices; const uword x_row_start = x.aux_row1; const uword x_row_end_p1 = x_row_start + x.n_rows; const uword x_col_start = x.aux_col1; const uword x_col_end_p1 = x_col_start + x.n_cols; const uword x_slice_start = x.aux_slice1; const uword x_slice_end_p1 = x_slice_start + x.n_slices; const bool outside_rows = ( (x_row_start >= t_row_end_p1 ) || (t_row_start >= x_row_end_p1 ) ); const bool outside_cols = ( (x_col_start >= t_col_end_p1 ) || (t_col_start >= x_col_end_p1 ) ); const bool outside_slices = ( (x_slice_start >= t_slice_end_p1) || (t_slice_start >= x_slice_end_p1) ); return ( (outside_rows == false) && (outside_cols == false) && (outside_slices == false) ); } } } template inline void subview_field::print(const std::string extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = ARMA_DEFAULT_OSTREAM.width(); ARMA_DEFAULT_OSTREAM << extra_text << '\n'; ARMA_DEFAULT_OSTREAM.width(orig_width); } arma_ostream::print(ARMA_DEFAULT_OSTREAM, *this); } template inline void subview_field::print(std::ostream& user_stream, const std::string extra_text) const { arma_extra_debug_sigprint(); if(extra_text.length() != 0) { const std::streamsize orig_width = user_stream.width(); user_stream << extra_text << '\n'; user_stream.width(orig_width); } arma_ostream::print(user_stream, *this); } //! X = Y.subfield(...) template inline void subview_field::extract(field& actual_out, const subview_field& in) { arma_extra_debug_sigprint(); // const bool alias = (&actual_out == &in.f); field* tmp = (alias) ? new field : 0; field& out = (alias) ? (*tmp) : actual_out; // const uword n_rows = in.n_rows; const uword n_cols = in.n_cols; const uword n_slices = in.n_slices; out.set_size(n_rows, n_cols, n_slices); arma_extra_debug_print(arma_boost::format("out.n_rows = %d out.n_cols = %d out.n_slices = %d in.m.n_rows = %d in.m.n_cols = %d in.m.n_slices = %d") % out.n_rows % out.n_cols % out.n_slices % in.f.n_rows % in.f.n_cols % in.f.n_slices); if(n_slices == 1) { for(uword col = 0; col < n_cols; ++col) for(uword row = 0; row < n_rows; ++row) { out.at(row,col) = in.at(row,col); } } else { for(uword slice = 0; slice < n_slices; ++slice) for(uword col = 0; col < n_cols; ++col ) for(uword row = 0; row < n_rows; ++row ) { out.at(row,col,slice) = in.at(row,col,slice); } } if(alias) { actual_out = out; delete tmp; } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/subview_meat.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // Copyright (C) 2011 James Sanders // Copyright (C) 2013 Ryan Curtin // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup subview //! @{ template inline subview::~subview() { arma_extra_debug_sigprint(); } template inline subview::subview(const Mat& in_m, const uword in_row1, const uword in_col1, const uword in_n_rows, const uword in_n_cols) : m(in_m) , aux_row1(in_row1) , aux_col1(in_col1) , n_rows(in_n_rows) , n_cols(in_n_cols) , n_elem(in_n_rows*in_n_cols) { arma_extra_debug_sigprint(); } template inline void subview::operator= (const eT val) { arma_extra_debug_sigprint(); if(n_elem != 1) { arma_debug_assert_same_size(n_rows, n_cols, 1, 1, "copy into submatrix"); } Mat& X = const_cast< Mat& >(m); X.at(aux_row1, aux_col1) = val; } template inline void subview::operator+= (const eT val) { arma_extra_debug_sigprint(); const uword local_n_cols = n_cols; const uword local_n_rows = n_rows; if(local_n_rows == 1) { Mat& X = const_cast< Mat& >(m); const uword urow = aux_row1; const uword start_col = aux_col1; const uword end_col_plus1 = start_col + local_n_cols; uword ii,jj; for(ii=start_col, jj=start_col+1; jj < end_col_plus1; ii+=2, jj+=2) { X.at(urow, ii) += val; X.at(urow, jj) += val; } if(ii < end_col_plus1) { X.at(urow, ii) += val; } } else { for(uword ucol=0; ucol < local_n_cols; ++ucol) { arrayops::inplace_plus( colptr(ucol), val, local_n_rows ); } } } template inline void subview::operator-= (const eT val) { arma_extra_debug_sigprint(); const uword local_n_cols = n_cols; const uword local_n_rows = n_rows; if(local_n_rows == 1) { Mat& X = const_cast< Mat& >(m); const uword urow = aux_row1; const uword start_col = aux_col1; const uword end_col_plus1 = start_col + local_n_cols; uword ii,jj; for(ii=start_col, jj=start_col+1; jj < end_col_plus1; ii+=2, jj+=2) { X.at(urow, ii) -= val; X.at(urow, jj) -= val; } if(ii < end_col_plus1) { X.at(urow, ii) -= val; } } else { for(uword ucol=0; ucol < local_n_cols; ++ucol) { arrayops::inplace_minus( colptr(ucol), val, local_n_rows ); } } } template inline void subview::operator*= (const eT val) { arma_extra_debug_sigprint(); const uword local_n_cols = n_cols; const uword local_n_rows = n_rows; if(local_n_rows == 1) { Mat& X = const_cast< Mat& >(m); const uword urow = aux_row1; const uword start_col = aux_col1; const uword end_col_plus1 = start_col + local_n_cols; uword ii,jj; for(ii=start_col, jj=start_col+1; jj < end_col_plus1; ii+=2, jj+=2) { X.at(urow, ii) *= val; X.at(urow, jj) *= val; } if(ii < end_col_plus1) { X.at(urow, ii) *= val; } } else { for(uword ucol=0; ucol < local_n_cols; ++ucol) { arrayops::inplace_mul( colptr(ucol), val, local_n_rows ); } } } template inline void subview::operator/= (const eT val) { arma_extra_debug_sigprint(); const uword local_n_cols = n_cols; const uword local_n_rows = n_rows; if(local_n_rows == 1) { Mat& X = const_cast< Mat& >(m); const uword urow = aux_row1; const uword start_col = aux_col1; const uword end_col_plus1 = start_col + local_n_cols; uword ii,jj; for(ii=start_col, jj=start_col+1; jj < end_col_plus1; ii+=2, jj+=2) { X.at(urow, ii) /= val; X.at(urow, jj) /= val; } if(ii < end_col_plus1) { X.at(urow, ii) /= val; } } else { for(uword ucol=0; ucol < local_n_cols; ++ucol) { arrayops::inplace_div( colptr(ucol), val, local_n_rows ); } } } template template inline void subview::operator= (const Base& in) { arma_extra_debug_sigprint(); const Proxy P(in.get_ref()); subview& s = *this; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; arma_debug_assert_same_size(s, P, "copy into submatrix"); const bool is_alias = P.is_alias(s.m); arma_extra_debug_warn(is_alias, "aliasing detected"); if( (is_Mat::stored_type>::value) || (is_alias) ) { const unwrap_check::stored_type> tmp(P.Q, is_alias); const Mat& x = tmp.M; if(s_n_rows == 1) { const eT* x_mem = x.memptr(); Mat& A = const_cast< Mat& >(m); const uword urow = aux_row1; const uword start_col = aux_col1; uword ii,jj; for(ii=0, jj=1; jj < s_n_cols; ii+=2, jj+=2) { A.at(urow, start_col+ii) = x_mem[ii]; A.at(urow, start_col+jj) = x_mem[jj]; } if(ii < s_n_cols) { A.at(urow, start_col+ii) = x_mem[ii]; } } else { for(uword ucol=0; ucol < s_n_cols; ++ucol) { arrayops::copy( s.colptr(ucol), x.colptr(ucol), s_n_rows ); } } } else { if(s_n_rows == 1) { Mat& A = const_cast< Mat& >(m); const uword urow = aux_row1; const uword start_col = aux_col1; uword ii,jj; for(ii=0, jj=1; jj < s_n_cols; ii+=2, jj+=2) { const eT tmp1 = (Proxy::prefer_at_accessor) ? P.at(0,ii) : P[ii]; const eT tmp2 = (Proxy::prefer_at_accessor) ? P.at(0,jj) : P[jj]; A.at(urow, start_col+ii) = tmp1; A.at(urow, start_col+jj) = tmp2; } if(ii < s_n_cols) { A.at(urow, start_col+ii) = (Proxy::prefer_at_accessor) ? P.at(0,ii) : P[ii]; } } else { for(uword ucol=0; ucol < s_n_cols; ++ucol) { eT* s_col_data = s.colptr(ucol); uword ii,jj; for(ii=0, jj=1; jj < s_n_rows; ii+=2, jj+=2) { const eT tmp1 = P.at(ii,ucol); const eT tmp2 = P.at(jj,ucol); s_col_data[ii] = tmp1; s_col_data[jj] = tmp2; } if(ii < s_n_rows) { s_col_data[ii] = P.at(ii,ucol); } } } } } template template inline void subview::operator+= (const Base& in) { arma_extra_debug_sigprint(); const Proxy P(in.get_ref()); subview& s = *this; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; arma_debug_assert_same_size(s, P, "addition"); const bool is_alias = P.is_alias(s.m); arma_extra_debug_warn(is_alias, "aliasing detected"); if( (is_Mat::stored_type>::value) || (is_alias) ) { const unwrap_check::stored_type> tmp(P.Q, is_alias); const Mat& x = tmp.M; if(s_n_rows == 1) { const eT* x_mem = x.memptr(); Mat& A = const_cast< Mat& >(m); const uword urow = aux_row1; const uword start_col = aux_col1; uword ii,jj; for(ii=0, jj=1; jj < s_n_cols; ii+=2, jj+=2) { A.at(urow, start_col+ii) += x_mem[ii]; A.at(urow, start_col+jj) += x_mem[jj]; } if(ii < s_n_cols) { A.at(urow, start_col+ii) += x_mem[ii]; } } else { for(uword ucol=0; ucol < s_n_cols; ++ucol) { arrayops::inplace_plus( s.colptr(ucol), x.colptr(ucol), s_n_rows ); } } } else { if(s_n_rows == 1) { Mat& A = const_cast< Mat& >(m); const uword urow = aux_row1; const uword start_col = aux_col1; uword ii,jj; for(ii=0, jj=1; jj < s_n_cols; ii+=2, jj+=2) { const eT tmp1 = (Proxy::prefer_at_accessor) ? P.at(0,ii) : P[ii]; const eT tmp2 = (Proxy::prefer_at_accessor) ? P.at(0,jj) : P[jj]; A.at(urow, start_col+ii) += tmp1; A.at(urow, start_col+jj) += tmp2; } if(ii < s_n_cols) { A.at(urow, start_col+ii) += (Proxy::prefer_at_accessor) ? P.at(0,ii) : P[ii]; } } else { for(uword ucol=0; ucol < s_n_cols; ++ucol) { eT* s_col_data = s.colptr(ucol); uword ii,jj; for(ii=0, jj=1; jj < s_n_rows; ii+=2, jj+=2) { const eT val1 = P.at(ii,ucol); const eT val2 = P.at(jj,ucol); s_col_data[ii] += val1; s_col_data[jj] += val2; } if(ii < s_n_rows) { s_col_data[ii] += P.at(ii,ucol); } } } } } template template inline void subview::operator-= (const Base& in) { arma_extra_debug_sigprint(); const Proxy P(in.get_ref()); subview& s = *this; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; arma_debug_assert_same_size(s, P, "subtraction"); const bool is_alias = P.is_alias(s.m); arma_extra_debug_warn(is_alias, "aliasing detected"); if( (is_Mat::stored_type>::value) || (is_alias) ) { const unwrap_check::stored_type> tmp(P.Q, is_alias); const Mat& x = tmp.M; if(s_n_rows == 1) { const eT* x_mem = x.memptr(); Mat& A = const_cast< Mat& >(m); const uword urow = aux_row1; const uword start_col = aux_col1; uword ii,jj; for(ii=0, jj=1; jj < s_n_cols; ii+=2, jj+=2) { A.at(urow, start_col+ii) -= x_mem[ii]; A.at(urow, start_col+jj) -= x_mem[jj]; } if(ii < s_n_cols) { A.at(urow, start_col+ii) -= x_mem[ii]; } } else { for(uword ucol=0; ucol < s_n_cols; ++ucol) { arrayops::inplace_minus( s.colptr(ucol), x.colptr(ucol), s_n_rows ); } } } else { if(s_n_rows == 1) { Mat& A = const_cast< Mat& >(m); const uword urow = aux_row1; const uword start_col = aux_col1; uword ii,jj; for(ii=0, jj=1; jj < s_n_cols; ii+=2, jj+=2) { const eT tmp1 = (Proxy::prefer_at_accessor) ? P.at(0,ii) : P[ii]; const eT tmp2 = (Proxy::prefer_at_accessor) ? P.at(0,jj) : P[jj]; A.at(urow, start_col+ii) -= tmp1; A.at(urow, start_col+jj) -= tmp2; } if(ii < s_n_cols) { A.at(urow, start_col+ii) -= (Proxy::prefer_at_accessor) ? P.at(0,ii) : P[ii]; } } else { for(uword ucol=0; ucol < s_n_cols; ++ucol) { eT* s_col_data = s.colptr(ucol); uword ii,jj; for(ii=0, jj=1; jj < s_n_rows; ii+=2, jj+=2) { const eT val1 = P.at(ii,ucol); const eT val2 = P.at(jj,ucol); s_col_data[ii] -= val1; s_col_data[jj] -= val2; } if(ii < s_n_rows) { s_col_data[ii] -= P.at(ii,ucol); } } } } } template template inline void subview::operator%= (const Base& in) { arma_extra_debug_sigprint(); const Proxy P(in.get_ref()); subview& s = *this; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; arma_debug_assert_same_size(s, P, "element-wise multiplication"); const bool is_alias = P.is_alias(s.m); arma_extra_debug_warn(is_alias, "aliasing detected"); if( (is_Mat::stored_type>::value) || (is_alias) ) { const unwrap_check::stored_type> tmp(P.Q, is_alias); const Mat& x = tmp.M; if(s_n_rows == 1) { const eT* x_mem = x.memptr(); Mat& A = const_cast< Mat& >(m); const uword urow = aux_row1; const uword start_col = aux_col1; uword ii,jj; for(ii=0, jj=1; jj < s_n_cols; ii+=2, jj+=2) { A.at(urow, start_col+ii) *= x_mem[ii]; A.at(urow, start_col+jj) *= x_mem[jj]; } if(ii < s_n_cols) { A.at(urow, start_col+ii) *= x_mem[ii]; } } else { for(uword ucol=0; ucol < s_n_cols; ++ucol) { arrayops::inplace_mul( s.colptr(ucol), x.colptr(ucol), s_n_rows ); } } } else { if(s_n_rows == 1) { Mat& A = const_cast< Mat& >(m); const uword urow = aux_row1; const uword start_col = aux_col1; uword ii,jj; for(ii=0, jj=1; jj < s_n_cols; ii+=2, jj+=2) { const eT tmp1 = (Proxy::prefer_at_accessor) ? P.at(0,ii) : P[ii]; const eT tmp2 = (Proxy::prefer_at_accessor) ? P.at(0,jj) : P[jj]; A.at(urow, start_col+ii) *= tmp1; A.at(urow, start_col+jj) *= tmp2; } if(ii < s_n_cols) { A.at(urow, start_col+ii) *= (Proxy::prefer_at_accessor) ? P.at(0,ii) : P[ii]; } } else { for(uword ucol=0; ucol < s_n_cols; ++ucol) { eT* s_col_data = s.colptr(ucol); uword ii,jj; for(ii=0, jj=1; jj < s_n_rows; ii+=2, jj+=2) { const eT val1 = P.at(ii,ucol); const eT val2 = P.at(jj,ucol); s_col_data[ii] *= val1; s_col_data[jj] *= val2; } if(ii < s_n_rows) { s_col_data[ii] *= P.at(ii,ucol); } } } } } template template inline void subview::operator/= (const Base& in) { arma_extra_debug_sigprint(); const Proxy P(in.get_ref()); subview& s = *this; const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; arma_debug_assert_same_size(s, P, "element-wise division"); const bool is_alias = P.is_alias(s.m); arma_extra_debug_warn(is_alias, "aliasing detected"); if( (is_Mat::stored_type>::value) || (is_alias) ) { const unwrap_check::stored_type> tmp(P.Q, is_alias); const Mat& x = tmp.M; if(s_n_rows == 1) { const eT* x_mem = x.memptr(); Mat& A = const_cast< Mat& >(m); const uword urow = aux_row1; const uword start_col = aux_col1; uword ii,jj; for(ii=0, jj=1; jj < s_n_cols; ii+=2, jj+=2) { A.at(urow, start_col+ii) /= x_mem[ii]; A.at(urow, start_col+jj) /= x_mem[jj]; } if(ii < s_n_cols) { A.at(urow, start_col+ii) /= x_mem[ii]; } } else { for(uword ucol=0; ucol < s_n_cols; ++ucol) { arrayops::inplace_div( s.colptr(ucol), x.colptr(ucol), s_n_rows ); } } } else { if(s_n_rows == 1) { Mat& A = const_cast< Mat& >(m); const uword urow = aux_row1; const uword start_col = aux_col1; uword ii,jj; for(ii=0, jj=1; jj < s_n_cols; ii+=2, jj+=2) { const eT tmp1 = (Proxy::prefer_at_accessor) ? P.at(0,ii) : P[ii]; const eT tmp2 = (Proxy::prefer_at_accessor) ? P.at(0,jj) : P[jj]; A.at(urow, start_col+ii) /= tmp1; A.at(urow, start_col+jj) /= tmp2; } if(ii < s_n_cols) { A.at(urow, start_col+ii) /= (Proxy::prefer_at_accessor) ? P.at(0,ii) : P[ii]; } } else { for(uword ucol=0; ucol < s_n_cols; ++ucol) { eT* s_col_data = s.colptr(ucol); uword ii,jj; for(ii=0, jj=1; jj < s_n_rows; ii+=2, jj+=2) { const eT val1 = P.at(ii,ucol); const eT val2 = P.at(jj,ucol); s_col_data[ii] /= val1; s_col_data[jj] /= val2; } if(ii < s_n_rows) { s_col_data[ii] /= P.at(ii,ucol); } } } } } template template inline void subview::operator=(const SpBase& x) { arma_extra_debug_sigprint(); const SpProxy p(x.get_ref()); arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "copy into submatrix"); // Clear the subview. zeros(); // Iterate through the sparse subview and set the nonzero values appropriately. typename SpProxy::const_iterator_type cit = p.begin(); while (cit != p.end()) { at(cit.row(), cit.col()) = *cit; ++cit; } } template template inline void subview::operator+=(const SpBase& x) { arma_extra_debug_sigprint(); const SpProxy p(x.get_ref()); arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "addition"); // Iterate through the sparse subview and add its values. typename SpProxy::const_iterator_type cit = p.begin(); while (cit != p.end()) { at(cit.row(), cit.col()) += *cit; ++cit; } } template template inline void subview::operator-=(const SpBase& x) { arma_extra_debug_sigprint(); const SpProxy p(x.get_ref()); arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "subtraction"); // Iterate through the sparse subview and subtract its values. typename SpProxy::const_iterator_type cit = p.begin(); while (cit != p.end()) { at(cit.row(), cit.col()) -= *cit; ++cit; } } template template inline void subview::operator%=(const SpBase& x) { arma_extra_debug_sigprint(); // Temporary sparse matrix to hold the values we need. SpMat tmp = x.get_ref(); arma_debug_assert_same_size(n_rows, n_cols, tmp.n_rows, tmp.n_cols, "element-wise multiplication"); // Iterate over nonzero values. // Any zero values in the sparse expression will result in a zero in our subview. typename SpMat::const_iterator cit = tmp.begin(); while (cit != tmp.end()) { // Set elements before this one to zero. tmp.at(cit.row(), cit.col()) *= at(cit.row(), cit.col()); ++cit; } // Now set the subview equal to that. *this = tmp; } template template inline void subview::operator/=(const SpBase& x) { arma_extra_debug_sigprint(); const SpProxy p(x.get_ref()); arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "element-wise division"); // This is probably going to fill your subview with a bunch of NaNs, // so I'm not going to bother to implement it fast. // You can have slow NaNs. They're fine too. for (uword c = 0; c < n_cols; ++c) for (uword r = 0; r < n_rows; ++r) { at(r, c) /= p.at(r, c); } } //! x.submat(...) = y.submat(...) template inline void subview::operator= (const subview& x) { arma_extra_debug_sigprint(); if(check_overlap(x)) { const Mat tmp(x); (*this).operator=(tmp); return; } subview& s = *this; arma_debug_assert_same_size(s, x, "copy into submatrix"); const uword s_n_cols = s.n_cols; const uword s_n_rows = s.n_rows; if(s_n_rows == 1) { Mat& A = const_cast< Mat& >(s.m); const Mat& B = x.m; const uword row_A = s.aux_row1; const uword row_B = x.aux_row1; const uword start_col_A = s.aux_col1; const uword start_col_B = x.aux_col1; uword ii,jj; for(ii=0, jj=1; jj < s_n_cols; ii+=2, jj+=2) { const eT tmp1 = B.at(row_B, start_col_B + ii); const eT tmp2 = B.at(row_B, start_col_B + jj); A.at(row_A, start_col_A + ii) = tmp1; A.at(row_A, start_col_A + jj) = tmp2; } if(ii < s_n_cols) { A.at(row_A, start_col_A + ii) = B.at(row_B, start_col_B + ii); } } else { for(uword ucol=0; ucol < s_n_cols; ++ucol) { arrayops::copy( s.colptr(ucol), x.colptr(ucol), s_n_rows ); } } } template inline void subview::operator+= (const subview& x) { arma_extra_debug_sigprint(); if(check_overlap(x)) { const Mat tmp(x); (*this).operator+=(tmp); return; } subview& s = *this; arma_debug_assert_same_size(s, x, "addition"); const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; if(s_n_rows == 1) { Mat& A = const_cast< Mat& >(s.m); const Mat& B = x.m; const uword row_A = s.aux_row1; const uword row_B = x.aux_row1; const uword start_col_A = s.aux_col1; const uword start_col_B = x.aux_col1; uword ii,jj; for(ii=0, jj=1; jj < s_n_cols; ii+=2, jj+=2) { const eT tmp1 = B.at(row_B, start_col_B + ii); const eT tmp2 = B.at(row_B, start_col_B + jj); A.at(row_A, start_col_A + ii) += tmp1; A.at(row_A, start_col_A + jj) += tmp2; } if(ii < s_n_cols) { A.at(row_A, start_col_A + ii) += B.at(row_B, start_col_B + ii); } } else { for(uword ucol=0; ucol < s_n_cols; ++ucol) { arrayops::inplace_plus( s.colptr(ucol), x.colptr(ucol), s_n_rows ); } } } template inline void subview::operator-= (const subview& x) { arma_extra_debug_sigprint(); if(check_overlap(x)) { const Mat tmp(x); (*this).operator-=(tmp); return; } subview& s = *this; arma_debug_assert_same_size(s, x, "subtraction"); const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; if(s_n_rows == 1) { Mat& A = const_cast< Mat& >(s.m); const Mat& B = x.m; const uword row_A = s.aux_row1; const uword row_B = x.aux_row1; const uword start_col_A = s.aux_col1; const uword start_col_B = x.aux_col1; uword ii,jj; for(ii=0, jj=1; jj < s_n_cols; ii+=2, jj+=2) { const eT tmp1 = B.at(row_B, start_col_B + ii); const eT tmp2 = B.at(row_B, start_col_B + jj); A.at(row_A, start_col_A + ii) -= tmp1; A.at(row_A, start_col_A + jj) -= tmp2; } if(ii < s_n_cols) { A.at(row_A, start_col_A + ii) -= B.at(row_B, start_col_B + ii); } } else { for(uword ucol=0; ucol < s_n_cols; ++ucol) { arrayops::inplace_minus( s.colptr(ucol), x.colptr(ucol), s_n_rows ); } } } template inline void subview::operator%= (const subview& x) { arma_extra_debug_sigprint(); if(check_overlap(x)) { const Mat tmp(x); (*this).operator%=(tmp); return; } subview& s = *this; arma_debug_assert_same_size(s, x, "element-wise multiplication"); const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; if(s_n_rows == 1) { Mat& A = const_cast< Mat& >(s.m); const Mat& B = x.m; const uword row_A = s.aux_row1; const uword row_B = x.aux_row1; const uword start_col_A = s.aux_col1; const uword start_col_B = x.aux_col1; uword ii,jj; for(ii=0, jj=1; jj < s_n_cols; ii+=2, jj+=2) { const eT tmp1 = B.at(row_B, start_col_B + ii); const eT tmp2 = B.at(row_B, start_col_B + jj); A.at(row_A, start_col_A + ii) *= tmp1; A.at(row_A, start_col_A + jj) *= tmp2; } if(ii < s_n_cols) { A.at(row_A, start_col_A + ii) *= B.at(row_B, start_col_B + ii); } } else { for(uword ucol=0; ucol < s_n_cols; ++ucol) { arrayops::inplace_mul( s.colptr(ucol), x.colptr(ucol), s_n_rows ); } } } template inline void subview::operator/= (const subview& x) { arma_extra_debug_sigprint(); if(check_overlap(x)) { const Mat tmp(x); (*this).operator/=(tmp); return; } subview& s = *this; arma_debug_assert_same_size(s, x, "element-wise division"); const uword s_n_rows = s.n_rows; const uword s_n_cols = s.n_cols; if(s_n_rows == 1) { Mat& A = const_cast< Mat& >(s.m); const Mat& B = x.m; const uword row_A = s.aux_row1; const uword row_B = x.aux_row1; const uword start_col_A = s.aux_col1; const uword start_col_B = x.aux_col1; uword ii,jj; for(ii=0, jj=1; jj < s_n_cols; ii+=2, jj+=2) { const eT tmp1 = B.at(row_B, start_col_B + ii); const eT tmp2 = B.at(row_B, start_col_B + jj); A.at(row_A, start_col_A + ii) /= tmp1; A.at(row_A, start_col_A + jj) /= tmp2; } if(ii < s_n_cols) { A.at(row_A, start_col_A + ii) /= B.at(row_B, start_col_B + ii); } } else { for(uword ucol=0; ucol < s_n_cols; ++ucol) { arrayops::inplace_div( s.colptr(ucol), x.colptr(ucol), s_n_rows ); } } } template template inline typename enable_if2< is_same_type::value, void>::result subview::operator= (const Gen& in) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(n_rows, n_cols, in.n_rows, in.n_cols, "copy into submatrix"); in.apply(*this); } //! transform each element in the subview using a functor template template inline void subview::transform(functor F) { arma_extra_debug_sigprint(); const uword local_n_cols = n_cols; const uword local_n_rows = n_rows; Mat& X = const_cast< Mat& >(m); if(local_n_rows == 1) { const uword urow = aux_row1; const uword start_col = aux_col1; const uword end_col_plus1 = start_col + local_n_cols; for(uword ucol = start_col; ucol < end_col_plus1; ++ucol) { X.at(urow, ucol) = eT( F( X.at(urow, ucol) ) ); } } else { const uword start_col = aux_col1; const uword start_row = aux_row1; const uword end_col_plus1 = start_col + local_n_cols; const uword end_row_plus1 = start_row + local_n_rows; for(uword ucol = start_col; ucol < end_col_plus1; ++ucol) for(uword urow = start_row; urow < end_row_plus1; ++urow) { X.at(urow, ucol) = eT( F( X.at(urow, ucol) ) ); } } } //! imbue (fill) the subview with values provided by a functor template template inline void subview::imbue(functor F) { arma_extra_debug_sigprint(); const uword local_n_cols = n_cols; const uword local_n_rows = n_rows; Mat& X = const_cast< Mat& >(m); if(local_n_rows == 1) { const uword urow = aux_row1; const uword start_col = aux_col1; const uword end_col_plus1 = start_col + local_n_cols; for(uword ucol = start_col; ucol < end_col_plus1; ++ucol) { X.at(urow, ucol) = eT( F() ); } } else { const uword start_col = aux_col1; const uword start_row = aux_row1; const uword end_col_plus1 = start_col + local_n_cols; const uword end_row_plus1 = start_row + local_n_rows; for(uword ucol = start_col; ucol < end_col_plus1; ++ucol) for(uword urow = start_row; urow < end_row_plus1; ++urow) { X.at(urow, ucol) = eT( F() ); } } } template inline void subview::fill(const eT val) { arma_extra_debug_sigprint(); const uword local_n_cols = n_cols; const uword local_n_rows = n_rows; if(local_n_rows == 1) { Mat& X = const_cast< Mat& >(m); const uword urow = aux_row1; const uword start_col = aux_col1; const uword end_col_plus1 = start_col + local_n_cols; uword ii,jj; for(ii=start_col, jj=start_col+1; jj < end_col_plus1; ii+=2, jj+=2) { X.at(urow, ii) = val; X.at(urow, jj) = val; } if(ii < end_col_plus1) { X.at(urow, ii) = val; } } else { for(uword ucol=0; ucol < local_n_cols; ++ucol) { arrayops::inplace_set( colptr(ucol), val, local_n_rows ); } } } template inline void subview::zeros() { arma_extra_debug_sigprint(); const uword local_n_cols = n_cols; const uword local_n_rows = n_rows; if(local_n_rows == 1) { (*this).fill(eT(0)); } else { for(uword ucol=0; ucol < local_n_cols; ++ucol) { arrayops::fill_zeros( colptr(ucol), local_n_rows ); } } } template inline void subview::ones() { arma_extra_debug_sigprint(); (*this).fill(eT(1)); } template inline void subview::eye() { arma_extra_debug_sigprint(); (*this).zeros(); const uword N = (std::min)(n_rows, n_cols); for(uword ii=0; ii < N; ++ii) { at(ii,ii) = eT(1); } } template inline void subview::randu() { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; if(local_n_rows == 1) { for(uword ii=0; ii < local_n_cols; ++ii) { at(0,ii) = eT(arma_rng::randu()); } } else { for(uword ii=0; ii < local_n_cols; ++ii) { arma_rng::randu::fill( colptr(ii), local_n_rows ); } } } template inline void subview::randn() { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; if(local_n_rows == 1) { for(uword ii=0; ii < local_n_cols; ++ii) { at(0,ii) = eT(arma_rng::randn()); } } else { for(uword ii=0; ii < local_n_cols; ++ii) { arma_rng::randn::fill( colptr(ii), local_n_rows ); } } } template inline eT subview::at_alt(const uword ii) const { return operator[](ii); } template inline eT& subview::operator[](const uword ii) { const uword in_col = ii / n_rows; const uword in_row = ii % n_rows; const uword index = (in_col + aux_col1)*m.n_rows + aux_row1 + in_row; return access::rw( (const_cast< Mat& >(m)).mem[index] ); } template inline eT subview::operator[](const uword ii) const { const uword in_col = ii / n_rows; const uword in_row = ii % n_rows; const uword index = (in_col + aux_col1)*m.n_rows + aux_row1 + in_row; return m.mem[index]; } template inline eT& subview::operator()(const uword ii) { arma_debug_check( (ii >= n_elem), "subview::operator(): index out of bounds"); const uword in_col = ii / n_rows; const uword in_row = ii % n_rows; const uword index = (in_col + aux_col1)*m.n_rows + aux_row1 + in_row; return access::rw( (const_cast< Mat& >(m)).mem[index] ); } template inline eT subview::operator()(const uword ii) const { arma_debug_check( (ii >= n_elem), "subview::operator(): index out of bounds"); const uword in_col = ii / n_rows; const uword in_row = ii % n_rows; const uword index = (in_col + aux_col1)*m.n_rows + aux_row1 + in_row; return m.mem[index]; } template inline eT& subview::operator()(const uword in_row, const uword in_col) { arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "subview::operator(): index out of bounds"); const uword index = (in_col + aux_col1)*m.n_rows + aux_row1 + in_row; return access::rw( (const_cast< Mat& >(m)).mem[index] ); } template inline eT subview::operator()(const uword in_row, const uword in_col) const { arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "subview::operator(): index out of bounds"); const uword index = (in_col + aux_col1)*m.n_rows + aux_row1 + in_row; return m.mem[index]; } template inline eT& subview::at(const uword in_row, const uword in_col) { const uword index = (in_col + aux_col1)*m.n_rows + aux_row1 + in_row; return access::rw( (const_cast< Mat& >(m)).mem[index] ); } template inline eT subview::at(const uword in_row, const uword in_col) const { const uword index = (in_col + aux_col1)*m.n_rows + aux_row1 + in_row; return m.mem[index]; } template arma_inline eT* subview::colptr(const uword in_col) { return & access::rw((const_cast< Mat& >(m)).mem[ (in_col + aux_col1)*m.n_rows + aux_row1 ]); } template arma_inline const eT* subview::colptr(const uword in_col) const { return & m.mem[ (in_col + aux_col1)*m.n_rows + aux_row1 ]; } template inline bool subview::check_overlap(const subview& x) const { const subview& s = *this; if(&s.m != &x.m) { return false; } else { if( (s.n_elem == 0) || (x.n_elem == 0) ) { return false; } else { const uword s_row_start = s.aux_row1; const uword s_row_end_p1 = s_row_start + s.n_rows; const uword s_col_start = s.aux_col1; const uword s_col_end_p1 = s_col_start + s.n_cols; const uword x_row_start = x.aux_row1; const uword x_row_end_p1 = x_row_start + x.n_rows; const uword x_col_start = x.aux_col1; const uword x_col_end_p1 = x_col_start + x.n_cols; const bool outside_rows = ( (x_row_start >= s_row_end_p1) || (s_row_start >= x_row_end_p1) ); const bool outside_cols = ( (x_col_start >= s_col_end_p1) || (s_col_start >= x_col_end_p1) ); return ( (outside_rows == false) && (outside_cols == false) ); } } } template inline arma_warn_unused bool subview::is_vec() const { return ( (n_rows == 1) || (n_cols == 1) ); } template inline arma_warn_unused bool subview::is_finite() const { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; for(uword ii=0; ii inline arma_warn_unused bool subview::has_inf() const { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; for(uword ii=0; ii inline arma_warn_unused bool subview::has_nan() const { arma_extra_debug_sigprint(); const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; for(uword ii=0; ii inline void subview::extract(Mat& out, const subview& in) { arma_extra_debug_sigprint(); // NOTE: we're assuming that the matrix has already been set to the correct size and there is no aliasing; // size setting and alias checking is done by either the Mat contructor or operator=() const uword n_rows = in.n_rows; // number of rows in the subview const uword n_cols = in.n_cols; // number of columns in the subview arma_extra_debug_print(arma_boost::format("out.n_rows = %d out.n_cols = %d in.m.n_rows = %d in.m.n_cols = %d") % out.n_rows % out.n_cols % in.m.n_rows % in.m.n_cols ); if(in.is_vec() == true) { if(n_cols == 1) // a column vector { arma_extra_debug_print("subview::extract(): copying col (going across rows)"); // in.colptr(0) the first column of the subview, taking into account any row offset arrayops::copy( out.memptr(), in.colptr(0), n_rows ); } else // a row vector (possibly empty) { arma_extra_debug_print("subview::extract(): copying row (going across columns)"); const Mat& X = in.m; eT* out_mem = out.memptr(); const uword row = in.aux_row1; const uword start_col = in.aux_col1; uword i,j; for(i=0, j=1; j < n_cols; i+=2, j+=2) { const eT tmp1 = X.at(row, start_col+i); const eT tmp2 = X.at(row, start_col+j); out_mem[i] = tmp1; out_mem[j] = tmp2; } if(i < n_cols) { out_mem[i] = X.at(row, start_col+i); } } } else // general submatrix { arma_extra_debug_print("subview::extract(): general submatrix"); for(uword col=0; col < n_cols; ++col) { arrayops::copy( out.colptr(col), in.colptr(col), n_rows ); } } } //! X += Y.submat(...) template inline void subview::plus_inplace(Mat& out, const subview& in) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out, in, "addition"); const uword n_rows = in.n_rows; const uword n_cols = in.n_cols; if(n_rows == 1) { eT* out_mem = out.memptr(); const Mat& X = in.m; const uword row = in.aux_row1; const uword start_col = in.aux_col1; uword i,j; for(i=0, j=1; j < n_cols; i+=2, j+=2) { const eT tmp1 = X.at(row, start_col+i); const eT tmp2 = X.at(row, start_col+j); out_mem[i] += tmp1; out_mem[j] += tmp2; } if(i < n_cols) { out_mem[i] += X.at(row, start_col+i); } } else { for(uword col=0; col < n_cols; ++col) { arrayops::inplace_plus(out.colptr(col), in.colptr(col), n_rows); } } } //! X -= Y.submat(...) template inline void subview::minus_inplace(Mat& out, const subview& in) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out, in, "subtraction"); const uword n_rows = in.n_rows; const uword n_cols = in.n_cols; if(n_rows == 1) { eT* out_mem = out.memptr(); const Mat& X = in.m; const uword row = in.aux_row1; const uword start_col = in.aux_col1; uword i,j; for(i=0, j=1; j < n_cols; i+=2, j+=2) { const eT tmp1 = X.at(row, start_col+i); const eT tmp2 = X.at(row, start_col+j); out_mem[i] -= tmp1; out_mem[j] -= tmp2; } if(i < n_cols) { out_mem[i] -= X.at(row, start_col+i); } } else { for(uword col=0; col < n_cols; ++col) { arrayops::inplace_minus(out.colptr(col), in.colptr(col), n_rows); } } } //! X %= Y.submat(...) template inline void subview::schur_inplace(Mat& out, const subview& in) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out, in, "element-wise multiplication"); const uword n_rows = in.n_rows; const uword n_cols = in.n_cols; if(n_rows == 1) { eT* out_mem = out.memptr(); const Mat& X = in.m; const uword row = in.aux_row1; const uword start_col = in.aux_col1; uword i,j; for(i=0, j=1; j < n_cols; i+=2, j+=2) { const eT tmp1 = X.at(row, start_col+i); const eT tmp2 = X.at(row, start_col+j); out_mem[i] *= tmp1; out_mem[j] *= tmp2; } if(i < n_cols) { out_mem[i] *= X.at(row, start_col+i); } } else { for(uword col=0; col < n_cols; ++col) { arrayops::inplace_mul(out.colptr(col), in.colptr(col), n_rows); } } } //! X /= Y.submat(...) template inline void subview::div_inplace(Mat& out, const subview& in) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(out, in, "element-wise division"); const uword n_rows = in.n_rows; const uword n_cols = in.n_cols; if(n_rows == 1) { eT* out_mem = out.memptr(); const Mat& X = in.m; const uword row = in.aux_row1; const uword start_col = in.aux_col1; uword i,j; for(i=0, j=1; j < n_cols; i+=2, j+=2) { const eT tmp1 = X.at(row, start_col+i); const eT tmp2 = X.at(row, start_col+j); out_mem[i] /= tmp1; out_mem[j] /= tmp2; } if(i < n_cols) { out_mem[i] /= X.at(row, start_col+i); } } else { for(uword col=0; col < n_cols; ++col) { arrayops::inplace_div(out.colptr(col), in.colptr(col), n_rows); } } } //! creation of subview (row vector) template inline subview_row subview::row(const uword row_num) { arma_extra_debug_sigprint(); arma_debug_check( row_num >= n_rows, "subview::row(): out of bounds" ); const uword base_row = aux_row1 + row_num; return subview_row(m, base_row, aux_col1, n_cols); } //! creation of subview (row vector) template inline const subview_row subview::row(const uword row_num) const { arma_extra_debug_sigprint(); arma_debug_check( row_num >= n_rows, "subview::row(): out of bounds" ); const uword base_row = aux_row1 + row_num; return subview_row(m, base_row, aux_col1, n_cols); } template inline subview_row subview::operator()(const uword row_num, const span& col_span) { arma_extra_debug_sigprint(); const bool col_all = col_span.whole; const uword local_n_cols = n_cols; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword submat_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; const uword base_col1 = aux_col1 + in_col1; const uword base_row = aux_row1 + row_num; arma_debug_check ( (row_num >= n_rows) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "subview::operator(): indices out of bounds or incorrectly used" ); return subview_row(m, base_row, base_col1, submat_n_cols); } template inline const subview_row subview::operator()(const uword row_num, const span& col_span) const { arma_extra_debug_sigprint(); const bool col_all = col_span.whole; const uword local_n_cols = n_cols; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword submat_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; const uword base_col1 = aux_col1 + in_col1; const uword base_row = aux_row1 + row_num; arma_debug_check ( (row_num >= n_rows) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "subview::operator(): indices out of bounds or incorrectly used" ); return subview_row(m, base_row, base_col1, submat_n_cols); } //! creation of subview (column vector) template inline subview_col subview::col(const uword col_num) { arma_extra_debug_sigprint(); arma_debug_check( col_num >= n_cols, "subview::col(): out of bounds"); const uword base_col = aux_col1 + col_num; return subview_col(m, base_col, aux_row1, n_rows); } //! creation of subview (column vector) template inline const subview_col subview::col(const uword col_num) const { arma_extra_debug_sigprint(); arma_debug_check( col_num >= n_cols, "subview::col(): out of bounds"); const uword base_col = aux_col1 + col_num; return subview_col(m, base_col, aux_row1, n_rows); } template inline subview_col subview::operator()(const span& row_span, const uword col_num) { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const uword local_n_rows = n_rows; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword submat_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; const uword base_row1 = aux_row1 + in_row1; const uword base_col = aux_col1 + col_num; arma_debug_check ( (col_num >= n_cols) || ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) , "subview::operator(): indices out of bounds or incorrectly used" ); return subview_col(m, base_col, base_row1, submat_n_rows); } template inline const subview_col subview::operator()(const span& row_span, const uword col_num) const { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const uword local_n_rows = n_rows; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword submat_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; const uword base_row1 = aux_row1 + in_row1; const uword base_col = aux_col1 + col_num; arma_debug_check ( (col_num >= n_cols) || ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) , "subview::operator(): indices out of bounds or incorrectly used" ); return subview_col(m, base_col, base_row1, submat_n_rows); } //! create a Col object which uses memory from an existing matrix object. //! this approach is currently not alias safe //! and does not take into account that the parent matrix object could be deleted. //! if deleted memory is accessed by the created Col object, //! it will cause memory corruption and/or a crash template inline Col subview::unsafe_col(const uword col_num) { arma_extra_debug_sigprint(); arma_debug_check( col_num >= n_cols, "subview::unsafe_col(): out of bounds"); return Col(colptr(col_num), n_rows, false, true); } //! create a Col object which uses memory from an existing matrix object. //! this approach is currently not alias safe //! and does not take into account that the parent matrix object could be deleted. //! if deleted memory is accessed by the created Col object, //! it will cause memory corruption and/or a crash template inline const Col subview::unsafe_col(const uword col_num) const { arma_extra_debug_sigprint(); arma_debug_check( col_num >= n_cols, "subview::unsafe_col(): out of bounds"); return Col(const_cast(colptr(col_num)), n_rows, false, true); } //! creation of subview (submatrix comprised of specified row vectors) template inline subview subview::rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_row2 >= n_rows), "subview::rows(): indices out of bounds or incorrectly used" ); const uword subview_n_rows = in_row2 - in_row1 + 1; const uword base_row1 = aux_row1 + in_row1; return subview(m, base_row1, aux_col1, subview_n_rows, n_cols ); } //! creation of subview (submatrix comprised of specified row vectors) template inline const subview subview::rows(const uword in_row1, const uword in_row2) const { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_row2 >= n_rows), "subview::rows(): indices out of bounds or incorrectly used" ); const uword subview_n_rows = in_row2 - in_row1 + 1; const uword base_row1 = aux_row1 + in_row1; return subview(m, base_row1, aux_col1, subview_n_rows, n_cols ); } //! creation of subview (submatrix comprised of specified column vectors) template inline subview subview::cols(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_col1 > in_col2) || (in_col2 >= n_cols), "subview::cols(): indices out of bounds or incorrectly used" ); const uword subview_n_cols = in_col2 - in_col1 + 1; const uword base_col1 = aux_col1 + in_col1; return subview(m, aux_row1, base_col1, n_rows, subview_n_cols); } //! creation of subview (submatrix comprised of specified column vectors) template inline const subview subview::cols(const uword in_col1, const uword in_col2) const { arma_extra_debug_sigprint(); arma_debug_check ( (in_col1 > in_col2) || (in_col2 >= n_cols), "subview::cols(): indices out of bounds or incorrectly used" ); const uword subview_n_cols = in_col2 - in_col1 + 1; const uword base_col1 = aux_col1 + in_col1; return subview(m, aux_row1, base_col1, n_rows, subview_n_cols); } //! creation of subview (submatrix) template inline subview subview::submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_col1 > in_col2) || (in_row2 >= n_rows) || (in_col2 >= n_cols), "subview::submat(): indices out of bounds or incorrectly used" ); const uword subview_n_rows = in_row2 - in_row1 + 1; const uword subview_n_cols = in_col2 - in_col1 + 1; const uword base_row1 = aux_row1 + in_row1; const uword base_col1 = aux_col1 + in_col1; return subview(m, base_row1, base_col1, subview_n_rows, subview_n_cols); } //! creation of subview (generic submatrix) template inline const subview subview::submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) const { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 > in_row2) || (in_col1 > in_col2) || (in_row2 >= n_rows) || (in_col2 >= n_cols), "subview::submat(): indices out of bounds or incorrectly used" ); const uword subview_n_rows = in_row2 - in_row1 + 1; const uword subview_n_cols = in_col2 - in_col1 + 1; const uword base_row1 = aux_row1 + in_row1; const uword base_col1 = aux_col1 + in_col1; return subview(m, base_row1, base_col1, subview_n_rows, subview_n_cols); } //! creation of subview (submatrix) template inline subview subview::submat(const span& row_span, const span& col_span) { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const bool col_all = col_span.whole; const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword submat_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword submat_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "subview::submat(): indices out of bounds or incorrectly used" ); const uword base_row1 = aux_row1 + in_row1; const uword base_col1 = aux_col1 + in_col1; return subview(m, base_row1, base_col1, submat_n_rows, submat_n_cols); } //! creation of subview (generic submatrix) template inline const subview subview::submat(const span& row_span, const span& col_span) const { arma_extra_debug_sigprint(); const bool row_all = row_span.whole; const bool col_all = col_span.whole; const uword local_n_rows = n_rows; const uword local_n_cols = n_cols; const uword in_row1 = row_all ? 0 : row_span.a; const uword in_row2 = row_span.b; const uword submat_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1; const uword in_col1 = col_all ? 0 : col_span.a; const uword in_col2 = col_span.b; const uword submat_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1; arma_debug_check ( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ) || ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ) , "subview::submat(): indices out of bounds or incorrectly used" ); const uword base_row1 = aux_row1 + in_row1; const uword base_col1 = aux_col1 + in_col1; return subview(m, base_row1, base_col1, submat_n_rows, submat_n_cols); } template inline subview subview::operator()(const span& row_span, const span& col_span) { arma_extra_debug_sigprint(); return (*this).submat(row_span, col_span); } template inline const subview subview::operator()(const span& row_span, const span& col_span) const { arma_extra_debug_sigprint(); return (*this).submat(row_span, col_span); } template inline subview_each1< subview, 0 > subview::each_col() { arma_extra_debug_sigprint(); return subview_each1< subview, 0 >(*this); } template inline subview_each1< subview, 1 > subview::each_row() { arma_extra_debug_sigprint(); return subview_each1< subview, 1 >(*this); } template template inline subview_each2< subview, 0, T1 > subview::each_col(const Base& indices) { arma_extra_debug_sigprint(); return subview_each2< subview, 0, T1 >(*this, indices); } template template inline subview_each2< subview, 1, T1 > subview::each_row(const Base& indices) { arma_extra_debug_sigprint(); return subview_each2< subview, 1, T1 >(*this, indices); } //! creation of diagview (diagonal) template inline diagview subview::diag(const sword in_id) { arma_extra_debug_sigprint(); const uword row_offset = (in_id < 0) ? uword(-in_id) : 0; const uword col_offset = (in_id > 0) ? uword( in_id) : 0; arma_debug_check ( ((row_offset > 0) && (row_offset >= n_rows)) || ((col_offset > 0) && (col_offset >= n_cols)), "subview::diag(): requested diagonal out of bounds" ); const uword len = (std::min)(n_rows - row_offset, n_cols - col_offset); const uword base_row_offset = aux_row1 + row_offset; const uword base_col_offset = aux_col1 + col_offset; return diagview(m, base_row_offset, base_col_offset, len); } //! creation of diagview (diagonal) template inline const diagview subview::diag(const sword in_id) const { arma_extra_debug_sigprint(); const uword row_offset = (in_id < 0) ? -in_id : 0; const uword col_offset = (in_id > 0) ? in_id : 0; arma_debug_check ( ((row_offset > 0) && (row_offset >= n_rows)) || ((col_offset > 0) && (col_offset >= n_cols)), "subview::diag(): requested diagonal out of bounds" ); const uword len = (std::min)(n_rows - row_offset, n_cols - col_offset); const uword base_row_offset = aux_row1 + row_offset; const uword base_col_offset = aux_col1 + col_offset; return diagview(m, base_row_offset, base_col_offset, len); } template inline void subview::swap_rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_row1 >= n_rows) || (in_row2 >= n_rows), "subview::swap_rows(): out of bounds" ); eT* mem = (const_cast< Mat& >(m)).memptr(); if(n_elem > 0) { const uword m_n_rows = m.n_rows; for(uword ucol=0; ucol < n_cols; ++ucol) { const uword offset = (aux_col1 + ucol) * m_n_rows; const uword pos1 = aux_row1 + in_row1 + offset; const uword pos2 = aux_row1 + in_row2 + offset; std::swap( access::rw(mem[pos1]), access::rw(mem[pos2]) ); } } } template inline void subview::swap_cols(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check ( (in_col1 >= n_cols) || (in_col2 >= n_cols), "subview::swap_cols(): out of bounds" ); if(n_elem > 0) { eT* ptr1 = colptr(in_col1); eT* ptr2 = colptr(in_col2); for(uword urow=0; urow < n_rows; ++urow) { std::swap( ptr1[urow], ptr2[urow] ); } } } // template // inline // subview::iter::iter(const subview& S) // : mem (S.m.mem) // , n_rows (S.m.n_rows) // , row_start (S.aux_row1) // , row_end_p1(row_start + S.n_rows) // , row (row_start) // , col (S.aux_col1) // , i (row + col*n_rows) // { // arma_extra_debug_sigprint(); // } // // // // template // arma_inline // eT // subview::iter::operator*() const // { // return mem[i]; // } // // // // template // inline // void // subview::iter::operator++() // { // ++row; // // if(row < row_end_p1) // { // ++i; // } // else // { // row = row_start; // ++col; // // i = row + col*n_rows; // } // } // // // // template // inline // void // subview::iter::operator++(int) // { // operator++(); // } // // // template inline subview_col::subview_col(const Mat& in_m, const uword in_col) : subview(in_m, 0, in_col, in_m.n_rows, 1) , colmem(subview::colptr(0)) { arma_extra_debug_sigprint(); } template inline subview_col::subview_col(const Mat& in_m, const uword in_col, const uword in_row1, const uword in_n_rows) : subview(in_m, in_row1, in_col, in_n_rows, 1) , colmem(subview::colptr(0)) { arma_extra_debug_sigprint(); } template inline void subview_col::operator=(const subview& X) { arma_extra_debug_sigprint(); subview::operator=(X); } template inline void subview_col::operator=(const subview_col& X) { arma_extra_debug_sigprint(); subview::operator=(X); // interprets 'subview_col' as 'subview' } template inline void subview_col::operator=(const eT val) { arma_extra_debug_sigprint(); if(subview::n_elem != 1) { arma_debug_assert_same_size(subview::n_rows, subview::n_cols, 1, 1, "copy into submatrix"); } access::rw( colmem[0] ) = val; } template template inline void subview_col::operator=(const Base& X) { arma_extra_debug_sigprint(); subview::operator=(X); } template template inline typename enable_if2< is_same_type::value, void>::result subview_col::operator= (const Gen& in) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(subview::n_rows, uword(1), in.n_rows, (in.is_col ? uword(1) : in.n_cols), "copy into submatrix"); in.apply(*this); } template arma_inline const Op,op_htrans> subview_col::t() const { return Op,op_htrans>(*this); } template arma_inline const Op,op_htrans> subview_col::ht() const { return Op,op_htrans>(*this); } template arma_inline const Op,op_strans> subview_col::st() const { return Op,op_strans>(*this); } template inline void subview_col::fill(const eT val) { arma_extra_debug_sigprint(); arrayops::inplace_set( access::rwp(colmem), val, subview::n_rows ); } template inline void subview_col::zeros() { arma_extra_debug_sigprint(); arrayops::fill_zeros( access::rwp(colmem), subview::n_rows ); } template inline void subview_col::ones() { arma_extra_debug_sigprint(); arrayops::inplace_set( access::rwp(colmem), eT(1), subview::n_rows ); } template arma_inline eT subview_col::at_alt(const uword ii) const { const eT* colmem_aligned = colmem; memory::mark_as_aligned(colmem_aligned); return colmem_aligned[ii]; } template arma_inline eT& subview_col::operator[](const uword ii) { return access::rw( colmem[ii] ); } template arma_inline eT subview_col::operator[](const uword ii) const { return colmem[ii]; } template inline eT& subview_col::operator()(const uword ii) { arma_debug_check( (ii >= subview::n_elem), "subview::operator(): index out of bounds"); return access::rw( colmem[ii] ); } template inline eT subview_col::operator()(const uword ii) const { arma_debug_check( (ii >= subview::n_elem), "subview::operator(): index out of bounds"); return colmem[ii]; } template inline eT& subview_col::operator()(const uword in_row, const uword in_col) { arma_debug_check( ((in_row >= subview::n_rows) || (in_col > 0)), "subview::operator(): index out of bounds"); return access::rw( colmem[in_row] ); } template inline eT subview_col::operator()(const uword in_row, const uword in_col) const { arma_debug_check( ((in_row >= subview::n_rows) || (in_col > 0)), "subview::operator(): index out of bounds"); return colmem[in_row]; } template inline eT& subview_col::at(const uword in_row, const uword) { return access::rw( colmem[in_row] ); } template inline eT subview_col::at(const uword in_row, const uword) const { return colmem[in_row]; } template arma_inline eT* subview_col::colptr(const uword) { return const_cast(colmem); } template arma_inline const eT* subview_col::colptr(const uword) const { return colmem; } template inline subview_col subview_col::rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview::n_rows) ), "subview_col::rows(): indices out of bounds or incorrectly used"); const uword subview_n_rows = in_row2 - in_row1 + 1; const uword base_row1 = this->aux_row1 + in_row1; return subview_col(this->m, this->aux_col1, base_row1, subview_n_rows); } template inline const subview_col subview_col::rows(const uword in_row1, const uword in_row2) const { arma_extra_debug_sigprint(); arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview::n_rows) ), "subview_col::rows(): indices out of bounds or incorrectly used"); const uword subview_n_rows = in_row2 - in_row1 + 1; const uword base_row1 = this->aux_row1 + in_row1; return subview_col(this->m, this->aux_col1, base_row1, subview_n_rows); } template inline subview_col subview_col::subvec(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview::n_rows) ), "subview_col::subvec(): indices out of bounds or incorrectly used"); const uword subview_n_rows = in_row2 - in_row1 + 1; const uword base_row1 = this->aux_row1 + in_row1; return subview_col(this->m, this->aux_col1, base_row1, subview_n_rows); } template inline const subview_col subview_col::subvec(const uword in_row1, const uword in_row2) const { arma_extra_debug_sigprint(); arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview::n_rows) ), "subview_col::subvec(): indices out of bounds or incorrectly used"); const uword subview_n_rows = in_row2 - in_row1 + 1; const uword base_row1 = this->aux_row1 + in_row1; return subview_col(this->m, this->aux_col1, base_row1, subview_n_rows); } template inline subview_col subview_col::head(const uword N) { arma_extra_debug_sigprint(); arma_debug_check( (N > subview::n_rows), "subview_col::head(): size out of bounds"); return subview_col(this->m, this->aux_col1, this->aux_row1, N); } template inline const subview_col subview_col::head(const uword N) const { arma_extra_debug_sigprint(); arma_debug_check( (N > subview::n_rows), "subview_col::head(): size out of bounds"); return subview_col(this->m, this->aux_col1, this->aux_row1, N); } template inline subview_col subview_col::tail(const uword N) { arma_extra_debug_sigprint(); arma_debug_check( (N > subview::n_rows), "subview_col::tail(): size out of bounds"); const uword start_row = subview::aux_row1 + subview::n_rows - N; return subview_col(this->m, this->aux_col1, start_row, N); } template inline const subview_col subview_col::tail(const uword N) const { arma_extra_debug_sigprint(); arma_debug_check( (N > subview::n_rows), "subview_col::tail(): size out of bounds"); const uword start_row = subview::aux_row1 + subview::n_rows - N; return subview_col(this->m, this->aux_col1, start_row, N); } // // // template inline subview_row::subview_row(const Mat& in_m, const uword in_row) : subview(in_m, in_row, 0, 1, in_m.n_cols) { arma_extra_debug_sigprint(); } template inline subview_row::subview_row(const Mat& in_m, const uword in_row, const uword in_col1, const uword in_n_cols) : subview(in_m, in_row, in_col1, 1, in_n_cols) { arma_extra_debug_sigprint(); } template inline void subview_row::operator=(const subview& X) { arma_extra_debug_sigprint(); subview::operator=(X); } template inline void subview_row::operator=(const subview_row& X) { arma_extra_debug_sigprint(); subview::operator=(X); // interprets 'subview_row' as 'subview' } template inline void subview_row::operator=(const eT val) { arma_extra_debug_sigprint(); subview::operator=(val); // interprets 'subview_row' as 'subview' } template template inline void subview_row::operator=(const Base& X) { arma_extra_debug_sigprint(); subview::operator=(X); } template template inline typename enable_if2< is_same_type::value, void>::result subview_row::operator= (const Gen& in) { arma_extra_debug_sigprint(); arma_debug_assert_same_size(uword(1), subview::n_cols, (in.is_row ? uword(1) : in.n_rows), in.n_cols, "copy into submatrix"); in.apply(*this); } template arma_inline const Op,op_htrans> subview_row::t() const { return Op,op_htrans>(*this); } template arma_inline const Op,op_htrans> subview_row::ht() const { return Op,op_htrans>(*this); } template arma_inline const Op,op_strans> subview_row::st() const { return Op,op_strans>(*this); } template inline eT subview_row::at_alt(const uword ii) const { const uword index = (ii + (subview::aux_col1))*(subview::m).n_rows + (subview::aux_row1); return subview::m.mem[index]; } template inline eT& subview_row::operator[](const uword ii) { const uword index = (ii + (subview::aux_col1))*(subview::m).n_rows + (subview::aux_row1); return access::rw( (const_cast< Mat& >(subview::m)).mem[index] ); } template inline eT subview_row::operator[](const uword ii) const { const uword index = (ii + (subview::aux_col1))*(subview::m).n_rows + (subview::aux_row1); return subview::m.mem[index]; } template inline eT& subview_row::operator()(const uword ii) { arma_debug_check( (ii >= subview::n_elem), "subview::operator(): index out of bounds"); const uword index = (ii + (subview::aux_col1))*(subview::m).n_rows + (subview::aux_row1); return access::rw( (const_cast< Mat& >(subview::m)).mem[index] ); } template inline eT subview_row::operator()(const uword ii) const { arma_debug_check( (ii >= subview::n_elem), "subview::operator(): index out of bounds"); const uword index = (ii + (subview::aux_col1))*(subview::m).n_rows + (subview::aux_row1); return subview::m.mem[index]; } template inline eT& subview_row::operator()(const uword in_row, const uword in_col) { arma_debug_check( ((in_row > 0) || (in_col >= subview::n_cols)), "subview::operator(): index out of bounds"); const uword index = (in_col + (subview::aux_col1))*(subview::m).n_rows + (subview::aux_row1); return access::rw( (const_cast< Mat& >(subview::m)).mem[index] ); } template inline eT subview_row::operator()(const uword in_row, const uword in_col) const { arma_debug_check( ((in_row > 0) || (in_col >= subview::n_cols)), "subview::operator(): index out of bounds"); const uword index = (in_col + (subview::aux_col1))*(subview::m).n_rows + (subview::aux_row1); return subview::m.mem[index]; } template inline eT& subview_row::at(const uword, const uword in_col) { const uword index = (in_col + (subview::aux_col1))*(subview::m).n_rows + (subview::aux_row1); return access::rw( (const_cast< Mat& >(subview::m)).mem[index] ); } template inline eT subview_row::at(const uword, const uword in_col) const { const uword index = (in_col + (subview::aux_col1))*(subview::m).n_rows + (subview::aux_row1); return subview::m.mem[index]; } template inline subview_row subview_row::cols(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview::n_cols) ), "subview_row::cols(): indices out of bounds or incorrectly used" ); const uword subview_n_cols = in_col2 - in_col1 + 1; const uword base_col1 = this->aux_col1 + in_col1; return subview_row(this->m, this->aux_row1, base_col1, subview_n_cols); } template inline const subview_row subview_row::cols(const uword in_col1, const uword in_col2) const { arma_extra_debug_sigprint(); arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview::n_cols) ), "subview_row::cols(): indices out of bounds or incorrectly used"); const uword subview_n_cols = in_col2 - in_col1 + 1; const uword base_col1 = this->aux_col1 + in_col1; return subview_row(this->m, this->aux_row1, base_col1, subview_n_cols); } template inline subview_row subview_row::subvec(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview::n_cols) ), "subview_row::subvec(): indices out of bounds or incorrectly used"); const uword subview_n_cols = in_col2 - in_col1 + 1; const uword base_col1 = this->aux_col1 + in_col1; return subview_row(this->m, this->aux_row1, base_col1, subview_n_cols); } template inline const subview_row subview_row::subvec(const uword in_col1, const uword in_col2) const { arma_extra_debug_sigprint(); arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview::n_cols) ), "subview_row::subvec(): indices out of bounds or incorrectly used"); const uword subview_n_cols = in_col2 - in_col1 + 1; const uword base_col1 = this->aux_col1 + in_col1; return subview_row(this->m, this->aux_row1, base_col1, subview_n_cols); } template inline subview_row subview_row::head(const uword N) { arma_extra_debug_sigprint(); arma_debug_check( (N > subview::n_cols), "subview_row::head(): size out of bounds"); return subview_row(this->m, this->aux_row1, this->aux_col1, N); } template inline const subview_row subview_row::head(const uword N) const { arma_extra_debug_sigprint(); arma_debug_check( (N > subview::n_cols), "subview_row::head(): size out of bounds"); return subview_row(this->m, this->aux_row1, this->aux_col1, N); } template inline subview_row subview_row::tail(const uword N) { arma_extra_debug_sigprint(); arma_debug_check( (N > subview::n_cols), "subview_row::tail(): size out of bounds"); const uword start_col = subview::aux_col1 + subview::n_cols - N; return subview_row(this->m, this->aux_row1, start_col, N); } template inline const subview_row subview_row::tail(const uword N) const { arma_extra_debug_sigprint(); arma_debug_check( (N > subview::n_cols), "subview_row::tail(): size out of bounds"); const uword start_col = subview::aux_col1 + subview::n_cols - N; return subview_row(this->m, this->aux_row1, start_col, N); } // // // template inline subview_row_strans::subview_row_strans(const subview_row& in_sv_row) : sv_row(in_sv_row ) , n_rows(in_sv_row.n_cols) , n_elem(in_sv_row.n_elem) { arma_extra_debug_sigprint(); } template inline void subview_row_strans::extract(Mat& out) const { arma_extra_debug_sigprint(); // NOTE: this function assumes that matrix 'out' has already been set to the correct size const Mat& X = sv_row.m; eT* out_mem = out.memptr(); const uword row = sv_row.aux_row1; const uword start_col = sv_row.aux_col1; const uword sv_row_n_cols = sv_row.n_cols; uword ii,jj; for(ii=0, jj=1; jj < sv_row_n_cols; ii+=2, jj+=2) { const eT tmp1 = X.at(row, start_col+ii); const eT tmp2 = X.at(row, start_col+jj); out_mem[ii] = tmp1; out_mem[jj] = tmp2; } if(ii < sv_row_n_cols) { out_mem[ii] = X.at(row, start_col+ii); } } template inline eT subview_row_strans::at_alt(const uword ii) const { return sv_row[ii]; } template inline eT subview_row_strans::operator[](const uword ii) const { return sv_row[ii]; } template inline eT subview_row_strans::operator()(const uword ii) const { return sv_row(ii); } template inline eT subview_row_strans::operator()(const uword in_row, const uword in_col) const { return sv_row(in_col, in_row); // deliberately swapped } template inline eT subview_row_strans::at(const uword in_row, const uword) const { return sv_row.at(0, in_row); // deliberately swapped } // // // template inline subview_row_htrans::subview_row_htrans(const subview_row& in_sv_row) : sv_row(in_sv_row ) , n_rows(in_sv_row.n_cols) , n_elem(in_sv_row.n_elem) { arma_extra_debug_sigprint(); } template inline void subview_row_htrans::extract(Mat& out) const { arma_extra_debug_sigprint(); // NOTE: this function assumes that matrix 'out' has already been set to the correct size const Mat& X = sv_row.m; eT* out_mem = out.memptr(); const uword row = sv_row.aux_row1; const uword start_col = sv_row.aux_col1; const uword sv_row_n_cols = sv_row.n_cols; for(uword ii=0; ii < sv_row_n_cols; ++ii) { out_mem[ii] = access::alt_conj( X.at(row, start_col+ii) ); } } template inline eT subview_row_htrans::at_alt(const uword ii) const { return access::alt_conj( sv_row[ii] ); } template inline eT subview_row_htrans::operator[](const uword ii) const { return access::alt_conj( sv_row[ii] ); } template inline eT subview_row_htrans::operator()(const uword ii) const { return access::alt_conj( sv_row(ii) ); } template inline eT subview_row_htrans::operator()(const uword in_row, const uword in_col) const { return access::alt_conj( sv_row(in_col, in_row) ); // deliberately swapped } template inline eT subview_row_htrans::at(const uword in_row, const uword) const { return access::alt_conj( sv_row.at(0, in_row) ); // deliberately swapped } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/superlu_bones.hpp ================================================ // Copyright (C) 2015 Ryan Curtin // Copyright (C) 2015 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/ #if defined(ARMA_USE_SUPERLU) extern "C" { extern void arma_wrapper(sgssv)(superlu::superlu_options_t*, superlu::SuperMatrix*, int*, int*, superlu::SuperMatrix*, superlu::SuperMatrix*, superlu::SuperMatrix*, superlu::SuperLUStat_t*, int*); extern void arma_wrapper(dgssv)(superlu::superlu_options_t*, superlu::SuperMatrix*, int*, int*, superlu::SuperMatrix*, superlu::SuperMatrix*, superlu::SuperMatrix*, superlu::SuperLUStat_t*, int*); extern void arma_wrapper(cgssv)(superlu::superlu_options_t*, superlu::SuperMatrix*, int*, int*, superlu::SuperMatrix*, superlu::SuperMatrix*, superlu::SuperMatrix*, superlu::SuperLUStat_t*, int*); extern void arma_wrapper(zgssv)(superlu::superlu_options_t*, superlu::SuperMatrix*, int*, int*, superlu::SuperMatrix*, superlu::SuperMatrix*, superlu::SuperMatrix*, superlu::SuperLUStat_t*, int*); extern void arma_wrapper(StatInit)(superlu::SuperLUStat_t*); extern void arma_wrapper(StatFree)(superlu::SuperLUStat_t*); extern void arma_wrapper(set_default_options)(superlu::superlu_options_t*); extern void arma_wrapper(Destroy_SuperNode_Matrix)(superlu::SuperMatrix*); extern void arma_wrapper(Destroy_CompCol_Matrix)(superlu::SuperMatrix*); extern void arma_wrapper(Destroy_SuperMatrix_Store)(superlu::SuperMatrix*); // We also need superlu_malloc() and superlu_free(). // When using the original SuperLU code directly, you (the user) may // define USER_MALLOC and USER_FREE, but the joke is on you because // if you are linking against SuperLU and not compiling from scratch, // it won't actually make a difference anyway! If you've compiled // SuperLU against a custom USER_MALLOC and USER_FREE, you're probably up // shit creek about a thousand different ways before you even get to this // code, so, don't do that! extern void* arma_wrapper(superlu_malloc)(size_t); extern void arma_wrapper(superlu_free)(void*); } #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/superlu_wrapper.hpp ================================================ // Copyright (C) 2015 Ryan Curtin // Copyright (C) 2015 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #if defined(ARMA_USE_SUPERLU) //! \namespace superlu namespace for SuperLU functions namespace superlu { template inline void gssv(superlu_options_t* options, SuperMatrix* A, int* perm_c, int* perm_r, SuperMatrix* L, SuperMatrix* U, SuperMatrix* B, SuperLUStat_t* stat, int* info) { arma_type_check(( is_supported_blas_type::value == false )); if(is_float::value) { arma_wrapper(sgssv)(options, A, perm_c, perm_r, L, U, B, stat, info); } else if(is_double::value) { arma_wrapper(dgssv)(options, A, perm_c, perm_r, L, U, B, stat, info); } else if(is_supported_complex_float::value) { arma_wrapper(cgssv)(options, A, perm_c, perm_r, L, U, B, stat, info); } else if(is_supported_complex_double::value) { arma_wrapper(zgssv)(options, A, perm_c, perm_r, L, U, B, stat, info); } } inline void init_stat(SuperLUStat_t* stat) { arma_wrapper(StatInit)(stat); } inline void free_stat(SuperLUStat_t* stat) { arma_wrapper(StatFree)(stat); } inline void set_default_opts(superlu_options_t* opts) { arma_wrapper(set_default_options)(opts); } inline void destroy_supernode_mat(SuperMatrix* a) { arma_wrapper(Destroy_SuperNode_Matrix)(a); } inline void destroy_compcol_mat(SuperMatrix* a) { arma_wrapper(Destroy_CompCol_Matrix)(a); } inline void destroy_dense_mat(SuperMatrix* a) { arma_wrapper(Destroy_SuperMatrix_Store)(a); } inline void* malloc(size_t N) { return arma_wrapper(superlu_malloc)(N); } inline void free(void* mem) { arma_wrapper(superlu_free)(mem); } } // namespace superlu #endif ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/traits.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup traits //! @{ template struct get_pod_type { typedef T1 result; }; template struct get_pod_type< std::complex > { typedef T2 result; }; template struct is_Mat_fixed_only { typedef char yes[1]; typedef char no[2]; template static yes& check(typename X::Mat_fixed_type*); template static no& check(...); static const bool value = ( sizeof(check(0)) == sizeof(yes) ); }; template struct is_Row_fixed_only { typedef char yes[1]; typedef char no[2]; template static yes& check(typename X::Row_fixed_type*); template static no& check(...); static const bool value = ( sizeof(check(0)) == sizeof(yes) ); }; template struct is_Col_fixed_only { typedef char yes[1]; typedef char no[2]; template static yes& check(typename X::Col_fixed_type*); template static no& check(...); static const bool value = ( sizeof(check(0)) == sizeof(yes) ); }; template struct is_Mat_fixed { static const bool value = ( is_Mat_fixed_only::value || is_Row_fixed_only::value || is_Col_fixed_only::value ); }; template struct is_Mat_only { static const bool value = is_Mat_fixed_only::value; }; template struct is_Mat_only< Mat > { static const bool value = true; }; template struct is_Mat_only< const Mat > { static const bool value = true; }; template struct is_Mat { static const bool value = ( is_Mat_fixed_only::value || is_Row_fixed_only::value || is_Col_fixed_only::value ); }; template struct is_Mat< Mat > { static const bool value = true; }; template struct is_Mat< const Mat > { static const bool value = true; }; template struct is_Mat< Row > { static const bool value = true; }; template struct is_Mat< const Row > { static const bool value = true; }; template struct is_Mat< Col > { static const bool value = true; }; template struct is_Mat< const Col > { static const bool value = true; }; template struct is_Row { static const bool value = is_Row_fixed_only::value; }; template struct is_Row< Row > { static const bool value = true; }; template struct is_Row< const Row > { static const bool value = true; }; template struct is_Col { static const bool value = is_Col_fixed_only::value; }; template struct is_Col< Col > { static const bool value = true; }; template struct is_Col< const Col > { static const bool value = true; }; template struct is_diagview { static const bool value = false; }; template struct is_diagview< diagview > { static const bool value = true; }; template struct is_diagview< const diagview > { static const bool value = true; }; template struct is_subview { static const bool value = false; }; template struct is_subview< subview > { static const bool value = true; }; template struct is_subview< const subview > { static const bool value = true; }; template struct is_subview_row { static const bool value = false; }; template struct is_subview_row< subview_row > { static const bool value = true; }; template struct is_subview_row< const subview_row > { static const bool value = true; }; template struct is_subview_col { static const bool value = false; }; template struct is_subview_col< subview_col > { static const bool value = true; }; template struct is_subview_col< const subview_col > { static const bool value = true; }; template struct is_subview_elem1 { static const bool value = false; }; template struct is_subview_elem1< subview_elem1 > { static const bool value = true; }; template struct is_subview_elem1< const subview_elem1 > { static const bool value = true; }; template struct is_subview_elem2 { static const bool value = false; }; template struct is_subview_elem2< subview_elem2 > { static const bool value = true; }; template struct is_subview_elem2< const subview_elem2 > { static const bool value = true; }; // // // template struct is_Cube { static const bool value = false; }; template struct is_Cube< Cube > { static const bool value = true; }; template struct is_subview_cube { static const bool value = false; }; template struct is_subview_cube< subview_cube > { static const bool value = true; }; // // // template struct is_Gen { static const bool value = false; }; template struct is_Gen< Gen > { static const bool value = true; }; template struct is_Gen< const Gen > { static const bool value = true; }; template struct is_Op { static const bool value = false; }; template struct is_Op< Op > { static const bool value = true; }; template struct is_Op< const Op > { static const bool value = true; }; template struct is_eOp { static const bool value = false; }; template struct is_eOp< eOp > { static const bool value = true; }; template struct is_eOp< const eOp > { static const bool value = true; }; template struct is_mtOp { static const bool value = false; }; template struct is_mtOp< mtOp > { static const bool value = true; }; template struct is_mtOp< const mtOp > { static const bool value = true; }; template struct is_Glue { static const bool value = false; }; template struct is_Glue< Glue > { static const bool value = true; }; template struct is_Glue< const Glue > { static const bool value = true; }; template struct is_eGlue { static const bool value = false; }; template struct is_eGlue< eGlue > { static const bool value = true; }; template struct is_eGlue< const eGlue > { static const bool value = true; }; template struct is_mtGlue { static const bool value = false; }; template struct is_mtGlue< mtGlue > { static const bool value = true; }; template struct is_mtGlue< const mtGlue > { static const bool value = true; }; // // template struct is_glue_times { static const bool value = false; }; template struct is_glue_times< Glue > { static const bool value = true; }; template struct is_glue_times< const Glue > { static const bool value = true; }; template struct is_glue_times_diag { static const bool value = false; }; template struct is_glue_times_diag< Glue > { static const bool value = true; }; template struct is_glue_times_diag< const Glue > { static const bool value = true; }; template struct is_op_diagmat { static const bool value = false; }; template struct is_op_diagmat< Op > { static const bool value = true; }; template struct is_op_diagmat< const Op > { static const bool value = true; }; template struct is_op_htrans2 { static const bool value = false; }; template struct is_op_htrans2< Op > { static const bool value = true; }; template struct is_op_htrans2< const Op > { static const bool value = true; }; // // template struct is_Mat_trans { static const bool value = false; }; template struct is_Mat_trans< Op > { static const bool value = is_Mat::value; }; template struct is_Mat_trans< Op > { static const bool value = is_Mat::value; }; // // template struct is_GenCube { static const bool value = false; }; template struct is_GenCube< GenCube > { static const bool value = true; }; template struct is_OpCube { static const bool value = false; }; template struct is_OpCube< OpCube > { static const bool value = true; }; template struct is_eOpCube { static const bool value = false; }; template struct is_eOpCube< eOpCube > { static const bool value = true; }; template struct is_mtOpCube { static const bool value = false; }; template struct is_mtOpCube< mtOpCube > { static const bool value = true; }; template struct is_GlueCube { static const bool value = false; }; template struct is_GlueCube< GlueCube > { static const bool value = true; }; template struct is_eGlueCube { static const bool value = false; }; template struct is_eGlueCube< eGlueCube > { static const bool value = true; }; template struct is_mtGlueCube { static const bool value = false; }; template struct is_mtGlueCube< mtGlueCube > { static const bool value = true; }; // // // template struct is_op_rel { static const bool value = false; }; template struct is_op_rel< mtOp > { static const bool value = true; }; template struct is_op_rel< mtOp > { static const bool value = true; }; template struct is_op_rel< mtOp > { static const bool value = true; }; template struct is_op_rel< mtOp > { static const bool value = true; }; template struct is_op_rel< mtOp > { static const bool value = true; }; template struct is_op_rel< mtOp > { static const bool value = true; }; template struct is_op_rel< mtOp > { static const bool value = true; }; template struct is_op_rel< mtOp > { static const bool value = true; }; template struct is_op_rel< mtOp > { static const bool value = true; }; template struct is_op_rel< mtOp > { static const bool value = true; }; // // // template struct is_basevec { static const bool value = ( is_Row_fixed_only::value || is_Col_fixed_only::value ); }; template struct is_basevec< Row > { static const bool value = true; }; template struct is_basevec< const Row > { static const bool value = true; }; template struct is_basevec< Col > { static const bool value = true; }; template struct is_basevec< const Col > { static const bool value = true; }; template struct is_basevec< subview_row > { static const bool value = true; }; template struct is_basevec< const subview_row > { static const bool value = true; }; template struct is_basevec< subview_col > { static const bool value = true; }; template struct is_basevec< const subview_col > { static const bool value = true; }; template struct is_basevec< diagview > { static const bool value = true; }; template struct is_basevec< const diagview > { static const bool value = true; }; template struct is_basevec< subview_elem1 > { static const bool value = true; }; template struct is_basevec< const subview_elem1 > { static const bool value = true; }; // // // template struct is_arma_type { static const bool value = is_Mat::value || is_Gen::value || is_Op::value || is_Glue::value || is_eOp::value || is_eGlue::value || is_mtOp::value || is_mtGlue::value || is_diagview::value || is_subview::value || is_subview_row::value || is_subview_col::value || is_subview_elem1::value || is_subview_elem2::value ; }; template struct is_arma_cube_type { static const bool value = is_Cube::value || is_GenCube::value || is_OpCube::value || is_eOpCube::value || is_mtOpCube::value || is_GlueCube::value || is_eGlueCube::value || is_mtGlueCube::value || is_subview_cube::value ; }; // // // template struct is_SpMat { static const bool value = false; }; template struct is_SpMat< SpMat > { static const bool value = true; }; template struct is_SpMat< SpCol > { static const bool value = true; }; template struct is_SpMat< SpRow > { static const bool value = true; }; template struct is_SpRow { static const bool value = false; }; template struct is_SpRow< SpRow > { static const bool value = true; }; template struct is_SpCol { static const bool value = false; }; template struct is_SpCol< SpCol > { static const bool value = true; }; template struct is_SpSubview { static const bool value = false; }; template struct is_SpSubview< SpSubview > { static const bool value = true; }; template struct is_SpOp { static const bool value = false; }; template struct is_SpOp< SpOp > { static const bool value = true; }; template struct is_SpGlue { static const bool value = false; }; template struct is_SpGlue< SpGlue > { static const bool value = true; }; template struct is_mtSpOp { static const bool value = false; }; template struct is_mtSpOp< mtSpOp > { static const bool value = true; }; template struct is_arma_sparse_type { static const bool value = is_SpMat::value || is_SpSubview::value || is_SpOp::value || is_SpGlue::value || is_mtSpOp::value ; }; // // // template struct is_same_type { static const bool value = false; static const bool yes = false; static const bool no = true; }; template struct is_same_type { static const bool value = true; static const bool yes = true; static const bool no = false; }; // // // template struct is_u8 { static const bool value = false; }; template<> struct is_u8 { static const bool value = true; }; template struct is_s8 { static const bool value = false; }; template<> struct is_s8 { static const bool value = true; }; template struct is_u16 { static const bool value = false; }; template<> struct is_u16 { static const bool value = true; }; template struct is_s16 { static const bool value = false; }; template<> struct is_s16 { static const bool value = true; }; template struct is_u32 { static const bool value = false; }; template<> struct is_u32 { static const bool value = true; }; template struct is_s32 { static const bool value = false; }; template<> struct is_s32 { static const bool value = true; }; #if defined(ARMA_USE_U64S64) template struct is_u64 { static const bool value = false; }; template<> struct is_u64 { static const bool value = true; }; template struct is_s64 { static const bool value = false; }; template<> struct is_s64 { static const bool value = true; }; #endif template struct is_ulng_t { static const bool value = false; }; template<> struct is_ulng_t { static const bool value = true; }; template struct is_slng_t { static const bool value = false; }; template<> struct is_slng_t { static const bool value = true; }; template struct is_ulng_t_32 { static const bool value = false; }; template<> struct is_ulng_t_32 { static const bool value = (sizeof(ulng_t) == 4); }; template struct is_slng_t_32 { static const bool value = false; }; template<> struct is_slng_t_32 { static const bool value = (sizeof(slng_t) == 4); }; template struct is_ulng_t_64 { static const bool value = false; }; template<> struct is_ulng_t_64 { static const bool value = (sizeof(ulng_t) == 8); }; template struct is_slng_t_64 { static const bool value = false; }; template<> struct is_slng_t_64 { static const bool value = (sizeof(slng_t) == 8); }; template struct is_uword { static const bool value = false; }; template<> struct is_uword { static const bool value = true; }; template struct is_sword { static const bool value = false; }; template<> struct is_sword { static const bool value = true; }; template struct is_float { static const bool value = false; }; template<> struct is_float { static const bool value = true; }; template struct is_double { static const bool value = false; }; template<> struct is_double { static const bool value = true; }; template struct is_real { static const bool value = false; }; template<> struct is_real { static const bool value = true; }; template<> struct is_real { static const bool value = true; }; template struct is_not_complex { static const bool value = true; }; template struct is_not_complex< std::complex > { static const bool value = false; }; template struct is_complex { static const bool value = false; }; // template<> template struct is_complex< std::complex > { static const bool value = true; }; template struct is_complex_float { static const bool value = false; }; template<> struct is_complex_float< std::complex > { static const bool value = true; }; template struct is_complex_double { static const bool value = false; }; template<> struct is_complex_double< std::complex > { static const bool value = true; }; template struct is_complex_strict { static const bool value = false; }; template<> struct is_complex_strict< std::complex > { static const bool value = true; }; template<> struct is_complex_strict< std::complex > { static const bool value = true; }; template struct is_cx { static const bool value = false; static const bool yes = false; static const bool no = true; }; // template<> template struct is_cx< std::complex > { static const bool value = true; static const bool yes = true; static const bool no = false; }; //! check for a weird implementation of the std::complex class template struct is_supported_complex { static const bool value = false; }; //template<> template struct is_supported_complex< std::complex > { static const bool value = ( sizeof(std::complex) == 2*sizeof(eT) ); }; template struct is_supported_complex_float { static const bool value = false; }; template<> struct is_supported_complex_float< std::complex > { static const bool value = ( sizeof(std::complex) == 2*sizeof(float) ); }; template struct is_supported_complex_double { static const bool value = false; }; template<> struct is_supported_complex_double< std::complex > { static const bool value = ( sizeof(std::complex) == 2*sizeof(double) ); }; template struct is_supported_elem_type { static const bool value = \ is_u8::value || is_s8::value || is_u16::value || is_s16::value || is_u32::value || is_s32::value || #if defined(ARMA_USE_U64S64) is_u64::value || is_s64::value || #endif #if defined(ARMA_ALLOW_LONG) is_ulng_t::value || is_slng_t::value || #endif is_float::value || is_double::value || is_supported_complex_float::value || is_supported_complex_double::value; }; template struct is_supported_blas_type { static const bool value = \ is_float::value || is_double::value || is_supported_complex_float::value || is_supported_complex_double::value; }; template struct is_signed { static const bool value = true; }; template<> struct is_signed { static const bool value = false; }; template<> struct is_signed { static const bool value = false; }; template<> struct is_signed { static const bool value = false; }; #if defined(ARMA_USE_U64S64) template<> struct is_signed { static const bool value = false; }; #endif #if defined(ARMA_ALLOW_LONG) template<> struct is_signed { static const bool value = false; }; #endif template struct is_non_integral { static const bool value = false; }; template<> struct is_non_integral< float > { static const bool value = true; }; template<> struct is_non_integral< double > { static const bool value = true; }; template<> struct is_non_integral< std::complex > { static const bool value = true; }; template<> struct is_non_integral< std::complex > { static const bool value = true; }; // class arma_junk_class; template struct force_different_type { typedef T1 T1_result; typedef T2 T2_result; }; template struct force_different_type { typedef T1 T1_result; typedef arma_junk_class T2_result; }; // template struct resolves_to_vector_default { static const bool value = false; }; template struct resolves_to_vector_test { static const bool value = T1::is_col || T1::is_row; }; template struct resolves_to_vector_redirect {}; template struct resolves_to_vector_redirect { typedef resolves_to_vector_default result; }; template struct resolves_to_vector_redirect { typedef resolves_to_vector_test result; }; template struct resolves_to_vector : public resolves_to_vector_redirect::value>::result {}; template struct resolves_to_sparse_vector : public resolves_to_vector_redirect::value>::result {}; // template struct resolves_to_rowvector_default { static const bool value = false; }; template struct resolves_to_rowvector_test { static const bool value = T1::is_row; }; template struct resolves_to_rowvector_redirect {}; template struct resolves_to_rowvector_redirect { typedef resolves_to_rowvector_default result; }; template struct resolves_to_rowvector_redirect { typedef resolves_to_rowvector_test result; }; template struct resolves_to_rowvector : public resolves_to_rowvector_redirect::value>::result {}; // template struct resolves_to_colvector_default { static const bool value = false; }; template struct resolves_to_colvector_test { static const bool value = T1::is_col; }; template struct resolves_to_colvector_redirect {}; template struct resolves_to_colvector_redirect { typedef resolves_to_colvector_default result; }; template struct resolves_to_colvector_redirect { typedef resolves_to_colvector_test result; }; template struct resolves_to_colvector : public resolves_to_colvector_redirect::value>::result {}; template struct is_glue_mixed_times { static const bool value = false; }; template<> struct is_glue_mixed_times { static const bool value = true; }; template struct is_glue_mixed_elem { static const bool value = false; }; template<> struct is_glue_mixed_elem { static const bool value = true; }; template<> struct is_glue_mixed_elem { static const bool value = true; }; template<> struct is_glue_mixed_elem { static const bool value = true; }; template<> struct is_glue_mixed_elem { static const bool value = true; }; template<> struct is_glue_mixed_elem { static const bool value = true; }; template<> struct is_glue_mixed_elem { static const bool value = true; }; template<> struct is_glue_mixed_elem { static const bool value = true; }; template<> struct is_glue_mixed_elem { static const bool value = true; }; template<> struct is_glue_mixed_elem { static const bool value = true; }; template<> struct is_glue_mixed_elem { static const bool value = true; }; template<> struct is_glue_mixed_elem { static const bool value = true; }; template<> struct is_glue_mixed_elem { static const bool value = true; }; template struct is_op_mixed_elem { static const bool value = false; }; template<> struct is_op_mixed_elem { static const bool value = true; }; template<> struct is_op_mixed_elem { static const bool value = true; }; template<> struct is_op_mixed_elem { static const bool value = true; }; template<> struct is_op_mixed_elem { static const bool value = true; }; template<> struct is_op_mixed_elem { static const bool value = true; }; template<> struct is_op_mixed_elem { static const bool value = true; }; template<> struct is_op_mixed_elem { static const bool value = true; }; template<> struct is_op_mixed_elem { static const bool value = true; }; template<> struct is_op_mixed_elem { static const bool value = true; }; template<> struct is_op_mixed_elem { static const bool value = true; }; template<> struct is_op_mixed_elem { static const bool value = true; }; template<> struct is_op_mixed_elem { static const bool value = true; }; template<> struct is_op_mixed_elem { static const bool value = true; }; template<> struct is_op_mixed_elem { static const bool value = true; }; template<> struct is_op_mixed_elem { static const bool value = true; }; template<> struct is_op_mixed_elem { static const bool value = true; }; template struct is_spop_elem { static const bool value = false; }; template<> struct is_spop_elem { static const bool value = true; }; template struct is_spglue_elem { static const bool value = false; }; template<> struct is_spglue_elem { static const bool value = true; }; template<> struct is_spglue_elem { static const bool value = true; }; template<> struct is_spglue_elem { static const bool value = true; }; template<> struct is_spglue_elem { static const bool value = true; }; template struct is_spglue_times { static const bool value = false; }; template<> struct is_spglue_times { static const bool value = true; }; template struct is_spglue_times2 { static const bool value = false; }; template<> struct is_spglue_times { static const bool value = true; }; template struct is_outer_product { static const bool value = false; }; template struct is_outer_product< Glue > { static const bool value = (resolves_to_colvector::value && resolves_to_rowvector::value); }; template struct has_op_inv { static const bool value = false; }; template struct has_op_inv< Op > { static const bool value = true; }; template struct has_op_inv< Glue, T2, glue_times> > { static const bool value = true; }; template struct has_op_inv< Glue, glue_times> > { static const bool value = true; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/typedef_elem.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup typedef_elem //! @{ #if UCHAR_MAX >= 0xff typedef unsigned char u8; typedef char s8; #elif defined(UINT8_MAX) typedef uint8_t u8; typedef int8_t s8; #else #error "don't know how to typedef 'u8' on this system" #endif // NOTE: // "signed char" is not the same as "char". // http://www.embedded.com/columns/programmingpointers/206107018 // http://en.wikipedia.org/wiki/C_variable_types_and_declarations #if USHRT_MAX >= 0xffff typedef unsigned short u16; typedef short s16; #elif defined(UINT16_MAX) typedef uint16_t u16; typedef int16_t s16; #else #error "don't know how to typedef 'u16' on this system" #endif #if UINT_MAX >= 0xffffffff typedef unsigned int u32; typedef int s32; #elif defined(UINT32_MAX) typedef uint32_t u32; typedef int32_t s32; #else #error "don't know how to typedef 'u32' on this system" #endif #if defined(ARMA_USE_U64S64) #if ULLONG_MAX >= 0xffffffffffffffff typedef unsigned long long u64; typedef long long s64; #elif ULONG_MAX >= 0xffffffffffffffff typedef unsigned long u64; typedef long s64; #define ARMA_U64_IS_LONG #elif defined(UINT64_MAX) typedef uint64_t u64; typedef int64_t s64; #else #error "don't know how to typedef 'u64' on this system; please disable ARMA_64BIT_WORD" #endif #endif #if !defined(ARMA_USE_U64S64) || (defined(ARMA_USE_U64S64) && !defined(ARMA_U64_IS_LONG)) #define ARMA_ALLOW_LONG #endif typedef unsigned long ulng_t; typedef long slng_t; #if defined(ARMA_64BIT_WORD) typedef u64 uword; typedef s64 sword; typedef u32 uhword; typedef s32 shword; #define ARMA_MAX_UWORD 0xffffffffffffffff #define ARMA_MAX_UHWORD 0xffffffff #else typedef u32 uword; typedef s32 sword; typedef u16 uhword; typedef s16 shword; #define ARMA_MAX_UWORD 0xffffffff #define ARMA_MAX_UHWORD 0xffff #endif #if defined(ARMA_BLAS_LONG_LONG) typedef long long blas_int; #define ARMA_MAX_BLAS_INT 0x7fffffffffffffffULL #elif defined(ARMA_BLAS_LONG) typedef long blas_int; #define ARMA_MAX_BLAS_INT 0x7fffffffffffffffUL #else typedef int blas_int; #define ARMA_MAX_BLAS_INT 0x7fffffffU #endif typedef std::complex cx_float; typedef std::complex cx_double; typedef void* void_ptr; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/typedef_elem_check.hpp ================================================ // Copyright (C) 2008-2014 Conrad Sanderson // Copyright (C) 2008-2014 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup typedef_elem //! @{ namespace junk { struct arma_elem_size_test { // arma_static_check( (sizeof(size_t) < sizeof(uword)), ERROR___TYPE_SIZE_T_IS_SMALLER_THAN_UWORD ); arma_static_check( (sizeof(u8) != 1), ERROR___TYPE_U8_HAS_UNSUPPORTED_SIZE ); arma_static_check( (sizeof(s8) != 1), ERROR___TYPE_S8_HAS_UNSUPPORTED_SIZE ); arma_static_check( (sizeof(u16) != 2), ERROR___TYPE_U16_HAS_UNSUPPORTED_SIZE ); arma_static_check( (sizeof(s16) != 2), ERROR___TYPE_S16_HAS_UNSUPPORTED_SIZE ); arma_static_check( (sizeof(u32) != 4), ERROR___TYPE_U32_HAS_UNSUPPORTED_SIZE ); arma_static_check( (sizeof(s32) != 4), ERROR___TYPE_S32_HAS_UNSUPPORTED_SIZE ); #if defined(ARMA_USE_U64S64) arma_static_check( (sizeof(u64) != 8), ERROR___TYPE_U64_HAS_UNSUPPORTED_SIZE ); arma_static_check( (sizeof(s64) != 8), ERROR___TYPE_S64_HAS_UNSUPPORTED_SIZE ); #endif arma_static_check( (sizeof(float) != 4), ERROR___TYPE_FLOAT_HAS_UNSUPPORTED_SIZE ); arma_static_check( (sizeof(double) != 8), ERROR___TYPE_DOUBLE_HAS_UNSUPPORTED_SIZE ); arma_static_check( (sizeof(std::complex) != 8), ERROR___TYPE_COMPLEX_FLOAT_HAS_UNSUPPORTED_SIZE ); arma_static_check( (sizeof(std::complex) != 16), ERROR___TYPE_COMPLEX_DOUBLE_HAS_UNSUPPORTED_SIZE ); }; } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/typedef_mat.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup typedef_mat //! @{ typedef Mat uchar_mat; typedef Col uchar_vec; typedef Col uchar_colvec; typedef Row uchar_rowvec; typedef Cube uchar_cube; typedef Mat u32_mat; typedef Col u32_vec; typedef Col u32_colvec; typedef Row u32_rowvec; typedef Cube u32_cube; typedef Mat s32_mat; typedef Col s32_vec; typedef Col s32_colvec; typedef Row s32_rowvec; typedef Cube s32_cube; #if defined(ARMA_USE_U64S64) typedef Mat u64_mat; typedef Col u64_vec; typedef Col u64_colvec; typedef Row u64_rowvec; typedef Cube u64_cube; typedef Mat s64_mat; typedef Col s64_vec; typedef Col s64_colvec; typedef Row s64_rowvec; typedef Cube s64_cube; #endif typedef Mat umat; typedef Col uvec; typedef Col ucolvec; typedef Row urowvec; typedef Cube ucube; typedef Mat imat; typedef Col ivec; typedef Col icolvec; typedef Row irowvec; typedef Cube icube; typedef Mat fmat; typedef Col fvec; typedef Col fcolvec; typedef Row frowvec; typedef Cube fcube; typedef Mat mat; typedef Col vec; typedef Col colvec; typedef Row rowvec; typedef Cube cube; typedef Mat cx_fmat; typedef Col cx_fvec; typedef Col cx_fcolvec; typedef Row cx_frowvec; typedef Cube cx_fcube; typedef Mat cx_mat; typedef Col cx_vec; typedef Col cx_colvec; typedef Row cx_rowvec; typedef Cube cx_cube; typedef SpMat sp_umat; typedef SpCol sp_uvec; typedef SpCol sp_ucolvec; typedef SpRow sp_urowvec; typedef SpMat sp_imat; typedef SpCol sp_ivec; typedef SpCol sp_icolvec; typedef SpRow sp_irowvec; typedef SpMat sp_fmat; typedef SpCol sp_fvec; typedef SpCol sp_fcolvec; typedef SpRow sp_frowvec; typedef SpMat sp_mat; typedef SpCol sp_vec; typedef SpCol sp_colvec; typedef SpRow sp_rowvec; typedef SpMat sp_cx_fmat; typedef SpCol sp_cx_fvec; typedef SpCol sp_cx_fcolvec; typedef SpRow sp_cx_frowvec; typedef SpMat sp_cx_mat; typedef SpCol sp_cx_vec; typedef SpCol sp_cx_colvec; typedef SpRow sp_cx_rowvec; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/typedef_mat_fixed.hpp ================================================ // Copyright (C) 2010 Conrad Sanderson // Copyright (C) 2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup typedef_mat_fixed //! @{ typedef umat::fixed<2,2> umat22; typedef umat::fixed<3,3> umat33; typedef umat::fixed<4,4> umat44; typedef umat::fixed<5,5> umat55; typedef umat::fixed<6,6> umat66; typedef umat::fixed<7,7> umat77; typedef umat::fixed<8,8> umat88; typedef umat::fixed<9,9> umat99; typedef imat::fixed<2,2> imat22; typedef imat::fixed<3,3> imat33; typedef imat::fixed<4,4> imat44; typedef imat::fixed<5,5> imat55; typedef imat::fixed<6,6> imat66; typedef imat::fixed<7,7> imat77; typedef imat::fixed<8,8> imat88; typedef imat::fixed<9,9> imat99; typedef fmat::fixed<2,2> fmat22; typedef fmat::fixed<3,3> fmat33; typedef fmat::fixed<4,4> fmat44; typedef fmat::fixed<5,5> fmat55; typedef fmat::fixed<6,6> fmat66; typedef fmat::fixed<7,7> fmat77; typedef fmat::fixed<8,8> fmat88; typedef fmat::fixed<9,9> fmat99; typedef mat::fixed<2,2> mat22; typedef mat::fixed<3,3> mat33; typedef mat::fixed<4,4> mat44; typedef mat::fixed<5,5> mat55; typedef mat::fixed<6,6> mat66; typedef mat::fixed<7,7> mat77; typedef mat::fixed<8,8> mat88; typedef mat::fixed<9,9> mat99; typedef cx_fmat::fixed<2,2> cx_fmat22; typedef cx_fmat::fixed<3,3> cx_fmat33; typedef cx_fmat::fixed<4,4> cx_fmat44; typedef cx_fmat::fixed<5,5> cx_fmat55; typedef cx_fmat::fixed<6,6> cx_fmat66; typedef cx_fmat::fixed<7,7> cx_fmat77; typedef cx_fmat::fixed<8,8> cx_fmat88; typedef cx_fmat::fixed<9,9> cx_fmat99; typedef cx_mat::fixed<2,2> cx_mat22; typedef cx_mat::fixed<3,3> cx_mat33; typedef cx_mat::fixed<4,4> cx_mat44; typedef cx_mat::fixed<5,5> cx_mat55; typedef cx_mat::fixed<6,6> cx_mat66; typedef cx_mat::fixed<7,7> cx_mat77; typedef cx_mat::fixed<8,8> cx_mat88; typedef cx_mat::fixed<9,9> cx_mat99; // typedef uvec::fixed<2> uvec2; typedef uvec::fixed<3> uvec3; typedef uvec::fixed<4> uvec4; typedef uvec::fixed<5> uvec5; typedef uvec::fixed<6> uvec6; typedef uvec::fixed<7> uvec7; typedef uvec::fixed<8> uvec8; typedef uvec::fixed<9> uvec9; typedef ivec::fixed<2> ivec2; typedef ivec::fixed<3> ivec3; typedef ivec::fixed<4> ivec4; typedef ivec::fixed<5> ivec5; typedef ivec::fixed<6> ivec6; typedef ivec::fixed<7> ivec7; typedef ivec::fixed<8> ivec8; typedef ivec::fixed<9> ivec9; typedef fvec::fixed<2> fvec2; typedef fvec::fixed<3> fvec3; typedef fvec::fixed<4> fvec4; typedef fvec::fixed<5> fvec5; typedef fvec::fixed<6> fvec6; typedef fvec::fixed<7> fvec7; typedef fvec::fixed<8> fvec8; typedef fvec::fixed<9> fvec9; typedef vec::fixed<2> vec2; typedef vec::fixed<3> vec3; typedef vec::fixed<4> vec4; typedef vec::fixed<5> vec5; typedef vec::fixed<6> vec6; typedef vec::fixed<7> vec7; typedef vec::fixed<8> vec8; typedef vec::fixed<9> vec9; typedef cx_fvec::fixed<2> cx_fvec2; typedef cx_fvec::fixed<3> cx_fvec3; typedef cx_fvec::fixed<4> cx_fvec4; typedef cx_fvec::fixed<5> cx_fvec5; typedef cx_fvec::fixed<6> cx_fvec6; typedef cx_fvec::fixed<7> cx_fvec7; typedef cx_fvec::fixed<8> cx_fvec8; typedef cx_fvec::fixed<9> cx_fvec9; typedef cx_vec::fixed<2> cx_vec2; typedef cx_vec::fixed<3> cx_vec3; typedef cx_vec::fixed<4> cx_vec4; typedef cx_vec::fixed<5> cx_vec5; typedef cx_vec::fixed<6> cx_vec6; typedef cx_vec::fixed<7> cx_vec7; typedef cx_vec::fixed<8> cx_vec8; typedef cx_vec::fixed<9> cx_vec9; // typedef ucolvec::fixed<2> ucolvec2; typedef ucolvec::fixed<3> ucolvec3; typedef ucolvec::fixed<4> ucolvec4; typedef ucolvec::fixed<5> ucolvec5; typedef ucolvec::fixed<6> ucolvec6; typedef ucolvec::fixed<7> ucolvec7; typedef ucolvec::fixed<8> ucolvec8; typedef ucolvec::fixed<9> ucolvec9; typedef icolvec::fixed<2> icolvec2; typedef icolvec::fixed<3> icolvec3; typedef icolvec::fixed<4> icolvec4; typedef icolvec::fixed<5> icolvec5; typedef icolvec::fixed<6> icolvec6; typedef icolvec::fixed<7> icolvec7; typedef icolvec::fixed<8> icolvec8; typedef icolvec::fixed<9> icolvec9; typedef fcolvec::fixed<2> fcolvec2; typedef fcolvec::fixed<3> fcolvec3; typedef fcolvec::fixed<4> fcolvec4; typedef fcolvec::fixed<5> fcolvec5; typedef fcolvec::fixed<6> fcolvec6; typedef fcolvec::fixed<7> fcolvec7; typedef fcolvec::fixed<8> fcolvec8; typedef fcolvec::fixed<9> fcolvec9; typedef colvec::fixed<2> colvec2; typedef colvec::fixed<3> colvec3; typedef colvec::fixed<4> colvec4; typedef colvec::fixed<5> colvec5; typedef colvec::fixed<6> colvec6; typedef colvec::fixed<7> colvec7; typedef colvec::fixed<8> colvec8; typedef colvec::fixed<9> colvec9; typedef cx_fcolvec::fixed<2> cx_fcolvec2; typedef cx_fcolvec::fixed<3> cx_fcolvec3; typedef cx_fcolvec::fixed<4> cx_fcolvec4; typedef cx_fcolvec::fixed<5> cx_fcolvec5; typedef cx_fcolvec::fixed<6> cx_fcolvec6; typedef cx_fcolvec::fixed<7> cx_fcolvec7; typedef cx_fcolvec::fixed<8> cx_fcolvec8; typedef cx_fcolvec::fixed<9> cx_fcolvec9; typedef cx_colvec::fixed<2> cx_colvec2; typedef cx_colvec::fixed<3> cx_colvec3; typedef cx_colvec::fixed<4> cx_colvec4; typedef cx_colvec::fixed<5> cx_colvec5; typedef cx_colvec::fixed<6> cx_colvec6; typedef cx_colvec::fixed<7> cx_colvec7; typedef cx_colvec::fixed<8> cx_colvec8; typedef cx_colvec::fixed<9> cx_colvec9; // typedef urowvec::fixed<2> urowvec2; typedef urowvec::fixed<3> urowvec3; typedef urowvec::fixed<4> urowvec4; typedef urowvec::fixed<5> urowvec5; typedef urowvec::fixed<6> urowvec6; typedef urowvec::fixed<7> urowvec7; typedef urowvec::fixed<8> urowvec8; typedef urowvec::fixed<9> urowvec9; typedef irowvec::fixed<2> irowvec2; typedef irowvec::fixed<3> irowvec3; typedef irowvec::fixed<4> irowvec4; typedef irowvec::fixed<5> irowvec5; typedef irowvec::fixed<6> irowvec6; typedef irowvec::fixed<7> irowvec7; typedef irowvec::fixed<8> irowvec8; typedef irowvec::fixed<9> irowvec9; typedef frowvec::fixed<2> frowvec2; typedef frowvec::fixed<3> frowvec3; typedef frowvec::fixed<4> frowvec4; typedef frowvec::fixed<5> frowvec5; typedef frowvec::fixed<6> frowvec6; typedef frowvec::fixed<7> frowvec7; typedef frowvec::fixed<8> frowvec8; typedef frowvec::fixed<9> frowvec9; typedef rowvec::fixed<2> rowvec2; typedef rowvec::fixed<3> rowvec3; typedef rowvec::fixed<4> rowvec4; typedef rowvec::fixed<5> rowvec5; typedef rowvec::fixed<6> rowvec6; typedef rowvec::fixed<7> rowvec7; typedef rowvec::fixed<8> rowvec8; typedef rowvec::fixed<9> rowvec9; typedef cx_frowvec::fixed<2> cx_frowvec2; typedef cx_frowvec::fixed<3> cx_frowvec3; typedef cx_frowvec::fixed<4> cx_frowvec4; typedef cx_frowvec::fixed<5> cx_frowvec5; typedef cx_frowvec::fixed<6> cx_frowvec6; typedef cx_frowvec::fixed<7> cx_frowvec7; typedef cx_frowvec::fixed<8> cx_frowvec8; typedef cx_frowvec::fixed<9> cx_frowvec9; typedef cx_rowvec::fixed<2> cx_rowvec2; typedef cx_rowvec::fixed<3> cx_rowvec3; typedef cx_rowvec::fixed<4> cx_rowvec4; typedef cx_rowvec::fixed<5> cx_rowvec5; typedef cx_rowvec::fixed<6> cx_rowvec6; typedef cx_rowvec::fixed<7> cx_rowvec7; typedef cx_rowvec::fixed<8> cx_rowvec8; typedef cx_rowvec::fixed<9> cx_rowvec9; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/unwrap.hpp ================================================ // Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup unwrap //! @{ template struct unwrap_default { typedef typename T1::elem_type eT; typedef Mat stored_type; inline unwrap_default(const T1& A) : M(A) { arma_extra_debug_sigprint(); } const Mat M; }; template struct unwrap_fixed { typedef T1 stored_type; inline explicit unwrap_fixed(const T1& A) : M(A) { arma_extra_debug_sigprint(); } const T1& M; }; template struct unwrap_redirect {}; template struct unwrap_redirect { typedef unwrap_default result; }; template struct unwrap_redirect { typedef unwrap_fixed result; }; template struct unwrap : public unwrap_redirect::value >::result { inline unwrap(const T1& A) : unwrap_redirect< T1, is_Mat_fixed::value >::result(A) { } }; template struct unwrap< Mat > { typedef Mat stored_type; inline unwrap(const Mat& A) : M(A) { arma_extra_debug_sigprint(); } const Mat& M; }; template struct unwrap< Row > { typedef Row stored_type; inline unwrap(const Row& A) : M(A) { arma_extra_debug_sigprint(); } const Row& M; }; template struct unwrap< Col > { typedef Col stored_type; inline unwrap(const Col& A) : M(A) { arma_extra_debug_sigprint(); } const Col& M; }; template struct unwrap< mtGlue > { typedef Mat stored_type; inline unwrap(const mtGlue& A) : M(A) { arma_extra_debug_sigprint(); } const Mat M; }; template struct unwrap< mtOp > { typedef Mat stored_type; inline unwrap(const mtOp& A) : M(A) { arma_extra_debug_sigprint(); } const Mat M; }; // // // template struct quasi_unwrap_default { typedef typename T1::elem_type eT; static const bool has_subview = false; inline quasi_unwrap_default(const T1& A) : M(A) { arma_extra_debug_sigprint(); } // NOTE: DO NOT DIRECTLY CHECK FOR ALIASING BY TAKING THE ADDRESS OF THE "M" OBJECT IN ANY quasi_unwrap CLASS !!! const Mat M; template arma_inline bool is_alias(const Mat&) const { return false; } }; template struct quasi_unwrap_fixed { typedef typename T1::elem_type eT; static const bool has_subview = false; inline explicit quasi_unwrap_fixed(const T1& A) : M(A) { arma_extra_debug_sigprint(); } const Mat& M; template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&M) == void_ptr(&X)); } }; template struct quasi_unwrap_redirect {}; template struct quasi_unwrap_redirect { typedef quasi_unwrap_default result; }; template struct quasi_unwrap_redirect { typedef quasi_unwrap_fixed result; }; template struct quasi_unwrap : public quasi_unwrap_redirect::value >::result { typedef typename quasi_unwrap_redirect::value >::result quasi_unwrap_extra; static const bool has_subview = quasi_unwrap_extra::has_subview; inline quasi_unwrap(const T1& A) : quasi_unwrap_extra(A) { } using quasi_unwrap_extra::M; using quasi_unwrap_extra::is_alias; }; template struct quasi_unwrap< Mat > { static const bool has_subview = false; inline quasi_unwrap(const Mat& A) : M(A) { arma_extra_debug_sigprint(); } const Mat& M; template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&M) == void_ptr(&X)); } }; template struct quasi_unwrap< Row > { static const bool has_subview = false; inline quasi_unwrap(const Row& A) : M(A) { arma_extra_debug_sigprint(); } const Row& M; template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&M) == void_ptr(&X)); } }; template struct quasi_unwrap< Col > { static const bool has_subview = false; inline quasi_unwrap(const Col& A) : M(A) { arma_extra_debug_sigprint(); } const Col& M; template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&M) == void_ptr(&X)); } }; template struct quasi_unwrap< subview_col > { static const bool has_subview = true; inline quasi_unwrap(const subview_col& A) : M ( const_cast( A.colptr(0) ), A.n_rows, 1, false, false ) , src( A.m ) { arma_extra_debug_sigprint(); } const Mat M; const Mat& src; template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&src) == void_ptr(&X)); } }; template struct quasi_unwrap< mtGlue > { static const bool has_subview = false; inline quasi_unwrap(const mtGlue& A) : M(A) { arma_extra_debug_sigprint(); } const Mat M; template arma_inline bool is_alias(const Mat&) const { return false; } }; template struct quasi_unwrap< mtOp > { static const bool has_subview = false; inline quasi_unwrap(const mtOp& A) : M(A) { arma_extra_debug_sigprint(); } const Mat M; template arma_inline bool is_alias(const Mat&) const { return false; } }; template struct quasi_unwrap< Op > { static const bool has_subview = true; typedef typename T1::elem_type eT; inline quasi_unwrap(const Op& A) : U( A.m ) , M( const_cast(U.M.memptr()), U.M.n_elem, 1, false, false ) { arma_extra_debug_sigprint(); } const unwrap U; const Mat M; template arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&(U.M)) == void_ptr(&X)); } }; // // // template struct unwrap_check_default { typedef typename T1::elem_type eT; typedef Mat stored_type; inline unwrap_check_default(const T1& A, const Mat&) : M(A) { arma_extra_debug_sigprint(); } inline unwrap_check_default(const T1& A, const bool) : M(A) { arma_extra_debug_sigprint(); } const Mat M; }; template struct unwrap_check_fixed { typedef typename T1::elem_type eT; typedef T1 stored_type; inline unwrap_check_fixed(const T1& A, const Mat& B) : M_local( (&A == &B) ? new T1(A) : 0 ) , M ( (&A == &B) ? *M_local : A ) { arma_extra_debug_sigprint(); } inline unwrap_check_fixed(const T1& A, const bool is_alias) : M_local( is_alias ? new T1(A) : 0 ) , M ( is_alias ? *M_local : A ) { arma_extra_debug_sigprint(); } inline ~unwrap_check_fixed() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } // the order below is important const T1* M_local; const T1& M; }; template struct unwrap_check_redirect {}; template struct unwrap_check_redirect { typedef unwrap_check_default result; }; template struct unwrap_check_redirect { typedef unwrap_check_fixed result; }; template struct unwrap_check : public unwrap_check_redirect::value >::result { inline unwrap_check(const T1& A, const Mat& B) : unwrap_check_redirect< T1, is_Mat_fixed::value >::result(A, B) { } inline unwrap_check(const T1& A, const bool is_alias) : unwrap_check_redirect< T1, is_Mat_fixed::value >::result(A, is_alias) { } }; template struct unwrap_check< Mat > { typedef Mat stored_type; inline unwrap_check(const Mat& A, const Mat& B) : M_local( (&A == &B) ? new Mat(A) : 0 ) , M ( (&A == &B) ? (*M_local) : A ) { arma_extra_debug_sigprint(); } inline unwrap_check(const Mat& A, const bool is_alias) : M_local( is_alias ? new Mat(A) : 0 ) , M ( is_alias ? (*M_local) : A ) { arma_extra_debug_sigprint(); } inline ~unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } // the order below is important const Mat* M_local; const Mat& M; }; template struct unwrap_check< Row > { typedef Row stored_type; inline unwrap_check(const Row& A, const Mat& B) : M_local( (&A == &B) ? new Row(A) : 0 ) , M ( (&A == &B) ? (*M_local) : A ) { arma_extra_debug_sigprint(); } inline unwrap_check(const Row& A, const bool is_alias) : M_local( is_alias ? new Row(A) : 0 ) , M ( is_alias ? (*M_local) : A ) { arma_extra_debug_sigprint(); } inline ~unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } // the order below is important const Row* M_local; const Row& M; }; template struct unwrap_check< Col > { typedef Col stored_type; inline unwrap_check(const Col& A, const Mat& B) : M_local( (&A == &B) ? new Col(A) : 0 ) , M ( (&A == &B) ? (*M_local) : A ) { arma_extra_debug_sigprint(); } inline unwrap_check(const Col& A, const bool is_alias) : M_local( is_alias ? new Col(A) : 0 ) , M ( is_alias ? (*M_local) : A ) { arma_extra_debug_sigprint(); } inline ~unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } // the order below is important const Col* M_local; const Col& M; }; // // // template struct unwrap_check_mixed { typedef typename T1::elem_type eT1; template inline unwrap_check_mixed(const T1& A, const Mat&) : M(A) { arma_extra_debug_sigprint(); } //template inline unwrap_check_mixed(const T1& A, const bool) : M(A) { arma_extra_debug_sigprint(); } const Mat M; }; template struct unwrap_check_mixed< Mat > { template inline unwrap_check_mixed(const Mat& A, const Mat& B) : M_local( (void_ptr(&A) == void_ptr(&B)) ? new Mat(A) : 0 ) , M ( (void_ptr(&A) == void_ptr(&B)) ? (*M_local) : A ) { arma_extra_debug_sigprint(); } //template inline unwrap_check_mixed(const Mat& A, const bool is_alias) : M_local( is_alias ? new Mat(A) : 0 ) , M ( is_alias ? (*M_local) : A ) { arma_extra_debug_sigprint(); } inline ~unwrap_check_mixed() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } // the order below is important const Mat* M_local; const Mat& M; }; template struct unwrap_check_mixed< Row > { template inline unwrap_check_mixed(const Row& A, const Mat& B) : M_local( (void_ptr(&A) == void_ptr(&B)) ? new Row(A) : 0 ) , M ( (void_ptr(&A) == void_ptr(&B)) ? (*M_local) : A ) { arma_extra_debug_sigprint(); } //template inline unwrap_check_mixed(const Row& A, const bool is_alias) : M_local( is_alias ? new Row(A) : 0 ) , M ( is_alias ? (*M_local) : A ) { arma_extra_debug_sigprint(); } inline ~unwrap_check_mixed() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } // the order below is important const Row* M_local; const Row& M; }; template struct unwrap_check_mixed< Col > { template inline unwrap_check_mixed(const Col& A, const Mat& B) : M_local( (void_ptr(&A) == void_ptr(&B)) ? new Col(A) : 0 ) , M ( (void_ptr(&A) == void_ptr(&B)) ? (*M_local) : A ) { arma_extra_debug_sigprint(); } //template inline unwrap_check_mixed(const Col& A, const bool is_alias) : M_local( is_alias ? new Col(A) : 0 ) , M ( is_alias ? (*M_local) : A ) { arma_extra_debug_sigprint(); } inline ~unwrap_check_mixed() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } // the order below is important const Col* M_local; const Col& M; }; // // // template struct partial_unwrap_default { typedef typename T1::elem_type eT; typedef Mat stored_type; inline partial_unwrap_default(const T1& A) : M(A) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } arma_inline bool is_alias(const Mat&) const { return false; } static const bool do_trans = false; static const bool do_times = false; const Mat M; }; template struct partial_unwrap_fixed { typedef typename T1::elem_type eT; typedef T1 stored_type; inline explicit partial_unwrap_fixed(const T1& A) : M(A) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = false; static const bool do_times = false; const T1& M; }; template struct partial_unwrap_redirect {}; template struct partial_unwrap_redirect { typedef partial_unwrap_default result; }; template struct partial_unwrap_redirect { typedef partial_unwrap_fixed result; }; template struct partial_unwrap : public partial_unwrap_redirect::value >::result { inline partial_unwrap(const T1& A) : partial_unwrap_redirect< T1, is_Mat_fixed::value >::result(A) { } }; template struct partial_unwrap< Mat > { typedef Mat stored_type; inline partial_unwrap(const Mat& A) : M(A) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } arma_inline bool is_alias(const Mat& X) const { return ((&X) == (&M)); } static const bool do_trans = false; static const bool do_times = false; const Mat& M; }; template struct partial_unwrap< Row > { typedef Row stored_type; inline partial_unwrap(const Row& A) : M(A) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = false; static const bool do_times = false; const Row& M; }; template struct partial_unwrap< Col > { typedef Col stored_type; inline partial_unwrap(const Col& A) : M(A) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = false; static const bool do_times = false; const Col& M; }; template struct partial_unwrap< subview_col > { typedef Col stored_type; inline partial_unwrap(const subview_col& A) : orig( A.m ) , M ( const_cast( A.colptr(0) ), A.n_rows, false, false ) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&orig)); } static const bool do_trans = false; static const bool do_times = false; const Mat& orig; const Col M; }; template struct partial_unwrap< subview_row > { typedef Row stored_type; inline partial_unwrap(const subview_row& A) : M(A) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } arma_inline bool is_alias(const Mat&) const { return false; } static const bool do_trans = false; static const bool do_times = false; const Row M; }; template struct partial_unwrap_htrans_default { typedef typename T1::elem_type eT; typedef Mat stored_type; inline partial_unwrap_htrans_default(const Op& A) : M(A.m) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } arma_inline bool is_alias(const Mat&) const { return false; } static const bool do_trans = true; static const bool do_times = false; const Mat M; }; template struct partial_unwrap_htrans_fixed { typedef typename T1::elem_type eT; typedef T1 stored_type; inline explicit partial_unwrap_htrans_fixed(const Op& A) : M(A.m) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = true; static const bool do_times = false; const T1& M; }; template struct partial_unwrap_htrans_redirect {}; template struct partial_unwrap_htrans_redirect { typedef partial_unwrap_htrans_default result; }; template struct partial_unwrap_htrans_redirect { typedef partial_unwrap_htrans_fixed result; }; template struct partial_unwrap< Op > : public partial_unwrap_htrans_redirect::value >::result { inline partial_unwrap(const Op& A) : partial_unwrap_htrans_redirect< T1, is_Mat_fixed::value >::result(A) { } }; template struct partial_unwrap< Op< Mat, op_htrans> > { typedef Mat stored_type; inline partial_unwrap(const Op< Mat, op_htrans>& A) : M(A.m) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = true; static const bool do_times = false; const Mat& M; }; template struct partial_unwrap< Op< Row, op_htrans> > { typedef Row stored_type; inline partial_unwrap(const Op< Row, op_htrans>& A) : M(A.m) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = true; static const bool do_times = false; const Row& M; }; template struct partial_unwrap< Op< Col, op_htrans> > { typedef Col stored_type; inline partial_unwrap(const Op< Col, op_htrans>& A) : M(A.m) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = true; static const bool do_times = false; const Col& M; }; template struct partial_unwrap< Op< subview_col, op_htrans> > { typedef Col stored_type; inline partial_unwrap(const Op< subview_col, op_htrans>& A) : orig( A.m.m ) , M ( const_cast( A.m.colptr(0) ), A.m.n_rows, false, false ) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&orig)); } static const bool do_trans = true; static const bool do_times = false; const Mat& orig; const Col M; }; template struct partial_unwrap< Op< subview_row, op_htrans> > { typedef Row stored_type; inline partial_unwrap(const Op< subview_row, op_htrans>& A) : M(A.m) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } arma_inline bool is_alias(const Mat&) const { return false; } static const bool do_trans = true; static const bool do_times = false; const Row M; }; template struct partial_unwrap_htrans2_default { typedef typename T1::elem_type eT; typedef Mat stored_type; inline partial_unwrap_htrans2_default(const Op& A) : val(A.aux) , M (A.m) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return val; } arma_inline bool is_alias(const Mat&) const { return false; } static const bool do_trans = true; static const bool do_times = true; const eT val; const Mat M; }; template struct partial_unwrap_htrans2_fixed { typedef typename T1::elem_type eT; typedef T1 stored_type; inline explicit partial_unwrap_htrans2_fixed(const Op& A) : val(A.aux) , M (A.m) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return val; } arma_hot arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = true; static const bool do_times = true; const eT val; const T1& M; }; template struct partial_unwrap_htrans2_redirect {}; template struct partial_unwrap_htrans2_redirect { typedef partial_unwrap_htrans2_default result; }; template struct partial_unwrap_htrans2_redirect { typedef partial_unwrap_htrans2_fixed result; }; template struct partial_unwrap< Op > : public partial_unwrap_htrans2_redirect::value >::result { inline partial_unwrap(const Op& A) : partial_unwrap_htrans2_redirect< T1, is_Mat_fixed::value >::result(A) { } }; template struct partial_unwrap< Op< Mat, op_htrans2> > { typedef Mat stored_type; inline partial_unwrap(const Op< Mat, op_htrans2>& A) : val(A.aux) , M (A.m) { arma_extra_debug_sigprint(); } inline eT get_val() const { return val; } arma_hot arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = true; static const bool do_times = true; const eT val; const Mat& M; }; template struct partial_unwrap< Op< Row, op_htrans2> > { typedef Row stored_type; inline partial_unwrap(const Op< Row, op_htrans2>& A) : val(A.aux) , M (A.m) { arma_extra_debug_sigprint(); } inline eT get_val() const { return val; } arma_hot arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = true; static const bool do_times = true; const eT val; const Row& M; }; template struct partial_unwrap< Op< Col, op_htrans2> > { typedef Col stored_type; inline partial_unwrap(const Op< Col, op_htrans2>& A) : val(A.aux) , M (A.m) { arma_extra_debug_sigprint(); } inline eT get_val() const { return val; } arma_hot arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = true; static const bool do_times = true; const eT val; const Col& M; }; template struct partial_unwrap< Op< subview_col, op_htrans2> > { typedef Col stored_type; inline partial_unwrap(const Op< subview_col, op_htrans2>& A) : orig( A.m.m ) , val ( A.aux ) , M ( const_cast( A.m.colptr(0) ), A.m.n_rows, false, false ) { arma_extra_debug_sigprint(); } inline eT get_val() const { return val; } arma_hot arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&orig)); } static const bool do_trans = true; static const bool do_times = true; const Mat& orig; const eT val; const Col M; }; template struct partial_unwrap< Op< subview_row, op_htrans2> > { typedef Row stored_type; inline partial_unwrap(const Op< subview_row, op_htrans2>& A) : val(A.aux) , M (A.m ) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return val; } arma_inline bool is_alias(const Mat&) const { return false; } static const bool do_trans = true; static const bool do_times = true; const eT val; const Row M; }; template struct partial_unwrap_scalar_times_default { typedef typename T1::elem_type eT; typedef Mat stored_type; inline partial_unwrap_scalar_times_default(const eOp& A) : val(A.aux) , M (A.P.Q) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return val; } arma_inline bool is_alias(const Mat&) const { return false; } static const bool do_trans = false; static const bool do_times = true; const eT val; const Mat M; }; template struct partial_unwrap_scalar_times_fixed { typedef typename T1::elem_type eT; typedef T1 stored_type; inline explicit partial_unwrap_scalar_times_fixed(const eOp& A) : val(A.aux) , M (A.P.Q) { arma_extra_debug_sigprint(); } arma_hot arma_inline eT get_val() const { return val; } arma_hot arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = false; static const bool do_times = true; const eT val; const T1& M; }; template struct partial_unwrap_scalar_times_redirect {}; template struct partial_unwrap_scalar_times_redirect { typedef partial_unwrap_scalar_times_default result; }; template struct partial_unwrap_scalar_times_redirect { typedef partial_unwrap_scalar_times_fixed result; }; template struct partial_unwrap< eOp > : public partial_unwrap_scalar_times_redirect::value >::result { typedef typename T1::elem_type eT; inline partial_unwrap(const eOp& A) : partial_unwrap_scalar_times_redirect< T1, is_Mat_fixed::value >::result(A) { } }; template struct partial_unwrap< eOp, eop_scalar_times> > { typedef Mat stored_type; inline partial_unwrap(const eOp,eop_scalar_times>& A) : val(A.aux) , M (A.P.Q) { arma_extra_debug_sigprint(); } inline eT get_val() const { return val; } arma_hot arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = false; static const bool do_times = true; const eT val; const Mat& M; }; template struct partial_unwrap< eOp, eop_scalar_times> > { typedef Row stored_type; inline partial_unwrap(const eOp,eop_scalar_times>& A) : val(A.aux) , M (A.P.Q) { arma_extra_debug_sigprint(); } inline eT get_val() const { return val; } arma_hot arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = false; static const bool do_times = true; const eT val; const Row& M; }; template struct partial_unwrap< eOp, eop_scalar_times> > { typedef Col stored_type; inline partial_unwrap(const eOp,eop_scalar_times>& A) : val(A.aux) , M (A.P.Q) { arma_extra_debug_sigprint(); } inline eT get_val() const { return val; } arma_hot arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = false; static const bool do_times = true; const eT val; const Col& M; }; template struct partial_unwrap< eOp, eop_scalar_times> > { typedef Col stored_type; arma_hot inline partial_unwrap(const eOp,eop_scalar_times>& A) : orig( A.P.Q.m ) , val ( A.aux ) , M ( const_cast( A.P.Q.colptr(0) ), A.P.Q.n_rows, false, false ) { arma_extra_debug_sigprint(); } arma_hot arma_inline eT get_val() const { return val; } arma_hot arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&orig)); } static const bool do_trans = false; static const bool do_times = true; const Mat& orig; const eT val; const Col M; }; template struct partial_unwrap< eOp, eop_scalar_times> > { typedef Row stored_type; arma_hot inline partial_unwrap(const eOp,eop_scalar_times>& A) : val(A.aux) , M (A.P.Q) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return val; } arma_inline bool is_alias(const Mat&) const { return false; } static const bool do_trans = false; static const bool do_times = true; const eT val; const Row M; }; template struct partial_unwrap_neg_default { typedef typename T1::elem_type eT; typedef Mat stored_type; inline partial_unwrap_neg_default(const eOp& A) : M(A.P.Q) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(-1); } arma_inline bool is_alias(const Mat&) const { return false; } static const bool do_trans = false; static const bool do_times = true; const Mat M; }; template struct partial_unwrap_neg_fixed { typedef typename T1::elem_type eT; typedef T1 stored_type; inline explicit partial_unwrap_neg_fixed(const eOp& A) : M(A.P.Q) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(-1); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = false; static const bool do_times = true; const T1& M; }; template struct partial_unwrap_neg_redirect {}; template struct partial_unwrap_neg_redirect { typedef partial_unwrap_neg_default result; }; template struct partial_unwrap_neg_redirect { typedef partial_unwrap_neg_fixed result; }; template struct partial_unwrap< eOp > : public partial_unwrap_neg_redirect::value >::result { typedef typename T1::elem_type eT; inline partial_unwrap(const eOp& A) : partial_unwrap_neg_redirect< T1, is_Mat_fixed::value >::result(A) { } }; template struct partial_unwrap< eOp, eop_neg> > { typedef Mat stored_type; inline partial_unwrap(const eOp,eop_neg>& A) : M(A.P.Q) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(-1); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = false; static const bool do_times = true; const Mat& M; }; template struct partial_unwrap< eOp, eop_neg> > { typedef Row stored_type; inline partial_unwrap(const eOp,eop_neg>& A) : M(A.P.Q) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(-1); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = false; static const bool do_times = true; const Row& M; }; template struct partial_unwrap< eOp, eop_neg> > { typedef Col stored_type; inline partial_unwrap(const eOp,eop_neg>& A) : M(A.P.Q) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(-1); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&M)); } static const bool do_trans = false; static const bool do_times = true; const Col& M; }; template struct partial_unwrap< eOp, eop_neg> > { typedef Col stored_type; inline partial_unwrap(const eOp,eop_neg>& A) : orig( A.P.Q.m ) , M ( const_cast( A.P.Q.colptr(0) ), A.P.Q.n_rows, false, false ) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(-1); } arma_inline bool is_alias(const Mat& X) const { return (void_ptr(&X) == void_ptr(&orig)); } static const bool do_trans = false; static const bool do_times = true; const Mat& orig; const Col M; }; template struct partial_unwrap< eOp, eop_neg> > { typedef Row stored_type; inline partial_unwrap(const eOp,eop_neg>& A) : M(A.P.Q) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(-1); } arma_inline bool is_alias(const Mat&) const { return false; } static const bool do_trans = false; static const bool do_times = true; const Row M; }; // template struct partial_unwrap_check_default { typedef typename T1::elem_type eT; typedef Mat stored_type; inline partial_unwrap_check_default(const T1& A, const Mat&) : M(A) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } static const bool do_trans = false; static const bool do_times = false; const Mat M; }; template struct partial_unwrap_check_fixed { typedef typename T1::elem_type eT; typedef T1 stored_type; inline explicit partial_unwrap_check_fixed(const T1& A, const Mat& B) : M_local( (&A == &B) ? new T1(A) : 0 ) , M ( (&A == &B) ? (*M_local) : A ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check_fixed() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_inline eT get_val() const { return eT(1); } static const bool do_trans = false; static const bool do_times = false; const T1* M_local; const T1& M; }; template struct partial_unwrap_check_redirect {}; template struct partial_unwrap_check_redirect { typedef partial_unwrap_check_default result; }; template struct partial_unwrap_check_redirect { typedef partial_unwrap_check_fixed result; }; template struct partial_unwrap_check : public partial_unwrap_check_redirect::value >::result { typedef typename T1::elem_type eT; inline partial_unwrap_check(const T1& A, const Mat& B) : partial_unwrap_check_redirect< T1, is_Mat_fixed::value >::result(A, B) { } }; template struct partial_unwrap_check< Mat > { typedef Mat stored_type; arma_hot inline partial_unwrap_check(const Mat& A, const Mat& B) : M_local ( (&A == &B) ? new Mat(A) : 0 ) , M ( (&A == &B) ? (*M_local) : A ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_inline eT get_val() const { return eT(1); } static const bool do_trans = false; static const bool do_times = false; // the order below is important const Mat* M_local; const Mat& M; }; template struct partial_unwrap_check< Row > { typedef Row stored_type; arma_hot inline partial_unwrap_check(const Row& A, const Mat& B) : M_local ( (&A == &B) ? new Row(A) : 0 ) , M ( (&A == &B) ? (*M_local) : A ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_inline eT get_val() const { return eT(1); } static const bool do_trans = false; static const bool do_times = false; // the order below is important const Row* M_local; const Row& M; }; template struct partial_unwrap_check< Col > { typedef Col stored_type; arma_hot inline partial_unwrap_check(const Col& A, const Mat& B) : M_local ( (&A == &B) ? new Col(A) : 0 ) , M ( (&A == &B) ? (*M_local) : A ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_inline eT get_val() const { return eT(1); } static const bool do_trans = false; static const bool do_times = false; // the order below is important const Col* M_local; const Col& M; }; // NOTE: we can get away with this shortcut as the partial_unwrap_check class is only used by the glue_times class, // NOTE: which relies on partial_unwrap_check to check for aliasing template struct partial_unwrap_check< subview_col > { typedef Col stored_type; arma_hot inline partial_unwrap_check(const subview_col& A, const Mat& B) : M ( const_cast( A.colptr(0) ), A.n_rows, (&(A.m) == &B), false ) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } static const bool do_trans = false; static const bool do_times = false; const Col M; }; template struct partial_unwrap_check_htrans_default { typedef typename T1::elem_type eT; typedef Mat stored_type; inline partial_unwrap_check_htrans_default(const Op& A, const Mat&) : M(A.m) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } static const bool do_trans = true; static const bool do_times = false; const Mat M; }; template struct partial_unwrap_check_htrans_fixed { typedef typename T1::elem_type eT; typedef T1 stored_type; inline explicit partial_unwrap_check_htrans_fixed(const Op& A, const Mat& B) : M_local( (&(A.m) == &B) ? new T1(A.m) : 0 ) , M ( (&(A.m) == &B) ? (*M_local) : A.m ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check_htrans_fixed() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_inline eT get_val() const { return eT(1); } static const bool do_trans = true; static const bool do_times = false; const T1* M_local; const T1& M; }; template struct partial_unwrap_check_htrans_redirect {}; template struct partial_unwrap_check_htrans_redirect { typedef partial_unwrap_check_htrans_default result; }; template struct partial_unwrap_check_htrans_redirect { typedef partial_unwrap_check_htrans_fixed result; }; template struct partial_unwrap_check< Op > : public partial_unwrap_check_htrans_redirect::value >::result { typedef typename T1::elem_type eT; inline partial_unwrap_check(const Op& A, const Mat& B) : partial_unwrap_check_htrans_redirect< T1, is_Mat_fixed::value >::result(A, B) { } }; template struct partial_unwrap_check< Op< Mat, op_htrans> > { typedef Mat stored_type; arma_hot inline partial_unwrap_check(const Op< Mat, op_htrans>& A, const Mat& B) : M_local ( (&A.m == &B) ? new Mat(A.m) : 0 ) , M ( (&A.m == &B) ? (*M_local) : A.m ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_inline eT get_val() const { return eT(1); } static const bool do_trans = true; static const bool do_times = false; // the order below is important const Mat* M_local; const Mat& M; }; template struct partial_unwrap_check< Op< Row, op_htrans> > { typedef Row stored_type; arma_hot inline partial_unwrap_check(const Op< Row, op_htrans>& A, const Mat& B) : M_local ( (&A.m == &B) ? new Row(A.m) : 0 ) , M ( (&A.m == &B) ? (*M_local) : A.m ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_inline eT get_val() const { return eT(1); } static const bool do_trans = true; static const bool do_times = false; // the order below is important const Row* M_local; const Row& M; }; template struct partial_unwrap_check< Op< Col, op_htrans> > { typedef Col stored_type; arma_hot inline partial_unwrap_check(const Op< Col, op_htrans>& A, const Mat& B) : M_local ( (&A.m == &B) ? new Col(A.m) : 0 ) , M ( (&A.m == &B) ? (*M_local) : A.m ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_inline eT get_val() const { return eT(1); } static const bool do_trans = true; static const bool do_times = false; // the order below is important const Col* M_local; const Col& M; }; // NOTE: we can get away with this shortcut as the partial_unwrap_check class is only used by the glue_times class, // NOTE: which relies on partial_unwrap_check to check for aliasing template struct partial_unwrap_check< Op< subview_col, op_htrans> > { typedef Col stored_type; arma_hot inline partial_unwrap_check(const Op< subview_col, op_htrans>& A, const Mat& B) : M ( const_cast( A.m.colptr(0) ), A.m.n_rows, (&(A.m.m) == &B), false ) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(1); } static const bool do_trans = true; static const bool do_times = false; const Col M; }; template struct partial_unwrap_check_htrans2_default { typedef typename T1::elem_type eT; typedef Mat stored_type; inline partial_unwrap_check_htrans2_default(const Op& A, const Mat&) : val(A.aux) , M (A.m) { arma_extra_debug_sigprint(); } arma_hot arma_inline eT get_val() const { return val; } static const bool do_trans = true; static const bool do_times = true; const eT val; const Mat M; }; template struct partial_unwrap_check_htrans2_fixed { typedef typename T1::elem_type eT; typedef T1 stored_type; inline explicit partial_unwrap_check_htrans2_fixed(const Op& A, const Mat& B) : val (A.aux) , M_local( (&(A.m) == &B) ? new T1(A.m) : 0 ) , M ( (&(A.m) == &B) ? (*M_local) : A.m ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check_htrans2_fixed() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_hot arma_inline eT get_val() const { return val; } static const bool do_trans = true; static const bool do_times = true; const eT val; const T1* M_local; const T1& M; }; template struct partial_unwrap_check_htrans2_redirect {}; template struct partial_unwrap_check_htrans2_redirect { typedef partial_unwrap_check_htrans2_default result; }; template struct partial_unwrap_check_htrans2_redirect { typedef partial_unwrap_check_htrans2_fixed result; }; template struct partial_unwrap_check< Op > : public partial_unwrap_check_htrans2_redirect::value >::result { typedef typename T1::elem_type eT; inline partial_unwrap_check(const Op& A, const Mat& B) : partial_unwrap_check_htrans2_redirect< T1, is_Mat_fixed::value >::result(A, B) { } }; template struct partial_unwrap_check< Op< Mat, op_htrans2> > { typedef Mat stored_type; arma_hot inline partial_unwrap_check(const Op< Mat, op_htrans2>& A, const Mat& B) : val (A.aux) , M_local ( (&A.m == &B) ? new Mat(A.m) : 0 ) , M ( (&A.m == &B) ? (*M_local) : A.m ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_hot arma_inline eT get_val() const { return val; } static const bool do_trans = true; static const bool do_times = true; // the order below is important const eT val; const Mat* M_local; const Mat& M; }; template struct partial_unwrap_check< Op< Row, op_htrans2> > { typedef Row stored_type; arma_hot inline partial_unwrap_check(const Op< Row, op_htrans2>& A, const Mat& B) : val (A.aux) , M_local ( (&A.m == &B) ? new Row(A.m) : 0 ) , M ( (&A.m == &B) ? (*M_local) : A.m ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_hot arma_inline eT get_val() const { return val; } static const bool do_trans = true; static const bool do_times = true; // the order below is important const eT val; const Row* M_local; const Row& M; }; template struct partial_unwrap_check< Op< Col, op_htrans2> > { typedef Col stored_type; arma_hot inline partial_unwrap_check(const Op< Col, op_htrans2>& A, const Mat& B) : val (A.aux) , M_local ( (&A.m == &B) ? new Col(A.m) : 0 ) , M ( (&A.m == &B) ? (*M_local) : A.m ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_hot arma_inline eT get_val() const { return val; } static const bool do_trans = true; static const bool do_times = true; // the order below is important const eT val; const Col* M_local; const Col& M; }; // NOTE: we can get away with this shortcut as the partial_unwrap_check class is only used by the glue_times class, // NOTE: which relies on partial_unwrap_check to check for aliasing template struct partial_unwrap_check< Op< subview_col, op_htrans2> > { typedef Col stored_type; arma_hot inline partial_unwrap_check(const Op< subview_col, op_htrans2>& A, const Mat& B) : val( A.aux ) , M ( const_cast( A.m.colptr(0) ), A.m.n_rows, (&(A.m.m) == &B), false ) { arma_extra_debug_sigprint(); } arma_hot arma_inline eT get_val() const { return val; } static const bool do_trans = true; static const bool do_times = true; const eT val; const Col M; }; template struct partial_unwrap_check_scalar_times_default { typedef typename T1::elem_type eT; typedef Mat stored_type; inline partial_unwrap_check_scalar_times_default(const eOp& A, const Mat&) : val(A.aux) , M (A.P.Q) { arma_extra_debug_sigprint(); } arma_hot arma_inline eT get_val() const { return val; } static const bool do_trans = false; static const bool do_times = true; const eT val; const Mat M; }; template struct partial_unwrap_check_scalar_times_fixed { typedef typename T1::elem_type eT; typedef T1 stored_type; inline explicit partial_unwrap_check_scalar_times_fixed(const eOp& A, const Mat& B) : val ( A.aux ) , M_local( (&(A.P.Q) == &B) ? new T1(A.P.Q) : 0 ) , M ( (&(A.P.Q) == &B) ? (*M_local) : A.P.Q ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check_scalar_times_fixed() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_hot arma_inline eT get_val() const { return val; } static const bool do_trans = false; static const bool do_times = true; const eT val; const T1* M_local; const T1& M; }; template struct partial_unwrap_check_scalar_times_redirect {}; template struct partial_unwrap_check_scalar_times_redirect { typedef partial_unwrap_check_scalar_times_default result; }; template struct partial_unwrap_check_scalar_times_redirect { typedef partial_unwrap_check_scalar_times_fixed result; }; template struct partial_unwrap_check< eOp > : public partial_unwrap_check_scalar_times_redirect::value >::result { typedef typename T1::elem_type eT; inline partial_unwrap_check(const eOp& A, const Mat& B) : partial_unwrap_check_scalar_times_redirect< T1, is_Mat_fixed::value >::result(A, B) { } }; template struct partial_unwrap_check< eOp, eop_scalar_times> > { typedef Mat stored_type; arma_hot inline partial_unwrap_check(const eOp,eop_scalar_times>& A, const Mat& B) : val (A.aux) , M_local( (&(A.P.Q) == &B) ? new Mat(A.P.Q) : 0 ) , M ( (&(A.P.Q) == &B) ? *M_local : A.P.Q ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_hot arma_inline eT get_val() const { return val; } static const bool do_trans = false; static const bool do_times = true; const eT val; const Mat* M_local; const Mat& M; }; template struct partial_unwrap_check< eOp, eop_scalar_times> > { typedef Row stored_type; arma_hot inline partial_unwrap_check(const eOp,eop_scalar_times>& A, const Mat& B) : val(A.aux) , M_local( (&(A.P.Q) == &B) ? new Row(A.P.Q) : 0 ) , M ( (&(A.P.Q) == &B) ? *M_local : A.P.Q ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_hot arma_inline eT get_val() const { return val; } static const bool do_trans = false; static const bool do_times = true; const eT val; const Row* M_local; const Row& M; }; template struct partial_unwrap_check< eOp, eop_scalar_times> > { typedef Col stored_type; arma_hot inline partial_unwrap_check(const eOp,eop_scalar_times>& A, const Mat& B) : val ( A.aux ) , M_local( (&(A.P.Q) == &B) ? new Col(A.P.Q) : 0 ) , M ( (&(A.P.Q) == &B) ? *M_local : A.P.Q ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_hot arma_inline eT get_val() const { return val; } static const bool do_trans = false; static const bool do_times = true; const eT val; const Col* M_local; const Col& M; }; // NOTE: we can get away with this shortcut as the partial_unwrap_check class is only used by the glue_times class, // NOTE: which relies on partial_unwrap_check to check for aliasing template struct partial_unwrap_check< eOp, eop_scalar_times> > { typedef Col stored_type; arma_hot inline partial_unwrap_check(const eOp,eop_scalar_times>& A, const Mat& B) : val( A.aux ) , M ( const_cast( A.P.Q.colptr(0) ), A.P.Q.n_rows, (&(A.P.Q.m) == &B), false ) { arma_extra_debug_sigprint(); } arma_hot arma_inline eT get_val() const { return val; } static const bool do_trans = false; static const bool do_times = true; const eT val; const Col M; }; template struct partial_unwrap_check_neg_default { typedef typename T1::elem_type eT; typedef Mat stored_type; inline partial_unwrap_check_neg_default(const eOp& A, const Mat&) : M(A.P.Q) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(-1); } static const bool do_trans = false; static const bool do_times = true; const Mat M; }; template struct partial_unwrap_check_neg_fixed { typedef typename T1::elem_type eT; typedef T1 stored_type; inline explicit partial_unwrap_check_neg_fixed(const eOp& A, const Mat& B) : M_local( (&(A.P.Q) == &B) ? new T1(A.P.Q) : 0 ) , M ( (&(A.P.Q) == &B) ? (*M_local) : A.P.Q ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check_neg_fixed() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_inline eT get_val() const { return eT(-1); } static const bool do_trans = false; static const bool do_times = true; const T1* M_local; const T1& M; }; template struct partial_unwrap_check_neg_redirect {}; template struct partial_unwrap_check_neg_redirect { typedef partial_unwrap_check_neg_default result; }; template struct partial_unwrap_check_neg_redirect { typedef partial_unwrap_check_neg_fixed result; }; template struct partial_unwrap_check< eOp > : public partial_unwrap_check_neg_redirect::value >::result { typedef typename T1::elem_type eT; inline partial_unwrap_check(const eOp& A, const Mat& B) : partial_unwrap_check_neg_redirect< T1, is_Mat_fixed::value >::result(A, B) { } }; template struct partial_unwrap_check< eOp, eop_neg> > { typedef Mat stored_type; arma_hot inline partial_unwrap_check(const eOp,eop_neg>& A, const Mat& B) : M_local( (&(A.P.Q) == &B) ? new Mat(A.P.Q) : 0 ) , M ( (&(A.P.Q) == &B) ? *M_local : A.P.Q ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_inline eT get_val() const { return eT(-1); } static const bool do_trans = false; static const bool do_times = true; const Mat* M_local; const Mat& M; }; template struct partial_unwrap_check< eOp, eop_neg> > { typedef Row stored_type; arma_hot inline partial_unwrap_check(const eOp,eop_neg>& A, const Mat& B) : M_local( (&(A.P.Q) == &B) ? new Row(A.P.Q) : 0 ) , M ( (&(A.P.Q) == &B) ? *M_local : A.P.Q ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_inline eT get_val() const { return eT(-1); } static const bool do_trans = false; static const bool do_times = true; const Row* M_local; const Row& M; }; template struct partial_unwrap_check< eOp, eop_neg> > { typedef Col stored_type; arma_hot inline partial_unwrap_check(const eOp,eop_neg>& A, const Mat& B) : M_local( (&(A.P.Q) == &B) ? new Col(A.P.Q) : 0 ) , M ( (&(A.P.Q) == &B) ? *M_local : A.P.Q ) { arma_extra_debug_sigprint(); } inline ~partial_unwrap_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } arma_inline eT get_val() const { return eT(-1); } static const bool do_trans = false; static const bool do_times = true; const Col* M_local; const Col& M; }; // NOTE: we can get away with this shortcut as the partial_unwrap_check class is only used by the glue_times class, // NOTE: which relies on partial_unwrap_check to check for aliasing template struct partial_unwrap_check< eOp, eop_neg> > { typedef Col stored_type; arma_hot inline partial_unwrap_check(const eOp,eop_neg>& A, const Mat& B) : M ( const_cast( A.P.Q.colptr(0) ), A.P.Q.n_rows, (&(A.P.Q.m) == &B), false ) { arma_extra_debug_sigprint(); } arma_inline eT get_val() const { return eT(-1); } static const bool do_trans = false; static const bool do_times = true; const Col M; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/unwrap_cube.hpp ================================================ // Copyright (C) 2008-2010 Conrad Sanderson // Copyright (C) 2008-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup unwrap_cube //! @{ template class unwrap_cube { public: typedef typename T1::elem_type eT; inline unwrap_cube(const T1& A) : M(A) { arma_extra_debug_sigprint(); } const Cube M; }; template class unwrap_cube< Cube > { public: inline unwrap_cube(const Cube& A) : M(A) { arma_extra_debug_sigprint(); } const Cube& M; }; // // // template class unwrap_cube_check { public: typedef typename T1::elem_type eT; inline unwrap_cube_check(const T1& A, const Cube&) : M(A) { arma_extra_debug_sigprint(); arma_type_check(( is_arma_cube_type::value == false )); } const Cube M; }; template class unwrap_cube_check< Cube > { public: inline unwrap_cube_check(const Cube& A, const Cube& B) : M_local( (&A == &B) ? new Cube(A) : 0 ) , M ( (&A == &B) ? (*M_local) : A ) { arma_extra_debug_sigprint(); } inline ~unwrap_cube_check() { arma_extra_debug_sigprint(); if(M_local) { delete M_local; } } // the order below is important const Cube* M_local; const Cube& M; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/unwrap_spmat.hpp ================================================ // Copyright (C) 2012-2015 Conrad Sanderson // Copyright (C) 2012-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup unwrap_spmat //! @{ template struct unwrap_spmat { typedef typename T1::elem_type eT; typedef SpMat stored_type; inline unwrap_spmat(const T1& A) : M(A) { arma_extra_debug_sigprint(); } const SpMat M; }; template struct unwrap_spmat< SpMat > { typedef SpMat stored_type; inline unwrap_spmat(const SpMat& A) : M(A) { arma_extra_debug_sigprint(); } const SpMat& M; }; template struct unwrap_spmat< SpRow > { typedef SpRow stored_type; inline unwrap_spmat(const SpRow& A) : M(A) { arma_extra_debug_sigprint(); } const SpRow& M; }; template struct unwrap_spmat< SpCol > { typedef SpCol stored_type; inline unwrap_spmat(const SpCol& A) : M(A) { arma_extra_debug_sigprint(); } const SpCol& M; }; template struct unwrap_spmat< SpOp > { typedef typename T1::elem_type eT; typedef SpMat stored_type; inline unwrap_spmat(const SpOp& A) : M(A) { arma_extra_debug_sigprint(); } const SpMat M; }; template struct unwrap_spmat< SpGlue > { typedef typename T1::elem_type eT; typedef SpMat stored_type; inline unwrap_spmat(const SpGlue& A) : M(A) { arma_extra_debug_sigprint(); } const SpMat M; }; template struct unwrap_spmat< mtSpOp > { typedef SpMat stored_type; inline unwrap_spmat(const mtSpOp& A) : M(A) { arma_extra_debug_sigprint(); } const SpMat M; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/upgrade_val.hpp ================================================ // Copyright (C) 2009-2010 Conrad Sanderson // Copyright (C) 2009-2010 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup upgrade_val //! @{ //! upgrade_val is used to ensure an operation such as multiplication is possible between two types. //! values are upgraded only where necessary. template struct upgrade_val { typedef typename promote_type::result T1_result; typedef typename promote_type::result T2_result; arma_inline static typename promote_type::result apply(const T1 x) { typedef typename promote_type::result out_type; return out_type(x); } arma_inline static typename promote_type::result apply(const T2 x) { typedef typename promote_type::result out_type; return out_type(x); } }; // template<> template struct upgrade_val { typedef T T1_result; typedef T T2_result; arma_inline static const T& apply(const T& x) { return x; } }; //! upgrade a type to allow multiplication with a complex type //! e.g. the int in "int * complex" is upgraded to a double // template<> template struct upgrade_val< std::complex, T2 > { typedef std::complex T1_result; typedef T T2_result; arma_inline static const std::complex& apply(const std::complex& x) { return x; } arma_inline static T apply(const T2 x) { return T(x); } }; // template<> template struct upgrade_val< T1, std::complex > { typedef T T1_result; typedef std::complex T2_result; arma_inline static T apply(const T1 x) { return T(x); } arma_inline static const std::complex& apply(const std::complex& x) { return x; } }; //! ensure we don't lose precision when multiplying a complex number with a higher precision real number template<> struct upgrade_val< std::complex, double > { typedef std::complex T1_result; typedef double T2_result; arma_inline static const std::complex apply(const std::complex& x) { return std::complex(x); } arma_inline static double apply(const double x) { return x; } }; template<> struct upgrade_val< double, std::complex > { typedef double T1_result; typedef std::complex T2_result; arma_inline static double apply(const double x) { return x; } arma_inline static const std::complex apply(const std::complex& x) { return std::complex(x); } }; //! ensure we don't lose precision when multiplying complex numbers with different underlying types template<> struct upgrade_val< std::complex, std::complex > { typedef std::complex T1_result; typedef std::complex T2_result; arma_inline static const std::complex apply(const std::complex& x) { return std::complex(x); } arma_inline static const std::complex& apply(const std::complex& x) { return x; } }; template<> struct upgrade_val< std::complex, std::complex > { typedef std::complex T1_result; typedef std::complex T2_result; arma_inline static const std::complex& apply(const std::complex& x) { return x; } arma_inline static const std::complex apply(const std::complex& x) { return std::complex(x); } }; //! work around limitations in the complex class (at least as present in gcc 4.1 & 4.3) template<> struct upgrade_val< std::complex, float > { typedef std::complex T1_result; typedef double T2_result; arma_inline static const std::complex& apply(const std::complex& x) { return x; } arma_inline static double apply(const float x) { return double(x); } }; template<> struct upgrade_val< float, std::complex > { typedef double T1_result; typedef std::complex T2_result; arma_inline static double apply(const float x) { return double(x); } arma_inline static const std::complex& apply(const std::complex& x) { return x; } }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/wall_clock_bones.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup wall_clock //! @{ //! Class for measuring time intervals class wall_clock { public: inline wall_clock(); inline ~wall_clock(); inline void tic(); //!< start the timer inline double toc(); //!< return the number of seconds since the last call to tic() private: bool valid; #if defined(ARMA_USE_CXX11) && !defined(ARMA_DONT_USE_CXX11_CHRONO) std::chrono::steady_clock::time_point chrono_time1; #elif defined(ARMA_HAVE_GETTIMEOFDAY) struct timeval posix_time1; struct timeval posix_time2; #else clock_t time1; #endif }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/wall_clock_meat.hpp ================================================ // Copyright (C) 2008-2013 Conrad Sanderson // Copyright (C) 2008-2013 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup wall_clock //! @{ inline wall_clock::wall_clock() : valid(false) { arma_extra_debug_sigprint(); } inline wall_clock::~wall_clock() { arma_extra_debug_sigprint(); } inline void wall_clock::tic() { arma_extra_debug_sigprint(); #if defined(ARMA_USE_CXX11) && !defined(ARMA_DONT_USE_CXX11_CHRONO) { chrono_time1 = std::chrono::steady_clock::now(); valid = true; } #elif defined(ARMA_HAVE_GETTIMEOFDAY) { gettimeofday(&posix_time1, 0); valid = true; } #else { time1 = clock(); valid = true; } #endif } inline double wall_clock::toc() { arma_extra_debug_sigprint(); if(valid) { #if defined(ARMA_USE_CXX11) && !defined(ARMA_DONT_USE_CXX11_CHRONO) { const std::chrono::steady_clock::time_point chrono_time2 = std::chrono::steady_clock::now(); typedef std::chrono::duration duration_type; const duration_type chrono_span = std::chrono::duration_cast< duration_type >(chrono_time2 - chrono_time1); return chrono_span.count(); } #elif defined(ARMA_HAVE_GETTIMEOFDAY) { gettimeofday(&posix_time2, 0); const double tmp_time1 = posix_time1.tv_sec + posix_time1.tv_usec * 1.0e-6; const double tmp_time2 = posix_time2.tv_sec + posix_time2.tv_usec * 1.0e-6; return tmp_time2 - tmp_time1; } #else { clock_t time2 = clock(); clock_t diff = time2 - time1; return double(diff) / double(CLOCKS_PER_SEC); } #endif } else { return 0.0; } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/xtrans_mat_bones.hpp ================================================ // Copyright (C) 2014 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup xtrans_mat //! @{ template class xtrans_mat : public Base > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = false; static const bool is_col = false; arma_aligned const Mat& X; arma_aligned mutable Mat Y; arma_aligned const uword n_rows; arma_aligned const uword n_cols; arma_aligned const uword n_elem; inline explicit xtrans_mat(const Mat& in_X); inline void extract(Mat& out) const; inline eT operator[](const uword ii) const; inline eT at_alt (const uword ii) const; arma_inline eT at(const uword in_row, const uword in_col) const; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/xtrans_mat_meat.hpp ================================================ // Copyright (C) 2014 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup xtrans_mat //! @{ template inline xtrans_mat::xtrans_mat(const Mat& in_X) : X (in_X ) , n_rows(in_X.n_cols) // deliberately swapped , n_cols(in_X.n_rows) , n_elem(in_X.n_elem) { arma_extra_debug_sigprint(); } template inline void xtrans_mat::extract(Mat& out) const { arma_extra_debug_sigprint(); do_conj ? op_htrans::apply_mat(out, X) : op_strans::apply_mat(out, X); } template inline eT xtrans_mat::operator[](const uword ii) const { if(Y.n_elem > 0) { return Y[ii]; } else { do_conj ? op_htrans::apply_mat(Y, X) : op_strans::apply_mat(Y, X); return Y[ii]; } } template inline eT xtrans_mat::at_alt(const uword ii) const { return (*this).operator[](ii); } template arma_inline eT xtrans_mat::at(const uword in_row, const uword in_col) const { if(do_conj) { return access::alt_conj( X.at(in_col, in_row) ); // deliberately swapped } else { return X.at(in_col, in_row); // deliberately swapped } } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/xvec_htrans_bones.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup xvec_htrans //! @{ template class xvec_htrans : public Base > { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = false; static const bool is_col = false; arma_aligned const eT* const mem; const uword n_rows; const uword n_cols; const uword n_elem; inline explicit xvec_htrans(const eT* const in_mem, const uword in_n_rows, const uword in_n_cols); inline void extract(Mat& out) const; inline eT operator[](const uword ii) const; inline eT at_alt (const uword ii) const; inline eT at (const uword in_row, const uword in_col) const; }; //! @} ================================================ FILE: OptolithiumC/libs/armadillo/include/armadillo_bits/xvec_htrans_meat.hpp ================================================ // Copyright (C) 2013 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup xvec_htrans //! @{ template inline xvec_htrans::xvec_htrans(const eT* const in_mem, const uword in_n_rows, const uword in_n_cols) : mem (in_mem ) , n_rows(in_n_cols ) // deliberately swapped , n_cols(in_n_rows ) , n_elem(in_n_rows*in_n_cols) { arma_extra_debug_sigprint(); } template inline void xvec_htrans::extract(Mat& out) const { arma_extra_debug_sigprint(); // NOTE: this function assumes that matrix 'out' has already been set to the correct size const eT* in_mem = mem; eT* out_mem = out.memptr(); const uword N = n_elem; for(uword ii=0; ii < N; ++ii) { out_mem[ii] = access::alt_conj( in_mem[ii] ); } } template inline eT xvec_htrans::operator[](const uword ii) const { return access::alt_conj( mem[ii] ); } template inline eT xvec_htrans::at_alt(const uword ii) const { return access::alt_conj( mem[ii] ); } template inline eT xvec_htrans::at(const uword in_row, const uword in_col) const { //return (n_rows == 1) ? access::alt_conj( mem[in_col] ) : access::alt_conj( mem[in_row] ); return access::alt_conj( mem[in_row + in_col] ); // either in_row or in_col must be zero, as we're storing a vector } //! @} ================================================ FILE: OptolithiumC/libs/armadillo/src/wrapper.cpp ================================================ #include #include #include #if (__cplusplus >= 201103L) || defined(__GXX_EXPERIMENTAL_CXX0X__) #undef ARMA_USE_CXX11 #define ARMA_USE_CXX11 #endif #include "armadillo_bits/config.hpp" #undef ARMA_USE_WRAPPER #include "armadillo_bits/compiler_setup.hpp" #include "armadillo_bits/typedef_elem.hpp" #include "armadillo_bits/include_atlas.hpp" #include "armadillo_bits/include_superlu.hpp" #if defined(ARMA_USE_EXTERN_CXX11_RNG) #include #include #if defined(ARMA_HAVE_GETTIMEOFDAY) #include #endif namespace arma { #include "armadillo_bits/arma_rng_cxx11.hpp" thread_local arma_rng_cxx11 arma_rng_cxx11_instance; } #endif #if defined(ARMA_USE_HDF5_ALT) #include #if defined(H5_USE_16_API_DEFAULT) || defined(H5_USE_16_API) // #pragma message ("disabling use of HDF5 due to its incompatible configuration") #undef ARMA_USE_HDF5_ALT #endif #endif namespace arma { #include "armadillo_bits/blas_bones.hpp" #include "armadillo_bits/lapack_bones.hpp" #include "armadillo_bits/arpack_bones.hpp" #include "armadillo_bits/superlu_bones.hpp" // no need to include hdf5_bones.hpp -- it only contains #defines for when ARMA_USE_HDF5_ALT is not defined. #if defined(ARMA_USE_HDF5_ALT) // Wrapper functions: arma::H5open() and arma::H5check_version(), to hijack // calls to H5open() and H5check_version(). herr_t H5open() { return ::H5open(); } herr_t H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) { return ::H5check_version(majnum, minnum, relnum); } #endif // at this stage we have prototypes for the real blas, lapack and atlas functions // now we make the wrapper functions extern "C" { #if defined(ARMA_USE_BLAS) float arma_fortran_prefix(arma_sdot)(blas_int* n, const float* x, blas_int* incx, const float* y, blas_int* incy) { return arma_fortran_noprefix(arma_sdot)(n, x, incx, y, incy); } double arma_fortran_prefix(arma_ddot)(blas_int* n, const double* x, blas_int* incx, const double* y, blas_int* incy) { return arma_fortran_noprefix(arma_ddot)(n, x, incx, y, incy); } void arma_fortran_prefix(arma_sgemv)(const char* transA, const blas_int* m, const blas_int* n, const float* alpha, const float* A, const blas_int* ldA, const float* x, const blas_int* incx, const float* beta, float* y, const blas_int* incy) { arma_fortran_noprefix(arma_sgemv)(transA, m, n, alpha, A, ldA, x, incx, beta, y, incy); } void arma_fortran_prefix(arma_dgemv)(const char* transA, const blas_int* m, const blas_int* n, const double* alpha, const double* A, const blas_int* ldA, const double* x, const blas_int* incx, const double* beta, double* y, const blas_int* incy) { arma_fortran_noprefix(arma_dgemv)(transA, m, n, alpha, A, ldA, x, incx, beta, y, incy); } void arma_fortran_prefix(arma_cgemv)(const char* transA, const blas_int* m, const blas_int* n, const void* alpha, const void* A, const blas_int* ldA, const void* x, const blas_int* incx, const void* beta, void* y, const blas_int* incy) { arma_fortran_noprefix(arma_cgemv)(transA, m, n, alpha, A, ldA, x, incx, beta, y, incy); } void arma_fortran_prefix(arma_zgemv)(const char* transA, const blas_int* m, const blas_int* n, const void* alpha, const void* A, const blas_int* ldA, const void* x, const blas_int* incx, const void* beta, void* y, const blas_int* incy) { arma_fortran_noprefix(arma_zgemv)(transA, m, n, alpha, A, ldA, x, incx, beta, y, incy); } void arma_fortran_prefix(arma_sgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const float* alpha, const float* A, const blas_int* ldA, const float* B, const blas_int* ldB, const float* beta, float* C, const blas_int* ldC) { arma_fortran_noprefix(arma_sgemm)(transA, transB, m, n, k, alpha, A, ldA, B, ldB, beta, C, ldC); } void arma_fortran_prefix(arma_dgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const double* alpha, const double* A, const blas_int* ldA, const double* B, const blas_int* ldB, const double* beta, double* C, const blas_int* ldC) { arma_fortran_noprefix(arma_dgemm)(transA, transB, m, n, k, alpha, A, ldA, B, ldB, beta, C, ldC); } void arma_fortran_prefix(arma_cgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const void* alpha, const void* A, const blas_int* ldA, const void* B, const blas_int* ldB, const void* beta, void* C, const blas_int* ldC) { arma_fortran_noprefix(arma_cgemm)(transA, transB, m, n, k, alpha, A, ldA, B, ldB, beta, C, ldC); } void arma_fortran_prefix(arma_zgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const void* alpha, const void* A, const blas_int* ldA, const void* B, const blas_int* ldB, const void* beta, void* C, const blas_int* ldC) { arma_fortran_noprefix(arma_zgemm)(transA, transB, m, n, k, alpha, A, ldA, B, ldB, beta, C, ldC); } void arma_fortran_prefix(arma_ssyrk)(const char* uplo, const char* transA, const blas_int* n, const blas_int* k, const float* alpha, const float* A, const blas_int* ldA, const float* beta, float* C, const blas_int* ldC) { arma_fortran_noprefix(arma_ssyrk)(uplo, transA, n, k, alpha, A, ldA, beta, C, ldC); } void arma_fortran_prefix(arma_dsyrk)(const char* uplo, const char* transA, const blas_int* n, const blas_int* k, const double* alpha, const double* A, const blas_int* ldA, const double* beta, double* C, const blas_int* ldC) { arma_fortran_noprefix(arma_dsyrk)(uplo, transA, n, k, alpha, A, ldA, beta, C, ldC); } void arma_fortran_prefix(arma_cherk)(const char* uplo, const char* transA, const blas_int* n, const blas_int* k, const float* alpha, const void* A, const blas_int* ldA, const float* beta, void* C, const blas_int* ldC) { arma_fortran_noprefix(arma_cherk)(uplo, transA, n, k, alpha, A, ldA, beta, C, ldC); } void arma_fortran_prefix(arma_zherk)(const char* uplo, const char* transA, const blas_int* n, const blas_int* k, const double* alpha, const void* A, const blas_int* ldA, const double* beta, void* C, const blas_int* ldC) { arma_fortran_noprefix(arma_zherk)(uplo, transA, n, k, alpha, A, ldA, beta, C, ldC); } #endif #if defined(ARMA_USE_LAPACK) void arma_fortran_prefix(arma_sgetrf)(blas_int* m, blas_int* n, float* a, blas_int* lda, blas_int* ipiv, blas_int* info) { arma_fortran_noprefix(arma_sgetrf)(m, n, a, lda, ipiv, info); } void arma_fortran_prefix(arma_dgetrf)(blas_int* m, blas_int* n, double* a, blas_int* lda, blas_int* ipiv, blas_int* info) { arma_fortran_noprefix(arma_dgetrf)(m, n, a, lda, ipiv, info); } void arma_fortran_prefix(arma_cgetrf)(blas_int* m, blas_int* n, void* a, blas_int* lda, blas_int* ipiv, blas_int* info) { arma_fortran_noprefix(arma_cgetrf)(m, n, a, lda, ipiv, info); } void arma_fortran_prefix(arma_zgetrf)(blas_int* m, blas_int* n, void* a, blas_int* lda, blas_int* ipiv, blas_int* info) { arma_fortran_noprefix(arma_zgetrf)(m, n, a, lda, ipiv, info); } void arma_fortran_prefix(arma_sgetri)(blas_int* n, float* a, blas_int* lda, blas_int* ipiv, float* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_sgetri)(n, a, lda, ipiv, work, lwork, info); } void arma_fortran_prefix(arma_dgetri)(blas_int* n, double* a, blas_int* lda, blas_int* ipiv, double* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_dgetri)(n, a, lda, ipiv, work, lwork, info); } void arma_fortran_prefix(arma_cgetri)(blas_int* n, void* a, blas_int* lda, blas_int* ipiv, void* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_cgetri)(n, a, lda, ipiv, work, lwork, info); } void arma_fortran_prefix(arma_zgetri)(blas_int* n, void* a, blas_int* lda, blas_int* ipiv, void* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_zgetri)(n, a, lda, ipiv, work, lwork, info); } void arma_fortran_prefix(arma_strtri)(char* uplo, char* diag, blas_int* n, float* a, blas_int* lda, blas_int* info) { arma_fortran_noprefix(arma_strtri)(uplo, diag, n, a, lda, info); } void arma_fortran_prefix(arma_dtrtri)(char* uplo, char* diag, blas_int* n, double* a, blas_int* lda, blas_int* info) { arma_fortran_noprefix(arma_dtrtri)(uplo, diag, n, a, lda, info); } void arma_fortran_prefix(arma_ctrtri)(char* uplo, char* diag, blas_int* n, void* a, blas_int* lda, blas_int* info) { arma_fortran_noprefix(arma_ctrtri)(uplo, diag, n, a, lda, info); } void arma_fortran_prefix(arma_ztrtri)(char* uplo, char* diag, blas_int* n, void* a, blas_int* lda, blas_int* info) { arma_fortran_noprefix(arma_ztrtri)(uplo, diag, n, a, lda, info); } void arma_fortran_prefix(arma_ssyev)(char* jobz, char* uplo, blas_int* n, float* a, blas_int* lda, float* w, float* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_ssyev)(jobz, uplo, n, a, lda, w, work, lwork, info); } void arma_fortran_prefix(arma_dsyev)(char* jobz, char* uplo, blas_int* n, double* a, blas_int* lda, double* w, double* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_dsyev)(jobz, uplo, n, a, lda, w, work, lwork, info); } void arma_fortran_prefix(arma_cheev)(char* jobz, char* uplo, blas_int* n, void* a, blas_int* lda, float* w, void* work, blas_int* lwork, float* rwork, blas_int* info) { arma_fortran_noprefix(arma_cheev)(jobz, uplo, n, a, lda, w, work, lwork, rwork, info); } void arma_fortran_prefix(arma_zheev)(char* jobz, char* uplo, blas_int* n, void* a, blas_int* lda, double* w, void* work, blas_int* lwork, double* rwork, blas_int* info) { arma_fortran_noprefix(arma_zheev)(jobz, uplo, n, a, lda, w, work, lwork, rwork, info); } void arma_fortran_prefix(arma_ssyevd)(char* jobz, char* uplo, blas_int* n, float* a, blas_int* lda, float* w, float* work, blas_int* lwork, blas_int* iwork, blas_int* liwork, blas_int* info) { arma_fortran_noprefix(arma_ssyevd)(jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork, info); } void arma_fortran_prefix(arma_dsyevd)(char* jobz, char* uplo, blas_int* n, double* a, blas_int* lda, double* w, double* work, blas_int* lwork, blas_int* iwork, blas_int* liwork, blas_int* info) { arma_fortran_noprefix(arma_dsyevd)(jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork, info); } void arma_fortran_prefix(arma_cheevd)(char* jobz, char* uplo, blas_int* n, void* a, blas_int* lda, float* w, void* work, blas_int* lwork, float* rwork, blas_int* lrwork, blas_int* iwork, blas_int* liwork, blas_int* info) { arma_fortran_noprefix(arma_cheevd)(jobz, uplo, n, a, lda, w, work, lwork, rwork, lrwork, iwork, liwork, info); } void arma_fortran_prefix(arma_zheevd)(char* jobz, char* uplo, blas_int* n, void* a, blas_int* lda, double* w, void* work, blas_int* lwork, double* rwork, blas_int* lrwork, blas_int* iwork, blas_int* liwork, blas_int* info) { arma_fortran_noprefix(arma_zheevd)(jobz, uplo, n, a, lda, w, work, lwork, rwork, lrwork, iwork, liwork, info); } void arma_fortran_prefix(arma_sgeev)(char* jobvl, char* jobvr, blas_int* n, float* a, blas_int* lda, float* wr, float* wi, float* vl, blas_int* ldvl, float* vr, blas_int* ldvr, float* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_sgeev)(jobvl, jobvr, n, a, lda, wr, wi, vl, ldvl, vr, ldvr, work, lwork, info); } void arma_fortran_prefix(arma_dgeev)(char* jobvl, char* jobvr, blas_int* n, double* a, blas_int* lda, double* wr, double* wi, double* vl, blas_int* ldvl, double* vr, blas_int* ldvr, double* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_dgeev)(jobvl, jobvr, n, a, lda, wr, wi, vl, ldvl, vr, ldvr, work, lwork, info); } void arma_fortran_prefix(arma_cgeev)(char* jobvl, char* jobvr, blas_int* n, void* a, blas_int* lda, void* w, void* vl, blas_int* ldvl, void* vr, blas_int* ldvr, void* work, blas_int* lwork, float* rwork, blas_int* info) { arma_fortran_noprefix(arma_cgeev)(jobvl, jobvr, n, a, lda, w, vl, ldvl, vr, ldvr, work, lwork, rwork, info); } void arma_fortran_prefix(arma_zgeev)(char* jobvl, char* jobvr, blas_int* n, void* a, blas_int* lda, void* w, void* vl, blas_int* ldvl, void* vr, blas_int* ldvr, void* work, blas_int* lwork, double* rwork, blas_int* info) { arma_fortran_noprefix(arma_zgeev)(jobvl, jobvr, n, a, lda, w, vl, ldvl, vr, ldvr, work, lwork, rwork, info); } void arma_fortran_prefix(arma_sggev)(char* jobvl, char* jobvr, blas_int* n, float* a, blas_int* lda, float* b, blas_int* ldb, float* alphar, float* alphai, float* beta, float* vl, blas_int* ldvl, float* vr, blas_int* ldvr, float* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_sggev)(jobvl, jobvr, n, a, lda, b, ldb, alphar, alphai, beta, vl, ldvl, vr, ldvr, work, lwork, info); } void arma_fortran_prefix(arma_dggev)(char* jobvl, char* jobvr, blas_int* n, double* a, blas_int* lda, double* b, blas_int* ldb, double* alphar, double* alphai, double* beta, double* vl, blas_int* ldvl, double* vr, blas_int* ldvr, double* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_dggev)(jobvl, jobvr, n, a, lda, b, ldb, alphar, alphai, beta, vl, ldvl, vr, ldvr, work, lwork, info); } void arma_fortran_prefix(arma_cggev)(char* jobvl, char* jobvr, blas_int* n, void* a, blas_int* lda, void* b, blas_int* ldb, void* alpha, void* beta, void* vl, blas_int* ldvl, void* vr, blas_int* ldvr, void* work, blas_int* lwork, float* rwork, blas_int* info) { arma_fortran_noprefix(arma_cggev)(jobvl, jobvr, n, a, lda, b, ldb, alpha, beta, vl, ldvl, vr, ldvr, work, lwork, rwork, info); } void arma_fortran_prefix(arma_zggev)(char* jobvl, char* jobvr, blas_int* n, void* a, blas_int* lda, void* b, blas_int* ldb, void* alpha, void* beta, void* vl, blas_int* ldvl, void* vr, blas_int* ldvr, void* work, blas_int* lwork, double* rwork, blas_int* info) { arma_fortran_noprefix(arma_zggev)(jobvl, jobvr, n, a, lda, b, ldb, alpha, beta, vl, ldvl, vr, ldvr, work, lwork, rwork, info); } void arma_fortran_prefix(arma_spotrf)(char* uplo, blas_int* n, float* a, blas_int* lda, blas_int* info) { arma_fortran_noprefix(arma_spotrf)(uplo, n, a, lda, info); } void arma_fortran_prefix(arma_dpotrf)(char* uplo, blas_int* n, double* a, blas_int* lda, blas_int* info) { arma_fortran_noprefix(arma_dpotrf)(uplo, n, a, lda, info); } void arma_fortran_prefix(arma_cpotrf)(char* uplo, blas_int* n, void* a, blas_int* lda, blas_int* info) { arma_fortran_noprefix(arma_cpotrf)(uplo, n, a, lda, info); } void arma_fortran_prefix(arma_zpotrf)(char* uplo, blas_int* n, void* a, blas_int* lda, blas_int* info) { arma_fortran_noprefix(arma_zpotrf)(uplo, n, a, lda, info); } void arma_fortran_prefix(arma_spotri)(char* uplo, blas_int* n, float* a, blas_int* lda, blas_int* info) { arma_fortran_noprefix(arma_spotri)(uplo, n, a, lda, info); } void arma_fortran_prefix(arma_dpotri)(char* uplo, blas_int* n, double* a, blas_int* lda, blas_int* info) { arma_fortran_noprefix(arma_dpotri)(uplo, n, a, lda, info); } void arma_fortran_prefix(arma_cpotri)(char* uplo, blas_int* n, void* a, blas_int* lda, blas_int* info) { arma_fortran_noprefix(arma_cpotri)(uplo, n, a, lda, info); } void arma_fortran_prefix(arma_zpotri)(char* uplo, blas_int* n, void* a, blas_int* lda, blas_int* info) { arma_fortran_noprefix(arma_zpotri)(uplo, n, a, lda, info); } void arma_fortran_prefix(arma_sgeqrf)(blas_int* m, blas_int* n, float* a, blas_int* lda, float* tau, float* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_sgeqrf)(m, n, a, lda, tau, work, lwork, info); } void arma_fortran_prefix(arma_dgeqrf)(blas_int* m, blas_int* n, double* a, blas_int* lda, double* tau, double* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_dgeqrf)(m, n, a, lda, tau, work, lwork, info); } void arma_fortran_prefix(arma_cgeqrf)(blas_int* m, blas_int* n, void* a, blas_int* lda, void* tau, void* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_cgeqrf)(m, n, a, lda, tau, work, lwork, info); } void arma_fortran_prefix(arma_zgeqrf)(blas_int* m, blas_int* n, void* a, blas_int* lda, void* tau, void* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_zgeqrf)(m, n, a, lda, tau, work, lwork, info); } void arma_fortran_prefix(arma_sorgqr)(blas_int* m, blas_int* n, blas_int* k, float* a, blas_int* lda, float* tau, float* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_sorgqr)(m, n, k, a, lda, tau, work, lwork, info); } void arma_fortran_prefix(arma_dorgqr)(blas_int* m, blas_int* n, blas_int* k, double* a, blas_int* lda, double* tau, double* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_dorgqr)(m, n, k, a, lda, tau, work, lwork, info); } void arma_fortran_prefix(arma_cungqr)(blas_int* m, blas_int* n, blas_int* k, void* a, blas_int* lda, void* tau, void* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_cungqr)(m, n, k, a, lda, tau, work, lwork, info); } void arma_fortran_prefix(arma_zungqr)(blas_int* m, blas_int* n, blas_int* k, void* a, blas_int* lda, void* tau, void* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_zungqr)(m, n, k, a, lda, tau, work, lwork, info); } void arma_fortran_prefix(arma_sgesvd)(char* jobu, char* jobvt, blas_int* m, blas_int* n, float* a, blas_int* lda, float* s, float* u, blas_int* ldu, float* vt, blas_int* ldvt, float* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_sgesvd)(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, info); } void arma_fortran_prefix(arma_dgesvd)(char* jobu, char* jobvt, blas_int* m, blas_int* n, double* a, blas_int* lda, double* s, double* u, blas_int* ldu, double* vt, blas_int* ldvt, double* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_dgesvd)(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, info); } void arma_fortran_prefix(arma_cgesvd)(char* jobu, char* jobvt, blas_int* m, blas_int* n, void* a, blas_int* lda, float* s, void* u, blas_int* ldu, void* vt, blas_int* ldvt, void* work, blas_int* lwork, float* rwork, blas_int* info) { arma_fortran_noprefix(arma_cgesvd)(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, info); } void arma_fortran_prefix(arma_zgesvd)(char* jobu, char* jobvt, blas_int* m, blas_int* n, void* a, blas_int* lda, double* s, void* u, blas_int* ldu, void* vt, blas_int* ldvt, void* work, blas_int* lwork, double* rwork, blas_int* info) { arma_fortran_noprefix(arma_zgesvd)(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, info); } void arma_fortran_prefix(arma_sgesdd)(char* jobz, blas_int* m, blas_int* n, float* a, blas_int* lda, float* s, float* u, blas_int* ldu, float* vt, blas_int* ldvt, float* work, blas_int* lwork, blas_int* iwork, blas_int* info) { arma_fortran_noprefix(arma_sgesdd)(jobz, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, iwork, info); } void arma_fortran_prefix(arma_dgesdd)(char* jobz, blas_int* m, blas_int* n, double* a, blas_int* lda, double* s, double* u, blas_int* ldu, double* vt, blas_int* ldvt, double* work, blas_int* lwork, blas_int* iwork, blas_int* info) { arma_fortran_noprefix(arma_dgesdd)(jobz, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, iwork, info); } void arma_fortran_prefix(arma_cgesdd)(char* jobz, blas_int* m, blas_int* n, void* a, blas_int* lda, float* s, void* u, blas_int* ldu, void* vt, blas_int* ldvt, void* work, blas_int* lwork, float* rwork, blas_int* iwork, blas_int* info) { arma_fortran_noprefix(arma_cgesdd)(jobz, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, iwork, info); } void arma_fortran_prefix(arma_zgesdd)(char* jobz, blas_int* m, blas_int* n, void* a, blas_int* lda, double* s, void* u, blas_int* ldu, void* vt, blas_int* ldvt, void* work, blas_int* lwork, double* rwork, blas_int* iwork, blas_int* info) { arma_fortran_noprefix(arma_zgesdd)(jobz, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, iwork, info); } void arma_fortran_prefix(arma_sgesv)(blas_int* n, blas_int* nrhs, float* a, blas_int* lda, blas_int* ipiv, float* b, blas_int* ldb, blas_int* info) { arma_fortran_noprefix(arma_sgesv)(n, nrhs, a, lda, ipiv, b, ldb, info); } void arma_fortran_prefix(arma_dgesv)(blas_int* n, blas_int* nrhs, double* a, blas_int* lda, blas_int* ipiv, double* b, blas_int* ldb, blas_int* info) { arma_fortran_noprefix(arma_dgesv)(n, nrhs, a, lda, ipiv, b, ldb, info); } void arma_fortran_prefix(arma_cgesv)(blas_int* n, blas_int* nrhs, void* a, blas_int* lda, blas_int* ipiv, void* b, blas_int* ldb, blas_int* info) { arma_fortran_noprefix(arma_cgesv)(n, nrhs, a, lda, ipiv, b, ldb, info); } void arma_fortran_prefix(arma_zgesv)(blas_int* n, blas_int* nrhs, void* a, blas_int* lda, blas_int* ipiv, void* b, blas_int* ldb, blas_int* info) { arma_fortran_noprefix(arma_zgesv)(n, nrhs, a, lda, ipiv, b, ldb, info); } void arma_fortran_prefix(arma_sgels)(char* trans, blas_int* m, blas_int* n, blas_int* nrhs, float* a, blas_int* lda, float* b, blas_int* ldb, float* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_sgels)(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info); } void arma_fortran_prefix(arma_dgels)(char* trans, blas_int* m, blas_int* n, blas_int* nrhs, double* a, blas_int* lda, double* b, blas_int* ldb, double* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_dgels)(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info); } void arma_fortran_prefix(arma_cgels)(char* trans, blas_int* m, blas_int* n, blas_int* nrhs, void* a, blas_int* lda, void* b, blas_int* ldb, void* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_cgels)(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info); } void arma_fortran_prefix(arma_zgels)(char* trans, blas_int* m, blas_int* n, blas_int* nrhs, void* a, blas_int* lda, void* b, blas_int* ldb, void* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_zgels)(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info); } void arma_fortran_prefix(arma_strtrs)(char* uplo, char* trans, char* diag, blas_int* n, blas_int* nrhs, const float* a, blas_int* lda, float* b, blas_int* ldb, blas_int* info) { arma_fortran_noprefix(arma_strtrs)(uplo, trans, diag, n, nrhs, a, lda, b, ldb, info); } void arma_fortran_prefix(arma_dtrtrs)(char* uplo, char* trans, char* diag, blas_int* n, blas_int* nrhs, const double* a, blas_int* lda, double* b, blas_int* ldb, blas_int* info) { arma_fortran_noprefix(arma_dtrtrs)(uplo, trans, diag, n, nrhs, a, lda, b, ldb, info); } void arma_fortran_prefix(arma_ctrtrs)(char* uplo, char* trans, char* diag, blas_int* n, blas_int* nrhs, const void* a, blas_int* lda, void* b, blas_int* ldb, blas_int* info) { arma_fortran_noprefix(arma_ctrtrs)(uplo, trans, diag, n, nrhs, a, lda, b, ldb, info); } void arma_fortran_prefix(arma_ztrtrs)(char* uplo, char* trans, char* diag, blas_int* n, blas_int* nrhs, const void* a, blas_int* lda, void* b, blas_int* ldb, blas_int* info) { arma_fortran_noprefix(arma_ztrtrs)(uplo, trans, diag, n, nrhs, a, lda, b, ldb, info); } void arma_fortran_prefix(arma_sgees)(char* jobvs, char* sort, blas_int* select, blas_int* n, float* a, blas_int* lda, blas_int* sdim, float* wr, float* wi, float* vs, blas_int* ldvs, float* work, blas_int* lwork, blas_int* bwork, blas_int* info) { arma_fortran_noprefix(arma_sgees)(jobvs, sort, select, n, a, lda, sdim, wr, wi, vs, ldvs, work, lwork, bwork, info); } void arma_fortran_prefix(arma_dgees)(char* jobvs, char* sort, blas_int* select, blas_int* n, double* a, blas_int* lda, blas_int* sdim, double* wr, double* wi, double* vs, blas_int* ldvs, double* work, blas_int* lwork, blas_int* bwork, blas_int* info) { arma_fortran_noprefix(arma_dgees)(jobvs, sort, select, n, a, lda, sdim, wr, wi, vs, ldvs, work, lwork, bwork, info); } void arma_fortran_prefix(arma_cgees)(char* jobvs, char* sort, blas_int* select, blas_int* n, void* a, blas_int* lda, blas_int* sdim, void* w, void* vs, blas_int* ldvs, void* work, blas_int* lwork, float* rwork, blas_int* bwork, blas_int* info) { arma_fortran_noprefix(arma_cgees)(jobvs, sort, select, n, a, lda, sdim, w, vs, ldvs, work, lwork, rwork, bwork, info); } void arma_fortran_prefix(arma_zgees)(char* jobvs, char* sort, blas_int* select, blas_int* n, void* a, blas_int* lda, blas_int* sdim, void* w, void* vs, blas_int* ldvs, void* work, blas_int* lwork, double* rwork, blas_int* bwork, blas_int* info) { arma_fortran_noprefix(arma_zgees)(jobvs, sort, select, n, a, lda, sdim, w, vs, ldvs, work, lwork, rwork, bwork, info); } void arma_fortran_prefix(arma_strsyl)(char* transa, char* transb, blas_int* isgn, blas_int* m, blas_int* n, const float* a, blas_int* lda, const float* b, blas_int* ldb, float* c, blas_int* ldc, float* scale, blas_int* info) { arma_fortran_noprefix(arma_strsyl)(transa, transb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info); } void arma_fortran_prefix(arma_dtrsyl)(char* transa, char* transb, blas_int* isgn, blas_int* m, blas_int* n, const double* a, blas_int* lda, const double* b, blas_int* ldb, double* c, blas_int* ldc, double* scale, blas_int* info) { arma_fortran_noprefix(arma_dtrsyl)(transa, transb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info); } void arma_fortran_prefix(arma_ctrsyl)(char* transa, char* transb, blas_int* isgn, blas_int* m, blas_int* n, const void* a, blas_int* lda, const void* b, blas_int* ldb, void* c, blas_int* ldc, float* scale, blas_int* info) { arma_fortran_noprefix(arma_ctrsyl)(transa, transb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info); } void arma_fortran_prefix(arma_ztrsyl)(char* transa, char* transb, blas_int* isgn, blas_int* m, blas_int* n, const void* a, blas_int* lda, const void* b, blas_int* ldb, void* c, blas_int* ldc, double* scale, blas_int* info) { arma_fortran_noprefix(arma_ztrsyl)(transa, transb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info); } void arma_fortran_prefix(arma_ssytrf)(char* uplo, blas_int* n, float* a, blas_int* lda, blas_int* ipiv, float* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_ssytrf)(uplo, n, a, lda, ipiv, work, lwork, info); } void arma_fortran_prefix(arma_dsytrf)(char* uplo, blas_int* n, double* a, blas_int* lda, blas_int* ipiv, double* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_dsytrf)(uplo, n, a, lda, ipiv, work, lwork, info); } void arma_fortran_prefix(arma_csytrf)(char* uplo, blas_int* n, void* a, blas_int* lda, blas_int* ipiv, void* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_csytrf)(uplo, n, a, lda, ipiv, work, lwork, info); } void arma_fortran_prefix(arma_zsytrf)(char* uplo, blas_int* n, void* a, blas_int* lda, blas_int* ipiv, void* work, blas_int* lwork, blas_int* info) { arma_fortran_noprefix(arma_zsytrf)(uplo, n, a, lda, ipiv, work, lwork, info); } void arma_fortran_prefix(arma_ssytri)(char* uplo, blas_int* n, float* a, blas_int* lda, blas_int* ipiv, float* work, blas_int* info) { arma_fortran_noprefix(arma_ssytri)(uplo, n, a, lda, ipiv, work, info); } void arma_fortran_prefix(arma_dsytri)(char* uplo, blas_int* n, double* a, blas_int* lda, blas_int* ipiv, double* work, blas_int* info) { arma_fortran_noprefix(arma_dsytri)(uplo, n, a, lda, ipiv, work, info); } void arma_fortran_prefix(arma_csytri)(char* uplo, blas_int* n, void* a, blas_int* lda, blas_int* ipiv, void* work, blas_int* info) { arma_fortran_noprefix(arma_csytri)(uplo, n, a, lda, ipiv, work, info); } void arma_fortran_prefix(arma_zsytri)(char* uplo, blas_int* n, void* a, blas_int* lda, blas_int* ipiv, void* work, blas_int* info) { arma_fortran_noprefix(arma_zsytri)(uplo, n, a, lda, ipiv, work, info); } void arma_fortran_prefix(arma_sgges)(char* jobvsl, char* jobvsr, char* sort, char* selctg, blas_int* n, float* a, blas_int* lda, float* b, blas_int* ldb, blas_int* sdim, float* alphar, float* alphai, float* beta, float* vsl, blas_int* ldvsl, float* vsr, blas_int* ldvsr, float* work, blas_int* lwork, float* bwork, blas_int* info) { arma_fortran_noprefix(arma_sgges)(jobvsl, jobvsr, sort, selctg, n, a, lda, b, ldb, sdim, alphar, alphai, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, bwork, info); } void arma_fortran_prefix(arma_dgges)(char* jobvsl, char* jobvsr, char* sort, char* selctg, blas_int* n, double* a, blas_int* lda, double* b, blas_int* ldb, blas_int* sdim, double* alphar, double* alphai, double* beta, double* vsl, blas_int* ldvsl, double* vsr, blas_int* ldvsr, double* work, blas_int* lwork, double* bwork, blas_int* info) { arma_fortran_noprefix(arma_dgges)(jobvsl, jobvsr, sort, selctg, n, a, lda, b, ldb, sdim, alphar, alphai, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, bwork, info); } void arma_fortran_prefix(arma_cgges)(char* jobvsl, char* jobvsr, char* sort, char* selctg, blas_int* n, void* a, blas_int* lda, void* b, blas_int* ldb, blas_int* sdim, void* alpha, void* beta, void* vsl, blas_int* ldvsl, void* vsr, blas_int* ldvsr, void* work, blas_int* lwork, float* rwork, float* bwork, blas_int* info) { arma_fortran_noprefix(arma_cgges)(jobvsl, jobvsr, sort, selctg, n, a, lda, b, ldb, sdim, alpha, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, rwork, bwork, info); } void arma_fortran_prefix(arma_zgges)(char* jobvsl, char* jobvsr, char* sort, char* selctg, blas_int* n, void* a, blas_int* lda, void* b, blas_int* ldb, blas_int* sdim, void* alpha, void* beta, void* vsl, blas_int* ldvsl, void* vsr, blas_int* ldvsr, void* work, blas_int* lwork, double* rwork, double* bwork, blas_int* info) { arma_fortran_noprefix(arma_zgges)(jobvsl, jobvsr, sort, selctg, n, a, lda, b, ldb, sdim, alpha, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, rwork, bwork, info); } #endif #if defined(ARMA_USE_ATLAS) float wrapper_cblas_sdot(const int N, const float *X, const int incX, const float *Y, const int incY) { return cblas_sdot(N, X, incX, Y, incY); } double wrapper_cblas_ddot(const int N, const double *X, const int incX, const double *Y, const int incY) { return cblas_ddot(N, X, incX, Y, incY); } void wrapper_cblas_cdotu_sub(const int N, const void *X, const int incX, const void *Y, const int incY, void *dotu) { cblas_cdotu_sub(N, X, incX, Y, incY, dotu); } void wrapper_cblas_zdotu_sub(const int N, const void *X, const int incX, const void *Y, const int incY, void *dotu) { cblas_zdotu_sub(N, X, incX, Y, incY, dotu); } void wrapper_cblas_sgemv(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const float alpha, const float *A, const int lda, const float *X, const int incX, const float beta, float *Y, const int incY) { cblas_sgemv(Order, TransA, M, N, alpha, A, lda, X, incX, beta, Y, incY); } void wrapper_cblas_dgemv(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const double alpha, const double *A, const int lda, const double *X, const int incX, const double beta, double *Y, const int incY) { cblas_dgemv(Order, TransA, M, N, alpha, A, lda, X, incX, beta, Y, incY); } void wrapper_cblas_cgemv(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const void *alpha, const void *A, const int lda, const void *X, const int incX, const void *beta, void *Y, const int incY) { cblas_cgemv(Order, TransA, M, N, alpha, A, lda, X, incX, beta, Y, incY); } void wrapper_cblas_zgemv(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const void *alpha, const void *A, const int lda, const void *X, const int incX, const void *beta, void *Y, const int incY) { cblas_zgemv(Order, TransA, M, N, alpha, A, lda, X, incX, beta, Y, incY); } void wrapper_cblas_sgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const float alpha, const float *A, const int lda, const float *B, const int ldb, const float beta, float *C, const int ldc) { cblas_sgemm(Order, TransA, TransB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); } void wrapper_cblas_dgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const double alpha, const double *A, const int lda, const double *B, const int ldb, const double beta, double *C, const int ldc) { cblas_dgemm(Order, TransA, TransB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); } void wrapper_cblas_cgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc) { cblas_cgemm(Order, TransA, TransB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); } void wrapper_cblas_zgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc) { cblas_zgemm(Order, TransA, TransB, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc); } void wrapper_cblas_ssyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const float alpha, const float *A, const int lda, const float beta, float *C, const int ldc) { cblas_ssyrk(Order, Uplo, Trans, N, K, alpha, A, lda, beta, C, ldc); } void wrapper_cblas_dsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const double alpha, const double *A, const int lda, const double beta, double *C, const int ldc) { cblas_dsyrk(Order, Uplo, Trans, N, K, alpha, A, lda, beta, C, ldc); } void wrapper_cblas_cherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const float alpha, const void *A, const int lda, const float beta, void *C, const int ldc) { cblas_cherk(Order, Uplo, Trans, N, K, alpha, A, lda, beta, C, ldc); } void wrapper_cblas_zherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const double alpha, const void *A, const int lda, const double beta, void *C, const int ldc) { cblas_zherk(Order, Uplo, Trans, N, K, alpha, A, lda, beta, C, ldc); } int wrapper_clapack_sgetrf(const enum CBLAS_ORDER Order, const int M, const int N, float *A, const int lda, int *ipiv) { return clapack_sgetrf(Order, M, N, A, lda, ipiv); } int wrapper_clapack_dgetrf(const enum CBLAS_ORDER Order, const int M, const int N, double *A, const int lda, int *ipiv) { return clapack_dgetrf(Order, M, N, A, lda, ipiv); } int wrapper_clapack_cgetrf(const enum CBLAS_ORDER Order, const int M, const int N, void *A, const int lda, int *ipiv) { return clapack_cgetrf(Order, M, N, A, lda, ipiv); } int wrapper_clapack_zgetrf(const enum CBLAS_ORDER Order, const int M, const int N, void *A, const int lda, int *ipiv) { return clapack_zgetrf(Order, M, N, A, lda, ipiv); } int wrapper_clapack_sgetri(const enum CBLAS_ORDER Order, const int N, float *A, const int lda, const int *ipiv) { return clapack_sgetri(Order, N, A, lda, ipiv); } int wrapper_clapack_dgetri(const enum CBLAS_ORDER Order, const int N, double *A, const int lda, const int *ipiv) { return clapack_dgetri(Order, N, A, lda, ipiv); } int wrapper_clapack_cgetri(const enum CBLAS_ORDER Order, const int N, void *A, const int lda, const int *ipiv) { return clapack_cgetri(Order, N, A, lda, ipiv); } int wrapper_clapack_zgetri(const enum CBLAS_ORDER Order, const int N, void *A, const int lda, const int *ipiv) { return clapack_zgetri(Order, N, A, lda, ipiv); } int wrapper_clapack_sgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS, float *A, const int lda, int *ipiv, float *B, const int ldb) { return clapack_sgesv(Order, N, NRHS, A, lda, ipiv, B, ldb); } int wrapper_clapack_dgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS, double *A, const int lda, int *ipiv, double *B, const int ldb) { return clapack_dgesv(Order, N, NRHS, A, lda, ipiv, B, ldb); } int wrapper_clapack_cgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS, void *A, const int lda, int *ipiv, void *B, const int ldb) { return clapack_cgesv(Order, N, NRHS, A, lda, ipiv, B, ldb); } int wrapper_clapack_zgesv(const enum CBLAS_ORDER Order, const int N, const int NRHS, void *A, const int lda, int *ipiv, void *B, const int ldb) { return clapack_zgesv(Order, N, NRHS, A, lda, ipiv, B, ldb); } #endif #if defined(ARMA_USE_ARPACK) void arma_fortran_prefix(arma_snaupd)(blas_int* ido, char* bmat, blas_int* n, char* which, blas_int* nev, float* tol, float* resid, blas_int* ncv, float* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, float* workd, float* workl, blas_int* lworkl, blas_int* info) { arma_fortran_noprefix(arma_snaupd)(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, info); } void arma_fortran_prefix(arma_dnaupd)(blas_int* ido, char* bmat, blas_int* n, char* which, blas_int* nev, double* tol, double* resid, blas_int* ncv, double* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, double* workd, double* workl, blas_int* lworkl, blas_int* info) { arma_fortran_noprefix(arma_dnaupd)(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, info); } void arma_fortran_prefix(arma_cnaupd)(blas_int* ido, char* bmat, blas_int* n, char* which, blas_int* nev, float* tol, void* resid, blas_int* ncv, void* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, void* workd, void* workl, blas_int* lworkl, float* rwork, blas_int* info) { arma_fortran_noprefix(arma_cnaupd)(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, rwork, info); } void arma_fortran_prefix(arma_znaupd)(blas_int* ido, char* bmat, blas_int* n, char* which, blas_int* nev, double* tol, void* resid, blas_int* ncv, void* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, void* workd, void* workl, blas_int* lworkl, double* rwork, blas_int* info) { arma_fortran_noprefix(arma_znaupd)(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, rwork, info); } void arma_fortran_prefix(arma_sneupd)(blas_int* rvec, char* howmny, blas_int* select, float* dr, float* di, float* z, blas_int* ldz, float* sigmar, float* sigmai, float* workev, char* bmat, blas_int* n, char* which, blas_int* nev, float* tol, float* resid, blas_int* ncv, float* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, float* workd, float* workl, blas_int* lworkl, blas_int* info) { arma_fortran_noprefix(arma_sneupd)(rvec, howmny, select, dr, di, z, ldz, sigmar, sigmai, workev, bmat, n, which, nev, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, info); } void arma_fortran_prefix(arma_dneupd)(blas_int* rvec, char* howmny, blas_int* select, double* dr, double* di, double* z, blas_int* ldz, double* sigmar, double* sigmai, double* workev, char* bmat, blas_int* n, char* which, blas_int* nev, double* tol, double* resid, blas_int* ncv, double* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, double* workd, double* workl, blas_int* lworkl, blas_int* info) { arma_fortran_noprefix(arma_dneupd)(rvec, howmny, select, dr, di, z, ldz, sigmar, sigmai, workev, bmat, n, which, nev, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, info); } void arma_fortran_prefix(arma_cneupd)(blas_int* rvec, char* howmny, blas_int* select, void* d, void* z, blas_int* ldz, void* sigma, void* workev, char* bmat, blas_int* n, char* which, blas_int* nev, float* tol, void* resid, blas_int* ncv, void* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, void* workd, void* workl, blas_int* lworkl, float* rwork, blas_int* info) { arma_fortran_noprefix(arma_cneupd)(rvec, howmny, select, d, z, ldz, sigma, workev, bmat, n, which, nev, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, rwork, info); } void arma_fortran_prefix(arma_zneupd)(blas_int* rvec, char* howmny, blas_int* select, void* d, void* z, blas_int* ldz, void* sigma, void* workev, char* bmat, blas_int* n, char* which, blas_int* nev, double* tol, void* resid, blas_int* ncv, void* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, void* workd, void* workl, blas_int* lworkl, double* rwork, blas_int* info) { arma_fortran_noprefix(arma_zneupd)(rvec, howmny, select, d, z, ldz, sigma, workev, bmat, n, which, nev, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, rwork, info); } void arma_fortran_prefix(arma_ssaupd)(blas_int* ido, char* bmat, blas_int* n, char* which, blas_int* nev, float* tol, float* resid, blas_int* ncv, float* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, float* workd, float* workl, blas_int* lworkl, blas_int* info) { arma_fortran_noprefix(arma_ssaupd)(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, info); } void arma_fortran_prefix(arma_dsaupd)(blas_int* ido, char* bmat, blas_int* n, char* which, blas_int* nev, double* tol, double* resid, blas_int* ncv, double* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, double* workd, double* workl, blas_int* lworkl, blas_int* info) { arma_fortran_noprefix(arma_dsaupd)(ido, bmat, n, which, nev, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, info); } void arma_fortran_prefix(arma_sseupd)(blas_int* rvec, char* howmny, blas_int* select, float* d, float* z, blas_int* ldz, float* sigma, char* bmat, blas_int* n, char* which, blas_int* nev, float* tol, float* resid, blas_int* ncv, float* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, float* workd, float* workl, blas_int* lworkl, blas_int* info) { arma_fortran_noprefix(arma_sseupd)(rvec, howmny, select, d, z, ldz, sigma, bmat, n, which, nev, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, info); } void arma_fortran_prefix(arma_dseupd)(blas_int* rvec, char* howmny, blas_int* select, double* d, double* z, blas_int* ldz, double* sigma, char* bmat, blas_int* n, char* which, blas_int* nev, double* tol, double* resid, blas_int* ncv, double* v, blas_int* ldv, blas_int* iparam, blas_int* ipntr, double* workd, double* workl, blas_int* lworkl, blas_int* info) { arma_fortran_noprefix(arma_dseupd)(rvec, howmny, select, d, z, ldz, sigma, bmat, n, which, nev, tol, resid, ncv, v, ldv, iparam, ipntr, workd, workl, lworkl, info); } #endif #if defined(ARMA_USE_SUPERLU) void wrapper_sgssv(superlu::superlu_options_t* a, superlu::SuperMatrix* b, int* c, int* d, superlu::SuperMatrix* e, superlu::SuperMatrix* f, superlu::SuperMatrix* g, superlu::SuperLUStat_t* h, int* i) { sgssv(a,b,c,d,e,f,g,h,i); } void wrapper_dgssv(superlu::superlu_options_t* a, superlu::SuperMatrix* b, int* c, int* d, superlu::SuperMatrix* e, superlu::SuperMatrix* f, superlu::SuperMatrix* g, superlu::SuperLUStat_t* h, int* i) { dgssv(a,b,c,d,e,f,g,h,i); } void wrapper_cgssv(superlu::superlu_options_t* a, superlu::SuperMatrix* b, int* c, int* d, superlu::SuperMatrix* e, superlu::SuperMatrix* f, superlu::SuperMatrix* g, superlu::SuperLUStat_t* h, int* i) { cgssv(a,b,c,d,e,f,g,h,i); } void wrapper_zgssv(superlu::superlu_options_t* a, superlu::SuperMatrix* b, int* c, int* d, superlu::SuperMatrix* e, superlu::SuperMatrix* f, superlu::SuperMatrix* g, superlu::SuperLUStat_t* h, int* i) { zgssv(a,b,c,d,e,f,g,h,i); } void wrapper_StatInit(superlu::SuperLUStat_t* a) { StatInit(a); } void wrapper_StatFree(superlu::SuperLUStat_t* a) { StatFree(a); } void wrapper_set_default_options(superlu::superlu_options_t* a) { set_default_options(a); } void wrapper_Destroy_SuperNode_Matrix(superlu::SuperMatrix* a) { Destroy_SuperNode_Matrix(a); } void wrapper_Destroy_CompCol_Matrix(superlu::SuperMatrix* a) { Destroy_CompCol_Matrix(a); } void wrapper_Destroy_SuperMatrix_Store(superlu::SuperMatrix* a) { Destroy_SuperMatrix_Store(a); } void* wrapper_superlu_malloc(size_t a) { return superlu_malloc(a); } void wrapper_superlu_free(void* a) { superlu_free(a); } #endif #if defined(ARMA_USE_HDF5_ALT) hid_t arma_H5Tcopy(hid_t dtype_id) { return H5Tcopy(dtype_id); } hid_t arma_H5Tcreate(H5T_class_t cl, size_t size) { return H5Tcreate(cl, size); } herr_t arma_H5Tinsert(hid_t dtype_id, const char* name, size_t offset, hid_t field_id) { return H5Tinsert(dtype_id, name, offset, field_id); } htri_t arma_H5Tequal(hid_t dtype_id1, hid_t dtype_id2) { return H5Tequal(dtype_id1, dtype_id2); } herr_t arma_H5Tclose(hid_t dtype_id) { return H5Tclose(dtype_id); } hid_t arma_H5Dopen(hid_t loc_id, const char* name, hid_t dapl_id) { return H5Dopen(loc_id, name, dapl_id); } hid_t arma_H5Dget_type(hid_t dataset_id) { return H5Dget_type(dataset_id); } hid_t arma_H5Dcreate(hid_t loc_id, const char* name, hid_t dtype_id, hid_t space_id, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id) { return H5Dcreate(loc_id, name, dtype_id, space_id, lcpl_id, dcpl_id, dapl_id); } herr_t arma_H5Dwrite(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t xfer_plist_id, const void* buf) { return H5Dwrite(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf); } herr_t arma_H5Dclose(hid_t dataset_id) { return H5Dclose(dataset_id); } hid_t arma_H5Dget_space(hid_t dataset_id) { return H5Dget_space(dataset_id); } herr_t arma_H5Dread(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t xfer_plist_id, void* buf) { return H5Dread(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, buf); } int arma_H5Sget_simple_extent_ndims(hid_t space_id) { return H5Sget_simple_extent_ndims(space_id); } int arma_H5Sget_simple_extent_dims(hid_t space_id, hsize_t* dims, hsize_t* maxdims) { return H5Sget_simple_extent_dims(space_id, dims, maxdims); } herr_t arma_H5Sclose(hid_t space_id) { return H5Sclose(space_id); } hid_t arma_H5Screate_simple(int rank, const hsize_t* current_dims, const hsize_t* maximum_dims) { return H5Screate_simple(rank, current_dims, maximum_dims); } herr_t arma_H5Ovisit(hid_t object_id, H5_index_t index_type, H5_iter_order_t order, H5O_iterate_t op, void* op_data) { return H5Ovisit(object_id, index_type, order, op, op_data); } herr_t arma_H5Eset_auto(hid_t estack_id, H5E_auto_t func, void* client_data) { return H5Eset_auto(estack_id, func, client_data); } herr_t arma_H5Eget_auto(hid_t estack_id, H5E_auto_t* func, void** client_data) { return H5Eget_auto(estack_id, func, client_data); } hid_t arma_H5Fopen(const char* name, unsigned flags, hid_t fapl_id) { return H5Fopen(name, flags, fapl_id); } hid_t arma_H5Fcreate(const char* name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) { return H5Fcreate(name, flags, fcpl_id, fapl_id); } herr_t arma_H5Fclose(hid_t file_id) { return H5Fclose(file_id); } htri_t arma_H5Fis_hdf5(const char* name) { return H5Fis_hdf5(name); } // H5T_NATIVE_* types. The rhs here expands to some macros. hid_t arma_H5T_NATIVE_UCHAR = H5T_NATIVE_UCHAR; hid_t arma_H5T_NATIVE_CHAR = H5T_NATIVE_CHAR; hid_t arma_H5T_NATIVE_SHORT = H5T_NATIVE_SHORT; hid_t arma_H5T_NATIVE_USHORT = H5T_NATIVE_USHORT; hid_t arma_H5T_NATIVE_INT = H5T_NATIVE_INT; hid_t arma_H5T_NATIVE_UINT = H5T_NATIVE_UINT; hid_t arma_H5T_NATIVE_LONG = H5T_NATIVE_LONG; hid_t arma_H5T_NATIVE_ULONG = H5T_NATIVE_ULONG; hid_t arma_H5T_NATIVE_LLONG = H5T_NATIVE_LLONG; hid_t arma_H5T_NATIVE_ULLONG = H5T_NATIVE_ULLONG; hid_t arma_H5T_NATIVE_FLOAT = H5T_NATIVE_FLOAT; hid_t arma_H5T_NATIVE_DOUBLE = H5T_NATIVE_DOUBLE; #endif } // end of extern "C" } // end of namespace arma ================================================ FILE: OptolithiumC/libs/armanpy/example/CMakeLists.txt ================================================ # cmake -G "MSYS Makefiles" # -DCMAKE_BUILD_TYPE=Release # -DARMADILLO_INCLUDE_DIR=d:\Gladkikh\Python\Lithography\ThirdParty\armadillo\include\ # -DARMANPY_INCLUDE_DIR=d:\Gladkikh\temp\armanpy-0.1.3\include\ # CMakeLists.txt # cmake --build . --config Release SET( CMAKE_CXX_FLAGS "-D__NO_MINGW_LFS -include cmath -std=c++11 ${CMAKE_CXX_FLAGS}" ) cmake_minimum_required(VERSION 3.0) SET( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} ) SET( THIRDPARTY_DIR "d:/Gladkikh/Python/Lithography/ThirdParty/" ) SET( ARMADILLO_INCLUDE_DIR "${THIRDPARTY_DIR}/armadillo/include/" ) SET( ARMANPY_INCLUDE_DIR "${THIRDPARTY_DIR}/armanpy/include" ) FIND_PACKAGE(SWIG REQUIRED) FIND_PACKAGE(PythonLibs REQUIRED) FIND_PACKAGE(NumPy REQUIRED) INCLUDE(${SWIG_USE_FILE}) INCLUDE_DIRECTORIES("${PYTHON_INCLUDE_DIR}") INCLUDE_DIRECTORIES("${ARMADILLO_INCLUDE_DIR}") INCLUDE_DIRECTORIES("${ARMANPY_INCLUDE_DIR}") INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}") INCLUDE_DIRECTORIES("${NUMPY_INCLUDE_DIRS}") # INCLUDE_DIRECTORIES("C:\\Python27\\lib\\site-packages\\numpy\\core\\include") # build the example library add_library( examplelib SHARED example.cpp example.hpp ) ## ## Set up the swig wrapper ## # Swig shall but all stuff to the same directory where the *.so or *.pyd are placed SET( CMAKE_SWIG_OUTDIR "${PROJECT_BINARY_DIR}/bin" ) # We need to say that we deal with C++ and do not care about missing include files and declarations set_source_files_properties( example.i PROPERTIES CPLUSPLUS ON) set_source_files_properties( example.i PROPERTIES SWIG_FLAGS "-ignoremissing;-w509" ) SWIG_ADD_MODULE ( armanpyexample python example.i ) SWIG_LINK_LIBRARIES( armanpyexample examplelib ${PYTHON_LIBRARIES} ) configure_file( example.py "${CMAKE_SWIG_OUTDIR}/example.py" COPYONLY ) add_test( NAME example COMMAND ${PYTHON_EXECUTABLE} example.py WORKING_DIRECTORY ${CMAKE_SWIG_OUTDIR} ) ================================================ FILE: OptolithiumC/libs/armanpy/example/FindNumPy.cmake ================================================ # - Find the NumPy libraries # This module finds if NumPy is installed, and sets the following variables # indicating where it is. # # TODO: Update to provide the libraries and paths for linking npymath lib. # # NUMPY_FOUND - was NumPy found # NUMPY_VERSION - the version of NumPy found as a string # NUMPY_VERSION_MAJOR - the major version number of NumPy # NUMPY_VERSION_MINOR - the minor version number of NumPy # NUMPY_VERSION_PATCH - the patch version number of NumPy # NUMPY_VERSION_DECIMAL - e.g. version 1.6.1 is 10601 # NUMPY_INCLUDE_DIRS - path to the NumPy include files #============================================================================ # Copyright 2012 Continuum Analytics, Inc. # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. # #============================================================================ # Finding NumPy involves calling the Python interpreter if(NumPy_FIND_REQUIRED) find_package(PythonInterp REQUIRED) else() find_package(PythonInterp) endif() if(NOT PYTHONINTERP_FOUND) set(NUMPY_FOUND FALSE) return() endif() execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import numpy as n; print(n.__version__); print(n.get_include());" RESULT_VARIABLE _NUMPY_SEARCH_SUCCESS OUTPUT_VARIABLE _NUMPY_VALUES_OUTPUT ERROR_VARIABLE _NUMPY_ERROR_VALUE OUTPUT_STRIP_TRAILING_WHITESPACE) if(NOT _NUMPY_SEARCH_SUCCESS MATCHES 0) if(NumPy_FIND_REQUIRED) message(FATAL_ERROR "NumPy import failure:\n${_NUMPY_ERROR_VALUE}") endif() set(NUMPY_FOUND FALSE) return() endif() # Convert the process output into a list string(REGEX REPLACE ";" "\\\\;" _NUMPY_VALUES ${_NUMPY_VALUES_OUTPUT}) string(REGEX REPLACE "\n" ";" _NUMPY_VALUES ${_NUMPY_VALUES}) # Just in case there is unexpected output from the Python command. list(GET _NUMPY_VALUES -2 NUMPY_VERSION) list(GET _NUMPY_VALUES -1 NUMPY_INCLUDE_DIRS) string(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" _VER_CHECK "${NUMPY_VERSION}") if("${_VER_CHECK}" STREQUAL "") # The output from Python was unexpected. Raise an error always # here, because we found NumPy, but it appears to be corrupted somehow. message(FATAL_ERROR "Requested version and include path from NumPy, got instead:\n${_NUMPY_VALUES_OUTPUT}\n") return() endif() # Make sure all directory separators are '/' string(REGEX REPLACE "\\\\" "/" NUMPY_INCLUDE_DIRS ${NUMPY_INCLUDE_DIRS}) # Get the major and minor version numbers string(REGEX REPLACE "\\." ";" _NUMPY_VERSION_LIST ${NUMPY_VERSION}) list(GET _NUMPY_VERSION_LIST 0 NUMPY_VERSION_MAJOR) list(GET _NUMPY_VERSION_LIST 1 NUMPY_VERSION_MINOR) list(GET _NUMPY_VERSION_LIST 2 NUMPY_VERSION_PATCH) string(REGEX MATCH "[0-9]*" NUMPY_VERSION_PATCH ${NUMPY_VERSION_PATCH}) math(EXPR NUMPY_VERSION_DECIMAL "(${NUMPY_VERSION_MAJOR} * 10000) + (${NUMPY_VERSION_MINOR} * 100) + ${NUMPY_VERSION_PATCH}") find_package_message(NUMPY "Found NumPy: version \"${NUMPY_VERSION}\" ${NUMPY_INCLUDE_DIRS}" "${NUMPY_INCLUDE_DIRS}${NUMPY_VERSION}") set(NUMPY_FOUND TRUE) ================================================ FILE: OptolithiumC/libs/armanpy/example/example.cpp ================================================ // Copyright (C) 2012 thomas.natschlaeger@gmail.com // // This file is part of the ArmaNpy library. // It is provided without any warranty of fitness // for any purpose. You can redistribute this file // and/or modify it under the terms of the GNU // Lesser General Public License (LGPL) as published // by the Free Software Foundation, either version 3 // of the License or (at your option) any later version. // (see http://www.opensource.org/licenses for more info) #include "example.hpp" ================================================ FILE: OptolithiumC/libs/armanpy/example/example.hpp ================================================ // Copyright (C) 2012 thomas.natschlaeger@gmail.com // // This file is part of the ArmaNpy library. // It is provided without any warranty of fitness // for any purpose. You can redistribute this file // and/or modify it under the terms of the GNU // Lesser General Public License (LGPL) as published // by the Free Software Foundation, either version 3 // of the License or (at your option) any later version. // (see http://www.opensource.org/licenses for more info) #ifndef _EXAMPLE_HPP_ #define _EXAMPLE_HPP_ /* Cmake will define ${LIBRARY_NAME}_EXPORTS on Windows when it configures to build a shared library. If you are going to use another build system on windows or create the visual studio projects by hand you need to define ${LIBRARY_NAME}_EXPORTS when building a DLL on windows. */ // We are using the Visual Studio Compiler and building Shared libraries #if defined (_WIN32) #if defined(examplelib_EXPORTS) #define DLLEXPORT __declspec(dllexport) #else #define DLLEXPORT __declspec(dllimport) #endif #else #define DLLEXPORT #endif #if !defined( SWIG ) // SWIG should not see #inlcude as it can not handle it #include //#include #endif #pragma warning(disable:4251) class DLLEXPORT Example { public: Example( int sz ) { m.randn(sz, sz); }; arma::cx_mat get(void) { return m; }; // boost::shared_ptr< arma::cx_mat > get_sptr(void) { // boost::shared_ptr< arma::cx_mat > p( new arma::cx_mat( m ) ); // return p; // }; void set( const arma::cx_mat& m ) { this->m = m; }; void rnd( unsigned s) { this->m.randn(s,s); }; void modify( arma::cx_mat& A, unsigned r, unsigned c ) { A.resize( r, c ); A.randn( r, c ); for( unsigned i=0; i /* Now include ArmaNpy typemaps */ %include "armanpy.i" /* Some minimal excpetion handling */ %exception { try { $action } catch( char * str ) { PyErr_SetString( PyExc_IndexError, str ); SWIG_fail; } } /* Parse the header file to generate wrappers */ %include "example.hpp" ================================================ FILE: OptolithiumC/libs/armanpy/example/example.py ================================================ # Copyright (C) 2012 thomas.natschlaeger@gmail.com # # This file is part of the ArmaNpy library. # It is provided without any warranty of fitness # for any purpose. You can redistribute this file # and/or modify it under the terms of the GNU # Lesser General Public License (LGPL) as published # by the Free Software Foundation, either version 3 # of the License or (at your option) any later version. # (see http://www.opensource.org/licenses for more info) import os, sys, warnings import numpy as N sys.path.append( "./build/bin" ) from armanpyexample import * def example_usage(): # New instance of class using arma::mat ex = Example( 5 ) # return values with and without boost:shared_ptr m1 = ex.get() print m1 m2 = ex.get_sptr() print N.all( N.all( m1 == m2 ) ) # Input arguments must have FORTRAN odering: i.e. order="F" ex.set( N.array( [ [1.,2.,3.], [4.,5.,0.6] ], order="F" ) ) print ex.get() # The following would cause an exception # ex.set_m( N.array( [ [1.,2.,3.], [4.,5.,.6] ], order="C" ) ) # --> TypeError: Array must be FORTRAN contiguous. A non-FORTRAN-contiguous array was given. # In the following the size and content of a matrix is modified m = N.array( [ [1.,2.,3.], [4.,5.,0.6] ], order="F" ) ex.modify( m, 9, 9 ) print m # Note that after the matrix was modifed by this function it does not # own its memory. So one can e.g. not resize it # m.resize( 81, 1 ) ---> ValueError: cannot resize this array: it does not own its data # But it is easy to copy it and work with it m = N.array( m ) m.resize(81,1) print m.shape if __name__ == '__main__': example_usage() ================================================ FILE: OptolithiumC/libs/armanpy/include/armanpy.hpp ================================================ // Copyright (C) 2012 thomas.natschlaeger@gmail.com // // This file is part of the ArmaNpy library. // It is provided without any warranty of fitness // for any purpose. You can redistribute this file // and/or modify it under the terms of the GNU // Lesser General Public License (LGPL) as published // by the Free Software Foundation, either version 3 // of the License or (at your option) any later version. // (see http://www.opensource.org/licenses for more info) /////////////////////////////////////////////////////////////////////////////// // Define types (templated) to allow wrapping of armadillo types as Python // objects such that they can be used as base objects of numpy arrays // #define INIT_ARMA_CAPSULE( MatT ) \ ArmaCapsulePyType< MatT >::object.tp_new = PyType_GenericNew; \ if (PyType_Ready(&ArmaCapsulePyType< MatT >::object) < 0) return; template< typename MatT > struct ArmaCapsule { PyObject_HEAD MatT *mat; } ; template< typename MatT > static void ArmaMat_dealloc( PyObject *self ) { //std::cerr << "ArmaMat_dealloc( " << self << " )"<< std::endl; //((ArmaMat_Capsule *)self)->mat->print("mat"); delete ((ArmaCapsule *)self)->mat; self->ob_type->tp_free( self ); }; template class ArmaCapsulePyType { public: static PyTypeObject object; private: MatT _dummy; }; template< typename MatT > PyTypeObject ArmaCapsulePyType::object = { \ PyObject_HEAD_INIT(NULL) \ 0, /*ob_size*/ \ "ArmaCapsule", /*tp_name*/ \ sizeof( ArmaCapsule< MatT > ), /*tp_basicsize*/ \ 0, /*tp_itemsize*/ \ ArmaMat_dealloc< MatT >, /*tp_dealloc*/ \ 0, /*tp_print*/ \ 0, /*tp_getattr*/ \ 0, /*tp_setattr*/ \ 0, /*tp_compare*/ \ 0, /*tp_repr*/ \ 0, /*tp_as_number*/ \ 0, /*tp_as_sequence*/ \ 0, /*tp_as_mapping*/ \ 0, /*tp_hash */ \ 0, /*tp_call*/ \ 0, /*tp_str*/ \ 0, /*tp_getattro*/ \ 0, /*tp_setattro*/ \ 0, /*tp_as_buffer*/ \ Py_TPFLAGS_DEFAULT, /*tp_flags*/ \ "Internal armadillo capsulation object", /* tp_doc */ \ }; /////////////////////////////////////////////////////////////////////////////// // Define types (templated) to allow wrapping of std::shared_ptr< arma::... > // types as Python objects such that they can be used as base objects of numpy // arrays. // This is mainly used for return values of the type std::shared_ptr< arma::... > // #if defined( ARMANPY_SHARED_PTR ) #define INIT_ARMA_BSPTR_CAPSULE( MatT ) \ ArmaBsptrCapsulePyType< MatT >::object.tp_new = PyType_GenericNew; \ if (PyType_Ready(&ArmaBsptrCapsulePyType< MatT >::object) < 0) return; template< typename MatT > struct ArmaBsptrCapsule { PyObject_HEAD std::shared_ptr< MatT > *mat; } ; template< typename MatT > static void ArmaBsptrMat_dealloc( PyObject *self ) { //std::cerr << "ArmaBsptrMat_dealloc( " << self << " )"<< std::endl; //(*(((ArmaBsptrCapsule *)self)->mat))->print("mat"); delete ((ArmaBsptrCapsule *)self)->mat; self->ob_type->tp_free( self ); }; template class ArmaBsptrCapsulePyType { public: static PyTypeObject object; private: MatT _dummy; }; template< typename MatT > PyTypeObject ArmaBsptrCapsulePyType::object = { \ PyObject_HEAD_INIT(NULL) \ 0, /*ob_size*/ \ "ArmaBsptrCapsule", /*tp_name*/ \ sizeof( ArmaBsptrCapsule< MatT > ), /*tp_basicsize*/ \ 0, /*tp_itemsize*/ \ ArmaBsptrMat_dealloc< MatT >, /*tp_dealloc*/ \ 0, /*tp_print*/ \ 0, /*tp_getattr*/ \ 0, /*tp_setattr*/ \ 0, /*tp_compare*/ \ 0, /*tp_repr*/ \ 0, /*tp_as_number*/ \ 0, /*tp_as_sequence*/ \ 0, /*tp_as_mapping*/ \ 0, /*tp_hash */ \ 0, /*tp_call*/ \ 0, /*tp_str*/ \ 0, /*tp_getattro*/ \ 0, /*tp_setattro*/ \ 0, /*tp_as_buffer*/ \ Py_TPFLAGS_DEFAULT, /*tp_flags*/ \ "Internal armadillo capsulation object", /* tp_doc */ \ }; #endif /////////////////////////////////////////////////////////////////////////////// // Define a template NumpyType which associates the element types like double, // float, int, etc. with the accoring numpy enums NPY_DOUBLE, NPY_FLOAT and so // on. // // #include #include template< typename elem_type > struct NumpyType { private: elem_type _d; }; #define ASSOCIATE_NUMPY_TYPE( elem_type, npy ) \ template<> struct NumpyType< elem_type > { static int val; }; \ int NumpyType< elem_type >::val=npy; ASSOCIATE_NUMPY_TYPE( double, NPY_DOUBLE ) ASSOCIATE_NUMPY_TYPE( float, NPY_FLOAT ) ASSOCIATE_NUMPY_TYPE( int, NPY_INT ) ASSOCIATE_NUMPY_TYPE( unsigned, NPY_UINT ) ASSOCIATE_NUMPY_TYPE( unsigned char, NPY_UBYTE ) #if defined(ARMA_64BIT_WORD) ASSOCIATE_NUMPY_TYPE( arma::sword, NPY_INT64 ) ASSOCIATE_NUMPY_TYPE( arma::uword, NPY_UINT64 ) #endif ASSOCIATE_NUMPY_TYPE( std::complex< double >, NPY_COMPLEX128 ) ASSOCIATE_NUMPY_TYPE( std::complex< float >, NPY_COMPLEX64 ) template< typename MatT > struct ArmaTypeInfo { private: MatT _d; }; #define ARMA_TYPE_INFO( MatT, nd ) \ template<> struct ArmaTypeInfo< MatT > { static int type; static int numdim; }; \ int ArmaTypeInfo< MatT >::type=NumpyType< MatT::elem_type >::val; \ int ArmaTypeInfo< MatT >::numdim=nd; ARMA_TYPE_INFO( arma::vec, 1 ) ARMA_TYPE_INFO( arma::fvec, 1 ) ARMA_TYPE_INFO( arma::ivec, 1 ) ARMA_TYPE_INFO( arma::uvec, 1 ) ARMA_TYPE_INFO( arma::uchar_vec, 1 ) #if defined(ARMA_64BIT_WORD) ARMA_TYPE_INFO( arma::u32_vec, 1 ) ARMA_TYPE_INFO( arma::s32_vec, 1 ) #endif ARMA_TYPE_INFO( arma::cx_vec, 1 ) ARMA_TYPE_INFO( arma::cx_fvec, 1 ) ARMA_TYPE_INFO( arma::rowvec, 1 ) ARMA_TYPE_INFO( arma::frowvec, 1 ) ARMA_TYPE_INFO( arma::irowvec, 1 ) ARMA_TYPE_INFO( arma::urowvec, 1 ) ARMA_TYPE_INFO( arma::uchar_rowvec, 1 ) #if defined(ARMA_64BIT_WORD) ARMA_TYPE_INFO( arma::u32_rowvec, 1 ) ARMA_TYPE_INFO( arma::s32_rowvec, 1 ) #endif ARMA_TYPE_INFO( arma::cx_rowvec, 1 ) ARMA_TYPE_INFO( arma::cx_frowvec, 1 ) ARMA_TYPE_INFO( arma::mat, 2 ) ARMA_TYPE_INFO( arma::fmat, 2 ) ARMA_TYPE_INFO( arma::imat, 2 ) ARMA_TYPE_INFO( arma::umat, 2 ) ARMA_TYPE_INFO( arma::uchar_mat, 2 ) #if defined(ARMA_64BIT_WORD) ARMA_TYPE_INFO( arma::u32_mat, 2 ) ARMA_TYPE_INFO( arma::s32_mat, 2 ) #endif ARMA_TYPE_INFO( arma::cx_mat, 2 ) ARMA_TYPE_INFO( arma::cx_fmat, 2 ) ARMA_TYPE_INFO( arma::cube, 3 ) ARMA_TYPE_INFO( arma::fcube, 3 ) ARMA_TYPE_INFO( arma::icube, 3 ) ARMA_TYPE_INFO( arma::ucube, 3 ) ARMA_TYPE_INFO( arma::uchar_cube, 3 ) #if defined(ARMA_64BIT_WORD) ARMA_TYPE_INFO( arma::u32_cube, 3 ) ARMA_TYPE_INFO( arma::s32_cube, 3 ) #endif ARMA_TYPE_INFO( arma::cx_cube, 3 ) ARMA_TYPE_INFO( arma::cx_fcube, 3 ) /////////////////////////////////////////////////////////////////////////////// // Function to modify conversion and warning behaviour. // static bool armanpy_allow_conversion_flag = false; static bool armanpy_warn_on_conversion_flag = true; /* void armanpy_conversion( bool allowed =false, bool warnings = true ) { armanpy_allow_conversion_flag = allowed; armanpy_warn_on_conversion_flag = warnings; }; */ /////////////////////////////////////////////////////////////////////////////// // Code for typechecks, typemaps etc. // //#include "armanpy_1d.hpp" ================================================ FILE: OptolithiumC/libs/armanpy/include/armanpy.i ================================================ // -*- mode: c++; fill-column: 80 -*- // Copyright (C) 2012 thomas.natschlaeger@gmail.com // // This file is part of the ArmaNpy library. // It is provided without any warranty of fitness // for any purpose. You can redistribute this file // and/or modify it under the terms of the GNU // Lesser General Public License (LGPL) as published // by the Free Software Foundation, either version 3 // of the License or (at your option) any later version. // (see http://www.opensource.org/licenses for more info) // Typemaps for converting between armadillo and numpy arrays. // numpy.i is from https://github.com/numpy/numpy/tree/master/doc/swig %include "numpy.i" %fragment("ArmaNumPy_Backward_Compatibility", "header") { %#if NPY_API_VERSION < 0x00000007 %#define NPY_ARRAY_OWNDATA NPY_OWNDATA %#define array_set_base_object(arr, obj) ( PyArray_BASE(arr) = (PyObject *)obj ) %#define array_set_data( arr, mem ) ( ((PyArrayObject*)arr)->data = (char*)mem ) %#define array_clear_flags( arr, flg ) (((PyArrayObject*)arr)->flags) = ( (((PyArrayObject*)arr)->flags) & ~( flg ) ) %#define array_free_data( arr ) PyArray_free( arr ) %#else %#define array_set_base_object(arr, obj) PyArray_SetBaseObject(arr, (PyObject *)obj ) %#define array_set_data( arr, mem ) ( ((PyArrayObject_fields*)arr)->data = (char*)mem ) %#define array_clear_flags( arr, flg ) PyArray_CLEARFLAGS( arr, flg ) %#define array_free_data( arr ) PyArray_free( arr ) %#endif } %fragment( "armanpy_typemaps", "header", fragment="NumPy_Fragments", fragment="ArmaNumPy_Backward_Compatibility" ) { template< typename ArmaT > bool armanpy_basic_typecheck( PyObject* input, bool raise, bool check_own_data = false ) { /***/ if( armanpy_allow_conversion_flag ) { PyErr_SetString( PyExc_TypeError, "Conversion not supported anymore. Please wrap your data using numpy.array( ... ) and call armanpy_conversion( false )." ); return false; } else { const int req_type = ArmaTypeInfo::type; if( ! is_array( input ) ) { const char * required = typecode_string( req_type ); const char * actual = pytype_string( input ); if( raise ) PyErr_Format( PyExc_TypeError, "Array of type '%s' required. A '%s' was given.", required, actual ); return false; } PyArrayObject* array = (PyArrayObject*)input; if( ! PyArray_EquivTypenums( array_type( array ), req_type ) ) { const char * required = typecode_string( req_type ); const char * actual = typecode_string( array_type(array) ); if( raise ) PyErr_Format( PyExc_TypeError, "Array of type '%s' required. Array of type '%s' was given.", required, actual ); return false; } if( ! require_dimensions( array, ArmaTypeInfo::numdim ) ) { if( raise ) PyErr_Format( PyExc_TypeError, "Array with %i dimension required. A %i-dimensional array was given.", ArmaTypeInfo::numdim, array_numdims( array ) ); return false; } if( ArmaTypeInfo::numdim < 2 ) { if( ! ( array_is_fortran(array) || array_is_contiguous(array) ) ) { if( raise ) PyErr_SetString( PyExc_TypeError, "Array must be contiguous. A non-contiguous array was given." ); return false; } } else { if( ! array_is_fortran(array) ) { if( raise ) PyErr_SetString( PyExc_TypeError, "Array must be FORTRAN contiguous. A non-FORTRAN-contiguous array was given." ); return false; } } if( check_own_data && ( ! ( PyArray_FLAGS(array) & NPY_ARRAY_OWNDATA ) ) ) { if( raise ) PyErr_SetString( PyExc_TypeError, "Array must own its data. Please wrap your data using numpy.array( ... )."); return false; } if( sizeof(npy_intp) > sizeof(arma::uword) ) { npy_intp ndim = array_numdims(array); npy_intp *dims = array_dimensions(array); npy_intp max_arma_uword = npy_intp( std::numeric_limits< arma::uword >::max() ); // As there are more byte for npy_intp this is no problem for( npy_intp i=0; i < ndim; i++ ) { if( dims[i] > max_arma_uword ) { if( raise ) PyErr_Format( PyExc_TypeError, "Dimension %li of array to large (%li). Only %li elements per dimension supported.", i, dims[i], max_arma_uword ); return false; }; } } return true; } } } #define ARMANPY_SHARED_PTR %header %{ #include #include #include #include #include #include %} #if defined( ARMANPY_SHARED_PTR ) %header %{ #include #define ARMANPY_SHARED_PTR %} #else %header %{ #undef ARMANPY_SHARED_PTR %} #endif %header %{ #include "armanpy.hpp" %} %init %{ // This must be called at the start of each module to import numpy. import_array(); INIT_ARMA_CAPSULE( arma::Col< double > ) INIT_ARMA_CAPSULE( arma::Col< float > ) INIT_ARMA_CAPSULE( arma::Col< int > ) INIT_ARMA_CAPSULE( arma::Col< unsigned > ) #if defined(ARMA_64BIT_WORD) INIT_ARMA_CAPSULE( arma::Col< arma::sword > ) INIT_ARMA_CAPSULE( arma::Col< arma::uword > ) #endif INIT_ARMA_CAPSULE( arma::Col< std::complex< double > > ) INIT_ARMA_CAPSULE( arma::Col< std::complex< float > > ) INIT_ARMA_CAPSULE( arma::Row< double > ) INIT_ARMA_CAPSULE( arma::Row< float > ) INIT_ARMA_CAPSULE( arma::Row< int > ) INIT_ARMA_CAPSULE( arma::Row< unsigned > ) #if defined(ARMA_64BIT_WORD) INIT_ARMA_CAPSULE( arma::Row< arma::sword > ) INIT_ARMA_CAPSULE( arma::Row< arma::uword > ) #endif INIT_ARMA_CAPSULE( arma::Row< std::complex< double > > ) INIT_ARMA_CAPSULE( arma::Row< std::complex< float > > ) INIT_ARMA_CAPSULE( arma::Mat< double > ) INIT_ARMA_CAPSULE( arma::Mat< float > ) INIT_ARMA_CAPSULE( arma::Mat< int > ) INIT_ARMA_CAPSULE( arma::Mat< unsigned > ) #if defined(ARMA_64BIT_WORD) INIT_ARMA_CAPSULE( arma::Mat< arma::sword > ) INIT_ARMA_CAPSULE( arma::Mat< arma::uword > ) #endif INIT_ARMA_CAPSULE( arma::Mat< std::complex< double > > ) INIT_ARMA_CAPSULE( arma::Mat< std::complex< float > > ) INIT_ARMA_CAPSULE( arma::Cube< double > ) INIT_ARMA_CAPSULE( arma::Cube< float > ) INIT_ARMA_CAPSULE( arma::Cube< int > ) INIT_ARMA_CAPSULE( arma::Cube< unsigned > ) #if defined(ARMA_64BIT_WORD) INIT_ARMA_CAPSULE( arma::Cube< arma::sword > ) INIT_ARMA_CAPSULE( arma::Cube< arma::uword > ) #endif INIT_ARMA_CAPSULE( arma::Cube< std::complex< double > > ) INIT_ARMA_CAPSULE( arma::Cube< std::complex< float > > ) ///////////////////////////////////////////////////////////// #if defined( ARMANPY_SHARED_PTR ) INIT_ARMA_BSPTR_CAPSULE( arma::Col< double > ) INIT_ARMA_BSPTR_CAPSULE( arma::Col< float > ) INIT_ARMA_BSPTR_CAPSULE( arma::Col< int > ) INIT_ARMA_BSPTR_CAPSULE( arma::Col< unsigned > ) #if defined(ARMA_64BIT_WORD) INIT_ARMA_BSPTR_CAPSULE( arma::Col< arma::sword > ) INIT_ARMA_BSPTR_CAPSULE( arma::Col< arma::uword > ) #endif INIT_ARMA_BSPTR_CAPSULE( arma::Col< std::complex< double > > ) INIT_ARMA_BSPTR_CAPSULE( arma::Col< std::complex< float > > ) INIT_ARMA_BSPTR_CAPSULE( arma::Row< double > ) INIT_ARMA_BSPTR_CAPSULE( arma::Row< float > ) INIT_ARMA_BSPTR_CAPSULE( arma::Row< int > ) INIT_ARMA_BSPTR_CAPSULE( arma::Row< unsigned > ) #if defined(ARMA_64BIT_WORD) INIT_ARMA_BSPTR_CAPSULE( arma::Row< arma::sword > ) INIT_ARMA_BSPTR_CAPSULE( arma::Row< arma::uword > ) #endif INIT_ARMA_BSPTR_CAPSULE( arma::Row< std::complex< double > > ) INIT_ARMA_BSPTR_CAPSULE( arma::Row< std::complex< float > > ) INIT_ARMA_BSPTR_CAPSULE( arma::Mat< double > ) INIT_ARMA_BSPTR_CAPSULE( arma::Mat< float > ) INIT_ARMA_BSPTR_CAPSULE( arma::Mat< int > ) INIT_ARMA_BSPTR_CAPSULE( arma::Mat< unsigned > ) #if defined(ARMA_64BIT_WORD) INIT_ARMA_BSPTR_CAPSULE( arma::Mat< arma::sword > ) INIT_ARMA_BSPTR_CAPSULE( arma::Mat< arma::uword > ) #endif INIT_ARMA_BSPTR_CAPSULE( arma::Mat< std::complex< double > > ) INIT_ARMA_BSPTR_CAPSULE( arma::Mat< std::complex< float > > ) INIT_ARMA_BSPTR_CAPSULE( arma::Cube< double > ) INIT_ARMA_BSPTR_CAPSULE( arma::Cube< float > ) INIT_ARMA_BSPTR_CAPSULE( arma::Cube< int > ) INIT_ARMA_BSPTR_CAPSULE( arma::Cube< unsigned > ) #if defined(ARMA_64BIT_WORD) INIT_ARMA_BSPTR_CAPSULE( arma::Cube< arma::sword > ) INIT_ARMA_BSPTR_CAPSULE( arma::Cube< arma::uword > ) #endif INIT_ARMA_BSPTR_CAPSULE( arma::Cube< std::complex< double > > ) INIT_ARMA_BSPTR_CAPSULE( arma::Cube< std::complex< float > > ) #endif %} %include "armanpy_1d.i" %include "armanpy_2d.i" %include "armanpy_3d.i" ================================================ FILE: OptolithiumC/libs/armanpy/include/armanpy_1d.i ================================================ // Copyright (C) 2012 thomas.natschlaeger@gmail.com // // This file is part of the ArmaNpy library. // It is provided without any warranty of fitness // for any purpose. You can redistribute this file // and/or modify it under the terms of the GNU // Lesser General Public License (LGPL) as published // by the Free Software Foundation, either version 3 // of the License or (at your option) any later version. // (see http://www.opensource.org/licenses for more info) %fragment( "armanpy_vec_typemaps", "header", fragment="armanpy_typemaps" ) { ///////////////////////////////////////// numpy -> arma //////////////////////////////////////// template< typename VecT > bool armanpy_numpy_as_vec_with_shared_memory( PyObject* input, VecT **m ) { typedef typename VecT::elem_type eT; PyArrayObject* array = obj_to_array_no_conversion( input, NumpyType::val ); if ( !array || !require_dimensions(array, 1) ) return false; if( ! ( PyArray_FLAGS(array) & NPY_ARRAY_OWNDATA ) ) { PyErr_SetString(PyExc_TypeError, "Array must own its data."); return false; } if ( !array_is_contiguous(array) ) { PyErr_SetString(PyExc_TypeError, "Array must be FORTRAN contiguous. A non-FORTRAN-contiguous array was given"); return false; } arma::uword p = arma::uword( array_dimensions(array)[0] ); *m = new VecT( (eT *)array_data(array), p, false, false ); return true; } /////////////////////////////////////// arma -> numpy //////////////////////////////////////////// template< typename VecT > void armanpy_vec_as_numpy_with_shared_memory( VecT *m, PyObject* input ) { typedef typename VecT::elem_type eT; PyArrayObject* ary= (PyArrayObject*)input; array_dimensions(ary)[0] = m->n_elem; array_strides(ary)[0] = sizeof(eT); if( m->mem != ( eT *)array_data(ary) ) { // if( ! m->uses_local_mem() ) { // 1. We do not need the memory at array_data(ary) anymore // This can be simply removed by PyArray_free( array_data(ary) ); array_free_data( array_data(ary) ); // 2. We should "implant" the m->mem into array_data(ary) // Here we use the trick from http://blog.enthought.com/?p=62 array_clear_flags( ary, NPY_ARRAY_OWNDATA ); ArmaCapsule< VecT > *capsule; capsule = PyObject_New( ArmaCapsule< VecT >, &ArmaCapsulePyType< VecT >::object ); capsule->mat = m; array_set_data( ary, capsule->mat->mem ); array_set_base_object( ary, capsule ); //} else { // Here we just copy a few bytes, as local memory of arma is typically small // memcpy ( array_data(ary), m->mem, sizeof( eT ) * m->n_elem ); // delete m; //} } else { // Memory was not changed at all; i.e. all modifications were done on the original // memory brought by the input numpy array. So we just delete the arma array // which does not free the memory as it was constructed with the aux memory constructor delete m; } } template< typename VecT > PyObject* armanpy_vec_copy_to_numpy( VecT * m ) { typedef typename VecT::elem_type eT; npy_intp dims[1] = { npy_intp(m->n_elem) }; PyObject* array = PyArray_EMPTY( ArmaTypeInfo< VecT >::numdim, dims, ArmaTypeInfo< VecT >::type, true); if ( !array || !array_is_contiguous( array ) ) { PyErr_SetString( PyExc_TypeError, "Creation of 1-dimensional return array failed" ); return NULL; } std::copy( m->begin(), m->end(), reinterpret_cast< eT *>(array_data(array)) ); return array; } #if defined(ARMANPY_SHARED_PTR) template< typename VecT > PyObject* armanpy_vec_bsptr_as_numpy_with_shared_memory( std::shared_ptr< VecT > m ) { typedef typename VecT::elem_type eT; npy_intp dims[1] = { 1 }; PyArrayObject* ary = (PyArrayObject*)PyArray_EMPTY(1, dims, NumpyType< eT >::val, true); if ( !ary || !array_is_contiguous(ary) ) { return NULL; } array_dimensions(ary)[0] = m->n_elem; array_strides(ary)[0] = sizeof( eT ); // 1. We do not need the memory at array_data(ary) anymore // This can be simply removed by PyArray_free( array_data(ary) ); array_free_data( array_data(ary) ); // 2. We should "implant" the m->mem into array_data(ary) // Here we use the trick from http://blog.enthought.com/?p=62 array_clear_flags( ary, NPY_ARRAY_OWNDATA ); ArmaBsptrCapsule< VecT > *capsule; capsule = PyObject_New( ArmaBsptrCapsule< VecT >, &ArmaBsptrCapsulePyType< VecT >::object ); capsule->mat = new std::shared_ptr< VecT >(); array_set_data( ary, m->mem ); (*(capsule->mat)) = m; array_set_base_object( ary, capsule ); return (PyObject*)ary; } #endif } ////////////////////////////////////////////////////////////////////////// // BY VALUE ARGs for 1D arrays ////////////////////////////////////////////////////////////////////////// %define %armanpy_vec_byvalue_typemaps( ARMA_MAT_TYPE ) %typemap( typecheck, precedence=SWIG_TYPECHECK_FLOAT_ARRAY ) ( const ARMA_MAT_TYPE ), ( ARMA_MAT_TYPE ) { $1 = armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, false ); } %typemap( in, fragment="armanpy_vec_typemaps" ) ( const ARMA_MAT_TYPE ) ( PyArrayObject* array=NULL ), ( ARMA_MAT_TYPE ) ( PyArrayObject* array=NULL ) { if( ! armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, true ) ) SWIG_fail; array = obj_to_array_no_conversion( $input, ArmaTypeInfo< ARMA_MAT_TYPE >::type ); if( !array ) SWIG_fail; $1 = ARMA_MAT_TYPE( ( ARMA_MAT_TYPE::elem_type *)array_data(array), arma::uword( array_dimensions(array)[0] ), false ); } %typemap( argout ) ( const ARMA_MAT_TYPE ), ( ARMA_MAT_TYPE ) { } %typemap( freearg ) ( const ARMA_MAT_TYPE ), ( ARMA_MAT_TYPE ) { } %enddef %armanpy_vec_byvalue_typemaps( arma::Col< double > ) %armanpy_vec_byvalue_typemaps( arma::Col< float > ) %armanpy_vec_byvalue_typemaps( arma::Col< int > ) %armanpy_vec_byvalue_typemaps( arma::Col< unsigned > ) %armanpy_vec_byvalue_typemaps( arma::Col< arma::sword > ) %armanpy_vec_byvalue_typemaps( arma::Col< arma::uword > ) %armanpy_vec_byvalue_typemaps( arma::Col< arma::cx_double > ) %armanpy_vec_byvalue_typemaps( arma::Col< arma::cx_float > ) %armanpy_vec_byvalue_typemaps( arma::Col< std::complex< double > > ) %armanpy_vec_byvalue_typemaps( arma::Col< std::complex< float > > ) %armanpy_vec_byvalue_typemaps( arma::vec ) %armanpy_vec_byvalue_typemaps( arma::fvec ) %armanpy_vec_byvalue_typemaps( arma::ivec ) %armanpy_vec_byvalue_typemaps( arma::uvec ) %armanpy_vec_byvalue_typemaps( arma::uchar_vec ) %armanpy_vec_byvalue_typemaps( arma::u32_vec ) %armanpy_vec_byvalue_typemaps( arma::s32_vec ) %armanpy_vec_byvalue_typemaps( arma::cx_vec ) %armanpy_vec_byvalue_typemaps( arma::cx_fvec ) %armanpy_vec_byvalue_typemaps( arma::colvec ) %armanpy_vec_byvalue_typemaps( arma::fcolvec ) %armanpy_vec_byvalue_typemaps( arma::icolvec ) %armanpy_vec_byvalue_typemaps( arma::ucolvec ) %armanpy_vec_byvalue_typemaps( arma::uchar_colvec ) %armanpy_vec_byvalue_typemaps( arma::u32_colvec ) %armanpy_vec_byvalue_typemaps( arma::s32_colvec ) %armanpy_vec_byvalue_typemaps( arma::cx_colvec ) %armanpy_vec_byvalue_typemaps( arma::cx_fcolvec ) %armanpy_vec_byvalue_typemaps( arma::Row< double > ) %armanpy_vec_byvalue_typemaps( arma::Row< float > ) %armanpy_vec_byvalue_typemaps( arma::Row< int > ) %armanpy_vec_byvalue_typemaps( arma::Row< unsigned > ) %armanpy_vec_byvalue_typemaps( arma::Row< arma::sword > ) %armanpy_vec_byvalue_typemaps( arma::Row< arma::uword > ) %armanpy_vec_byvalue_typemaps( arma::Row< std::complex< double > > ) %armanpy_vec_byvalue_typemaps( arma::Row< std::complex< float > > ) %armanpy_vec_byvalue_typemaps( arma::Row< arma::cx_double > ) %armanpy_vec_byvalue_typemaps( arma::Row< arma::cx_float > ) %armanpy_vec_byvalue_typemaps( arma::rowvec ) %armanpy_vec_byvalue_typemaps( arma::frowvec ) %armanpy_vec_byvalue_typemaps( arma::irowvec ) %armanpy_vec_byvalue_typemaps( arma::urowvec ) %armanpy_vec_byvalue_typemaps( arma::uchar_rowvec ) %armanpy_vec_byvalue_typemaps( arma::u32_rowvec ) %armanpy_vec_byvalue_typemaps( arma::s32_rowvec ) %armanpy_vec_byvalue_typemaps( arma::cx_rowvec ) %armanpy_vec_byvalue_typemaps( arma::cx_frowvec ) ////////////////////////////////////////////////////////////////////////// // CONST REF/PTR ARGs for 1D arrays ////////////////////////////////////////////////////////////////////////// %define %armanpy_vec_const_ref_typemaps( ARMA_MAT_TYPE ) %typemap( typecheck, precedence=SWIG_TYPECHECK_FLOAT_ARRAY ) ( const ARMA_MAT_TYPE & ) ( PyArrayObject* array=NULL ), ( const ARMA_MAT_TYPE * ) ( PyArrayObject* array=NULL ) { $1 = armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, false ); } %typemap( in, fragment="armanpy_vec_typemaps" ) ( const ARMA_MAT_TYPE & ) ( PyArrayObject* array=NULL ), ( const ARMA_MAT_TYPE * ) ( PyArrayObject* array=NULL ) { if( ! armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, true ) ) SWIG_fail; array = obj_to_array_no_conversion( $input, ArmaTypeInfo< ARMA_MAT_TYPE >::type ); if( !array ) SWIG_fail; $1 = new ARMA_MAT_TYPE( ( ARMA_MAT_TYPE::elem_type *)array_data(array), arma::uword( array_dimensions(array)[0] ), false ); } %typemap( argout ) ( const ARMA_MAT_TYPE & ), ( const ARMA_MAT_TYPE * ) { // NOOP } %typemap( freearg ) ( const ARMA_MAT_TYPE & ), ( const ARMA_MAT_TYPE * ) { if( array$argnum ) { delete $1; } } %enddef %armanpy_vec_const_ref_typemaps( arma::Col< double > ) %armanpy_vec_const_ref_typemaps( arma::Col< float > ) %armanpy_vec_const_ref_typemaps( arma::Col< int > ) %armanpy_vec_const_ref_typemaps( arma::Col< unsigned > ) %armanpy_vec_const_ref_typemaps( arma::Col< arma::sword > ) %armanpy_vec_const_ref_typemaps( arma::Col< arma::uword > ) %armanpy_vec_const_ref_typemaps( arma::Col< arma::cx_double > ) %armanpy_vec_const_ref_typemaps( arma::Col< arma::cx_float > ) %armanpy_vec_const_ref_typemaps( arma::Col< std::complex< double > > ) %armanpy_vec_const_ref_typemaps( arma::Col< std::complex< float > > ) %armanpy_vec_const_ref_typemaps( arma::vec ) %armanpy_vec_const_ref_typemaps( arma::fvec ) %armanpy_vec_const_ref_typemaps( arma::ivec ) %armanpy_vec_const_ref_typemaps( arma::uvec ) %armanpy_vec_const_ref_typemaps( arma::uchar_vec ) %armanpy_vec_const_ref_typemaps( arma::u32_vec ) %armanpy_vec_const_ref_typemaps( arma::s32_vec ) %armanpy_vec_const_ref_typemaps( arma::cx_vec ) %armanpy_vec_const_ref_typemaps( arma::cx_fvec ) %armanpy_vec_const_ref_typemaps( arma::colvec ) %armanpy_vec_const_ref_typemaps( arma::fcolvec ) %armanpy_vec_const_ref_typemaps( arma::icolvec ) %armanpy_vec_const_ref_typemaps( arma::ucolvec ) %armanpy_vec_const_ref_typemaps( arma::uchar_colvec ) %armanpy_vec_const_ref_typemaps( arma::u32_colvec ) %armanpy_vec_const_ref_typemaps( arma::s32_colvec ) %armanpy_vec_const_ref_typemaps( arma::cx_colvec ) %armanpy_vec_const_ref_typemaps( arma::cx_fcolvec ) %armanpy_vec_const_ref_typemaps( arma::Row< double > ) %armanpy_vec_const_ref_typemaps( arma::Row< float > ) %armanpy_vec_const_ref_typemaps( arma::Row< int > ) %armanpy_vec_const_ref_typemaps( arma::Row< unsigned > ) %armanpy_vec_const_ref_typemaps( arma::Row< arma::sword > ) %armanpy_vec_const_ref_typemaps( arma::Row< arma::uword > ) %armanpy_vec_const_ref_typemaps( arma::Row< std::complex< double > > ) %armanpy_vec_const_ref_typemaps( arma::Row< std::complex< float > > ) %armanpy_vec_const_ref_typemaps( arma::Row< arma::cx_double > ) %armanpy_vec_const_ref_typemaps( arma::Row< arma::cx_float > ) %armanpy_vec_const_ref_typemaps( arma::rowvec ) %armanpy_vec_const_ref_typemaps( arma::frowvec ) %armanpy_vec_const_ref_typemaps( arma::irowvec ) %armanpy_vec_const_ref_typemaps( arma::urowvec ) %armanpy_vec_const_ref_typemaps( arma::uchar_rowvec ) %armanpy_vec_const_ref_typemaps( arma::u32_rowvec ) %armanpy_vec_const_ref_typemaps( arma::s32_rowvec ) %armanpy_vec_const_ref_typemaps( arma::cx_rowvec ) %armanpy_vec_const_ref_typemaps( arma::cx_frowvec ) ////////////////////////////////////////////////////////////////////////// // Typemaps for input-output arguments. That is for arguments which are // potentialliy modified in place. ////////////////////////////////////////////////////////////////////////// // A macor for generating the typemaps for one matrix type %define %armanpy_vec_ref_typemaps( ARMA_MAT_TYPE ) %typemap( typecheck, precedence=SWIG_TYPECHECK_FLOAT_ARRAY ) ( ARMA_MAT_TYPE &) { $1 = armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, false, true ); } %typemap( in, fragment="armanpy_vec_typemaps" ) ( ARMA_MAT_TYPE &) { if( ! armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, true, true ) ) SWIG_fail; if( ! armanpy_numpy_as_vec_with_shared_memory< ARMA_MAT_TYPE >( $input, &($1) ) ) SWIG_fail; } %typemap( argout, fragment="armanpy_vec_typemaps" ) ( ARMA_MAT_TYPE & ) { armanpy_vec_as_numpy_with_shared_memory( $1, $input ); } %typemap( freearg ) ( ARMA_MAT_TYPE & ) { // NOOP } %enddef %armanpy_vec_ref_typemaps( arma::Col< double > ) %armanpy_vec_ref_typemaps( arma::Col< float > ) %armanpy_vec_ref_typemaps( arma::Col< int > ) %armanpy_vec_ref_typemaps( arma::Col< unsigned > ) %armanpy_vec_ref_typemaps( arma::Col< arma::sword > ) %armanpy_vec_ref_typemaps( arma::Col< arma::uword > ) %armanpy_vec_ref_typemaps( arma::Col< arma::cx_double > ) %armanpy_vec_ref_typemaps( arma::Col< arma::cx_float > ) %armanpy_vec_ref_typemaps( arma::Col< std::complex< double > > ) %armanpy_vec_ref_typemaps( arma::Col< std::complex< float > > ) %armanpy_vec_ref_typemaps( arma::vec ) %armanpy_vec_ref_typemaps( arma::fvec ) %armanpy_vec_ref_typemaps( arma::ivec ) %armanpy_vec_ref_typemaps( arma::uvec ) %armanpy_vec_ref_typemaps( arma::uchar_vec ) %armanpy_vec_ref_typemaps( arma::u32_vec ) %armanpy_vec_ref_typemaps( arma::s32_vec ) %armanpy_vec_ref_typemaps( arma::cx_vec ) %armanpy_vec_ref_typemaps( arma::cx_fvec ) %armanpy_vec_ref_typemaps( arma::colvec ) %armanpy_vec_ref_typemaps( arma::fcolvec ) %armanpy_vec_ref_typemaps( arma::icolvec ) %armanpy_vec_ref_typemaps( arma::ucolvec ) %armanpy_vec_ref_typemaps( arma::uchar_colvec ) %armanpy_vec_ref_typemaps( arma::u32_colvec ) %armanpy_vec_ref_typemaps( arma::s32_colvec ) %armanpy_vec_ref_typemaps( arma::cx_colvec ) %armanpy_vec_ref_typemaps( arma::cx_fcolvec ) %armanpy_vec_ref_typemaps( arma::Row< double > ) %armanpy_vec_ref_typemaps( arma::Row< float > ) %armanpy_vec_ref_typemaps( arma::Row< int > ) %armanpy_vec_ref_typemaps( arma::Row< unsigned > ) %armanpy_vec_ref_typemaps( arma::Row< arma::sword > ) %armanpy_vec_ref_typemaps( arma::Row< arma::uword > ) %armanpy_vec_ref_typemaps( arma::Row< arma::cx_double > ) %armanpy_vec_ref_typemaps( arma::Row< arma::cx_float > ) %armanpy_vec_ref_typemaps( arma::Row< std::complex< double > > ) %armanpy_vec_ref_typemaps( arma::Row< std::complex< float > > ) %armanpy_vec_ref_typemaps( arma::rowvec ) %armanpy_vec_ref_typemaps( arma::frowvec ) %armanpy_vec_ref_typemaps( arma::irowvec ) %armanpy_vec_ref_typemaps( arma::urowvec ) %armanpy_vec_ref_typemaps( arma::uchar_rowvec ) %armanpy_vec_ref_typemaps( arma::u32_rowvec ) %armanpy_vec_ref_typemaps( arma::s32_rowvec ) %armanpy_vec_ref_typemaps( arma::cx_rowvec ) %armanpy_vec_ref_typemaps( arma::cx_frowvec ) ////////////////////////////////////////////////////////////////////////// // Typemaps for return by value functions/methods ////////////////////////////////////////////////////////////////////////// %define %armanpy_vec_return_by_value_typemaps( ARMA_MAT_TYPE ) %typemap( out ) ( ARMA_MAT_TYPE ) { PyObject* array = armanpy_vec_copy_to_numpy< ARMA_MAT_TYPE >( &$1 ); if ( !array ) SWIG_fail; $result = SWIG_Python_AppendOutput($result, array); } %enddef %armanpy_vec_return_by_value_typemaps( arma::Col< double > ) %armanpy_vec_return_by_value_typemaps( arma::Col< float > ) %armanpy_vec_return_by_value_typemaps( arma::Col< int > ) %armanpy_vec_return_by_value_typemaps( arma::Col< unsigned > ) %armanpy_vec_return_by_value_typemaps( arma::Col< arma::sword > ) %armanpy_vec_return_by_value_typemaps( arma::Col< arma::uword > ) %armanpy_vec_return_by_value_typemaps( arma::Col< arma::cx_double > ) %armanpy_vec_return_by_value_typemaps( arma::Col< arma::cx_float > ) %armanpy_vec_return_by_value_typemaps( arma::Col< std::complex< double > > ) %armanpy_vec_return_by_value_typemaps( arma::Col< std::complex< float > > ) %armanpy_vec_return_by_value_typemaps( arma::vec ) %armanpy_vec_return_by_value_typemaps( arma::fvec ) %armanpy_vec_return_by_value_typemaps( arma::ivec ) %armanpy_vec_return_by_value_typemaps( arma::uvec ) %armanpy_vec_return_by_value_typemaps( arma::uchar_vec ) %armanpy_vec_return_by_value_typemaps( arma::u32_vec ) %armanpy_vec_return_by_value_typemaps( arma::s32_vec ) %armanpy_vec_return_by_value_typemaps( arma::cx_vec ) %armanpy_vec_return_by_value_typemaps( arma::cx_fvec ) %armanpy_vec_return_by_value_typemaps( arma::colvec ) %armanpy_vec_return_by_value_typemaps( arma::fcolvec ) %armanpy_vec_return_by_value_typemaps( arma::icolvec ) %armanpy_vec_return_by_value_typemaps( arma::ucolvec ) %armanpy_vec_return_by_value_typemaps( arma::uchar_colvec ) %armanpy_vec_return_by_value_typemaps( arma::u32_colvec ) %armanpy_vec_return_by_value_typemaps( arma::s32_colvec ) %armanpy_vec_return_by_value_typemaps( arma::cx_colvec ) %armanpy_vec_return_by_value_typemaps( arma::cx_fcolvec ) %armanpy_vec_return_by_value_typemaps( arma::Row< double > ) %armanpy_vec_return_by_value_typemaps( arma::Row< float > ) %armanpy_vec_return_by_value_typemaps( arma::Row< int > ) %armanpy_vec_return_by_value_typemaps( arma::Row< unsigned > ) %armanpy_vec_return_by_value_typemaps( arma::Row< arma::sword > ) %armanpy_vec_return_by_value_typemaps( arma::Row< arma::uword > ) %armanpy_vec_return_by_value_typemaps( arma::Row< arma::cx_double > ) %armanpy_vec_return_by_value_typemaps( arma::Row< arma::cx_float > ) %armanpy_vec_return_by_value_typemaps( arma::Row< std::complex< double > > ) %armanpy_vec_return_by_value_typemaps( arma::Row< std::complex< float > > ) %armanpy_vec_return_by_value_typemaps( arma::rowvec ) %armanpy_vec_return_by_value_typemaps( arma::frowvec ) %armanpy_vec_return_by_value_typemaps( arma::irowvec ) %armanpy_vec_return_by_value_typemaps( arma::urowvec ) %armanpy_vec_return_by_value_typemaps( arma::uchar_rowvec ) %armanpy_vec_return_by_value_typemaps( arma::u32_rowvec ) %armanpy_vec_return_by_value_typemaps( arma::s32_rowvec ) %armanpy_vec_return_by_value_typemaps( arma::cx_rowvec ) %armanpy_vec_return_by_value_typemaps( arma::cx_frowvec ) %define %armanpy_vec_return_by_reference_typemaps( ARMA_MAT_TYPE ) %typemap( out ) ( const ARMA_MAT_TYPE & ), ( ARMA_MAT_TYPE & ) { PyObject* array = armanpy_vec_copy_to_numpy< ARMA_MAT_TYPE >( $1 ); if ( !array ) SWIG_fail; $result = SWIG_Python_AppendOutput($result, array); } %enddef %armanpy_vec_return_by_reference_typemaps( arma::Col< double > ) %armanpy_vec_return_by_reference_typemaps( arma::Col< float > ) %armanpy_vec_return_by_reference_typemaps( arma::Col< int > ) %armanpy_vec_return_by_reference_typemaps( arma::Col< unsigned > ) %armanpy_vec_return_by_reference_typemaps( arma::Col< arma::sword > ) %armanpy_vec_return_by_reference_typemaps( arma::Col< arma::uword > ) %armanpy_vec_return_by_reference_typemaps( arma::Col< arma::cx_double > ) %armanpy_vec_return_by_reference_typemaps( arma::Col< arma::cx_float > ) %armanpy_vec_return_by_reference_typemaps( arma::Col< std::complex< double > > ) %armanpy_vec_return_by_reference_typemaps( arma::Col< std::complex< float > > ) %armanpy_vec_return_by_reference_typemaps( arma::vec ) %armanpy_vec_return_by_reference_typemaps( arma::fvec ) %armanpy_vec_return_by_reference_typemaps( arma::ivec ) %armanpy_vec_return_by_reference_typemaps( arma::uvec ) %armanpy_vec_return_by_reference_typemaps( arma::uchar_vec ) %armanpy_vec_return_by_reference_typemaps( arma::u32_vec ) %armanpy_vec_return_by_reference_typemaps( arma::s32_vec ) %armanpy_vec_return_by_reference_typemaps( arma::cx_vec ) %armanpy_vec_return_by_reference_typemaps( arma::cx_fvec ) %armanpy_vec_return_by_reference_typemaps( arma::colvec ) %armanpy_vec_return_by_reference_typemaps( arma::fcolvec ) %armanpy_vec_return_by_reference_typemaps( arma::icolvec ) %armanpy_vec_return_by_reference_typemaps( arma::ucolvec ) %armanpy_vec_return_by_reference_typemaps( arma::uchar_colvec ) %armanpy_vec_return_by_reference_typemaps( arma::u32_colvec ) %armanpy_vec_return_by_reference_typemaps( arma::s32_colvec ) %armanpy_vec_return_by_reference_typemaps( arma::cx_colvec ) %armanpy_vec_return_by_reference_typemaps( arma::cx_fcolvec ) %armanpy_vec_return_by_reference_typemaps( arma::Row< double > ) %armanpy_vec_return_by_reference_typemaps( arma::Row< float > ) %armanpy_vec_return_by_reference_typemaps( arma::Row< int > ) %armanpy_vec_return_by_reference_typemaps( arma::Row< unsigned > ) %armanpy_vec_return_by_reference_typemaps( arma::Row< arma::sword > ) %armanpy_vec_return_by_reference_typemaps( arma::Row< arma::uword > ) %armanpy_vec_return_by_reference_typemaps( arma::Row< arma::cx_double > ) %armanpy_vec_return_by_reference_typemaps( arma::Row< arma::cx_float > ) %armanpy_vec_return_by_reference_typemaps( arma::Row< std::complex< double > > ) %armanpy_vec_return_by_reference_typemaps( arma::Row< std::complex< float > > ) %armanpy_vec_return_by_reference_typemaps( arma::rowvec ) %armanpy_vec_return_by_reference_typemaps( arma::frowvec ) %armanpy_vec_return_by_reference_typemaps( arma::irowvec ) %armanpy_vec_return_by_reference_typemaps( arma::urowvec ) %armanpy_vec_return_by_reference_typemaps( arma::uchar_rowvec ) %armanpy_vec_return_by_reference_typemaps( arma::u32_rowvec ) %armanpy_vec_return_by_reference_typemaps( arma::s32_rowvec ) %armanpy_vec_return_by_reference_typemaps( arma::cx_rowvec ) %armanpy_vec_return_by_reference_typemaps( arma::cx_frowvec ) ////////////////////////////////////////////////////////////////////////// // Typemaps for return by std::shared_ptr< ... > functions/methods ////////////////////////////////////////////////////////////////////////// #if defined(ARMANPY_SHARED_PTR) %define %armanpy_vec_return_by_bsptr_typemaps( ARMA_MAT_TYPE ) %typemap( out , fragment="armanpy_vec_typemaps" ) ( std::shared_ptr< ARMA_MAT_TYPE > ) { PyObject* array = armanpy_vec_bsptr_as_numpy_with_shared_memory< ARMA_MAT_TYPE >( $1 ); if ( !array ) SWIG_fail; $result = SWIG_Python_AppendOutput($result, array); } %enddef %armanpy_vec_return_by_bsptr_typemaps( arma::Col< double > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Col< float > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Col< int > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Col< unsigned > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Col< arma::sword > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Col< arma::uword > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Col< arma::cx_double > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Col< arma::cx_float > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Col< std::complex< double > > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Col< std::complex< float > > ) %armanpy_vec_return_by_bsptr_typemaps( arma::vec ) %armanpy_vec_return_by_bsptr_typemaps( arma::fvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::ivec ) %armanpy_vec_return_by_bsptr_typemaps( arma::uvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::uchar_vec ) %armanpy_vec_return_by_bsptr_typemaps( arma::u32_vec ) %armanpy_vec_return_by_bsptr_typemaps( arma::s32_vec ) %armanpy_vec_return_by_bsptr_typemaps( arma::cx_vec ) %armanpy_vec_return_by_bsptr_typemaps( arma::cx_fvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::colvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::fcolvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::icolvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::ucolvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::uchar_colvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::u32_colvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::s32_colvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::cx_colvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::cx_fcolvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::Row< double > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Row< float > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Row< int > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Row< unsigned > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Row< arma::sword > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Row< arma::uword > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Row< arma::cx_double > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Row< arma::cx_float > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Row< std::complex< double > > ) %armanpy_vec_return_by_bsptr_typemaps( arma::Row< std::complex< float > > ) %armanpy_vec_return_by_bsptr_typemaps( arma::rowvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::frowvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::irowvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::urowvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::uchar_rowvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::u32_rowvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::s32_rowvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::cx_rowvec ) %armanpy_vec_return_by_bsptr_typemaps( arma::cx_frowvec ) #endif ================================================ FILE: OptolithiumC/libs/armanpy/include/armanpy_2d.i ================================================ // Copyright (C) 2012 thomas.natschlaeger@gmail.com // // This file is part of the ArmaNpy library. // It is provided without any warranty of fitness // for any purpose. You can redistribute this file // and/or modify it under the terms of the GNU // Lesser General Public License (LGPL) as published // by the Free Software Foundation, either version 3 // of the License or (at your option) any later version. // (see http://www.opensource.org/licenses for more info) %fragment( "armanpy_mat_typemaps", "header", fragment="armanpy_typemaps" ) { template< typename MatT > bool armanpy_typecheck_mat_with_conversion( PyObject* input , int nd ) { typedef typename MatT::elem_type eT; PyArrayObject* array=NULL; int is_new_object=0; if( armanpy_allow_conversion_flag ) { array = obj_to_array_fortran_allow_conversion( input, NumpyType::val, &is_new_object ); if ( !array || !require_dimensions( array, nd ) ) return false; return true; } else { array = obj_to_array_no_conversion( input, NumpyType::val ); if( !array ) return false; if( !require_dimensions( array, nd ) ) return false; if( !array_is_fortran(array) ) return false; return true; } } template< typename MatT > PyArrayObject* armanpy_to_mat_with_conversion( PyObject* input , int nd ) { typedef typename MatT::elem_type eT; PyArrayObject* array=NULL; int is_new_object=0; if( armanpy_allow_conversion_flag ) { array = obj_to_array_fortran_allow_conversion( input, NumpyType::val, &is_new_object ); if ( !array || !require_dimensions( array, nd ) ) return NULL; if( armanpy_warn_on_conversion_flag && is_new_object ) { PyErr_WarnEx( PyExc_RuntimeWarning, "Argument converted (copied) to FORTRAN-contiguous array.", 1 ); } return array; } else { array = obj_to_array_no_conversion( input, NumpyType::val ); if ( !array || !require_dimensions( array, nd ) )return NULL; if( !array_is_fortran(array) ) { PyErr_SetString(PyExc_TypeError, "Array must be FORTRAN contiguous."\ " A non-FORTRAN-contiguous array was given"); return NULL; } return array; } } template< typename MatT > void armanpy_mat_as_numpy_with_shared_memory( MatT *m, PyObject* input ) { typedef typename MatT::elem_type eT; PyArrayObject* ary= (PyArrayObject*)input; array_dimensions(ary)[0] = m->n_rows; array_dimensions(ary)[1] = m->n_cols; array_strides(ary)[0] = sizeof( eT ); array_strides(ary)[1] = sizeof( eT ) * m->n_rows; if( m->mem != (eT*)array_data(ary) ) { // if( ! m->uses_local_mem() ) { // 1. We do not need the memory at array_data(ary) anymore // This can be simply removed by PyArray_free( array_data(ary) ); array_free_data( array_data(ary) ); // 2. We should "implant" the m->mem into array_data(ary) // Here we use the trick from http://blog.enthought.com/?p=62 // array_flags(ary) = array_flags(ary) & ~( NPY_ARRAY_OWNDATA ); array_clear_flags( ary, NPY_ARRAY_OWNDATA ); ArmaCapsule< MatT > *capsule; capsule = PyObject_New( ArmaCapsule< MatT >, &ArmaCapsulePyType< MatT >::object ); capsule->mat = m; //ary->data = (char *)capsule->mat->mem; array_set_data( ary, capsule->mat->mem ); array_set_base_object( ary, capsule ); //} else { // Here we just copy a few bytes, as local memory of arma is typically small // memcpy ( array_data(ary), m->mem, sizeof(eT) * m->n_elem ); // delete m; //} } else { // Memory was not changed at all; i.e. all modifications were done on the original // memory brought by the input numpy array. So we just delete the arma array // which does not free the memory as it was constructed with the aux memory constructor delete m; } } template< typename MatT > bool armanpy_numpy_as_mat_with_shared_memory( PyObject* input, MatT **m ) { typedef typename MatT::elem_type eT; PyArrayObject* array = obj_to_array_no_conversion( input, NumpyType::val ); if ( !array || !require_dimensions(array, 2) ) return false; if( ! ( PyArray_FLAGS(array) & NPY_ARRAY_OWNDATA ) ) { PyErr_SetString(PyExc_TypeError, "Array must own its data."); return false; } if ( !array_is_fortran(array) ) { PyErr_SetString(PyExc_TypeError, "Array must be FORTRAN contiguous. A non-FORTRAN-contiguous array was given"); return false; } arma::uword r = arma::uword( array_dimensions(array)[0] ); arma::uword c = arma::uword( array_dimensions(array)[1] ); *m = new MatT( (eT*)array_data(array), r, c, false, false ); return true; } template< typename MatT > PyObject* armanpy_mat_copy_to_numpy( MatT * m ) { typedef typename MatT::elem_type eT; npy_intp dims[2] = { npy_intp(m->n_rows), npy_intp(m->n_cols) }; PyObject* array = PyArray_EMPTY( ArmaTypeInfo< MatT >::numdim, dims, ArmaTypeInfo< MatT >::type, true); if ( !array || !array_is_fortran( array ) ) { PyErr_SetString( PyExc_TypeError, "Creation of 2-dimensional return array failed" ); return NULL; } std::copy( m->begin(), m->end(), reinterpret_cast(array_data(array)) ); return array; } #if defined(ARMANPY_SHARED_PTR) template< typename MatT > PyObject* armanpy_mat_bsptr_as_numpy_with_shared_memory( std::shared_ptr< MatT > m ) { typedef typename MatT::elem_type eT; npy_intp dims[2] = { 1, 1 }; PyArrayObject* ary = (PyArrayObject*)PyArray_EMPTY(2, dims, NumpyType::val, true); if ( !ary || !array_is_fortran(ary) ) { return NULL; } array_dimensions(ary)[0] = m->n_rows; array_dimensions(ary)[1] = m->n_cols; array_strides(ary)[0] = sizeof(eT); array_strides(ary)[1] = sizeof(eT) * m->n_rows; // 1. We do not need the memory at array_data(ary) anymore // This can be simply removed by PyArray_free( array_data(ary) ); array_free_data( array_data(ary) ); // 2. We should "implant" the m->mem into array_data(ary) // Here we use the trick from http://blog.enthought.com/?p=62 // array_flags(ary) = array_flags(ary) & ~( NPY_ARRAY_OWNDATA ); array_clear_flags( ary, NPY_ARRAY_OWNDATA ); ArmaBsptrCapsule< MatT > *capsule; capsule = PyObject_New( ArmaBsptrCapsule< MatT >, &ArmaBsptrCapsulePyType< MatT >::object ); capsule->mat = new std::shared_ptr< MatT >(); // This currently works, but this may break with future versions of numpy // ary->data = (char *)( m->mem ); array_set_data( ary, m->mem ); (*(capsule->mat)) = m; array_set_base_object( ary, capsule ); return (PyObject*)ary; } #endif } ////////////////////////////////////////////////////////////////////////// // BY VALUE ARGs for 2D arrays ////////////////////////////////////////////////////////////////////////// %define %armanpy_mat_byvalue_typemaps( ARMA_MAT_TYPE ) %typemap( typecheck, precedence=SWIG_TYPECHECK_FLOAT_ARRAY ) ( const ARMA_MAT_TYPE ) ( PyArrayObject* array=NULL ), ( ARMA_MAT_TYPE ) ( PyArrayObject* array=NULL ) { $1 = armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, false ); } %typemap( in, fragment="armanpy_mat_typemaps" ) ( const ARMA_MAT_TYPE ) ( PyArrayObject* array=NULL ), ( ARMA_MAT_TYPE ) ( PyArrayObject* array=NULL ) { if( ! armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, true ) ) SWIG_fail; array = obj_to_array_no_conversion( $input, ArmaTypeInfo< ARMA_MAT_TYPE >::type ); if( !array ) SWIG_fail; $1 = ARMA_MAT_TYPE( ( ARMA_MAT_TYPE::elem_type *)array_data(array), array_dimensions(array)[0], array_dimensions(array)[1], false ); } %typemap( argout ) ( const ARMA_MAT_TYPE ), ( ARMA_MAT_TYPE ) { } %typemap( freearg ) ( const ARMA_MAT_TYPE ), ( ARMA_MAT_TYPE ) { } %enddef %armanpy_mat_byvalue_typemaps( arma::Mat< double > ) %armanpy_mat_byvalue_typemaps( arma::Mat< float > ) %armanpy_mat_byvalue_typemaps( arma::Mat< int > ) %armanpy_mat_byvalue_typemaps( arma::Mat< unsigned > ) %armanpy_mat_byvalue_typemaps( arma::Mat< arma::sword > ) %armanpy_mat_byvalue_typemaps( arma::Mat< arma::uword > ) %armanpy_mat_byvalue_typemaps( arma::Mat< arma::cx_double > ) %armanpy_mat_byvalue_typemaps( arma::Mat< arma::cx_float > ) %armanpy_mat_byvalue_typemaps( arma::Mat< std::complex< double > > ) %armanpy_mat_byvalue_typemaps( arma::Mat< std::complex< float > > ) %armanpy_mat_byvalue_typemaps( arma::mat ) %armanpy_mat_byvalue_typemaps( arma::fmat ) %armanpy_mat_byvalue_typemaps( arma::imat ) %armanpy_mat_byvalue_typemaps( arma::umat ) %armanpy_mat_byvalue_typemaps( arma::uchar_mat ) %armanpy_mat_byvalue_typemaps( arma::u32_mat ) %armanpy_mat_byvalue_typemaps( arma::s32_mat ) %armanpy_mat_byvalue_typemaps( arma::cx_mat ) %armanpy_mat_byvalue_typemaps( arma::cx_fmat ) ////////////////////////////////////////////////////////////////////////// // CONST REF/PTR ARGs for 2D arrays ////////////////////////////////////////////////////////////////////////// %define %armanpy_mat_const_ref_typemaps( ARMA_MAT_TYPE ) %typemap( typecheck, precedence=SWIG_TYPECHECK_FLOAT_ARRAY ) ( const ARMA_MAT_TYPE & ) ( PyArrayObject* array=NULL ), ( const ARMA_MAT_TYPE * ) ( PyArrayObject* array=NULL ) { $1 = armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, false ); } %typemap( in, fragment="armanpy_mat_typemaps" ) ( const ARMA_MAT_TYPE & ) ( PyArrayObject* array=NULL ), ( const ARMA_MAT_TYPE * ) ( PyArrayObject* array=NULL ) { if( ! armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, true ) ) SWIG_fail; array = obj_to_array_no_conversion( $input, ArmaTypeInfo< ARMA_MAT_TYPE >::type ); if( !array ) SWIG_fail; $1 = new ARMA_MAT_TYPE( ( ARMA_MAT_TYPE::elem_type *)array_data(array), arma::uword( array_dimensions(array)[0] ), arma::uword( array_dimensions(array)[1] ), false ); } %typemap( argout ) ( const ARMA_MAT_TYPE & ), ( const ARMA_MAT_TYPE * ) { // NOOP } %typemap( freearg ) ( const ARMA_MAT_TYPE & ), ( const ARMA_MAT_TYPE * ) { if( array$argnum ) { delete $1; } } %enddef %armanpy_mat_const_ref_typemaps( arma::Mat< double > ) %armanpy_mat_const_ref_typemaps( arma::Mat< float > ) %armanpy_mat_const_ref_typemaps( arma::Mat< int > ) %armanpy_mat_const_ref_typemaps( arma::Mat< unsigned > ) %armanpy_mat_const_ref_typemaps( arma::Mat< arma::sword > ) %armanpy_mat_const_ref_typemaps( arma::Mat< arma::uword > ) %armanpy_mat_const_ref_typemaps( arma::Mat< arma::cx_double > ) %armanpy_mat_const_ref_typemaps( arma::Mat< arma::cx_float > ) %armanpy_mat_const_ref_typemaps( arma::Mat< std::complex< double > > ) %armanpy_mat_const_ref_typemaps( arma::Mat< std::complex< float > > ) %armanpy_mat_const_ref_typemaps( arma::mat ) %armanpy_mat_const_ref_typemaps( arma::fmat ) %armanpy_mat_const_ref_typemaps( arma::imat ) %armanpy_mat_const_ref_typemaps( arma::umat ) %armanpy_mat_const_ref_typemaps( arma::uchar_mat ) %armanpy_mat_const_ref_typemaps( arma::u32_mat ) %armanpy_mat_const_ref_typemaps( arma::s32_mat ) %armanpy_mat_const_ref_typemaps( arma::cx_mat ) %armanpy_mat_const_ref_typemaps( arma::cx_fmat ) ////////////////////////////////////////////////////////////////////////// // Typemaps for input-output arguments. That is for arguments which are // potentialliy modified in place. ////////////////////////////////////////////////////////////////////////// // A macor for generating the typemaps for one matrix type %define %armanpy_mat_ref_typemaps( ARMA_MAT_TYPE ) %typemap( typecheck, precedence=SWIG_TYPECHECK_FLOAT_ARRAY ) ( ARMA_MAT_TYPE &) { $1 = armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, false, true ); } %typemap( in, fragment="armanpy_mat_typemaps" ) ( ARMA_MAT_TYPE &) { if( ! armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, true, true ) ) SWIG_fail; if( ! armanpy_numpy_as_mat_with_shared_memory< ARMA_MAT_TYPE >( $input, &($1) ) ) SWIG_fail; } %typemap( argout, fragment="armanpy_mat_typemaps" ) ( ARMA_MAT_TYPE & ) { armanpy_mat_as_numpy_with_shared_memory( $1, $input ); } %typemap( freearg ) ( ARMA_MAT_TYPE & ) { // NOOP } %enddef %armanpy_mat_ref_typemaps( arma::Mat< double > ) %armanpy_mat_ref_typemaps( arma::Mat< float > ) %armanpy_mat_ref_typemaps( arma::Mat< int > ) %armanpy_mat_ref_typemaps( arma::Mat< unsigned > ) %armanpy_mat_ref_typemaps( arma::Mat< arma::sword > ) %armanpy_mat_ref_typemaps( arma::Mat< arma::uword > ) %armanpy_mat_ref_typemaps( arma::Mat< arma::cx_double > ) %armanpy_mat_ref_typemaps( arma::Mat< arma::cx_float > ) %armanpy_mat_ref_typemaps( arma::Mat< std::complex< double > > ) %armanpy_mat_ref_typemaps( arma::Mat< std::complex< float > > ) %armanpy_mat_ref_typemaps( arma::mat ) %armanpy_mat_ref_typemaps( arma::fmat ) %armanpy_mat_ref_typemaps( arma::imat ) %armanpy_mat_ref_typemaps( arma::umat ) %armanpy_mat_ref_typemaps( arma::uchar_mat ) %armanpy_mat_ref_typemaps( arma::u32_mat ) %armanpy_mat_ref_typemaps( arma::s32_mat ) %armanpy_mat_ref_typemaps( arma::cx_mat ) %armanpy_mat_ref_typemaps( arma::cx_fmat ) ////////////////////////////////////////////////////////////////////////// // Typemaps for return by value functions/methods ////////////////////////////////////////////////////////////////////////// %define %armanpy_mat_return_by_value_typemaps( ARMA_MAT_TYPE ) %typemap( out ) ( ARMA_MAT_TYPE ) { PyObject* array = armanpy_mat_copy_to_numpy< ARMA_MAT_TYPE >( &$1 ); if ( !array ) SWIG_fail; $result = SWIG_Python_AppendOutput($result, array); } %enddef %armanpy_mat_return_by_value_typemaps( arma::Mat< double > ) %armanpy_mat_return_by_value_typemaps( arma::Mat< float > ) %armanpy_mat_return_by_value_typemaps( arma::Mat< int > ) %armanpy_mat_return_by_value_typemaps( arma::Mat< unsigned > ) %armanpy_mat_return_by_value_typemaps( arma::Mat< arma::sword > ) %armanpy_mat_return_by_value_typemaps( arma::Mat< arma::uword > ) %armanpy_mat_return_by_value_typemaps( arma::Mat< arma::cx_double > ) %armanpy_mat_return_by_value_typemaps( arma::Mat< arma::cx_float > ) %armanpy_mat_return_by_value_typemaps( arma::Mat< std::complex< double > > ) %armanpy_mat_return_by_value_typemaps( arma::Mat< std::complex< float > > ) %armanpy_mat_return_by_value_typemaps( arma::mat ) %armanpy_mat_return_by_value_typemaps( arma::fmat ) %armanpy_mat_return_by_value_typemaps( arma::imat ) %armanpy_mat_return_by_value_typemaps( arma::umat ) %armanpy_mat_return_by_value_typemaps( arma::uchar_mat ) %armanpy_mat_return_by_value_typemaps( arma::u32_mat ) %armanpy_mat_return_by_value_typemaps( arma::s32_mat ) %armanpy_mat_return_by_value_typemaps( arma::cx_mat ) %armanpy_mat_return_by_value_typemaps( arma::cx_fmat ) %define %armanpy_mat_return_by_reference_typemaps( ARMA_MAT_TYPE ) %typemap( out ) ( const ARMA_MAT_TYPE & ), ( ARMA_MAT_TYPE & ) { PyObject* array = armanpy_mat_copy_to_numpy< ARMA_MAT_TYPE >( $1 ); if ( !array ) SWIG_fail; $result = SWIG_Python_AppendOutput($result, array); } %enddef %armanpy_mat_return_by_reference_typemaps( arma::Mat< double > ) %armanpy_mat_return_by_reference_typemaps( arma::Mat< float > ) %armanpy_mat_return_by_reference_typemaps( arma::Mat< int > ) %armanpy_mat_return_by_reference_typemaps( arma::Mat< unsigned > ) %armanpy_mat_return_by_reference_typemaps( arma::Mat< arma::sword > ) %armanpy_mat_return_by_reference_typemaps( arma::Mat< arma::uword > ) %armanpy_mat_return_by_reference_typemaps( arma::Mat< arma::cx_double > ) %armanpy_mat_return_by_reference_typemaps( arma::Mat< arma::cx_float > ) %armanpy_mat_return_by_reference_typemaps( arma::Mat< std::complex< double > > ) %armanpy_mat_return_by_reference_typemaps( arma::Mat< std::complex< float > > ) %armanpy_mat_return_by_reference_typemaps( arma::mat ) %armanpy_mat_return_by_reference_typemaps( arma::fmat ) %armanpy_mat_return_by_reference_typemaps( arma::imat ) %armanpy_mat_return_by_reference_typemaps( arma::umat ) %armanpy_mat_return_by_reference_typemaps( arma::uchar_mat ) %armanpy_mat_return_by_reference_typemaps( arma::u32_mat ) %armanpy_mat_return_by_reference_typemaps( arma::s32_mat ) %armanpy_mat_return_by_reference_typemaps( arma::cx_mat ) %armanpy_mat_return_by_reference_typemaps( arma::cx_fmat ) ////////////////////////////////////////////////////////////////////////// // Typemaps for return by std::shared_ptr< ... > functions/methods ////////////////////////////////////////////////////////////////////////// #if defined(ARMANPY_SHARED_PTR) %define %armanpy_mat_return_by_bsptr_typemaps( ARMA_MAT_TYPE ) %typemap( out , fragment="armanpy_mat_typemaps" ) ( std::shared_ptr< ARMA_MAT_TYPE > ) { PyObject* array = armanpy_mat_bsptr_as_numpy_with_shared_memory< ARMA_MAT_TYPE >( $1 ); if ( !array ) { SWIG_fail; } $result = SWIG_Python_AppendOutput($result, array); } %enddef %armanpy_mat_return_by_bsptr_typemaps( arma::Mat< double > ) %armanpy_mat_return_by_bsptr_typemaps( arma::Mat< float > ) %armanpy_mat_return_by_bsptr_typemaps( arma::Mat< int > ) %armanpy_mat_return_by_bsptr_typemaps( arma::Mat< unsigned > ) %armanpy_mat_return_by_bsptr_typemaps( arma::Mat< arma::sword > ) %armanpy_mat_return_by_bsptr_typemaps( arma::Mat< arma::uword > ) %armanpy_mat_return_by_bsptr_typemaps( arma::Mat< arma::cx_double > ) %armanpy_mat_return_by_bsptr_typemaps( arma::Mat< arma::cx_float > ) %armanpy_mat_return_by_bsptr_typemaps( arma::Mat< std::complex< double > > ) %armanpy_mat_return_by_bsptr_typemaps( arma::Mat< std::complex< float > > ) %armanpy_mat_return_by_bsptr_typemaps( arma::mat ) %armanpy_mat_return_by_bsptr_typemaps( arma::fmat ) %armanpy_mat_return_by_bsptr_typemaps( arma::imat ) %armanpy_mat_return_by_bsptr_typemaps( arma::umat ) %armanpy_mat_return_by_bsptr_typemaps( arma::uchar_mat ) %armanpy_mat_return_by_bsptr_typemaps( arma::u32_mat ) %armanpy_mat_return_by_bsptr_typemaps( arma::s32_mat ) %armanpy_mat_return_by_bsptr_typemaps( arma::cx_mat ) %armanpy_mat_return_by_bsptr_typemaps( arma::cx_fmat ) #endif ================================================ FILE: OptolithiumC/libs/armanpy/include/armanpy_3d.i ================================================ // Copyright (C) 2012 thomas.natschlaeger@gmail.com // // This file is part of the ArmaNpy library. // It is provided without any warranty of fitness // for any purpose. You can redistribute this file // and/or modify it under the terms of the GNU // Lesser General Public License (LGPL) as published // by the Free Software Foundation, either version 3 // of the License or (at your option) any later version. // (see http://www.opensource.org/licenses for more info) %fragment( "armanpy_cube_typemaps", "header", fragment="armanpy_typemaps" ) { template< typename MatT > bool armanpy_typecheck_cube_with_conversion( PyObject* input , int nd ) { typedef typename MatT::elem_type eT; PyArrayObject* array=NULL; int is_new_object=0; if( armanpy_allow_conversion_flag ) { array = obj_to_array_fortran_allow_conversion( input, NumpyType::val, &is_new_object ); if ( !array || !require_dimensions( array, nd ) ) return false; return true; } else { array = obj_to_array_no_conversion( input, NumpyType::val ); if( !array ) return false; if( !require_dimensions( array, nd ) ) return false; if( !array_is_fortran(array) ) return false; return true; } } template< typename MatT > PyArrayObject* armanpy_to_cube_with_conversion( PyObject* input , int nd ) { typedef typename MatT::elem_type eT; PyArrayObject* array=NULL; int is_new_object=0; if( armanpy_allow_conversion_flag ) { array = obj_to_array_fortran_allow_conversion( input, NumpyType::val, &is_new_object ); if ( !array || !require_dimensions( array, nd ) ) return NULL; if( armanpy_warn_on_conversion_flag && is_new_object ) { PyErr_WarnEx( PyExc_RuntimeWarning, "Argument converted (copied) to FORTRAN-contiguous array.", 1 ); } return array; } else { array = obj_to_array_no_conversion( input, NumpyType::val ); if ( !array || !require_dimensions( array, nd ) )return NULL; if( !array_is_fortran(array) ) { PyErr_SetString(PyExc_TypeError, "Array must be FORTRAN contiguous."\ " A non-FORTRAN-contiguous array was given"); return NULL; } return array; } } template< typename MatT > void armanpy_cube_as_numpy_with_shared_memory( MatT *m, PyObject* input ) { typedef typename MatT::elem_type eT; PyArrayObject* ary= (PyArrayObject*)input; array_dimensions(ary)[0] = m->n_rows; array_dimensions(ary)[1] = m->n_cols; array_dimensions(ary)[2] = m->n_slices; array_strides(ary)[0] = sizeof(eT); array_strides(ary)[1] = sizeof(eT) * m->n_rows; array_strides(ary)[2] = sizeof(eT) * m->n_rows * m->n_cols; if( m->mem != (eT*)array_data(ary) ) { // if( ! m->uses_local_mem() ) { // 1. We do not need the memory at array_data(ary) anymore // This can be simply removed by PyArray_free( array_data(ary) ); array_free_data( array_data(ary) ); // 2. We should "implant" the m->mem into array_data(ary) // Here we use the trick from http://blog.enthought.com/?p=62 array_clear_flags( ary, NPY_ARRAY_OWNDATA ); ArmaCapsule< MatT > *capsule; capsule = PyObject_New( ArmaCapsule< MatT >, &ArmaCapsulePyType< MatT >::object ); capsule->mat = m; array_set_data( ary, capsule->mat->mem ); array_set_base_object( ary, capsule ); } else { // Memory was not changed at all; i.e. all modifications were done on the original // memory brought by the input numpy array. So we just delete the arma array // which does not free the memory as it was constructed with the aux memory constructor delete m; } } template< typename MatT > bool armanpy_numpy_as_cube_with_shared_memory( PyObject* input, MatT **m ) { typedef typename MatT::elem_type eT; PyArrayObject* array = obj_to_array_no_conversion( input, NumpyType::val ); if ( !array || !require_dimensions( array, 3) ) return false; if( ! ( PyArray_FLAGS(array) & NPY_ARRAY_OWNDATA ) ) { PyErr_SetString(PyExc_TypeError, "Array must own its data."); return false; } if ( !array_is_fortran(array) ) { PyErr_SetString(PyExc_TypeError, "Array must be FORTRAN contiguous. A non-FORTRAN-contiguous array was given"); return false; } arma::uword r = arma::uword( array_dimensions(array)[0] ); arma::uword c = arma::uword( array_dimensions(array)[1] ); arma::uword s = arma::uword( array_dimensions(array)[2] ); *m = new MatT( (eT*)array_data(array), r, c, s, false, false ); return true; } template< typename MatT > PyObject* armanpy_cube_copy_to_numpy( MatT * m ) { typedef typename MatT::elem_type eT; npy_intp dims[3] = { npy_intp(m->n_rows), npy_intp(m->n_cols), npy_intp(m->n_slices) }; PyObject* array = PyArray_EMPTY( ArmaTypeInfo< MatT >::numdim, dims, ArmaTypeInfo< MatT >::type, true); if ( !array || !array_is_fortran( array ) ) { PyErr_SetString( PyExc_TypeError, "Creation of 3-dimensional return array failed" ); return NULL; } std::copy( m->begin(), m->end(), reinterpret_cast(array_data(array)) ); return array; } #if defined(ARMANPY_SHARED_PTR) template< typename MatT > PyObject* armanpy_cube_bsptr_as_numpy_with_shared_memory( std::shared_ptr< MatT > m ) { typedef typename MatT::elem_type eT; npy_intp dims[3] = { 1, 1, 1 }; PyArrayObject* ary = (PyArrayObject*)PyArray_EMPTY(3, dims, NumpyType::val, true); if ( !ary || !array_is_fortran(ary) ) { return NULL; } array_dimensions(ary)[0] = m->n_rows; array_dimensions(ary)[1] = m->n_cols; array_dimensions(ary)[2] = m->n_slices; array_strides(ary)[0] = sizeof(eT); array_strides(ary)[1] = sizeof(eT) * m->n_rows; array_strides(ary)[2] = sizeof(eT) * m->n_rows * m->n_cols; // 1. We do not need the memory at array_data(ary) anymore // This can be simply removed by PyArray_free( array_data(ary) ); array_free_data( array_data(ary) ); // 2. We should "implant" the m->mem into array_data(ary) // Here we use the trick from http://blog.enthought.com/?p=62 array_clear_flags( ary, NPY_ARRAY_OWNDATA ); ArmaBsptrCapsule< MatT > *capsule; capsule = PyObject_New( ArmaBsptrCapsule< MatT >, &ArmaBsptrCapsulePyType< MatT >::object ); capsule->mat = new std::shared_ptr< MatT >(); array_set_data( ary, m->mem ); (*(capsule->mat)) = m; array_set_base_object( ary, capsule ); return (PyObject*)ary; } #endif } ////////////////////////////////////////////////////////////////////////// // BY VALUE ARGs for 3D arrays ////////////////////////////////////////////////////////////////////////// %define %armanpy_cube_byvalue_typemaps( ARMA_MAT_TYPE ) %typemap( typecheck, precedence=SWIG_TYPECHECK_FLOAT_ARRAY ) ( const ARMA_MAT_TYPE ) ( PyArrayObject* array=NULL ), ( ARMA_MAT_TYPE ) ( PyArrayObject* array=NULL ) { $1 = armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, false ); } %typemap( in, fragment="armanpy_cube_typemaps" ) ( const ARMA_MAT_TYPE ) ( PyArrayObject* array=NULL ), ( ARMA_MAT_TYPE ) ( PyArrayObject* array=NULL ) { if( ! armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, true ) ) SWIG_fail; array = obj_to_array_no_conversion( $input, ArmaTypeInfo< ARMA_MAT_TYPE >::type ); if( !array ) SWIG_fail; $1 = ARMA_MAT_TYPE( ( ARMA_MAT_TYPE::elem_type *)array_data(array), arma::uword( array_dimensions(array)[0] ), arma::uword( array_dimensions(array)[1] ), arma::uword( array_dimensions(array)[2] ), false ); } %typemap( argout ) ( const ARMA_MAT_TYPE ), ( ARMA_MAT_TYPE ) { } %typemap( freearg ) ( const ARMA_MAT_TYPE ), ( ARMA_MAT_TYPE ) { } %enddef %armanpy_cube_byvalue_typemaps( arma::Cube< double > ) %armanpy_cube_byvalue_typemaps( arma::Cube< float > ) %armanpy_cube_byvalue_typemaps( arma::Cube< int > ) %armanpy_cube_byvalue_typemaps( arma::Cube< unsigned > ) %armanpy_cube_byvalue_typemaps( arma::Cube< arma::sword > ) %armanpy_cube_byvalue_typemaps( arma::Cube< arma::uword > ) %armanpy_cube_byvalue_typemaps( arma::Cube< arma::cx_double > ) %armanpy_cube_byvalue_typemaps( arma::Cube< arma::cx_float > ) %armanpy_cube_byvalue_typemaps( arma::Cube< std::complex< double > > ) %armanpy_cube_byvalue_typemaps( arma::Cube< std::complex< float > > ) %armanpy_cube_byvalue_typemaps( arma::cube ) %armanpy_cube_byvalue_typemaps( arma::fcube ) %armanpy_cube_byvalue_typemaps( arma::icube ) %armanpy_cube_byvalue_typemaps( arma::ucube ) %armanpy_cube_byvalue_typemaps( arma::uchar_cube ) %armanpy_cube_byvalue_typemaps( arma::u32_cube ) %armanpy_cube_byvalue_typemaps( arma::s32_cube ) %armanpy_cube_byvalue_typemaps( arma::cx_cube ) %armanpy_cube_byvalue_typemaps( arma::cx_fcube ) ////////////////////////////////////////////////////////////////////////// // CONST REF/PTR ARGs for 3D arrays ////////////////////////////////////////////////////////////////////////// %define %armanpy_cube_const_ref_typemaps( ARMA_MAT_TYPE ) %typemap( typecheck, precedence=SWIG_TYPECHECK_FLOAT_ARRAY ) ( const ARMA_MAT_TYPE & ) ( PyArrayObject* array=NULL ), ( const ARMA_MAT_TYPE * ) ( PyArrayObject* array=NULL ) { $1 = armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, false ); } %typemap( in, fragment="armanpy_cube_typemaps" ) ( const ARMA_MAT_TYPE & ) ( PyArrayObject* array=NULL ), ( const ARMA_MAT_TYPE * ) ( PyArrayObject* array=NULL ) { if( ! armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, true ) ) SWIG_fail; array = obj_to_array_no_conversion( $input, ArmaTypeInfo< ARMA_MAT_TYPE >::type ); if( !array ) SWIG_fail; $1 = new ARMA_MAT_TYPE( ( ARMA_MAT_TYPE::elem_type *)array_data(array), arma::uword( array_dimensions(array)[0] ), arma::uword( array_dimensions(array)[1] ), arma::uword( array_dimensions(array)[2] ), false ); } %typemap( argout ) ( const ARMA_MAT_TYPE & ), ( const ARMA_MAT_TYPE * ) { // NOOP } %typemap( freearg ) ( const ARMA_MAT_TYPE & ), ( const ARMA_MAT_TYPE * ) { if( array$argnum ) { delete $1; } } %enddef %armanpy_cube_const_ref_typemaps( arma::Cube< double > ) %armanpy_cube_const_ref_typemaps( arma::Cube< float > ) %armanpy_cube_const_ref_typemaps( arma::Cube< int > ) %armanpy_cube_const_ref_typemaps( arma::Cube< unsigned > ) %armanpy_cube_const_ref_typemaps( arma::Cube< arma::sword > ) %armanpy_cube_const_ref_typemaps( arma::Cube< arma::uword > ) %armanpy_cube_const_ref_typemaps( arma::Cube< arma::cx_double > ) %armanpy_cube_const_ref_typemaps( arma::Cube< arma::cx_float > ) %armanpy_cube_const_ref_typemaps( arma::Cube< std::complex< double > > ) %armanpy_cube_const_ref_typemaps( arma::Cube< std::complex< float > > ) %armanpy_cube_const_ref_typemaps( arma::cube ) %armanpy_cube_const_ref_typemaps( arma::fcube ) %armanpy_cube_const_ref_typemaps( arma::icube ) %armanpy_cube_const_ref_typemaps( arma::ucube ) %armanpy_cube_const_ref_typemaps( arma::uchar_cube ) %armanpy_cube_const_ref_typemaps( arma::u32_cube ) %armanpy_cube_const_ref_typemaps( arma::s32_cube ) %armanpy_cube_const_ref_typemaps( arma::cx_cube ) %armanpy_cube_const_ref_typemaps( arma::cx_fcube ) ////////////////////////////////////////////////////////////////////////// // Typemaps for input-output arguments. That is for arguments which are // potentialliy modified in place. ////////////////////////////////////////////////////////////////////////// // A macor for generating the typemaps for one matrix type %define %armanpy_cube_ref_typemaps( ARMA_MAT_TYPE ) %typemap( typecheck, precedence=SWIG_TYPECHECK_FLOAT_ARRAY ) ( ARMA_MAT_TYPE &) { $1 = armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, false, true ); } %typemap( in, fragment="armanpy_cube_typemaps" ) ( ARMA_MAT_TYPE &) { if( ! armanpy_basic_typecheck< ARMA_MAT_TYPE >( $input, true, true ) ) SWIG_fail; if( ! armanpy_numpy_as_cube_with_shared_memory< ARMA_MAT_TYPE >( $input, &($1) ) ) SWIG_fail; } %typemap( argout, fragment="armanpy_cube_typemaps" ) ( ARMA_MAT_TYPE & ) { armanpy_cube_as_numpy_with_shared_memory( $1, $input ); } %typemap( freearg ) ( ARMA_MAT_TYPE & ) { // NOOP } %enddef %armanpy_cube_ref_typemaps( arma::Cube< double > ) %armanpy_cube_ref_typemaps( arma::Cube< float > ) %armanpy_cube_ref_typemaps( arma::Cube< int > ) %armanpy_cube_ref_typemaps( arma::Cube< unsigned > ) %armanpy_cube_ref_typemaps( arma::Cube< arma::sword > ) %armanpy_cube_ref_typemaps( arma::Cube< arma::uword > ) %armanpy_cube_ref_typemaps( arma::Cube< arma::cx_double > ) %armanpy_cube_ref_typemaps( arma::Cube< arma::cx_float > ) %armanpy_cube_ref_typemaps( arma::Cube< std::complex< double > > ) %armanpy_cube_ref_typemaps( arma::Cube< std::complex< float > > ) %armanpy_cube_ref_typemaps( arma::cube ) %armanpy_cube_ref_typemaps( arma::fcube ) %armanpy_cube_ref_typemaps( arma::icube ) %armanpy_cube_ref_typemaps( arma::ucube ) %armanpy_cube_ref_typemaps( arma::uchar_cube ) %armanpy_cube_ref_typemaps( arma::u32_cube ) %armanpy_cube_ref_typemaps( arma::s32_cube ) %armanpy_cube_ref_typemaps( arma::cx_cube ) %armanpy_cube_ref_typemaps( arma::cx_fcube ) ////////////////////////////////////////////////////////////////////////// // Typemaps for return by value functions/methods ////////////////////////////////////////////////////////////////////////// %define %armanpy_cube_return_by_value_typemaps( ARMA_MAT_TYPE ) %typemap( out ) ( ARMA_MAT_TYPE ) { PyObject* array = armanpy_cube_copy_to_numpy< ARMA_MAT_TYPE >( &$1 ); if ( !array ) SWIG_fail; $result = SWIG_Python_AppendOutput($result, array); } %enddef %armanpy_cube_return_by_value_typemaps( arma::Cube< double > ) %armanpy_cube_return_by_value_typemaps( arma::Cube< float > ) %armanpy_cube_return_by_value_typemaps( arma::Cube< int > ) %armanpy_cube_return_by_value_typemaps( arma::Cube< unsigned > ) %armanpy_cube_return_by_value_typemaps( arma::Cube< arma::sword > ) %armanpy_cube_return_by_value_typemaps( arma::Cube< arma::uword > ) %armanpy_cube_return_by_value_typemaps( arma::Cube< arma::cx_double > ) %armanpy_cube_return_by_value_typemaps( arma::Cube< arma::cx_float > ) %armanpy_cube_return_by_value_typemaps( arma::Cube< std::complex< double > > ) %armanpy_cube_return_by_value_typemaps( arma::Cube< std::complex< float > > ) %armanpy_cube_return_by_value_typemaps( arma::cube ) %armanpy_cube_return_by_value_typemaps( arma::fcube ) %armanpy_cube_return_by_value_typemaps( arma::icube ) %armanpy_cube_return_by_value_typemaps( arma::ucube ) %armanpy_cube_return_by_value_typemaps( arma::uchar_cube ) %armanpy_cube_return_by_value_typemaps( arma::u32_cube ) %armanpy_cube_return_by_value_typemaps( arma::s32_cube ) %armanpy_cube_return_by_value_typemaps( arma::cx_cube ) %armanpy_cube_return_by_value_typemaps( arma::cx_fcube ) %define %armanpy_cube_return_by_reference_typemaps( ARMA_MAT_TYPE ) %typemap( out ) ( const ARMA_MAT_TYPE & ), ( ARMA_MAT_TYPE & ) { PyObject* array = armanpy_cube_copy_to_numpy< ARMA_MAT_TYPE >( $1 ); if ( !array ) SWIG_fail; $result = SWIG_Python_AppendOutput($result, array); } %enddef %armanpy_cube_return_by_reference_typemaps( arma::Cube< double > ) %armanpy_cube_return_by_reference_typemaps( arma::Cube< float > ) %armanpy_cube_return_by_reference_typemaps( arma::Cube< int > ) %armanpy_cube_return_by_reference_typemaps( arma::Cube< unsigned > ) %armanpy_cube_return_by_reference_typemaps( arma::Cube< arma::sword > ) %armanpy_cube_return_by_reference_typemaps( arma::Cube< arma::uword > ) %armanpy_cube_return_by_reference_typemaps( arma::Cube< arma::cx_double > ) %armanpy_cube_return_by_reference_typemaps( arma::Cube< arma::cx_float > ) %armanpy_cube_return_by_reference_typemaps( arma::Cube< std::complex< double > > ) %armanpy_cube_return_by_reference_typemaps( arma::Cube< std::complex< float > > ) %armanpy_cube_return_by_reference_typemaps( arma::cube ) %armanpy_cube_return_by_reference_typemaps( arma::fcube ) %armanpy_cube_return_by_reference_typemaps( arma::icube ) %armanpy_cube_return_by_reference_typemaps( arma::ucube ) %armanpy_cube_return_by_reference_typemaps( arma::uchar_cube ) %armanpy_cube_return_by_reference_typemaps( arma::u32_cube ) %armanpy_cube_return_by_reference_typemaps( arma::s32_cube ) %armanpy_cube_return_by_reference_typemaps( arma::cx_cube ) %armanpy_cube_return_by_reference_typemaps( arma::cx_fcube ) ////////////////////////////////////////////////////////////////////////// // Typemaps for return by std::shared_ptr< ... > functions/methods ////////////////////////////////////////////////////////////////////////// #if defined(ARMANPY_SHARED_PTR) %define %armanpy_cube_return_by_bsptr_typemaps( ARMA_MAT_TYPE ) %typemap( out , fragment="armanpy_cube_typemaps" ) ( std::shared_ptr< ARMA_MAT_TYPE > ) { PyObject* array = armanpy_cube_bsptr_as_numpy_with_shared_memory< ARMA_MAT_TYPE >( $1 ); if ( !array ) { SWIG_fail; } $result = SWIG_Python_AppendOutput($result, array); } %enddef %armanpy_cube_return_by_bsptr_typemaps( arma::Cube< double > ) %armanpy_cube_return_by_bsptr_typemaps( arma::Cube< float > ) %armanpy_cube_return_by_bsptr_typemaps( arma::Cube< int > ) %armanpy_cube_return_by_bsptr_typemaps( arma::Cube< unsigned > ) %armanpy_cube_return_by_bsptr_typemaps( arma::Cube< arma::sword > ) %armanpy_cube_return_by_bsptr_typemaps( arma::Cube< arma::uword > ) %armanpy_cube_return_by_bsptr_typemaps( arma::Cube< arma::cx_double > ) %armanpy_cube_return_by_bsptr_typemaps( arma::Cube< arma::cx_float > ) %armanpy_cube_return_by_bsptr_typemaps( arma::Cube< std::complex< double > > ) %armanpy_cube_return_by_bsptr_typemaps( arma::Cube< std::complex< float > > ) %armanpy_cube_return_by_bsptr_typemaps( arma::cube ) %armanpy_cube_return_by_bsptr_typemaps( arma::fcube ) %armanpy_cube_return_by_bsptr_typemaps( arma::icube ) %armanpy_cube_return_by_bsptr_typemaps( arma::ucube ) %armanpy_cube_return_by_bsptr_typemaps( arma::uchar_cube ) %armanpy_cube_return_by_bsptr_typemaps( arma::u32_cube ) %armanpy_cube_return_by_bsptr_typemaps( arma::s32_cube ) %armanpy_cube_return_by_bsptr_typemaps( arma::cx_cube ) %armanpy_cube_return_by_bsptr_typemaps( arma::cx_fcube ) #endif ================================================ FILE: OptolithiumC/libs/armanpy/include/numpy.i ================================================ /* -*- C -*- (not really, but good for syntax highlighting) */ /* This file is included for convinience. It is taken from https://github.com/numpy/numpy/tree/master/doc/swig */ #ifdef SWIGPYTHON %{ #ifndef SWIG_FILE_WITH_INIT #define NO_IMPORT_ARRAY #endif #include "stdio.h" #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #include %} /**********************************************************************/ %fragment("NumPy_Backward_Compatibility", "header") { %#if NPY_API_VERSION < 0x00000007 %#define NPY_ARRAY_DEFAULT NPY_DEFAULT %#define NPY_ARRAY_FARRAY NPY_FARRAY %#define NPY_FORTRANORDER NPY_FORTRAN %#endif } /**********************************************************************/ /* The following code originally appeared in * enthought/kiva/agg/src/numeric.i written by Eric Jones. It was * translated from C++ to C by John Hunter. Bill Spotz has modified * it to fix some minor bugs, upgrade from Numeric to numpy (all * versions), add some comments and functionality, and convert from * direct code insertion to SWIG fragments. */ %fragment("NumPy_Macros", "header") { /* Macros to extract array attributes. */ %#if NPY_API_VERSION < 0x00000007 %#define is_array(a) ((a) && PyArray_Check((PyArrayObject*)a)) %#define array_type(a) (int)(PyArray_TYPE((PyArrayObject*)a)) %#define array_numdims(a) (((PyArrayObject*)a)->nd) %#define array_dimensions(a) (((PyArrayObject*)a)->dimensions) %#define array_size(a,i) (((PyArrayObject*)a)->dimensions[i]) %#define array_strides(a) (((PyArrayObject*)a)->strides) %#define array_stride(a,i) (((PyArrayObject*)a)->strides[i]) %#define array_data(a) (((PyArrayObject*)a)->data) %#define array_descr(a) (((PyArrayObject*)a)->descr) %#define array_flags(a) (((PyArrayObject*)a)->flags) %#define array_enableflags(a,f) (((PyArrayObject*)a)->flags) = f %#else %#define is_array(a) ((a) && PyArray_Check(a)) %#define array_type(a) PyArray_TYPE((PyArrayObject*)a) %#define array_numdims(a) PyArray_NDIM((PyArrayObject*)a) %#define array_dimensions(a) PyArray_DIMS((PyArrayObject*)a) %#define array_strides(a) PyArray_STRIDES((PyArrayObject*)a) %#define array_stride(a,i) PyArray_STRIDE((PyArrayObject*)a,i) %#define array_size(a,i) PyArray_DIM((PyArrayObject*)a,i) %#define array_data(a) PyArray_DATA((PyArrayObject*)a) %#define array_descr(a) PyArray_DESCR((PyArrayObject*)a) %#define array_flags(a) PyArray_FLAGS((PyArrayObject*)a) %#define array_enableflags(a,f) PyArray_ENABLEFLAGS((PyArrayObject*)a,f) %#endif %#define array_is_contiguous(a) (PyArray_ISCONTIGUOUS((PyArrayObject*)a)) %#define array_is_native(a) (PyArray_ISNOTSWAPPED((PyArrayObject*)a)) %#define array_is_fortran(a) (PyArray_ISFORTRAN((PyArrayObject*)a)) } /**********************************************************************/ %fragment("NumPy_Utilities", "header") { /* Given a PyObject, return a string describing its type. */ const char* pytype_string(PyObject* py_obj) { if (py_obj == NULL ) return "C NULL value"; if (py_obj == Py_None ) return "Python None" ; if (PyCallable_Check(py_obj)) return "callable" ; if (PyString_Check( py_obj)) return "string" ; if (PyInt_Check( py_obj)) return "int" ; if (PyFloat_Check( py_obj)) return "float" ; if (PyDict_Check( py_obj)) return "dict" ; if (PyList_Check( py_obj)) return "list" ; if (PyTuple_Check( py_obj)) return "tuple" ; %#if PY_MAJOR_VERSION < 3 if (PyFile_Check( py_obj)) return "file" ; if (PyModule_Check( py_obj)) return "module" ; if (PyInstance_Check(py_obj)) return "instance" ; %#endif return "unkown type"; } /* Given a NumPy typecode, return a string describing the type. */ const char* typecode_string(int typecode) { static const char* type_names[25] = {"bool", "byte", "unsigned byte", "short", "unsigned short", "int", "unsigned int", "long", "unsigned long", "long long", "unsigned long long", "float", "double", "long double", "complex float", "complex double", "complex long double", "object", "string", "unicode", "void", "ntypes", "notype", "char", "unknown"}; return typecode < 24 ? type_names[typecode] : type_names[24]; } /* Make sure input has correct numpy type. This now just calls PyArray_EquivTypenums(). */ int type_match(int actual_type, int desired_type) { return PyArray_EquivTypenums(actual_type, desired_type); } %#ifdef SWIGPY_USE_CAPSULE void free_cap(PyObject * cap) { void* array = (void*) PyCapsule_GetPointer(cap,SWIGPY_CAPSULE_NAME); if (array != NULL) free(array); } %#endif } /**********************************************************************/ %fragment("NumPy_Object_to_Array", "header", fragment="NumPy_Backward_Compatibility", fragment="NumPy_Macros", fragment="NumPy_Utilities") { /* Given a PyObject pointer, cast it to a PyArrayObject pointer if * legal. If not, set the python error string appropriately and * return NULL. */ PyArrayObject* obj_to_array_no_conversion(PyObject* input, int typecode) { PyArrayObject* ary = NULL; if (is_array(input) && (typecode == NPY_NOTYPE || PyArray_EquivTypenums(array_type(input), typecode))) { ary = (PyArrayObject*) input; } else if is_array(input) { const char* desired_type = typecode_string(typecode); const char* actual_type = typecode_string(array_type(input)); PyErr_Format(PyExc_TypeError, "Array of type '%s' required. Array of type '%s' given", desired_type, actual_type); ary = NULL; } else { const char* desired_type = typecode_string(typecode); const char* actual_type = pytype_string(input); PyErr_Format(PyExc_TypeError, "Array of type '%s' required. A '%s' was given", desired_type, actual_type); ary = NULL; } return ary; } /* Convert the given PyObject to a NumPy array with the given * typecode. On success, return a valid PyArrayObject* with the * correct type. On failure, the python error string will be set and * the routine returns NULL. */ PyArrayObject* obj_to_array_allow_conversion(PyObject* input, int typecode, int* is_new_object) { PyArrayObject* ary = NULL; PyObject* py_obj; if (is_array(input) && (typecode == NPY_NOTYPE || PyArray_EquivTypenums(array_type(input),typecode))) { ary = (PyArrayObject*) input; *is_new_object = 0; } else { py_obj = PyArray_FROMANY(input, typecode, 0, 0, NPY_ARRAY_DEFAULT); /* If NULL, PyArray_FromObject will have set python error value.*/ ary = (PyArrayObject*) py_obj; *is_new_object = 1; } return ary; } /* Given a PyArrayObject, check to see if it is contiguous. If so, * return the input pointer and flag it as not a new object. If it is * not contiguous, create a new PyArrayObject using the original data, * flag it as a new object and return the pointer. */ PyArrayObject* make_contiguous(PyArrayObject* ary, int* is_new_object, int min_dims, int max_dims) { PyArrayObject* result; if (array_is_contiguous(ary)) { result = ary; *is_new_object = 0; } else { result = (PyArrayObject*) PyArray_ContiguousFromObject((PyObject*)ary, array_type(ary), min_dims, max_dims); *is_new_object = 1; } return result; } /* Given a PyArrayObject, check to see if it is Fortran-contiguous. * If so, return the input pointer, but do not flag it as not a new * object. If it is not Fortran-contiguous, create a new * PyArrayObject using the original data, flag it as a new object * and return the pointer. */ PyArrayObject* make_fortran(PyArrayObject* ary, int* is_new_object) { PyArrayObject* result; if (array_is_fortran(ary)) { result = ary; *is_new_object = 0; } else { Py_INCREF(array_descr(ary)); result = (PyArrayObject*) PyArray_FromArray(ary, array_descr(ary), NPY_FORTRANORDER); *is_new_object = 1; } return result; } /* Convert a given PyObject to a contiguous PyArrayObject of the * specified type. If the input object is not a contiguous * PyArrayObject, a new one will be created and the new object flag * will be set. */ PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject* input, int typecode, int* is_new_object) { int is_new1 = 0; int is_new2 = 0; PyArrayObject* ary2; PyArrayObject* ary1 = obj_to_array_allow_conversion(input, typecode, &is_new1); if (ary1) { ary2 = make_contiguous(ary1, &is_new2, 0, 0); if ( is_new1 && is_new2) { Py_DECREF(ary1); } ary1 = ary2; } *is_new_object = is_new1 || is_new2; return ary1; } /* Convert a given PyObject to a Fortran-ordered PyArrayObject of the * specified type. If the input object is not a Fortran-ordered * PyArrayObject, a new one will be created and the new object flag * will be set. */ PyArrayObject* obj_to_array_fortran_allow_conversion(PyObject* input, int typecode, int* is_new_object) { int is_new1 = 0; int is_new2 = 0; PyArrayObject* ary2; PyArrayObject* ary1 = obj_to_array_allow_conversion(input, typecode, &is_new1); if (ary1) { ary2 = make_fortran(ary1, &is_new2); if (is_new1 && is_new2) { Py_DECREF(ary1); } ary1 = ary2; } *is_new_object = is_new1 || is_new2; return ary1; } } /* end fragment */ /**********************************************************************/ %fragment("NumPy_Array_Requirements", "header", fragment="NumPy_Backward_Compatibility", fragment="NumPy_Macros") { /* Test whether a python object is contiguous. If array is * contiguous, return 1. Otherwise, set the python error string and * return 0. */ int require_contiguous(PyArrayObject* ary) { int contiguous = 1; if (!array_is_contiguous(ary)) { PyErr_SetString(PyExc_TypeError, "Array must be contiguous. A non-contiguous array was given"); contiguous = 0; } return contiguous; } /* Require that a numpy array is not byte-swapped. If the array is * not byte-swapped, return 1. Otherwise, set the python error string * and return 0. */ int require_native(PyArrayObject* ary) { int native = 1; if (!array_is_native(ary)) { PyErr_SetString(PyExc_TypeError, "Array must have native byteorder. " "A byte-swapped array was given"); native = 0; } return native; } /* Require the given PyArrayObject to have a specified number of * dimensions. If the array has the specified number of dimensions, * return 1. Otherwise, set the python error string and return 0. */ int require_dimensions(PyArrayObject* ary, int exact_dimensions) { int success = 1; if (array_numdims(ary) != exact_dimensions) { PyErr_Format(PyExc_TypeError, "Array must have %d dimensions. Given array has %d dimensions", exact_dimensions, array_numdims(ary)); success = 0; } return success; } /* Require the given PyArrayObject to have one of a list of specified * number of dimensions. If the array has one of the specified number * of dimensions, return 1. Otherwise, set the python error string * and return 0. */ int require_dimensions_n(PyArrayObject* ary, int* exact_dimensions, int n) { int success = 0; int i; char dims_str[255] = ""; char s[255]; for (i = 0; i < n && !success; i++) { if (array_numdims(ary) == exact_dimensions[i]) { success = 1; } } if (!success) { for (i = 0; i < n-1; i++) { sprintf(s, "%d, ", exact_dimensions[i]); strcat(dims_str,s); } sprintf(s, " or %d", exact_dimensions[n-1]); strcat(dims_str,s); PyErr_Format(PyExc_TypeError, "Array must have %s dimensions. Given array has %d dimensions", dims_str, array_numdims(ary)); } return success; } /* Require the given PyArrayObject to have a specified shape. If the * array has the specified shape, return 1. Otherwise, set the python * error string and return 0. */ int require_size(PyArrayObject* ary, npy_intp* size, int n) { int i; int success = 1; size_t len; char desired_dims[255] = "["; char s[255]; char actual_dims[255] = "["; for(i=0; i < n;i++) { if (size[i] != -1 && size[i] != array_size(ary,i)) { success = 0; } } if (!success) { for (i = 0; i < n; i++) { if (size[i] == -1) { sprintf(s, "*,"); } else { sprintf(s, "%ld,", (long int)size[i]); } strcat(desired_dims,s); } len = strlen(desired_dims); desired_dims[len-1] = ']'; for (i = 0; i < n; i++) { sprintf(s, "%ld,", (long int)array_size(ary,i)); strcat(actual_dims,s); } len = strlen(actual_dims); actual_dims[len-1] = ']'; PyErr_Format(PyExc_TypeError, "Array must have shape of %s. Given array has shape of %s", desired_dims, actual_dims); } return success; } /* Require the given PyArrayObject to to be Fortran ordered. If the * the PyArrayObject is already Fortran ordered, do nothing. Else, * set the Fortran ordering flag and recompute the strides. */ int require_fortran(PyArrayObject* ary) { int success = 1; int nd = array_numdims(ary); int i; npy_intp * strides = array_strides(ary); if (array_is_fortran(ary)) return success; /* Set the Fortran ordered flag */ array_enableflags(ary,NPY_ARRAY_FARRAY); /* Recompute the strides */ strides[0] = strides[nd-1]; for (i=1; i < nd; ++i) strides[i] = strides[i-1] * array_size(ary,i-1); return success; } } /* Combine all NumPy fragments into one for convenience */ %fragment("NumPy_Fragments", "header", fragment="NumPy_Backward_Compatibility", fragment="NumPy_Macros", fragment="NumPy_Utilities", fragment="NumPy_Object_to_Array", fragment="NumPy_Array_Requirements") { } /* End John Hunter translation (with modifications by Bill Spotz) */ /* %numpy_typemaps() macro * * This macro defines a family of 74 typemaps that allow C arguments * of the form * * 1. (DATA_TYPE IN_ARRAY1[ANY]) * 2. (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) * 3. (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) * * 4. (DATA_TYPE IN_ARRAY2[ANY][ANY]) * 5. (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) * 6. (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) * 7. (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) * 8. (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) * * 9. (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) * 10. (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) * 11. (DATA_TYPE** IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) * 12. (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) * 13. (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) * 14. (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3) * * 15. (DATA_TYPE IN_ARRAY4[ANY][ANY][ANY][ANY]) * 16. (DATA_TYPE* IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) * 17. (DATA_TYPE** IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) * 18. (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, , DIM_TYPE DIM4, DATA_TYPE* IN_ARRAY4) * 19. (DATA_TYPE* IN_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) * 20. (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* IN_FARRAY4) * * 21. (DATA_TYPE INPLACE_ARRAY1[ANY]) * 22. (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) * 23. (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) * * 24. (DATA_TYPE INPLACE_ARRAY2[ANY][ANY]) * 25. (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) * 26. (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) * 27. (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) * 28. (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2) * * 29. (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY]) * 30. (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) * 31. (DATA_TYPE** INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) * 32. (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_ARRAY3) * 33. (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) * 34. (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_FARRAY3) * * 35. (DATA_TYPE INPLACE_ARRAY4[ANY][ANY][ANY][ANY]) * 36. (DATA_TYPE* INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) * 37. (DATA_TYPE** INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) * 38. (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* INPLACE_ARRAY4) * 39. (DATA_TYPE* INPLACE_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) * 40. (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* INPLACE_FARRAY4) * * 41. (DATA_TYPE ARGOUT_ARRAY1[ANY]) * 42. (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) * 43. (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) * * 44. (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) * * 45. (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) * * 46. (DATA_TYPE ARGOUT_ARRAY4[ANY][ANY][ANY][ANY]) * * 47. (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1) * 48. (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1) * * 49. (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) * 50. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2) * 51. (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) * 52. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2) * * 53. (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) * 54. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3) * 55. (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) * 56. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_FARRAY3) * * 57. (DATA_TYPE** ARGOUTVIEW_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) * 58. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEW_ARRAY4) * 59. (DATA_TYPE** ARGOUTVIEW_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) * 60. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEW_FARRAY4) * * 61. (DATA_TYPE** ARGOUTVIEWM_ARRAY1, DIM_TYPE* DIM1) * 62. (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEWM_ARRAY1) * * 63. (DATA_TYPE** ARGOUTVIEWM_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) * 64. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_ARRAY2) * 65. (DATA_TYPE** ARGOUTVIEWM_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) * 66. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_FARRAY2) * * 67. (DATA_TYPE** ARGOUTVIEWM_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) * 68. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_ARRAY3) * 69. (DATA_TYPE** ARGOUTVIEWM_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) * 70. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_FARRAY3) * * 71. (DATA_TYPE** ARGOUTVIEWM_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) * 72. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_ARRAY4) * 73. (DATA_TYPE** ARGOUTVIEWM_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) * 74. (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_FARRAY4) * * where "DATA_TYPE" is any type supported by the NumPy module, and * "DIM_TYPE" is any int-like type suitable for specifying dimensions. * The difference between "ARRAY" typemaps and "FARRAY" typemaps is * that the "FARRAY" typemaps expect Fortran ordering of * multidimensional arrays. In python, the dimensions will not need * to be specified (except for the "DATA_TYPE* ARGOUT_ARRAY1" * typemaps). The IN_ARRAYs can be a numpy array or any sequence that * can be converted to a numpy array of the specified type. The * INPLACE_ARRAYs must be numpy arrays of the appropriate type. The * ARGOUT_ARRAYs will be returned as new numpy arrays of the * appropriate type. * * These typemaps can be applied to existing functions using the * %apply directive. For example: * * %apply (double* IN_ARRAY1, int DIM1) {(double* series, int length)}; * double prod(double* series, int length); * * %apply (int DIM1, int DIM2, double* INPLACE_ARRAY2) * {(int rows, int cols, double* matrix )}; * void floor(int rows, int cols, double* matrix, double f); * * %apply (double IN_ARRAY3[ANY][ANY][ANY]) * {(double tensor[2][2][2] )}; * %apply (double ARGOUT_ARRAY3[ANY][ANY][ANY]) * {(double low[2][2][2] )}; * %apply (double ARGOUT_ARRAY3[ANY][ANY][ANY]) * {(double upp[2][2][2] )}; * void luSplit(double tensor[2][2][2], * double low[2][2][2], * double upp[2][2][2] ); * * or directly with * * double prod(double* IN_ARRAY1, int DIM1); * * void floor(int DIM1, int DIM2, double* INPLACE_ARRAY2, double f); * * void luSplit(double IN_ARRAY3[ANY][ANY][ANY], * double ARGOUT_ARRAY3[ANY][ANY][ANY], * double ARGOUT_ARRAY3[ANY][ANY][ANY]); */ %define %numpy_typemaps(DATA_TYPE, DATA_TYPECODE, DIM_TYPE) /************************/ /* Input Array Typemaps */ /************************/ /* Typemap suite for (DATA_TYPE IN_ARRAY1[ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE IN_ARRAY1[ANY]) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE IN_ARRAY1[ANY]) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[1] = { $1_dim0 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 1) || !require_size(array, size, 1)) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(freearg) (DATA_TYPE IN_ARRAY1[ANY]) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[1] = { -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 1) || !require_size(array, size, 1)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); } %typemap(freearg) (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[1] = {-1}; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 1) || !require_size(array, size, 1)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE IN_ARRAY2[ANY][ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE IN_ARRAY2[ANY][ANY]) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE IN_ARRAY2[ANY][ANY]) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[2] = { $1_dim0, $1_dim1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 2) || !require_size(array, size, 2)) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(freearg) (DATA_TYPE IN_ARRAY2[ANY][ANY]) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[2] = { -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 2) || !require_size(array, size, 2)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); } %typemap(freearg) (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[2] = { -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 2) || !require_size(array, size, 2)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[2] = { -1, -1 }; array = obj_to_array_fortran_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 2) || !require_size(array, size, 2) || !require_fortran(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); } %typemap(freearg) (DATA_TYPE* IN_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[2] = { -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 2) || !require_size(array, size, 2) || !require_fortran(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_FARRAY2) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[3] = { $1_dim0, $1_dim1, $1_dim2 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 3) || !require_size(array, size, 3)) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(freearg) (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[3] = { -1, -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 3) || !require_size(array, size, 3)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); } %typemap(freearg) (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE** IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE** IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { /* for now, only concerned with lists */ $1 = PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE** IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) (DATA_TYPE** array=NULL, PyArrayObject** object_array=NULL, int* is_new_object_array=NULL) { npy_intp size[2] = { -1, -1 }; PyArrayObject* temp_array; Py_ssize_t i; int is_new_object; /* length of the list */ $2 = PyList_Size($input); /* the arrays */ array = (DATA_TYPE **)malloc($2*sizeof(DATA_TYPE *)); object_array = (PyArrayObject **)calloc($2,sizeof(PyArrayObject *)); is_new_object_array = (int *)calloc($2,sizeof(int)); if (array == NULL || object_array == NULL || is_new_object_array == NULL) { SWIG_fail; } for (i=0; i<$2; i++) { temp_array = obj_to_array_contiguous_allow_conversion(PySequence_GetItem($input,i), DATA_TYPECODE, &is_new_object); /* the new array must be stored so that it can be destroyed in freearg */ object_array[i] = temp_array; is_new_object_array[i] = is_new_object; if (!temp_array || !require_dimensions(temp_array, 2)) SWIG_fail; /* store the size of the first array in the list, then use that for comparison. */ if (i == 0) { size[0] = array_size(temp_array,0); size[1] = array_size(temp_array,1); } if (!require_size(temp_array, size, 2)) SWIG_fail; array[i] = (DATA_TYPE*) array_data(temp_array); } $1 = (DATA_TYPE**) array; $3 = (DIM_TYPE) size[0]; $4 = (DIM_TYPE) size[1]; } %typemap(freearg) (DATA_TYPE** IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { Py_ssize_t i; if (array$argnum!=NULL) free(array$argnum); /*freeing the individual arrays if needed */ if (object_array$argnum!=NULL) { if (is_new_object_array$argnum!=NULL) { for (i=0; i<$2; i++) { if (object_array$argnum[i] != NULL && is_new_object_array$argnum[i]) { Py_DECREF(object_array$argnum[i]); } } free(is_new_object_array$argnum); } free(object_array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, * DATA_TYPE* IN_ARRAY3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[3] = { -1, -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 3) || !require_size(array, size, 3)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[3] = { -1, -1, -1 }; array = obj_to_array_fortran_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 3) || !require_size(array, size, 3) | !require_fortran(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); } %typemap(freearg) (DATA_TYPE* IN_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, * DATA_TYPE* IN_FARRAY3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[3] = { -1, -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 3) || !require_size(array, size, 3) || !require_fortran(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_FARRAY3) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE IN_ARRAY4[ANY][ANY][ANY][ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE IN_ARRAY4[ANY][ANY][ANY][ANY]) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE IN_ARRAY4[ANY][ANY][ANY][ANY]) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[4] = { $1_dim0, $1_dim1, $1_dim2 , $1_dim3}; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 4) || !require_size(array, size, 4)) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(freearg) (DATA_TYPE IN_ARRAY4[ANY][ANY][ANY][ANY]) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3, DIM_TYPE DIM4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[4] = { -1, -1, -1, -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 4) || !require_size(array, size, 4)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); $5 = (DIM_TYPE) array_size(array,3); } %typemap(freearg) (DATA_TYPE* IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE** IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3, DIM_TYPE DIM4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE** IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { /* for now, only concerned with lists */ $1 = PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE** IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) (DATA_TYPE** array=NULL, PyArrayObject** object_array=NULL, int* is_new_object_array=NULL) { npy_intp size[3] = { -1, -1, -1 }; PyArrayObject* temp_array; Py_ssize_t i; int is_new_object; /* length of the list */ $2 = PyList_Size($input); /* the arrays */ array = (DATA_TYPE **)malloc($2*sizeof(DATA_TYPE *)); object_array = (PyArrayObject **)calloc($2,sizeof(PyArrayObject *)); is_new_object_array = (int *)calloc($2,sizeof(int)); if (array == NULL || object_array == NULL || is_new_object_array == NULL) { SWIG_fail; } for (i=0; i<$2; i++) { temp_array = obj_to_array_contiguous_allow_conversion(PySequence_GetItem($input,i), DATA_TYPECODE, &is_new_object); /* the new array must be stored so that it can be destroyed in freearg */ object_array[i] = temp_array; is_new_object_array[i] = is_new_object; if (!temp_array || !require_dimensions(temp_array, 3)) SWIG_fail; /* store the size of the first array in the list, then use that for comparison. */ if (i == 0) { size[0] = array_size(temp_array,0); size[1] = array_size(temp_array,1); size[2] = array_size(temp_array,2); } if (!require_size(temp_array, size, 3)) SWIG_fail; array[i] = (DATA_TYPE*) array_data(temp_array); } $1 = (DATA_TYPE**) array; $3 = (DIM_TYPE) size[0]; $4 = (DIM_TYPE) size[1]; $5 = (DIM_TYPE) size[2]; } %typemap(freearg) (DATA_TYPE** IN_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { Py_ssize_t i; if (array$argnum!=NULL) free(array$argnum); /*freeing the individual arrays if needed */ if (object_array$argnum!=NULL) { if (is_new_object_array$argnum!=NULL) { for (i=0; i<$2; i++) { if (object_array$argnum[i] != NULL && is_new_object_array$argnum[i]) { Py_DECREF(object_array$argnum[i]); } } free(is_new_object_array$argnum); } free(object_array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, * DATA_TYPE* IN_ARRAY4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* IN_ARRAY4) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* IN_ARRAY4) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[4] = { -1, -1, -1 , -1}; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 4) || !require_size(array, size, 4)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DIM_TYPE) array_size(array,3); $5 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* IN_ARRAY4) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3, DIM_TYPE DIM4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* IN_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* IN_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[4] = { -1, -1, -1, -1 }; array = obj_to_array_fortran_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 4) || !require_size(array, size, 4) | !require_fortran(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); $5 = (DIM_TYPE) array_size(array,3); } %typemap(freearg) (DATA_TYPE* IN_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, * DATA_TYPE* IN_FARRAY4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* IN_FARRAY4) { $1 = is_array($input) || PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* IN_FARRAY4) (PyArrayObject* array=NULL, int is_new_object=0) { npy_intp size[4] = { -1, -1, -1 , -1 }; array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE, &is_new_object); if (!array || !require_dimensions(array, 4) || !require_size(array, size, 4) || !require_fortran(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DIM_TYPE) array_size(array,3); $5 = (DATA_TYPE*) array_data(array); } %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* IN_FARRAY4) { if (is_new_object$argnum && array$argnum) { Py_DECREF(array$argnum); } } /***************************/ /* In-Place Array Typemaps */ /***************************/ /* Typemap suite for (DATA_TYPE INPLACE_ARRAY1[ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE INPLACE_ARRAY1[ANY]) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE INPLACE_ARRAY1[ANY]) (PyArrayObject* array=NULL) { npy_intp size[1] = { $1_dim0 }; array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,1) || !require_size(array, size, 1) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = ($1_ltype) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) (PyArrayObject* array=NULL, int i=1) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,1) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = 1; for (i=0; i < array_numdims(array); ++i) $2 *= array_size(array,i); } /* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1) (PyArrayObject* array=NULL, int i=0) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,1) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = 1; for (i=0; i < array_numdims(array); ++i) $1 *= array_size(array,i); $2 = (DATA_TYPE*) array_data(array); } /* Typemap suite for (DATA_TYPE INPLACE_ARRAY2[ANY][ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE INPLACE_ARRAY2[ANY][ANY]) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE INPLACE_ARRAY2[ANY][ANY]) (PyArrayObject* array=NULL) { npy_intp size[2] = { $1_dim0, $1_dim1 }; array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,2) || !require_size(array, size, 2) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = ($1_ltype) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,2) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_ARRAY2) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,2) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DATA_TYPE*) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_FARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,2) || !require_contiguous(array) || !require_native(array) || !require_fortran(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* INPLACE_FARRAY2) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,2) || !require_contiguous(array) || !require_native(array) || !require_fortran(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DATA_TYPE*) array_data(array); } /* Typemap suite for (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY]) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE INPLACE_ARRAY3[ANY][ANY][ANY]) (PyArrayObject* array=NULL) { npy_intp size[3] = { $1_dim0, $1_dim1, $1_dim2 }; array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,3) || !require_size(array, size, 3) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = ($1_ltype) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,3) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); } /* Typemap suite for (DATA_TYPE** INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE** INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { $1 = PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE** INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) (DATA_TYPE** array=NULL, PyArrayObject** object_array=NULL) { npy_intp size[2] = { -1, -1 }; PyArrayObject* temp_array; Py_ssize_t i; /* length of the list */ $2 = PyList_Size($input); /* the arrays */ array = (DATA_TYPE **)malloc($2*sizeof(DATA_TYPE *)); object_array = (PyArrayObject **)calloc($2,sizeof(PyArrayObject *)); if (array == NULL || object_array == NULL) { SWIG_fail; } for (i=0; i<$2; i++) { temp_array = obj_to_array_no_conversion(PySequence_GetItem($input,i), DATA_TYPECODE); /* the new array must be stored so that it can be destroyed in freearg */ object_array[i] = temp_array; if ( !temp_array || !require_dimensions(temp_array, 2) || !require_contiguous(temp_array) || !require_native(temp_array) || !PyArray_EquivTypenums(array_type(temp_array), DATA_TYPECODE) ) SWIG_fail; /* store the size of the first array in the list, then use that for comparison. */ if (i == 0) { size[0] = array_size(temp_array,0); size[1] = array_size(temp_array,1); } if (!require_size(temp_array, size, 2)) SWIG_fail; array[i] = (DATA_TYPE*) array_data(temp_array); } $1 = (DATA_TYPE**) array; $3 = (DIM_TYPE) size[0]; $4 = (DIM_TYPE) size[1]; } %typemap(freearg) (DATA_TYPE** INPLACE_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { if (array$argnum!=NULL) free(array$argnum); if (object_array$argnum!=NULL) free(object_array$argnum); } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, * DATA_TYPE* INPLACE_ARRAY3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_ARRAY3) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_ARRAY3) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,3) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DATA_TYPE*) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_FARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,3) || !require_contiguous(array) || !require_native(array) || !require_fortran(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, * DATA_TYPE* INPLACE_FARRAY3) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_FARRAY3) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* INPLACE_FARRAY3) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,3) || !require_contiguous(array) || !require_native(array) || !require_fortran(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DATA_TYPE*) array_data(array); } /* Typemap suite for (DATA_TYPE INPLACE_ARRAY4[ANY][ANY][ANY][ANY]) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE INPLACE_ARRAY4[ANY][ANY][ANY][ANY]) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE INPLACE_ARRAY4[ANY][ANY][ANY][ANY]) (PyArrayObject* array=NULL) { npy_intp size[4] = { $1_dim0, $1_dim1, $1_dim2 , $1_dim3 }; array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,4) || !require_size(array, size, 4) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = ($1_ltype) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3, DIM_TYPE DIM4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,4) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); $5 = (DIM_TYPE) array_size(array,3); } /* Typemap suite for (DATA_TYPE** INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3, DIM_TYPE DIM4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE** INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { $1 = PySequence_Check($input); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE** INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) (DATA_TYPE** array=NULL, PyArrayObject** object_array=NULL) { npy_intp size[3] = { -1, -1, -1 }; PyArrayObject* temp_array; Py_ssize_t i; /* length of the list */ $2 = PyList_Size($input); /* the arrays */ array = (DATA_TYPE **)malloc($2*sizeof(DATA_TYPE *)); object_array = (PyArrayObject **)calloc($2,sizeof(PyArrayObject *)); if (array == NULL || object_array == NULL) { SWIG_fail; } for (i=0; i<$2; i++) { temp_array = obj_to_array_no_conversion(PySequence_GetItem($input,i), DATA_TYPECODE); /* the new array must be stored so that it can be destroyed in freearg */ object_array[i] = temp_array; if ( !temp_array || !require_dimensions(temp_array, 3) || !require_contiguous(temp_array) || !require_native(temp_array) || !PyArray_EquivTypenums(array_type(temp_array), DATA_TYPECODE) ) SWIG_fail; /* store the size of the first array in the list, then use that for comparison. */ if (i == 0) { size[0] = array_size(temp_array,0); size[1] = array_size(temp_array,1); size[2] = array_size(temp_array,2); } if (!require_size(temp_array, size, 3)) SWIG_fail; array[i] = (DATA_TYPE*) array_data(temp_array); } $1 = (DATA_TYPE**) array; $3 = (DIM_TYPE) size[0]; $4 = (DIM_TYPE) size[1]; $5 = (DIM_TYPE) size[2]; } %typemap(freearg) (DATA_TYPE** INPLACE_ARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { if (array$argnum!=NULL) free(array$argnum); if (object_array$argnum!=NULL) free(object_array$argnum); } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, * DATA_TYPE* INPLACE_ARRAY4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* INPLACE_ARRAY4) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* INPLACE_ARRAY4) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,4) || !require_contiguous(array) || !require_native(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DIM_TYPE) array_size(array,3); $5 = (DATA_TYPE*) array_data(array); } /* Typemap suite for (DATA_TYPE* INPLACE_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, * DIM_TYPE DIM3, DIM_TYPE DIM4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DATA_TYPE* INPLACE_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DATA_TYPE* INPLACE_FARRAY4, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,4) || !require_contiguous(array) || !require_native(array) || !require_fortran(array)) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); $2 = (DIM_TYPE) array_size(array,0); $3 = (DIM_TYPE) array_size(array,1); $4 = (DIM_TYPE) array_size(array,2); $5 = (DIM_TYPE) array_size(array,3); } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, * DATA_TYPE* INPLACE_FARRAY4) */ %typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY, fragment="NumPy_Macros") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* INPLACE_FARRAY4) { $1 = is_array($input) && PyArray_EquivTypenums(array_type($input), DATA_TYPECODE); } %typemap(in, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DIM_TYPE DIM4, DATA_TYPE* INPLACE_FARRAY4) (PyArrayObject* array=NULL) { array = obj_to_array_no_conversion($input, DATA_TYPECODE); if (!array || !require_dimensions(array,4) || !require_contiguous(array) || !require_native(array) || !require_fortran(array)) SWIG_fail; $1 = (DIM_TYPE) array_size(array,0); $2 = (DIM_TYPE) array_size(array,1); $3 = (DIM_TYPE) array_size(array,2); $4 = (DIM_TYPE) array_size(array,3); $5 = (DATA_TYPE*) array_data(array); } /*************************/ /* Argout Array Typemaps */ /*************************/ /* Typemap suite for (DATA_TYPE ARGOUT_ARRAY1[ANY]) */ %typemap(in,numinputs=0, fragment="NumPy_Backward_Compatibility,NumPy_Macros") (DATA_TYPE ARGOUT_ARRAY1[ANY]) (PyObject* array = NULL) { npy_intp dims[1] = { $1_dim0 }; array = PyArray_SimpleNew(1, dims, DATA_TYPECODE); if (!array) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(argout) (DATA_TYPE ARGOUT_ARRAY1[ANY]) { $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); } /* Typemap suite for (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) */ %typemap(in,numinputs=1, fragment="NumPy_Fragments") (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) (PyObject* array = NULL) { npy_intp dims[1]; if (!PyInt_Check($input)) { const char* typestring = pytype_string($input); PyErr_Format(PyExc_TypeError, "Int dimension expected. '%s' given.", typestring); SWIG_fail; } $2 = (DIM_TYPE) PyInt_AsLong($input); dims[0] = (npy_intp) $2; array = PyArray_SimpleNew(1, dims, DATA_TYPECODE); if (!array) SWIG_fail; $1 = (DATA_TYPE*) array_data(array); } %typemap(argout) (DATA_TYPE* ARGOUT_ARRAY1, DIM_TYPE DIM1) { $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); } /* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) */ %typemap(in,numinputs=1, fragment="NumPy_Fragments") (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) (PyObject* array = NULL) { npy_intp dims[1]; if (!PyInt_Check($input)) { const char* typestring = pytype_string($input); PyErr_Format(PyExc_TypeError, "Int dimension expected. '%s' given.", typestring); SWIG_fail; } $1 = (DIM_TYPE) PyInt_AsLong($input); dims[0] = (npy_intp) $1; array = PyArray_SimpleNew(1, dims, DATA_TYPECODE); if (!array) SWIG_fail; $2 = (DATA_TYPE*) array_data(array); } %typemap(argout) (DIM_TYPE DIM1, DATA_TYPE* ARGOUT_ARRAY1) { $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); } /* Typemap suite for (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) */ %typemap(in,numinputs=0, fragment="NumPy_Backward_Compatibility,NumPy_Macros") (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) (PyObject* array = NULL) { npy_intp dims[2] = { $1_dim0, $1_dim1 }; array = PyArray_SimpleNew(2, dims, DATA_TYPECODE); if (!array) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(argout) (DATA_TYPE ARGOUT_ARRAY2[ANY][ANY]) { $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); } /* Typemap suite for (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) */ %typemap(in,numinputs=0, fragment="NumPy_Backward_Compatibility,NumPy_Macros") (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) (PyObject* array = NULL) { npy_intp dims[3] = { $1_dim0, $1_dim1, $1_dim2 }; array = PyArray_SimpleNew(3, dims, DATA_TYPECODE); if (!array) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(argout) (DATA_TYPE ARGOUT_ARRAY3[ANY][ANY][ANY]) { $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); } /* Typemap suite for (DATA_TYPE ARGOUT_ARRAY4[ANY][ANY][ANY][ANY]) */ %typemap(in,numinputs=0, fragment="NumPy_Backward_Compatibility,NumPy_Macros") (DATA_TYPE ARGOUT_ARRAY4[ANY][ANY][ANY][ANY]) (PyObject* array = NULL) { npy_intp dims[4] = { $1_dim0, $1_dim1, $1_dim2, $1_dim3 }; array = PyArray_SimpleNew(4, dims, DATA_TYPECODE); if (!array) SWIG_fail; $1 = ($1_ltype) array_data(array); } %typemap(argout) (DATA_TYPE ARGOUT_ARRAY4[ANY][ANY][ANY][ANY]) { $result = SWIG_Python_AppendOutput($result,(PyObject*)array$argnum); } /*****************************/ /* Argoutview Array Typemaps */ /*****************************/ /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim_temp) { $1 = &data_temp; $2 = &dim_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DATA_TYPE** ARGOUTVIEW_ARRAY1, DIM_TYPE* DIM1) { npy_intp dims[1] = { *$2 }; PyObject* obj = PyArray_SimpleNewFromData(1, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DATA_TYPE** ARGOUTVIEW_ARRAY1) (DIM_TYPE dim_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim_temp; $2 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_ARRAY1) { npy_intp dims[1] = { *$1 }; PyObject* obj = PyArray_SimpleNewFromData(1, dims, DATA_TYPECODE, (void*)(*$2)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DATA_TYPE** ARGOUTVIEW_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) { npy_intp dims[2] = { *$2, *$3 }; PyObject* obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DATA_TYPE** ARGOUTVIEW_ARRAY2) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_ARRAY2) { npy_intp dims[2] = { *$1, *$2 }; PyObject* obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$3)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DATA_TYPE** ARGOUTVIEW_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) { npy_intp dims[2] = { *$2, *$3 }; PyObject* obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DATA_TYPE** ARGOUTVIEW_FARRAY2) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEW_FARRAY2) { npy_intp dims[2] = { *$1, *$2 }; PyObject* obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$3)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DATA_TYPE** ARGOUTVIEW_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) { npy_intp dims[3] = { *$2, *$3, *$4 }; PyObject* obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DATA_TYPE* data_temp = NULL) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_ARRAY3) { npy_intp dims[3] = { *$1, *$2, *$3 }; PyObject* obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$4)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DATA_TYPE** ARGOUTVIEW_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) { npy_intp dims[3] = { *$2, *$3, *$4 }; PyObject* obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || require_fortran(array)) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_FARRAY3) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DATA_TYPE** ARGOUTVIEW_FARRAY3) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEW_FARRAY3) { npy_intp dims[3] = { *$1, *$2, *$3 }; PyObject* obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$4)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || require_fortran(array)) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_ARRAY4, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; $5 = &dim4_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DATA_TYPE** ARGOUTVIEW_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) { npy_intp dims[4] = { *$2, *$3, *$4 , *$5 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEW_ARRAY4) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 , DATA_TYPE** ARGOUTVIEW_ARRAY4) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &dim4_temp; $5 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEW_ARRAY4) { npy_intp dims[4] = { *$1, *$2, *$3 , *$4 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$5)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEW_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEW_FARRAY4, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; $5 = &dim4_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DATA_TYPE** ARGOUTVIEW_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) { npy_intp dims[4] = { *$2, *$3, *$4 , *$5 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || require_fortran(array)) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEW_FARRAY4) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 , DATA_TYPE** ARGOUTVIEW_FARRAY4) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &dim4_temp; $5 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEW_FARRAY4) { npy_intp dims[4] = { *$1, *$2, *$3 , *$4 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$5)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || require_fortran(array)) SWIG_fail; $result = SWIG_Python_AppendOutput($result,obj); } /*************************************/ /* Managed Argoutview Array Typemaps */ /*************************************/ /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY1, DIM_TYPE* DIM1) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_ARRAY1, DIM_TYPE* DIM1 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim_temp) { $1 = &data_temp; $2 = &dim_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DATA_TYPE** ARGOUTVIEWM_ARRAY1, DIM_TYPE* DIM1) { npy_intp dims[1] = { *$2 }; PyObject* obj = PyArray_SimpleNewFromData(1, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEWM_ARRAY1) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DATA_TYPE** ARGOUTVIEWM_ARRAY1) (DIM_TYPE dim_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim_temp; $2 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEWM_ARRAY1) { npy_intp dims[1] = { *$1 }; PyObject* obj = PyArray_SimpleNewFromData(1, dims, DATA_TYPECODE, (void*)(*$2)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_ARRAY2, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DATA_TYPE** ARGOUTVIEWM_ARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) { npy_intp dims[2] = { *$2, *$3 }; PyObject* obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_ARRAY2) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DATA_TYPE** ARGOUTVIEWM_ARRAY2) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_ARRAY2) { npy_intp dims[2] = { *$1, *$2 }; PyObject* obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$3)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_FARRAY2, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DATA_TYPE** ARGOUTVIEWM_FARRAY2, DIM_TYPE* DIM1, DIM_TYPE* DIM2) { npy_intp dims[2] = { *$2, *$3 }; PyObject* obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_FARRAY2) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DATA_TYPE** ARGOUTVIEWM_FARRAY2) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DATA_TYPE** ARGOUTVIEWM_FARRAY2) { npy_intp dims[2] = { *$1, *$2 }; PyObject* obj = PyArray_SimpleNewFromData(2, dims, DATA_TYPECODE, (void*)(*$3)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || !require_fortran(array)) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_ARRAY3, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DATA_TYPE** ARGOUTVIEWM_ARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) { npy_intp dims[3] = { *$2, *$3, *$4 }; PyObject* obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_ARRAY3) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DATA_TYPE** ARGOUTVIEWM_ARRAY3) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_ARRAY3) { npy_intp dims[3] = { *$1, *$2, *$3 }; PyObject* obj= PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$4)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_FARRAY3, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DATA_TYPE** ARGOUTVIEWM_FARRAY3, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) { npy_intp dims[3] = { *$2, *$3, *$4 }; PyObject* obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || require_fortran(array)) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_FARRAY3) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DATA_TYPE** ARGOUTVIEWM_FARRAY3) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DATA_TYPE** ARGOUTVIEWM_FARRAY3) { npy_intp dims[3] = { *$1, *$2, *$3 }; PyObject* obj = PyArray_SimpleNewFromData(3, dims, DATA_TYPECODE, (void*)(*$4)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || require_fortran(array)) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_ARRAY4, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; $5 = &dim4_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DATA_TYPE** ARGOUTVIEWM_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) { npy_intp dims[4] = { *$2, *$3, *$4 , *$5 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_ARRAY4) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 , DATA_TYPE** ARGOUTVIEWM_ARRAY4) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &dim4_temp; $5 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_ARRAY4) { npy_intp dims[4] = { *$1, *$2, *$3 , *$4 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$5)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_FARRAY4, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; $5 = &dim4_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DATA_TYPE** ARGOUTVIEWM_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3) { npy_intp dims[4] = { *$2, *$3, *$4 , *$5 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || require_fortran(array)) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_FARRAY4) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 , DATA_TYPE** ARGOUTVIEWM_FARRAY4) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &dim4_temp; $5 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_FARRAY4) { npy_intp dims[4] = { *$1, *$2, *$3 , *$4 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$5)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || require_fortran(array)) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_ARRAY4, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; $5 = &dim4_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DATA_TYPE** ARGOUTVIEWM_ARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) { npy_intp dims[4] = { *$2, *$3, *$4 , *$5 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_ARRAY4) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 , DATA_TYPE** ARGOUTVIEWM_ARRAY4) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &dim4_temp; $5 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_ARRAY4) { npy_intp dims[4] = { *$1, *$2, *$3 , *$4 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$5)); PyArrayObject* array = (PyArrayObject*) obj; if (!array) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DATA_TYPE** ARGOUTVIEWM_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) */ %typemap(in,numinputs=0) (DATA_TYPE** ARGOUTVIEWM_FARRAY4, DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 ) (DATA_TYPE* data_temp = NULL , DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp) { $1 = &data_temp; $2 = &dim1_temp; $3 = &dim2_temp; $4 = &dim3_temp; $5 = &dim4_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DATA_TYPE** ARGOUTVIEWM_FARRAY4, DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4) { npy_intp dims[4] = { *$2, *$3, *$4 , *$5 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$1)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || require_fortran(array)) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } /* Typemap suite for (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_FARRAY4) */ %typemap(in,numinputs=0) (DIM_TYPE* DIM1 , DIM_TYPE* DIM2 , DIM_TYPE* DIM3 , DIM_TYPE* DIM4 , DATA_TYPE** ARGOUTVIEWM_FARRAY4) (DIM_TYPE dim1_temp, DIM_TYPE dim2_temp, DIM_TYPE dim3_temp, DIM_TYPE dim4_temp, DATA_TYPE* data_temp = NULL ) { $1 = &dim1_temp; $2 = &dim2_temp; $3 = &dim3_temp; $4 = &dim4_temp; $5 = &data_temp; } %typemap(argout, fragment="NumPy_Backward_Compatibility,NumPy_Array_Requirements") (DIM_TYPE* DIM1, DIM_TYPE* DIM2, DIM_TYPE* DIM3, DIM_TYPE* DIM4, DATA_TYPE** ARGOUTVIEWM_FARRAY4) { npy_intp dims[4] = { *$1, *$2, *$3 , *$4 }; PyObject* obj = PyArray_SimpleNewFromData(4, dims, DATA_TYPECODE, (void*)(*$5)); PyArrayObject* array = (PyArrayObject*) obj; if (!array || require_fortran(array)) SWIG_fail; %#ifdef SWIGPY_USE_CAPSULE PyObject* cap = PyCapsule_New((void*)(*$1), SWIGPY_CAPSULE_NAME, free_cap); %#else PyObject* cap = PyCObject_FromVoidPtr((void*)(*$1), free); %#endif %#if NPY_API_VERSION < 0x00000007 PyArray_BASE(array) = cap; %#else PyArray_SetBaseObject(array,cap); %#endif $result = SWIG_Python_AppendOutput($result,obj); } %enddef /* %numpy_typemaps() macro */ /* *************************************************************** */ /* Concrete instances of the %numpy_typemaps() macro: Each invocation * below applies all of the typemaps above to the specified data type. */ %numpy_typemaps(signed char , NPY_BYTE , int) %numpy_typemaps(unsigned char , NPY_UBYTE , int) %numpy_typemaps(short , NPY_SHORT , int) %numpy_typemaps(unsigned short , NPY_USHORT , int) %numpy_typemaps(int , NPY_INT , int) %numpy_typemaps(unsigned int , NPY_UINT , int) %numpy_typemaps(long , NPY_LONG , int) %numpy_typemaps(unsigned long , NPY_ULONG , int) %numpy_typemaps(long long , NPY_LONGLONG , int) %numpy_typemaps(unsigned long long, NPY_ULONGLONG, int) %numpy_typemaps(float , NPY_FLOAT , int) %numpy_typemaps(double , NPY_DOUBLE , int) /* *************************************************************** * The follow macro expansion does not work, because C++ bool is 4 * bytes and NPY_BOOL is 1 byte * * %numpy_typemaps(bool, NPY_BOOL, int) */ /* *************************************************************** * On my Mac, I get the following warning for this macro expansion: * 'swig/python detected a memory leak of type 'long double *', no destructor found.' * * %numpy_typemaps(long double, NPY_LONGDOUBLE, int) */ /* *************************************************************** * Swig complains about a syntax error for the following macro * expansions: * * %numpy_typemaps(complex float, NPY_CFLOAT , int) * * %numpy_typemaps(complex double, NPY_CDOUBLE, int) * * %numpy_typemaps(complex long double, NPY_CLONGDOUBLE, int) */ #endif /* SWIGPYTHON */ ================================================ FILE: OptolithiumC/libs/clipper/CMakeLists.txt ================================================ CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0) PROJECT(polyclipping) SET(CMAKE_USE_RELATIVE_PATHS ON) SET(CMAKE_SKIP_RPATH TRUE) SET(CMAKE_BUILD_TYPE "Release") INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/include") ADD_LIBRARY(polyclipping STATIC "src/clipper.cpp") ================================================ FILE: OptolithiumC/libs/clipper/include/clipper.hpp ================================================ /******************************************************************************* * * * Author : Angus Johnson * * Version : 6.2.1 * * Date : 31 October 2014 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2010-2014 * * * * License: * * Use, modification & distribution is subject to Boost Software License Ver 1. * * http://www.boost.org/LICENSE_1_0.txt * * * * Attributions: * * The code in this library is an extension of Bala Vatti's clipping algorithm: * * "A generic solution to polygon clipping" * * Communications of the ACM, Vol 35, Issue 7 (July 1992) pp 56-63. * * http://portal.acm.org/citation.cfm?id=129906 * * * * Computer graphics and geometric modeling: implementation and algorithms * * By Max K. Agoston * * Springer; 1 edition (January 4, 2005) * * http://books.google.com/books?q=vatti+clipping+agoston * * * * See also: * * "Polygon Offsetting by Computing Winding Numbers" * * Paper no. DETC2005-85513 pp. 565-575 * * ASME 2005 International Design Engineering Technical Conferences * * and Computers and Information in Engineering Conference (IDETC/CIE2005) * * September 24-28, 2005 , Long Beach, California, USA * * http://www.me.berkeley.edu/~mcmains/pubs/DAC05OffsetPolygon.pdf * * * *******************************************************************************/ #ifndef clipper_hpp #define clipper_hpp #define CLIPPER_VERSION "6.2.0" //use_int32: When enabled 32bit ints are used instead of 64bit ints. This //improve performance but coordinate values are limited to the range +/- 46340 //#define use_int32 //use_xyz: adds a Z member to IntPoint. Adds a minor cost to perfomance. //#define use_xyz //use_lines: Enables line clipping. Adds a very minor cost to performance. //#define use_lines //use_deprecated: Enables temporary support for the obsolete functions //#define use_deprecated #include #include #include #include #include #include #include #include namespace ClipperLib { enum ClipType { ctIntersection, ctUnion, ctDifference, ctXor }; enum PolyType { ptSubject, ptClip }; //By far the most widely used winding rules for polygon filling are //EvenOdd & NonZero (GDI, GDI+, XLib, OpenGL, Cairo, AGG, Quartz, SVG, Gr32) //Others rules include Positive, Negative and ABS_GTR_EQ_TWO (only in OpenGL) //see http://glprogramming.com/red/chapter11.html enum PolyFillType { pftEvenOdd, pftNonZero, pftPositive, pftNegative }; #ifdef use_int32 typedef int cInt; static cInt const loRange = 0x7FFF; static cInt const hiRange = 0x7FFF; #else typedef signed long long cInt; static cInt const loRange = 0x3FFFFFFF; static cInt const hiRange = 0x3FFFFFFFFFFFFFFFLL; typedef signed long long long64; //used by Int128 class typedef unsigned long long ulong64; #endif struct IntPoint { cInt X; cInt Y; #ifdef use_xyz cInt Z; IntPoint(cInt x = 0, cInt y = 0, cInt z = 0): X(x), Y(y), Z(z) {}; #else IntPoint(cInt x = 0, cInt y = 0): X(x), Y(y) {}; #endif friend inline bool operator== (const IntPoint& a, const IntPoint& b) { return a.X == b.X && a.Y == b.Y; } friend inline bool operator!= (const IntPoint& a, const IntPoint& b) { return a.X != b.X || a.Y != b.Y; } }; //------------------------------------------------------------------------------ typedef std::vector< IntPoint > Path; typedef std::vector< Path > Paths; //inline Path& operator <<(Path& poly, const IntPoint& p) {poly.push_back(p); return poly;} //inline Paths& operator <<(Paths& polys, const Path& p) {polys.push_back(p); return polys;} // //std::ostream& operator <<(std::ostream &s, const IntPoint &p); //std::ostream& operator <<(std::ostream &s, const Path &p); //std::ostream& operator <<(std::ostream &s, const Paths &p); struct DoublePoint { double X; double Y; DoublePoint(double x = 0, double y = 0) : X(x), Y(y) {} DoublePoint(IntPoint ip) : X((double)ip.X), Y((double)ip.Y) {} }; //------------------------------------------------------------------------------ #ifdef use_xyz typedef void (*ZFillCallback)(IntPoint& e1bot, IntPoint& e1top, IntPoint& e2bot, IntPoint& e2top, IntPoint& pt); #endif enum InitOptions {ioReverseSolution = 1, ioStrictlySimple = 2, ioPreserveCollinear = 4}; enum JoinType {jtSquare, jtRound, jtMiter}; enum EndType {etClosedPolygon, etClosedLine, etOpenButt, etOpenSquare, etOpenRound}; class PolyNode; typedef std::vector< PolyNode* > PolyNodes; class PolyNode { public: PolyNode(); virtual ~PolyNode(){}; Path Contour; PolyNodes Childs; PolyNode* Parent; PolyNode* GetNext() const; bool IsHole() const; bool IsOpen() const; int ChildCount() const; private: unsigned Index; //node index in Parent.Childs bool m_IsOpen; JoinType m_jointype; EndType m_endtype; PolyNode* GetNextSiblingUp() const; void AddChild(PolyNode& child); friend class Clipper; //to access Index friend class ClipperOffset; }; class PolyTree: public PolyNode { public: ~PolyTree(){Clear();}; PolyNode* GetFirst() const; void Clear(); int Total() const; private: PolyNodes AllNodes; friend class Clipper; //to access AllNodes }; bool Orientation(const Path &poly); double Area(const Path &poly); int PointInPolygon(const IntPoint &pt, const Path &path); void SimplifyPolygon(const Path &in_poly, Paths &out_polys, PolyFillType fillType = pftEvenOdd); void SimplifyPolygons(const Paths &in_polys, Paths &out_polys, PolyFillType fillType = pftEvenOdd); void SimplifyPolygons(Paths &polys, PolyFillType fillType = pftEvenOdd); void CleanPolygon(const Path& in_poly, Path& out_poly, double distance = 1.415); void CleanPolygon(Path& poly, double distance = 1.415); void CleanPolygons(const Paths& in_polys, Paths& out_polys, double distance = 1.415); void CleanPolygons(Paths& polys, double distance = 1.415); void MinkowskiSum(const Path& pattern, const Path& path, Paths& solution, bool pathIsClosed); void MinkowskiSum(const Path& pattern, const Paths& paths, Paths& solution, bool pathIsClosed); void MinkowskiDiff(const Path& poly1, const Path& poly2, Paths& solution); void PolyTreeToPaths(const PolyTree& polytree, Paths& paths); void ClosedPathsFromPolyTree(const PolyTree& polytree, Paths& paths); void OpenPathsFromPolyTree(PolyTree& polytree, Paths& paths); void ReversePath(Path& p); void ReversePaths(Paths& p); Paths CutHoles(const Paths &polygons); // void CutHoles(Paths &polygons); struct IntRect { cInt left; cInt top; cInt right; cInt bottom; }; //enums that are used internally ... enum EdgeSide { esLeft = 1, esRight = 2}; //forward declarations (for stuff used internally) ... struct TEdge; struct IntersectNode; struct LocalMinimum; struct Scanbeam; struct OutPt; struct OutRec; struct Join; typedef std::vector < OutRec* > PolyOutList; typedef std::vector < TEdge* > EdgeList; typedef std::vector < Join* > JoinList; typedef std::vector < IntersectNode* > IntersectList; //------------------------------------------------------------------------------ //ClipperBase is the ancestor to the Clipper class. It should not be //instantiated directly. This class simply abstracts the conversion of sets of //polygon coordinates into edge objects that are stored in a LocalMinima list. class ClipperBase { public: ClipperBase(); virtual ~ClipperBase(); bool AddPath(const Path &pg, PolyType PolyTyp, bool Closed); bool AddPaths(const Paths &ppg, PolyType PolyTyp, bool Closed); virtual void Clear(); IntRect GetBounds(); bool PreserveCollinear() {return m_PreserveCollinear;}; void PreserveCollinear(bool value) {m_PreserveCollinear = value;}; protected: void DisposeLocalMinimaList(); TEdge* AddBoundsToLML(TEdge *e, bool IsClosed); void PopLocalMinima(); virtual void Reset(); TEdge* ProcessBound(TEdge* E, bool IsClockwise); void DoMinimaLML(TEdge* E1, TEdge* E2, bool IsClosed); TEdge* DescendToMin(TEdge *&E); void AscendToMax(TEdge *&E, bool Appending, bool IsClosed); typedef std::vector MinimaList; MinimaList::iterator m_CurrentLM; MinimaList m_MinimaList; bool m_UseFullRange; EdgeList m_edges; bool m_PreserveCollinear; bool m_HasOpenPaths; }; //------------------------------------------------------------------------------ class Clipper : public virtual ClipperBase { public: Clipper(int initOptions = 0); ~Clipper(); bool Execute(ClipType clipType, Paths &solution, PolyFillType subjFillType = pftEvenOdd, PolyFillType clipFillType = pftEvenOdd); bool Execute(ClipType clipType, PolyTree &polytree, PolyFillType subjFillType = pftEvenOdd, PolyFillType clipFillType = pftEvenOdd); bool ReverseSolution() {return m_ReverseOutput;}; void ReverseSolution(bool value) {m_ReverseOutput = value;}; bool StrictlySimple() {return m_StrictSimple;}; void StrictlySimple(bool value) {m_StrictSimple = value;}; //set the callback function for z value filling on intersections (otherwise Z is 0) #ifdef use_xyz void ZFillFunction(ZFillCallback zFillFunc); #endif protected: void Reset(); virtual bool ExecuteInternal(); private: PolyOutList m_PolyOuts; JoinList m_Joins; JoinList m_GhostJoins; IntersectList m_IntersectList; ClipType m_ClipType; typedef std::priority_queue ScanbeamList; ScanbeamList m_Scanbeam; TEdge *m_ActiveEdges; TEdge *m_SortedEdges; bool m_ExecuteLocked; PolyFillType m_ClipFillType; PolyFillType m_SubjFillType; bool m_ReverseOutput; bool m_UsingPolyTree; bool m_StrictSimple; #ifdef use_xyz ZFillCallback m_ZFill; //custom callback #endif void SetWindingCount(TEdge& edge); bool IsEvenOddFillType(const TEdge& edge) const; bool IsEvenOddAltFillType(const TEdge& edge) const; void InsertScanbeam(const cInt Y); cInt PopScanbeam(); void InsertLocalMinimaIntoAEL(const cInt botY); void InsertEdgeIntoAEL(TEdge *edge, TEdge* startEdge); void AddEdgeToSEL(TEdge *edge); void CopyAELToSEL(); void DeleteFromSEL(TEdge *e); void DeleteFromAEL(TEdge *e); void UpdateEdgeIntoAEL(TEdge *&e); void SwapPositionsInSEL(TEdge *edge1, TEdge *edge2); bool IsContributing(const TEdge& edge) const; bool IsTopHorz(const cInt XPos); void SwapPositionsInAEL(TEdge *edge1, TEdge *edge2); void DoMaxima(TEdge *e); void ProcessHorizontals(bool IsTopOfScanbeam); void ProcessHorizontal(TEdge *horzEdge, bool isTopOfScanbeam); void AddLocalMaxPoly(TEdge *e1, TEdge *e2, const IntPoint &pt); OutPt* AddLocalMinPoly(TEdge *e1, TEdge *e2, const IntPoint &pt); OutRec* GetOutRec(int idx); void AppendPolygon(TEdge *e1, TEdge *e2); void IntersectEdges(TEdge *e1, TEdge *e2, IntPoint &pt); OutRec* CreateOutRec(); OutPt* AddOutPt(TEdge *e, const IntPoint &pt); void DisposeAllOutRecs(); void DisposeOutRec(PolyOutList::size_type index); bool ProcessIntersections(const cInt topY); void BuildIntersectList(const cInt topY); void ProcessIntersectList(); void ProcessEdgesAtTopOfScanbeam(const cInt topY); void BuildResult(Paths& polys); void BuildResult2(PolyTree& polytree); void SetHoleState(TEdge *e, OutRec *outrec); void DisposeIntersectNodes(); bool FixupIntersectionOrder(); void FixupOutPolygon(OutRec &outrec); bool IsHole(TEdge *e); bool FindOwnerFromSplitRecs(OutRec &outRec, OutRec *&currOrfl); void FixHoleLinkage(OutRec &outrec); void AddJoin(OutPt *op1, OutPt *op2, const IntPoint offPt); void ClearJoins(); void ClearGhostJoins(); void AddGhostJoin(OutPt *op, const IntPoint offPt); bool JoinPoints(Join *j, OutRec* outRec1, OutRec* outRec2); void JoinCommonEdges(); void DoSimplePolygons(); void FixupFirstLefts1(OutRec* OldOutRec, OutRec* NewOutRec); void FixupFirstLefts2(OutRec* OldOutRec, OutRec* NewOutRec); #ifdef use_xyz void SetZ(IntPoint& pt, TEdge& e1, TEdge& e2); #endif }; //------------------------------------------------------------------------------ class ClipperOffset { public: ClipperOffset(double miterLimit = 2.0, double roundPrecision = 0.25); ~ClipperOffset(); void AddPath(const Path& path, JoinType joinType, EndType endType); void AddPaths(const Paths& paths, JoinType joinType, EndType endType); void Execute(Paths& solution, double delta); void Execute(PolyTree& solution, double delta); void Clear(); double MiterLimit; double ArcTolerance; private: Paths m_destPolys; Path m_srcPoly; Path m_destPoly; std::vector m_normals; double m_delta, m_sinA, m_sin, m_cos; double m_miterLim, m_StepsPerRad; IntPoint m_lowest; PolyNode m_polyNodes; void FixOrientations(); void DoOffset(double delta); void OffsetPoint(int j, int& k, JoinType jointype); void DoSquare(int j, int k); void DoMiter(int j, int k, double r); void DoRound(int j, int k); }; //------------------------------------------------------------------------------ class clipperException : public std::exception { public: clipperException(const char* description): m_descr(description) {} virtual ~clipperException() throw() {} virtual const char* what() const throw() {return m_descr.c_str();} private: std::string m_descr; }; //------------------------------------------------------------------------------ } //ClipperLib namespace #endif //clipper_hpp ================================================ FILE: OptolithiumC/libs/clipper/src/clipper.cpp ================================================ /******************************************************************************* * * * Author : Angus Johnson * * Version : 6.2.1 * * Date : 31 October 2014 * * Website : http://www.angusj.com * * Copyright : Angus Johnson 2010-2014 * * * * License: * * Use, modification & distribution is subject to Boost Software License Ver 1. * * http://www.boost.org/LICENSE_1_0.txt * * * * Attributions: * * The code in this library is an extension of Bala Vatti's clipping algorithm: * * "A generic solution to polygon clipping" * * Communications of the ACM, Vol 35, Issue 7 (July 1992) pp 56-63. * * http://portal.acm.org/citation.cfm?id=129906 * * * * Computer graphics and geometric modeling: implementation and algorithms * * By Max K. Agoston * * Springer; 1 edition (January 4, 2005) * * http://books.google.com/books?q=vatti+clipping+agoston * * * * See also: * * "Polygon Offsetting by Computing Winding Numbers" * * Paper no. DETC2005-85513 pp. 565-575 * * ASME 2005 International Design Engineering Technical Conferences * * and Computers and Information in Engineering Conference (IDETC/CIE2005) * * September 24-28, 2005 , Long Beach, California, USA * * http://www.me.berkeley.edu/~mcmains/pubs/DAC05OffsetPolygon.pdf * * * *******************************************************************************/ /******************************************************************************* * * * This is a translation of the Delphi Clipper library and the naming style * * used has retained a Delphi flavour. * * * *******************************************************************************/ #include "clipper.hpp" #include #include #include #include #include #include #include #include namespace ClipperLib { static double const pi = 3.141592653589793238; static double const two_pi = pi * 2; static double const def_arc_tolerance = 0.25; enum Direction {dRightToLeft, dLeftToRight}; static int const Unassigned = -1; //edge not currently 'owning' a solution static int const Skip = -2; //edge that would otherwise close a path #define HORIZONTAL (-1.0E+40) #define TOLERANCE (1.0e-20) #define NEAR_ZERO(val) (((val) > -TOLERANCE) && ((val) < TOLERANCE)) struct TEdge { IntPoint Bot; IntPoint Curr; IntPoint Top; IntPoint Delta; double Dx; PolyType PolyTyp; EdgeSide Side; int WindDelta; //1 or -1 depending on winding direction int WindCnt; int WindCnt2; //winding count of the opposite polytype int OutIdx; TEdge *Next; TEdge *Prev; TEdge *NextInLML; TEdge *NextInAEL; TEdge *PrevInAEL; TEdge *NextInSEL; TEdge *PrevInSEL; }; struct IntersectNode { TEdge *Edge1; TEdge *Edge2; IntPoint Pt; }; struct LocalMinimum { cInt Y; TEdge *LeftBound; TEdge *RightBound; }; struct OutPt; struct OutRec { int Idx; bool IsHole; bool IsOpen; OutRec *FirstLeft; //see comments in clipper.pas PolyNode *PolyNd; OutPt *Pts; OutPt *BottomPt; }; struct OutPt { int Idx; IntPoint Pt; OutPt *Next; OutPt *Prev; }; struct Join { OutPt *OutPt1; OutPt *OutPt2; IntPoint OffPt; }; struct LocMinSorter { inline bool operator()(const LocalMinimum &locMin1, const LocalMinimum &locMin2) { return locMin2.Y < locMin1.Y; } }; //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ inline cInt Round(double val) { if ((val < 0)) { return static_cast(val - 0.5); } else { return static_cast(val + 0.5); } } //------------------------------------------------------------------------------ inline cInt Abs(cInt val) { return val < 0 ? -val : val; } //------------------------------------------------------------------------------ // PolyTree methods ... //------------------------------------------------------------------------------ void PolyTree::Clear() { for (PolyNodes::size_type i = 0; i < AllNodes.size(); ++i) { delete AllNodes[i]; } AllNodes.resize(0); Childs.resize(0); } //------------------------------------------------------------------------------ PolyNode *PolyTree::GetFirst() const { if (!Childs.empty()) { return Childs[0]; } else { return 0; } } //------------------------------------------------------------------------------ int PolyTree::Total() const { int result = (int) AllNodes.size(); //with negative offsets, ignore the hidden outer polygon ... if (result > 0 && Childs[0] != AllNodes[0]) { result--; } return result; } //------------------------------------------------------------------------------ // PolyNode methods ... //------------------------------------------------------------------------------ PolyNode::PolyNode() : Childs(), Parent(0), Index(0), m_IsOpen(false) { } //------------------------------------------------------------------------------ int PolyNode::ChildCount() const { return (int) Childs.size(); } //------------------------------------------------------------------------------ void PolyNode::AddChild(PolyNode &child) { unsigned cnt = (unsigned) Childs.size(); Childs.push_back(&child); child.Parent = this; child.Index = cnt; } //------------------------------------------------------------------------------ PolyNode *PolyNode::GetNext() const { if (!Childs.empty()) { return Childs[0]; } else { return GetNextSiblingUp(); } } //------------------------------------------------------------------------------ PolyNode *PolyNode::GetNextSiblingUp() const { if (!Parent) { //protects against PolyTree.GetNextSiblingUp() return 0; } else if (Index == Parent->Childs.size() - 1) { return Parent->GetNextSiblingUp(); } else { return Parent->Childs[Index + 1]; } } //------------------------------------------------------------------------------ bool PolyNode::IsHole() const { bool result = true; PolyNode *node = Parent; while (node) { result = !result; node = node->Parent; } return result; } //------------------------------------------------------------------------------ bool PolyNode::IsOpen() const { return m_IsOpen; } //------------------------------------------------------------------------------ #ifndef use_int32 //------------------------------------------------------------------------------ // Int128 class (enables safe math on signed 64bit integers) // eg Int128 val1((long64)9223372036854775807); //ie 2^63 -1 // Int128 val2((long64)9223372036854775807); // Int128 val3 = val1 * val2; // val3.AsString => "85070591730234615847396907784232501249" (8.5e+37) //------------------------------------------------------------------------------ class Int128 { public: ulong64 lo; long64 hi; Int128(long64 _lo = 0) { lo = (ulong64) _lo; if (_lo < 0) { hi = -1; } else { hi = 0; } } Int128(const Int128 &val) : lo(val.lo), hi(val.hi) { } Int128(const long64 &_hi, const ulong64 &_lo) : lo(_lo), hi(_hi) { } Int128 &operator=(const long64 &val) { lo = (ulong64) val; if (val < 0) { hi = -1; } else { hi = 0; } return *this; } bool operator==(const Int128 &val) const { return (hi == val.hi && lo == val.lo); } bool operator!=(const Int128 &val) const { return !(*this == val); } bool operator>(const Int128 &val) const { if (hi != val.hi) { return hi > val.hi; } else { return lo > val.lo; } } bool operator<(const Int128 &val) const { if (hi != val.hi) { return hi < val.hi; } else { return lo < val.lo; } } bool operator>=(const Int128 &val) const { return !(*this < val); } bool operator<=(const Int128 &val) const { return !(*this > val); } Int128 &operator+=(const Int128 &rhs) { hi += rhs.hi; lo += rhs.lo; if (lo < rhs.lo) { hi++; } return *this; } Int128 operator+(const Int128 &rhs) const { Int128 result(*this); result += rhs; return result; } Int128 &operator-=(const Int128 &rhs) { *this += -rhs; return *this; } Int128 operator-(const Int128 &rhs) const { Int128 result(*this); result -= rhs; return result; } Int128 operator-() const //unary negation { if (lo == 0) { return Int128(-hi, 0); } else { return Int128(~hi, ~lo + 1); } } operator double() const { const double shift64 = 18446744073709551616.0; //2^64 if (hi < 0) { if (lo == 0) { return (double) hi * shift64; } else { return -(double) (~lo + ~hi * shift64); } } else { return (double) (lo + hi * shift64); } } }; //------------------------------------------------------------------------------ Int128 Int128Mul(long64 lhs, long64 rhs) { bool negate = (lhs < 0) != (rhs < 0); if (lhs < 0) { lhs = -lhs; } ulong64 int1Hi = ulong64(lhs) >> 32; ulong64 int1Lo = ulong64(lhs & 0xFFFFFFFF); if (rhs < 0) { rhs = -rhs; } ulong64 int2Hi = ulong64(rhs) >> 32; ulong64 int2Lo = ulong64(rhs & 0xFFFFFFFF); //nb: see comments in clipper.pas ulong64 a = int1Hi * int2Hi; ulong64 b = int1Lo * int2Lo; ulong64 c = int1Hi * int2Lo + int1Lo * int2Hi; Int128 tmp; tmp.hi = long64(a + (c >> 32)); tmp.lo = long64(c << 32); tmp.lo += long64(b); if (tmp.lo < b) { tmp.hi++; } if (negate) { tmp = -tmp; } return tmp; }; #endif //------------------------------------------------------------------------------ // Miscellaneous global functions //------------------------------------------------------------------------------ void Swap(cInt &val1, cInt &val2) { cInt tmp = val1; val1 = val2; val2 = tmp; } //------------------------------------------------------------------------------ bool Orientation(const Path &poly) { return Area(poly) >= 0; } //------------------------------------------------------------------------------ double Area(const Path &poly) { int size = (int) poly.size(); if (size < 3) { return 0; } double a = 0; for (int i = 0, j = size - 1; i < size; ++i) { a += ((double) poly[j].X + poly[i].X) * ((double) poly[j].Y - poly[i].Y); j = i; } return -a * 0.5; } //------------------------------------------------------------------------------ double Area(const OutRec &outRec) { OutPt *op = outRec.Pts; if (!op) { return 0; } double a = 0; do { a += (double) (op->Prev->Pt.X + op->Pt.X) * (double) (op->Prev->Pt.Y - op->Pt.Y); op = op->Next; } while (op != outRec.Pts); return a * 0.5; } //------------------------------------------------------------------------------ bool PointIsVertex(const IntPoint &Pt, OutPt *pp) { OutPt *pp2 = pp; do { if (pp2->Pt == Pt) { return true; } pp2 = pp2->Next; } while (pp2 != pp); return false; } //------------------------------------------------------------------------------ int PointInPolygon(const IntPoint &pt, const Path &path) { //returns 0 if false, +1 if true, -1 if pt ON polygon boundary //See "The Point in Polygon Problem for Arbitrary Polygons" by Hormann & Agathos //http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.88.5498&rep=rep1&type=pdf int result = 0; size_t cnt = path.size(); if (cnt < 3) { return 0; } IntPoint ip = path[0]; for (size_t i = 1; i <= cnt; ++i) { IntPoint ipNext = (i == cnt ? path[0] : path[i]); if (ipNext.Y == pt.Y) { if ((ipNext.X == pt.X) || (ip.Y == pt.Y && ((ipNext.X > pt.X) == (ip.X < pt.X)))) { return -1; } } if ((ip.Y < pt.Y) != (ipNext.Y < pt.Y)) { if (ip.X >= pt.X) { if (ipNext.X > pt.X) { result = 1 - result; } else { double d = (double) (ip.X - pt.X) * (ipNext.Y - pt.Y) - (double) (ipNext.X - pt.X) * (ip.Y - pt.Y); if (!d) { return -1; } if ((d > 0) == (ipNext.Y > ip.Y)) { result = 1 - result; } } } else { if (ipNext.X > pt.X) { double d = (double) (ip.X - pt.X) * (ipNext.Y - pt.Y) - (double) (ipNext.X - pt.X) * (ip.Y - pt.Y); if (!d) { return -1; } if ((d > 0) == (ipNext.Y > ip.Y)) { result = 1 - result; } } } } ip = ipNext; } return result; } //------------------------------------------------------------------------------ int PointInPolygon(const IntPoint &pt, OutPt *op) { //returns 0 if false, +1 if true, -1 if pt ON polygon boundary int result = 0; OutPt *startOp = op; for (; ;) { if (op->Next->Pt.Y == pt.Y) { if ((op->Next->Pt.X == pt.X) || (op->Pt.Y == pt.Y && ((op->Next->Pt.X > pt.X) == (op->Pt.X < pt.X)))) { return -1; } } if ((op->Pt.Y < pt.Y) != (op->Next->Pt.Y < pt.Y)) { if (op->Pt.X >= pt.X) { if (op->Next->Pt.X > pt.X) { result = 1 - result; } else { double d = (double) (op->Pt.X - pt.X) * (op->Next->Pt.Y - pt.Y) - (double) (op->Next->Pt.X - pt.X) * (op->Pt.Y - pt.Y); if (!d) { return -1; } if ((d > 0) == (op->Next->Pt.Y > op->Pt.Y)) { result = 1 - result; } } } else { if (op->Next->Pt.X > pt.X) { double d = (double) (op->Pt.X - pt.X) * (op->Next->Pt.Y - pt.Y) - (double) (op->Next->Pt.X - pt.X) * (op->Pt.Y - pt.Y); if (!d) { return -1; } if ((d > 0) == (op->Next->Pt.Y > op->Pt.Y)) { result = 1 - result; } } } } op = op->Next; if (startOp == op) { break; } } return result; } //------------------------------------------------------------------------------ bool Poly2ContainsPoly1(OutPt *OutPt1, OutPt *OutPt2) { OutPt *op = OutPt1; do { //nb: PointInPolygon returns 0 if false, +1 if true, -1 if pt on polygon int res = PointInPolygon(op->Pt, OutPt2); if (res >= 0) { return res > 0; } op = op->Next; } while (op != OutPt1); return true; } //---------------------------------------------------------------------- bool SlopesEqual(const TEdge &e1, const TEdge &e2, bool UseFullInt64Range) { #ifndef use_int32 if (UseFullInt64Range) { return Int128Mul(e1.Delta.Y, e2.Delta.X) == Int128Mul(e1.Delta.X, e2.Delta.Y); } else #endif { return e1.Delta.Y * e2.Delta.X == e1.Delta.X * e2.Delta.Y; } } //------------------------------------------------------------------------------ bool SlopesEqual(const IntPoint pt1, const IntPoint pt2, const IntPoint pt3, bool UseFullInt64Range) { #ifndef use_int32 if (UseFullInt64Range) { return Int128Mul(pt1.Y - pt2.Y, pt2.X - pt3.X) == Int128Mul(pt1.X - pt2.X, pt2.Y - pt3.Y); } else #endif { return (pt1.Y - pt2.Y) * (pt2.X - pt3.X) == (pt1.X - pt2.X) * (pt2.Y - pt3.Y); } } //------------------------------------------------------------------------------ bool SlopesEqual(const IntPoint pt1, const IntPoint pt2, const IntPoint pt3, const IntPoint pt4, bool UseFullInt64Range) { #ifndef use_int32 if (UseFullInt64Range) { return Int128Mul(pt1.Y - pt2.Y, pt3.X - pt4.X) == Int128Mul(pt1.X - pt2.X, pt3.Y - pt4.Y); } else #endif { return (pt1.Y - pt2.Y) * (pt3.X - pt4.X) == (pt1.X - pt2.X) * (pt3.Y - pt4.Y); } } //------------------------------------------------------------------------------ inline bool IsHorizontal(TEdge &e) { return e.Delta.Y == 0; } //------------------------------------------------------------------------------ inline double GetDx(const IntPoint pt1, const IntPoint pt2) { return (pt1.Y == pt2.Y) ? HORIZONTAL : (double) (pt2.X - pt1.X) / (pt2.Y - pt1.Y); } //--------------------------------------------------------------------------- inline void SetDx(TEdge &e) { e.Delta.X = (e.Top.X - e.Bot.X); e.Delta.Y = (e.Top.Y - e.Bot.Y); if (e.Delta.Y == 0) { e.Dx = HORIZONTAL; } else { e.Dx = (double) (e.Delta.X) / e.Delta.Y; } } //--------------------------------------------------------------------------- inline void SwapSides(TEdge &Edge1, TEdge &Edge2) { EdgeSide Side = Edge1.Side; Edge1.Side = Edge2.Side; Edge2.Side = Side; } //------------------------------------------------------------------------------ inline void SwapPolyIndexes(TEdge &Edge1, TEdge &Edge2) { int OutIdx = Edge1.OutIdx; Edge1.OutIdx = Edge2.OutIdx; Edge2.OutIdx = OutIdx; } //------------------------------------------------------------------------------ inline cInt TopX(TEdge &edge, const cInt currentY) { return (currentY == edge.Top.Y) ? edge.Top.X : edge.Bot.X + Round(edge.Dx * (currentY - edge.Bot.Y)); } //------------------------------------------------------------------------------ void IntersectPoint(TEdge &Edge1, TEdge &Edge2, IntPoint &ip) { #ifdef use_xyz ip.Z = 0; #endif double b1, b2; if (Edge1.Dx == Edge2.Dx) { ip.Y = Edge1.Curr.Y; ip.X = TopX(Edge1, ip.Y); return; } else if (Edge1.Delta.X == 0) { ip.X = Edge1.Bot.X; if (IsHorizontal(Edge2)) { ip.Y = Edge2.Bot.Y; } else { b2 = Edge2.Bot.Y - (Edge2.Bot.X / Edge2.Dx); ip.Y = Round(ip.X / Edge2.Dx + b2); } } else if (Edge2.Delta.X == 0) { ip.X = Edge2.Bot.X; if (IsHorizontal(Edge1)) { ip.Y = Edge1.Bot.Y; } else { b1 = Edge1.Bot.Y - (Edge1.Bot.X / Edge1.Dx); ip.Y = Round(ip.X / Edge1.Dx + b1); } } else { b1 = Edge1.Bot.X - Edge1.Bot.Y * Edge1.Dx; b2 = Edge2.Bot.X - Edge2.Bot.Y * Edge2.Dx; double q = (b2 - b1) / (Edge1.Dx - Edge2.Dx); ip.Y = Round(q); if (std::fabs(Edge1.Dx) < std::fabs(Edge2.Dx)) { ip.X = Round(Edge1.Dx * q + b1); } else { ip.X = Round(Edge2.Dx * q + b2); } } if (ip.Y < Edge1.Top.Y || ip.Y < Edge2.Top.Y) { if (Edge1.Top.Y > Edge2.Top.Y) { ip.Y = Edge1.Top.Y; } else { ip.Y = Edge2.Top.Y; } if (std::fabs(Edge1.Dx) < std::fabs(Edge2.Dx)) { ip.X = TopX(Edge1, ip.Y); } else { ip.X = TopX(Edge2, ip.Y); } } //finally, don't allow 'ip' to be BELOW curr.Y (ie bottom of scanbeam) ... if (ip.Y > Edge1.Curr.Y) { ip.Y = Edge1.Curr.Y; //use the more vertical edge to derive X ... if (std::fabs(Edge1.Dx) > std::fabs(Edge2.Dx)) { ip.X = TopX(Edge2, ip.Y); } else { ip.X = TopX(Edge1, ip.Y); } } } //------------------------------------------------------------------------------ void ReversePolyPtLinks(OutPt *pp) { if (!pp) { return; } OutPt *pp1, *pp2; pp1 = pp; do { pp2 = pp1->Next; pp1->Next = pp1->Prev; pp1->Prev = pp2; pp1 = pp2; } while (pp1 != pp); } //------------------------------------------------------------------------------ void DisposeOutPts(OutPt *&pp) { if (pp == 0) { return; } pp->Prev->Next = 0; while (pp) { OutPt *tmpPp = pp; pp = pp->Next; delete tmpPp; } } //------------------------------------------------------------------------------ inline void InitEdge(TEdge *e, TEdge *eNext, TEdge *ePrev, const IntPoint &Pt) { std::memset(e, 0, sizeof(TEdge)); e->Next = eNext; e->Prev = ePrev; e->Curr = Pt; e->OutIdx = Unassigned; } //------------------------------------------------------------------------------ void InitEdge2(TEdge &e, PolyType Pt) { if (e.Curr.Y >= e.Next->Curr.Y) { e.Bot = e.Curr; e.Top = e.Next->Curr; } else { e.Top = e.Curr; e.Bot = e.Next->Curr; } SetDx(e); e.PolyTyp = Pt; } //------------------------------------------------------------------------------ TEdge *RemoveEdge(TEdge *e) { //removes e from double_linked_list (but without removing from memory) e->Prev->Next = e->Next; e->Next->Prev = e->Prev; TEdge *result = e->Next; e->Prev = 0; //flag as removed (see ClipperBase.Clear) return result; } //------------------------------------------------------------------------------ inline void ReverseHorizontal(TEdge &e) { //swap horizontal edges' Top and Bottom x's so they follow the natural //progression of the bounds - ie so their xbots will align with the //adjoining lower edge. [Helpful in the ProcessHorizontal() method.] Swap(e.Top.X, e.Bot.X); #ifdef use_xyz Swap(e.Top.Z, e.Bot.Z); #endif } //------------------------------------------------------------------------------ void SwapPoints(IntPoint &pt1, IntPoint &pt2) { IntPoint tmp = pt1; pt1 = pt2; pt2 = tmp; } //------------------------------------------------------------------------------ bool GetOverlapSegment(IntPoint pt1a, IntPoint pt1b, IntPoint pt2a, IntPoint pt2b, IntPoint &pt1, IntPoint &pt2) { //precondition: segments are Collinear. if (Abs(pt1a.X - pt1b.X) > Abs(pt1a.Y - pt1b.Y)) { if (pt1a.X > pt1b.X) { SwapPoints(pt1a, pt1b); } if (pt2a.X > pt2b.X) { SwapPoints(pt2a, pt2b); } if (pt1a.X > pt2a.X) { pt1 = pt1a; } else { pt1 = pt2a; } if (pt1b.X < pt2b.X) { pt2 = pt1b; } else { pt2 = pt2b; } return pt1.X < pt2.X; } else { if (pt1a.Y < pt1b.Y) { SwapPoints(pt1a, pt1b); } if (pt2a.Y < pt2b.Y) { SwapPoints(pt2a, pt2b); } if (pt1a.Y < pt2a.Y) { pt1 = pt1a; } else { pt1 = pt2a; } if (pt1b.Y > pt2b.Y) { pt2 = pt1b; } else { pt2 = pt2b; } return pt1.Y > pt2.Y; } } //------------------------------------------------------------------------------ bool FirstIsBottomPt(const OutPt *btmPt1, const OutPt *btmPt2) { OutPt *p = btmPt1->Prev; while ((p->Pt == btmPt1->Pt) && (p != btmPt1)) { p = p->Prev; } double dx1p = std::fabs(GetDx(btmPt1->Pt, p->Pt)); p = btmPt1->Next; while ((p->Pt == btmPt1->Pt) && (p != btmPt1)) { p = p->Next; } double dx1n = std::fabs(GetDx(btmPt1->Pt, p->Pt)); p = btmPt2->Prev; while ((p->Pt == btmPt2->Pt) && (p != btmPt2)) { p = p->Prev; } double dx2p = std::fabs(GetDx(btmPt2->Pt, p->Pt)); p = btmPt2->Next; while ((p->Pt == btmPt2->Pt) && (p != btmPt2)) { p = p->Next; } double dx2n = std::fabs(GetDx(btmPt2->Pt, p->Pt)); return (dx1p >= dx2p && dx1p >= dx2n) || (dx1n >= dx2p && dx1n >= dx2n); } //------------------------------------------------------------------------------ OutPt *GetBottomPt(OutPt *pp) { OutPt *dups = 0; OutPt *p = pp->Next; while (p != pp) { if (p->Pt.Y > pp->Pt.Y) { pp = p; dups = 0; } else if (p->Pt.Y == pp->Pt.Y && p->Pt.X <= pp->Pt.X) { if (p->Pt.X < pp->Pt.X) { dups = 0; pp = p; } else { if (p->Next != pp && p->Prev != pp) { dups = p; } } } p = p->Next; } if (dups) { //there appears to be at least 2 vertices at BottomPt so ... while (dups != p) { if (!FirstIsBottomPt(p, dups)) { pp = dups; } dups = dups->Next; while (dups->Pt != pp->Pt) { dups = dups->Next; } } } return pp; } //------------------------------------------------------------------------------ bool Pt2IsBetweenPt1AndPt3(const IntPoint pt1, const IntPoint pt2, const IntPoint pt3) { if ((pt1 == pt3) || (pt1 == pt2) || (pt3 == pt2)) { return false; } else if (pt1.X != pt3.X) { return (pt2.X > pt1.X) == (pt2.X < pt3.X); } else { return (pt2.Y > pt1.Y) == (pt2.Y < pt3.Y); } } //------------------------------------------------------------------------------ bool HorzSegmentsOverlap(cInt seg1a, cInt seg1b, cInt seg2a, cInt seg2b) { if (seg1a > seg1b) { Swap(seg1a, seg1b); } if (seg2a > seg2b) { Swap(seg2a, seg2b); } return (seg1a < seg2b) && (seg2a < seg1b); } //------------------------------------------------------------------------------ // ClipperBase class methods ... //------------------------------------------------------------------------------ ClipperBase::ClipperBase() //constructor { m_CurrentLM = m_MinimaList.begin(); //begin() == end() here m_UseFullRange = false; } //------------------------------------------------------------------------------ ClipperBase::~ClipperBase() //destructor { Clear(); } //------------------------------------------------------------------------------ void RangeTest(const IntPoint &Pt, bool &useFullRange) { if (useFullRange) { if (Pt.X > hiRange || Pt.Y > hiRange || -Pt.X > hiRange || -Pt.Y > hiRange) { throw "Coordinate outside allowed range"; } } else if (Pt.X > loRange || Pt.Y > loRange || -Pt.X > loRange || -Pt.Y > loRange) { useFullRange = true; RangeTest(Pt, useFullRange); } } //------------------------------------------------------------------------------ TEdge *FindNextLocMin(TEdge *E) { for (; ;) { while (E->Bot != E->Prev->Bot || E->Curr == E->Top) { E = E->Next; } if (!IsHorizontal(*E) && !IsHorizontal(*E->Prev)) { break; } while (IsHorizontal(*E->Prev)) { E = E->Prev; } TEdge *E2 = E; while (IsHorizontal(*E)) { E = E->Next; } if (E->Top.Y == E->Prev->Bot.Y) { continue; } //ie just an intermediate horz. if (E2->Prev->Bot.X < E->Bot.X) { E = E2; } break; } return E; } //------------------------------------------------------------------------------ TEdge *ClipperBase::ProcessBound(TEdge *E, bool NextIsForward) { TEdge *Result = E; TEdge *Horz = 0; if (E->OutIdx == Skip) { //if edges still remain in the current bound beyond the skip edge then //create another LocMin and call ProcessBound once more if (NextIsForward) { while (E->Top.Y == E->Next->Bot.Y) { E = E->Next; } //don't include top horizontals when parsing a bound a second time, //they will be contained in the opposite bound ... while (E != Result && IsHorizontal(*E)) { E = E->Prev; } } else { while (E->Top.Y == E->Prev->Bot.Y) { E = E->Prev; } while (E != Result && IsHorizontal(*E)) { E = E->Next; } } if (E == Result) { if (NextIsForward) { Result = E->Next; } else { Result = E->Prev; } } else { //there are more edges in the bound beyond result starting with E if (NextIsForward) { E = Result->Next; } else { E = Result->Prev; } MinimaList::value_type locMin; locMin.Y = E->Bot.Y; locMin.LeftBound = 0; locMin.RightBound = E; E->WindDelta = 0; Result = ProcessBound(E, NextIsForward); m_MinimaList.push_back(locMin); } return Result; } TEdge *EStart; if (IsHorizontal(*E)) { //We need to be careful with open paths because this may not be a //true local minima (ie E may be following a skip edge). //Also, consecutive horz. edges may start heading left before going right. if (NextIsForward) { EStart = E->Prev; } else { EStart = E->Next; } if (EStart->OutIdx != Skip) { if (IsHorizontal(*EStart)) //ie an adjoining horizontal skip edge { if (EStart->Bot.X != E->Bot.X && EStart->Top.X != E->Bot.X) { ReverseHorizontal(*E); } } else if (EStart->Bot.X != E->Bot.X) { ReverseHorizontal(*E); } } } EStart = E; if (NextIsForward) { while (Result->Top.Y == Result->Next->Bot.Y && Result->Next->OutIdx != Skip) { Result = Result->Next; } if (IsHorizontal(*Result) && Result->Next->OutIdx != Skip) { //nb: at the top of a bound, horizontals are added to the bound //only when the preceding edge attaches to the horizontal's left vertex //unless a Skip edge is encountered when that becomes the top divide Horz = Result; while (IsHorizontal(*Horz->Prev)) { Horz = Horz->Prev; } if (Horz->Prev->Top.X == Result->Next->Top.X) { if (!NextIsForward) { Result = Horz->Prev; } } else if (Horz->Prev->Top.X > Result->Next->Top.X) { Result = Horz->Prev; } } while (E != Result) { E->NextInLML = E->Next; if (IsHorizontal(*E) && E != EStart && E->Bot.X != E->Prev->Top.X) { ReverseHorizontal(*E); } E = E->Next; } if (IsHorizontal(*E) && E != EStart && E->Bot.X != E->Prev->Top.X) { ReverseHorizontal(*E); } Result = Result->Next; //move to the edge just beyond current bound } else { while (Result->Top.Y == Result->Prev->Bot.Y && Result->Prev->OutIdx != Skip) { Result = Result->Prev; } if (IsHorizontal(*Result) && Result->Prev->OutIdx != Skip) { Horz = Result; while (IsHorizontal(*Horz->Next)) { Horz = Horz->Next; } if (Horz->Next->Top.X == Result->Prev->Top.X) { if (!NextIsForward) { Result = Horz->Next; } } else if (Horz->Next->Top.X > Result->Prev->Top.X) { Result = Horz->Next; } } while (E != Result) { E->NextInLML = E->Prev; if (IsHorizontal(*E) && E != EStart && E->Bot.X != E->Next->Top.X) { ReverseHorizontal(*E); } E = E->Prev; } if (IsHorizontal(*E) && E != EStart && E->Bot.X != E->Next->Top.X) { ReverseHorizontal(*E); } Result = Result->Prev; //move to the edge just beyond current bound } return Result; } //------------------------------------------------------------------------------ bool ClipperBase::AddPath(const Path &pg, PolyType PolyTyp, bool Closed) { #ifdef use_lines if (!Closed && PolyTyp == ptClip) throw clipperException("AddPath: Open paths must be subject."); #else if (!Closed) { throw clipperException("AddPath: Open paths have been disabled."); } #endif int highI = (int) pg.size() - 1; if (Closed) { while (highI > 0 && (pg[highI] == pg[0])) { --highI; } } while (highI > 0 && (pg[highI] == pg[highI - 1])) { --highI; } if ((Closed && highI < 2) || (!Closed && highI < 1)) { return false; } //create a new edge array ... TEdge *edges = new TEdge[highI + 1]; bool IsFlat = true; //1. Basic (first) edge initialization ... try { edges[1].Curr = pg[1]; RangeTest(pg[0], m_UseFullRange); RangeTest(pg[highI], m_UseFullRange); InitEdge(&edges[0], &edges[1], &edges[highI], pg[0]); InitEdge(&edges[highI], &edges[0], &edges[highI - 1], pg[highI]); for (int i = highI - 1; i >= 1; --i) { RangeTest(pg[i], m_UseFullRange); InitEdge(&edges[i], &edges[i + 1], &edges[i - 1], pg[i]); } } catch (...) { delete[] edges; throw; //range test fails } TEdge *eStart = &edges[0]; //2. Remove duplicate vertices, and (when closed) collinear edges ... TEdge *E = eStart, *eLoopStop = eStart; for (; ;) { //nb: allows matching start and end points when not Closed ... if (E->Curr == E->Next->Curr && (Closed || E->Next != eStart)) { if (E == E->Next) { break; } if (E == eStart) { eStart = E->Next; } E = RemoveEdge(E); eLoopStop = E; continue; } if (E->Prev == E->Next) { break; //only two vertices } else if (Closed && SlopesEqual( E->Prev->Curr, E->Curr, E->Next->Curr, m_UseFullRange ) && (!m_PreserveCollinear || !Pt2IsBetweenPt1AndPt3(E->Prev->Curr, E->Curr, E->Next->Curr))) { //Collinear edges are allowed for open paths but in closed paths //the default is to merge adjacent collinear edges into a single edge. //However, if the PreserveCollinear property is enabled, only overlapping //collinear edges (ie spikes) will be removed from closed paths. if (E == eStart) { eStart = E->Next; } E = RemoveEdge(E); E = E->Prev; eLoopStop = E; continue; } E = E->Next; if ((E == eLoopStop) || (!Closed && E->Next == eStart)) { break; } } if ((!Closed && (E == E->Next)) || (Closed && (E->Prev == E->Next))) { delete[] edges; return false; } if (!Closed) { m_HasOpenPaths = true; eStart->Prev->OutIdx = Skip; } //3. Do second stage of edge initialization ... E = eStart; do { InitEdge2(*E, PolyTyp); E = E->Next; if (IsFlat && E->Curr.Y != eStart->Curr.Y) { IsFlat = false; } } while (E != eStart); //4. Finally, add edge bounds to LocalMinima list ... //Totally flat paths must be handled differently when adding them //to LocalMinima list to avoid endless loops etc ... if (IsFlat) { if (Closed) { delete[] edges; return false; } E->Prev->OutIdx = Skip; if (E->Prev->Bot.X < E->Prev->Top.X) { ReverseHorizontal(*E->Prev); } MinimaList::value_type locMin; locMin.Y = E->Bot.Y; locMin.LeftBound = 0; locMin.RightBound = E; locMin.RightBound->Side = esRight; locMin.RightBound->WindDelta = 0; while (E->Next->OutIdx != Skip) { E->NextInLML = E->Next; if (E->Bot.X != E->Prev->Top.X) { ReverseHorizontal(*E); } E = E->Next; } m_MinimaList.push_back(locMin); m_edges.push_back(edges); return true; } m_edges.push_back(edges); bool leftBoundIsForward; TEdge *EMin = 0; //workaround to avoid an endless loop in the while loop below when //open paths have matching start and end points ... if (E->Prev->Bot == E->Prev->Top) { E = E->Next; } for (; ;) { E = FindNextLocMin(E); if (E == EMin) { break; } else if (!EMin) { EMin = E; } //E and E.Prev now share a local minima (left aligned if horizontal). //Compare their slopes to find which starts which bound ... MinimaList::value_type locMin; locMin.Y = E->Bot.Y; if (E->Dx < E->Prev->Dx) { locMin.LeftBound = E->Prev; locMin.RightBound = E; leftBoundIsForward = false; //Q.nextInLML = Q.prev } else { locMin.LeftBound = E; locMin.RightBound = E->Prev; leftBoundIsForward = true; //Q.nextInLML = Q.next } locMin.LeftBound->Side = esLeft; locMin.RightBound->Side = esRight; if (!Closed) { locMin.LeftBound->WindDelta = 0; } else if (locMin.LeftBound->Next == locMin.RightBound) { locMin.LeftBound->WindDelta = -1; } else { locMin.LeftBound->WindDelta = 1; } locMin.RightBound->WindDelta = -locMin.LeftBound->WindDelta; E = ProcessBound(locMin.LeftBound, leftBoundIsForward); if (E->OutIdx == Skip) { E = ProcessBound(E, leftBoundIsForward); } TEdge *E2 = ProcessBound(locMin.RightBound, !leftBoundIsForward); if (E2->OutIdx == Skip) { E2 = ProcessBound(E2, !leftBoundIsForward); } if (locMin.LeftBound->OutIdx == Skip) { locMin.LeftBound = 0; } else if (locMin.RightBound->OutIdx == Skip) { locMin.RightBound = 0; } m_MinimaList.push_back(locMin); if (!leftBoundIsForward) { E = E2; } } return true; } //------------------------------------------------------------------------------ bool ClipperBase::AddPaths(const Paths &ppg, PolyType PolyTyp, bool Closed) { bool result = false; for (Paths::size_type i = 0; i < ppg.size(); ++i) { if (AddPath(ppg[i], PolyTyp, Closed)) { result = true; } } return result; } //------------------------------------------------------------------------------ void ClipperBase::Clear() { DisposeLocalMinimaList(); for (EdgeList::size_type i = 0; i < m_edges.size(); ++i) { //for each edge array in turn, find the first used edge and //check for and remove any hiddenPts in each edge in the array. TEdge *edges = m_edges[i]; delete[] edges; } m_edges.clear(); m_UseFullRange = false; m_HasOpenPaths = false; } //------------------------------------------------------------------------------ void ClipperBase::Reset() { m_CurrentLM = m_MinimaList.begin(); if (m_CurrentLM == m_MinimaList.end()) { return; } //ie nothing to process std::sort(m_MinimaList.begin(), m_MinimaList.end(), LocMinSorter()); //reset all edges ... for (MinimaList::iterator lm = m_MinimaList.begin(); lm != m_MinimaList.end(); ++lm) { TEdge *e = lm->LeftBound; if (e) { e->Curr = e->Bot; e->Side = esLeft; e->OutIdx = Unassigned; } e = lm->RightBound; if (e) { e->Curr = e->Bot; e->Side = esRight; e->OutIdx = Unassigned; } } } //------------------------------------------------------------------------------ void ClipperBase::DisposeLocalMinimaList() { m_MinimaList.clear(); m_CurrentLM = m_MinimaList.begin(); } //------------------------------------------------------------------------------ void ClipperBase::PopLocalMinima() { if (m_CurrentLM == m_MinimaList.end()) { return; } ++m_CurrentLM; } //------------------------------------------------------------------------------ IntRect ClipperBase::GetBounds() { IntRect result; MinimaList::iterator lm = m_MinimaList.begin(); if (lm == m_MinimaList.end()) { result.left = result.top = result.right = result.bottom = 0; return result; } result.left = lm->LeftBound->Bot.X; result.top = lm->LeftBound->Bot.Y; result.right = lm->LeftBound->Bot.X; result.bottom = lm->LeftBound->Bot.Y; while (lm != m_MinimaList.end()) { result.bottom = std::max(result.bottom, lm->LeftBound->Bot.Y); TEdge *e = lm->LeftBound; for (; ;) { TEdge *bottomE = e; while (e->NextInLML) { if (e->Bot.X < result.left) { result.left = e->Bot.X; } if (e->Bot.X > result.right) { result.right = e->Bot.X; } e = e->NextInLML; } result.left = std::min(result.left, e->Bot.X); result.right = std::max(result.right, e->Bot.X); result.left = std::min(result.left, e->Top.X); result.right = std::max(result.right, e->Top.X); result.top = std::min(result.top, e->Top.Y); if (bottomE == lm->LeftBound) { e = lm->RightBound; } else { break; } } ++lm; } return result; } //------------------------------------------------------------------------------ // TClipper methods ... //------------------------------------------------------------------------------ Clipper::Clipper(int initOptions) : ClipperBase() //constructor { m_ActiveEdges = 0; m_SortedEdges = 0; m_ExecuteLocked = false; m_UseFullRange = false; m_ReverseOutput = ((initOptions & ioReverseSolution) != 0); m_StrictSimple = ((initOptions & ioStrictlySimple) != 0); m_PreserveCollinear = ((initOptions & ioPreserveCollinear) != 0); m_HasOpenPaths = false; #ifdef use_xyz m_ZFill = 0; #endif } //------------------------------------------------------------------------------ Clipper::~Clipper() //destructor { Clear(); } //------------------------------------------------------------------------------ #ifdef use_xyz void Clipper::ZFillFunction(ZFillCallback zFillFunc) { m_ZFill = zFillFunc; } //------------------------------------------------------------------------------ #endif void Clipper::Reset() { ClipperBase::Reset(); m_Scanbeam = ScanbeamList(); m_ActiveEdges = 0; m_SortedEdges = 0; for (MinimaList::iterator lm = m_MinimaList.begin(); lm != m_MinimaList.end(); ++lm) { InsertScanbeam(lm->Y); } } //------------------------------------------------------------------------------ bool Clipper::Execute(ClipType clipType, Paths &solution, PolyFillType subjFillType, PolyFillType clipFillType) { if (m_ExecuteLocked) { return false; } if (m_HasOpenPaths) { throw clipperException("Error: PolyTree struct is need for open path clipping."); } m_ExecuteLocked = true; solution.resize(0); m_SubjFillType = subjFillType; m_ClipFillType = clipFillType; m_ClipType = clipType; m_UsingPolyTree = false; bool succeeded = ExecuteInternal(); if (succeeded) { BuildResult(solution); } DisposeAllOutRecs(); m_ExecuteLocked = false; return succeeded; } //------------------------------------------------------------------------------ bool Clipper::Execute(ClipType clipType, PolyTree &polytree, PolyFillType subjFillType, PolyFillType clipFillType) { if (m_ExecuteLocked) { return false; } m_ExecuteLocked = true; m_SubjFillType = subjFillType; m_ClipFillType = clipFillType; m_ClipType = clipType; m_UsingPolyTree = true; bool succeeded = ExecuteInternal(); if (succeeded) { BuildResult2(polytree); } DisposeAllOutRecs(); m_ExecuteLocked = false; return succeeded; } //------------------------------------------------------------------------------ void Clipper::FixHoleLinkage(OutRec &outrec) { //skip OutRecs that (a) contain outermost polygons or //(b) already have the correct owner/child linkage ... if (!outrec.FirstLeft || (outrec.IsHole != outrec.FirstLeft->IsHole && outrec.FirstLeft->Pts)) { return; } OutRec *orfl = outrec.FirstLeft; while (orfl && ((orfl->IsHole == outrec.IsHole) || !orfl->Pts)) { orfl = orfl->FirstLeft; } outrec.FirstLeft = orfl; } //------------------------------------------------------------------------------ bool Clipper::ExecuteInternal() { bool succeeded = true; try { Reset(); if (m_CurrentLM == m_MinimaList.end()) { return true; } cInt botY = PopScanbeam(); do { InsertLocalMinimaIntoAEL(botY); ClearGhostJoins(); ProcessHorizontals(false); if (m_Scanbeam.empty()) { break; } cInt topY = PopScanbeam(); succeeded = ProcessIntersections(topY); if (!succeeded) { break; } ProcessEdgesAtTopOfScanbeam(topY); botY = topY; } while (!m_Scanbeam.empty() || m_CurrentLM != m_MinimaList.end()); } catch (...) { succeeded = false; } if (succeeded) { // printf("Fix orientations\n"); //fix orientations ... for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i) { OutRec *outRec = m_PolyOuts[i]; if (!outRec->Pts || outRec->IsOpen) { continue; } if ((outRec->IsHole ^ m_ReverseOutput) == (Area(*outRec) > 0)) { ReversePolyPtLinks(outRec->Pts); } } if (!m_Joins.empty()) { JoinCommonEdges(); } //unfortunately FixupOutPolygon() must be done after JoinCommonEdges() for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i) { OutRec *outRec = m_PolyOuts[i]; if (outRec->Pts && !outRec->IsOpen) { FixupOutPolygon(*outRec); } } if (m_StrictSimple) { DoSimplePolygons(); } } ClearJoins(); ClearGhostJoins(); return succeeded; } //------------------------------------------------------------------------------ void Clipper::InsertScanbeam(const cInt Y) { //if (!m_Scanbeam.empty() && Y == m_Scanbeam.top()) return;// avoid duplicates. m_Scanbeam.push(Y); } //------------------------------------------------------------------------------ cInt Clipper::PopScanbeam() { const cInt Y = m_Scanbeam.top(); m_Scanbeam.pop(); while (!m_Scanbeam.empty() && Y == m_Scanbeam.top()) { m_Scanbeam.pop(); } // Pop duplicates. return Y; } //------------------------------------------------------------------------------ void Clipper::DisposeAllOutRecs() { for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i) { DisposeOutRec(i); } m_PolyOuts.clear(); } //------------------------------------------------------------------------------ void Clipper::DisposeOutRec(PolyOutList::size_type index) { OutRec *outRec = m_PolyOuts[index]; if (outRec->Pts) { DisposeOutPts(outRec->Pts); } delete outRec; m_PolyOuts[index] = 0; } //------------------------------------------------------------------------------ void Clipper::SetWindingCount(TEdge &edge) { TEdge *e = edge.PrevInAEL; //find the edge of the same polytype that immediately preceeds 'edge' in AEL while (e && ((e->PolyTyp != edge.PolyTyp) || (e->WindDelta == 0))) { e = e->PrevInAEL; } if (!e) { edge.WindCnt = (edge.WindDelta == 0 ? 1 : edge.WindDelta); edge.WindCnt2 = 0; e = m_ActiveEdges; //ie get ready to calc WindCnt2 } else if (edge.WindDelta == 0 && m_ClipType != ctUnion) { edge.WindCnt = 1; edge.WindCnt2 = e->WindCnt2; e = e->NextInAEL; //ie get ready to calc WindCnt2 } else if (IsEvenOddFillType(edge)) { //EvenOdd filling ... if (edge.WindDelta == 0) { //are we inside a subj polygon ... bool Inside = true; TEdge *e2 = e->PrevInAEL; while (e2) { if (e2->PolyTyp == e->PolyTyp && e2->WindDelta != 0) { Inside = !Inside; } e2 = e2->PrevInAEL; } edge.WindCnt = (Inside ? 0 : 1); } else { edge.WindCnt = edge.WindDelta; } edge.WindCnt2 = e->WindCnt2; e = e->NextInAEL; //ie get ready to calc WindCnt2 } else { //nonZero, Positive or Negative filling ... if (e->WindCnt * e->WindDelta < 0) { //prev edge is 'decreasing' WindCount (WC) toward zero //so we're outside the previous polygon ... if (Abs(e->WindCnt) > 1) { //outside prev poly but still inside another. //when reversing direction of prev poly use the same WC if (e->WindDelta * edge.WindDelta < 0) { edge.WindCnt = e->WindCnt; //otherwise continue to 'decrease' WC ... } else { edge.WindCnt = e->WindCnt + edge.WindDelta; } } else { //now outside all polys of same polytype so set own WC ... edge.WindCnt = (edge.WindDelta == 0 ? 1 : edge.WindDelta); } } else { //prev edge is 'increasing' WindCount (WC) away from zero //so we're inside the previous polygon ... if (edge.WindDelta == 0) { edge.WindCnt = (e->WindCnt < 0 ? e->WindCnt - 1 : e->WindCnt + 1); //if wind direction is reversing prev then use same WC } else if (e->WindDelta * edge.WindDelta < 0) { edge.WindCnt = e->WindCnt; //otherwise add to WC ... } else { edge.WindCnt = e->WindCnt + edge.WindDelta; } } edge.WindCnt2 = e->WindCnt2; e = e->NextInAEL; //ie get ready to calc WindCnt2 } //update WindCnt2 ... if (IsEvenOddAltFillType(edge)) { //EvenOdd filling ... while (e != &edge) { if (e->WindDelta != 0) { edge.WindCnt2 = (edge.WindCnt2 == 0 ? 1 : 0); } e = e->NextInAEL; } } else { //nonZero, Positive or Negative filling ... while (e != &edge) { edge.WindCnt2 += e->WindDelta; e = e->NextInAEL; } } } //------------------------------------------------------------------------------ bool Clipper::IsEvenOddFillType(const TEdge &edge) const { if (edge.PolyTyp == ptSubject) { return m_SubjFillType == pftEvenOdd; } else { return m_ClipFillType == pftEvenOdd; } } //------------------------------------------------------------------------------ bool Clipper::IsEvenOddAltFillType(const TEdge &edge) const { if (edge.PolyTyp == ptSubject) { return m_ClipFillType == pftEvenOdd; } else { return m_SubjFillType == pftEvenOdd; } } //------------------------------------------------------------------------------ bool Clipper::IsContributing(const TEdge &edge) const { PolyFillType pft, pft2; if (edge.PolyTyp == ptSubject) { pft = m_SubjFillType; pft2 = m_ClipFillType; } else { pft = m_ClipFillType; pft2 = m_SubjFillType; } switch (pft) { case pftEvenOdd: //return false if a subj line has been flagged as inside a subj polygon if (edge.WindDelta == 0 && edge.WindCnt != 1) { return false; } break; case pftNonZero: if (Abs(edge.WindCnt) != 1) { return false; } break; case pftPositive: if (edge.WindCnt != 1) { return false; } break; default: //pftNegative if (edge.WindCnt != -1) { return false; } } switch (m_ClipType) { case ctIntersection: switch (pft2) { case pftEvenOdd: case pftNonZero: return (edge.WindCnt2 != 0); case pftPositive: return (edge.WindCnt2 > 0); default: return (edge.WindCnt2 < 0); } break; case ctUnion: switch (pft2) { case pftEvenOdd: case pftNonZero: return (edge.WindCnt2 == 0); case pftPositive: return (edge.WindCnt2 <= 0); default: return (edge.WindCnt2 >= 0); } break; case ctDifference: if (edge.PolyTyp == ptSubject) { switch (pft2) { case pftEvenOdd: case pftNonZero: return (edge.WindCnt2 == 0); case pftPositive: return (edge.WindCnt2 <= 0); default: return (edge.WindCnt2 >= 0); } } else { switch (pft2) { case pftEvenOdd: case pftNonZero: return (edge.WindCnt2 != 0); case pftPositive: return (edge.WindCnt2 > 0); default: return (edge.WindCnt2 < 0); } } break; case ctXor: if (edge.WindDelta == 0) { //XOr always contributing unless open switch (pft2) { case pftEvenOdd: case pftNonZero: return (edge.WindCnt2 == 0); case pftPositive: return (edge.WindCnt2 <= 0); default: return (edge.WindCnt2 >= 0); } } else { return true; } break; default: return true; } } //------------------------------------------------------------------------------ OutPt *Clipper::AddLocalMinPoly(TEdge *e1, TEdge *e2, const IntPoint &Pt) { OutPt *result; TEdge *e, *prevE; if (IsHorizontal(*e2) || (e1->Dx > e2->Dx)) { result = AddOutPt(e1, Pt); e2->OutIdx = e1->OutIdx; e1->Side = esLeft; e2->Side = esRight; e = e1; if (e->PrevInAEL == e2) { prevE = e2->PrevInAEL; } else { prevE = e->PrevInAEL; } } else { result = AddOutPt(e2, Pt); e1->OutIdx = e2->OutIdx; e1->Side = esRight; e2->Side = esLeft; e = e2; if (e->PrevInAEL == e1) { prevE = e1->PrevInAEL; } else { prevE = e->PrevInAEL; } } if (prevE && prevE->OutIdx >= 0 && (TopX(*prevE, Pt.Y) == TopX(*e, Pt.Y)) && SlopesEqual( *e, *prevE, m_UseFullRange ) && (e->WindDelta != 0) && (prevE->WindDelta != 0)) { OutPt *outPt = AddOutPt(prevE, Pt); AddJoin(result, outPt, e->Top); } return result; } //------------------------------------------------------------------------------ void Clipper::AddLocalMaxPoly(TEdge *e1, TEdge *e2, const IntPoint &Pt) { AddOutPt(e1, Pt); if (e2->WindDelta == 0) { AddOutPt(e2, Pt); } if (e1->OutIdx == e2->OutIdx) { e1->OutIdx = Unassigned; e2->OutIdx = Unassigned; } else if (e1->OutIdx < e2->OutIdx) { AppendPolygon(e1, e2); } else { AppendPolygon(e2, e1); } } //------------------------------------------------------------------------------ void Clipper::AddEdgeToSEL(TEdge *edge) { //SEL pointers in PEdge are reused to build a list of horizontal edges. //However, we don't need to worry about order with horizontal edge processing. if (!m_SortedEdges) { m_SortedEdges = edge; edge->PrevInSEL = 0; edge->NextInSEL = 0; } else { edge->NextInSEL = m_SortedEdges; edge->PrevInSEL = 0; m_SortedEdges->PrevInSEL = edge; m_SortedEdges = edge; } } //------------------------------------------------------------------------------ void Clipper::CopyAELToSEL() { TEdge *e = m_ActiveEdges; m_SortedEdges = e; while (e) { e->PrevInSEL = e->PrevInAEL; e->NextInSEL = e->NextInAEL; e = e->NextInAEL; } } //------------------------------------------------------------------------------ void Clipper::AddJoin(OutPt *op1, OutPt *op2, const IntPoint OffPt) { Join *j = new Join; j->OutPt1 = op1; j->OutPt2 = op2; j->OffPt = OffPt; m_Joins.push_back(j); } //------------------------------------------------------------------------------ void Clipper::ClearJoins() { for (JoinList::size_type i = 0; i < m_Joins.size(); i++) { delete m_Joins[i]; } m_Joins.resize(0); } //------------------------------------------------------------------------------ void Clipper::ClearGhostJoins() { for (JoinList::size_type i = 0; i < m_GhostJoins.size(); i++) { delete m_GhostJoins[i]; } m_GhostJoins.resize(0); } //------------------------------------------------------------------------------ void Clipper::AddGhostJoin(OutPt *op, const IntPoint OffPt) { Join *j = new Join; j->OutPt1 = op; j->OutPt2 = 0; j->OffPt = OffPt; m_GhostJoins.push_back(j); } //------------------------------------------------------------------------------ void Clipper::InsertLocalMinimaIntoAEL(const cInt botY) { while (m_CurrentLM != m_MinimaList.end() && (m_CurrentLM->Y == botY)) { TEdge *lb = m_CurrentLM->LeftBound; TEdge *rb = m_CurrentLM->RightBound; PopLocalMinima(); OutPt *Op1 = 0; if (!lb) { //nb: don't insert LB into either AEL or SEL InsertEdgeIntoAEL(rb, 0); SetWindingCount(*rb); if (IsContributing(*rb)) { Op1 = AddOutPt(rb, rb->Bot); } } else if (!rb) { InsertEdgeIntoAEL(lb, 0); SetWindingCount(*lb); if (IsContributing(*lb)) { Op1 = AddOutPt(lb, lb->Bot); } InsertScanbeam(lb->Top.Y); } else { InsertEdgeIntoAEL(lb, 0); InsertEdgeIntoAEL(rb, lb); SetWindingCount(*lb); rb->WindCnt = lb->WindCnt; rb->WindCnt2 = lb->WindCnt2; if (IsContributing(*lb)) { Op1 = AddLocalMinPoly(lb, rb, lb->Bot); } InsertScanbeam(lb->Top.Y); } if (rb) { if (IsHorizontal(*rb)) { AddEdgeToSEL(rb); } else { InsertScanbeam(rb->Top.Y); } } if (!lb || !rb) { continue; } //if any output polygons share an edge, they'll need joining later ... if (Op1 && IsHorizontal(*rb) && m_GhostJoins.size() > 0 && (rb->WindDelta != 0)) { for (JoinList::size_type i = 0; i < m_GhostJoins.size(); ++i) { Join *jr = m_GhostJoins[i]; //if the horizontal Rb and a 'ghost' horizontal overlap, then convert //the 'ghost' join to a real join ready for later ... if (HorzSegmentsOverlap(jr->OutPt1->Pt.X, jr->OffPt.X, rb->Bot.X, rb->Top.X)) { AddJoin(jr->OutPt1, Op1, jr->OffPt); } } } if (lb->OutIdx >= 0 && lb->PrevInAEL && lb->PrevInAEL->Curr.X == lb->Bot.X && lb->PrevInAEL->OutIdx >= 0 && SlopesEqual( *lb->PrevInAEL, *lb, m_UseFullRange ) && (lb->WindDelta != 0) && (lb->PrevInAEL->WindDelta != 0)) { OutPt *Op2 = AddOutPt(lb->PrevInAEL, lb->Bot); AddJoin(Op1, Op2, lb->Top); } if (lb->NextInAEL != rb) { if (rb->OutIdx >= 0 && rb->PrevInAEL->OutIdx >= 0 && SlopesEqual( *rb->PrevInAEL, *rb, m_UseFullRange ) && (rb->WindDelta != 0) && (rb->PrevInAEL->WindDelta != 0)) { OutPt *Op2 = AddOutPt(rb->PrevInAEL, rb->Bot); AddJoin(Op1, Op2, rb->Top); } TEdge *e = lb->NextInAEL; if (e) { while (e != rb) { //nb: For calculating winding counts etc, IntersectEdges() assumes //that param1 will be to the Right of param2 ABOVE the intersection ... IntersectEdges(rb, e, lb->Curr); //order important here e = e->NextInAEL; } } } } } //------------------------------------------------------------------------------ void Clipper::DeleteFromAEL(TEdge *e) { TEdge *AelPrev = e->PrevInAEL; TEdge *AelNext = e->NextInAEL; if (!AelPrev && !AelNext && (e != m_ActiveEdges)) { return; } //already deleted if (AelPrev) { AelPrev->NextInAEL = AelNext; } else { m_ActiveEdges = AelNext; } if (AelNext) { AelNext->PrevInAEL = AelPrev; } e->NextInAEL = 0; e->PrevInAEL = 0; } //------------------------------------------------------------------------------ void Clipper::DeleteFromSEL(TEdge *e) { TEdge *SelPrev = e->PrevInSEL; TEdge *SelNext = e->NextInSEL; if (!SelPrev && !SelNext && (e != m_SortedEdges)) { return; } //already deleted if (SelPrev) { SelPrev->NextInSEL = SelNext; } else { m_SortedEdges = SelNext; } if (SelNext) { SelNext->PrevInSEL = SelPrev; } e->NextInSEL = 0; e->PrevInSEL = 0; } //------------------------------------------------------------------------------ #ifdef use_xyz void Clipper::SetZ(IntPoint& pt, TEdge& e1, TEdge& e2) { if (pt.Z != 0 || !m_ZFill) return; else if (pt == e1.Bot) pt.Z = e1.Bot.Z; else if (pt == e1.Top) pt.Z = e1.Top.Z; else if (pt == e2.Bot) pt.Z = e2.Bot.Z; else if (pt == e2.Top) pt.Z = e2.Top.Z; else (*m_ZFill)(e1.Bot, e1.Top, e2.Bot, e2.Top, pt); } //------------------------------------------------------------------------------ #endif void Clipper::IntersectEdges(TEdge *e1, TEdge *e2, IntPoint &Pt) { bool e1Contributing = (e1->OutIdx >= 0); bool e2Contributing = (e2->OutIdx >= 0); #ifdef use_xyz SetZ(Pt, *e1, *e2); #endif #ifdef use_lines //if either edge is on an OPEN path ... if (e1->WindDelta == 0 || e2->WindDelta == 0) { //ignore subject-subject open path intersections UNLESS they //are both open paths, AND they are both 'contributing maximas' ... if (e1->WindDelta == 0 && e2->WindDelta == 0) return; //if intersecting a subj line with a subj poly ... else if (e1->PolyTyp == e2->PolyTyp && e1->WindDelta != e2->WindDelta && m_ClipType == ctUnion) { if (e1->WindDelta == 0) { if (e2Contributing) { AddOutPt(e1, Pt); if (e1Contributing) e1->OutIdx = Unassigned; } } else { if (e1Contributing) { AddOutPt(e2, Pt); if (e2Contributing) e2->OutIdx = Unassigned; } } } else if (e1->PolyTyp != e2->PolyTyp) { //toggle subj open path OutIdx on/off when Abs(clip.WndCnt) == 1 ... if ((e1->WindDelta == 0) && abs(e2->WindCnt) == 1 && (m_ClipType != ctUnion || e2->WindCnt2 == 0)) { AddOutPt(e1, Pt); if (e1Contributing) e1->OutIdx = Unassigned; } else if ((e2->WindDelta == 0) && (abs(e1->WindCnt) == 1) && (m_ClipType != ctUnion || e1->WindCnt2 == 0)) { AddOutPt(e2, Pt); if (e2Contributing) e2->OutIdx = Unassigned; } } return; } #endif // printf("-----------------------------------------------------------------------------------------\n"); // printf("Edges: e1s=(%lli,%lli) e1d=(%lli,%lli) e2s=(%lli,%lli) e2d=(%lli,%lli)\n", // e1->Bot.X, e1->Bot.Y, e1->Top.X, e1->Top.Y, e2->Bot.X, e2->Bot.Y, e2->Top.X, e2->Top.Y); // printf("OutIdx: e1=%i, e2=%i\n", e1->OutIdx, e2->OutIdx); // printf("Point: (%lli,%lli)\n", Pt.X, Pt.Y); //update winding counts... //assumes that e1 will be to the Right of e2 ABOVE the intersection if (e1->PolyTyp == e2->PolyTyp) { if (IsEvenOddFillType(*e1)) { int oldE1WindCnt = e1->WindCnt; e1->WindCnt = e2->WindCnt; e2->WindCnt = oldE1WindCnt; } else { if (e1->WindCnt + e2->WindDelta == 0) { e1->WindCnt = -e1->WindCnt; } else { e1->WindCnt += e2->WindDelta; } if (e2->WindCnt - e1->WindDelta == 0) { e2->WindCnt = -e2->WindCnt; } else { e2->WindCnt -= e1->WindDelta; } } } else { if (!IsEvenOddFillType(*e2)) { e1->WindCnt2 += e2->WindDelta; } else { e1->WindCnt2 = (e1->WindCnt2 == 0) ? 1 : 0; } if (!IsEvenOddFillType(*e1)) { e2->WindCnt2 -= e1->WindDelta; } else { e2->WindCnt2 = (e2->WindCnt2 == 0) ? 1 : 0; } } // printf("WindCount: e1=%i/%i, e2=%i/%i\n", e1->WindCnt, e1->WindCnt2, e2->WindCnt, e2->WindCnt2); PolyFillType e1FillType, e2FillType, e1FillType2, e2FillType2; if (e1->PolyTyp == ptSubject) { e1FillType = m_SubjFillType; e1FillType2 = m_ClipFillType; } else { e1FillType = m_ClipFillType; e1FillType2 = m_SubjFillType; } if (e2->PolyTyp == ptSubject) { e2FillType = m_SubjFillType; e2FillType2 = m_ClipFillType; } else { e2FillType = m_ClipFillType; e2FillType2 = m_SubjFillType; } cInt e1Wc, e2Wc; switch (e1FillType) { case pftPositive: e1Wc = e1->WindCnt; break; case pftNegative: e1Wc = -e1->WindCnt; break; default: e1Wc = Abs(e1->WindCnt); } switch (e2FillType) { case pftPositive: e2Wc = e2->WindCnt; break; case pftNegative: e2Wc = -e2->WindCnt; break; default: e2Wc = Abs(e2->WindCnt); } if (e1Contributing && e2Contributing) { if ((e1Wc != 0 && e1Wc != 1) || (e2Wc != 0 && e2Wc != 1) || (e1->PolyTyp != e2->PolyTyp && m_ClipType != ctXor)) { AddLocalMaxPoly(e1, e2, Pt); } else { AddOutPt(e1, Pt); AddOutPt(e2, Pt); SwapSides(*e1, *e2); SwapPolyIndexes(*e1, *e2); } } else if (e1Contributing) { if (e2Wc == 0 || e2Wc == 1) { AddOutPt(e1, Pt); SwapSides(*e1, *e2); SwapPolyIndexes(*e1, *e2); } } else if (e2Contributing) { if (e1Wc == 0 || e1Wc == 1) { AddOutPt(e2, Pt); SwapSides(*e1, *e2); SwapPolyIndexes(*e1, *e2); } } else if ((e1Wc == 0 || e1Wc == 1) && (e2Wc == 0 || e2Wc == 1)) { //neither edge is currently contributing ... cInt e1Wc2, e2Wc2; switch (e1FillType2) { case pftPositive: e1Wc2 = e1->WindCnt2; break; case pftNegative : e1Wc2 = -e1->WindCnt2; break; default: e1Wc2 = Abs(e1->WindCnt2); } switch (e2FillType2) { case pftPositive: e2Wc2 = e2->WindCnt2; break; case pftNegative: e2Wc2 = -e2->WindCnt2; break; default: e2Wc2 = Abs(e2->WindCnt2); } if (e1->PolyTyp != e2->PolyTyp) { AddLocalMinPoly(e1, e2, Pt); } else if (e1Wc == 1 && e2Wc == 1) { switch (m_ClipType) { case ctIntersection: if (e1Wc2 > 0 && e2Wc2 > 0) { AddLocalMinPoly(e1, e2, Pt); } break; case ctUnion: if (e1Wc2 <= 0 && e2Wc2 <= 0) { AddLocalMinPoly(e1, e2, Pt); } break; case ctDifference: if (((e1->PolyTyp == ptClip) && (e1Wc2 > 0) && (e2Wc2 > 0)) || ((e1->PolyTyp == ptSubject) && (e1Wc2 <= 0) && (e2Wc2 <= 0))) { AddLocalMinPoly(e1, e2, Pt); } break; case ctXor: AddLocalMinPoly(e1, e2, Pt); } } else { SwapSides(*e1, *e2); } } } //------------------------------------------------------------------------------ void Clipper::SetHoleState(TEdge *e, OutRec *outrec) { // printf("Set hole state\n"); bool IsHole = false; TEdge *e2 = e->PrevInAEL; while (e2) { if (e2->OutIdx >= 0 && e2->WindDelta != 0) { IsHole = !IsHole; if (!outrec->FirstLeft) { outrec->FirstLeft = m_PolyOuts[e2->OutIdx]; } } e2 = e2->PrevInAEL; } if (IsHole) { // printf("Hole is true\n"); outrec->IsHole = true; } } //------------------------------------------------------------------------------ OutRec *GetLowermostRec(OutRec *outRec1, OutRec *outRec2) { //work out which polygon fragment has the correct hole state ... if (!outRec1->BottomPt) { outRec1->BottomPt = GetBottomPt(outRec1->Pts); } if (!outRec2->BottomPt) { outRec2->BottomPt = GetBottomPt(outRec2->Pts); } OutPt *OutPt1 = outRec1->BottomPt; OutPt *OutPt2 = outRec2->BottomPt; if (OutPt1->Pt.Y > OutPt2->Pt.Y) { return outRec1; } else if (OutPt1->Pt.Y < OutPt2->Pt.Y) { return outRec2; } else if (OutPt1->Pt.X < OutPt2->Pt.X) { return outRec1; } else if (OutPt1->Pt.X > OutPt2->Pt.X) { return outRec2; } else if (OutPt1->Next == OutPt1) { return outRec2; } else if (OutPt2->Next == OutPt2) { return outRec1; } else if (FirstIsBottomPt(OutPt1, OutPt2)) { return outRec1; } else { return outRec2; } } //------------------------------------------------------------------------------ bool Param1RightOfParam2(OutRec *outRec1, OutRec *outRec2) { do { outRec1 = outRec1->FirstLeft; if (outRec1 == outRec2) { return true; } } while (outRec1); return false; } //------------------------------------------------------------------------------ OutRec *Clipper::GetOutRec(int Idx) { OutRec *outrec = m_PolyOuts[Idx]; while (outrec != m_PolyOuts[outrec->Idx]) { outrec = m_PolyOuts[outrec->Idx]; } return outrec; } //------------------------------------------------------------------------------ void Clipper::AppendPolygon(TEdge *e1, TEdge *e2) { //get the start and ends of both output polygons ... OutRec *outRec1 = m_PolyOuts[e1->OutIdx]; OutRec *outRec2 = m_PolyOuts[e2->OutIdx]; OutRec *holeStateRec; if (Param1RightOfParam2(outRec1, outRec2)) { holeStateRec = outRec2; } else if (Param1RightOfParam2(outRec2, outRec1)) { holeStateRec = outRec1; } else { holeStateRec = GetLowermostRec(outRec1, outRec2); } //get the start and ends of both output polygons and //join e2 poly onto e1 poly and delete pointers to e2 ... OutPt *p1_lft = outRec1->Pts; OutPt *p1_rt = p1_lft->Prev; OutPt *p2_lft = outRec2->Pts; OutPt *p2_rt = p2_lft->Prev; EdgeSide Side; //join e2 poly onto e1 poly and delete pointers to e2 ... if (e1->Side == esLeft) { if (e2->Side == esLeft) { //z y x a b c ReversePolyPtLinks(p2_lft); p2_lft->Next = p1_lft; p1_lft->Prev = p2_lft; p1_rt->Next = p2_rt; p2_rt->Prev = p1_rt; outRec1->Pts = p2_rt; } else { //x y z a b c p2_rt->Next = p1_lft; p1_lft->Prev = p2_rt; p2_lft->Prev = p1_rt; p1_rt->Next = p2_lft; outRec1->Pts = p2_lft; } Side = esLeft; } else { if (e2->Side == esRight) { //a b c z y x ReversePolyPtLinks(p2_lft); p1_rt->Next = p2_rt; p2_rt->Prev = p1_rt; p2_lft->Next = p1_lft; p1_lft->Prev = p2_lft; } else { //a b c x y z p1_rt->Next = p2_lft; p2_lft->Prev = p1_rt; p1_lft->Prev = p2_rt; p2_rt->Next = p1_lft; } Side = esRight; } outRec1->BottomPt = 0; if (holeStateRec == outRec2) { if (outRec2->FirstLeft != outRec1) { outRec1->FirstLeft = outRec2->FirstLeft; } outRec1->IsHole = outRec2->IsHole; } outRec2->Pts = 0; outRec2->BottomPt = 0; outRec2->FirstLeft = outRec1; int OKIdx = e1->OutIdx; int ObsoleteIdx = e2->OutIdx; e1->OutIdx = Unassigned; //nb: safe because we only get here via AddLocalMaxPoly e2->OutIdx = Unassigned; TEdge *e = m_ActiveEdges; while (e) { if (e->OutIdx == ObsoleteIdx) { e->OutIdx = OKIdx; e->Side = Side; break; } e = e->NextInAEL; } outRec2->Idx = outRec1->Idx; } //------------------------------------------------------------------------------ OutRec *Clipper::CreateOutRec() { OutRec *result = new OutRec; result->IsHole = false; result->IsOpen = false; result->FirstLeft = 0; result->Pts = 0; result->BottomPt = 0; result->PolyNd = 0; m_PolyOuts.push_back(result); result->Idx = (int) m_PolyOuts.size() - 1; return result; } //------------------------------------------------------------------------------ OutPt *Clipper::AddOutPt(TEdge *e, const IntPoint &pt) { bool ToFront = (e->Side == esLeft); if (e->OutIdx < 0) { OutRec *outRec = CreateOutRec(); outRec->IsOpen = (e->WindDelta == 0); OutPt *newOp = new OutPt; outRec->Pts = newOp; newOp->Idx = outRec->Idx; newOp->Pt = pt; newOp->Next = newOp; newOp->Prev = newOp; if (!outRec->IsOpen) { SetHoleState(e, outRec); } e->OutIdx = outRec->Idx; return newOp; } else { OutRec *outRec = m_PolyOuts[e->OutIdx]; //OutRec.Pts is the 'Left-most' point & OutRec.Pts.Prev is the 'Right-most' OutPt *op = outRec->Pts; if (ToFront && (pt == op->Pt)) { return op; } else if (!ToFront && (pt == op->Prev->Pt)) { return op->Prev; } OutPt *newOp = new OutPt; newOp->Idx = outRec->Idx; newOp->Pt = pt; newOp->Next = op; newOp->Prev = op->Prev; newOp->Prev->Next = newOp; op->Prev = newOp; if (ToFront) { outRec->Pts = newOp; } return newOp; } } //------------------------------------------------------------------------------ void Clipper::ProcessHorizontals(bool IsTopOfScanbeam) { TEdge *horzEdge = m_SortedEdges; while (horzEdge) { DeleteFromSEL(horzEdge); ProcessHorizontal(horzEdge, IsTopOfScanbeam); horzEdge = m_SortedEdges; } } //------------------------------------------------------------------------------ inline bool IsMinima(TEdge *e) { return e && (e->Prev->NextInLML != e) && (e->Next->NextInLML != e); } //------------------------------------------------------------------------------ inline bool IsMaxima(TEdge *e, const cInt Y) { return e && e->Top.Y == Y && !e->NextInLML; } //------------------------------------------------------------------------------ inline bool IsIntermediate(TEdge *e, const cInt Y) { return e->Top.Y == Y && e->NextInLML; } //------------------------------------------------------------------------------ TEdge *GetMaximaPair(TEdge *e) { TEdge *result = 0; if ((e->Next->Top == e->Top) && !e->Next->NextInLML) { result = e->Next; } else if ((e->Prev->Top == e->Top) && !e->Prev->NextInLML) { result = e->Prev; } if (result && (result->OutIdx == Skip || //result is false if both NextInAEL & PrevInAEL are nil & not horizontal ... (result->NextInAEL == result->PrevInAEL && !IsHorizontal(*result)))) { return 0; } return result; } //------------------------------------------------------------------------------ void Clipper::SwapPositionsInAEL(TEdge *Edge1, TEdge *Edge2) { //check that one or other edge hasn't already been removed from AEL ... if (Edge1->NextInAEL == Edge1->PrevInAEL || Edge2->NextInAEL == Edge2->PrevInAEL) { return; } if (Edge1->NextInAEL == Edge2) { TEdge *Next = Edge2->NextInAEL; if (Next) { Next->PrevInAEL = Edge1; } TEdge *Prev = Edge1->PrevInAEL; if (Prev) { Prev->NextInAEL = Edge2; } Edge2->PrevInAEL = Prev; Edge2->NextInAEL = Edge1; Edge1->PrevInAEL = Edge2; Edge1->NextInAEL = Next; } else if (Edge2->NextInAEL == Edge1) { TEdge *Next = Edge1->NextInAEL; if (Next) { Next->PrevInAEL = Edge2; } TEdge *Prev = Edge2->PrevInAEL; if (Prev) { Prev->NextInAEL = Edge1; } Edge1->PrevInAEL = Prev; Edge1->NextInAEL = Edge2; Edge2->PrevInAEL = Edge1; Edge2->NextInAEL = Next; } else { TEdge *Next = Edge1->NextInAEL; TEdge *Prev = Edge1->PrevInAEL; Edge1->NextInAEL = Edge2->NextInAEL; if (Edge1->NextInAEL) { Edge1->NextInAEL->PrevInAEL = Edge1; } Edge1->PrevInAEL = Edge2->PrevInAEL; if (Edge1->PrevInAEL) { Edge1->PrevInAEL->NextInAEL = Edge1; } Edge2->NextInAEL = Next; if (Edge2->NextInAEL) { Edge2->NextInAEL->PrevInAEL = Edge2; } Edge2->PrevInAEL = Prev; if (Edge2->PrevInAEL) { Edge2->PrevInAEL->NextInAEL = Edge2; } } if (!Edge1->PrevInAEL) { m_ActiveEdges = Edge1; } else if (!Edge2->PrevInAEL) { m_ActiveEdges = Edge2; } } //------------------------------------------------------------------------------ void Clipper::SwapPositionsInSEL(TEdge *Edge1, TEdge *Edge2) { if (!(Edge1->NextInSEL) && !(Edge1->PrevInSEL)) { return; } if (!(Edge2->NextInSEL) && !(Edge2->PrevInSEL)) { return; } if (Edge1->NextInSEL == Edge2) { TEdge *Next = Edge2->NextInSEL; if (Next) { Next->PrevInSEL = Edge1; } TEdge *Prev = Edge1->PrevInSEL; if (Prev) { Prev->NextInSEL = Edge2; } Edge2->PrevInSEL = Prev; Edge2->NextInSEL = Edge1; Edge1->PrevInSEL = Edge2; Edge1->NextInSEL = Next; } else if (Edge2->NextInSEL == Edge1) { TEdge *Next = Edge1->NextInSEL; if (Next) { Next->PrevInSEL = Edge2; } TEdge *Prev = Edge2->PrevInSEL; if (Prev) { Prev->NextInSEL = Edge1; } Edge1->PrevInSEL = Prev; Edge1->NextInSEL = Edge2; Edge2->PrevInSEL = Edge1; Edge2->NextInSEL = Next; } else { TEdge *Next = Edge1->NextInSEL; TEdge *Prev = Edge1->PrevInSEL; Edge1->NextInSEL = Edge2->NextInSEL; if (Edge1->NextInSEL) { Edge1->NextInSEL->PrevInSEL = Edge1; } Edge1->PrevInSEL = Edge2->PrevInSEL; if (Edge1->PrevInSEL) { Edge1->PrevInSEL->NextInSEL = Edge1; } Edge2->NextInSEL = Next; if (Edge2->NextInSEL) { Edge2->NextInSEL->PrevInSEL = Edge2; } Edge2->PrevInSEL = Prev; if (Edge2->PrevInSEL) { Edge2->PrevInSEL->NextInSEL = Edge2; } } if (!Edge1->PrevInSEL) { m_SortedEdges = Edge1; } else if (!Edge2->PrevInSEL) { m_SortedEdges = Edge2; } } //------------------------------------------------------------------------------ TEdge *GetNextInAEL(TEdge *e, Direction dir) { return dir == dLeftToRight ? e->NextInAEL : e->PrevInAEL; } //------------------------------------------------------------------------------ void GetHorzDirection(TEdge &HorzEdge, Direction &Dir, cInt &Left, cInt &Right) { if (HorzEdge.Bot.X < HorzEdge.Top.X) { Left = HorzEdge.Bot.X; Right = HorzEdge.Top.X; Dir = dLeftToRight; } else { Left = HorzEdge.Top.X; Right = HorzEdge.Bot.X; Dir = dRightToLeft; } } //------------------------------------------------------------------------ /******************************************************************************* * Notes: Horizontal edges (HEs) at scanline intersections (ie at the Top or * * Bottom of a scanbeam) are processed as if layered. The order in which HEs * * are processed doesn't matter. HEs intersect with other HE Bot.Xs only [#] * * (or they could intersect with Top.Xs only, ie EITHER Bot.Xs OR Top.Xs), * * and with other non-horizontal edges [*]. Once these intersections are * * processed, intermediate HEs then 'promote' the Edge above (NextInLML) into * * the AEL. These 'promoted' edges may in turn intersect [%] with other HEs. * *******************************************************************************/ void Clipper::ProcessHorizontal(TEdge *horzEdge, bool isTopOfScanbeam) { Direction dir; cInt horzLeft, horzRight; GetHorzDirection(*horzEdge, dir, horzLeft, horzRight); TEdge *eLastHorz = horzEdge, *eMaxPair = 0; while (eLastHorz->NextInLML && IsHorizontal(*eLastHorz->NextInLML)) { eLastHorz = eLastHorz->NextInLML; } if (!eLastHorz->NextInLML) { eMaxPair = GetMaximaPair(eLastHorz); } for (; ;) { bool IsLastHorz = (horzEdge == eLastHorz); TEdge *e = GetNextInAEL(horzEdge, dir); while (e) { //Break if we've got to the end of an intermediate horizontal edge ... //nb: Smaller Dx's are to the right of larger Dx's ABOVE the horizontal. if (e->Curr.X == horzEdge->Top.X && horzEdge->NextInLML && e->Dx < horzEdge->NextInLML->Dx) { break; } TEdge *eNext = GetNextInAEL(e, dir); //saves eNext for later if ((dir == dLeftToRight && e->Curr.X <= horzRight) || (dir == dRightToLeft && e->Curr.X >= horzLeft)) { //so far we're still in range of the horizontal Edge but make sure //we're at the last of consec. horizontals when matching with eMaxPair if (e == eMaxPair && IsLastHorz) { if (horzEdge->OutIdx >= 0) { OutPt *op1 = AddOutPt(horzEdge, horzEdge->Top); TEdge *eNextHorz = m_SortedEdges; while (eNextHorz) { if (eNextHorz->OutIdx >= 0 && HorzSegmentsOverlap( horzEdge->Bot.X, horzEdge->Top.X, eNextHorz->Bot.X, eNextHorz->Top.X )) { OutPt *op2 = AddOutPt(eNextHorz, eNextHorz->Bot); AddJoin(op2, op1, eNextHorz->Top); } eNextHorz = eNextHorz->NextInSEL; } AddGhostJoin(op1, horzEdge->Bot); AddLocalMaxPoly(horzEdge, eMaxPair, horzEdge->Top); } DeleteFromAEL(horzEdge); DeleteFromAEL(eMaxPair); return; } else if (dir == dLeftToRight) { IntPoint Pt = IntPoint(e->Curr.X, horzEdge->Curr.Y); IntersectEdges(horzEdge, e, Pt); } else { IntPoint Pt = IntPoint(e->Curr.X, horzEdge->Curr.Y); IntersectEdges(e, horzEdge, Pt); } SwapPositionsInAEL(horzEdge, e); } else if ((dir == dLeftToRight && e->Curr.X >= horzRight) || (dir == dRightToLeft && e->Curr.X <= horzLeft)) { break; } e = eNext; } //end while if (horzEdge->NextInLML && IsHorizontal(*horzEdge->NextInLML)) { UpdateEdgeIntoAEL(horzEdge); if (horzEdge->OutIdx >= 0) { AddOutPt(horzEdge, horzEdge->Bot); } GetHorzDirection(*horzEdge, dir, horzLeft, horzRight); } else { break; } } //end for (;;) if (horzEdge->NextInLML) { if (horzEdge->OutIdx >= 0) { OutPt *op1 = AddOutPt(horzEdge, horzEdge->Top); if (isTopOfScanbeam) { AddGhostJoin(op1, horzEdge->Bot); } UpdateEdgeIntoAEL(horzEdge); if (horzEdge->WindDelta == 0) { return; } //nb: HorzEdge is no longer horizontal here TEdge *ePrev = horzEdge->PrevInAEL; TEdge *eNext = horzEdge->NextInAEL; if (ePrev && ePrev->Curr.X == horzEdge->Bot.X && ePrev->Curr.Y == horzEdge->Bot.Y && ePrev->WindDelta != 0 && (ePrev->OutIdx >= 0 && ePrev->Curr.Y > ePrev->Top.Y && SlopesEqual( *horzEdge, *ePrev, m_UseFullRange ))) { OutPt *op2 = AddOutPt(ePrev, horzEdge->Bot); AddJoin(op1, op2, horzEdge->Top); } else if (eNext && eNext->Curr.X == horzEdge->Bot.X && eNext->Curr.Y == horzEdge->Bot.Y && eNext->WindDelta != 0 && eNext->OutIdx >= 0 && eNext->Curr.Y > eNext->Top.Y && SlopesEqual( *horzEdge, *eNext, m_UseFullRange )) { OutPt *op2 = AddOutPt(eNext, horzEdge->Bot); AddJoin(op1, op2, horzEdge->Top); } } else { UpdateEdgeIntoAEL(horzEdge); } } else { if (horzEdge->OutIdx >= 0) { AddOutPt(horzEdge, horzEdge->Top); } DeleteFromAEL(horzEdge); } } //------------------------------------------------------------------------------ void Clipper::UpdateEdgeIntoAEL(TEdge *&e) { if (!e->NextInLML) { throw clipperException("UpdateEdgeIntoAEL: invalid call"); } e->NextInLML->OutIdx = e->OutIdx; TEdge *AelPrev = e->PrevInAEL; TEdge *AelNext = e->NextInAEL; if (AelPrev) { AelPrev->NextInAEL = e->NextInLML; } else { m_ActiveEdges = e->NextInLML; } if (AelNext) { AelNext->PrevInAEL = e->NextInLML; } e->NextInLML->Side = e->Side; e->NextInLML->WindDelta = e->WindDelta; e->NextInLML->WindCnt = e->WindCnt; e->NextInLML->WindCnt2 = e->WindCnt2; e = e->NextInLML; e->Curr = e->Bot; e->PrevInAEL = AelPrev; e->NextInAEL = AelNext; if (!IsHorizontal(*e)) { InsertScanbeam(e->Top.Y); } } //------------------------------------------------------------------------------ bool Clipper::ProcessIntersections(const cInt topY) { if (!m_ActiveEdges) { return true; } try { BuildIntersectList(topY); size_t IlSize = m_IntersectList.size(); if (IlSize == 0) { return true; } if (IlSize == 1 || FixupIntersectionOrder()) { ProcessIntersectList(); } else { return false; } } catch (...) { m_SortedEdges = 0; DisposeIntersectNodes(); throw clipperException("ProcessIntersections error"); } m_SortedEdges = 0; return true; } //------------------------------------------------------------------------------ void Clipper::DisposeIntersectNodes() { for (size_t i = 0; i < m_IntersectList.size(); ++i) { delete m_IntersectList[i]; } m_IntersectList.clear(); } //------------------------------------------------------------------------------ void Clipper::BuildIntersectList(const cInt topY) { if (!m_ActiveEdges) { return; } //prepare for sorting ... TEdge *e = m_ActiveEdges; m_SortedEdges = e; while (e) { e->PrevInSEL = e->PrevInAEL; e->NextInSEL = e->NextInAEL; e->Curr.X = TopX(*e, topY); e = e->NextInAEL; } //bubblesort ... bool isModified; do { isModified = false; e = m_SortedEdges; while (e->NextInSEL) { TEdge *eNext = e->NextInSEL; IntPoint Pt; if (e->Curr.X > eNext->Curr.X) { IntersectPoint(*e, *eNext, Pt); IntersectNode *newNode = new IntersectNode; newNode->Edge1 = e; newNode->Edge2 = eNext; newNode->Pt = Pt; m_IntersectList.push_back(newNode); SwapPositionsInSEL(e, eNext); isModified = true; } else { e = eNext; } } if (e->PrevInSEL) { e->PrevInSEL->NextInSEL = 0; } else { break; } } while (isModified); m_SortedEdges = 0; //important } //------------------------------------------------------------------------------ void Clipper::ProcessIntersectList() { for (size_t i = 0; i < m_IntersectList.size(); ++i) { IntersectNode *iNode = m_IntersectList[i]; { IntersectEdges(iNode->Edge1, iNode->Edge2, iNode->Pt); SwapPositionsInAEL(iNode->Edge1, iNode->Edge2); } delete iNode; } m_IntersectList.clear(); } //------------------------------------------------------------------------------ bool IntersectListSort(IntersectNode *node1, IntersectNode *node2) { return node2->Pt.Y < node1->Pt.Y; } //------------------------------------------------------------------------------ inline bool EdgesAdjacent(const IntersectNode &inode) { return (inode.Edge1->NextInSEL == inode.Edge2) || (inode.Edge1->PrevInSEL == inode.Edge2); } //------------------------------------------------------------------------------ bool Clipper::FixupIntersectionOrder() { //pre-condition: intersections are sorted Bottom-most first. //Now it's crucial that intersections are made only between adjacent edges, //so to ensure this the order of intersections may need adjusting ... CopyAELToSEL(); std::sort(m_IntersectList.begin(), m_IntersectList.end(), IntersectListSort); size_t cnt = m_IntersectList.size(); for (size_t i = 0; i < cnt; ++i) { if (!EdgesAdjacent(*m_IntersectList[i])) { size_t j = i + 1; while (j < cnt && !EdgesAdjacent(*m_IntersectList[j])) { j++; } if (j == cnt) { return false; } std::swap(m_IntersectList[i], m_IntersectList[j]); } SwapPositionsInSEL(m_IntersectList[i]->Edge1, m_IntersectList[i]->Edge2); } return true; } //------------------------------------------------------------------------------ void Clipper::DoMaxima(TEdge *e) { TEdge *eMaxPair = GetMaximaPair(e); if (!eMaxPair) { if (e->OutIdx >= 0) { AddOutPt(e, e->Top); } DeleteFromAEL(e); return; } TEdge *eNext = e->NextInAEL; while (eNext && eNext != eMaxPair) { IntersectEdges(e, eNext, e->Top); SwapPositionsInAEL(e, eNext); eNext = e->NextInAEL; } if (e->OutIdx == Unassigned && eMaxPair->OutIdx == Unassigned) { DeleteFromAEL(e); DeleteFromAEL(eMaxPair); } else if (e->OutIdx >= 0 && eMaxPair->OutIdx >= 0) { if (e->OutIdx >= 0) { AddLocalMaxPoly(e, eMaxPair, e->Top); } DeleteFromAEL(e); DeleteFromAEL(eMaxPair); } #ifdef use_lines else if (e->WindDelta == 0) { if (e->OutIdx >= 0) { AddOutPt(e, e->Top); e->OutIdx = Unassigned; } DeleteFromAEL(e); if (eMaxPair->OutIdx >= 0) { AddOutPt(eMaxPair, e->Top); eMaxPair->OutIdx = Unassigned; } DeleteFromAEL(eMaxPair); } #endif else { throw clipperException("DoMaxima error"); } } //------------------------------------------------------------------------------ void Clipper::ProcessEdgesAtTopOfScanbeam(const cInt topY) { TEdge *e = m_ActiveEdges; while (e) { //1. process maxima, treating them as if they're 'bent' horizontal edges, // but exclude maxima with horizontal edges. nb: e can't be a horizontal. bool IsMaximaEdge = IsMaxima(e, topY); if (IsMaximaEdge) { TEdge *eMaxPair = GetMaximaPair(e); IsMaximaEdge = (!eMaxPair || !IsHorizontal(*eMaxPair)); } if (IsMaximaEdge) { TEdge *ePrev = e->PrevInAEL; DoMaxima(e); if (!ePrev) { e = m_ActiveEdges; } else { e = ePrev->NextInAEL; } } else { //2. promote horizontal edges, otherwise update Curr.X and Curr.Y ... if (IsIntermediate(e, topY) && IsHorizontal(*e->NextInLML)) { UpdateEdgeIntoAEL(e); if (e->OutIdx >= 0) { AddOutPt(e, e->Bot); } AddEdgeToSEL(e); } else { e->Curr.X = TopX(*e, topY); e->Curr.Y = topY; } if (m_StrictSimple) { TEdge *ePrev = e->PrevInAEL; if ((e->OutIdx >= 0) && (e->WindDelta != 0) && ePrev && (ePrev->OutIdx >= 0) && (ePrev->Curr.X == e->Curr.X) && (ePrev->WindDelta != 0)) { IntPoint pt = e->Curr; #ifdef use_xyz SetZ(pt, *ePrev, *e); #endif OutPt *op = AddOutPt(ePrev, pt); OutPt *op2 = AddOutPt(e, pt); AddJoin(op, op2, pt); //StrictlySimple (type-3) join } } e = e->NextInAEL; } } //3. Process horizontals at the Top of the scanbeam ... ProcessHorizontals(true); //4. Promote intermediate vertices ... e = m_ActiveEdges; while (e) { if (IsIntermediate(e, topY)) { OutPt *op = 0; if (e->OutIdx >= 0) { op = AddOutPt(e, e->Top); } UpdateEdgeIntoAEL(e); //if output polygons share an edge, they'll need joining later ... TEdge *ePrev = e->PrevInAEL; TEdge *eNext = e->NextInAEL; if (ePrev && ePrev->Curr.X == e->Bot.X && ePrev->Curr.Y == e->Bot.Y && op && ePrev->OutIdx >= 0 && ePrev->Curr.Y > ePrev->Top.Y && SlopesEqual( *e, *ePrev, m_UseFullRange ) && (e->WindDelta != 0) && (ePrev->WindDelta != 0)) { OutPt *op2 = AddOutPt(ePrev, e->Bot); AddJoin(op, op2, e->Top); } else if (eNext && eNext->Curr.X == e->Bot.X && eNext->Curr.Y == e->Bot.Y && op && eNext->OutIdx >= 0 && eNext->Curr.Y > eNext->Top.Y && SlopesEqual( *e, *eNext, m_UseFullRange ) && (e->WindDelta != 0) && (eNext->WindDelta != 0)) { OutPt *op2 = AddOutPt(eNext, e->Bot); AddJoin(op, op2, e->Top); } } e = e->NextInAEL; } } //------------------------------------------------------------------------------ void Clipper::FixupOutPolygon(OutRec &outrec) { //FixupOutPolygon() - removes duplicate points and simplifies consecutive //parallel edges by removing the middle vertex. OutPt *lastOK = 0; outrec.BottomPt = 0; OutPt *pp = outrec.Pts; for (; ;) { if (pp->Prev == pp || pp->Prev == pp->Next) { DisposeOutPts(pp); outrec.Pts = 0; return; } //test for duplicate points and collinear edges ... if ((pp->Pt == pp->Next->Pt) || (pp->Pt == pp->Prev->Pt) || (SlopesEqual( pp->Prev->Pt, pp->Pt, pp->Next->Pt, m_UseFullRange ) && (!m_PreserveCollinear || !Pt2IsBetweenPt1AndPt3(pp->Prev->Pt, pp->Pt, pp->Next->Pt)))) { lastOK = 0; OutPt *tmp = pp; pp->Prev->Next = pp->Next; pp->Next->Prev = pp->Prev; pp = pp->Prev; delete tmp; } else if (pp == lastOK) { break; } else { if (!lastOK) { lastOK = pp; } pp = pp->Next; } } outrec.Pts = pp; } //------------------------------------------------------------------------------ int PointCount(OutPt *Pts) { if (!Pts) { return 0; } int result = 0; OutPt *p = Pts; do { result++; p = p->Next; } while (p != Pts); return result; } //------------------------------------------------------------------------------ void Clipper::BuildResult(Paths &polys) { polys.reserve(m_PolyOuts.size()); for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i) { if (!m_PolyOuts[i]->Pts) { continue; } Path pg; OutPt *p = m_PolyOuts[i]->Pts->Prev; int cnt = PointCount(p); if (cnt < 2) { continue; } pg.reserve(cnt); for (int i = 0; i < cnt; ++i) { pg.push_back(p->Pt); p = p->Prev; } polys.push_back(pg); } } //------------------------------------------------------------------------------ void Clipper::BuildResult2(PolyTree &polytree) { polytree.Clear(); polytree.AllNodes.reserve(m_PolyOuts.size()); //add each output polygon/contour to polytree ... for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); i++) { OutRec *outRec = m_PolyOuts[i]; int cnt = PointCount(outRec->Pts); if ((outRec->IsOpen && cnt < 2) || (!outRec->IsOpen && cnt < 3)) { continue; } FixHoleLinkage(*outRec); PolyNode *pn = new PolyNode(); //nb: polytree takes ownership of all the PolyNodes polytree.AllNodes.push_back(pn); outRec->PolyNd = pn; pn->Parent = 0; pn->Index = 0; pn->Contour.reserve(cnt); OutPt *op = outRec->Pts->Prev; for (int j = 0; j < cnt; j++) { pn->Contour.push_back(op->Pt); op = op->Prev; } } //fixup PolyNode links etc ... polytree.Childs.reserve(m_PolyOuts.size()); for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); i++) { OutRec *outRec = m_PolyOuts[i]; if (!outRec->PolyNd) { continue; } if (outRec->IsOpen) { outRec->PolyNd->m_IsOpen = true; polytree.AddChild(*outRec->PolyNd); } else if (outRec->FirstLeft && outRec->FirstLeft->PolyNd) { outRec->FirstLeft->PolyNd->AddChild(*outRec->PolyNd); } else { polytree.AddChild(*outRec->PolyNd); } } } //------------------------------------------------------------------------------ void SwapIntersectNodes(IntersectNode &int1, IntersectNode &int2) { //just swap the contents (because fIntersectNodes is a single-linked-list) IntersectNode inode = int1; //gets a copy of Int1 int1.Edge1 = int2.Edge1; int1.Edge2 = int2.Edge2; int1.Pt = int2.Pt; int2.Edge1 = inode.Edge1; int2.Edge2 = inode.Edge2; int2.Pt = inode.Pt; } //------------------------------------------------------------------------------ inline bool E2InsertsBeforeE1(TEdge &e1, TEdge &e2) { if (e2.Curr.X == e1.Curr.X) { if (e2.Top.Y > e1.Top.Y) { return e2.Top.X < TopX(e1, e2.Top.Y); } else { return e1.Top.X > TopX(e2, e1.Top.Y); } } else { return e2.Curr.X < e1.Curr.X; } } //------------------------------------------------------------------------------ bool GetOverlap(const cInt a1, const cInt a2, const cInt b1, const cInt b2, cInt &Left, cInt &Right) { if (a1 < a2) { if (b1 < b2) { Left = std::max(a1, b1); Right = std::min(a2, b2); } else { Left = std::max(a1, b2); Right = std::min(a2, b1); } } else { if (b1 < b2) { Left = std::max(a2, b1); Right = std::min(a1, b2); } else { Left = std::max(a2, b2); Right = std::min(a1, b1); } } return Left < Right; } //------------------------------------------------------------------------------ inline void UpdateOutPtIdxs(OutRec &outrec) { OutPt *op = outrec.Pts; do { op->Idx = outrec.Idx; op = op->Prev; } while (op != outrec.Pts); } //------------------------------------------------------------------------------ void Clipper::InsertEdgeIntoAEL(TEdge *edge, TEdge *startEdge) { if (!m_ActiveEdges) { edge->PrevInAEL = 0; edge->NextInAEL = 0; m_ActiveEdges = edge; } else if (!startEdge && E2InsertsBeforeE1(*m_ActiveEdges, *edge)) { edge->PrevInAEL = 0; edge->NextInAEL = m_ActiveEdges; m_ActiveEdges->PrevInAEL = edge; m_ActiveEdges = edge; } else { if (!startEdge) { startEdge = m_ActiveEdges; } while (startEdge->NextInAEL && !E2InsertsBeforeE1(*startEdge->NextInAEL, *edge)) { startEdge = startEdge->NextInAEL; } edge->NextInAEL = startEdge->NextInAEL; if (startEdge->NextInAEL) { startEdge->NextInAEL->PrevInAEL = edge; } edge->PrevInAEL = startEdge; startEdge->NextInAEL = edge; } } //---------------------------------------------------------------------- OutPt *DupOutPt(OutPt *outPt, bool InsertAfter) { OutPt *result = new OutPt; result->Pt = outPt->Pt; result->Idx = outPt->Idx; if (InsertAfter) { result->Next = outPt->Next; result->Prev = outPt; outPt->Next->Prev = result; outPt->Next = result; } else { result->Prev = outPt->Prev; result->Next = outPt; outPt->Prev->Next = result; outPt->Prev = result; } return result; } //------------------------------------------------------------------------------ bool JoinHorz(OutPt *op1, OutPt *op1b, OutPt *op2, OutPt *op2b, const IntPoint Pt, bool DiscardLeft) { Direction Dir1 = (op1->Pt.X > op1b->Pt.X ? dRightToLeft : dLeftToRight); Direction Dir2 = (op2->Pt.X > op2b->Pt.X ? dRightToLeft : dLeftToRight); if (Dir1 == Dir2) { return false; } //When DiscardLeft, we want Op1b to be on the Left of Op1, otherwise we //want Op1b to be on the Right. (And likewise with Op2 and Op2b.) //So, to facilitate this while inserting Op1b and Op2b ... //when DiscardLeft, make sure we're AT or RIGHT of Pt before adding Op1b, //otherwise make sure we're AT or LEFT of Pt. (Likewise with Op2b.) if (Dir1 == dLeftToRight) { while (op1->Next->Pt.X <= Pt.X && op1->Next->Pt.X >= op1->Pt.X && op1->Next->Pt.Y == Pt.Y) { op1 = op1->Next; } if (DiscardLeft && (op1->Pt.X != Pt.X)) { op1 = op1->Next; } op1b = DupOutPt(op1, !DiscardLeft); if (op1b->Pt != Pt) { op1 = op1b; op1->Pt = Pt; op1b = DupOutPt(op1, !DiscardLeft); } } else { while (op1->Next->Pt.X >= Pt.X && op1->Next->Pt.X <= op1->Pt.X && op1->Next->Pt.Y == Pt.Y) { op1 = op1->Next; } if (!DiscardLeft && (op1->Pt.X != Pt.X)) { op1 = op1->Next; } op1b = DupOutPt(op1, DiscardLeft); if (op1b->Pt != Pt) { op1 = op1b; op1->Pt = Pt; op1b = DupOutPt(op1, DiscardLeft); } } if (Dir2 == dLeftToRight) { while (op2->Next->Pt.X <= Pt.X && op2->Next->Pt.X >= op2->Pt.X && op2->Next->Pt.Y == Pt.Y) { op2 = op2->Next; } if (DiscardLeft && (op2->Pt.X != Pt.X)) { op2 = op2->Next; } op2b = DupOutPt(op2, !DiscardLeft); if (op2b->Pt != Pt) { op2 = op2b; op2->Pt = Pt; op2b = DupOutPt(op2, !DiscardLeft); }; } else { while (op2->Next->Pt.X >= Pt.X && op2->Next->Pt.X <= op2->Pt.X && op2->Next->Pt.Y == Pt.Y) { op2 = op2->Next; } if (!DiscardLeft && (op2->Pt.X != Pt.X)) { op2 = op2->Next; } op2b = DupOutPt(op2, DiscardLeft); if (op2b->Pt != Pt) { op2 = op2b; op2->Pt = Pt; op2b = DupOutPt(op2, DiscardLeft); }; }; if ((Dir1 == dLeftToRight) == DiscardLeft) { op1->Prev = op2; op2->Next = op1; op1b->Next = op2b; op2b->Prev = op1b; } else { op1->Next = op2; op2->Prev = op1; op1b->Prev = op2b; op2b->Next = op1b; } return true; } //------------------------------------------------------------------------------ bool Clipper::JoinPoints(Join *j, OutRec *outRec1, OutRec *outRec2) { OutPt *op1 = j->OutPt1, *op1b; OutPt *op2 = j->OutPt2, *op2b; //There are 3 kinds of joins for output polygons ... //1. Horizontal joins where Join.OutPt1 & Join.OutPt2 are a vertices anywhere //along (horizontal) collinear edges (& Join.OffPt is on the same horizontal). //2. Non-horizontal joins where Join.OutPt1 & Join.OutPt2 are at the same //location at the Bottom of the overlapping segment (& Join.OffPt is above). //3. StrictSimple joins where edges touch but are not collinear and where //Join.OutPt1, Join.OutPt2 & Join.OffPt all share the same point. bool isHorizontal = (j->OutPt1->Pt.Y == j->OffPt.Y); if (isHorizontal && (j->OffPt == j->OutPt1->Pt) && (j->OffPt == j->OutPt2->Pt)) { //Strictly Simple join ... if (outRec1 != outRec2) { return false; } op1b = j->OutPt1->Next; while (op1b != op1 && (op1b->Pt == j->OffPt)) { op1b = op1b->Next; } bool reverse1 = (op1b->Pt.Y > j->OffPt.Y); op2b = j->OutPt2->Next; while (op2b != op2 && (op2b->Pt == j->OffPt)) { op2b = op2b->Next; } bool reverse2 = (op2b->Pt.Y > j->OffPt.Y); if (reverse1 == reverse2) { return false; } if (reverse1) { op1b = DupOutPt(op1, false); op2b = DupOutPt(op2, true); op1->Prev = op2; op2->Next = op1; op1b->Next = op2b; op2b->Prev = op1b; j->OutPt1 = op1; j->OutPt2 = op1b; return true; } else { op1b = DupOutPt(op1, true); op2b = DupOutPt(op2, false); op1->Next = op2; op2->Prev = op1; op1b->Prev = op2b; op2b->Next = op1b; j->OutPt1 = op1; j->OutPt2 = op1b; return true; } } else if (isHorizontal) { //treat horizontal joins differently to non-horizontal joins since with //them we're not yet sure where the overlapping is. OutPt1.Pt & OutPt2.Pt //may be anywhere along the horizontal edge. op1b = op1; while (op1->Prev->Pt.Y == op1->Pt.Y && op1->Prev != op1b && op1->Prev != op2) { op1 = op1->Prev; } while (op1b->Next->Pt.Y == op1b->Pt.Y && op1b->Next != op1 && op1b->Next != op2) { op1b = op1b->Next; } if (op1b->Next == op1 || op1b->Next == op2) { return false; } //a flat 'polygon' op2b = op2; while (op2->Prev->Pt.Y == op2->Pt.Y && op2->Prev != op2b && op2->Prev != op1b) { op2 = op2->Prev; } while (op2b->Next->Pt.Y == op2b->Pt.Y && op2b->Next != op2 && op2b->Next != op1) { op2b = op2b->Next; } if (op2b->Next == op2 || op2b->Next == op1) { return false; } //a flat 'polygon' cInt Left, Right; //Op1 --> Op1b & Op2 --> Op2b are the extremites of the horizontal edges if (!GetOverlap(op1->Pt.X, op1b->Pt.X, op2->Pt.X, op2b->Pt.X, Left, Right)) { return false; } //DiscardLeftSide: when overlapping edges are joined, a spike will created //which needs to be cleaned up. However, we don't want Op1 or Op2 caught up //on the discard Side as either may still be needed for other joins ... IntPoint Pt; bool DiscardLeftSide; if (op1->Pt.X >= Left && op1->Pt.X <= Right) { Pt = op1->Pt; DiscardLeftSide = (op1->Pt.X > op1b->Pt.X); } else if (op2->Pt.X >= Left && op2->Pt.X <= Right) { Pt = op2->Pt; DiscardLeftSide = (op2->Pt.X > op2b->Pt.X); } else if (op1b->Pt.X >= Left && op1b->Pt.X <= Right) { Pt = op1b->Pt; DiscardLeftSide = op1b->Pt.X > op1->Pt.X; } else { Pt = op2b->Pt; DiscardLeftSide = (op2b->Pt.X > op2->Pt.X); } j->OutPt1 = op1; j->OutPt2 = op2; return JoinHorz(op1, op1b, op2, op2b, Pt, DiscardLeftSide); } else { //nb: For non-horizontal joins ... // 1. Jr.OutPt1.Pt.Y == Jr.OutPt2.Pt.Y // 2. Jr.OutPt1.Pt > Jr.OffPt.Y //make sure the polygons are correctly oriented ... op1b = op1->Next; while ((op1b->Pt == op1->Pt) && (op1b != op1)) { op1b = op1b->Next; } bool Reverse1 = ((op1b->Pt.Y > op1->Pt.Y) || !SlopesEqual(op1->Pt, op1b->Pt, j->OffPt, m_UseFullRange)); if (Reverse1) { op1b = op1->Prev; while ((op1b->Pt == op1->Pt) && (op1b != op1)) { op1b = op1b->Prev; } if ((op1b->Pt.Y > op1->Pt.Y) || !SlopesEqual(op1->Pt, op1b->Pt, j->OffPt, m_UseFullRange)) { return false; } }; op2b = op2->Next; while ((op2b->Pt == op2->Pt) && (op2b != op2)) { op2b = op2b->Next; } bool Reverse2 = ((op2b->Pt.Y > op2->Pt.Y) || !SlopesEqual(op2->Pt, op2b->Pt, j->OffPt, m_UseFullRange)); if (Reverse2) { op2b = op2->Prev; while ((op2b->Pt == op2->Pt) && (op2b != op2)) { op2b = op2b->Prev; } if ((op2b->Pt.Y > op2->Pt.Y) || !SlopesEqual(op2->Pt, op2b->Pt, j->OffPt, m_UseFullRange)) { return false; } } if ((op1b == op1) || (op2b == op2) || (op1b == op2b) || ((outRec1 == outRec2) && (Reverse1 == Reverse2))) { return false; } if (Reverse1) { op1b = DupOutPt(op1, false); op2b = DupOutPt(op2, true); op1->Prev = op2; op2->Next = op1; op1b->Next = op2b; op2b->Prev = op1b; j->OutPt1 = op1; j->OutPt2 = op1b; return true; } else { op1b = DupOutPt(op1, true); op2b = DupOutPt(op2, false); op1->Next = op2; op2->Prev = op1; op1b->Prev = op2b; op2b->Next = op1b; j->OutPt1 = op1; j->OutPt2 = op1b; return true; } } } //---------------------------------------------------------------------- static OutRec *ParseFirstLeft(OutRec *FirstLeft) { while (FirstLeft && !FirstLeft->Pts) { FirstLeft = FirstLeft->FirstLeft; } return FirstLeft; } //------------------------------------------------------------------------------ void Clipper::FixupFirstLefts1(OutRec *OldOutRec, OutRec *NewOutRec) { //tests if NewOutRec contains the polygon before reassigning FirstLeft for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i) { OutRec *outRec = m_PolyOuts[i]; if (!outRec->Pts || !outRec->FirstLeft) { continue; } OutRec *firstLeft = ParseFirstLeft(outRec->FirstLeft); if (firstLeft == OldOutRec) { if (Poly2ContainsPoly1(outRec->Pts, NewOutRec->Pts)) { outRec->FirstLeft = NewOutRec; } } } } //---------------------------------------------------------------------- void Clipper::FixupFirstLefts2(OutRec *OldOutRec, OutRec *NewOutRec) { //reassigns FirstLeft WITHOUT testing if NewOutRec contains the polygon for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i) { OutRec *outRec = m_PolyOuts[i]; if (outRec->FirstLeft == OldOutRec) { outRec->FirstLeft = NewOutRec; } } } //---------------------------------------------------------------------- void Clipper::JoinCommonEdges() { for (JoinList::size_type i = 0; i < m_Joins.size(); i++) { Join *join = m_Joins[i]; OutRec *outRec1 = GetOutRec(join->OutPt1->Idx); OutRec *outRec2 = GetOutRec(join->OutPt2->Idx); if (!outRec1->Pts || !outRec2->Pts) { continue; } //get the polygon fragment with the correct hole state (FirstLeft) //before calling JoinPoints() ... OutRec *holeStateRec; if (outRec1 == outRec2) { holeStateRec = outRec1; } else if (Param1RightOfParam2(outRec1, outRec2)) { holeStateRec = outRec2; } else if (Param1RightOfParam2(outRec2, outRec1)) { holeStateRec = outRec1; } else { holeStateRec = GetLowermostRec(outRec1, outRec2); } if (!JoinPoints(join, outRec1, outRec2)) { continue; } if (outRec1 == outRec2) { //instead of joining two polygons, we've just created a new one by //splitting one polygon into two. outRec1->Pts = join->OutPt1; outRec1->BottomPt = 0; outRec2 = CreateOutRec(); outRec2->Pts = join->OutPt2; //update all OutRec2.Pts Idx's ... UpdateOutPtIdxs(*outRec2); //We now need to check every OutRec.FirstLeft pointer. If it points //to OutRec1 it may need to point to OutRec2 instead ... if (m_UsingPolyTree) { for (PolyOutList::size_type j = 0; j < m_PolyOuts.size() - 1; j++) { OutRec *oRec = m_PolyOuts[j]; if (!oRec->Pts || ParseFirstLeft(oRec->FirstLeft) != outRec1 || oRec->IsHole == outRec1->IsHole) { continue; } if (Poly2ContainsPoly1(oRec->Pts, join->OutPt2)) { oRec->FirstLeft = outRec2; } } } if (Poly2ContainsPoly1(outRec2->Pts, outRec1->Pts)) { //outRec2 is contained by outRec1 ... outRec2->IsHole = !outRec1->IsHole; outRec2->FirstLeft = outRec1; //fixup FirstLeft pointers that may need reassigning to OutRec1 if (m_UsingPolyTree) { FixupFirstLefts2(outRec2, outRec1); } if ((outRec2->IsHole ^ m_ReverseOutput) == (Area(*outRec2) > 0)) { ReversePolyPtLinks(outRec2->Pts); } } else if (Poly2ContainsPoly1(outRec1->Pts, outRec2->Pts)) { //outRec1 is contained by outRec2 ... outRec2->IsHole = outRec1->IsHole; outRec1->IsHole = !outRec2->IsHole; outRec2->FirstLeft = outRec1->FirstLeft; outRec1->FirstLeft = outRec2; //fixup FirstLeft pointers that may need reassigning to OutRec1 if (m_UsingPolyTree) { FixupFirstLefts2(outRec1, outRec2); } if ((outRec1->IsHole ^ m_ReverseOutput) == (Area(*outRec1) > 0)) { ReversePolyPtLinks(outRec1->Pts); } } else { //the 2 polygons are completely separate ... outRec2->IsHole = outRec1->IsHole; outRec2->FirstLeft = outRec1->FirstLeft; //fixup FirstLeft pointers that may need reassigning to OutRec2 if (m_UsingPolyTree) { FixupFirstLefts1(outRec1, outRec2); } } } else { //joined 2 polygons together ... outRec2->Pts = 0; outRec2->BottomPt = 0; outRec2->Idx = outRec1->Idx; outRec1->IsHole = holeStateRec->IsHole; if (holeStateRec == outRec2) { outRec1->FirstLeft = outRec2->FirstLeft; } outRec2->FirstLeft = outRec1; //fixup FirstLeft pointers that may need reassigning to OutRec1 if (m_UsingPolyTree) { FixupFirstLefts2(outRec2, outRec1); } } } } //------------------------------------------------------------------------------ // ClipperOffset support functions ... //------------------------------------------------------------------------------ DoublePoint GetUnitNormal(const IntPoint &pt1, const IntPoint &pt2) { if (pt2.X == pt1.X && pt2.Y == pt1.Y) { return DoublePoint(0, 0); } double Dx = (double) (pt2.X - pt1.X); double dy = (double) (pt2.Y - pt1.Y); double f = 1 * 1.0 / std::sqrt(Dx * Dx + dy * dy); Dx *= f; dy *= f; return DoublePoint(dy, -Dx); } //------------------------------------------------------------------------------ // ClipperOffset class //------------------------------------------------------------------------------ ClipperOffset::ClipperOffset(double miterLimit, double arcTolerance) { this->MiterLimit = miterLimit; this->ArcTolerance = arcTolerance; m_lowest.X = -1; } //------------------------------------------------------------------------------ ClipperOffset::~ClipperOffset() { Clear(); } //------------------------------------------------------------------------------ void ClipperOffset::Clear() { for (int i = 0; i < m_polyNodes.ChildCount(); ++i) { delete m_polyNodes.Childs[i]; } m_polyNodes.Childs.clear(); m_lowest.X = -1; } //------------------------------------------------------------------------------ void ClipperOffset::AddPath(const Path &path, JoinType joinType, EndType endType) { int highI = (int) path.size() - 1; if (highI < 0) { return; } PolyNode *newNode = new PolyNode(); newNode->m_jointype = joinType; newNode->m_endtype = endType; //strip duplicate points from path and also get index to the lowest point ... if (endType == etClosedLine || endType == etClosedPolygon) { while (highI > 0 && path[0] == path[highI]) { highI--; } } newNode->Contour.reserve(highI + 1); newNode->Contour.push_back(path[0]); int j = 0, k = 0; for (int i = 1; i <= highI; i++) { if (newNode->Contour[j] != path[i]) { j++; newNode->Contour.push_back(path[i]); if (path[i].Y > newNode->Contour[k].Y || (path[i].Y == newNode->Contour[k].Y && path[i].X < newNode->Contour[k].X)) { k = j; } } } if (endType == etClosedPolygon && j < 2) { delete newNode; return; } m_polyNodes.AddChild(*newNode); //if this path's lowest pt is lower than all the others then update m_lowest if (endType != etClosedPolygon) { return; } if (m_lowest.X < 0) { m_lowest = IntPoint(m_polyNodes.ChildCount() - 1, k); } else { IntPoint ip = m_polyNodes.Childs[(int) m_lowest.X]->Contour[(int) m_lowest.Y]; if (newNode->Contour[k].Y > ip.Y || (newNode->Contour[k].Y == ip.Y && newNode->Contour[k].X < ip.X)) { m_lowest = IntPoint(m_polyNodes.ChildCount() - 1, k); } } } //------------------------------------------------------------------------------ void ClipperOffset::AddPaths(const Paths &paths, JoinType joinType, EndType endType) { for (Paths::size_type i = 0; i < paths.size(); ++i) { AddPath(paths[i], joinType, endType); } } //------------------------------------------------------------------------------ void ClipperOffset::FixOrientations() { //fixup orientations of all closed paths if the orientation of the //closed path with the lowermost vertex is wrong ... if (m_lowest.X >= 0 && !Orientation(m_polyNodes.Childs[(int) m_lowest.X]->Contour)) { for (int i = 0; i < m_polyNodes.ChildCount(); ++i) { PolyNode &node = *m_polyNodes.Childs[i]; if (node.m_endtype == etClosedPolygon || (node.m_endtype == etClosedLine && Orientation(node.Contour))) { ReversePath(node.Contour); } } } else { for (int i = 0; i < m_polyNodes.ChildCount(); ++i) { PolyNode &node = *m_polyNodes.Childs[i]; if (node.m_endtype == etClosedLine && !Orientation(node.Contour)) { ReversePath(node.Contour); } } } } //------------------------------------------------------------------------------ void ClipperOffset::Execute(Paths &solution, double delta) { solution.clear(); FixOrientations(); DoOffset(delta); //now clean up 'corners' ... Clipper clpr; clpr.AddPaths(m_destPolys, ptSubject, true); if (delta > 0) { clpr.Execute(ctUnion, solution, pftPositive, pftPositive); } else { IntRect r = clpr.GetBounds(); Path outer(4); outer[0] = IntPoint(r.left - 10, r.bottom + 10); outer[1] = IntPoint(r.right + 10, r.bottom + 10); outer[2] = IntPoint(r.right + 10, r.top - 10); outer[3] = IntPoint(r.left - 10, r.top - 10); clpr.AddPath(outer, ptSubject, true); clpr.ReverseSolution(true); clpr.Execute(ctUnion, solution, pftNegative, pftNegative); if (solution.size() > 0) { solution.erase(solution.begin()); } } } //------------------------------------------------------------------------------ void ClipperOffset::Execute(PolyTree &solution, double delta) { solution.Clear(); FixOrientations(); DoOffset(delta); //now clean up 'corners' ... Clipper clpr; clpr.AddPaths(m_destPolys, ptSubject, true); if (delta > 0) { clpr.Execute(ctUnion, solution, pftPositive, pftPositive); } else { IntRect r = clpr.GetBounds(); Path outer(4); outer[0] = IntPoint(r.left - 10, r.bottom + 10); outer[1] = IntPoint(r.right + 10, r.bottom + 10); outer[2] = IntPoint(r.right + 10, r.top - 10); outer[3] = IntPoint(r.left - 10, r.top - 10); clpr.AddPath(outer, ptSubject, true); clpr.ReverseSolution(true); clpr.Execute(ctUnion, solution, pftNegative, pftNegative); //remove the outer PolyNode rectangle ... if (solution.ChildCount() == 1 && solution.Childs[0]->ChildCount() > 0) { PolyNode *outerNode = solution.Childs[0]; solution.Childs.reserve(outerNode->ChildCount()); solution.Childs[0] = outerNode->Childs[0]; solution.Childs[0]->Parent = outerNode->Parent; for (int i = 1; i < outerNode->ChildCount(); ++i) { solution.AddChild(*outerNode->Childs[i]); } } else { solution.Clear(); } } } //------------------------------------------------------------------------------ void ClipperOffset::DoOffset(double delta) { m_destPolys.clear(); m_delta = delta; //if Zero offset, just copy any CLOSED polygons to m_p and return ... if (NEAR_ZERO(delta)) { m_destPolys.reserve(m_polyNodes.ChildCount()); for (int i = 0; i < m_polyNodes.ChildCount(); i++) { PolyNode &node = *m_polyNodes.Childs[i]; if (node.m_endtype == etClosedPolygon) { m_destPolys.push_back(node.Contour); } } return; } //see offset_triginometry3.svg in the documentation folder ... if (MiterLimit > 2) { m_miterLim = 2 / (MiterLimit * MiterLimit); } else { m_miterLim = 0.5; } double y; if (ArcTolerance <= 0.0) { y = def_arc_tolerance; } else if (ArcTolerance > std::fabs(delta) * def_arc_tolerance) { y = std::fabs(delta) * def_arc_tolerance; } else { y = ArcTolerance; } //see offset_triginometry2.svg in the documentation folder ... double steps = pi / std::acos(1 - y / std::fabs(delta)); if (steps > std::fabs(delta) * pi) { steps = std::fabs(delta) * pi; } //ie excessive precision check m_sin = std::sin(two_pi / steps); m_cos = std::cos(two_pi / steps); m_StepsPerRad = steps / two_pi; if (delta < 0.0) { m_sin = -m_sin; } m_destPolys.reserve(m_polyNodes.ChildCount() * 2); for (int i = 0; i < m_polyNodes.ChildCount(); i++) { PolyNode &node = *m_polyNodes.Childs[i]; m_srcPoly = node.Contour; int len = (int) m_srcPoly.size(); if (len == 0 || (delta <= 0 && (len < 3 || node.m_endtype != etClosedPolygon))) { continue; } m_destPoly.clear(); if (len == 1) { if (node.m_jointype == jtRound) { double X = 1.0, Y = 0.0; for (cInt j = 1; j <= steps; j++) { m_destPoly.push_back( IntPoint( Round(m_srcPoly[0].X + X * delta), Round(m_srcPoly[0].Y + Y * delta) ) ); double X2 = X; X = X * m_cos - m_sin * Y; Y = X2 * m_sin + Y * m_cos; } } else { double X = -1.0, Y = -1.0; for (int j = 0; j < 4; ++j) { m_destPoly.push_back( IntPoint( Round(m_srcPoly[0].X + X * delta), Round(m_srcPoly[0].Y + Y * delta) ) ); if (X < 0) { X = 1; } else if (Y < 0) { Y = 1; } else { X = -1; } } } m_destPolys.push_back(m_destPoly); continue; } //build m_normals ... m_normals.clear(); m_normals.reserve(len); for (int j = 0; j < len - 1; ++j) { m_normals.push_back(GetUnitNormal(m_srcPoly[j], m_srcPoly[j + 1])); } if (node.m_endtype == etClosedLine || node.m_endtype == etClosedPolygon) { m_normals.push_back(GetUnitNormal(m_srcPoly[len - 1], m_srcPoly[0])); } else { m_normals.push_back(DoublePoint(m_normals[len - 2])); } if (node.m_endtype == etClosedPolygon) { int k = len - 1; for (int j = 0; j < len; ++j) { OffsetPoint(j, k, node.m_jointype); } m_destPolys.push_back(m_destPoly); } else if (node.m_endtype == etClosedLine) { int k = len - 1; for (int j = 0; j < len; ++j) { OffsetPoint(j, k, node.m_jointype); } m_destPolys.push_back(m_destPoly); m_destPoly.clear(); //re-build m_normals ... DoublePoint n = m_normals[len - 1]; for (int j = len - 1; j > 0; j--) { m_normals[j] = DoublePoint(-m_normals[j - 1].X, -m_normals[j - 1].Y); } m_normals[0] = DoublePoint(-n.X, -n.Y); k = 0; for (int j = len - 1; j >= 0; j--) { OffsetPoint(j, k, node.m_jointype); } m_destPolys.push_back(m_destPoly); } else { int k = 0; for (int j = 1; j < len - 1; ++j) { OffsetPoint(j, k, node.m_jointype); } IntPoint pt1; if (node.m_endtype == etOpenButt) { int j = len - 1; pt1 = IntPoint( (cInt) Round(m_srcPoly[j].X + m_normals[j].X * delta), (cInt) Round(m_srcPoly[j].Y + m_normals[j].Y * delta) ); m_destPoly.push_back(pt1); pt1 = IntPoint( (cInt) Round(m_srcPoly[j].X - m_normals[j].X * delta), (cInt) Round(m_srcPoly[j].Y - m_normals[j].Y * delta) ); m_destPoly.push_back(pt1); } else { int j = len - 1; k = len - 2; m_sinA = 0; m_normals[j] = DoublePoint(-m_normals[j].X, -m_normals[j].Y); if (node.m_endtype == etOpenSquare) { DoSquare(j, k); } else { DoRound(j, k); } } //re-build m_normals ... for (int j = len - 1; j > 0; j--) { m_normals[j] = DoublePoint(-m_normals[j - 1].X, -m_normals[j - 1].Y); } m_normals[0] = DoublePoint(-m_normals[1].X, -m_normals[1].Y); k = len - 1; for (int j = k - 1; j > 0; --j) { OffsetPoint(j, k, node.m_jointype); } if (node.m_endtype == etOpenButt) { pt1 = IntPoint( (cInt) Round(m_srcPoly[0].X - m_normals[0].X * delta), (cInt) Round(m_srcPoly[0].Y - m_normals[0].Y * delta) ); m_destPoly.push_back(pt1); pt1 = IntPoint( (cInt) Round(m_srcPoly[0].X + m_normals[0].X * delta), (cInt) Round(m_srcPoly[0].Y + m_normals[0].Y * delta) ); m_destPoly.push_back(pt1); } else { k = 1; m_sinA = 0; if (node.m_endtype == etOpenSquare) { DoSquare(0, 1); } else { DoRound(0, 1); } } m_destPolys.push_back(m_destPoly); } } } //------------------------------------------------------------------------------ void ClipperOffset::OffsetPoint(int j, int &k, JoinType jointype) { //cross product ... m_sinA = (m_normals[k].X * m_normals[j].Y - m_normals[j].X * m_normals[k].Y); if (std::fabs(m_sinA * m_delta) < 1.0) { //dot product ... double cosA = (m_normals[k].X * m_normals[j].X + m_normals[j].Y * m_normals[k].Y); if (cosA > 0) // angle => 0 degrees { m_destPoly.push_back( IntPoint( Round(m_srcPoly[j].X + m_normals[k].X * m_delta), Round(m_srcPoly[j].Y + m_normals[k].Y * m_delta) ) ); return; } //else angle => 180 degrees } else if (m_sinA > 1.0) { m_sinA = 1.0; } else if (m_sinA < -1.0) { m_sinA = -1.0; } if (m_sinA * m_delta < 0) { m_destPoly.push_back( IntPoint( Round(m_srcPoly[j].X + m_normals[k].X * m_delta), Round(m_srcPoly[j].Y + m_normals[k].Y * m_delta) ) ); m_destPoly.push_back(m_srcPoly[j]); m_destPoly.push_back( IntPoint( Round(m_srcPoly[j].X + m_normals[j].X * m_delta), Round(m_srcPoly[j].Y + m_normals[j].Y * m_delta) ) ); } else { switch (jointype) { case jtMiter: { double r = 1 + (m_normals[j].X * m_normals[k].X + m_normals[j].Y * m_normals[k].Y); if (r >= m_miterLim) { DoMiter(j, k, r); } else { DoSquare(j, k); } break; } case jtSquare: DoSquare(j, k); break; case jtRound: DoRound(j, k); break; } } k = j; } //------------------------------------------------------------------------------ void ClipperOffset::DoSquare(int j, int k) { double dx = std::tan(std::atan2(m_sinA, m_normals[k].X * m_normals[j].X + m_normals[k].Y * m_normals[j].Y) / 4); m_destPoly.push_back( IntPoint( Round(m_srcPoly[j].X + m_delta * (m_normals[k].X - m_normals[k].Y * dx)), Round(m_srcPoly[j].Y + m_delta * (m_normals[k].Y + m_normals[k].X * dx)) ) ); m_destPoly.push_back( IntPoint( Round(m_srcPoly[j].X + m_delta * (m_normals[j].X + m_normals[j].Y * dx)), Round(m_srcPoly[j].Y + m_delta * (m_normals[j].Y - m_normals[j].X * dx)) ) ); } //------------------------------------------------------------------------------ void ClipperOffset::DoMiter(int j, int k, double r) { double q = m_delta / r; m_destPoly.push_back( IntPoint( Round(m_srcPoly[j].X + (m_normals[k].X + m_normals[j].X) * q), Round(m_srcPoly[j].Y + (m_normals[k].Y + m_normals[j].Y) * q) ) ); } //------------------------------------------------------------------------------ void ClipperOffset::DoRound(int j, int k) { double a = std::atan2(m_sinA, m_normals[k].X * m_normals[j].X + m_normals[k].Y * m_normals[j].Y); int steps = std::max((int) Round(m_StepsPerRad * std::fabs(a)), 1); double X = m_normals[k].X, Y = m_normals[k].Y, X2; for (int i = 0; i < steps; ++i) { m_destPoly.push_back(IntPoint(Round(m_srcPoly[j].X + X * m_delta), Round(m_srcPoly[j].Y + Y * m_delta))); X2 = X; X = X * m_cos - m_sin * Y; Y = X2 * m_sin + Y * m_cos; } m_destPoly.push_back( IntPoint( Round(m_srcPoly[j].X + m_normals[j].X * m_delta), Round(m_srcPoly[j].Y + m_normals[j].Y * m_delta) ) ); } //------------------------------------------------------------------------------ // Miscellaneous public functions //------------------------------------------------------------------------------ void Clipper::DoSimplePolygons() { PolyOutList::size_type i = 0; while (i < m_PolyOuts.size()) { OutRec *outrec = m_PolyOuts[i++]; OutPt *op = outrec->Pts; if (!op || outrec->IsOpen) { continue; } do //for each Pt in Polygon until duplicate found do ... { OutPt *op2 = op->Next; while (op2 != outrec->Pts) { if ((op->Pt == op2->Pt) && op2->Next != op && op2->Prev != op) { //split the polygon into two ... OutPt *op3 = op->Prev; OutPt *op4 = op2->Prev; op->Prev = op4; op4->Next = op; op2->Prev = op3; op3->Next = op2; outrec->Pts = op; OutRec *outrec2 = CreateOutRec(); outrec2->Pts = op2; UpdateOutPtIdxs(*outrec2); if (Poly2ContainsPoly1(outrec2->Pts, outrec->Pts)) { //OutRec2 is contained by OutRec1 ... outrec2->IsHole = !outrec->IsHole; outrec2->FirstLeft = outrec; if (m_UsingPolyTree) { FixupFirstLefts2(outrec2, outrec); } } else if (Poly2ContainsPoly1(outrec->Pts, outrec2->Pts)) { //OutRec1 is contained by OutRec2 ... outrec2->IsHole = outrec->IsHole; outrec->IsHole = !outrec2->IsHole; outrec2->FirstLeft = outrec->FirstLeft; outrec->FirstLeft = outrec2; if (m_UsingPolyTree) { FixupFirstLefts2(outrec, outrec2); } } else { //the 2 polygons are separate ... outrec2->IsHole = outrec->IsHole; outrec2->FirstLeft = outrec->FirstLeft; if (m_UsingPolyTree) { FixupFirstLefts1(outrec, outrec2); } } op2 = op; //ie get ready for the Next iteration } op2 = op2->Next; } op = op->Next; } while (op != outrec->Pts); } } //------------------------------------------------------------------------------ void ReversePath(Path &p) { std::reverse(p.begin(), p.end()); } //------------------------------------------------------------------------------ void ReversePaths(Paths &p) { for (Paths::size_type i = 0; i < p.size(); ++i) { ReversePath(p[i]); } } //------------------------------------------------------------------------------ void SimplifyPolygon(const Path &in_poly, Paths &out_polys, PolyFillType fillType) { Clipper c; c.StrictlySimple(true); c.AddPath(in_poly, ptSubject, true); c.Execute(ctUnion, out_polys, fillType, fillType); } //------------------------------------------------------------------------------ void SimplifyPolygons(const Paths &in_polys, Paths &out_polys, PolyFillType fillType) { Clipper c; c.StrictlySimple(true); c.AddPaths(in_polys, ptSubject, true); c.Execute(ctUnion, out_polys, fillType, fillType); } //------------------------------------------------------------------------------ void SimplifyPolygons(Paths &polys, PolyFillType fillType) { SimplifyPolygons(polys, polys, fillType); } inline double DistanceSqrd(const IntPoint &pt1, const IntPoint &pt2) { double Dx = ((double) pt1.X - pt2.X); double dy = ((double) pt1.Y - pt2.Y); return (Dx * Dx + dy * dy); } //------------------------------------------------------------------------------ double DistanceFromLineSqrd(const IntPoint &pt, const IntPoint &ln1, const IntPoint &ln2) { //The equation of a line in general form (Ax + By + C = 0) //given 2 points (x�,y�) & (x�,y�) is ... //(y� - y�)x + (x� - x�)y + (y� - y�)x� - (x� - x�)y� = 0 //A = (y� - y�); B = (x� - x�); C = (y� - y�)x� - (x� - x�)y� //perpendicular distance of point (x�,y�) = (Ax� + By� + C)/Sqrt(A� + B�) //see http://en.wikipedia.org/wiki/Perpendicular_distance double A = double(ln1.Y - ln2.Y); double B = double(ln2.X - ln1.X); double C = A * ln1.X + B * ln1.Y; C = A * pt.X + B * pt.Y - C; return (C * C) / (A * A + B * B); } //--------------------------------------------------------------------------- bool SlopesNearCollinear(const IntPoint &pt1, const IntPoint &pt2, const IntPoint &pt3, double distSqrd) { //this function is more accurate when the point that's geometrically //between the other 2 points is the one that's tested for distance. //ie makes it more likely to pick up 'spikes' ... if (Abs(pt1.X - pt2.X) > Abs(pt1.Y - pt2.Y)) { if ((pt1.X > pt2.X) == (pt1.X < pt3.X)) { return DistanceFromLineSqrd(pt1, pt2, pt3) < distSqrd; } else if ((pt2.X > pt1.X) == (pt2.X < pt3.X)) { return DistanceFromLineSqrd(pt2, pt1, pt3) < distSqrd; } else { return DistanceFromLineSqrd(pt3, pt1, pt2) < distSqrd; } } else { if ((pt1.Y > pt2.Y) == (pt1.Y < pt3.Y)) { return DistanceFromLineSqrd(pt1, pt2, pt3) < distSqrd; } else if ((pt2.Y > pt1.Y) == (pt2.Y < pt3.Y)) { return DistanceFromLineSqrd(pt2, pt1, pt3) < distSqrd; } else { return DistanceFromLineSqrd(pt3, pt1, pt2) < distSqrd; } } } //------------------------------------------------------------------------------ bool PointsAreClose(IntPoint pt1, IntPoint pt2, double distSqrd) { double Dx = (double) pt1.X - pt2.X; double dy = (double) pt1.Y - pt2.Y; return ((Dx * Dx) + (dy * dy) <= distSqrd); } //------------------------------------------------------------------------------ OutPt *ExcludeOp(OutPt *op) { OutPt *result = op->Prev; result->Next = op->Next; op->Next->Prev = result; result->Idx = 0; return result; } //------------------------------------------------------------------------------ void CleanPolygon(const Path &in_poly, Path &out_poly, double distance) { //distance = proximity in units/pixels below which vertices //will be stripped. Default ~= sqrt(2). size_t size = in_poly.size(); if (size == 0) { out_poly.clear(); return; } OutPt *outPts = new OutPt[size]; for (size_t i = 0; i < size; ++i) { outPts[i].Pt = in_poly[i]; outPts[i].Next = &outPts[(i + 1) % size]; outPts[i].Next->Prev = &outPts[i]; outPts[i].Idx = 0; } double distSqrd = distance * distance; OutPt *op = &outPts[0]; while (op->Idx == 0 && op->Next != op->Prev) { if (PointsAreClose(op->Pt, op->Prev->Pt, distSqrd)) { op = ExcludeOp(op); size--; } else if (PointsAreClose(op->Prev->Pt, op->Next->Pt, distSqrd)) { ExcludeOp(op->Next); op = ExcludeOp(op); size -= 2; } else if (SlopesNearCollinear(op->Prev->Pt, op->Pt, op->Next->Pt, distSqrd)) { op = ExcludeOp(op); size--; } else { op->Idx = 1; op = op->Next; } } if (size < 3) { size = 0; } out_poly.resize(size); for (size_t i = 0; i < size; ++i) { out_poly[i] = op->Pt; op = op->Next; } delete[] outPts; } //------------------------------------------------------------------------------ void CleanPolygon(Path &poly, double distance) { CleanPolygon(poly, poly, distance); } //------------------------------------------------------------------------------ void CleanPolygons(const Paths &in_polys, Paths &out_polys, double distance) { for (Paths::size_type i = 0; i < in_polys.size(); ++i) { CleanPolygon(in_polys[i], out_polys[i], distance); } } //------------------------------------------------------------------------------ void CleanPolygons(Paths &polys, double distance) { CleanPolygons(polys, polys, distance); } //------------------------------------------------------------------------------ void Minkowski(const Path &poly, const Path &path, Paths &solution, bool isSum, bool isClosed) { int delta = (isClosed ? 1 : 0); size_t polyCnt = poly.size(); size_t pathCnt = path.size(); Paths pp; pp.reserve(pathCnt); if (isSum) { for (size_t i = 0; i < pathCnt; ++i) { Path p; p.reserve(polyCnt); for (size_t j = 0; j < poly.size(); ++j) { p.push_back(IntPoint(path[i].X + poly[j].X, path[i].Y + poly[j].Y)); } pp.push_back(p); } } else { for (size_t i = 0; i < pathCnt; ++i) { Path p; p.reserve(polyCnt); for (size_t j = 0; j < poly.size(); ++j) { p.push_back(IntPoint(path[i].X - poly[j].X, path[i].Y - poly[j].Y)); } pp.push_back(p); } } solution.clear(); solution.reserve((pathCnt + delta) * (polyCnt + 1)); for (size_t i = 0; i < pathCnt - 1 + delta; ++i) { for (size_t j = 0; j < polyCnt; ++j) { Path quad; quad.reserve(4); quad.push_back(pp[i % pathCnt][j % polyCnt]); quad.push_back(pp[(i + 1) % pathCnt][j % polyCnt]); quad.push_back(pp[(i + 1) % pathCnt][(j + 1) % polyCnt]); quad.push_back(pp[i % pathCnt][(j + 1) % polyCnt]); if (!Orientation(quad)) { ReversePath(quad); } solution.push_back(quad); } } } //------------------------------------------------------------------------------ void MinkowskiSum(const Path &pattern, const Path &path, Paths &solution, bool pathIsClosed) { Minkowski(pattern, path, solution, true, pathIsClosed); Clipper c; c.AddPaths(solution, ptSubject, true); c.Execute(ctUnion, solution, pftNonZero, pftNonZero); } //------------------------------------------------------------------------------ void TranslatePath(const Path &input, Path &output, IntPoint delta) { //precondition: input != output output.resize(input.size()); for (size_t i = 0; i < input.size(); ++i) { output[i] = IntPoint(input[i].X + delta.X, input[i].Y + delta.Y); } } //------------------------------------------------------------------------------ void MinkowskiSum(const Path &pattern, const Paths &paths, Paths &solution, bool pathIsClosed) { Clipper c; for (size_t i = 0; i < paths.size(); ++i) { Paths tmp; Minkowski(pattern, paths[i], tmp, true, pathIsClosed); c.AddPaths(tmp, ptSubject, true); if (pathIsClosed) { Path tmp2; TranslatePath(paths[i], tmp2, pattern[0]); c.AddPath(tmp2, ptClip, true); } } c.Execute(ctUnion, solution, pftNonZero, pftNonZero); } //------------------------------------------------------------------------------ void MinkowskiDiff(const Path &poly1, const Path &poly2, Paths &solution) { Minkowski(poly1, poly2, solution, false, true); Clipper c; c.AddPaths(solution, ptSubject, true); c.Execute(ctUnion, solution, pftNonZero, pftNonZero); } //------------------------------------------------------------------------------ enum NodeType {ntAny, ntOpen, ntClosed}; void AddPolyNodeToPaths(const PolyNode &polynode, NodeType nodetype, Paths &paths) { bool match = true; if (nodetype == ntClosed) { match = !polynode.IsOpen(); } else if (nodetype == ntOpen) { return; } if (!polynode.Contour.empty() && match) { paths.push_back(polynode.Contour); } for (int i = 0; i < polynode.ChildCount(); ++i) { AddPolyNodeToPaths(*polynode.Childs[i], nodetype, paths); } } //------------------------------------------------------------------------------ void PolyTreeToPaths(const PolyTree& polytree, Paths& paths) { paths.resize(0); paths.reserve(polytree.Total()); AddPolyNodeToPaths(polytree, ntAny, paths); } //------------------------------------------------------------------------------ void ClosedPathsFromPolyTree(const PolyTree& polytree, Paths& paths) { paths.resize(0); paths.reserve(polytree.Total()); AddPolyNodeToPaths(polytree, ntClosed, paths); } //------------------------------------------------------------------------------ void OpenPathsFromPolyTree(PolyTree& polytree, Paths& paths) { paths.resize(0); paths.reserve(polytree.Total()); //Open paths are top level only, so ... for (int i = 0; i < polytree.ChildCount(); ++i) if (polytree.Childs[i]->IsOpen()) paths.push_back(polytree.Childs[i]->Contour); } //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ void _get_bounds_holes(Paths& bounds, Paths& holes, Paths polygons) { for (Path polygon : polygons) { if (Orientation(polygon)) { bounds.push_back(polygon); } else { holes.push_back(polygon); } } } Paths _get_holes_of_bound(const Path& bound, const Paths& bounds, const Paths& holes) { Paths result; for (Path hole : holes) { if (PointInPolygon(hole[0], bound)) { bool flag = false; for (Path other_bound : bounds) { if ((bound != other_bound) && PointInPolygon(hole[0], other_bound) && PointInPolygon(other_bound[0], bound)) { flag = true; break; } } if (!flag) { result.push_back(hole); } } } return result; } inline IntPoint CrossPoint(const IntPoint &pt, const IntPoint &ln1, const IntPoint &ln2) { if (ln1.X == ln2.X && ln1.Y == ln2.Y) { return ln1; } else { double dx = (double) (ln2.X - ln1.X); double dy = (double) (ln2.Y - ln1.Y); double dx2 = dx * dx; double dy2 = dy * dy; double t = (dx * (pt.X - ln1.X) + dy * (pt.Y - ln1.Y)) / (dx2 + dy2); IntPoint result; result.X = ln1.X + (cInt) (t * (ln2.X - ln1.X)); result.Y = ln1.Y + (cInt) (t * (ln2.Y - ln1.Y)); return result; } } inline cInt DotProduct(const IntPoint& A, const IntPoint& B) { return A.X * B.X + A.Y * B.Y; } inline cInt DotProduct(const IntPoint& e1s, const IntPoint& e1d, const IntPoint& e2s, const IntPoint& e2d) { return DotProduct(IntPoint(e1d.X - e1s.X, e1d.Y - e1s.Y), IntPoint(e2d.X - e2s.X, e2d.Y - e2s.Y)); } inline bool PointAtSegment(const IntPoint& pt, const IntPoint& src, const IntPoint& dst) { // Point pt must be on line with direction vector (src, dst) cInt kp = DotProduct(src, pt, src, dst); if (kp < 0) { return false; } else if (kp == 0) { return true; // point at src } else { cInt ke = DotProduct(src, dst, src, dst); if (kp > ke) { return false; } else if (kp == ke) { return true; // point at dst } else { return true; // point between src and dst } } } inline bool IsHorizontal(const IntPoint& src, const IntPoint& dst) { return (src.Y - dst.Y) == 0; } inline bool IsVertical(const IntPoint& src, const IntPoint& dst) { return (src.X - dst.X) == 0; } inline bool IsDiagonal(const IntPoint& src, const IntPoint& dst) { return (src.X - dst.X) == (src.Y - dst.Y); } inline bool IsStdDirection(const IntPoint& src, const IntPoint& dst) { return IsDiagonal(src, dst) || IsHorizontal(src, dst) || IsVertical(src, dst); } Path _merge_paths(const Path& p, const Path& q) { Path result; size_t point_idx = 0, edge_idx[2]; double min_dist = -1.0; // ReversePath(q); for (size_t i = 0; i < p.size(); i++) { for (size_t j = 0; j < q.size(); j++) { IntPoint v1 = q[j], v2 = q[(j+1) % q.size()]; IntPoint cross_point = CrossPoint(p[i], v1, v2); if (PointAtSegment(cross_point, v1, v2) && IsStdDirection(v1, v2)) { double d = DistanceSqrd(cross_point, p[i]); if (min_dist < 0.0 || (d < min_dist && d > 1.0)) { edge_idx[0] = j; edge_idx[1] = (j + 1) % q.size(); point_idx = i; min_dist = d; } } } } IntPoint v1 = q[edge_idx[0]]; IntPoint v2 = q[edge_idx[1]]; IntPoint cross_point = CrossPoint(p[point_idx], v1, v2); double v = DistanceSqrd(p[point_idx], cross_point); // printf("Point: %lli, %lli, distance = %.3f\n", p[point_idx].X, p[point_idx].Y, min_dist); // printf("Vector: (%lli, %lli) -> (%lli, %lli)\n", v1.X, v1.Y, v2.X, v2.Y); // printf("Cross point: %lli, %lli, distance = %.3f\n", cross_point.X, cross_point.Y, v); for (size_t k = 0; k < point_idx; k++) { result.push_back(p[k]); } result.push_back(p[point_idx]); result.push_back(cross_point); for (size_t k = edge_idx[1]; k != edge_idx[0]; k = (k + 1) % q.size()) { result.push_back(q[k]); } result.push_back(q[edge_idx[0]]); result.push_back(cross_point); result.push_back(p[point_idx]); for (size_t k = (point_idx + 1) % p.size(); k != 0; k = (k + 1) % p.size()) { result.push_back(p[k]); } return result; } Paths CutHoles(const Paths &polygons) { Paths result, bounds, all_holes; _get_bounds_holes(bounds, all_holes, polygons); for (Path bound : bounds) { Paths holes = _get_holes_of_bound(bound, bounds, all_holes); Path merged = bound; if (!holes.empty()) { for (size_t k = 0; k < holes.size(); k++) { merged = _merge_paths(holes[k], merged); } } result.push_back(merged); } return result; } } //ClipperLib namespace ================================================ FILE: OptolithiumC/libs/easylogging/easylogging++.h ================================================ // // Easylogging++ v9.73 // Single-header only, cross-platform logging library for C++ applications // // Copyright (c) 2014 Majid Khan // // This library is released under the MIT Licence. // http://www.easylogging.org/licence.php // // support@easylogging.org // http://easylogging.org // https://github.com/easylogging/easyloggingpp // #ifndef EASYLOGGINGPP_H // NOLINT #define EASYLOGGINGPP_H // Compilers and C++0x/C++11 Evaluation #if defined(__GNUC__) # define _ELPP_COMPILER_GCC 1 # define _ELPP_GCC_VERSION (__GNUC__ * 10000 \ + __GNUC_MINOR__ * 100 \ + __GNUC_PATCHLEVEL__) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define _ELPP_CXX0X 1 # elif(_ELPP_GCC_VERSION >= 40801) # define _ELPP_CXX11 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) #endif // defined(__GNUC__) // Visual C++ #if defined(_MSC_VER) # define _ELPP_COMPILER_MSVC 1 # define _ELPP_CRT_DBG_WARNINGS 1 # if (_MSC_VER == 1600) # define _ELPP_CXX0X 1 # elif(_MSC_VER >= 1700) # define _ELPP_CXX11 1 # endif // (_MSC_VER == 1600) #endif // defined(_MSC_VER) // Clang++ #if defined(__clang__) && (__clang__ == 1) # define _ELPP_COMPILER_CLANG 1 # define _ELPP_CLANG_VERSION (__clang_major__ * 10000 \ + __clang_minor__ * 100 \ + __clang_patchlevel__) # if (_ELPP_CLANG_VERSION >= 30300) # define _ELPP_CXX11 1 # endif // (_ELPP_CLANG_VERSION >= 30300) #endif // defined(__clang__) && (__clang__ == 1) // MinGW #if defined(__MINGW32__) || defined(__MINGW64__) # define _ELPP_MINGW 1 #endif // defined(__MINGW32__) || defined(__MINGW64__) // Cygwin #if defined(__CYGWIN__) && (__CYGWIN__ == 1) # define _ELPP_CYGWIN 1 #endif // defined(__CYGWIN__) && (__CYGWIN__ == 1) // Intel C++ #if defined(__INTEL_COMPILER) # define _ELPP_COMPILER_INTEL 1 #endif // Operating System Evaluation // Windows #if defined(_WIN32) || defined(_WIN64) # define _ELPP_OS_WINDOWS 1 #endif // defined(_WIN32) || defined(_WIN64) // Linux #if (defined(__linux) || defined(__linux__)) # define _ELPP_OS_LINUX 1 #endif // (defined(__linux) || defined(__linux__)) // Mac #if defined(__APPLE__) # define _ELPP_OS_MAC 1 #endif // defined(__APPLE__) // FreeBSD #if defined(__FreeBSD__) # define _ELPP_OS_FREEBSD 1 #endif // Unix #if ((_ELPP_OS_LINUX || _ELPP_OS_MAC || _ELPP_OS_FREEBSD) && (!_ELPP_OS_WINDOWS)) # define _ELPP_OS_UNIX 1 #endif // ((_ELPP_OS_LINUX || _ELPP_OS_MAC || _ELPP_OS_FREEBSD) && (!_ELPP_OS_WINDOWS)) // Android #if defined(__ANDROID__) # define _ELPP_OS_ANDROID 1 #endif // defined(__ANDROID__) // Evaluating Cygwin as *nix OS #if !_ELPP_OS_UNIX && !_ELPP_OS_WINDOWS && _ELPP_CYGWIN # undef _ELPP_OS_UNIX # undef _ELPP_OS_LINUX # define _ELPP_OS_UNIX 1 # define _ELPP_OS_LINUX 1 #endif // !_ELPP_OS_UNIX && !_ELPP_OS_WINDOWS && _ELPP_CYGWIN #if !defined(_ELPP_INTERNAL_DEBUGGING_OUT_INFO) # define _ELPP_INTERNAL_DEBUGGING_OUT_INFO std::cout #endif // !defined(_ELPP_INTERNAL_DEBUGGING_OUT) #if !defined(_ELPP_INTERNAL_DEBUGGING_OUT_ERROR) # define _ELPP_INTERNAL_DEBUGGING_OUT_ERROR std::cerr #endif // !defined(_ELPP_INTERNAL_DEBUGGING_OUT) #if !defined(_ELPP_INTERNAL_DEBUGGING_ENDL) # define _ELPP_INTERNAL_DEBUGGING_ENDL std::endl #endif // !defined(_ELPP_INTERNAL_DEBUGGING_OUT) #if !defined(_ELPP_INTERNAL_DEBUGGING_MSG) # define _ELPP_INTERNAL_DEBUGGING_MSG(msg) msg #endif // !defined(_ELPP_INTERNAL_DEBUGGING_OUT) // Internal Assertions and errors #if !defined(_ELPP_DISABLE_ASSERT) # if (defined(_ELPP_DEBUG_ASSERT_FAILURE)) # define ELPP_ASSERT(expr, msg) if (!(expr)) { \ std::stringstream internalInfoStream; internalInfoStream << msg; \ _ELPP_INTERNAL_DEBUGGING_OUT_ERROR \ << "EASYLOGGING++ ASSERTION FAILED (LINE: " << __LINE__ << ") [" #expr << "] WITH MESSAGE \"" \ << _ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStream.str()) << "\"" << _ELPP_INTERNAL_DEBUGGING_ENDL; base::utils::abort(1, \ "ELPP Assertion failure, please define _ELPP_DEBUG_ASSERT_FAILURE"); } # else # define ELPP_ASSERT(expr, msg) if (!(expr)) { \ std::stringstream internalInfoStream; internalInfoStream << msg; \ _ELPP_INTERNAL_DEBUGGING_OUT_ERROR\ << "ASSERTION FAILURE FROM EASYLOGGING++ (LINE: " \ << __LINE__ << ") [" #expr << "] WITH MESSAGE \"" << _ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStream.str()) << "\"" \ << _ELPP_INTERNAL_DEBUGGING_ENDL; } # endif // (defined(_ELPP_DEBUG_ASSERT_FAILURE)) #else # define ELPP_ASSERT(x, y) #endif //(!defined(_ELPP_DISABLE_ASSERT) #if _ELPP_COMPILER_MSVC # define _ELPP_INTERNAL_DEBUGGING_WRITE_PERROR \ { char buff[256]; strerror_s(buff, 256, errno); \ _ELPP_INTERNAL_DEBUGGING_OUT_ERROR << ": " << buff << " [" << errno << "]";} (void)0 #else # define _ELPP_INTERNAL_DEBUGGING_WRITE_PERROR \ _ELPP_INTERNAL_DEBUGGING_OUT_ERROR << ": " << strerror(errno) << " [" << errno << "]"; (void)0 #endif // _ELPP_COMPILER_MSVC #if defined(_ELPP_DEBUG_ERRORS) # if !defined(ELPP_INTERNAL_ERROR) # define ELPP_INTERNAL_ERROR(msg, pe) { \ std::stringstream internalInfoStream; internalInfoStream << " " << msg; \ _ELPP_INTERNAL_DEBUGGING_OUT_ERROR \ << "ERROR FROM EASYLOGGING++ (LINE: " << __LINE__ << ") " \ << _ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStream.str()) << _ELPP_INTERNAL_DEBUGGING_ENDL; \ if (pe) { _ELPP_INTERNAL_DEBUGGING_OUT_ERROR << " "; _ELPP_INTERNAL_DEBUGGING_WRITE_PERROR; }} (void)0 # endif #else # undef ELPP_INTERNAL_INFO # define ELPP_INTERNAL_ERROR(msg, pe) #endif // defined(_ELPP_DEBUG_ERRORS) #if (defined(_ELPP_DEBUG_INFO)) # if !(defined(_ELPP_INTERNAL_INFO_LEVEL)) # define _ELPP_INTERNAL_INFO_LEVEL 9 # endif // !(defined(_ELPP_INTERNAL_INFO_LEVEL)) # if !defined(ELPP_INTERNAL_INFO) # define ELPP_INTERNAL_INFO(lvl, msg) { if (lvl <= _ELPP_INTERNAL_INFO_LEVEL) { \ std::stringstream internalInfoStream; internalInfoStream << " " << msg; \ _ELPP_INTERNAL_DEBUGGING_OUT_INFO << _ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStream.str()) \ << _ELPP_INTERNAL_DEBUGGING_ENDL; }} # endif #else # undef ELPP_INTERNAL_INFO # define ELPP_INTERNAL_INFO(lvl, msg) #endif // (defined(_ELPP_DEBUG_INFO)) #if defined(_ELPP_STACKTRACE_ON_CRASH) # if (_ELPP_COMPILER_GCC && !_ELPP_MINGW) # define _ELPP_STACKTRACE 1 # else # if _ELPP_COMPILER_MSVC # pragma message("Stack trace not available for this compiler") # else # warning "Stack trace not available for this compiler"; # endif // _ELPP_COMPILER_MSVC # endif // _ELPP_COMPILER_GCC #endif // (defined(_ELPP_STACKTRACE_ON_CRASH)) // Miscellaneous macros #define _ELPP_UNUSED(x) (void)x #if _ELPP_OS_UNIX // Log file permissions for unix-based systems # define _ELPP_LOG_PERMS S_IRUSR | S_IWUSR | S_IXUSR | S_IWGRP | S_IRGRP | S_IXGRP | S_IWOTH | S_IXOTH #endif // _ELPP_OS_UNIX #if defined(_ELPP_AS_DLL) && _ELPP_COMPILER_MSVC # if defined(_ELPP_EXPORT_SYMBOLS) # define _ELPP_EXPORT __declspec(dllexport) # else # define _ELPP_EXPORT __declspec(dllimport) # endif // defined(_ELPP_EXPORT_SYMBOLS) #else # define _ELPP_EXPORT #endif // defined(_ELPP_AS_DLL) && _ELPP_COMPILER_MSVC // Some special functions that are VC++ specific #undef STRTOK #undef STRERROR #undef STRCAT #undef STRCPY #if _ELPP_CRT_DBG_WARNINGS # define STRTOK(a, b, c) strtok_s(a, b, c) # define STRERROR(a, b, c) strerror_s(a, b, c) # define STRCAT(a, b, len) strcat_s(a, len, b) # define STRCPY(a, b, len) strcpy_s(a, len, b) #else # define STRTOK(a, b, c) strtok(a, b) // NOLINT # define STRERROR(a, b, c) strerror(c) # define STRCAT(a, b, len) strcat(a, b) // NOLINT # define STRCPY(a, b, len) strcpy(a, b) // NOLINT #endif // Compiler specific support evaluations #if (!_ELPP_MINGW && !_ELPP_COMPILER_CLANG) || defined(_ELPP_FORCE_USE_STD_THREAD) # define _ELPP_USE_STD_THREADING 1 #endif // (!_ELPP_MINGW && !_ELPP_COMPILER_CLANG) || defined(_ELPP_FORCE_USE_STD_THREAD) #undef ELPP_FINAL #if _ELPP_COMPILER_INTEL || (_ELPP_GCC_VERSION < 40702) # define ELPP_FINAL #else # define ELPP_FINAL final #endif // _ELPP_COMPILER_INTEL || (_ELPP_GCC_VERSION < 40702) #if defined(_ELPP_THREAD_SAFE) # define _ELPP_THREADING_ENABLED 1 #endif // defined(_ELPP_THREAD_SAFE) // Function macro _ELPP_FUNC #undef _ELPP_FUNC #if _ELPP_COMPILER_MSVC // Visual C++ # define _ELPP_FUNC __FUNCSIG__ #elif _ELPP_COMPILER_GCC // GCC # define _ELPP_FUNC __PRETTY_FUNCTION__ #elif _ELPP_COMPILER_INTEL // Intel C++ # define _ELPP_FUNC __PRETTY_FUNCTION__ #elif _ELPP_COMPILER_CLANG // Clang++ # define _ELPP_FUNC __PRETTY_FUNCTION__ #else # if defined(__func__) # define _ELPP_FUNC __func__ # else # define _ELPP_FUNC "" # endif // defined(__func__) #endif // defined(_MSC_VER) #undef _ELPP_VARIADIC_TEMPLATES_SUPPORTED // Keep following line commented until features are fixed #if _ELPP_COMPILER_GCC || _ELPP_COMPILER_CLANG || _ELPP_COMPILER_INTEL || (_ELPP_COMPILER_MSVC && _MSC_VER >= 1800) # define _ELPP_VARIADIC_TEMPLATES_SUPPORTED 1 #endif // _ELPP_COMPILER_GCC || _ELPP_COMPILER_CLANG || _ELPP_COMPILER_INTEL || (_ELPP_COMPILER_MSVC && _MSC_VER >= 1800) // Logging Enable/Disable macros #if (!defined(_ELPP_DISABLE_LOGS)) # define _ELPP_LOGGING_ENABLED 1 #endif // (!defined(_ELPP_DISABLE_LOGS)) #if (!defined(_ELPP_DISABLE_DEBUG_LOGS) && (_ELPP_LOGGING_ENABLED) && ((defined(_DEBUG)) || (!defined(NDEBUG)))) # define _ELPP_DEBUG_LOG 1 #else # define _ELPP_DEBUG_LOG 0 #endif // (!defined(_ELPP_DISABLE_DEBUG_LOGS) && (_ELPP_LOGGING_ENABLED) && ((defined(_DEBUG)) || (!defined(NDEBUG)))) #if (!defined(_ELPP_DISABLE_INFO_LOGS) && (_ELPP_LOGGING_ENABLED)) # define _ELPP_INFO_LOG 1 #else # define _ELPP_INFO_LOG 0 #endif // (!defined(_ELPP_DISABLE_INFO_LOGS) && (_ELPP_LOGGING_ENABLED)) #if (!defined(_ELPP_DISABLE_WARNING_LOGS) && (_ELPP_LOGGING_ENABLED)) # define _ELPP_WARNING_LOG 1 #else # define _ELPP_WARNING_LOG 0 #endif // (!defined(_ELPP_DISABLE_WARNING_LOGS) && (_ELPP_LOGGING_ENABLED)) #if (!defined(_ELPP_DISABLE_ERROR_LOGS) && (_ELPP_LOGGING_ENABLED)) # define _ELPP_ERROR_LOG 1 #else # define _ELPP_ERROR_LOG 0 #endif // (!defined(_ELPP_DISABLE_ERROR_LOGS) && (_ELPP_LOGGING_ENABLED)) #if (!defined(_ELPP_DISABLE_FATAL_LOGS) && (_ELPP_LOGGING_ENABLED)) # define _ELPP_FATAL_LOG 1 #else # define _ELPP_FATAL_LOG 0 #endif // (!defined(_ELPP_DISABLE_FATAL_LOGS) && (_ELPP_LOGGING_ENABLED)) #if (!defined(_ELPP_DISABLE_TRACE_LOGS) && (_ELPP_LOGGING_ENABLED)) # define _ELPP_TRACE_LOG 1 #else # define _ELPP_TRACE_LOG 0 #endif // (!defined(_ELPP_DISABLE_TRACE_LOGS) && (_ELPP_LOGGING_ENABLED)) #if (!defined(_ELPP_DISABLE_VERBOSE_LOGS) && (_ELPP_LOGGING_ENABLED)) # define _ELPP_VERBOSE_LOG 1 #else # define _ELPP_VERBOSE_LOG 0 #endif // (!defined(_ELPP_DISABLE_VERBOSE_LOGS) && (_ELPP_LOGGING_ENABLED)) #if (!(_ELPP_CXX0X || _ELPP_CXX11)) # error "Easylogging++ 9.0+ is only compatible with C++0x (or higher) compliant compiler" #endif // (!(_ELPP_CXX0X || _ELPP_CXX11)) // Headers #if defined(_ELPP_SYSLOG) # include #endif // defined(_ELPP_SYSLOG) #include #include #include #include #include #include #include #include #if defined(_ELPP_UNICODE) # include #endif // defined(_ELPP_UNICODE) #if _ELPP_STACKTRACE # include # include #endif // _ELPP_STACKTRACE #if _ELPP_OS_ANDROID # include #endif // _ELPP_OS_ANDROID #if _ELPP_OS_UNIX # include # include #elif _ELPP_OS_WINDOWS # include # include # if defined(WIN32_LEAN_AND_MEAN) # include # endif // defined(WIN32_LEAN_AND_MEAN) #endif // _ELPP_OS_UNIX #include #include #include #include #include #include #include // NOLINT #include // NOLINT #include #include #include #if _ELPP_THREADING_ENABLED # if _ELPP_USE_STD_THREADING # include # include # else # if _ELPP_OS_UNIX # include # endif // _ELPP_OS_UNIX # endif // _ELPP_USE_STD_THREADING #endif // _ELPP_THREADING_ENABLED #if defined(_ELPP_STL_LOGGING) // For logging STL based templates # include # include # include # include # include # include # if defined(_ELPP_LOG_STD_ARRAY) # include # endif // defined(_ELPP_LOG_STD_ARRAY) # if defined(_ELPP_LOG_UNORDERED_MAP) # include # endif // defined(_ELPP_LOG_UNORDERED_MAP) # if defined(_ELPP_LOG_UNORDERED_SET) # include # endif // defined(_ELPP_UNORDERED_SET) #endif // defined(_ELPP_STL_LOGGING) #if defined(_ELPP_QT_LOGGING) // For logging Qt based classes & templates # include # include # include # include # include # include # include # include # include # include # include # include #endif // defined(_ELPP_QT_LOGGING) #if defined(_ELPP_BOOST_LOGGING) // For logging boost based classes & templates # include # include # include # include # include # include # include # include #endif // defined(_ELPP_BOOST_LOGGING) #if defined(_ELPP_WXWIDGETS_LOGGING) // For logging wxWidgets based classes & templates # include #endif // defined(_ELPP_WXWIDGETS_LOGGING) // Forward declarations namespace el { class Logger; class LogMessage; class PerformanceTrackingData; class Loggers; class Helpers; template class Callback; class LogDispatchCallback; class PerformanceTrackingCallback; class LogDispatchData; namespace base { class Storage; class RegisteredLoggers; class PerformanceTracker; class MessageBuilder; class Writer; class PErrorWriter; class LogDispatcher; class DefaultLogBuilder; class DefaultLogDispatchCallback; class DefaultPerformanceTrackingCallback; } // namespace base } // namespace el /// @brief Easylogging++ entry namespace namespace el { /// @brief Namespace containing base/internal functionality used by Easylogging++ namespace base { /// @brief Data types used by Easylogging++ namespace type { #undef ELPP_LITERAL #undef ELPP_STRLEN #undef ELPP_COUT #if defined(_ELPP_UNICODE) # define ELPP_LITERAL(txt) L##txt # define ELPP_STRLEN wcslen # if defined ELPP_CUSTOM_COUT # define ELPP_COUT ELPP_CUSTOM_COUT # else # define ELPP_COUT std::wcout # endif // defined ELPP_CUSTOM_COUT typedef wchar_t char_t; typedef std::wstring string_t; typedef std::wstringstream stringstream_t; typedef std::wfstream fstream_t; typedef std::wostream ostream_t; #else # define ELPP_LITERAL(txt) txt # define ELPP_STRLEN strlen # if defined ELPP_CUSTOM_COUT # define ELPP_COUT ELPP_CUSTOM_COUT # else # define ELPP_COUT std::cout # endif // defined ELPP_CUSTOM_COUT typedef char char_t; typedef std::string string_t; typedef std::stringstream stringstream_t; typedef std::fstream fstream_t; typedef std::ostream ostream_t; #endif // defined(_ELPP_UNICODE) #if defined(ELPP_CUSTOM_COUT_LINE) # define ELPP_COUT_LINE(logLine) ELPP_CUSTOM_COUT_LINE(logLine) #else # define ELPP_COUT_LINE(logLine) logLine << std::flush #endif // defined(ELPP_CUSTOM_COUT_LINE) typedef unsigned short EnumType; // NOLINT typedef std::shared_ptr StoragePointer; typedef int VerboseLevel; typedef std::shared_ptr LogDispatchCallbackPtr; typedef std::shared_ptr PerformanceTrackingCallbackPtr; } // namespace type /// @brief Internal helper class that prevent copy constructor for class /// /// @detail When using this class simply inherit it privately class NoCopy { protected: NoCopy(void) {} private: NoCopy(const NoCopy&); NoCopy& operator=(const NoCopy&); }; /// @brief Internal helper class that makes all default constructors private. /// /// @detail This prevents initializing class making it static unless an explicit constructor is declared. /// When using this class simply inherit it privately class StaticClass { private: StaticClass(void); StaticClass(const StaticClass&); StaticClass& operator=(const StaticClass&); }; } // namespace base /// @brief Represents enumeration for severity level used to determine level of logging /// /// @detail With Easylogging++, developers may disable or enable any level regardless of /// what the severity is. Or they can choose to log using hierarchical logging flag enum class Level : base::type::EnumType { /// @brief Generic level that represents all the levels. Useful when setting global configuration for all levels Global = 1, /// @brief Information that can be useful to back-trace certain events - mostly useful than debug logs. Trace = 2, /// @brief Informational events most useful for developers to debug application Debug = 4, /// @brief Severe error information that will presumably abort application Fatal = 8, /// @brief Information representing errors in application but application will keep running Error = 16, /// @brief Useful when application has potentially harmful situtaions Warning = 32, /// @brief Information that can be highly useful and vary with verbose logging level. Verbose = 64, /// @brief Mainly useful to represent current progress of application Info = 128, /// @brief Represents unknown level Unknown = 1010 }; /// @brief Static class that contains helper functions for el::Level class LevelHelper : base::StaticClass { public: /// @brief Represents minimum valid level. Useful when iterating through enum. static const base::type::EnumType kMinValid = static_cast(Level::Trace); /// @brief Represents maximum valid level. This is used internally and you should not need it. static const base::type::EnumType kMaxValid = static_cast(Level::Info); /// @brief Casts level to int, useful for iterating through enum. static base::type::EnumType castToInt(Level level) { return static_cast(level); } /// @brief Casts int(ushort) to level, useful for iterating through enum. static Level castFromInt(base::type::EnumType l) { return static_cast(l); } /// @brief Converts level to associated const char* /// @return Upper case string based level. static const char* convertToString(Level level) { // Do not use switch over strongly typed enums because Intel C++ compilers dont support them yet. if (level == Level::Global) return "GLOBAL"; if (level == Level::Debug) return "DEBUG"; if (level == Level::Info) return "INFO"; if (level == Level::Warning) return "WARNING"; if (level == Level::Error) return "ERROR"; if (level == Level::Fatal) return "FATAL"; if (level == Level::Verbose) return "VERBOSE"; if (level == Level::Trace) return "TRACE"; return "UNKNOWN"; } /// @brief Converts from levelStr to Level /// @param levelStr Upper case string based level. /// Lower case is also valid but providing upper case is recommended. static Level convertFromString(const char* levelStr) { if ((strcmp(levelStr, "GLOBAL") == 0) || (strcmp(levelStr, "global") == 0)) return Level::Global; if ((strcmp(levelStr, "DEBUG") == 0) || (strcmp(levelStr, "debug") == 0)) return Level::Debug; if ((strcmp(levelStr, "INFO") == 0) || (strcmp(levelStr, "info") == 0)) return Level::Info; if ((strcmp(levelStr, "WARNING") == 0) || (strcmp(levelStr, "warning") == 0)) return Level::Warning; if ((strcmp(levelStr, "ERROR") == 0) || (strcmp(levelStr, "error") == 0)) return Level::Error; if ((strcmp(levelStr, "FATAL") == 0) || (strcmp(levelStr, "fatal") == 0)) return Level::Fatal; if ((strcmp(levelStr, "VERBOSE") == 0) || (strcmp(levelStr, "verbose") == 0)) return Level::Verbose; if ((strcmp(levelStr, "TRACE") == 0) || (strcmp(levelStr, "trace") == 0)) return Level::Trace; return Level::Unknown; } /// @brief Applies specified function to each level starting from startIndex /// @param startIndex initial value to start the iteration from. This is passed as pointer and /// is left-shifted so this can be used inside function (fn) to represent current level. /// @param fn function to apply with each level. This bool represent whether or not to stop iterating through levels. static inline void forEachLevel(base::type::EnumType* startIndex, const std::function& fn) { base::type::EnumType lIndexMax = LevelHelper::kMaxValid; do { if (fn()) { break; } *startIndex = *startIndex << 1; } while (*startIndex <= lIndexMax); } }; /// @brief Represents enumeration of ConfigurationType used to configure or access certain aspect /// of logging enum class ConfigurationType : base::type::EnumType { /// @brief Determines whether or not corresponding level and logger of logging is enabled /// You may disable all logs by using el::Level::Global Enabled = 1, /// @brief Whether or not to write corresponding log to log file ToFile = 2, /// @brief Whether or not to write corresponding level and logger log to standard output. /// By standard output meaning termnal, command prompt etc ToStandardOutput = 4, /// @brief Determines format of logging corresponding level and logger. Format = 8, /// @brief Determines log file (full path) to write logs to for correponding level and logger Filename = 16, /// @brief Specifies milliseconds width. Width can be within range (1-6) MillisecondsWidth = 32, /// @brief Determines whether or not performance tracking is enabled. /// /// @detail This does not depend on logger or level. Performance tracking always uses 'performance' logger PerformanceTracking = 64, /// @brief Specifies log file max size. /// /// @detail If file size of corresponding log file (for corresponding level) is >= specified size, log file will /// be truncated and re-initiated. MaxLogFileSize = 128, /// @brief Specifies number of log entries to hold until we flush pending log data LogFlushThreshold = 256, /// @brief Represents unknown configuration Unknown = 1010 }; /// @brief Static class that contains helper functions for el::ConfigurationType class ConfigurationTypeHelper : base::StaticClass { public: /// @brief Represents minimum valid configuration type. Useful when iterating through enum. static const base::type::EnumType kMinValid = static_cast(ConfigurationType::Enabled); /// @brief Represents maximum valid configuration type. This is used internally and you should not need it. static const base::type::EnumType kMaxValid = static_cast(ConfigurationType::MaxLogFileSize); /// @brief Casts configuration type to int, useful for iterating through enum. static base::type::EnumType castToInt(ConfigurationType configurationType) { return static_cast(configurationType); } /// @brief Casts int(ushort) to configurationt type, useful for iterating through enum. static ConfigurationType castFromInt(base::type::EnumType c) { return static_cast(c); } /// @brief Converts configuration type to associated const char* /// @returns Upper case string based configuration type. static const char* convertToString(ConfigurationType configurationType) { // Do not use switch over strongly typed enums because Intel C++ compilers dont support them yet. if (configurationType == ConfigurationType::Enabled) return "ENABLED"; if (configurationType == ConfigurationType::Filename) return "FILENAME"; if (configurationType == ConfigurationType::Format) return "FORMAT"; if (configurationType == ConfigurationType::ToFile) return "TO_FILE"; if (configurationType == ConfigurationType::ToStandardOutput) return "TO_STANDARD_OUTPUT"; if (configurationType == ConfigurationType::MillisecondsWidth) return "MILLISECONDS_WIDTH"; if (configurationType == ConfigurationType::PerformanceTracking) return "PERFORMANCE_TRACKING"; if (configurationType == ConfigurationType::MaxLogFileSize) return "MAX_LOG_FILE_SIZE"; if (configurationType == ConfigurationType::LogFlushThreshold) return "LOG_FLUSH_THRESHOLD"; return "UNKNOWN"; } /// @brief Converts from configStr to ConfigurationType /// @param configStr Upper case string based configuration type. /// Lower case is also valid but providing upper case is recommended. static ConfigurationType convertFromString(const char* configStr) { if ((strcmp(configStr, "ENABLED") == 0) || (strcmp(configStr, "enabled") == 0)) return ConfigurationType::Enabled; if ((strcmp(configStr, "TO_FILE") == 0) || (strcmp(configStr, "to_file") == 0)) return ConfigurationType::ToFile; if ((strcmp(configStr, "TO_STANDARD_OUTPUT") == 0) || (strcmp(configStr, "to_standard_output") == 0)) return ConfigurationType::ToStandardOutput; if ((strcmp(configStr, "FORMAT") == 0) || (strcmp(configStr, "format") == 0)) return ConfigurationType::Format; if ((strcmp(configStr, "FILENAME") == 0) || (strcmp(configStr, "filename") == 0)) return ConfigurationType::Filename; if ((strcmp(configStr, "MILLISECONDS_WIDTH") == 0) || (strcmp(configStr, "milliseconds_width") == 0)) return ConfigurationType::MillisecondsWidth; if ((strcmp(configStr, "PERFORMANCE_TRACKING") == 0) || (strcmp(configStr, "performance_tracking") == 0)) return ConfigurationType::PerformanceTracking; if ((strcmp(configStr, "MAX_LOG_FILE_SIZE") == 0) || (strcmp(configStr, "max_log_file_size") == 0)) return ConfigurationType::MaxLogFileSize; if ((strcmp(configStr, "LOG_FLUSH_THRESHOLD") == 0) || (strcmp(configStr, "log_flush_threshold") == 0)) return ConfigurationType::LogFlushThreshold; return ConfigurationType::Unknown; } /// @brief Applies specified function to each configuration type starting from startIndex /// @param startIndex initial value to start the iteration from. This is passed by pointer and is left-shifted /// so this can be used inside function (fn) to represent current configuration type. /// @param fn function to apply with each configuration type. /// This bool represent whether or not to stop iterating through configurations. static inline void forEachConfigType(base::type::EnumType* startIndex, const std::function& fn) { base::type::EnumType cIndexMax = ConfigurationTypeHelper::kMaxValid; do { if (fn()) { break; } *startIndex = *startIndex << 1; } while (*startIndex <= cIndexMax); } }; /// @brief Flags used while writing logs. This flags are set by user enum class LoggingFlag : base::type::EnumType { /// @brief Makes sure we have new line for each container log entry NewLineForContainer = 1, /// @brief Makes sure if -vmodule is used and does not specifies a module, then verbose /// logging is allowed via that module. AllowVerboseIfModuleNotSpecified = 2, /// @brief When handling crashes by default, detailed crash reason will be logged as well LogDetailedCrashReason = 4, /// @brief Allows to disable application abortion when logged using FATAL level DisableApplicationAbortOnFatalLog = 8, /// @brief Flushes log with every log-entry (performance sensative) - Disabled by default ImmediateFlush = 16, /// @brief Enables strict file rolling StrictLogFileSizeCheck = 32, /// @brief Make terminal output colorful for supported terminals ColoredTerminalOutput = 64, /// @brief Supports use of multiple logging in same macro, e.g, CLOG(INFO, "default", "network") MultiLoggerSupport = 128, /// @brief Disables comparing performance tracker's checkpoints DisablePerformanceTrackingCheckpointComparison = 256, /// @brief Disable VModules DisableVModules = 512, /// @brief Disable VModules extensions DisableVModulesExtensions = 1024, /// @brief Enables hierarchical logging HierarchicalLogging = 2048, /// @brief Creates logger automatically when not available CreateLoggerAutomatically = 4096, /// @brief Adds spaces b/w logs that separated by left-shift operator AutoSpacing = 8192 }; namespace base { /// @brief Namespace containing constants used internally. namespace consts { // Level log values - These are values that are replaced in place of %level format specifier static const base::type::char_t* kInfoLevelLogValue = ELPP_LITERAL("INFO "); static const base::type::char_t* kDebugLevelLogValue = ELPP_LITERAL("DEBUG"); static const base::type::char_t* kWarningLevelLogValue = ELPP_LITERAL("WARN "); static const base::type::char_t* kErrorLevelLogValue = ELPP_LITERAL("ERROR"); static const base::type::char_t* kFatalLevelLogValue = ELPP_LITERAL("FATAL"); static const base::type::char_t* kVerboseLevelLogValue = ELPP_LITERAL("VER"); static const base::type::char_t* kTraceLevelLogValue = ELPP_LITERAL("TRACE"); // Format specifiers - These are used to define log format static const base::type::char_t* kAppNameFormatSpecifier = ELPP_LITERAL("%app"); static const base::type::char_t* kLoggerIdFormatSpecifier = ELPP_LITERAL("%logger"); static const base::type::char_t* kThreadIdFormatSpecifier = ELPP_LITERAL("%thread"); static const base::type::char_t* kSeverityLevelFormatSpecifier = ELPP_LITERAL("%level"); static const base::type::char_t* kDateTimeFormatSpecifier = ELPP_LITERAL("%datetime"); static const base::type::char_t* kLogFileFormatSpecifier = ELPP_LITERAL("%file"); static const base::type::char_t* kLogLineFormatSpecifier = ELPP_LITERAL("%line"); static const base::type::char_t* kLogLocationFormatSpecifier = ELPP_LITERAL("%loc"); static const base::type::char_t* kLogFunctionFormatSpecifier = ELPP_LITERAL("%func"); static const base::type::char_t* kCurrentUserFormatSpecifier = ELPP_LITERAL("%user"); static const base::type::char_t* kCurrentHostFormatSpecifier = ELPP_LITERAL("%host"); static const base::type::char_t* kMessageFormatSpecifier = ELPP_LITERAL("%msg"); static const base::type::char_t* kVerboseLevelFormatSpecifier = ELPP_LITERAL("%vlevel"); static const char* kDateTimeFormatSpecifierForFilename = "%datetime"; // Date/time static const char* kDays[7] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; static const char* kDaysAbbrev[7] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; static const char* kMonths[12] = { "January", "February", "March", "Apri", "May", "June", "July", "August", "September", "October", "November", "December" }; static const char* kMonthsAbbrev[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; static const char* kDefaultDateTimeFormat = "%d/%M/%Y %H:%m:%s,%g"; static const char* kDefaultDateTimeFormatInFilename = "%d-%M-%Y_%H-%m"; static const int kYearBase = 1900; static const char* kAm = "AM"; static const char* kPm = "PM"; // Miscellaneous constants static const char* kDefaultLoggerId = "default"; static const char* kPerformanceLoggerId = "performance"; static const char* kSysLogLoggerId = "syslog"; static const char* kNullPointer = "nullptr"; static const char kFormatSpecifierChar = '%'; #if _ELPP_VARIADIC_TEMPLATES_SUPPORTED static const char kFormatSpecifierCharValue = 'v'; #endif // _ELPP_VARIADIC_TEMPLATES_SUPPORTED static const unsigned int kMaxLogPerContainer = 100; static const unsigned int kMaxLogPerCounter = 100000; static const unsigned int kDefaultMillisecondsWidth = 3; static const base::type::VerboseLevel kMaxVerboseLevel = 9; static const char* kUnknownUser = "user"; static const char* kUnknownHost = "unknown-host"; #if defined(_ELPP_DEFAULT_LOG_FILE) static const char* kDefaultLogFile = _ELPP_DEFAULT_LOG_FILE; #else # if _ELPP_OS_UNIX # if _ELPP_OS_ANDROID static const char* kDefaultLogFile = "logs/myeasylog.log"; # else static const char* kDefaultLogFile = "logs/myeasylog.log"; # endif // _ELPP_OS_ANDROID # elif _ELPP_OS_WINDOWS static const char* kDefaultLogFile = "logs\\myeasylog.log"; # endif // _ELPP_OS_UNIX #endif // defined(_ELPP_DEFAULT_LOG_FILE) #if !defined(_ELPP_DISABLE_LOG_FILE_FROM_ARG) static const char* kDefaultLogFileParam = "--default-log-file"; #endif // !defined(_ELPP_DISABLE_LOG_FILE_FROM_ARG) #if defined(_ELPP_LOGGING_FLAGS_FROM_ARG) static const char* kLoggingFlagsParam = "--logging-flags"; #endif // defined(_ELPP_LOGGING_FLAGS_FROM_ARG) #if _ELPP_OS_WINDOWS static const char* kFilePathSeperator = "\\"; #else static const char* kFilePathSeperator = "/"; #endif // _ELPP_OS_WINDOWS static const char* kValidLoggerIdSymbols = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._"; static const char* kConfigurationComment = "##"; static const char* kConfigurationLevel = "*"; static const char* kConfigurationLoggerId = "--"; static const std::size_t kSourceFilenameMaxLength = 100; static const std::size_t kSourceLineMaxLength = 10; static const Level kPerformanceTrackerDefaultLevel = Level::Info; const struct { double value; const base::type::char_t* unit; } kTimeFormats[] = { { 1000.0f, ELPP_LITERAL("mis") }, { 1000.0f, ELPP_LITERAL("ms") }, { 60.0f, ELPP_LITERAL("seconds") }, { 60.0f, ELPP_LITERAL("minutes") }, { 24.0f, ELPP_LITERAL("hours") }, { 7.0f, ELPP_LITERAL("days") } }; static const int kTimeFormatsCount = sizeof(kTimeFormats) / sizeof(kTimeFormats[0]); const struct { int numb; const char* name; const char* brief; const char* detail; } kCrashSignals[] = { // NOTE: Do not re-order, if you do please check CrashHandler(bool) constructor and CrashHandler::setHandler(..) { SIGABRT, "SIGABRT", "Abnormal termination", "Program was abnormally terminated." }, { SIGFPE, "SIGFPE", "Erroneous arithmetic operation", "Arithemetic operation issue such as division by zero or operation resulting in overflow." }, { SIGILL, "SIGILL", "Illegal instruction", "Generally due to a corruption in the code or to an attempt to execute data."}, { SIGSEGV, "SIGSEGV", "Invalid access to memory", "Program is trying to read an invalid (unallocated, deleted or corrupted) or inaccessible memory." }, { SIGINT, "SIGINT", "Interactive attention signal", "Interruption generated (generally) by user or operating system." }, }; static const int kCrashSignalsCount = sizeof(kCrashSignals) / sizeof(kCrashSignals[0]); } // namespace consts } // namespace base typedef std::function PreRollOutCallback; namespace base { static inline void defaultPreRollOutCallback(const char*, std::size_t) {} /// @brief Enum to represent timestamp unit enum class TimestampUnit : base::type::EnumType { Microsecond = 0, Millisecond = 1, Second = 2, Minute = 3, Hour = 4, Day = 5 }; /// @brief Format flags used to determine specifiers that are active for performance improvements. enum class FormatFlags : base::type::EnumType { DateTime = 2, LoggerId = 4, File = 8, Line = 16, Location = 32, Function = 64, User = 128, Host = 256, LogMessage = 512, VerboseLevel = 1024, AppName = 2048, ThreadId = 4096, Level = 8192 }; /// @brief A milliseconds width class containing actual width and offset for date/time class MillisecondsWidth { public: MillisecondsWidth(void) { init(base::consts::kDefaultMillisecondsWidth); } explicit MillisecondsWidth(int width) { init(width); } bool operator==(const MillisecondsWidth& msWidth) { return m_width == msWidth.m_width && m_offset == msWidth.m_offset; } int m_width; unsigned int m_offset; private: void init(int width) { if (width < 1 || width > 6) { width = base::consts::kDefaultMillisecondsWidth; } m_width = width; switch (m_width) { case 3: m_offset = 1000; break; case 4: m_offset = 100; break; case 5: m_offset = 10; break; case 6: m_offset = 1; break; default: m_offset = 1000; break; } } }; /// @brief Namespace containing utility functions/static classes used internally namespace utils { /// @brief Deletes memory safely and points to null template typename std::enable_if::value, void>::type static inline safeDelete(T*& pointer) { // NOLINT if (pointer == nullptr) return; delete pointer; pointer = nullptr; } /// @brief Gets value of const char* but if it is nullptr, a string nullptr is returned static inline const char* charPtrVal(const char* pointer) { return pointer == nullptr ? base::consts::kNullPointer : pointer; } /// @brief Aborts application due with user-defined status static inline void abort(int status, const std::string& reason = std::string()) { // Both status and reason params are there for debugging with tools like gdb etc _ELPP_UNUSED(status); _ELPP_UNUSED(reason); #if defined(_ELPP_COMPILER_MSVC) && defined(_M_IX86) && defined(_DEBUG) // Ignore msvc critical error dialog - break instead (on debug mode) _asm int 3 #else ::abort(); #endif // defined(_ELPP_COMPILER_MSVC) && defined(_M_IX86) && defined(_DEBUG) } /// @brief Bitwise operations for C++11 strong enum class. This casts e into Flag_T and returns value after bitwise operation /// Use these function as
flag = bitwise::Or(MyEnum::val1, flag);
namespace bitwise { template static inline base::type::EnumType And(Enum e, base::type::EnumType flag) { return static_cast(flag) & static_cast(e); } template static inline base::type::EnumType Not(Enum e, base::type::EnumType flag) { return static_cast(flag) & ~(static_cast(e)); } template static inline base::type::EnumType Or(Enum e, base::type::EnumType flag) { return static_cast(flag) | static_cast(e); } } // namespace bitwise template static inline void addFlag(Enum e, base::type::EnumType* flag) { *flag = base::utils::bitwise::Or(e, *flag); } template static inline void removeFlag(Enum e, base::type::EnumType* flag) { *flag = base::utils::bitwise::Not(e, *flag); } template static inline bool hasFlag(Enum e, base::type::EnumType flag) { return base::utils::bitwise::And(e, flag) > 0x0; } } // namespace utils namespace threading { #if _ELPP_THREADING_ENABLED # if !_ELPP_USE_STD_THREADING namespace internal { /// @brief A mutex wrapper for compiler that dont yet support std::mutex class Mutex { public: Mutex(void) { # if _ELPP_OS_UNIX pthread_mutex_init(&m_underlyingMutex, nullptr); # elif _ELPP_OS_WINDOWS InitializeCriticalSection(&m_underlyingMutex); # endif // _ELPP_OS_UNIX } virtual ~Mutex(void) { # if _ELPP_OS_UNIX pthread_mutex_destroy(&m_underlyingMutex); # elif _ELPP_OS_WINDOWS DeleteCriticalSection(&m_underlyingMutex); # endif // _ELPP_OS_UNIX } inline void lock(void) { # if _ELPP_OS_UNIX pthread_mutex_lock(&m_underlyingMutex); # elif _ELPP_OS_WINDOWS EnterCriticalSection(&m_underlyingMutex); # endif // _ELPP_OS_UNIX } inline bool try_lock(void) { # if _ELPP_OS_UNIX return (pthread_mutex_trylock(&m_underlyingMutex) == 0); # elif _ELPP_OS_WINDOWS return TryEnterCriticalSection(&m_underlyingMutex); # endif // _ELPP_OS_UNIX } inline void unlock(void) { # if _ELPP_OS_UNIX pthread_mutex_unlock(&m_underlyingMutex); # elif _ELPP_OS_WINDOWS LeaveCriticalSection(&m_underlyingMutex); # endif // _ELPP_OS_UNIX } private: # if _ELPP_OS_UNIX pthread_mutex_t m_underlyingMutex; # elif _ELPP_OS_WINDOWS CRITICAL_SECTION m_underlyingMutex; # endif // _ELPP_OS_UNIX }; /// @brief Scoped lock for compiler that dont yet support std::lock_guard template class ScopedLock : base::NoCopy { public: explicit ScopedLock(M& mutex) { // NOLINT m_mutex = &mutex; m_mutex->lock(); } virtual ~ScopedLock(void) { m_mutex->unlock(); } private: M* m_mutex; ScopedLock(void); }; } // namespace internal /// @brief Gets ID of currently running threading in windows systems. On unix, nothing is returned. static inline std::string getCurrentThreadId(void) { std::stringstream ss; # if (_ELPP_OS_WINDOWS) ss << GetCurrentThreadId(); # endif // (_ELPP_OS_WINDOWS) return ss.str(); } typedef base::threading::internal::Mutex Mutex; typedef base::threading::internal::ScopedLock ScopedLock; # else /// @brief Gets ID of currently running threading using std::this_thread::get_id() static inline std::string getCurrentThreadId(void) { std::stringstream ss; ss << std::this_thread::get_id(); return ss.str(); } typedef std::mutex Mutex; typedef std::lock_guard ScopedLock; # endif // !_ELPP_USE_STD_THREADING #else namespace internal { /// @brief Mutex wrapper used when multi-threading is disabled. class NoMutex { public: NoMutex(void) {} inline void lock(void) {} inline bool try_lock(void) { return true; } inline void unlock(void) {} }; /// @brief Lock guard wrapper used when multi-threading is disabled. template class NoScopedLock : base::NoCopy { public: explicit NoScopedLock(Mutex&) { } virtual ~NoScopedLock(void) { } private: NoScopedLock(void); }; } // namespace internal static inline std::string getCurrentThreadId(void) { return std::string(); } typedef base::threading::internal::NoMutex Mutex; typedef base::threading::internal::NoScopedLock ScopedLock; #endif // _ELPP_THREADING_ENABLED /// @brief Base of thread safe class, this class is inheritable-only class ThreadSafe { public: virtual inline void acquireLock(void) ELPP_FINAL { m_mutex.lock(); } virtual inline void releaseLock(void) ELPP_FINAL { m_mutex.unlock(); } virtual inline base::threading::Mutex& lock(void) ELPP_FINAL { return m_mutex; } protected: ThreadSafe(void) {} virtual ~ThreadSafe(void) {} private: base::threading::Mutex m_mutex; }; } // namespace threading namespace utils { class File : base::StaticClass { public: /// @brief Creates new out file stream for specified filename. /// @return Pointer to newly created fstream or nullptr static base::type::fstream_t* newFileStream(const std::string& filename) { base::type::fstream_t *fs = new base::type::fstream_t(filename.c_str(), base::type::fstream_t::out | base::type::fstream_t::app); #if defined(_ELPP_UNICODE) std::locale elppUnicodeLocale(""); fs->imbue(elppUnicodeLocale); #endif // defined(_ELPP_UNICODE) if (fs->is_open()) { fs->flush(); } else { base::utils::safeDelete(fs); ELPP_INTERNAL_ERROR("Bad file [" << filename << "]", true); } return fs; } /// @brief Gets size of file provided in stream static std::size_t getSizeOfFile(base::type::fstream_t* fs) { if (fs == nullptr) { return 0; } std::streampos currPos = fs->tellg(); fs->seekg(0, fs->end); std::size_t size = static_cast(fs->tellg()); fs->seekg(currPos); return size; } /// @brief Determines whether or not provided path exist in current file system static inline bool pathExists(const char* path, bool considerFile = false) { if (path == nullptr) { return false; } #if _ELPP_OS_UNIX _ELPP_UNUSED(considerFile); struct stat st; return (stat(path, &st) == 0); #elif _ELPP_OS_WINDOWS DWORD fileType = GetFileAttributesA(path); if (fileType == INVALID_FILE_ATTRIBUTES) { return false; } return considerFile ? true : ((fileType & FILE_ATTRIBUTE_DIRECTORY) == 0 ? false : true); #endif // _ELPP_OS_UNIX } /// @brief Creates specified path on file system /// @param path Path to create. static bool createPath(const std::string& path) { if (path.empty()) { return false; } if (base::utils::File::pathExists(path.c_str())) { return true; } int status = -1; char* currPath = const_cast(path.c_str()); std::string builtPath = std::string(); #if _ELPP_OS_UNIX if (path[0] == '/') { builtPath = "/"; } currPath = STRTOK(currPath, base::consts::kFilePathSeperator, 0); #elif _ELPP_OS_WINDOWS // Use secure functions API char* nextTok_; currPath = STRTOK(currPath, base::consts::kFilePathSeperator, &nextTok_); _ELPP_UNUSED(nextTok_); #endif // _ELPP_OS_UNIX while (currPath != nullptr) { builtPath.append(currPath); builtPath.append(base::consts::kFilePathSeperator); #if _ELPP_OS_UNIX status = mkdir(builtPath.c_str(), _ELPP_LOG_PERMS); currPath = STRTOK(nullptr, base::consts::kFilePathSeperator, 0); #elif _ELPP_OS_WINDOWS status = _mkdir(builtPath.c_str()); currPath = STRTOK(nullptr, base::consts::kFilePathSeperator, &nextTok_); #endif // _ELPP_OS_UNIX } if (status == -1) { ELPP_INTERNAL_ERROR("Error while creating path [" << path << "]", true); return false; } return true; } /// @brief Extracts path of filename with leading slash static std::string extractPathFromFilename(const std::string& fullPath, const char* seperator = base::consts::kFilePathSeperator) { if ((fullPath == "") || (fullPath.find(seperator) == std::string::npos)) { return fullPath; } std::size_t lastSlashAt = fullPath.find_last_of(seperator); if (lastSlashAt == 0) { return std::string(seperator); } return fullPath.substr(0, lastSlashAt + 1); } /// @brief builds stripped filename and puts it in buff static void buildStrippedFilename(const char* filename, char buff[], std::size_t limit = base::consts::kSourceFilenameMaxLength) { std::size_t sizeOfFilename = strlen(filename); // if (sizeOfFilename >= limit) { // filename += (sizeOfFilename - limit); // if (filename[0] != '.' && filename[1] != '.') { // prepend if not already // filename += 3; // 3 = '..' // STRCAT(buff, "..", limit); // } // } const char *p = &filename[sizeOfFilename-1]; while (*p != '/' && p != filename) --p; if (p != filename) p++; STRCAT(buff, p, limit); // STRCAT(buff, filename, limit); } }; /// @brief String utilities helper class used internally. You should not use it. class Str : base::StaticClass { public: /// @brief Checks if character is digit. Dont use libc implementation of it to prevent locale issues. static inline bool isDigit(char c) { return c >= '0' && c <= '9'; } /// @brief Matches wildcards, '*' and '?' only supported. static bool wildCardMatch(const char* str, const char* pattern) { while (*pattern) { switch (*pattern) { case '?': if (!*str) return false; ++str; ++pattern; break; case '*': if (wildCardMatch(str, pattern + 1)) return true; if (*str && wildCardMatch(str + 1, pattern)) return true; return false; break; default: if (*str++ != *pattern++) return false; break; } } return !*str && !*pattern; } /// @brief Trims string from start /// @param [in,out] str String to trim static inline std::string& ltrim(std::string& str) { // NOLINT str.erase(str.begin(), std::find_if(str.begin(), str.end(), std::not1(std::ptr_fun(&std::isspace)))); return str; } /// @brief Trim string from end /// @param [in,out] str String to trim static inline std::string& rtrim(std::string& str) { // NOLINT str.erase(std::find_if(str.rbegin(), str.rend(), std::not1(std::ptr_fun(&std::isspace))).base(), str.end()); return str; } /// @brief Trims string from left and right /// @param [in,out] str String to trim static inline std::string& trim(std::string& str) { // NOLINT return ltrim(rtrim(str)); } /// @brief Determines whether or not str starts with specified string /// @param str String to check /// @param start String to check against /// @return Returns true if starts with specified string, false otherwise static inline bool startsWith(const std::string& str, const std::string& start) { return (str.length() >= start.length()) && (str.compare(0, start.length(), start) == 0); } /// @brief Determines whether or not str ends with specified string /// @param str String to check /// @param end String to check against /// @return Returns true if ends with specified string, false otherwise static inline bool endsWith(const std::string& str, const std::string& end) { return (str.length() >= end.length()) && (str.compare(str.length() - end.length(), end.length(), end) == 0); } /// @brief Replaces all instances of replaceWhat with 'replaceWith'. Original variable is changed for performance. /// @param [in,out] str String to replace from /// @param replaceWhat Character to replace /// @param replaceWith Character to replace with /// @return Modified version of str static inline std::string& replaceAll(std::string& str, char replaceWhat, char replaceWith) { // NOLINT std::replace(str.begin(), str.end(), replaceWhat, replaceWith); return str; } /// @brief Replaces all instances of 'replaceWhat' with 'replaceWith'. (String version) Replaces in place /// @param str String to replace from /// @param replaceWhat Character to replace /// @param replaceWith Character to replace with /// @return Modified (original) str static inline std::string& replaceAll(std::string& str, const std::string& replaceWhat, // NOLINT const std::string& replaceWith) { if (replaceWhat == replaceWith) return str; std::size_t foundAt = std::string::npos; while ((foundAt = str.find(replaceWhat, foundAt + 1)) != std::string::npos) { str.replace(foundAt, replaceWhat.length(), replaceWith); } return str; } static void replaceFirstWithEscape(base::type::string_t& str, const base::type::string_t& replaceWhat, // NOLINT const base::type::string_t& replaceWith) { std::size_t foundAt = base::type::string_t::npos; while ((foundAt = str.find(replaceWhat, foundAt + 1)) != base::type::string_t::npos) { if (foundAt > 0 && str[foundAt - 1] == base::consts::kFormatSpecifierChar) { str.erase(foundAt > 0 ? foundAt - 1 : 0, 1); ++foundAt; } else { str.replace(foundAt, replaceWhat.length(), replaceWith); return; } } } #if defined(_ELPP_UNICODE) static void replaceFirstWithEscape(base::type::string_t& str, const base::type::string_t& replaceWhat, // NOLINT const std::string& replaceWith) { replaceFirstWithEscape(str, replaceWhat, base::type::string_t(replaceWith.begin(), replaceWith.end())); } #endif // defined(_ELPP_UNICODE) /// @brief Converts string to uppercase /// @param str String to convert /// @return Uppercase string static inline std::string& toUpper(std::string& str) { // NOLINT std::transform(str.begin(), str.end(), str.begin(), ::toupper); return str; } /// @brief Compares cstring equality - uses strcmp static inline bool cStringEq(const char* s1, const char* s2) { if (s1 == nullptr && s2 == nullptr) return true; if (s1 == nullptr || s2 == nullptr) return false; return strcmp(s1, s2) == 0; } /// @brief Compares cstring equality (case-insensitive) - uses toupper(char) /// Dont use strcasecmp because of CRT (VC++) static bool cStringCaseEq(const char* s1, const char* s2) { if (s1 == nullptr && s2 == nullptr) return true; if (s1 == nullptr || s2 == nullptr) return false; if (strlen(s1) != strlen(s2)) return false; while (*s1 != '\0' && *s2 != '\0') { if (::toupper(*s1) != ::toupper(*s2)) return false; ++s1; ++s2; } return true; } /// @brief Returns true if c exist in str static inline bool contains(const char* str, char c) { for (; *str; ++str) { if (*str == c) return true; } return false; } static inline char* convertAndAddToBuff(std::size_t n, int len, char* buf, const char* bufLim, bool zeroPadded = true) { char localBuff[10] = ""; char* p = localBuff + sizeof(localBuff) - 2; if (n > 0) { for (; n > 0 && p > localBuff && len > 0; n /= 10, --len) *--p = static_cast(n % 10 + '0'); } else { *--p = '0'; --len; } if (zeroPadded) while (p > localBuff && len-- > 0) *--p = static_cast('0'); return addToBuff(p, buf, bufLim); } static inline char* addToBuff(const char* str, char* buf, const char* bufLim) { while ((buf < bufLim) && ((*buf = *str++) != '\0')) ++buf; return buf; } static inline char* clearBuff(char buff[], std::size_t lim) { STRCPY(buff, "", lim); _ELPP_UNUSED(lim); // For *nix we dont have anything using lim in above STRCPY macro return buff; } /// @brief Converst wchar* to char* /// NOTE: Need to free return value after use! static char* wcharPtrToCharPtr(const wchar_t* line) { std::size_t len_ = wcslen(line) + 1; char* buff_ = static_cast(malloc(len_ + 1)); # if _ELPP_OS_UNIX || (_ELPP_OS_WINDOWS && !_ELPP_CRT_DBG_WARNINGS) std::wcstombs(buff_, line, len_); # elif _ELPP_OS_WINDOWS std::size_t convCount_ = 0; mbstate_t mbState_; ::memset(static_cast(&mbState_), 0, sizeof(mbState_)); wcsrtombs_s(&convCount_, buff_, len_, &line, len_, &mbState_); # endif // _ELPP_OS_UNIX || (_ELPP_OS_WINDOWS && !_ELPP_CRT_DBG_WARNINGS) return buff_; } }; /// @brief Operating System helper static class used internally. You should not use it. class OS : base::StaticClass { public: #if _ELPP_OS_WINDOWS /// @brief Gets environment variables for Windows based OS. /// We are not using getenv(const char*) because of CRT deprecation /// @param varname Variable name to get environment variable value for /// @return If variable exist the value of it otherwise nullptr static const char* getWindowsEnvironmentVariable(const char* varname) { const DWORD bufferLen = 50; static char buffer[bufferLen]; if (GetEnvironmentVariableA(varname, buffer, bufferLen)) { return buffer; } return nullptr; } #endif // _ELPP_OS_WINDOWS #if _ELPP_OS_ANDROID /// @brief Reads android property value static inline std::string getProperty(const char* prop) { char propVal[PROP_VALUE_MAX + 1]; int ret = __system_property_get(prop, propVal); return ret == 0 ? std::string() : std::string(propVal); } /// @brief Reads android device name static std::string getDeviceName(void) { std::stringstream ss; std::string manufacturer = getProperty("ro.product.manufacturer"); std::string model = getProperty("ro.product.model"); if (manufacturer.empty() || model.empty()) { return std::string(); } ss << manufacturer << "-" << model; return ss.str(); } #endif // _ELPP_OS_ANDROID /// @brief Runs command on terminal and returns the output. /// /// @detail This is applicable only on unix based systems, for all other OS, an empty string is returned. /// @param command Bash command /// @return Result of bash output or empty string if no result found. static const std::string getBashOutput(const char* command) { #if (_ELPP_OS_UNIX && !_ELPP_OS_ANDROID && !_ELPP_CYGWIN) if (command == nullptr) { return std::string(); } FILE* proc = nullptr; if ((proc = popen(command, "r")) == nullptr) { ELPP_INTERNAL_ERROR("\nUnable to run command [" << command << "]", true); return std::string(); } char hBuff[4096]; if (fgets(hBuff, sizeof(hBuff), proc) != nullptr) { pclose(proc); if (hBuff[strlen(hBuff) - 1] == '\n') { hBuff[strlen(hBuff) - 1] = '\0'; } return std::string(hBuff); } return std::string(); #else _ELPP_UNUSED(command); return std::string(); #endif // (_ELPP_OS_UNIX && !_ELPP_OS_ANDROID && !_ELPP_CYGWIN) } /// @brief Gets environment variable. This is cross-platform and CRT safe (for VC++) /// @param variableName Environment variable name /// @param defaultVal If no environment variable or value found the value to return by default /// @param alternativeBashCommand If environment variable not found what would be alternative bash command /// in order to look for value user is looking for. E.g, for 'user' alternative command will 'whoami' static std::string getEnvironmentVariable(const char* variableName, const char* defaultVal, const char* alternativeBashCommand = nullptr) { #if _ELPP_OS_UNIX const char* val = getenv(variableName); #elif _ELPP_OS_WINDOWS const char* val = getWindowsEnvironmentVariable(variableName); #endif // _ELPP_OS_UNIX if ((val == nullptr) || ((strcmp(val, "") == 0))) { #if _ELPP_OS_UNIX && defined(_ELPP_FORCE_ENV_VAR_FROM_BASH) // Try harder on unix-based systems std::string valBash = base::utils::OS::getBashOutput(alternativeBashCommand); if (valBash.empty()) { return std::string(defaultVal); } else { return valBash; } #elif _ELPP_OS_WINDOWS || _ELPP_OS_UNIX _ELPP_UNUSED(alternativeBashCommand); return std::string(defaultVal); #endif // _ELPP_OS_UNIX && defined(_ELPP_FORCE_ENV_VAR_FROM_BASH) } return std::string(val); } /// @brief Gets current username. static inline std::string currentUser(void) { #if _ELPP_OS_UNIX && !_ELPP_OS_ANDROID return getEnvironmentVariable("USER", base::consts::kUnknownUser, "whoami"); #elif _ELPP_OS_WINDOWS return getEnvironmentVariable("USERNAME", base::consts::kUnknownUser); #elif _ELPP_OS_ANDROID _ELPP_UNUSED(base::consts::kUnknownUser); return std::string("android"); #else return std::string(); #endif // _ELPP_OS_UNIX && !_ELPP_OS_ANDROID } /// @brief Gets current host name or computer name. /// /// @detail For android systems this is device name with its manufacturer and model seperated by hyphen static inline std::string currentHost(void) { #if _ELPP_OS_UNIX && !_ELPP_OS_ANDROID return getEnvironmentVariable("HOSTNAME", base::consts::kUnknownHost, "hostname"); #elif _ELPP_OS_WINDOWS return getEnvironmentVariable("COMPUTERNAME", base::consts::kUnknownHost); #elif _ELPP_OS_ANDROID _ELPP_UNUSED(base::consts::kUnknownHost); return getDeviceName(); #else return std::string(); #endif // _ELPP_OS_UNIX && !_ELPP_OS_ANDROID } /// @brief Whether or not terminal supports colors static inline bool termSupportsColor(void) { std::string term = getEnvironmentVariable("TERM", ""); return term == "xterm" || term == "xterm-color" || term == "xterm-256color" || term == "screen" || term == "linux" || term == "cygwin"; } }; extern std::string s_currentUser; extern std::string s_currentHost; extern bool s_termSupportsColor; #define _ELPP_INITI_BASIC_DECLR \ namespace el {\ namespace base {\ namespace utils {\ std::string s_currentUser = el::base::utils::OS::currentUser(); \ std::string s_currentHost = el::base::utils::OS::currentHost(); \ bool s_termSupportsColor = el::base::utils::OS::termSupportsColor(); \ }\ }\ } /// @brief Contains utilities for cross-platform date/time. This class make use of el::base::utils::Str class DateTime : base::StaticClass { public: /// @brief Cross platform gettimeofday for Windows and unix platform. This can be used to determine current millisecond. /// /// @detail For unix system it uses gettimeofday(timeval*, timezone*) and for Windows, a seperate implementation is provided /// @param [in,out] tv Pointer that gets updated static void gettimeofday(struct timeval* tv) { #if _ELPP_OS_WINDOWS if (tv != nullptr) { # if _ELPP_COMPILER_MSVC || defined(_MSC_EXTENSIONS) const unsigned __int64 delta_ = 11644473600000000Ui64; # else const unsigned __int64 delta_ = 11644473600000000ULL; # endif // _ELPP_COMPILER_MSVC || defined(_MSC_EXTENSIONS) const double secOffSet = 0.000001; const unsigned long usecOffSet = 1000000; // NOLINT FILETIME fileTime; GetSystemTimeAsFileTime(&fileTime); unsigned __int64 present = 0; present |= fileTime.dwHighDateTime; present = present << 32; present |= fileTime.dwLowDateTime; present /= 10; // mic-sec // Subtract the difference present -= delta_; tv->tv_sec = static_cast(present * secOffSet); // NOLINT tv->tv_usec = static_cast(present % usecOffSet); // NOLINT } #else ::gettimeofday(tv, nullptr); #endif // _ELPP_OS_WINDOWS } /// @brief Gets current date and time with milliseconds. /// @param format User provided date/time format /// @param msWidth A pointer to base::MillisecondsWidth from configuration (non-null) /// @returns string based date time in specified format. static inline std::string getDateTime(const char* format, const base::MillisecondsWidth* msWidth) { struct timeval currTime; gettimeofday(&currTime); struct ::tm timeInfo; buildTimeInfo(&currTime, &timeInfo); const int kBuffSize = 30; char buff_[kBuffSize] = ""; parseFormat(buff_, kBuffSize, format, &timeInfo, static_cast(currTime.tv_usec / msWidth->m_offset), msWidth); return std::string(buff_); } /// @brief Formats time to get unit accordingly, units like second if > 1000 or minutes if > 60000 etc static base::type::string_t formatTime(unsigned long long time, base::TimestampUnit timestampUnit) { // NOLINT double result = static_cast(time); base::type::EnumType start = static_cast(timestampUnit); const base::type::char_t* unit = base::consts::kTimeFormats[start].unit; for (base::type::EnumType i = start; i < base::consts::kTimeFormatsCount - 1; ++i) { if (result <= base::consts::kTimeFormats[i].value) { break; } result /= base::consts::kTimeFormats[i].value; unit = base::consts::kTimeFormats[i + 1].unit; } base::type::stringstream_t ss; ss << result << " " << unit; return ss.str(); } /// @brief Gets time difference in milli/micro second depending on timestampUnit static inline unsigned long long getTimeDifference(const struct timeval& endTime, const struct timeval& startTime, base::TimestampUnit timestampUnit) { // NOLINT if (timestampUnit == base::TimestampUnit::Microsecond) { return static_cast(static_cast(1000000 * endTime.tv_sec + endTime.tv_usec) - // NOLINT static_cast(1000000 * startTime.tv_sec + startTime.tv_usec)); // NOLINT } else { return static_cast((((endTime.tv_sec - startTime.tv_sec) * 1000000) + (endTime.tv_usec - startTime.tv_usec)) / 1000); // NOLINT } } private: static inline struct ::tm* buildTimeInfo(struct timeval* currTime, struct ::tm* timeInfo) { #if _ELPP_OS_UNIX time_t rawTime = currTime->tv_sec; ::localtime_r(&rawTime, timeInfo); return timeInfo; #else # if _ELPP_COMPILER_MSVC _ELPP_UNUSED(currTime); time_t t; _time64(&t); localtime_s(timeInfo, &t); return timeInfo; # else // For any other compilers that don't have CRT warnings issue e.g, MinGW or TDM GCC- we use different method time_t rawTime = currTime->tv_sec; // NOLINT struct tm* tmInf = localtime(&rawTime); // NOLINT *timeInfo = *tmInf; return timeInfo; # endif // _ELPP_COMPILER_MSVC #endif // _ELPP_OS_UNIX } static char* parseFormat(char* buf, std::size_t bufSz, const char* format, const struct tm* tInfo, std::size_t msec, const base::MillisecondsWidth* msWidth) { const char* bufLim = buf + bufSz; for (; *format; ++format) { if (*format == base::consts::kFormatSpecifierChar) { switch (*++format) { case base::consts::kFormatSpecifierChar: // Escape break; case '\0': // End --format; break; case 'd': // Day buf = base::utils::Str::convertAndAddToBuff(tInfo->tm_mday, 2, buf, bufLim); continue; case 'a': // Day of week (short) buf = base::utils::Str::addToBuff(base::consts::kDaysAbbrev[tInfo->tm_wday], buf, bufLim); continue; case 'A': // Day of week (long) buf = base::utils::Str::addToBuff(base::consts::kDays[tInfo->tm_wday], buf, bufLim); continue; case 'M': // month buf = base::utils::Str::convertAndAddToBuff(tInfo->tm_mon + 1, 2, buf, bufLim); continue; case 'b': // month (short) buf = base::utils::Str::addToBuff(base::consts::kMonthsAbbrev[tInfo->tm_mon], buf, bufLim); continue; case 'B': // month (long) buf = base::utils::Str::addToBuff(base::consts::kMonths[tInfo->tm_mon], buf, bufLim); continue; case 'y': // year (two digits) buf = base::utils::Str::convertAndAddToBuff(tInfo->tm_year + base::consts::kYearBase, 2, buf, bufLim); continue; case 'Y': // year (four digits) buf = base::utils::Str::convertAndAddToBuff(tInfo->tm_year + base::consts::kYearBase, 4, buf, bufLim); continue; case 'h': // hour (12-hour) buf = base::utils::Str::convertAndAddToBuff(tInfo->tm_hour % 12, 2, buf, bufLim); continue; case 'H': // hour (24-hour) buf = base::utils::Str::convertAndAddToBuff(tInfo->tm_hour, 2, buf, bufLim); continue; case 'm': // minute buf = base::utils::Str::convertAndAddToBuff(tInfo->tm_min, 2, buf, bufLim); continue; case 's': // second buf = base::utils::Str::convertAndAddToBuff(tInfo->tm_sec, 2, buf, bufLim); continue; case 'z': // milliseconds case 'g': buf = base::utils::Str::convertAndAddToBuff(msec, msWidth->m_width, buf, bufLim); continue; case 'F': // AM/PM buf = base::utils::Str::addToBuff((tInfo->tm_hour >= 12) ? base::consts::kPm : base::consts::kAm, buf, bufLim); continue; default: continue; } } if (buf == bufLim) break; *buf++ = *format; } return buf; } }; /// @brief Command line arguments for application if specified using el::Helpers::setArgs(..) or _START_EASYLOGGINGPP(..) class CommandLineArgs { public: CommandLineArgs(void) { setArgs(0, static_cast(nullptr)); } CommandLineArgs(int argc, const char** argv) { setArgs(argc, argv); } CommandLineArgs(int argc, char** argv) { setArgs(argc, argv); } virtual ~CommandLineArgs(void) {} /// @brief Sets arguments and parses them inline void setArgs(int argc, const char** argv) { setArgs(argc, const_cast(argv)); } /// @brief Sets arguments and parses them inline void setArgs(int argc, char** argv) { m_params.clear(); m_paramsWithValue.clear(); if (argc == 0 || argv == nullptr) { return; } m_argc = argc; m_argv = argv; for (int i = 1; i < m_argc; ++i) { const char* v = (strstr(m_argv[i], "=")); if (v != nullptr && strlen(v) > 0) { std::string key = std::string(m_argv[i]); key = key.substr(0, key.find_first_of('=')); if (hasParamWithValue(key.c_str())) { ELPP_INTERNAL_INFO(1, "Skipping [" << key << "] arg since it already has value [" << getParamValue(key.c_str()) << "]"); } else { m_paramsWithValue.insert(std::make_pair(key, std::string(v + 1))); } } if (v == nullptr) { if (hasParam(m_argv[i])) { ELPP_INTERNAL_INFO(1, "Skipping [" << m_argv[i] << "] arg since it already exists"); } else { m_params.push_back(std::string(m_argv[i])); } } } } /// @brief Returns true if arguments contain paramKey with a value (seperated by '=') inline bool hasParamWithValue(const char* paramKey) const { return m_paramsWithValue.find(std::string(paramKey)) != m_paramsWithValue.end(); } /// @brief Returns value of arguments /// @see hasParamWithValue(const char*) inline const char* getParamValue(const char* paramKey) const { return m_paramsWithValue.find(std::string(paramKey))->second.c_str(); } /// @brief Return true if arguments has a param (not having a value) i,e without '=' inline bool hasParam(const char* paramKey) const { return std::find(m_params.begin(), m_params.end(), std::string(paramKey)) != m_params.end(); } /// @brief Returns true if no params available. This exclude argv[0] inline bool empty(void) const { return m_params.empty() && m_paramsWithValue.empty(); } /// @brief Returns total number of arguments. This exclude argv[0] inline std::size_t size(void) const { return m_params.size() + m_paramsWithValue.size(); } inline friend base::type::ostream_t& operator<<(base::type::ostream_t& os, const CommandLineArgs& c) { for (int i = 1; i < c.m_argc; ++i) { os << ELPP_LITERAL("[") << c.m_argv[i] << ELPP_LITERAL("]"); if (i < c.m_argc - 1) { os << ELPP_LITERAL(" "); } } return os; } private: int m_argc; char** m_argv; std::map m_paramsWithValue; std::vector m_params; }; /// @brief Abstract registry (aka repository) that provides basic interface for pointer repository specified by T_Ptr type. /// /// @detail Most of the functions are virtual final methods but anything implementing this abstract class should implement /// unregisterAll() and deepCopy(const AbstractRegistry&) and write registerNew() method according to container /// and few more methods; get() to find element, unregister() to unregister single entry. /// Please note that this is thread-unsafe and should also implement thread-safety mechanisms in implementation. template class AbstractRegistry : public base::threading::ThreadSafe { public: typedef typename Container::iterator iterator; typedef typename Container::const_iterator const_iterator; /// @brief Default constructor AbstractRegistry(void) {} /// @brief Move constructor that is useful for base classes AbstractRegistry(AbstractRegistry&& sr) { if (this == &sr) { return; } unregisterAll(); m_list = std::move(sr.m_list); } bool operator==(const AbstractRegistry& other) { if (size() != other.size()) { return false; } for (std::size_t i = 0; i < m_list.size(); ++i) { if (m_list.at(i) != other.m_list.at(i)) { return false; } } return true; } bool operator!=(const AbstractRegistry& other) { if (size() != other.size()) { return true; } for (std::size_t i = 0; i < m_list.size(); ++i) { if (m_list.at(i) != other.m_list.at(i)) { return true; } } return false; } /// @brief Assignment move operator AbstractRegistry& operator=(AbstractRegistry&& sr) { if (this == &sr) { return *this; } unregisterAll(); m_list = std::move(sr.m_list); return *this; } virtual ~AbstractRegistry(void) { } /// @return Iterator pointer from start of repository virtual inline iterator begin(void) ELPP_FINAL { return m_list.begin(); } /// @return Iterator pointer from end of repository virtual inline iterator end(void) ELPP_FINAL { return m_list.end(); } /// @return Constant iterator pointer from start of repository virtual inline const_iterator cbegin(void) const ELPP_FINAL { return m_list.cbegin(); } /// @return End of repository virtual inline const_iterator cend(void) const ELPP_FINAL { return m_list.cend(); } /// @return Whether or not repository is empty virtual inline bool empty(void) const ELPP_FINAL { return m_list.empty(); } /// @return Size of repository virtual inline std::size_t size(void) const ELPP_FINAL { return m_list.size(); } /// @brief Returns underlying container by reference virtual inline Container& list(void) ELPP_FINAL { return m_list; } /// @brief Returns underlying container by constant reference. virtual inline const Container& list(void) const ELPP_FINAL { return m_list; } /// @brief Unregisters all the pointers from current repository. virtual void unregisterAll(void) = 0; protected: virtual void deepCopy(const AbstractRegistry&) = 0; void reinitDeepCopy(const AbstractRegistry& sr) { unregisterAll(); deepCopy(sr); } private: Container m_list; }; /// @brief A pointer registry mechanism to manage memory and provide search functionalities. (non-predicate version) /// /// @detail NOTE: This is thread-unsafe implementation (although it contains lock function, it does not use these functions) /// of AbstractRegistry. Any implementation of this class should be /// explicitly (by using lock functions) template class Registry : public AbstractRegistry> { public: typedef typename Registry::iterator iterator; typedef typename Registry::const_iterator const_iterator; Registry(void) {} /// @brief Copy constructor that is useful for base classes. Try to avoid this constructor, use move constructor. Registry(const Registry& sr) : AbstractRegistry>() { if (this == &sr) { return; } this->reinitDeepCopy(sr); } /// @brief Assignment operator that unregisters all the existing registeries and deeply copies each of repo element /// @see unregisterAll() /// @see deepCopy(const AbstractRegistry&) Registry& operator=(const Registry& sr) { if (this == &sr) { return *this; } this->reinitDeepCopy(sr); return *this; } virtual ~Registry(void) { unregisterAll(); } protected: virtual inline void unregisterAll(void) ELPP_FINAL { if (!this->empty()) { for (auto&& curr : this->list()) { base::utils::safeDelete(curr.second); } this->list().clear(); } } /// @brief Registers new registry to repository. virtual inline void registerNew(const T_Key& uniqKey, T_Ptr* ptr) ELPP_FINAL { unregister(uniqKey); this->list().insert(std::make_pair(uniqKey, ptr)); } /// @brief Unregisters single entry mapped to specified unique key inline void unregister(const T_Key& uniqKey) { T_Ptr* existing = get(uniqKey); if (existing != nullptr) { base::utils::safeDelete(existing); this->list().erase(uniqKey); } } /// @brief Gets pointer from repository. If none found, nullptr is returned. inline T_Ptr* get(const T_Key& uniqKey) { iterator it = this->list().find(uniqKey); return it == this->list().end() ? nullptr : it->second; } private: virtual inline void deepCopy(const AbstractRegistry>& sr) ELPP_FINAL { for (const_iterator it = sr.cbegin(); it != sr.cend(); ++it) { registerNew(it->first, new T_Ptr(*it->second)); } } }; /// @brief A pointer registry mechanism to manage memory and provide search functionalities. (predicate version) /// /// @detail NOTE: This is thread-unsafe implementation of AbstractRegistry. Any implementation of this class /// should be made thread-safe explicitly template class RegistryWithPred : public AbstractRegistry> { public: typedef typename RegistryWithPred::iterator iterator; typedef typename RegistryWithPred::const_iterator const_iterator; RegistryWithPred(void) { } virtual ~RegistryWithPred(void) { unregisterAll(); } /// @brief Copy constructor that is useful for base classes. Try to avoid this constructor, use move constructor. RegistryWithPred(const RegistryWithPred& sr) : AbstractRegistry>() { if (this == &sr) { return; } this->reinitDeepCopy(sr); } /// @brief Assignment operator that unregisters all the existing registeries and deeply copies each of repo element /// @see unregisterAll() /// @see deepCopy(const AbstractRegistry&) RegistryWithPred& operator=(const RegistryWithPred& sr) { if (this == &sr) { return *this; } this->reinitDeepCopy(sr); return *this; } friend inline base::type::ostream_t& operator<<(base::type::ostream_t& os, const RegistryWithPred& sr) { for (const_iterator it = sr.list().begin(); it != sr.list().end(); ++it) { os << ELPP_LITERAL(" ") << **it << ELPP_LITERAL("\n"); } return os; } protected: virtual inline void unregisterAll(void) ELPP_FINAL { if (!this->empty()) { for (auto&& curr : this->list()) { base::utils::safeDelete(curr); } this->list().clear(); } } virtual void unregister(T_Ptr*& ptr) ELPP_FINAL { // NOLINT if (ptr) { iterator iter = this->begin(); for (; iter != this->end(); ++iter) { if (ptr == *iter) { break; } } if (iter != this->end() && *iter != nullptr) { this->list().erase(iter); base::utils::safeDelete(*iter); } } } virtual inline void registerNew(T_Ptr* ptr) ELPP_FINAL { this->list().push_back(ptr); } /// @brief Gets pointer from repository with speicifed arguments. Arguments are passed to predicate /// in order to validate pointer. template inline T_Ptr* get(const T& arg1, const T2 arg2) { iterator iter = std::find_if(this->list().begin(), this->list().end(), Pred(arg1, arg2)); if (iter != this->list().end() && *iter != nullptr) { return *iter; } return nullptr; } private: virtual inline void deepCopy(const AbstractRegistry>& sr) { for (const_iterator it = sr.list().begin(); it != sr.list().end(); ++it) { registerNew(new T_Ptr(**it)); } } }; } // namespace utils } // namespace base /// @brief Base of Easylogging++ friendly class /// /// @detail After inheriting this class publicly, implement pure-virtual function `void log(std::ostream&) const` class Loggable { public: virtual void log(el::base::type::ostream_t&) const = 0; private: friend inline el::base::type::ostream_t& operator<<(el::base::type::ostream_t& os, const Loggable& loggable) { loggable.log(os); return os; } }; namespace base { /// @brief Represents log format containing flags and date format. This is used internally to start initial log class LogFormat : public Loggable { public: LogFormat(void) : m_level(Level::Unknown), m_userFormat(base::type::string_t()), m_format(base::type::string_t()), m_dateTimeFormat(std::string()), m_flags(0x0) { } LogFormat(Level level, const base::type::string_t& format) : m_level(level), m_userFormat(format) { parseFromFormat(m_userFormat); } LogFormat(const LogFormat& logFormat) { m_level = logFormat.m_level; m_userFormat = logFormat.m_userFormat; m_format = logFormat.m_format; m_dateTimeFormat = logFormat.m_dateTimeFormat; m_flags = logFormat.m_flags; } LogFormat(LogFormat&& logFormat) { m_level = std::move(logFormat.m_level); m_userFormat = std::move(logFormat.m_userFormat); m_format = std::move(logFormat.m_format); m_dateTimeFormat = std::move(logFormat.m_dateTimeFormat); m_flags = std::move(logFormat.m_flags); } LogFormat& operator=(const LogFormat& logFormat) { m_level = logFormat.m_level; m_userFormat = logFormat.m_userFormat; m_dateTimeFormat = logFormat.m_dateTimeFormat; m_flags = logFormat.m_flags; return *this; } virtual ~LogFormat(void) { } inline bool operator==(const LogFormat& other) { return m_level == other.m_level && m_userFormat == other.m_userFormat && m_format == other.m_format && m_dateTimeFormat == other.m_dateTimeFormat && m_flags == other.m_flags; } /// @brief Updates format to be used while logging. /// @param userFormat User provided format void parseFromFormat(const base::type::string_t& userFormat) { // We make copy because we will be changing the format // i.e, removing user provided date format from original format // and then storing it. base::type::string_t formatCopy = userFormat; m_flags = 0x0; auto conditionalAddFlag = [&](const base::type::char_t* specifier, base::FormatFlags flag) { std::size_t foundAt = base::type::string_t::npos; while ((foundAt = formatCopy.find(specifier, foundAt + 1)) != base::type::string_t::npos){ if (foundAt > 0 && formatCopy[foundAt - 1] == base::consts::kFormatSpecifierChar) { if (hasFlag(flag)) { // If we already have flag we remove the escape chars so that '%%' is turned to '%' // even after specifier resolution - this is because we only replaceFirst specifier formatCopy.erase(foundAt > 0 ? foundAt - 1 : 0, 1); ++foundAt; } } else { if (!hasFlag(flag)) addFlag(flag); } } }; // NOLINT conditionalAddFlag(base::consts::kAppNameFormatSpecifier, base::FormatFlags::AppName); conditionalAddFlag(base::consts::kSeverityLevelFormatSpecifier, base::FormatFlags::Level); conditionalAddFlag(base::consts::kLoggerIdFormatSpecifier, base::FormatFlags::LoggerId); conditionalAddFlag(base::consts::kThreadIdFormatSpecifier, base::FormatFlags::ThreadId); conditionalAddFlag(base::consts::kLogFileFormatSpecifier, base::FormatFlags::File); conditionalAddFlag(base::consts::kLogLineFormatSpecifier, base::FormatFlags::Line); conditionalAddFlag(base::consts::kLogLocationFormatSpecifier, base::FormatFlags::Location); conditionalAddFlag(base::consts::kLogFunctionFormatSpecifier, base::FormatFlags::Function); conditionalAddFlag(base::consts::kCurrentUserFormatSpecifier, base::FormatFlags::User); conditionalAddFlag(base::consts::kCurrentHostFormatSpecifier, base::FormatFlags::Host); conditionalAddFlag(base::consts::kMessageFormatSpecifier, base::FormatFlags::LogMessage); conditionalAddFlag(base::consts::kVerboseLevelFormatSpecifier, base::FormatFlags::VerboseLevel); // For date/time we need to extract user's date format first std::size_t dateIndex = std::string::npos; if ((dateIndex = formatCopy.find(base::consts::kDateTimeFormatSpecifier)) != std::string::npos) { while (dateIndex > 0 && formatCopy[dateIndex - 1] == base::consts::kFormatSpecifierChar) { dateIndex = formatCopy.find(base::consts::kDateTimeFormatSpecifier, dateIndex + 1); } if (dateIndex != std::string::npos) { addFlag(base::FormatFlags::DateTime); updateDateFormat(dateIndex, formatCopy); } } m_format = formatCopy; updateFormatSpec(); } inline Level level(void) const { return m_level; } inline const base::type::string_t& userFormat(void) const { return m_userFormat; } inline const base::type::string_t& format(void) const { return m_format; } inline const std::string& dateTimeFormat(void) const { return m_dateTimeFormat; } inline base::type::EnumType flags(void) const { return m_flags; } inline bool hasFlag(base::FormatFlags flag) const { return base::utils::hasFlag(flag, m_flags); } virtual void log(el::base::type::ostream_t& os) const { os << m_format; } protected: /// @brief Updates date time format if available in currFormat. /// @param index Index where %datetime, %date or %time was found /// @param [in,out] currFormat current format that is being used to format virtual void updateDateFormat(std::size_t index, base::type::string_t& currFormat) ELPP_FINAL { // NOLINT if (hasFlag(base::FormatFlags::DateTime)) { index += ELPP_STRLEN(base::consts::kDateTimeFormatSpecifier); } const base::type::char_t* ptr = currFormat.c_str() + index; if ((currFormat.size() > index) && (ptr[0] == '{')) { // User has provided format for date/time ++ptr; int count = 1; // Start by 1 in order to remove starting brace std::stringstream ss; for (; *ptr; ++ptr, ++count) { if (*ptr == '}') { ++count; // In order to remove ending brace break; } ss << *ptr; } currFormat.erase(index, count); m_dateTimeFormat = ss.str(); } else { // No format provided, use default if (hasFlag(base::FormatFlags::DateTime)) { m_dateTimeFormat = std::string(base::consts::kDefaultDateTimeFormat); } } } /// @brief Updates %level from format. This is so that we dont have to do it at log-writing-time. It uses m_format and m_level virtual void updateFormatSpec(void) ELPP_FINAL { // Do not use switch over strongly typed enums because Intel C++ compilers dont support them yet. if (m_level == Level::Debug) { base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier, base::consts::kDebugLevelLogValue); } else if (m_level == Level::Info) { base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier, base::consts::kInfoLevelLogValue); } else if (m_level == Level::Warning) { base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier, base::consts::kWarningLevelLogValue); } else if (m_level == Level::Error) { base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier, base::consts::kErrorLevelLogValue); } else if (m_level == Level::Fatal) { base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier, base::consts::kFatalLevelLogValue); } else if (m_level == Level::Verbose) { base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier, base::consts::kVerboseLevelLogValue); } else if (m_level == Level::Trace) { base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kSeverityLevelFormatSpecifier, base::consts::kTraceLevelLogValue); } if (hasFlag(base::FormatFlags::User)) { std::string s = base::utils::s_currentUser; base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kCurrentUserFormatSpecifier, base::utils::s_currentUser); } if (hasFlag(base::FormatFlags::Host)) { base::utils::Str::replaceFirstWithEscape(m_format, base::consts::kCurrentHostFormatSpecifier, base::utils::s_currentHost); } // Ignore Level::Global and Level::Unknown } inline void addFlag(base::FormatFlags flag) { base::utils::addFlag(flag, &m_flags); } private: Level m_level; base::type::string_t m_userFormat; base::type::string_t m_format; std::string m_dateTimeFormat; base::type::EnumType m_flags; friend class el::Logger; // To resolve loggerId format specifier easily }; } // namespace base /// @brief Resolving function for format specifier typedef std::function FormatSpecifierValueResolver; /// @brief User-provided custom format specifier /// @see el::Helpers::installCustomFormatSpecifier /// @see FormatSpecifierValueResolver class CustomFormatSpecifier { public: CustomFormatSpecifier(const char* formatSpecifier, const FormatSpecifierValueResolver& resolver) : m_formatSpecifier(formatSpecifier), m_resolver(resolver) {} inline const char* formatSpecifier(void) const { return m_formatSpecifier; } inline const FormatSpecifierValueResolver& resolver(void) const { return m_resolver; } inline bool operator==(const char* formatSpecifier) { return strcmp(m_formatSpecifier, formatSpecifier) == 0; } private: const char* m_formatSpecifier; FormatSpecifierValueResolver m_resolver; }; /// @brief Represents single configuration that has representing level, configuration type and a string based value. /// /// @detail String based value means any value either its boolean, integer or string itself, it will be embedded inside quotes /// and will be parsed later. /// /// Consider some examples below: /// * el::Configuration confEnabledInfo(el::Level::Info, el::ConfigurationType::Enabled, "true"); /// * el::Configuration confMaxLogFileSizeInfo(el::Level::Info, el::ConfigurationType::MaxLogFileSize, "2048"); /// * el::Configuration confFilenameInfo(el::Level::Info, el::ConfigurationType::Filename, "/var/log/my.log"); class Configuration : public Loggable { public: Configuration(const Configuration& c) : m_level(c.m_level), m_configurationType(c.m_configurationType), m_value(c.m_value) { } Configuration& operator=(const Configuration& c) { m_level = c.m_level; m_configurationType = c.m_configurationType; m_value = c.m_value; return *this; } virtual ~Configuration(void) { } /// @brief Full constructor used to sets value of configuration Configuration(Level level, ConfigurationType configurationType, const std::string& value) : m_level(level), m_configurationType(configurationType), m_value(value) { } /// @brief Gets level of current configuration inline Level level(void) const { return m_level; } /// @brief Gets configuration type of current configuration inline ConfigurationType configurationType(void) const { return m_configurationType; } /// @brief Gets string based configuration value inline const std::string& value(void) const { return m_value; } /// @brief Set string based configuration value /// @param value Value to set. Values have to be std::string; For boolean values use "true", "false", for any integral values /// use them in quotes. They will be parsed when configuring inline void setValue(const std::string& value) { m_value = value; } virtual inline void log(el::base::type::ostream_t& os) const { os << LevelHelper::convertToString(m_level) << ELPP_LITERAL(" ") << ConfigurationTypeHelper::convertToString(m_configurationType) << ELPP_LITERAL(" = ") << m_value.c_str(); } /// @brief Used to find configuration from configuration (pointers) repository. Avoid using it. class Predicate { public: Predicate(Level level, ConfigurationType configurationType) : m_level(level), m_configurationType(configurationType) { } inline bool operator()(const Configuration* conf) const { return ((conf != nullptr) && (conf->level() == m_level) && (conf->configurationType() == m_configurationType)); } private: Level m_level; ConfigurationType m_configurationType; }; private: Level m_level; ConfigurationType m_configurationType; std::string m_value; }; /// @brief Thread-safe Configuration repository /// /// @detail This repository represents configurations for all the levels and configuration type mapped to a value. class Configurations : public base::utils::RegistryWithPred { public: /// @brief Default constructor with empty repository Configurations(void) : m_configurationFile(std::string()), m_isFromFile(false) { } /// @brief Constructor used to set configurations using configuration file. /// @param configurationFile Full path to configuration file /// @param useDefaultsForRemaining Lets you set the remaining configurations to default. /// @param base If provided, this configuration will be based off existing repository that this argument is pointing to. /// @see parseFromFile(const std::string&, Configurations* base) /// @see setRemainingToDefault() Configurations(const std::string& configurationFile, bool useDefaultsForRemaining = true, Configurations* base = nullptr) : m_configurationFile(configurationFile), m_isFromFile(false) { parseFromFile(configurationFile, base); if (useDefaultsForRemaining) { setRemainingToDefault(); } } virtual ~Configurations(void) { } /// @brief Parses configuration from file. /// @param configurationFile Full path to configuration file /// @param base Configurations to base new configuration repository off. This value is used when you want to use /// existing Configurations to base all the values and then set rest of configuration via configuration file. /// @return True if successfully parsed, false otherwise. You may define '_ELPP_DEBUG_ASSERT_FAILURE' to make sure you /// do not proceed without successful parse. inline bool parseFromFile(const std::string& configurationFile, Configurations* base = nullptr) { bool assertionPassed = false; ELPP_ASSERT((assertionPassed = base::utils::File::pathExists(configurationFile.c_str(), true)), "Configuration file [" << configurationFile << "] does not exist!"); if (!assertionPassed) { return false; } bool success = Parser::parseFromFile(configurationFile, this, base); m_isFromFile = success; return success; } /// @brief Parse configurations from configuration string. /// /// @detail This configuration string has same syntax as configuration file contents. Make sure all the necessary /// new line characters are provided. /// @param base Configurations to base new configuration repository off. This value is used when you want to use /// existing Configurations to base all the values and then set rest of configuration via configuration text. /// @return True if successfully parsed, false otherwise. You may define '_ELPP_DEBUG_ASSERT_FAILURE' to make sure you /// do not proceed without successful parse. inline bool parseFromText(const std::string& configurationsString, Configurations* base = nullptr) { bool success = Parser::parseFromText(configurationsString, this, base); if (success) { m_isFromFile = false; } return success; } /// @brief Sets configuration based-off an existing configurations. /// @param base Pointer to existing configurations. inline void setFromBase(Configurations* base) { if (base == nullptr || base == this) { return; } base::threading::ScopedLock scopedLock(base->lock()); for (Configuration*& conf : base->list()) { set(conf); } } /// @brief Determines whether or not specified configuration type exists in the repository. /// /// @detail Returns as soon as first level is found. /// @param configurationType Type of configuration to check existence for. bool hasConfiguration(ConfigurationType configurationType) { base::type::EnumType lIndex = LevelHelper::kMinValid; bool result = false; LevelHelper::forEachLevel(&lIndex, [&](void) -> bool { if (hasConfiguration(LevelHelper::castFromInt(lIndex), configurationType)) { result = true; } return result; }); return result; } /// @brief Determines whether or not specified configuration type exists for specified level /// @param level Level to check /// @param configurationType Type of configuration to check existence for. inline bool hasConfiguration(Level level, ConfigurationType configurationType) { base::threading::ScopedLock scopedLock(lock()); #if _ELPP_COMPILER_INTEL // We cant specify template types here, Intel C++ throws compilation error // "error: type name is not allowed" return RegistryWithPred::get(level, configurationType) != nullptr; #else return RegistryWithPred::get(level, configurationType) != nullptr; #endif // _ELPP_COMPILER_INTEL } /// @brief Sets value of configuration for specified level. /// /// @detail Any existing configuration for specified level will be replaced. Also note that configuration types /// ConfigurationType::MillisecondsWidth and ConfigurationType::PerformanceTracking will be ignored if not set for /// Level::Global because these configurations are not dependant on level. /// @param level Level to set configuration for (el::Level). /// @param configurationType Type of configuration (el::ConfigurationType) /// @param value A string based value. Regardless of what the data type of configuration is, it will always be string /// from users' point of view. This is then parsed later to be used internally. /// @see Configuration::setValue(const std::string& value) /// @see el::Level /// @see el::ConfigurationType inline void set(Level level, ConfigurationType configurationType, const std::string& value) { base::threading::ScopedLock scopedLock(lock()); unsafeSet(level, configurationType, value); // This is not unsafe anymore as we have locked mutex if (level == Level::Global) { unsafeSetGlobally(configurationType, value, false); // Again this is not unsafe either } } /// @brief Sets single configuration based on other single configuration. /// @see set(Level level, ConfigurationType configurationType, const std::string& value) inline void set(Configuration* conf) { if (conf == nullptr) { return; } set(conf->level(), conf->configurationType(), conf->value()); } inline Configuration* get(Level level, ConfigurationType configurationType) { base::threading::ScopedLock scopedLock(lock()); return RegistryWithPred::get(level, configurationType); } /// @brief Sets configuration for all levels. /// @param configurationType Type of configuration /// @param value String based value /// @see Configurations::set(Level level, ConfigurationType configurationType, const std::string& value) inline void setGlobally(ConfigurationType configurationType, const std::string& value) { setGlobally(configurationType, value, false); } /// @brief Clears repository so that all the configurations are unset inline void clear(void) { base::threading::ScopedLock scopedLock(lock()); unregisterAll(); } /// @brief Gets configuration file used in parsing this configurations. /// /// @detail If this repository was set manually or by text this returns empty string. inline const std::string& configurationFile(void) const { return m_configurationFile; } /// @brief Sets configurations to "factory based" configurations. void setToDefault(void) { setGlobally(ConfigurationType::Enabled, "true", true); #if !defined(_ELPP_NO_DEFAULT_LOG_FILE) setGlobally(ConfigurationType::Filename, std::string(base::consts::kDefaultLogFile), true); #else _ELPP_UNUSED(base::consts::kDefaultLogFile); #endif // !defined(_ELPP_NO_DEFAULT_LOG_FILE) setGlobally(ConfigurationType::ToFile, "true", true); setGlobally(ConfigurationType::ToStandardOutput, "true", true); setGlobally(ConfigurationType::MillisecondsWidth, "3", true); setGlobally(ConfigurationType::PerformanceTracking, "true", true); setGlobally(ConfigurationType::MaxLogFileSize, "0", true); setGlobally(ConfigurationType::LogFlushThreshold, "0", true); setGlobally(ConfigurationType::Format, "%datetime %level [%logger] %msg", true); set(Level::Debug, ConfigurationType::Format, "%datetime %level [%logger] [%user@%host] [%func] [%loc] %msg"); // INFO and WARNING are set to default by Level::Global set(Level::Error, ConfigurationType::Format, "%datetime %level [%logger] %msg"); set(Level::Fatal, ConfigurationType::Format, "%datetime %level [%logger] %msg"); set(Level::Verbose, ConfigurationType::Format, "%datetime %level-%vlevel [%logger] %msg"); set(Level::Trace, ConfigurationType::Format, "%datetime %level [%logger] [%func] [%loc] %msg"); } /// @brief Lets you set the remaining configurations to default. /// /// @detail By remaining, it means that the level/type a configuration does not exist for. /// This function is useful when you want to minimize chances of failures, e.g, if you have a configuration file that sets /// configuration for all the configurations except for Enabled or not, we use this so that ENABLED is set to default i.e, /// true. If you dont do this explicitley (either by calling this function or by using second param in Constructor /// and try to access a value, an error is thrown void setRemainingToDefault(void) { base::threading::ScopedLock scopedLock(lock()); unsafeSetIfNotExist(Level::Global, ConfigurationType::Enabled, "true"); #if !defined(_ELPP_NO_DEFAULT_LOG_FILE) unsafeSetIfNotExist(Level::Global, ConfigurationType::Filename, std::string(base::consts::kDefaultLogFile)); #endif // !defined(_ELPP_NO_DEFAULT_LOG_FILE) unsafeSetIfNotExist(Level::Global, ConfigurationType::ToFile, "true"); unsafeSetIfNotExist(Level::Global, ConfigurationType::ToStandardOutput, "true"); unsafeSetIfNotExist(Level::Global, ConfigurationType::MillisecondsWidth, "3"); unsafeSetIfNotExist(Level::Global, ConfigurationType::PerformanceTracking, "true"); unsafeSetIfNotExist(Level::Global, ConfigurationType::MaxLogFileSize, "0"); unsafeSetIfNotExist(Level::Global, ConfigurationType::Format, "%datetime %level [%logger] %msg"); unsafeSetIfNotExist(Level::Debug, ConfigurationType::Format, "%datetime %level [%logger] [%user@%host] [%func] [%loc] %msg"); // INFO and WARNING are set to default by Level::Global unsafeSetIfNotExist(Level::Error, ConfigurationType::Format, "%datetime %level [%logger] %msg"); unsafeSetIfNotExist(Level::Fatal, ConfigurationType::Format, "%datetime %level [%logger] %msg"); unsafeSetIfNotExist(Level::Verbose, ConfigurationType::Format, "%datetime %level-%vlevel [%logger] %msg"); unsafeSetIfNotExist(Level::Trace, ConfigurationType::Format, "%datetime %level [%logger] [%func] [%loc] %msg"); } /// @brief Parser used internally to parse configurations from file or text. /// /// @detail This class makes use of base::utils::Str. /// You should not need this unless you are working on some tool for Easylogging++ class Parser : base::StaticClass { public: /// @brief Parses configuration from file. /// @param configurationFile Full path to configuration file /// @param sender Sender configurations pointer. Usually 'this' is used from calling class /// @param base Configurations to base new configuration repository off. This value is used when you want to use /// existing Configurations to base all the values and then set rest of configuration via configuration file. /// @return True if successfully parsed, false otherwise. You may define '_STOP_ON_FIRST_ELPP_ASSERTION' to make sure you /// do not proceed without successful parse. static bool parseFromFile(const std::string& configurationFile, Configurations* sender, Configurations* base = nullptr) { sender->setFromBase(base); std::ifstream fileStream_(configurationFile.c_str(), std::ifstream::in); ELPP_ASSERT(fileStream_.is_open(), "Unable to open configuration file [" << configurationFile << "] for parsing."); bool parsedSuccessfully = false; std::string line = std::string(); Level currLevel = Level::Unknown; std::string currConfigStr = std::string(); std::string currLevelStr = std::string(); while (fileStream_.good()) { std::getline(fileStream_, line); parsedSuccessfully = parseLine(&line, &currConfigStr, &currLevelStr, &currLevel, sender); ELPP_ASSERT(parsedSuccessfully, "Unable to parse configuration line: " << line); } return parsedSuccessfully; } /// @brief Parse configurations from configuration string. /// /// @detail This configuration string has same syntax as configuration file contents. Make sure all the necessary /// new line characters are provided. You may define '_STOP_ON_FIRST_ELPP_ASSERTION' to make sure you /// do not proceed without successful parse (This is recommended) /// @param configurationsString /// @param sender Sender configurations pointer. Usually 'this' is used from calling class /// @param base Configurations to base new configuration repository off. This value is used when you want to use /// existing Configurations to base all the values and then set rest of configuration via configuration text. /// @return True if successfully parsed, false otherwise. static bool parseFromText(const std::string& configurationsString, Configurations* sender, Configurations* base = nullptr) { sender->setFromBase(base); bool parsedSuccessfully = false; std::stringstream ss(configurationsString); std::string line = std::string(); Level currLevel = Level::Unknown; std::string currConfigStr = std::string(); std::string currLevelStr = std::string(); while (std::getline(ss, line)) { parsedSuccessfully = parseLine(&line, &currConfigStr, &currLevelStr, &currLevel, sender); ELPP_ASSERT(parsedSuccessfully, "Unable to parse configuration line: " << line); } return parsedSuccessfully; } private: friend class el::Loggers; static void ignoreComments(std::string* line) { std::size_t foundAt = 0; std::size_t quotesStart = line->find("\""); std::size_t quotesEnd = std::string::npos; if (quotesStart != std::string::npos) { quotesEnd = line->find("\"", quotesStart + 1); while (quotesEnd != std::string::npos && line->at(quotesEnd - 1) == '\\') { // Do not erase slash yet - we will erase it in parseLine(..) while loop quotesEnd = line->find("\"", quotesEnd + 2); } } if ((foundAt = line->find(base::consts::kConfigurationComment)) != std::string::npos) { if (foundAt < quotesEnd) { foundAt = line->find(base::consts::kConfigurationComment, quotesEnd + 1); } *line = line->substr(0, foundAt); } } static inline bool isLevel(const std::string& line) { return base::utils::Str::startsWith(line, base::consts::kConfigurationLevel); } static inline bool isComment(const std::string& line) { return base::utils::Str::startsWith(line, base::consts::kConfigurationComment); } static inline bool isConfig(const std::string& line) { std::size_t assignment = line.find('='); return line != "" && (line[0] >= 65 || line[0] <= 90 || line[0] >= 97 || line[0] <= 122) && (assignment != std::string::npos) && (line.size() > assignment); } static bool parseLine(std::string* line, std::string* currConfigStr, std::string* currLevelStr, Level* currLevel, Configurations* conf) { ConfigurationType currConfig = ConfigurationType::Unknown; std::string currValue = std::string(); *line = base::utils::Str::trim(*line); if (isComment(*line)) return true; ignoreComments(line); *line = base::utils::Str::trim(*line); if (line->empty()) { // Comment ignored return true; } if (isLevel(*line)) { if (line->size() <= 2) { return true; } *currLevelStr = line->substr(1, line->size() - 2); *currLevelStr = base::utils::Str::toUpper(*currLevelStr); *currLevelStr = base::utils::Str::trim(*currLevelStr); *currLevel = LevelHelper::convertFromString(currLevelStr->c_str()); return true; } if (isConfig(*line)) { std::size_t assignment = line->find('='); *currConfigStr = line->substr(0, assignment); *currConfigStr = base::utils::Str::toUpper(*currConfigStr); *currConfigStr = base::utils::Str::trim(*currConfigStr); currConfig = ConfigurationTypeHelper::convertFromString(currConfigStr->c_str()); currValue = line->substr(assignment + 1); currValue = base::utils::Str::trim(currValue); std::size_t quotesStart = currValue.find("\"", 0); std::size_t quotesEnd = std::string::npos; if (quotesStart != std::string::npos) { quotesEnd = currValue.find("\"", quotesStart + 1); while (quotesEnd != std::string::npos && currValue.at(quotesEnd - 1) == '\\') { currValue = currValue.erase(quotesEnd - 1, 1); quotesEnd = currValue.find("\"", quotesEnd + 2); } } if (quotesStart != std::string::npos && quotesEnd != std::string::npos) { // Quote provided - check and strip if valid ELPP_ASSERT((quotesStart < quotesEnd), "Configuration error - No ending quote found in [" << currConfigStr << "]"); ELPP_ASSERT((quotesStart + 1 != quotesEnd), "Empty configuration value for [" << currConfigStr << "]"); if ((quotesStart != quotesEnd) && (quotesStart + 1 != quotesEnd)) { // Explicit check in case if assertion is disabled currValue = currValue.substr(quotesStart + 1, quotesEnd - 1); } } } ELPP_ASSERT(*currLevel != Level::Unknown, "Unrecognized severity level [" << *currLevelStr << "]"); ELPP_ASSERT(currConfig != ConfigurationType::Unknown, "Unrecognized configuration [" << *currConfigStr << "]"); if (*currLevel == Level::Unknown || currConfig == ConfigurationType::Unknown) { return false; // unrecognizable level or config } conf->set(*currLevel, currConfig, currValue); return true; } }; private: std::string m_configurationFile; bool m_isFromFile; friend class el::Loggers; /// @brief Unsafely sets configuration if does not already exist void unsafeSetIfNotExist(Level level, ConfigurationType configurationType, const std::string& value) { Configuration* conf = RegistryWithPred::get(level, configurationType); if (conf == nullptr) { unsafeSet(level, configurationType, value); } } /// @brief Thread unsafe set void unsafeSet(Level level, ConfigurationType configurationType, const std::string& value) { Configuration* conf = RegistryWithPred::get(level, configurationType); if (conf == nullptr) { registerNew(new Configuration(level, configurationType, value)); } else { conf->setValue(value); } if (level == Level::Global) { unsafeSetGlobally(configurationType, value, false); } } /// @brief Sets configurations for all levels including Level::Global if includeGlobalLevel is true /// @see Configurations::setGlobally(ConfigurationType configurationType, const std::string& value) void setGlobally(ConfigurationType configurationType, const std::string& value, bool includeGlobalLevel) { if (includeGlobalLevel) { set(Level::Global, configurationType, value); } base::type::EnumType lIndex = LevelHelper::kMinValid; LevelHelper::forEachLevel(&lIndex, [&](void) -> bool { set(LevelHelper::castFromInt(lIndex), configurationType, value); return false; // Do not break lambda function yet as we need to set all levels regardless }); } /// @brief Sets configurations (Unsafely) for all levels including Level::Global if includeGlobalLevel is true /// @see Configurations::setGlobally(ConfigurationType configurationType, const std::string& value) void unsafeSetGlobally(ConfigurationType configurationType, const std::string& value, bool includeGlobalLevel) { if (includeGlobalLevel) { unsafeSet(Level::Global, configurationType, value); } base::type::EnumType lIndex = LevelHelper::kMinValid; LevelHelper::forEachLevel(&lIndex, [&](void) -> bool { unsafeSet(LevelHelper::castFromInt(lIndex), configurationType, value); return false; // Do not break lambda function yet as we need to set all levels regardless }); } }; namespace base { typedef std::shared_ptr FileStreamPtr; typedef std::map LogStreamsReferenceMap; /// @brief Configurations with data types. /// /// @detail el::Configurations have string based values. This is whats used internally in order to read correct configurations. /// This is to perform faster while writing logs using correct configurations. /// /// This is thread safe and final class containing non-virtual destructor (means nothing should inherit this class) class TypedConfigurations : public base::threading::ThreadSafe { public: /// @brief Constructor to initialize (construct) the object off el::Configurations /// @param configurations Configurations pointer/reference to base this typed configurations off. /// @param logStreamsReference Use ELPP->registeredLoggers()->logStreamsReference() TypedConfigurations(Configurations* configurations, base::LogStreamsReferenceMap* logStreamsReference) { m_configurations = configurations; m_logStreamsReference = logStreamsReference; build(m_configurations); } TypedConfigurations(const TypedConfigurations& other) { this->m_configurations = other.m_configurations; this->m_logStreamsReference = other.m_logStreamsReference; build(m_configurations); } virtual ~TypedConfigurations(void) { } const Configurations* configurations(void) const { return m_configurations; } inline bool enabled(Level level) { return getConfigByVal(level, &m_enabledMap, "enabled"); } inline bool toFile(Level level) { return getConfigByVal(level, &m_toFileMap, "toFile"); } inline const std::string& filename(Level level) { return getConfigByRef(level, &m_filenameMap, "filename"); } inline bool toStandardOutput(Level level) { return getConfigByVal(level, &m_toStandardOutputMap, "toStandardOutput"); } inline const base::LogFormat& logFormat(Level level) { return getConfigByRef(level, &m_logFormatMap, "logFormat"); } inline const base::MillisecondsWidth& millisecondsWidth(Level level = Level::Global) { return getConfigByRef(level, &m_millisecondsWidthMap, "millisecondsWidth"); } inline bool performanceTracking(Level level = Level::Global) { return getConfigByVal(level, &m_performanceTrackingMap, "performanceTracking"); } inline base::type::fstream_t* fileStream(Level level) { return getConfigByRef(level, &m_fileStreamMap, "fileStream").get(); } inline std::size_t maxLogFileSize(Level level) { return getConfigByVal(level, &m_maxLogFileSizeMap, "maxLogFileSize"); } inline std::size_t logFlushThreshold(Level level) { return getConfigByVal(level, &m_logFlushThresholdMap, "logFlushThreshold"); } private: Configurations* m_configurations; std::map m_enabledMap; std::map m_toFileMap; std::map m_filenameMap; std::map m_toStandardOutputMap; std::map m_logFormatMap; std::map m_millisecondsWidthMap; std::map m_performanceTrackingMap; std::map m_fileStreamMap; std::map m_maxLogFileSizeMap; std::map m_logFlushThresholdMap; base::LogStreamsReferenceMap* m_logStreamsReference; friend class el::Helpers; friend class el::base::MessageBuilder; friend class el::base::Writer; friend class el::base::DefaultLogDispatchCallback; friend class el::base::LogDispatcher; template inline Conf_T getConfigByVal(Level level, const std::map* confMap, const char* confName) { base::threading::ScopedLock scopedLock(lock()); return unsafeGetConfigByVal(level, confMap, confName); // This is not unsafe anymore - mutex locked in scope } template inline Conf_T& getConfigByRef(Level level, std::map* confMap, const char* confName) { base::threading::ScopedLock scopedLock(lock()); return unsafeGetConfigByRef(level, confMap, confName); // This is not unsafe anymore - mutex locked in scope } template inline Conf_T unsafeGetConfigByVal(Level level, const std::map* confMap, const char* confName) { _ELPP_UNUSED(confName); typename std::map::const_iterator it = confMap->find(level); if (it == confMap->end()) { try { return confMap->at(Level::Global); } catch (...) { ELPP_INTERNAL_ERROR("Unable to get configuration [" << confName << "] for level [" << LevelHelper::convertToString(level) << "]" << std::endl << "Please ensure you have properly configured logger.", false); return Conf_T(); } } return it->second; } template inline Conf_T& unsafeGetConfigByRef(Level level, std::map* confMap, const char* confName) { _ELPP_UNUSED(confName); typename std::map::iterator it = confMap->find(level); if (it == confMap->end()) { try { return confMap->at(Level::Global); } catch (...) { ELPP_INTERNAL_ERROR("Unable to get configuration [" << confName << "] for level [" << LevelHelper::convertToString(level) << "]" << std::endl << "Please ensure you have properly configured logger.", false); } } return it->second; } template void setValue(Level level, const Conf_T& value, std::map* confMap, bool includeGlobalLevel = true) { // If map is empty and we are allowed to add into generic level (Level::Global), do it! if (confMap->empty() && includeGlobalLevel) { confMap->insert(std::make_pair(Level::Global, value)); return; } // If same value exist in generic level already, dont add it to explicit level typename std::map::iterator it = confMap->find(Level::Global); if (it != confMap->end() && it->second == value) { return; } // Now make sure we dont double up values if we really need to add it to explicit level it = confMap->find(level); if (it == confMap->end()) { // Value not found for level, add new confMap->insert(std::make_pair(level, value)); } else { // Value found, just update value confMap->at(level) = value; } } void build(Configurations* configurations) { base::threading::ScopedLock scopedLock(lock()); auto getBool = [] (std::string boolStr) -> bool { // Pass by value for trimming base::utils::Str::trim(boolStr); return (boolStr == "TRUE" || boolStr == "true" || boolStr == "1"); }; std::vector withFileSizeLimit; for (Configurations::const_iterator it = configurations->begin(); it != configurations->end(); ++it) { Configuration* conf = *it; // We cannot use switch on strong enums because Intel C++ dont support them yet if (conf->configurationType() == ConfigurationType::Enabled) { setValue(conf->level(), getBool(conf->value()), &m_enabledMap); } else if (conf->configurationType() == ConfigurationType::ToFile) { setValue(conf->level(), getBool(conf->value()), &m_toFileMap); } else if (conf->configurationType() == ConfigurationType::ToStandardOutput) { setValue(conf->level(), getBool(conf->value()), &m_toStandardOutputMap); } else if (conf->configurationType() == ConfigurationType::Filename) { // We do not yet configure filename but we will configure in another // loop. This is because if file cannot be created, we will force ToFile // to be false. Because configuring logger is not necessarily performance // sensative operation, we can live with another loop; (by the way this loop // is not very heavy either) } else if (conf->configurationType() == ConfigurationType::Format) { setValue(conf->level(), base::LogFormat(conf->level(), base::type::string_t(conf->value().begin(), conf->value().end())), &m_logFormatMap); } else if (conf->configurationType() == ConfigurationType::MillisecondsWidth) { setValue(Level::Global, base::MillisecondsWidth(static_cast(getULong(conf->value()))), &m_millisecondsWidthMap); } else if (conf->configurationType() == ConfigurationType::PerformanceTracking) { setValue(Level::Global, getBool(conf->value()), &m_performanceTrackingMap); } else if (conf->configurationType() == ConfigurationType::MaxLogFileSize) { setValue(conf->level(), static_cast(getULong(conf->value())), &m_maxLogFileSizeMap); #if !defined(_ELPP_NO_DEFAULT_LOG_FILE) withFileSizeLimit.push_back(conf); #endif // !defined(_ELPP_NO_DEFAULT_LOG_FILE) } else if (conf->configurationType() == ConfigurationType::LogFlushThreshold) { setValue(conf->level(), static_cast(getULong(conf->value())), &m_logFlushThresholdMap); } } // As mentioned early, we will now set filename configuration in separate loop to deal with non-existent files for (Configurations::const_iterator it = configurations->begin(); it != configurations->end(); ++it) { Configuration* conf = *it; if (conf->configurationType() == ConfigurationType::Filename) { insertFile(conf->level(), conf->value()); } } for (std::vector::iterator conf = withFileSizeLimit.begin(); conf != withFileSizeLimit.end(); ++conf) { // This is not unsafe as mutex is locked in currect scope unsafeValidateFileRolling((*conf)->level(), base::defaultPreRollOutCallback); } } unsigned long getULong(std::string confVal) { // NOLINT bool valid = true; base::utils::Str::trim(confVal); valid = !confVal.empty() && std::find_if(confVal.begin(), confVal.end(), [](char c) { return !base::utils::Str::isDigit(c); }) == confVal.end(); if (!valid) { valid = false; ELPP_ASSERT(valid, "Configuration value not a valid integer [" << confVal << "]"); return 0; } return atol(confVal.c_str()); } std::string resolveFilename(const std::string& filename) { std::string resultingFilename = filename; std::size_t dateIndex = std::string::npos; std::string dateTimeFormatSpecifierStr = std::string(base::consts::kDateTimeFormatSpecifierForFilename); if ((dateIndex = resultingFilename.find(dateTimeFormatSpecifierStr.c_str())) != std::string::npos) { while (dateIndex > 0 && resultingFilename[dateIndex - 1] == base::consts::kFormatSpecifierChar) { dateIndex = resultingFilename.find(dateTimeFormatSpecifierStr.c_str(), dateIndex + 1); } if (dateIndex != std::string::npos) { const char* ptr = resultingFilename.c_str() + dateIndex; // Goto end of specifier ptr += dateTimeFormatSpecifierStr.size(); std::string fmt; if ((resultingFilename.size() > dateIndex) && (ptr[0] == '{')) { // User has provided format for date/time ++ptr; int count = 1; // Start by 1 in order to remove starting brace std::stringstream ss; for (; *ptr; ++ptr, ++count) { if (*ptr == '}') { ++count; // In order to remove ending brace break; } ss << *ptr; } resultingFilename.erase(dateIndex + dateTimeFormatSpecifierStr.size(), count); fmt = ss.str(); } else { fmt = std::string(base::consts::kDefaultDateTimeFormatInFilename); } base::MillisecondsWidth msWidth(3); std::string now = base::utils::DateTime::getDateTime(fmt.c_str(), &msWidth); base::utils::Str::replaceAll(now, '/', '-'); // Replace path element since we are dealing with filename base::utils::Str::replaceAll(resultingFilename, dateTimeFormatSpecifierStr, now); } } return resultingFilename; } void insertFile(Level level, const std::string& fullFilename) { std::string resolvedFilename = resolveFilename(fullFilename); if (resolvedFilename.empty()) { std::cerr << "Could not load empty file for logging, please re-check your configurations for level [" << LevelHelper::convertToString(level) << "]"; } std::string filePath = base::utils::File::extractPathFromFilename(resolvedFilename, base::consts::kFilePathSeperator); if (filePath.size() < resolvedFilename.size()) { base::utils::File::createPath(filePath); } auto create = [&](Level level) { base::LogStreamsReferenceMap::iterator filestreamIter = m_logStreamsReference->find(resolvedFilename); base::type::fstream_t* fs = nullptr; if (filestreamIter == m_logStreamsReference->end()) { // We need a completely new stream, nothing to share with fs = base::utils::File::newFileStream(resolvedFilename); m_filenameMap.insert(std::make_pair(level, resolvedFilename)); m_fileStreamMap.insert(std::make_pair(level, base::FileStreamPtr(fs))); m_logStreamsReference->insert(std::make_pair(resolvedFilename, base::FileStreamPtr(m_fileStreamMap.at(level)))); } else { // Woops! we have an existing one, share it! m_filenameMap.insert(std::make_pair(level, filestreamIter->first)); m_fileStreamMap.insert(std::make_pair(level, base::FileStreamPtr(filestreamIter->second))); fs = filestreamIter->second.get(); } if (fs == nullptr) { // We display bad file error from newFileStream() ELPP_INTERNAL_ERROR("Setting [TO_FILE] of [" << LevelHelper::convertToString(level) << "] to FALSE", false); setValue(level, false, &m_toFileMap); } }; // NOLINT // If we dont have file conf for any level, create it for Level::Global first // otherwise create for specified level create(m_filenameMap.empty() && m_fileStreamMap.empty() ? Level::Global : level); } bool unsafeValidateFileRolling(Level level, const PreRollOutCallback& PreRollOutCallback) { base::type::fstream_t* fs = unsafeGetConfigByRef(level, &m_fileStreamMap, "fileStream").get(); if (fs == nullptr) { return true; } std::size_t maxLogFileSize = unsafeGetConfigByVal(level, &m_maxLogFileSizeMap, "maxLogFileSize"); std::size_t currFileSize = base::utils::File::getSizeOfFile(fs); if (maxLogFileSize != 0 && currFileSize >= maxLogFileSize) { std::string fname = unsafeGetConfigByRef(level, &m_filenameMap, "filename"); ELPP_INTERNAL_INFO(1, "Truncating log file [" << fname << "] as a result of configurations for level [" << LevelHelper::convertToString(level) << "]"); fs->close(); PreRollOutCallback(fname.c_str(), currFileSize); fs->open(fname, std::fstream::out | std::fstream::trunc); return true; } return false; } bool validateFileRolling(Level level, const PreRollOutCallback& PreRollOutCallback) { base::threading::ScopedLock scopedLock(lock()); return unsafeValidateFileRolling(level, PreRollOutCallback); } }; /// @brief Class that keeps record of current line hit for occasional logging class HitCounter { public: HitCounter(void) : m_filename(""), m_lineNumber(0), m_hitCounts(0) { } HitCounter(const char* filename, unsigned long int lineNumber) : // NOLINT m_filename(filename), m_lineNumber(lineNumber), m_hitCounts(0) { } HitCounter(const HitCounter& hitCounter) : m_filename(hitCounter.m_filename), m_lineNumber(hitCounter.m_lineNumber), m_hitCounts(hitCounter.m_hitCounts) { } HitCounter& operator=(const HitCounter& hitCounter) { m_filename = hitCounter.m_filename; m_lineNumber = hitCounter.m_lineNumber; m_hitCounts = hitCounter.m_hitCounts; return *this; } virtual ~HitCounter(void) { } /// @brief Resets location of current hit counter inline void resetLocation(const char* filename, unsigned long int lineNumber) { // NOLINT m_filename = filename; m_lineNumber = lineNumber; } /// @brief Validates hit counts and resets it if necessary inline void validateHitCounts(std::size_t n) { if (m_hitCounts >= base::consts::kMaxLogPerCounter) { m_hitCounts = (n >= 1 ? base::consts::kMaxLogPerCounter % n : 0); } ++m_hitCounts; } inline const char* filename(void) const { return m_filename; } inline unsigned long int lineNumber(void) const { // NOLINT return m_lineNumber; } inline std::size_t hitCounts(void) const { return m_hitCounts; } inline void increment(void) { ++m_hitCounts; } class Predicate { public: Predicate(const char* filename, unsigned long int lineNumber) // NOLINT : m_filename(filename), m_lineNumber(lineNumber) { } inline bool operator()(const HitCounter* counter) { return ((counter != nullptr) && (strcmp(counter->m_filename, m_filename) == 0) && (counter->m_lineNumber == m_lineNumber)); } private: const char* m_filename; unsigned long int m_lineNumber; // NOLINT }; private: const char* m_filename; unsigned long int m_lineNumber; // NOLINT std::size_t m_hitCounts; }; /// @brief Repository for hit counters used across the application class RegisteredHitCounters : public base::utils::RegistryWithPred { public: /// @brief Validates counter for every N, i.e, registers new if does not exist otherwise updates original one /// @return True if validation resulted in triggering hit. Meaning logs should be written everytime true is returned bool validateEveryN(const char* filename, unsigned long int lineNumber, std::size_t n) { // NOLINT base::threading::ScopedLock scopedLock(lock()); base::HitCounter* counter = get(filename, lineNumber); if (counter == nullptr) { registerNew(counter = new base::HitCounter(filename, lineNumber)); } counter->validateHitCounts(n); bool result = (n >= 1 && counter->hitCounts() != 0 && counter->hitCounts() % n == 0); return result; } /// @brief Validates counter for hits >= N, i.e, registers new if does not exist otherwise updates original one /// @return True if validation resulted in triggering hit. Meaning logs should be written everytime true is returned bool validateAfterN(const char* filename, unsigned long int lineNumber, std::size_t n) { // NOLINT base::threading::ScopedLock scopedLock(lock()); base::HitCounter* counter = get(filename, lineNumber); if (counter == nullptr) { registerNew(counter = new base::HitCounter(filename, lineNumber)); } // Do not use validateHitCounts here since we do not want to reset counter here // Note the >= instead of > because we are incrementing // after this check if (counter->hitCounts() >= n) return true; counter->increment(); return false; } /// @brief Validates counter for hits are <= n, i.e, registers new if does not exist otherwise updates original one /// @return True if validation resulted in triggering hit. Meaning logs should be written everytime true is returned bool validateNTimes(const char* filename, unsigned long int lineNumber, std::size_t n) { // NOLINT base::threading::ScopedLock scopedLock(lock()); base::HitCounter* counter = get(filename, lineNumber); if (counter == nullptr) { registerNew(counter = new base::HitCounter(filename, lineNumber)); } counter->increment(); // Do not use validateHitCounts here since we do not want to reset counter here if (counter->hitCounts() <= n) return true; return false; } /// @brief Gets hit counter registered at specified position inline const base::HitCounter* getCounter(const char* filename, unsigned long int lineNumber) { // NOLINT base::threading::ScopedLock scopedLock(lock()); return get(filename, lineNumber); } }; /// @brief Action to be taken for dispatching enum class DispatchAction : base::type::EnumType { None = 1, NormalLog = 2, SysLog = 4 }; } // namespace base template class Callback : protected base::threading::ThreadSafe { public: Callback(void) : m_enabled(true) {} inline bool enabled(void) const { return m_enabled; } inline void setEnabled(bool enabled) { base::threading::ScopedLock scopedLock(lock()); m_enabled = enabled; } protected: virtual void handle(const T* handlePtr) = 0; private: bool m_enabled; }; class LogDispatchData { public: LogDispatchData() : m_logMessage(nullptr), m_dispatchAction(base::DispatchAction::None) {} inline const LogMessage* logMessage(void) const { return m_logMessage; } inline base::DispatchAction dispatchAction(void) const { return m_dispatchAction; } private: LogMessage* m_logMessage; base::DispatchAction m_dispatchAction; friend class base::LogDispatcher; inline void setLogMessage(LogMessage* logMessage) { m_logMessage = logMessage; } inline void setDispatchAction(base::DispatchAction dispatchAction) { m_dispatchAction = dispatchAction; } }; class LogDispatchCallback : public Callback { private: friend class base::LogDispatcher; }; class PerformanceTrackingCallback : public Callback { private: friend class base::PerformanceTracker; }; class LogBuilder : base::NoCopy { public: virtual ~LogBuilder(void) { ELPP_INTERNAL_INFO(3, "Destroying log builder...")} virtual base::type::string_t build(const LogMessage* logMessage, bool appendNewLine) const = 0; private: friend class el::base::DefaultLogDispatchCallback; void convertToColoredOutput(base::type::string_t* logLine, Level level) { if (!base::utils::s_termSupportsColor) return; const base::type::char_t* resetColor = ELPP_LITERAL("\x1b[0m"); if (level == Level::Error || level == Level::Fatal) *logLine = ELPP_LITERAL("\x1b[31m") + *logLine + resetColor; else if (level == Level::Warning) *logLine = ELPP_LITERAL("\x1b[33m") + *logLine + resetColor; } }; typedef std::shared_ptr LogBuilderPtr; /// @brief Represents a logger holding ID and configurations we need to write logs /// /// @detail This class does not write logs itself instead its used by writer to read configuations from. class Logger : public base::threading::ThreadSafe, public Loggable { public: Logger(const std::string& id, base::LogStreamsReferenceMap* logStreamsReference) : m_id(id), m_typedConfigurations(nullptr), m_parentApplicationName(std::string()), m_isConfigured(false), m_logStreamsReference(logStreamsReference) { initUnflushedCount(); } Logger(const std::string& id, const Configurations& configurations, base::LogStreamsReferenceMap* logStreamsReference) : m_id(id), m_typedConfigurations(nullptr), m_parentApplicationName(std::string()), m_isConfigured(false), m_logStreamsReference(logStreamsReference) { initUnflushedCount(); configure(configurations); } Logger(const Logger& logger) { base::utils::safeDelete(m_typedConfigurations); m_id = logger.m_id; m_typedConfigurations = logger.m_typedConfigurations; m_parentApplicationName = logger.m_parentApplicationName; m_isConfigured = logger.m_isConfigured; m_configurations = logger.m_configurations; m_unflushedCount = logger.m_unflushedCount; m_logStreamsReference = logger.m_logStreamsReference; } Logger& operator=(const Logger& logger) { base::utils::safeDelete(m_typedConfigurations); m_id = logger.m_id; m_typedConfigurations = logger.m_typedConfigurations; m_parentApplicationName = logger.m_parentApplicationName; m_isConfigured = logger.m_isConfigured; m_configurations = logger.m_configurations; m_unflushedCount = logger.m_unflushedCount; m_logStreamsReference = logger.m_logStreamsReference; return *this; } virtual ~Logger(void) { base::utils::safeDelete(m_typedConfigurations); } virtual inline void log(el::base::type::ostream_t& os) const { os << m_id.c_str(); } /// @brief Configures the logger using specified configurations. void configure(const Configurations& configurations) { m_isConfigured = false; // we set it to false in case if we fail initUnflushedCount(); if (m_typedConfigurations != nullptr) { Configurations* c = const_cast(m_typedConfigurations->configurations()); if (c->hasConfiguration(Level::Global, ConfigurationType::Filename)) { // This check is definitely needed for cases like _ELPP_NO_DEFAULT_LOG_FILE flush(); } } base::threading::ScopedLock scopedLock(lock()); if (m_configurations != configurations) { m_configurations.setFromBase(const_cast(&configurations)); } base::utils::safeDelete(m_typedConfigurations); m_typedConfigurations = new base::TypedConfigurations(&m_configurations, m_logStreamsReference); resolveLoggerFormatSpec(); m_isConfigured = true; } /// @brief Reconfigures logger using existing configurations inline void reconfigure(void) { ELPP_INTERNAL_INFO(1, "Reconfiguring logger [" << m_id << "]"); configure(m_configurations); } inline const std::string& id(void) const { return m_id; } inline const std::string& parentApplicationName(void) const { return m_parentApplicationName; } inline void setParentApplicationName(const std::string& parentApplicationName) { m_parentApplicationName = parentApplicationName; } inline Configurations* configurations(void) { return &m_configurations; } inline base::TypedConfigurations* typedConfigurations(void) { return m_typedConfigurations; } static inline bool isValidId(const std::string& id) { for (std::string::const_iterator it = id.begin(); it != id.end(); ++it) { if (!base::utils::Str::contains(base::consts::kValidLoggerIdSymbols, *it)) { return false; } } return true; } /// @brief Flushes logger to sync all log files for all levels inline void flush(void) { ELPP_INTERNAL_INFO(3, "Flushing logger [" << m_id << "] all levels"); base::threading::ScopedLock scopedLock(lock()); base::type::EnumType lIndex = LevelHelper::kMinValid; LevelHelper::forEachLevel(&lIndex, [&](void) -> bool { flush(LevelHelper::castFromInt(lIndex), nullptr); return false; }); } inline LogBuilder* logBuilder(void) const { return m_logBuilder.get(); } inline void setLogBuilder(const LogBuilderPtr& logBuilder) { m_logBuilder = logBuilder; } inline bool enabled(Level level) const { return m_typedConfigurations->enabled(level); } #if _ELPP_VARIADIC_TEMPLATES_SUPPORTED # define LOGGER_LEVEL_WRITERS_SIGNATURES(FUNCTION_NAME)\ template \ inline void FUNCTION_NAME(const char*, const T&, const Args&...);\ template \ inline void FUNCTION_NAME(const T&); template inline void verbose(int, const char*, const T&, const Args&...); template inline void verbose(int, const T&); LOGGER_LEVEL_WRITERS_SIGNATURES(info) LOGGER_LEVEL_WRITERS_SIGNATURES(debug) LOGGER_LEVEL_WRITERS_SIGNATURES(warn) LOGGER_LEVEL_WRITERS_SIGNATURES(error) LOGGER_LEVEL_WRITERS_SIGNATURES(fatal) LOGGER_LEVEL_WRITERS_SIGNATURES(trace) # undef LOGGER_LEVEL_WRITERS_SIGNATURES #endif // _ELPP_VARIADIC_TEMPLATES_SUPPORTED private: std::string m_id; base::TypedConfigurations* m_typedConfigurations; base::type::stringstream_t m_stream; std::string m_parentApplicationName; bool m_isConfigured; Configurations m_configurations; std::map m_unflushedCount; base::LogStreamsReferenceMap* m_logStreamsReference; LogBuilderPtr m_logBuilder; friend class el::LogMessage; friend class el::Loggers; friend class el::Helpers; friend class el::base::RegisteredLoggers; friend class el::base::DefaultLogDispatchCallback; friend class el::base::MessageBuilder; friend class el::base::Writer; friend class el::base::PErrorWriter; friend class el::base::Storage; friend class el::base::PerformanceTracker; friend class el::base::LogDispatcher; Logger(void); #if _ELPP_VARIADIC_TEMPLATES_SUPPORTED template void log_(Level, int, const char*, const T&, const Args&...); template inline void log_(Level, int, const T&); template void log(Level, const char*, const T&, const Args&...); template inline void log(Level, const T&); #endif // _ELPP_VARIADIC_TEMPLATES_SUPPORTED void initUnflushedCount(void) { m_unflushedCount.clear(); base::type::EnumType lIndex = LevelHelper::kMinValid; LevelHelper::forEachLevel(&lIndex, [&](void) -> bool { m_unflushedCount.insert(std::make_pair(LevelHelper::castFromInt(lIndex), 0)); return false; }); } inline base::type::stringstream_t& stream(void) { return m_stream; } inline void flush(Level level, base::type::fstream_t* fs) { if (fs == nullptr && m_typedConfigurations->toFile(level)) { fs = m_typedConfigurations->fileStream(level); } if (fs != nullptr) { fs->flush(); m_unflushedCount.find(level)->second = 0; } } inline bool isFlushNeeded(Level level) { return ++m_unflushedCount.find(level)->second >= m_typedConfigurations->logFlushThreshold(level); } void resolveLoggerFormatSpec(void) const { base::type::EnumType lIndex = LevelHelper::kMinValid; LevelHelper::forEachLevel(&lIndex, [&](void) -> bool { base::LogFormat* logFormat = const_cast(&m_typedConfigurations->logFormat(LevelHelper::castFromInt(lIndex))); base::utils::Str::replaceFirstWithEscape(logFormat->m_format, base::consts::kLoggerIdFormatSpecifier, m_id); return false; }); } }; namespace base { /// @brief Loggers repository class RegisteredLoggers : public base::utils::Registry { public: explicit RegisteredLoggers(const LogBuilderPtr& defaultLogBuilder) : m_defaultLogBuilder(defaultLogBuilder) { m_defaultConfigurations.setToDefault(); } virtual ~RegisteredLoggers(void) { flushAll(); } inline void setDefaultConfigurations(const Configurations& configurations) { base::threading::ScopedLock scopedLock(lock()); m_defaultConfigurations.setFromBase(const_cast(&configurations)); } inline Configurations* defaultConfigurations(void) { return &m_defaultConfigurations; } Logger* get(const std::string& id, bool forceCreation = true) { base::threading::ScopedLock scopedLock(lock()); Logger* logger_ = base::utils::Registry::get(id); if (logger_ == nullptr && forceCreation) { bool validId = Logger::isValidId(id); if (!validId) { ELPP_ASSERT(validId, "Invalid logger ID [" << id << "]. Not registering this logger."); return nullptr; } logger_ = new Logger(id, m_defaultConfigurations, &m_logStreamsReference); logger_->m_logBuilder = m_defaultLogBuilder; registerNew(id, logger_); } return logger_; } bool remove(const std::string& id) { if (id == "default") { return false; } Logger* logger = base::utils::Registry::get(id); if (logger != nullptr) { unregister(logger); } return true; } inline bool has(const std::string& id) { return get(id, false) != nullptr; } inline void unregister(Logger*& logger) { // NOLINT base::threading::ScopedLock scopedLock(lock()); base::utils::Registry::unregister(logger->id()); } inline base::LogStreamsReferenceMap* logStreamsReference(void) { return &m_logStreamsReference; } inline void flushAll(void) { ELPP_INTERNAL_INFO(1, "Flushing all log files"); base::threading::ScopedLock scopedLock(lock()); for (base::LogStreamsReferenceMap::iterator it = m_logStreamsReference.begin(); it != m_logStreamsReference.end(); ++it) { if (it->second.get() == nullptr) continue; it->second->flush(); } } private: LogBuilderPtr m_defaultLogBuilder; Configurations m_defaultConfigurations; base::LogStreamsReferenceMap m_logStreamsReference; friend class el::base::Storage; }; /// @brief Represents registries for verbose logging class VRegistry : base::NoCopy, public base::threading::ThreadSafe { public: explicit VRegistry(base::type::VerboseLevel level, base::type::EnumType* pFlags) : m_level(level), m_pFlags(pFlags) { } /// @brief Sets verbose level. Accepted range is 0-9 inline void setLevel(base::type::VerboseLevel level) { base::threading::ScopedLock scopedLock(lock()); if (level < 0) m_level = 0; else if (level > 9) m_level = base::consts::kMaxVerboseLevel; else m_level = level; } inline base::type::VerboseLevel level(void) const { return m_level; } void setModules(const char* modules) { base::threading::ScopedLock scopedLock(lock()); auto addSuffix = [](std::stringstream& ss, const char* sfx, const char* prev) { if (prev != nullptr && base::utils::Str::endsWith(ss.str(), prev)) { std::string chr(ss.str().substr(0, ss.str().size() - strlen(prev))); ss.str(""); ss << chr; } if (base::utils::Str::endsWith(ss.str(), sfx)) { std::string chr(ss.str().substr(0, ss.str().size() - strlen(sfx))); ss.str(""); ss << chr; } ss << sfx; }; // NOLINT auto insert = [&](std::stringstream& ss, base::type::VerboseLevel level) { if (!base::utils::hasFlag(LoggingFlag::DisableVModulesExtensions, *m_pFlags)) { addSuffix(ss, ".h", nullptr); m_modules.insert(std::make_pair(ss.str(), level)); addSuffix(ss, ".c", ".h"); m_modules.insert(std::make_pair(ss.str(), level)); addSuffix(ss, ".cpp", ".c"); m_modules.insert(std::make_pair(ss.str(), level)); addSuffix(ss, ".cc", ".cpp"); m_modules.insert(std::make_pair(ss.str(), level)); addSuffix(ss, ".cxx", ".cc"); m_modules.insert(std::make_pair(ss.str(), level)); addSuffix(ss, ".-inl.h", ".cxx"); m_modules.insert(std::make_pair(ss.str(), level)); addSuffix(ss, ".hxx", ".-inl.h"); m_modules.insert(std::make_pair(ss.str(), level)); addSuffix(ss, ".hpp", ".hxx"); m_modules.insert(std::make_pair(ss.str(), level)); addSuffix(ss, ".hh", ".hpp"); } m_modules.insert(std::make_pair(ss.str(), level)); }; // NOLINT bool isMod = true; bool isLevel = false; std::stringstream ss; int level = -1; for (; *modules; ++modules) { switch (*modules) { case '=': isLevel = true; isMod = false; break; case ',': isLevel = false; isMod = true; if (!ss.str().empty() && level != -1) { insert(ss, level); ss.str(""); level = -1; } break; default: if (isMod) { ss << *modules; } else if (isLevel) { if (isdigit(*modules)) { level = static_cast(*modules) - 48; } } break; } } if (!ss.str().empty() && level != -1) { insert(ss, level); } } bool allowed(base::type::VerboseLevel vlevel, const char* file) { base::threading::ScopedLock scopedLock(lock()); if (m_modules.empty() || file == nullptr) { return vlevel <= m_level; } else { std::map::iterator it = m_modules.begin(); for (; it != m_modules.end(); ++it) { if (base::utils::Str::wildCardMatch(file, it->first.c_str())) { return vlevel <= it->second; } } if (base::utils::hasFlag(LoggingFlag::AllowVerboseIfModuleNotSpecified, *m_pFlags)) { return true; } return false; } } inline const std::map& modules(void) const { return m_modules; } void setFromArgs(const base::utils::CommandLineArgs* commandLineArgs) { if (commandLineArgs->hasParam("-v") || commandLineArgs->hasParam("--verbose") || commandLineArgs->hasParam("-V") || commandLineArgs->hasParam("--VERBOSE")) { setLevel(base::consts::kMaxVerboseLevel); } else if (commandLineArgs->hasParamWithValue("--v")) { setLevel(atoi(commandLineArgs->getParamValue("--v"))); } else if (commandLineArgs->hasParamWithValue("--V")) { setLevel(atoi(commandLineArgs->getParamValue("--V"))); } else if ((commandLineArgs->hasParamWithValue("-vmodule")) && (!base::utils::hasFlag(LoggingFlag::DisableVModules, *m_pFlags))) { setModules(commandLineArgs->getParamValue("-vmodule")); } else if (commandLineArgs->hasParamWithValue("-VMODULE") && (!base::utils::hasFlag(LoggingFlag::DisableVModules, *m_pFlags))) { setModules(commandLineArgs->getParamValue("-VMODULE")); } } private: base::type::VerboseLevel m_level; base::type::EnumType* m_pFlags; std::map m_modules; }; } // namespace base class LogMessage { public: LogMessage(Level level, const std::string& file, unsigned long int line, const std::string& func, // NOLINT base::type::VerboseLevel verboseLevel, Logger* logger) : m_level(level), m_file(file), m_line(line), m_func(func), m_verboseLevel(verboseLevel), m_logger(logger), m_message(std::move(logger->stream().str())) { } inline Level level(void) const { return m_level; } inline const std::string& file(void) const { return m_file; } inline unsigned long int line(void) const { return m_line; } // NOLINT inline const std::string& func(void) const { return m_func; } inline base::type::VerboseLevel verboseLevel(void) const { return m_verboseLevel; } inline Logger* logger(void) const { return m_logger; } inline const base::type::string_t& message(void) const { return m_message; } private: Level m_level; std::string m_file; unsigned long int m_line; // NOLINT std::string m_func; base::type::VerboseLevel m_verboseLevel; Logger* m_logger; base::type::string_t m_message; }; namespace base { /// @brief Easylogging++ management storage class Storage : base::NoCopy, public base::threading::ThreadSafe { public: explicit Storage(const LogBuilderPtr& defaultLogBuilder) : m_registeredHitCounters(new base::RegisteredHitCounters()), m_registeredLoggers(new base::RegisteredLoggers(defaultLogBuilder)), m_flags(0x0), m_vRegistry(new base::VRegistry(0, &m_flags)), m_preRollOutCallback(base::defaultPreRollOutCallback) { // Register default logger m_registeredLoggers->get(std::string(base::consts::kDefaultLoggerId)); // Register performance logger and reconfigure format Logger* performanceLogger = m_registeredLoggers->get(std::string(base::consts::kPerformanceLoggerId)); performanceLogger->configurations()->setGlobally(ConfigurationType::Format, "%datetime %level %msg"); performanceLogger->reconfigure(); #if defined(_ELPP_SYSLOG) // Register syslog logger and reconfigure format Logger* sysLogLogger = m_registeredLoggers->get(std::string(base::consts::kSysLogLoggerId)); sysLogLogger->configurations()->setGlobally(ConfigurationType::Format, "%level: %msg"); sysLogLogger->reconfigure(); #else _ELPP_UNUSED(base::consts::kSysLogLoggerId); #endif // defined(_ELPP_SYSLOG) addFlag(LoggingFlag::AllowVerboseIfModuleNotSpecified); installLogDispatchCallback("DefaultLogDispatchCallback"); installPerformanceTrackingCallback("DefaultPerformanceTrackingCallback"); ELPP_INTERNAL_INFO(1, "Easylogging++ has been initialized"); } virtual ~Storage(void) { base::utils::safeDelete(m_registeredHitCounters); base::utils::safeDelete(m_registeredLoggers); base::utils::safeDelete(m_vRegistry); } inline bool validateEveryNCounter(const char* filename, unsigned long int lineNumber, std::size_t occasion) { // NOLINT return hitCounters()->validateEveryN(filename, lineNumber, occasion); } inline bool validateAfterNCounter(const char* filename, unsigned long int lineNumber, std::size_t n) { // NOLINT return hitCounters()->validateAfterN(filename, lineNumber, n); } inline bool validateNTimesCounter(const char* filename, unsigned long int lineNumber, std::size_t n) { // NOLINT return hitCounters()->validateNTimes(filename, lineNumber, n); } inline base::RegisteredHitCounters* hitCounters(void) const { return m_registeredHitCounters; } inline base::RegisteredLoggers* registeredLoggers(void) const { return m_registeredLoggers; } inline base::VRegistry* vRegistry(void) const { return m_vRegistry; } inline const base::utils::CommandLineArgs* commandLineArgs(void) const { return &m_commandLineArgs; } inline void addFlag(LoggingFlag flag) { base::utils::addFlag(flag, &m_flags); } inline void removeFlag(LoggingFlag flag) { base::utils::removeFlag(flag, &m_flags); } inline bool hasFlag(LoggingFlag flag) const { return base::utils::hasFlag(flag, m_flags); } inline base::type::EnumType flags(void) const { return m_flags; } inline void setFlags(unsigned int flags) { m_flags = flags; } inline void setPreRollOutCallback(const PreRollOutCallback& callback) { m_preRollOutCallback = callback; } inline void unsetPreRollOutCallback(void) { m_preRollOutCallback = base::defaultPreRollOutCallback; } inline PreRollOutCallback& preRollOutCallback(void) { return m_preRollOutCallback; } inline bool hasCustomFormatSpecifier(const char* formatSpecifier) { base::threading::ScopedLock scopedLock(lock()); return std::find(m_customFormatSpecifiers.begin(), m_customFormatSpecifiers.end(), formatSpecifier) != m_customFormatSpecifiers.end(); } inline void installCustomFormatSpecifier(const CustomFormatSpecifier& customFormatSpecifier) { if (hasCustomFormatSpecifier(customFormatSpecifier.formatSpecifier())) { return; } base::threading::ScopedLock scopedLock(lock()); m_customFormatSpecifiers.push_back(customFormatSpecifier); } inline bool uninstallCustomFormatSpecifier(const char* formatSpecifier) { base::threading::ScopedLock scopedLock(lock()); std::vector::iterator it = std::find(m_customFormatSpecifiers.begin(), m_customFormatSpecifiers.end(), formatSpecifier); if (it != m_customFormatSpecifiers.end() && strcmp(formatSpecifier, it->formatSpecifier()) == 0) { m_customFormatSpecifiers.erase(it); return true; } return false; } const std::vector* customFormatSpecifiers(void) const { return &m_customFormatSpecifiers; } inline void setLoggingLevel(Level level) { m_loggingLevel = level; } template inline bool installLogDispatchCallback(const std::string& id) { return installCallback(id, &m_logDispatchCallbacks); } template inline void uninstallLogDispatchCallback(const std::string& id) { uninstallCallback(id, &m_logDispatchCallbacks); } template inline T* logDispatchCallback(const std::string& id) { return callback(id, &m_logDispatchCallbacks); } template inline bool installPerformanceTrackingCallback(const std::string& id) { return installCallback(id, &m_performanceTrackingCallbacks); } template inline void uninstallPerformanceTrackingCallback(const std::string& id) { uninstallCallback(id, &m_performanceTrackingCallbacks); } template inline T* performanceTrackingCallback(const std::string& id) { return callback(id, &m_performanceTrackingCallbacks); } private: base::RegisteredHitCounters* m_registeredHitCounters; base::RegisteredLoggers* m_registeredLoggers; base::type::EnumType m_flags; base::VRegistry* m_vRegistry; base::utils::CommandLineArgs m_commandLineArgs; PreRollOutCallback m_preRollOutCallback; std::map m_logDispatchCallbacks; std::map m_performanceTrackingCallbacks; std::vector m_customFormatSpecifiers; Level m_loggingLevel; friend class el::Helpers; friend class el::base::DefaultLogDispatchCallback; friend class el::LogBuilder; friend class el::base::MessageBuilder; friend class el::base::Writer; friend class el::base::PerformanceTracker; friend class el::base::LogDispatcher; void setApplicationArguments(int argc, char** argv) { m_commandLineArgs.setArgs(argc, argv); m_vRegistry->setFromArgs(commandLineArgs()); // default log file #if !defined(_ELPP_DISABLE_LOG_FILE_FROM_ARG) if (m_commandLineArgs.hasParamWithValue(base::consts::kDefaultLogFileParam)) { Configurations c; c.setGlobally(ConfigurationType::Filename, m_commandLineArgs.getParamValue(base::consts::kDefaultLogFileParam)); registeredLoggers()->setDefaultConfigurations(c); for (base::RegisteredLoggers::iterator it = registeredLoggers()->begin(); it != registeredLoggers()->end(); ++it) { it->second->configure(c); } } #endif // !defined(_ELPP_DISABLE_LOG_FILE_FROM_ARG) #if defined(_ELPP_LOGGING_FLAGS_FROM_ARG) if (m_commandLineArgs.hasParamWithValue(base::consts::kLoggingFlagsParam)) { m_flags = atoi(m_commandLineArgs.getParamValue(base::consts::kLoggingFlagsParam)); } #endif // defined(_ELPP_LOGGING_FLAGS_FROM_ARG) } inline void setApplicationArguments(int argc, const char** argv) { setApplicationArguments(argc, const_cast(argv)); } template inline bool installCallback(const std::string& id, std::map* mapT) { if (mapT->find(id) == mapT->end()) { mapT->insert(std::make_pair(id, TPtr(new T()))); return true; } return false; } template inline void uninstallCallback(const std::string& id, std::map* mapT) { mapT->erase(id); } template inline T* callback(const std::string& id, std::map* mapT) { typename std::map::iterator iter = mapT->find(id); if (iter != mapT->end()) { return static_cast(iter->second.get()); } return nullptr; } }; extern _ELPP_EXPORT base::type::StoragePointer elStorage; #define ELPP el::base::elStorage class DefaultLogDispatchCallback : public LogDispatchCallback { protected: void handle(const LogDispatchData* data) { m_data = data; dispatch(std::move(m_data->logMessage()->logger()->logBuilder()->build(m_data->logMessage(), m_data->dispatchAction() == base::DispatchAction::NormalLog))); } private: const LogDispatchData* m_data; void dispatch(base::type::string_t&& logLine) { if (m_data->dispatchAction() == base::DispatchAction::NormalLog) { if (m_data->logMessage()->logger()->m_typedConfigurations->toFile(m_data->logMessage()->level())) { base::type::fstream_t* fs = m_data->logMessage()->logger()->m_typedConfigurations->fileStream(m_data->logMessage()->level()); if (fs != nullptr) { fs->write(logLine.c_str(), logLine.size()); if (fs->fail()) { ELPP_INTERNAL_ERROR("Unable to write log to file [" << m_data->logMessage()->logger()->m_typedConfigurations->filename(m_data->logMessage()->level()) << "].\n" << "Few possible reasons (could be something else):\n" << " * Permission denied\n" << " * Disk full\n" << " * Disk is not writable", true); } else { if (ELPP->hasFlag(LoggingFlag::ImmediateFlush) || (m_data->logMessage()->logger()->isFlushNeeded(m_data->logMessage()->level()))) { m_data->logMessage()->logger()->flush(m_data->logMessage()->level(), fs); } } } else { ELPP_INTERNAL_ERROR("Log file for [" << LevelHelper::convertToString(m_data->logMessage()->level()) << "] " << "has not been configured but [TO_FILE] is configured to TRUE. [Logger ID: " << m_data->logMessage()->logger()->id() << "]", false); } } if (m_data->logMessage()->logger()->m_typedConfigurations->toStandardOutput(m_data->logMessage()->level())) { if (ELPP->hasFlag(LoggingFlag::ColoredTerminalOutput)) m_data->logMessage()->logger()->logBuilder()->convertToColoredOutput(&logLine, m_data->logMessage()->level()); ELPP_COUT << ELPP_COUT_LINE(logLine); } } #if defined(_ELPP_SYSLOG) else if (m_data->dispatchAction() == base::DispatchAction::SysLog) { // Determine syslog priority int sysLogPriority = 0; if (m_data->logMessage()->level() == Level::Fatal) sysLogPriority = LOG_EMERG; else if (m_data->logMessage()->level() == Level::Error) sysLogPriority = LOG_ERR; else if (m_data->logMessage()->level() == Level::Warning) sysLogPriority = LOG_WARNING; else if (m_data->logMessage()->level() == Level::Info) sysLogPriority = LOG_INFO; else if (m_data->logMessage()->level() == Level::Debug) sysLogPriority = LOG_DEBUG; else sysLogPriority = LOG_NOTICE; # if defined(_ELPP_UNICODE) char* line = base::utils::Str::wcharPtrToCharPtr(logLine.c_str()); syslog(sysLogPriority, "%s", line); free(line); # else syslog(sysLogPriority, "%s", logLine.c_str()); # endif } #endif // defined(_ELPP_SYSLOG) } }; } // namespace base namespace base { class DefaultLogBuilder : public LogBuilder { public: base::type::string_t build(const LogMessage* logMessage, bool appendNewLine) const { base::TypedConfigurations* tc = logMessage->logger()->typedConfigurations(); const base::LogFormat* logFormat = &tc->logFormat(logMessage->level()); base::type::string_t logLine = logFormat->format(); char buff[base::consts::kSourceFilenameMaxLength + base::consts::kSourceLineMaxLength] = ""; const char* bufLim = buff + sizeof(buff); if (logFormat->hasFlag(base::FormatFlags::AppName)) { // App name base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kAppNameFormatSpecifier, logMessage->logger()->parentApplicationName()); } if (logFormat->hasFlag(base::FormatFlags::ThreadId)) { // Thread ID base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kThreadIdFormatSpecifier, base::threading::getCurrentThreadId()); } if (logFormat->hasFlag(base::FormatFlags::DateTime)) { // DateTime base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kDateTimeFormatSpecifier, base::utils::DateTime::getDateTime(logFormat->dateTimeFormat().c_str(), &tc->millisecondsWidth(logMessage->level()))); } if (logFormat->hasFlag(base::FormatFlags::Function)) { // Function base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kLogFunctionFormatSpecifier, logMessage->func()); } if (logFormat->hasFlag(base::FormatFlags::File)) { // File char* buf = base::utils::Str::clearBuff(buff, base::consts::kSourceFilenameMaxLength); base::utils::File::buildStrippedFilename(logMessage->file().c_str(), buff); buf = base::utils::Str::addToBuff(buff, buf, bufLim); base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kLogFileFormatSpecifier, buff); } if (logFormat->hasFlag(base::FormatFlags::Line)) { // Line char* buf = base::utils::Str::clearBuff(buff, base::consts::kSourceLineMaxLength); buf = base::utils::Str::convertAndAddToBuff(logMessage->line(), base::consts::kSourceLineMaxLength, buf, bufLim, false); base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kLogLineFormatSpecifier, buff); } if (logFormat->hasFlag(base::FormatFlags::Location)) { // Location char* buf = base::utils::Str::clearBuff(buff, base::consts::kSourceFilenameMaxLength + base::consts::kSourceLineMaxLength); base::utils::File::buildStrippedFilename(logMessage->file().c_str(), buff); buf = base::utils::Str::addToBuff(buff, buf, bufLim); buf = base::utils::Str::addToBuff(":", buf, bufLim); buf = base::utils::Str::convertAndAddToBuff(logMessage->line(), base::consts::kSourceLineMaxLength, buf, bufLim, false); base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kLogLocationFormatSpecifier, buff); } if (logMessage->level() == Level::Verbose && logFormat->hasFlag(base::FormatFlags::VerboseLevel)) { // Verbose level char* buf = base::utils::Str::clearBuff(buff, 1); buf = base::utils::Str::convertAndAddToBuff(logMessage->verboseLevel(), 1, buf, bufLim, false); base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kVerboseLevelFormatSpecifier, buff); } if (logFormat->hasFlag(base::FormatFlags::LogMessage)) { // Log message base::utils::Str::replaceFirstWithEscape(logLine, base::consts::kMessageFormatSpecifier, logMessage->message()); } #if !defined(_ELPP_DISABLE_CUSTOM_FORMAT_SPECIFIERS) for (std::vector::const_iterator it = ELPP->customFormatSpecifiers()->begin(); it != ELPP->customFormatSpecifiers()->end(); ++it) { std::string fs(it->formatSpecifier()); base::type::string_t wcsFormatSpecifier(fs.begin(), fs.end()); base::utils::Str::replaceFirstWithEscape(logLine, wcsFormatSpecifier, it->resolver()()); } #endif // !defined(_ELPP_DISABLE_CUSTOM_FORMAT_SPECIFIERS) if (appendNewLine) logLine += ELPP_LITERAL("\n"); return logLine; } }; /// @brief Dispatches log messages class LogDispatcher : base::NoCopy { public: LogDispatcher(bool proceed, LogMessage&& logMessage, base::DispatchAction dispatchAction) : m_proceed(proceed), m_logMessage(std::move(logMessage)), m_dispatchAction(std::move(dispatchAction)) { } void dispatch(void) { if (m_proceed && m_dispatchAction == base::DispatchAction::None) { m_proceed = false; } if (!m_proceed) { return; } // We minimize the time of ELPP's lock - this lock is released after log is written base::threading::ScopedLock scopedLock(ELPP->lock()); base::TypedConfigurations* tc = m_logMessage.logger()->m_typedConfigurations; if (ELPP->hasFlag(LoggingFlag::StrictLogFileSizeCheck)) { tc->validateFileRolling(m_logMessage.level(), ELPP->preRollOutCallback()); } LogDispatchCallback* callback = nullptr; LogDispatchData data; for (const std::pair& h : ELPP->m_logDispatchCallbacks) { callback = h.second.get(); if (callback != nullptr && callback->enabled()) { data.setLogMessage(&m_logMessage); data.setDispatchAction(m_dispatchAction); callback->acquireLock(); callback->handle(&data); callback->releaseLock(); } } } private: bool m_proceed; LogMessage m_logMessage; base::DispatchAction m_dispatchAction; }; #if defined(_ELPP_STL_LOGGING) /// @brief Workarounds to write some STL logs /// /// @detail There is workaround needed to loop through some stl containers. In order to do that, we need iterable containers /// of same type and provide iterator interface and pass it on to writeIterator(). /// Remember, this is passed by value in constructor so that we dont change original containers. /// This operation is as expensive as Big-O(std::min(class_.size(), base::consts::kMaxLogPerContainer)) namespace workarounds { /// @brief Abstract IterableContainer template that provides interface for iterable classes of type T template class IterableContainer { public: typedef typename Container::iterator iterator; typedef typename Container::const_iterator const_iterator; IterableContainer(void) {} virtual ~IterableContainer(void) {} iterator begin(void) { return getContainer().begin(); } iterator end(void) { return getContainer().end(); } private: virtual Container& getContainer(void) = 0; }; /// @brief Implements IterableContainer and provides iterable std::priority_queue class template, typename Comparator = std::less> class IterablePriorityQueue : public IterableContainer, public std::priority_queue { public: IterablePriorityQueue(std::priority_queue queue_) { std::size_t count_ = 0; while (++count_ < base::consts::kMaxLogPerContainer && !queue_.empty()) { this->push(queue_.top()); queue_.pop(); } } private: inline Container& getContainer(void) { return this->c; } }; /// @brief Implements IterableContainer and provides iterable std::queue class template> class IterableQueue : public IterableContainer, public std::queue { public: IterableQueue(std::queue queue_) { std::size_t count_ = 0; while (++count_ < base::consts::kMaxLogPerContainer && !queue_.empty()) { this->push(queue_.front()); queue_.pop(); } } private: inline Container& getContainer(void) { return this->c; } }; /// @brief Implements IterableContainer and provides iterable std::stack class template> class IterableStack : public IterableContainer, public std::stack { public: IterableStack(std::stack stack_) { std::size_t count_ = 0; while (++count_ < base::consts::kMaxLogPerContainer && !stack_.empty()) { this->push(stack_.top()); stack_.pop(); } } private: inline Container& getContainer(void) { return this->c; } }; } // namespace workarounds #endif // defined(_ELPP_STL_LOGGING) // Log message builder class MessageBuilder { public: MessageBuilder(void) : m_logger(nullptr), m_containerLogSeperator(ELPP_LITERAL("")) {} void initialize(Logger* logger) { m_logger = logger; m_containerLogSeperator = ELPP->hasFlag(LoggingFlag::NewLineForContainer) ? ELPP_LITERAL("\n ") : ELPP_LITERAL(", "); } # define ELPP_SIMPLE_LOG(LOG_TYPE)\ inline MessageBuilder& operator<<(LOG_TYPE msg) {\ m_logger->stream() << msg;\ if (ELPP->hasFlag(LoggingFlag::AutoSpacing)) {\ m_logger->stream() << " ";\ }\ return *this;\ } inline MessageBuilder& operator<<(const std::string& msg) { m_logger->stream() << msg.c_str(); return *this; } ELPP_SIMPLE_LOG(char) ELPP_SIMPLE_LOG(bool) ELPP_SIMPLE_LOG(signed short) // NOLINT ELPP_SIMPLE_LOG(unsigned short) // NOLINT ELPP_SIMPLE_LOG(signed int) ELPP_SIMPLE_LOG(unsigned int) ELPP_SIMPLE_LOG(signed long) ELPP_SIMPLE_LOG(unsigned long) ELPP_SIMPLE_LOG(float) ELPP_SIMPLE_LOG(double) ELPP_SIMPLE_LOG(char*) ELPP_SIMPLE_LOG(const char*) ELPP_SIMPLE_LOG(const void*) ELPP_SIMPLE_LOG(long double) inline MessageBuilder& operator<<(const std::wstring& msg) { return operator<<(msg.c_str()); } inline MessageBuilder& operator<<(const wchar_t* msg) { if (msg == nullptr) { m_logger->stream() << base::consts::kNullPointer; return *this; } # if defined(_ELPP_UNICODE) m_logger->stream() << msg; # else char* buff_ = base::utils::Str::wcharPtrToCharPtr(msg); m_logger->stream() << buff_; free(buff_); # endif return *this; } // ostream manipulators inline MessageBuilder& operator<<(std::ostream& (*OStreamMani)(std::ostream&)) { m_logger->stream() << OStreamMani; return *this; } #define ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(temp) \ template \ inline MessageBuilder& operator<<(const temp& template_inst) { \ return writeIterator(template_inst.begin(), template_inst.end(), template_inst.size()); \ } #define ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG(temp) \ template \ inline MessageBuilder& operator<<(const temp& template_inst) { \ return writeIterator(template_inst.begin(), template_inst.end(), template_inst.size()); \ } #define ELPP_ITERATOR_CONTAINER_LOG_THREE_ARG(temp) \ template \ inline MessageBuilder& operator<<(const temp& template_inst) { \ return writeIterator(template_inst.begin(), template_inst.end(), template_inst.size()); \ } #define ELPP_ITERATOR_CONTAINER_LOG_FOUR_ARG(temp) \ template \ inline MessageBuilder& operator<<(const temp& template_inst) { \ return writeIterator(template_inst.begin(), template_inst.end(), template_inst.size()); \ } #define ELPP_ITERATOR_CONTAINER_LOG_FIVE_ARG(temp) \ template \ inline MessageBuilder& operator<<(const temp& template_inst) { \ return writeIterator(template_inst.begin(), template_inst.end(), template_inst.size()); \ } #if defined(_ELPP_STL_LOGGING) ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG(std::vector) ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG(std::list) ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG(std::deque) ELPP_ITERATOR_CONTAINER_LOG_THREE_ARG(std::set) ELPP_ITERATOR_CONTAINER_LOG_THREE_ARG(std::multiset) ELPP_ITERATOR_CONTAINER_LOG_FOUR_ARG(std::map) ELPP_ITERATOR_CONTAINER_LOG_FOUR_ARG(std::multimap) template inline MessageBuilder& operator<<(const std::queue& queue_) { base::workarounds::IterableQueue iterableQueue_ = static_cast >(queue_); return writeIterator(iterableQueue_.begin(), iterableQueue_.end(), iterableQueue_.size()); } template inline MessageBuilder& operator<<(const std::stack& stack_) { base::workarounds::IterableStack iterableStack_ = static_cast >(stack_); return writeIterator(iterableStack_.begin(), iterableStack_.end(), iterableStack_.size()); } template inline MessageBuilder& operator<<(const std::priority_queue& priorityQueue_) { base::workarounds::IterablePriorityQueue iterablePriorityQueue_ = static_cast >(priorityQueue_); return writeIterator(iterablePriorityQueue_.begin(), iterablePriorityQueue_.end(), iterablePriorityQueue_.size()); } template inline MessageBuilder& operator<<(const std::pair& pair_) { m_logger->stream() << ELPP_LITERAL("("); operator << (static_cast(pair_.first)); m_logger->stream() << ELPP_LITERAL(", "); operator << (static_cast(pair_.second)); m_logger->stream() << ELPP_LITERAL(")"); return *this; } template inline MessageBuilder& operator<<(const std::bitset& bitset_) { m_logger->stream() << ELPP_LITERAL("["); operator << (bitset_.to_string()); m_logger->stream() << ELPP_LITERAL("]"); return *this; } # if defined(_ELPP_LOG_STD_ARRAY) template inline MessageBuilder& operator<<(const std::array& array) { return writeIterator(array.begin(), array.end(), array.size()); } # endif // defined(_ELPP_LOG_STD_ARRAY) # if defined(_ELPP_LOG_UNORDERED_MAP) ELPP_ITERATOR_CONTAINER_LOG_FIVE_ARG(std::unordered_map) ELPP_ITERATOR_CONTAINER_LOG_FIVE_ARG(std::unordered_multimap) # endif // defined(_ELPP_LOG_UNORDERED_MAP) # if defined(_ELPP_LOG_UNORDERED_SET) ELPP_ITERATOR_CONTAINER_LOG_FOUR_ARG(std::unordered_set) ELPP_ITERATOR_CONTAINER_LOG_FOUR_ARG(std::unordered_multiset) # endif // defined(_ELPP_LOG_UNORDERED_SET) #endif // defined(_ELPP_STL_LOGGING) #if defined(_ELPP_QT_LOGGING) inline MessageBuilder& operator<<(const QString& msg) { # if defined(_ELPP_UNICODE) m_logger->stream() << msg.toStdWString(); # else m_logger->stream() << msg.toStdString(); # endif // defined(_ELPP_UNICODE) return *this; } inline MessageBuilder& operator<<(const QByteArray& msg) { return operator << (QString(msg)); } inline MessageBuilder& operator<<(const QStringRef& msg) { return operator<<(msg.toString()); } inline MessageBuilder& operator<<(qint64 msg) { # if defined(_ELPP_UNICODE) m_logger->stream() << QString::number(msg).toStdWString(); # else m_logger->stream() << QString::number(msg).toStdString(); # endif // defined(_ELPP_UNICODE) return *this; } inline MessageBuilder& operator<<(quint64 msg) { # if defined(_ELPP_UNICODE) m_logger->stream() << QString::number(msg).toStdWString(); # else m_logger->stream() << QString::number(msg).toStdString(); # endif // defined(_ELPP_UNICODE) return *this; } inline MessageBuilder& operator<<(QChar msg) { m_logger->stream() << msg.toLatin1(); return *this; } inline MessageBuilder& operator<<(const QLatin1String& msg) { m_logger->stream() << msg.latin1(); return *this; } ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QList) ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QVector) ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QQueue) ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QSet) ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QLinkedList) ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(QStack) template inline MessageBuilder& operator<<(const QPair& pair_) { m_logger->stream() << ELPP_LITERAL("("); operator << (static_cast(pair_.first)); m_logger->stream() << ELPP_LITERAL(", "); operator << (static_cast(pair_.second)); m_logger->stream() << ELPP_LITERAL(")"); return *this; } template inline MessageBuilder& operator<<(const QMap& map_) { m_logger->stream() << ELPP_LITERAL("["); QList keys = map_.keys(); typename QList::const_iterator begin = keys.begin(); typename QList::const_iterator end = keys.end(); int max_ = static_cast(base::consts::kMaxLogPerContainer); // to prevent warning for (int index_ = 0; begin != end && index_ < max_; ++index_, ++begin) { m_logger->stream() << ELPP_LITERAL("("); operator << (static_cast(*begin)); m_logger->stream() << ELPP_LITERAL(", "); operator << (static_cast(map_.value(*begin))); m_logger->stream() << ELPP_LITERAL(")"); m_logger->stream() << ((index_ < keys.size() -1) ? m_containerLogSeperator : ELPP_LITERAL("")); } if (begin != end) { m_logger->stream() << ELPP_LITERAL("..."); } m_logger->stream() << ELPP_LITERAL("]"); return *this; } template inline MessageBuilder& operator<<(const QMultiMap& map_) { operator << (static_cast>(map_)); return *this; } template inline MessageBuilder& operator<<(const QHash& hash_) { m_logger->stream() << ELPP_LITERAL("["); QList keys = hash_.keys(); typename QList::const_iterator begin = keys.begin(); typename QList::const_iterator end = keys.end(); int max_ = static_cast(base::consts::kMaxLogPerContainer); // prevent type warning for (int index_ = 0; begin != end && index_ < max_; ++index_, ++begin) { m_logger->stream() << ELPP_LITERAL("("); operator << (static_cast(*begin)); m_logger->stream() << ELPP_LITERAL(", "); operator << (static_cast(hash_.value(*begin))); m_logger->stream() << ELPP_LITERAL(")"); m_logger->stream() << ((index_ < keys.size() -1) ? m_containerLogSeperator : ELPP_LITERAL("")); } if (begin != end) { m_logger->stream() << ELPP_LITERAL("..."); } m_logger->stream() << ELPP_LITERAL("]"); return *this; } template inline MessageBuilder& operator<<(const QMultiHash& multiHash_) { operator << (static_cast>(multiHash_)); return *this; } #endif // defined(_ELPP_QT_LOGGING) #if defined(_ELPP_BOOST_LOGGING) ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG(boost::container::vector) ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG(boost::container::stable_vector) ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG(boost::container::list) ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG(boost::container::deque) ELPP_ITERATOR_CONTAINER_LOG_FOUR_ARG(boost::container::map) ELPP_ITERATOR_CONTAINER_LOG_FOUR_ARG(boost::container::flat_map) ELPP_ITERATOR_CONTAINER_LOG_THREE_ARG(boost::container::set) ELPP_ITERATOR_CONTAINER_LOG_THREE_ARG(boost::container::flat_set) #endif // defined(_ELPP_BOOST_LOGGING) /// @brief Macro used internally that can be used externally to make containers easylogging++ friendly /// /// @detail This macro expands to write an ostream& operator<< for container. This container is expected to /// have begin() and end() methods that return respective iterators /// @param ContainerType Type of container e.g, MyList from WX_DECLARE_LIST(int, MyList); in wxwidgets /// @param SizeMethod Method used to get size of container. /// @param ElementInstance Instance of element to be fed out. Insance name is "elem". See WX_ELPP_ENABLED macro /// for an example usage #define MAKE_CONTAINER_ELPP_FRIENDLY(ContainerType, SizeMethod, ElementInstance) \ el::base::type::ostream_t& operator<<(el::base::type::ostream_t& ss, const ContainerType& container) {\ const el::base::type::char_t* sep = ELPP->hasFlag(el::LoggingFlag::NewLineForContainer) ? \ ELPP_LITERAL("\n ") : ELPP_LITERAL(", ");\ ContainerType::const_iterator elem = container.begin();\ ContainerType::const_iterator endElem = container.end();\ std::size_t size_ = container.SizeMethod; \ ss << ELPP_LITERAL("[");\ for (std::size_t i = 0; elem != endElem && i < el::base::consts::kMaxLogPerContainer; ++i, ++elem) { \ ss << ElementInstance;\ ss << ((i < size_ - 1) ? sep : ELPP_LITERAL(""));\ }\ if (elem != endElem) {\ ss << ELPP_LITERAL("...");\ }\ ss << ELPP_LITERAL("]");\ return ss;\ } #if defined(_ELPP_WXWIDGETS_LOGGING) ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG(wxVector) # define ELPP_WX_PTR_ENABLED(ContainerType) MAKE_CONTAINER_ELPP_FRIENDLY(ContainerType, size(), *(*elem)) # define ELPP_WX_ENABLED(ContainerType) MAKE_CONTAINER_ELPP_FRIENDLY(ContainerType, size(), (*elem)) # define ELPP_WX_HASH_MAP_ENABLED(ContainerType) MAKE_CONTAINER_ELPP_FRIENDLY(ContainerType, size(), \ ELPP_LITERAL("(") << elem->first << ELPP_LITERAL(", ") << elem->second << ELPP_LITERAL(")") #else # define ELPP_WX_PTR_ENABLED(ContainerType) # define ELPP_WX_ENABLED(ContainerType) # define ELPP_WX_HASH_MAP_ENABLED(ContainerType) #endif // defined(_ELPP_WXWIDGETS_LOGGING) // Other classes template ELPP_SIMPLE_LOG(const Class&) #undef ELPP_SIMPLE_LOG #undef ELPP_ITERATOR_CONTAINER_LOG_ONE_ARG #undef ELPP_ITERATOR_CONTAINER_LOG_TWO_ARG #undef ELPP_ITERATOR_CONTAINER_LOG_THREE_ARG #undef ELPP_ITERATOR_CONTAINER_LOG_FOUR_ARG #undef ELPP_ITERATOR_CONTAINER_LOG_FIVE_ARG private: Logger* m_logger; const base::type::char_t* m_containerLogSeperator; template inline MessageBuilder& writeIterator(Iterator begin_, Iterator end_, std::size_t size_) { m_logger->stream() << ELPP_LITERAL("["); for (std::size_t i = 0; begin_ != end_ && i < base::consts::kMaxLogPerContainer; ++i, ++begin_) { operator << (*begin_); m_logger->stream() << ((i < size_ - 1) ? m_containerLogSeperator : ELPP_LITERAL("")); } if (begin_ != end_) { m_logger->stream() << ELPP_LITERAL("..."); } m_logger->stream() << ELPP_LITERAL("]"); return *this; } }; /// @brief Writes nothing - Used when certain log is disabled class NullWriter : base::NoCopy { public: NullWriter(void) {} // Null manipulator inline NullWriter& operator<<(std::ostream& (*)(std::ostream&)) { return *this; } template inline NullWriter& operator<<(const T&) { return *this; } }; /// @brief Main entry point of each logging class Writer : base::NoCopy { public: Writer(Level level, const char* file, unsigned long int line, // NOLINT const char* func, base::DispatchAction dispatchAction = base::DispatchAction::NormalLog, base::type::VerboseLevel verboseLevel = 0) : m_level(level), m_file(file), m_line(line), m_func(func), m_verboseLevel(verboseLevel), m_proceed(false), m_dispatchAction(dispatchAction) { } virtual ~Writer(void) { processDispatch(); } template inline Writer& operator<<(const T& log) { #if _ELPP_LOGGING_ENABLED if (m_proceed) { m_messageBuilder << log; } #endif // _ELPP_LOGGING_ENABLED return *this; } inline Writer& operator<<(std::ostream& (*log)(std::ostream&)) { #if _ELPP_LOGGING_ENABLED if (m_proceed) { m_messageBuilder << log; } #endif // _ELPP_LOGGING_ENABLED return *this; } Writer& construct(Logger* logger, bool needLock = true) { m_logger = logger; initializeLogger(logger->id(), false, needLock); m_messageBuilder.initialize(m_logger); return *this; } Writer& construct(int count, const char* loggerIds, ...) { if (ELPP->hasFlag(LoggingFlag::MultiLoggerSupport)) { va_list loggersList; va_start(loggersList, loggerIds); const char* id = loggerIds; for (int i = 0; i < count; ++i) { m_loggerIds.push_back(std::string(id)); id = va_arg(loggersList, const char*); } va_end(loggersList); initializeLogger(m_loggerIds.at(0)); } else { initializeLogger(loggerIds); } m_messageBuilder.initialize(m_logger); return *this; } protected: Level m_level; const char* m_file; const unsigned long int m_line; // NOLINT const char* m_func; base::type::VerboseLevel m_verboseLevel; Logger* m_logger; bool m_proceed; base::MessageBuilder m_messageBuilder; base::DispatchAction m_dispatchAction; std::vector m_loggerIds; friend class el::Helpers; void initializeLogger(const std::string& loggerId, bool lookup = true, bool needLock = true) { if (lookup) { m_logger = ELPP->registeredLoggers()->get(loggerId, ELPP->hasFlag(LoggingFlag::CreateLoggerAutomatically)); } if (m_logger == nullptr) { ELPP->acquireLock(); if (!ELPP->registeredLoggers()->has(std::string(base::consts::kDefaultLoggerId))) { // Somehow default logger has been unregistered. Not good! Register again ELPP->registeredLoggers()->get(std::string(base::consts::kDefaultLoggerId)); } ELPP->releaseLock(); // Need to unlock it for next writer Writer(Level::Debug, m_file, m_line, m_func).construct(1, base::consts::kDefaultLoggerId) << "Logger [" << loggerId << "] is not registered yet!"; m_proceed = false; } else { if (needLock) { m_logger->acquireLock(); // This should not be unlocked by checking m_proceed because // m_proceed can be changed by lines below } if (ELPP->hasFlag(LoggingFlag::HierarchicalLogging)) { m_proceed = m_level == Level::Verbose ? m_logger->enabled(m_level) : LevelHelper::castToInt(m_level) >= LevelHelper::castToInt(ELPP->m_loggingLevel); } else { m_proceed = m_logger->enabled(m_level); } } } void processDispatch() { #if _ELPP_LOGGING_ENABLED if (ELPP->hasFlag(LoggingFlag::MultiLoggerSupport)) { bool firstDispatched = false; base::type::string_t logMessage; std::size_t i = 0; do { if (m_proceed) { if (firstDispatched) { m_logger->stream() << logMessage; } else { firstDispatched = true; if (m_loggerIds.size() > 1) { logMessage = m_logger->stream().str(); } } triggerDispatch(); } else if (m_logger != nullptr) { m_logger->stream().str(ELPP_LITERAL("")); m_logger->releaseLock(); } if (i + 1 < m_loggerIds.size()) { initializeLogger(m_loggerIds.at(i + 1)); } } while (++i < m_loggerIds.size()); } else { if (m_proceed) { triggerDispatch(); } else if (m_logger != nullptr) { m_logger->stream().str(ELPP_LITERAL("")); m_logger->releaseLock(); } } #else if (m_logger != nullptr) { m_logger->stream().str(ELPP_LITERAL("")); m_logger->releaseLock(); } #endif // _ELPP_LOGGING_ENABLED } void triggerDispatch(void) { if (m_proceed) { base::LogDispatcher(m_proceed, LogMessage(m_level, m_file, m_line, m_func, m_verboseLevel, m_logger), m_dispatchAction).dispatch(); } if (m_logger != nullptr) { m_logger->stream().str(ELPP_LITERAL("")); m_logger->releaseLock(); } if (m_proceed && m_level == Level::Fatal && !ELPP->hasFlag(LoggingFlag::DisableApplicationAbortOnFatalLog)) { base::Writer(Level::Warning, m_file, m_line, m_func).construct(1, base::consts::kDefaultLoggerId) << "Aborting application. Reason: Fatal log at [" << m_file << ":" << m_line << "]"; std::stringstream reasonStream; reasonStream << "Fatal log at [" << m_file << ":" << m_line << "]" << " If you wish to disable 'abort on fatal log' please use " << "el::Helpers::addFlag(el::LoggingFlag::DisableApplicationAbortOnFatalLog)"; base::utils::abort(1, reasonStream.str()); } m_proceed = false; } }; class PErrorWriter : public base::Writer { public: PErrorWriter(Level level, const char* file, unsigned long int line, // NOLINT const char* func, base::DispatchAction dispatchAction = base::DispatchAction::NormalLog, base::type::VerboseLevel verboseLevel = 0) : base::Writer(level, file, line, func, dispatchAction, verboseLevel) { } virtual ~PErrorWriter(void) { if (m_proceed) { #if _ELPP_COMPILER_MSVC char buff[256]; strerror_s(buff, 256, errno); m_logger->stream() << ": " << buff << " [" << errno << "]"; #else m_logger->stream() << ": " << strerror(errno) << " [" << errno << "]"; #endif } } }; } // namespace base // Logging from Logger class. Why this is here? Because we have Storage and Writer class available #if _ELPP_VARIADIC_TEMPLATES_SUPPORTED template void Logger::log_(Level level, int vlevel, const char* s, const T& value, const Args&... args) { base::MessageBuilder b; b.initialize(this); while (*s) { if (*s == base::consts::kFormatSpecifierChar) { if (*(s + 1) == base::consts::kFormatSpecifierChar) { ++s; } else { if (*(s + 1) == base::consts::kFormatSpecifierCharValue) { ++s; b << value; log_(level, vlevel, ++s, args...); return; } } } b << *s++; } ELPP_INTERNAL_ERROR("Too many arguments provided. Unable to handle. Please provide more format specifiers", false); } template inline void Logger::log_(Level level, int vlevel, const T& log) { if (level == Level::Verbose) { if (ELPP->vRegistry()->allowed(vlevel, __FILE__)) { base::Writer(Level::Verbose, "FILE", 0, "FUNCTION", base::DispatchAction::NormalLog, vlevel).construct(this, false) << log; } else { stream().str(ELPP_LITERAL("")); } } else { base::Writer(level, "FILE", 0, "FUNCTION").construct(this, false) << log; } } template void Logger::log(Level level, const char* s, const T& value, const Args&... args) { base::threading::ScopedLock scopedLock(lock()); log_(level, 0, s, value, args...); } template inline void Logger::log(Level level, const T& log) { base::threading::ScopedLock scopedLock(lock()); log_(level, 0, log); } # if _ELPP_VERBOSE_LOG template inline void Logger::verbose(int vlevel, const char* s, const T& value, const Args&... args) { base::threading::ScopedLock scopedLock(lock()); log_(el::Level::Verbose, vlevel, s, value, args...); } template inline void Logger::verbose(int vlevel, const T& log) { base::threading::ScopedLock scopedLock(lock()); log_(el::Level::Verbose, vlevel, log); } # else template inline void Logger::verbose(int, const char*, const T&, const Args&...) { return; } template inline void Logger::verbose(int, const T&) { return; } # endif // _ELPP_VERBOSE_LOG # define LOGGER_LEVEL_WRITERS(FUNCTION_NAME, LOG_LEVEL)\ template \ inline void Logger::FUNCTION_NAME(const char* s, const T& value, const Args&... args) {\ log(LOG_LEVEL, s, value, args...);\ }\ template \ inline void Logger::FUNCTION_NAME(const T& value) {\ log(LOG_LEVEL, value);\ } # define LOGGER_LEVEL_WRITERS_DISABLED(FUNCTION_NAME, LOG_LEVEL)\ template \ inline void Logger::FUNCTION_NAME(const char*, const T&, const Args&...) {\ return;\ }\ template \ inline void Logger::FUNCTION_NAME(const T&) {\ return;\ } # if _ELPP_INFO_LOG LOGGER_LEVEL_WRITERS(info, Level::Info) # else LOGGER_LEVEL_WRITERS_DISABLED(info, Level::Info) # endif // _ELPP_INFO_LOG # if _ELPP_DEBUG_LOG LOGGER_LEVEL_WRITERS(debug, Level::Debug) # else LOGGER_LEVEL_WRITERS_DISABLED(debug, Level::Debug) # endif // _ELPP_DEBUG_LOG # if _ELPP_WARNING_LOG LOGGER_LEVEL_WRITERS(warn, Level::Warning) # else LOGGER_LEVEL_WRITERS_DISABLED(warn, Level::Warning) # endif // _ELPP_WARNING_LOG # if _ELPP_ERROR_LOG LOGGER_LEVEL_WRITERS(error, Level::Error) # else LOGGER_LEVEL_WRITERS_DISABLED(error, Level::Error) # endif // _ELPP_ERROR_LOG # if _ELPP_FATAL_LOG LOGGER_LEVEL_WRITERS(fatal, Level::Fatal) # else LOGGER_LEVEL_WRITERS_DISABLED(fatal, Level::Fatal) # endif // _ELPP_FATAL_LOG # if _ELPP_TRACE_LOG LOGGER_LEVEL_WRITERS(trace, Level::Trace) # else LOGGER_LEVEL_WRITERS_DISABLED(trace, Level::Trace) # endif // _ELPP_TRACE_LOG # undef LOGGER_LEVEL_WRITERS # undef LOGGER_LEVEL_WRITERS_DISABLED #endif // _ELPP_VARIADIC_TEMPLATES_SUPPORTED #if _ELPP_COMPILER_MSVC # define ELPP_VARIADIC_FUNC_MSVC(variadicFunction, variadicArgs) variadicFunction variadicArgs # define ELPP_VARIADIC_FUNC_MSVC_RUN(variadicFunction, ...) ELPP_VARIADIC_FUNC_MSVC(variadicFunction, (__VA_ARGS__)) # define el_getVALength(...) ELPP_VARIADIC_FUNC_MSVC_RUN(el_resolveVALength, 0, ## __VA_ARGS__,\ 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) #else # if _ELPP_COMPILER_CLANG # define el_getVALength(...) el_resolveVALength(0, __VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) # else # define el_getVALength(...) el_resolveVALength(0, ## __VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) # endif // _ELPP_COMPILER_CLANG #endif // _ELPP_COMPILER_MSVC #define el_resolveVALength(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N #define _ELPP_WRITE_LOG(writer, level, dispatchAction, ...) \ writer(level, __FILE__, __LINE__, _ELPP_FUNC, dispatchAction).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__) #define _ELPP_WRITE_LOG_IF(writer, condition, level, dispatchAction, ...) if (condition) \ writer(level, __FILE__, __LINE__, _ELPP_FUNC, dispatchAction).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__) #define _ELPP_WRITE_LOG_EVERY_N(writer, occasion, level, dispatchAction, ...) \ if (ELPP->validateEveryNCounter(__FILE__, __LINE__, occasion)) \ writer(level, __FILE__, __LINE__, _ELPP_FUNC, dispatchAction).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__) #define _ELPP_WRITE_LOG_AFTER_N(writer, n, level, dispatchAction, ...) \ if (ELPP->validateAfterNCounter(__FILE__, __LINE__, n)) \ writer(level, __FILE__, __LINE__, _ELPP_FUNC, dispatchAction).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__) #define _ELPP_WRITE_LOG_N_TIMES(writer, n, level, dispatchAction, ...) \ if (ELPP->validateNTimesCounter(__FILE__, __LINE__, n)) \ writer(level, __FILE__, __LINE__, _ELPP_FUNC, dispatchAction).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__) #undef _CURRENT_FILE_PERFORMANCE_LOGGER_ID #if defined(_PERFORMANCE_LOGGER) # define _CURRENT_FILE_PERFORMANCE_LOGGER_ID _PERFORMANCE_LOGGER #else # define _CURRENT_FILE_PERFORMANCE_LOGGER_ID el::base::consts::kPerformanceLoggerId #endif class PerformanceTrackingData { public: enum class DataType : base::type::EnumType { Checkpoint = 1, Complete = 2 }; // Do not use constructor, will run into multiple definition error, use init(PerformanceTracker*) explicit PerformanceTrackingData(DataType dataType) : m_performanceTracker(nullptr), m_dataType(dataType) {} inline const std::string* blockName(void) const; inline const struct timeval* startTime(void) const; inline const struct timeval* endTime(void) const; inline const struct timeval* lastCheckpointTime(void) const; inline const base::PerformanceTracker* performanceTracker(void) const { return m_performanceTracker; } inline PerformanceTrackingData::DataType dataType(void) const { return m_dataType; } inline bool firstCheckpoint(void) const { return m_firstCheckpoint; } inline std::string checkpointId(void) const { return m_checkpointId; } inline const char* file(void) const { return m_file; } inline unsigned long int line(void) const { return m_line; } inline const char* func(void) const { return m_func; } inline const base::type::string_t* formattedTimeTaken() const { return &m_formattedTimeTaken; } inline const std::string& loggerId(void) const; private: base::PerformanceTracker* m_performanceTracker; base::type::string_t m_formattedTimeTaken; PerformanceTrackingData::DataType m_dataType; bool m_firstCheckpoint; std::string m_checkpointId; const char* m_file; unsigned long int m_line; const char* m_func; inline void init(base::PerformanceTracker* performanceTracker, bool firstCheckpoint = false) { m_performanceTracker = performanceTracker; m_firstCheckpoint = firstCheckpoint; } friend class el::base::PerformanceTracker; }; namespace base { /// @brief Represents performanceTracker block of code that conditionally adds performance status to log /// either when goes outside the scope of when checkpoint() is called class PerformanceTracker : public base::threading::ThreadSafe, public Loggable { public: PerformanceTracker(const std::string& blockName, base::TimestampUnit timestampUnit = base::TimestampUnit::Millisecond, const std::string& loggerId = _CURRENT_FILE_PERFORMANCE_LOGGER_ID, bool scopedLog = true, Level level = base::consts::kPerformanceTrackerDefaultLevel) : m_blockName(blockName), m_timestampUnit(timestampUnit), m_loggerId(loggerId), m_scopedLog(scopedLog), m_level(level), m_hasChecked(false), m_lastCheckpointId(std::string()), m_enabled(false) { #if !defined(_ELPP_DISABLE_PERFORMANCE_TRACKING) && _ELPP_LOGGING_ENABLED // We store it locally so that if user happen to change configuration by the end of scope // or before calling checkpoint, we still depend on state of configuraton at time of construction el::Logger* loggerPtr = ELPP->registeredLoggers()->get(loggerId, false); m_enabled = loggerPtr != nullptr && loggerPtr->m_typedConfigurations->performanceTracking(m_level); if (m_enabled) { base::utils::DateTime::gettimeofday(&m_startTime); } #endif // !defined(_ELPP_DISABLE_PERFORMANCE_TRACKING) && _ELPP_LOGGING_ENABLED } /// @brief Copy constructor PerformanceTracker(const PerformanceTracker& t) : m_blockName(t.m_blockName), m_timestampUnit(t.m_timestampUnit), m_loggerId(t.m_loggerId), m_scopedLog(t.m_scopedLog), m_level(t.m_level), m_hasChecked(t.m_hasChecked), m_lastCheckpointId(t.m_lastCheckpointId), m_enabled(t.m_enabled), m_startTime(t.m_startTime), m_endTime(t.m_endTime), m_lastCheckpointTime(t.m_lastCheckpointTime) { } virtual ~PerformanceTracker(void) { #if !defined(_ELPP_DISABLE_PERFORMANCE_TRACKING) && _ELPP_LOGGING_ENABLED if (m_enabled) { base::threading::ScopedLock scopedLock(lock()); if (m_scopedLog) { base::utils::DateTime::gettimeofday(&m_endTime); base::type::string_t formattedTime = getFormattedTimeTaken(); PerformanceTrackingData data(PerformanceTrackingData::DataType::Complete); data.init(this); data.m_formattedTimeTaken = formattedTime; PerformanceTrackingCallback* callback = nullptr; for (const std::pair& h : ELPP->m_performanceTrackingCallbacks) { callback = h.second.get(); if (callback != nullptr && callback->enabled()) { callback->acquireLock(); callback->handle(&data); callback->releaseLock(); } } } } #endif // !defined(_ELPP_DISABLE_PERFORMANCE_TRACKING) } /// @brief A checkpoint for current performanceTracker block. void checkpoint(const std::string& id = std::string(), const char* file = __FILE__, unsigned long int line = __LINE__, const char* func = "") { // NOLINT #if !defined(_ELPP_DISABLE_PERFORMANCE_TRACKING) && _ELPP_LOGGING_ENABLED if (m_enabled) { base::threading::ScopedLock scopedLock(lock()); base::utils::DateTime::gettimeofday(&m_endTime); base::type::string_t formattedTime = m_hasChecked ? base::utils::DateTime::formatTime( base::utils::DateTime::getTimeDifference(m_endTime, m_lastCheckpointTime, m_timestampUnit), m_timestampUnit) : ELPP_LITERAL(""); PerformanceTrackingData data(PerformanceTrackingData::DataType::Checkpoint); data.init(this); data.m_checkpointId = id; data.m_file = file; data.m_line = line; data.m_func = func; data.m_formattedTimeTaken = formattedTime; PerformanceTrackingCallback* callback = nullptr; for (const std::pair& h : ELPP->m_performanceTrackingCallbacks) { callback = h.second.get(); if (callback != nullptr && callback->enabled()) { callback->acquireLock(); callback->handle(&data); callback->releaseLock(); } } base::utils::DateTime::gettimeofday(&m_lastCheckpointTime); m_hasChecked = true; m_lastCheckpointId = id; } #endif // !defined(_ELPP_DISABLE_PERFORMANCE_TRACKING) && _ELPP_LOGGING_ENABLED _ELPP_UNUSED(id); _ELPP_UNUSED(file); _ELPP_UNUSED(line); _ELPP_UNUSED(func); } inline Level level(void) const { return m_level; } private: std::string m_blockName; base::TimestampUnit m_timestampUnit; std::string m_loggerId; bool m_scopedLog; Level m_level; bool m_hasChecked; std::string m_lastCheckpointId; bool m_enabled; struct timeval m_startTime, m_endTime, m_lastCheckpointTime; PerformanceTracker(void); friend class el::PerformanceTrackingData; friend class base::DefaultPerformanceTrackingCallback; const base::type::string_t getFormattedTimeTaken() const { return base::utils::DateTime::formatTime(base::utils::DateTime::getTimeDifference(m_endTime, m_startTime, m_timestampUnit), m_timestampUnit); } virtual inline void log(el::base::type::ostream_t& os) const { os << getFormattedTimeTaken(); } }; class DefaultPerformanceTrackingCallback : public PerformanceTrackingCallback { protected: void handle(const PerformanceTrackingData* data) { m_data = data; if (data->dataType() == PerformanceTrackingData::DataType::Complete) { _ELPP_WRITE_LOG(el::base::Writer, m_data->performanceTracker()->level(), base::DispatchAction::NormalLog, data->loggerId().c_str()) << "Executed [" << *m_data->blockName() << "] in [" << *m_data->formattedTimeTaken() << "]"; } else { base::type::stringstream_t ss; ss << ELPP_LITERAL("Performance checkpoint"); if (!m_data->checkpointId().empty()) { ss << ELPP_LITERAL(" [") << m_data->checkpointId().c_str() << ELPP_LITERAL("]"); } ss << ELPP_LITERAL(" for block [") << m_data->blockName()->c_str() << ELPP_LITERAL("] : [") << *data->performanceTracker(); if (!ELPP->hasFlag(LoggingFlag::DisablePerformanceTrackingCheckpointComparison) && data->performanceTracker()->m_hasChecked) { ss << ELPP_LITERAL(" ([") << *m_data->formattedTimeTaken() << ELPP_LITERAL("] from "); if (data->performanceTracker()->m_lastCheckpointId.empty()) { ss << ELPP_LITERAL("last checkpoint"); } else { ss << ELPP_LITERAL("checkpoint '") << data->performanceTracker()->m_lastCheckpointId.c_str() << ELPP_LITERAL("'"); } ss << ELPP_LITERAL(")]"); } else { ss << ELPP_LITERAL("]"); } el::base::Writer(data->performanceTracker()->m_level, data->file(), data->line(), data->func()).construct(1, data->loggerId().c_str()) << ss.str(); } } private: const PerformanceTrackingData* m_data; }; } // namespace base inline const std::string* PerformanceTrackingData::blockName() const { return const_cast(&m_performanceTracker->m_blockName); } inline const struct timeval* PerformanceTrackingData::startTime() const { return const_cast(&m_performanceTracker->m_startTime); } inline const struct timeval* PerformanceTrackingData::endTime() const { return const_cast(&m_performanceTracker->m_endTime); } inline const struct timeval* PerformanceTrackingData::lastCheckpointTime() const { return const_cast(&m_performanceTracker->m_lastCheckpointTime); } inline const std::string& PerformanceTrackingData::loggerId(void) const { return m_performanceTracker->m_loggerId; } namespace base { /// @brief Contains some internal debugging tools like crash handler and stack tracer namespace debug { class StackTrace : base::NoCopy { public: static const std::size_t kMaxStack = 64; static const std::size_t kStackStart = 2; // We want to skip c'tor and StackTrace::generateNew() class StackTraceEntry { public: StackTraceEntry(std::size_t index, const char* loc, const char* demang, const char* hex, const char* addr) { m_index = index; m_location = std::string(loc); m_demangled = std::string(demang); m_hex = std::string(hex); m_addr = std::string(addr); } StackTraceEntry(std::size_t index, char* loc) { m_index = index; m_location = std::string(loc); } std::size_t m_index; std::string m_location; std::string m_demangled; std::string m_hex; std::string m_addr; friend std::ostream& operator<<(std::ostream& ss, const StackTraceEntry& si) { ss << "[" << si.m_index << "] " << si.m_location << (si.m_demangled.empty() ? "" : ":") << si.m_demangled << (si.m_hex.empty() ? "" : "+") << si.m_hex << si.m_addr; return ss; } private: StackTraceEntry(void); }; StackTrace(void) { generateNew(); } virtual ~StackTrace(void) { } inline std::vector& getLatestStack(void) { return m_stack; } friend inline std::ostream& operator<<(std::ostream& os, const StackTrace& st) { std::vector::const_iterator it = st.m_stack.begin(); while (it != st.m_stack.end()) { os << " " << *it++ << "\n"; } return os; } private: std::vector m_stack; void generateNew(void) { #if _ELPP_STACKTRACE m_stack.clear(); void* stack[kMaxStack]; std::size_t size = backtrace(stack, kMaxStack); char** strings = backtrace_symbols(stack, size); if (size > kStackStart) { // Skip StackTrace c'tor and generateNew for (std::size_t i = kStackStart; i < size; ++i) { char* mangName = nullptr; char* hex = nullptr; char* addr = nullptr; for (char* c = strings[i]; *c; ++c) { switch (*c) { case '(': mangName = c; break; case '+': hex = c; break; case ')': addr = c; break; } } // Perform demangling if parsed properly if (mangName != nullptr && hex != nullptr && addr != nullptr && mangName < hex) { *mangName++ = '\0'; *hex++ = '\0'; *addr++ = '\0'; int status = 0; char* demangName = abi::__cxa_demangle(mangName, 0, 0, &status); // if demangling is successful, output the demangled function name if (status == 0) { // Success (see http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.3/a01696.html) StackTraceEntry entry(i - 1, strings[i], demangName, hex, addr); m_stack.push_back(entry); } else { // Not successful - we will use mangled name StackTraceEntry entry(i - 1, strings[i], mangName, hex, addr); m_stack.push_back(entry); } free(demangName); } else { StackTraceEntry entry(i - 1, strings[i]); m_stack.push_back(entry); } } } free(strings); #else ELPP_INTERNAL_INFO(1, "Stacktrace generation not supported for selected compiler"); #endif // _ELPP_STACKTRACE } }; static std::string crashReason(int sig) { std::stringstream ss; bool foundReason = false; for (int i = 0; i < base::consts::kCrashSignalsCount; ++i) { if (base::consts::kCrashSignals[i].numb == sig) { ss << "Application has crashed due to [" << base::consts::kCrashSignals[i].name << "] signal"; if (ELPP->hasFlag(el::LoggingFlag::LogDetailedCrashReason)) { ss << std::endl << " " << base::consts::kCrashSignals[i].brief << std::endl << " " << base::consts::kCrashSignals[i].detail; } foundReason = true; } } if (!foundReason) { ss << "Application has crashed due to unknown signal [" << sig << "]"; } return ss.str(); } /// @brief Logs reason of crash from sig static void logCrashReason(int sig, bool stackTraceIfAvailable, Level level, const char* logger) { std::stringstream ss; ss << "CRASH HANDLED; "; ss << crashReason(sig); #if _ELPP_STACKTRACE if (stackTraceIfAvailable) { ss << std::endl << " ======= Backtrace: =========" << std::endl << base::debug::StackTrace(); } #else _ELPP_UNUSED(stackTraceIfAvailable); #endif // _ELPP_STACKTRACE _ELPP_WRITE_LOG(el::base::Writer, level, base::DispatchAction::NormalLog, logger) << ss.str(); } static inline void crashAbort(int sig) { base::utils::abort(sig); } /// @brief Default application crash handler /// /// @detail This function writes log using 'default' logger, prints stack trace for GCC based compilers and aborts program. static inline void defaultCrashHandler(int sig) { base::debug::logCrashReason(sig, true, Level::Fatal, base::consts::kDefaultLoggerId); base::debug::crashAbort(sig); } /// @brief Handles unexpected crashes class CrashHandler : base::NoCopy { public: typedef void (*Handler)(int); explicit CrashHandler(bool useDefault) { if (useDefault) { setHandler(defaultCrashHandler); } } explicit CrashHandler(const Handler& cHandler) { setHandler(cHandler); } void setHandler(const Handler& cHandler) { m_handler = cHandler; #if defined(_ELPP_HANDLE_SIGABRT) int i = 0; // SIGABRT is at base::consts::kCrashSignals[0] #else int i = 1; #endif // defined(_ELPP_HANDLE_SIGABRT) for (; i < base::consts::kCrashSignalsCount; ++i) { m_handler = signal(base::consts::kCrashSignals[i].numb, cHandler); } } private: Handler m_handler; }; } // namespace debug } // namespace base extern base::debug::CrashHandler elCrashHandler; #define MAKE_LOGGABLE(ClassType, ClassInstance, OutputStreamInstance) \ el::base::type::ostream_t& operator<<(el::base::type::ostream_t& OutputStreamInstance, const ClassType& ClassInstance) /// @brief Initializes syslog with process ID, options and facility. calls closelog() on d'tor class SysLogInitializer { public: SysLogInitializer(const char* processIdent, int options = 0, int facility = 0) { #if defined(_ELPP_SYSLOG) openlog(processIdent, options, facility); #else _ELPP_UNUSED(processIdent); _ELPP_UNUSED(options); _ELPP_UNUSED(facility); #endif // defined(_ELPP_SYSLOG) } virtual ~SysLogInitializer(void) { #if defined(_ELPP_SYSLOG) closelog(); #endif // defined(_ELPP_SYSLOG) } }; #define _INIT_SYSLOG(id, opt, fac) el::SysLogInitializer elSyslogInit(id, opt, fac) /// @brief Static helpers for developers class Helpers : base::StaticClass { public: /// @brief Shares logging repository (base::Storage) static inline void setStorage(base::type::StoragePointer storage) { ELPP = storage; } /// @return Main storage repository static inline base::type::StoragePointer storage() { return ELPP; } /// @brief Sets application arguments and figures out whats active for logging and whats not. static inline void setArgs(int argc, char** argv) { ELPP->setApplicationArguments(argc, argv); } /// @copydoc setArgs(int argc, char** argv) static inline void setArgs(int argc, const char** argv) { ELPP->setApplicationArguments(argc, const_cast(argv)); } /// @brief Overrides default crash handler and installs custom handler. /// @param crashHandler A functor with no return type that takes single int argument. /// Handler is a typedef with specification: void (*Handler)(int) static inline void setCrashHandler(const el::base::debug::CrashHandler::Handler& crashHandler) { el::elCrashHandler.setHandler(crashHandler); } /// @brief Abort due to crash with signal in parameter /// @param sig Crash signal static inline void crashAbort(int sig, const char* sourceFile = "", unsigned int long line = 0) { // NOLINT std::stringstream ss; ss << base::debug::crashReason(sig).c_str(); ss << " - [Called el::Helpers::crashAbort(" << sig << ")]"; if (sourceFile != nullptr && strlen(sourceFile) > 0) { ss << " - Source: " << sourceFile; if (line > 0) ss << ":" << line; else ss << " (line number not specified)"; } base::utils::abort(sig, ss.str().c_str()); } /// @brief Logs reason of crash as per sig /// @param sig Crash signal /// @param stackTraceIfAvailable Includes stack trace if available /// @param level Logging level /// @param logger Logger to use for logging static inline void logCrashReason(int sig, bool stackTraceIfAvailable = false, Level level = Level::Fatal, const char* logger = base::consts::kDefaultLoggerId) { el::base::debug::logCrashReason(sig, stackTraceIfAvailable, level, logger); } /// @brief Installs pre rollout callback, this callback is triggered when log file is about to be rolled out /// (can be useful for backing up) static inline void installPreRollOutCallback(const PreRollOutCallback& callback) { ELPP->setPreRollOutCallback(callback); } /// @brief Uninstalls pre rollout callback static inline void uninstallPreRollOutCallback(void) { ELPP->unsetPreRollOutCallback(); } /// @brief Installs post log dispatch callback, this callback is triggered when log is dispatched template static inline bool installLogDispatchCallback(const std::string& id) { return ELPP->installLogDispatchCallback(id); } /// @brief Uninstalls log dispatch callback template static inline void uninstallLogDispatchCallback(const std::string& id) { ELPP->uninstallLogDispatchCallback(id); } template static inline T* logDispatchCallback(const std::string& id) { return ELPP->logDispatchCallback(id); } /// @brief Installs post performance tracking callback, this callback is triggered when performance tracking is finished template static inline bool installPerformanceTrackingCallback(const std::string& id) { return ELPP->installPerformanceTrackingCallback(id); } /// @brief Uninstalls post performance tracking handler template static inline void uninstallPerformanceTrackingCallback(const std::string& id) { ELPP->uninstallPerformanceTrackingCallback(id); } template static inline T* performanceTrackingCallback(const std::string& id) { return ELPP->performanceTrackingCallback(id); } /// @brief Converts template to std::string - useful for loggable classes to log containers within log(std::ostream&) const template static std::string convertTemplateToStdString(const T& templ) { el::Logger* logger = ELPP->registeredLoggers()->get(el::base::consts::kDefaultLoggerId); if (logger == nullptr) { return std::string(); } base::MessageBuilder b; b.initialize(logger); logger->acquireLock(); b << templ; #if defined(_ELPP_UNICODE) std::string s = std::string(logger->stream().str().begin(), logger->stream().str().end()); #else std::string s = logger->stream().str(); #endif // defined(_ELPP_UNICODE) logger->stream().str(ELPP_LITERAL("")); logger->releaseLock(); return s; } /// @brief Returns command line arguments (pointer) provided to easylogging++ static inline const el::base::utils::CommandLineArgs* commandLineArgs(void) { return ELPP->commandLineArgs(); } /// @brief Installs user defined format specifier and handler static inline void installCustomFormatSpecifier(const CustomFormatSpecifier& customFormatSpecifier) { ELPP->installCustomFormatSpecifier(customFormatSpecifier); } /// @brief Uninstalls user defined format specifier and handler static inline bool uninstallCustomFormatSpecifier(const char* formatSpecifier) { return ELPP->uninstallCustomFormatSpecifier(formatSpecifier); } /// @brief Returns true if custom format specifier is installed static inline bool hasCustomFormatSpecifier(const char* formatSpecifier) { return ELPP->hasCustomFormatSpecifier(formatSpecifier); } static inline void validateFileRolling(Logger* logger, Level level) { if (logger == nullptr) return; logger->m_typedConfigurations->validateFileRolling(level, ELPP->preRollOutCallback()); } }; /// @brief Static helpers to deal with loggers and their configurations class Loggers : base::StaticClass { public: /// @brief Gets existing or registers new logger static inline Logger* getLogger(const std::string& identity, bool registerIfNotAvailable = true) { base::threading::ScopedLock scopedLock(ELPP->lock()); return ELPP->registeredLoggers()->get(identity, registerIfNotAvailable); } /// @brief Unregisters logger - use it only when you know what you are doing, you may unregister /// loggers initialized / used by third-party libs. static inline bool unregisterLogger(const std::string& identity) { base::threading::ScopedLock scopedLock(ELPP->lock()); return ELPP->registeredLoggers()->remove(identity); } /// @brief Whether or not logger with id is registered static inline bool hasLogger(const std::string& identity) { base::threading::ScopedLock scopedLock(ELPP->lock()); return ELPP->registeredLoggers()->has(identity); } /// @brief Reconfigures specified logger with new configurations static inline Logger* reconfigureLogger(Logger* logger, const Configurations& configurations) { if (!logger) return nullptr; logger->configure(configurations); return logger; } /// @brief Reconfigures logger with new configurations after looking it up using identity static inline Logger* reconfigureLogger(const std::string& identity, const Configurations& configurations) { return Loggers::reconfigureLogger(Loggers::getLogger(identity), configurations); } /// @brief Reconfigures logger's single configuration static inline Logger* reconfigureLogger(const std::string& identity, ConfigurationType configurationType, const std::string& value) { Logger* logger = Loggers::getLogger(identity); if (logger == nullptr) { return nullptr; } logger->configurations()->set(Level::Global, configurationType, value); logger->reconfigure(); return logger; } /// @brief Reconfigures all the existing loggers with new configurations static inline void reconfigureAllLoggers(const Configurations& configurations) { for (base::RegisteredLoggers::iterator it = ELPP->registeredLoggers()->begin(); it != ELPP->registeredLoggers()->end(); ++it) { Loggers::reconfigureLogger(it->second, configurations); } } /// @brief Reconfigures single configuration for all the loggers static inline void reconfigureAllLoggers(ConfigurationType configurationType, const std::string& value) { reconfigureAllLoggers(Level::Global, configurationType, value); } /// @brief Reconfigures single configuration for all the loggers for specified level static inline void reconfigureAllLoggers(Level level, ConfigurationType configurationType, const std::string& value) { for (base::RegisteredLoggers::iterator it = ELPP->registeredLoggers()->begin(); it != ELPP->registeredLoggers()->end(); ++it) { Logger* logger = it->second; logger->configurations()->set(level, configurationType, value); logger->reconfigure(); } } /// @brief Sets default configurations. This configuration is used for future (and conditionally for existing) loggers static inline void setDefaultConfigurations(const Configurations& configurations, bool reconfigureExistingLoggers = false) { ELPP->registeredLoggers()->setDefaultConfigurations(configurations); if (reconfigureExistingLoggers) { Loggers::reconfigureAllLoggers(configurations); } } /// @brief Returns current default static inline const Configurations* defaultConfigurations(void) { return ELPP->registeredLoggers()->defaultConfigurations(); } /// @brief Returns log stream reference pointer if needed by user static inline const base::LogStreamsReferenceMap* logStreamsReference(void) { return ELPP->registeredLoggers()->logStreamsReference(); } /// @brief Default typed configuration based on existing defaultConf static base::TypedConfigurations defaultTypedConfigurations(void) { return base::TypedConfigurations( ELPP->registeredLoggers()->defaultConfigurations(), ELPP->registeredLoggers()->logStreamsReference()); } /// @brief Populates all logger IDs in current repository. /// @param [out] targetList List of fill up. static inline std::vector* populateAllLoggerIds(std::vector* targetList) { targetList->clear(); for (base::RegisteredLoggers::iterator it = ELPP->registeredLoggers()->list().begin(); it != ELPP->registeredLoggers()->list().end(); ++it) { targetList->push_back(it->first); } return targetList; } /// @brief Sets configurations from global configuration file. static void configureFromGlobal(const char* globalConfigurationFilePath) { std::ifstream gcfStream(globalConfigurationFilePath, std::ifstream::in); ELPP_ASSERT(gcfStream.is_open(), "Unable to open global configuration file [" << globalConfigurationFilePath << "] for parsing."); std::string line = std::string(); std::stringstream ss; Logger* logger = nullptr; auto configure = [&](void) { ELPP_INTERNAL_INFO(8, "Configuring logger: '" << logger->id() << "' with configurations \n" << ss.str() << "\n--------------"); Configurations c; c.parseFromText(ss.str()); logger->configure(c); }; // NOLINT while (gcfStream.good()) { std::getline(gcfStream, line); ELPP_INTERNAL_INFO(1, "Parsing line: " << line); base::utils::Str::trim(line); if (Configurations::Parser::isComment(line)) continue; Configurations::Parser::ignoreComments(&line); base::utils::Str::trim(line); if (line.size() > 2 && base::utils::Str::startsWith(line, base::consts::kConfigurationLoggerId)) { if (!ss.str().empty() && logger != nullptr) { configure(); } ss.str(""); line = line.substr(2); base::utils::Str::trim(line); if (line.size() > 1) { ELPP_INTERNAL_INFO(1, "Getting logger: '" << line << "'"); logger = getLogger(line); } } else { ss << line << "\n"; } } if (!ss.str().empty() && logger != nullptr) { configure(); } } /// @brief Configures loggers using command line arg. Ensure you have already set command line args, /// @return False if invalid argument or argument with no value provided, true if attempted to configure logger. /// If true is returned that does not mean it has been configured successfully, it only means that it /// has attempeted to configure logger using configuration file provided in argument static inline bool configureFromArg(const char* argKey) { #if defined(_ELPP_DISABLE_CONFIGURATION_FROM_PROGRAM_ARGS) _ELPP_UNUSED(argKey); #else if (!Helpers::commandLineArgs()->hasParamWithValue(argKey)) { return false; } configureFromGlobal(Helpers::commandLineArgs()->getParamValue(argKey)); #endif // defined(_ELPP_DISABLE_CONFIGURATION_FROM_PROGRAM_ARGS) return true; } /// @brief Flushes all loggers for all levels - Be careful if you dont know how many loggers are registered static inline void flushAll(void) { ELPP->registeredLoggers()->flushAll(); } /// @brief Adds logging flag used internally. static inline void addFlag(LoggingFlag flag) { ELPP->addFlag(flag); } /// @brief Removes logging flag used internally. static inline void removeFlag(LoggingFlag flag) { ELPP->removeFlag(flag); } /// @brief Determines whether or not certain flag is active static inline bool hasFlag(LoggingFlag flag) { return ELPP->hasFlag(flag); } /// @brief Adds flag and removes it when scope goes out class ScopedAddFlag { public: ScopedAddFlag(LoggingFlag flag) : m_flag(flag) { Loggers::addFlag(m_flag); } ~ScopedAddFlag(void) { Loggers::removeFlag(m_flag); } private: LoggingFlag m_flag; }; /// @brief Removes flag and add it when scope goes out class ScopedRemoveFlag { public: ScopedRemoveFlag(LoggingFlag flag) : m_flag(flag) { Loggers::removeFlag(m_flag); } ~ScopedRemoveFlag(void) { Loggers::addFlag(m_flag); } private: LoggingFlag m_flag; }; /// @brief Sets hierarchy for logging. Needs to enable logging flag (HierarchicalLogging) static inline void setLoggingLevel(Level level) { ELPP->setLoggingLevel(level); } }; class VersionInfo : base::StaticClass { public: /// @brief Current version number static inline const std::string version(void) { return std::string("9.73"); } /// @brief Release date of current version static inline const std::string releaseDate(void) { return std::string("18-06-2014 0825hrs"); } }; } // namespace el #undef VLOG_IS_ON /// @brief Determines whether verbose logging is on for specified level current file. #define VLOG_IS_ON(verboseLevel) (ELPP->vRegistry()->allowed(verboseLevel, __FILE__)) #undef TIMED_BLOCK #undef TIMED_SCOPE #undef TIMED_FUNC #undef _ELPP_MIN_UNIT #if defined(_ELPP_PERFORMANCE_MICROSECONDS) # define _ELPP_MIN_UNIT el::base::TimestampUnit::Microsecond #else # define _ELPP_MIN_UNIT el::base::TimestampUnit::Millisecond #endif // (defined(_ELPP_PERFORMANCE_MICROSECONDS)) /// @brief Performance tracked scope. Performance gets written when goes out of scope using /// 'performance' logger. /// /// @detail Please note in order to check the performance at a certain time you can use obj.checkpoint(); /// @see el::base::PerformanceTracker /// @see el::base::PerformanceTracker::checkpoint // Note: Do not surround this definition with null macro because of obj instance #define TIMED_SCOPE(obj, blockname) el::base::PerformanceTracker obj(blockname, _ELPP_MIN_UNIT) #define TIMED_BLOCK(obj, blockName) for (struct { int i; el::base::PerformanceTracker timer; } obj = { 0, \ el::base::PerformanceTracker(blockName, _ELPP_MIN_UNIT) }; obj.i < 1; ++obj.i) /// @brief Performance tracked function. Performance gets written when goes out of scope using /// 'performance' logger. /// /// @detail Please note in order to check the performance at a certain time you can use obj.checkpoint(); /// @see el::base::PerformanceTracker /// @see el::base::PerformanceTracker::checkpoint #define TIMED_FUNC(obj) TIMED_SCOPE(obj, _ELPP_FUNC) #undef PERFORMANCE_CHECKPOINT #undef PERFORMANCE_CHECKPOINT_WITH_ID #define PERFORMANCE_CHECKPOINT(obj) obj.checkpoint(std::string(), __FILE__, __LINE__, _ELPP_FUNC) #define PERFORMANCE_CHECKPOINT_WITH_ID(obj, id) obj.checkpoint(id, __FILE__, __LINE__, _ELPP_FUNC) #undef ELPP_COUNTER #undef ELPP_COUNTER_POS /// @brief Gets hit counter for file/line #define ELPP_COUNTER (ELPP->hitCounters()->getCounter(__FILE__, __LINE__)) /// @brief Gets hit counter position for file/line, -1 if not registered yet #define ELPP_COUNTER_POS (ELPP_COUNTER == nullptr ? -1 : ELPP_COUNTER->hitCounts()) // Undef levels to support LOG(LEVEL) #undef INFO #undef WARNING #undef DEBUG #undef ERROR #undef FATAL #undef TRACE #undef VERBOSE // Undef existing #undef CINFO #undef CWARNING #undef CDEBUG #undef CFATAL #undef CERROR #undef CTRACE #undef CVERBOSE #undef CINFO_IF #undef CWARNING_IF #undef CDEBUG_IF #undef CERROR_IF #undef CFATAL_IF #undef CTRACE_IF #undef CVERBOSE_IF #undef CINFO_EVERY_N #undef CWARNING_EVERY_N #undef CDEBUG_EVERY_N #undef CERROR_EVERY_N #undef CFATAL_EVERY_N #undef CTRACE_EVERY_N #undef CVERBOSE_EVERY_N #undef CINFO_AFTER_N #undef CWARNING_AFTER_N #undef CDEBUG_AFTER_N #undef CERROR_AFTER_N #undef CFATAL_AFTER_N #undef CTRACE_AFTER_N #undef CVERBOSE_AFTER_N #undef CINFO_N_TIMES #undef CWARNING_N_TIMES #undef CDEBUG_N_TIMES #undef CERROR_N_TIMES #undef CFATAL_N_TIMES #undef CTRACE_N_TIMES #undef CVERBOSE_N_TIMES // Normal logs #if _ELPP_INFO_LOG # define CINFO(writer, dispatchAction, ...) _ELPP_WRITE_LOG(writer, el::Level::Info, dispatchAction, __VA_ARGS__) #else # define CINFO(writer, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_INFO_LOG #if _ELPP_WARNING_LOG # define CWARNING(writer, dispatchAction, ...) _ELPP_WRITE_LOG(writer, el::Level::Warning, dispatchAction, __VA_ARGS__) #else # define CWARNING(writer, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_WARNING_LOG #if _ELPP_DEBUG_LOG # define CDEBUG(writer, dispatchAction, ...) _ELPP_WRITE_LOG(writer, el::Level::Debug, dispatchAction, __VA_ARGS__) #else # define CDEBUG(writer, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_DEBUG_LOG #if _ELPP_ERROR_LOG # define CERROR(writer, dispatchAction, ...) _ELPP_WRITE_LOG(writer, el::Level::Error, dispatchAction, __VA_ARGS__) #else # define CERROR(writer, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_ERROR_LOG #if _ELPP_FATAL_LOG # define CFATAL(writer, dispatchAction, ...) _ELPP_WRITE_LOG(writer, el::Level::Fatal, dispatchAction, __VA_ARGS__) #else # define CFATAL(writer, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_FATAL_LOG #if _ELPP_TRACE_LOG # define CTRACE(writer, dispatchAction, ...) _ELPP_WRITE_LOG(writer, el::Level::Trace, dispatchAction, __VA_ARGS__) #else # define CTRACE(writer, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_TRACE_LOG #if _ELPP_VERBOSE_LOG # define CVERBOSE(writer, vlevel, dispatchAction, ...) if (VLOG_IS_ON(vlevel)) writer(\ el::Level::Verbose, __FILE__, __LINE__, _ELPP_FUNC, dispatchAction, vlevel).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__) #else # define CVERBOSE(writer, vlevel, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_VERBOSE_LOG // Conditional logs #if _ELPP_INFO_LOG # define CINFO_IF(writer, condition_, dispatchAction, ...) \ _ELPP_WRITE_LOG_IF(writer, (condition_), el::Level::Info, dispatchAction, __VA_ARGS__) #else # define CINFO_IF(writer, condition_, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_INFO_LOG #if _ELPP_WARNING_LOG # define CWARNING_IF(writer, condition_, dispatchAction, ...)\ _ELPP_WRITE_LOG_IF(writer, (condition_), el::Level::Warning, dispatchAction, __VA_ARGS__) #else # define CWARNING_IF(writer, condition_, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_WARNING_LOG #if _ELPP_DEBUG_LOG # define CDEBUG_IF(writer, condition_, dispatchAction, ...)\ _ELPP_WRITE_LOG_IF(writer, (condition_), el::Level::Debug, dispatchAction, __VA_ARGS__) #else # define CDEBUG_IF(writer, condition_, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_DEBUG_LOG #if _ELPP_ERROR_LOG # define CERROR_IF(writer, condition_, dispatchAction, ...)\ _ELPP_WRITE_LOG_IF(writer, (condition_), el::Level::Error, dispatchAction, __VA_ARGS__) #else # define CERROR_IF(writer, condition_, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_ERROR_LOG #if _ELPP_FATAL_LOG # define CFATAL_IF(writer, condition_, dispatchAction, ...)\ _ELPP_WRITE_LOG_IF(writer, (condition_), el::Level::Fatal, dispatchAction, __VA_ARGS__) #else # define CFATAL_IF(writer, condition_, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_FATAL_LOG #if _ELPP_TRACE_LOG # define CTRACE_IF(writer, condition_, dispatchAction, ...)\ _ELPP_WRITE_LOG_IF(writer, (condition_), el::Level::Trace, dispatchAction, __VA_ARGS__) #else # define CTRACE_IF(writer, condition_, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_TRACE_LOG #if _ELPP_VERBOSE_LOG # define CVERBOSE_IF(writer, condition_, vlevel, dispatchAction, ...) if (VLOG_IS_ON(vlevel) && (condition_)) writer( \ el::Level::Verbose, __FILE__, __LINE__, _ELPP_FUNC, dispatchAction, vlevel).construct(el_getVALength(__VA_ARGS__), __VA_ARGS__) #else # define CVERBOSE_IF(writer, condition_, vlevel, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_VERBOSE_LOG // Occasional logs #if _ELPP_INFO_LOG # define CINFO_EVERY_N(writer, occasion, dispatchAction, ...)\ _ELPP_WRITE_LOG_EVERY_N(writer, occasion, el::Level::Info, dispatchAction, __VA_ARGS__) #else # define CINFO_EVERY_N(writer, occasion, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_INFO_LOG #if _ELPP_WARNING_LOG # define CWARNING_EVERY_N(writer, occasion, dispatchAction, ...)\ _ELPP_WRITE_LOG_EVERY_N(writer, occasion, el::Level::Warning, dispatchAction, __VA_ARGS__) #else # define CWARNING_EVERY_N(writer, occasion, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_WARNING_LOG #if _ELPP_DEBUG_LOG # define CDEBUG_EVERY_N(writer, occasion, dispatchAction, ...)\ _ELPP_WRITE_LOG_EVERY_N(writer, occasion, el::Level::Debug, dispatchAction, __VA_ARGS__) #else # define CDEBUG_EVERY_N(writer, occasion, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_DEBUG_LOG #if _ELPP_ERROR_LOG # define CERROR_EVERY_N(writer, occasion, dispatchAction, ...)\ _ELPP_WRITE_LOG_EVERY_N(writer, occasion, el::Level::Error, dispatchAction, __VA_ARGS__) #else # define CERROR_EVERY_N(writer, occasion, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_ERROR_LOG #if _ELPP_FATAL_LOG # define CFATAL_EVERY_N(writer, occasion, dispatchAction, ...)\ _ELPP_WRITE_LOG_EVERY_N(writer, occasion, el::Level::Fatal, dispatchAction, __VA_ARGS__) #else # define CFATAL_EVERY_N(writer, occasion, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_FATAL_LOG #if _ELPP_TRACE_LOG # define CTRACE_EVERY_N(writer, occasion, dispatchAction, ...)\ _ELPP_WRITE_LOG_EVERY_N(writer, occasion, el::Level::Trace, dispatchAction, __VA_ARGS__) #else # define CTRACE_EVERY_N(writer, occasion, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_TRACE_LOG #if _ELPP_VERBOSE_LOG # define CVERBOSE_EVERY_N(writer, occasion, vlevel, dispatchAction, ...)\ CVERBOSE_IF(writer, ELPP->validateEveryNCounter(__FILE__, __LINE__, occasion), vlevel, dispatchAction, __VA_ARGS__) #else # define CVERBOSE_EVERY_N(writer, occasion, vlevel, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_VERBOSE_LOG // After N logs #if _ELPP_INFO_LOG # define CINFO_AFTER_N(writer, n, dispatchAction, ...)\ _ELPP_WRITE_LOG_AFTER_N(writer, n, el::Level::Info, dispatchAction, __VA_ARGS__) #else # define CINFO_AFTER_N(writer, n, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_INFO_LOG #if _ELPP_WARNING_LOG # define CWARNING_AFTER_N(writer, n, dispatchAction, ...)\ _ELPP_WRITE_LOG_AFTER_N(writer, n, el::Level::Warning, dispatchAction, __VA_ARGS__) #else # define CWARNING_AFTER_N(writer, n, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_WARNING_LOG #if _ELPP_DEBUG_LOG # define CDEBUG_AFTER_N(writer, n, dispatchAction, ...)\ _ELPP_WRITE_LOG_AFTER_N(writer, n, el::Level::Debug, dispatchAction, __VA_ARGS__) #else # define CDEBUG_AFTER_N(writer, n, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_DEBUG_LOG #if _ELPP_ERROR_LOG # define CERROR_AFTER_N(writer, n, dispatchAction, ...)\ _ELPP_WRITE_LOG_AFTER_N(writer, n, el::Level::Error, dispatchAction, __VA_ARGS__) #else # define CERROR_AFTER_N(writer, n, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_ERROR_LOG #if _ELPP_FATAL_LOG # define CFATAL_AFTER_N(writer, n, dispatchAction, ...)\ _ELPP_WRITE_LOG_AFTER_N(writer, n, el::Level::Fatal, dispatchAction, __VA_ARGS__) #else # define CFATAL_AFTER_N(writer, n, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_FATAL_LOG #if _ELPP_TRACE_LOG # define CTRACE_AFTER_N(writer, n, dispatchAction, ...)\ _ELPP_WRITE_LOG_AFTER_N(writer, n, el::Level::Trace, dispatchAction, __VA_ARGS__) #else # define CTRACE_AFTER_N(writer, n, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_TRACE_LOG #if _ELPP_VERBOSE_LOG # define CVERBOSE_AFTER_N(writer, n, vlevel, dispatchAction, ...)\ CVERBOSE_IF(writer, ELPP->validateAfterNCounter(__FILE__, __LINE__, n), vlevel, dispatchAction, __VA_ARGS__) #else # define CVERBOSE_AFTER_N(writer, n, vlevel, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_VERBOSE_LOG // N Times logs #if _ELPP_INFO_LOG # define CINFO_N_TIMES(writer, n, dispatchAction, ...)\ _ELPP_WRITE_LOG_N_TIMES(writer, n, el::Level::Info, dispatchAction, __VA_ARGS__) #else # define CINFO_N_TIMES(writer, n, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_INFO_LOG #if _ELPP_WARNING_LOG # define CWARNING_N_TIMES(writer, n, dispatchAction, ...)\ _ELPP_WRITE_LOG_N_TIMES(writer, n, el::Level::Warning, dispatchAction, __VA_ARGS__) #else # define CWARNING_N_TIMES(writer, n, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_WARNING_LOG #if _ELPP_DEBUG_LOG # define CDEBUG_N_TIMES(writer, n, dispatchAction, ...)\ _ELPP_WRITE_LOG_N_TIMES(writer, n, el::Level::Debug, dispatchAction, __VA_ARGS__) #else # define CDEBUG_N_TIMES(writer, n, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_DEBUG_LOG #if _ELPP_ERROR_LOG # define CERROR_N_TIMES(writer, n, dispatchAction, ...)\ _ELPP_WRITE_LOG_N_TIMES(writer, n, el::Level::Error, dispatchAction, __VA_ARGS__) #else # define CERROR_N_TIMES(writer, n, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_ERROR_LOG #if _ELPP_FATAL_LOG # define CFATAL_N_TIMES(writer, n, dispatchAction, ...)\ _ELPP_WRITE_LOG_N_TIMES(writer, n, el::Level::Fatal, dispatchAction, __VA_ARGS__) #else # define CFATAL_N_TIMES(writer, n, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_FATAL_LOG #if _ELPP_TRACE_LOG # define CTRACE_N_TIMES(writer, n, dispatchAction, ...)\ _ELPP_WRITE_LOG_N_TIMES(writer, n, el::Level::Trace, dispatchAction, __VA_ARGS__) #else # define CTRACE_N_TIMES(writer, n, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_TRACE_LOG #if _ELPP_VERBOSE_LOG # define CVERBOSE_N_TIMES(writer, n, vlevel, dispatchAction, ...)\ CVERBOSE_IF(writer, ELPP->validateNTimesCounter(__FILE__, __LINE__, n), vlevel, dispatchAction, __VA_ARGS__) #else # define CVERBOSE_N_TIMES(writer, n, vlevel, dispatchAction, ...) el::base::NullWriter() #endif // _ELPP_VERBOSE_LOG // // Custom Loggers - Requires (level, dispatchAction, loggerId/s) // // undef existing #undef CLOG #undef CLOG_VERBOSE #undef CVLOG #undef CLOG_IF #undef CLOG_VERBOSE_IF #undef CVLOG_IF #undef CLOG_EVERY_N #undef CVLOG_EVERY_N #undef CLOG_AFTER_N #undef CVLOG_AFTER_N #undef CLOG_N_TIMES #undef CVLOG_N_TIMES // Normal logs #define CLOG(LEVEL, ...)\ C##LEVEL(el::base::Writer, el::base::DispatchAction::NormalLog, __VA_ARGS__) #define CVLOG(vlevel, ...) CVERBOSE(el::base::Writer, vlevel, el::base::DispatchAction::NormalLog, __VA_ARGS__) // Conditional logs #define CLOG_IF(condition, LEVEL, ...)\ C##LEVEL##_IF(el::base::Writer, condition, el::base::DispatchAction::NormalLog, __VA_ARGS__) #define CVLOG_IF(condition, vlevel, ...)\ CVERBOSE_IF(el::base::Writer, condition, vlevel, el::base::DispatchAction::NormalLog, __VA_ARGS__) // Hit counts based logs #define CLOG_EVERY_N(n, LEVEL, ...)\ C##LEVEL##_EVERY_N(el::base::Writer, n, el::base::DispatchAction::NormalLog, __VA_ARGS__) #define CVLOG_EVERY_N(n, vlevel, ...)\ CVERBOSE_EVERY_N(el::base::Writer, n, vlevel, el::base::DispatchAction::NormalLog, __VA_ARGS__) #define CLOG_AFTER_N(n, LEVEL, ...)\ C##LEVEL##_AFTER_N(el::base::Writer, n, el::base::DispatchAction::NormalLog, __VA_ARGS__) #define CVLOG_AFTER_N(n, vlevel, ...)\ CVERBOSE_AFTER_N(el::base::Writer, n, vlevel, el::base::DispatchAction::NormalLog, __VA_ARGS__) #define CLOG_N_TIMES(n, LEVEL, ...)\ C##LEVEL##_N_TIMES(el::base::Writer, n, el::base::DispatchAction::NormalLog, __VA_ARGS__) #define CVLOG_N_TIMES(n, vlevel, ...)\ CVERBOSE_N_TIMES(el::base::Writer, n, vlevel, el::base::DispatchAction::NormalLog, __VA_ARGS__) // // Default Loggers macro using CLOG(), CLOG_VERBOSE() and CVLOG() macros // // undef existing #undef LOG #undef VLOG #undef LOG_IF #undef VLOG_IF #undef LOG_EVERY_N #undef VLOG_EVERY_N #undef LOG_AFTER_N #undef VLOG_AFTER_N #undef LOG_N_TIMES #undef VLOG_N_TIMES #undef _CURRENT_FILE_LOGGER_ID #if defined(_LOGGER) # define _CURRENT_FILE_LOGGER_ID _LOGGER #else # define _CURRENT_FILE_LOGGER_ID el::base::consts::kDefaultLoggerId #endif #undef _TRACE #define _TRACE CLOG(TRACE, _CURRENT_FILE_LOGGER_ID) // Normal logs #define LOG(LEVEL) CLOG(LEVEL, _CURRENT_FILE_LOGGER_ID) #define VLOG(vlevel) CVLOG(vlevel, _CURRENT_FILE_LOGGER_ID) // Conditional logs #define LOG_IF(condition, LEVEL) CLOG_IF(condition, LEVEL, _CURRENT_FILE_LOGGER_ID) #define VLOG_IF(condition, vlevel) CVLOG_IF(condition, vlevel, _CURRENT_FILE_LOGGER_ID) // Hit counts based logs #define LOG_EVERY_N(n, LEVEL) CLOG_EVERY_N(n, LEVEL, _CURRENT_FILE_LOGGER_ID) #define VLOG_EVERY_N(n, vlevel) CVLOG_EVERY_N(n, vlevel, _CURRENT_FILE_LOGGER_ID) #define LOG_AFTER_N(n, LEVEL) CLOG_AFTER_N(n, LEVEL, _CURRENT_FILE_LOGGER_ID) #define VLOG_AFTER_N(n, vlevel) CVLOG_AFTER_N(n, vlevel, _CURRENT_FILE_LOGGER_ID) #define LOG_N_TIMES(n, LEVEL) CLOG_N_TIMES(n, LEVEL, _CURRENT_FILE_LOGGER_ID) #define VLOG_N_TIMES(n, vlevel) CVLOG_N_TIMES(n, vlevel, _CURRENT_FILE_LOGGER_ID) // Generic PLOG() #undef CPLOG #undef CPLOG_IF #undef PLOG #undef PLOG_IF #undef DCPLOG #undef DCPLOG_IF #undef DPLOG #undef DPLOG_IF #define CPLOG(LEVEL, ...)\ C##LEVEL(el::base::PErrorWriter, el::base::DispatchAction::NormalLog, __VA_ARGS__) #define CPLOG_IF(condition, LEVEL, ...)\ C##LEVEL##_IF(el::base::PErrorWriter, condition, el::base::DispatchAction::NormalLog, __VA_ARGS__) #define DCPLOG(LEVEL, ...)\ if (_ELPP_DEBUG_LOG) C##LEVEL(el::base::PErrorWriter, el::base::DispatchAction::NormalLog, __VA_ARGS__) #define DCPLOG_IF(condition, LEVEL, ...)\ C##LEVEL##_IF(el::base::PErrorWriter, (_ELPP_DEBUG_LOG) && (condition), el::base::DispatchAction::NormalLog, __VA_ARGS__) #define PLOG(LEVEL) CPLOG(LEVEL, _CURRENT_FILE_LOGGER_ID) #define PLOG_IF(condition, LEVEL) CPLOG_IF(condition, LEVEL, _CURRENT_FILE_LOGGER_ID) #define DPLOG(LEVEL) DCPLOG(LEVEL, _CURRENT_FILE_LOGGER_ID) #define DPLOG_IF(condition, LEVEL) DCPLOG_IF(condition, LEVEL, _CURRENT_FILE_LOGGER_ID) // Generic SYSLOG() #undef CSYSLOG #undef CSYSLOG_IF #undef CSYSLOG_EVERY_N #undef CSYSLOG_AFTER_N #undef CSYSLOG_N_TIMES #undef SYSLOG #undef SYSLOG_IF #undef SYSLOG_EVERY_N #undef SYSLOG_AFTER_N #undef SYSLOG_N_TIMES #undef DCSYSLOG #undef DCSYSLOG_IF #undef DCSYSLOG_EVERY_N #undef DCSYSLOG_AFTER_N #undef DCSYSLOG_N_TIMES #undef DSYSLOG #undef DSYSLOG_IF #undef DSYSLOG_EVERY_N #undef DSYSLOG_AFTER_N #undef DSYSLOG_N_TIMES #if defined(_ELPP_SYSLOG) # define CSYSLOG(LEVEL, ...)\ C##LEVEL(el::base::Writer, el::base::DispatchAction::SysLog, __VA_ARGS__) # define CSYSLOG_IF(condition, LEVEL, ...)\ C##LEVEL##_IF(el::base::Writer, condition, el::base::DispatchAction::SysLog, __VA_ARGS__) # define CSYSLOG_EVERY_N(n, LEVEL, ...) C##LEVEL##_EVERY_N(el::base::Writer, n, el::base::DispatchAction::SysLog, __VA_ARGS__) # define CSYSLOG_AFTER_N(n, LEVEL, ...) C##LEVEL##_AFTER_N(el::base::Writer, n, el::base::DispatchAction::SysLog, __VA_ARGS__) # define CSYSLOG_N_TIMES(n, LEVEL, ...) C##LEVEL##_N_TIMES(el::base::Writer, n, el::base::DispatchAction::SysLog, __VA_ARGS__) # define SYSLOG(LEVEL) CSYSLOG(LEVEL, el::base::consts::kSysLogLoggerId) # define SYSLOG_IF(condition, LEVEL) CSYSLOG_IF(condition, LEVEL, el::base::consts::kSysLogLoggerId) # define SYSLOG_EVERY_N(n, LEVEL) CSYSLOG_EVERY_N(n, LEVEL, el::base::consts::kSysLogLoggerId) # define SYSLOG_AFTER_N(n, LEVEL) CSYSLOG_AFTER_N(n, LEVEL, el::base::consts::kSysLogLoggerId) # define SYSLOG_N_TIMES(n, LEVEL) CSYSLOG_N_TIMES(n, LEVEL, el::base::consts::kSysLogLoggerId) # define DCSYSLOG(LEVEL, ...) if (_ELPP_DEBUG_LOG) C##LEVEL(el::base::Writer, el::base::DispatchAction::SysLog, __VA_ARGS__) # define DCSYSLOG_IF(condition, LEVEL, ...)\ C##LEVEL##_IF(el::base::Writer, (_ELPP_DEBUG_LOG) && (condition), el::base::DispatchAction::SysLog, __VA_ARGS__) # define DCSYSLOG_EVERY_N(n, LEVEL, ...)\ if (_ELPP_DEBUG_LOG) C##LEVEL##_EVERY_N(el::base::Writer, n, el::base::DispatchAction::SysLog, __VA_ARGS__) # define DCSYSLOG_AFTER_N(n, LEVEL, ...)\ if (_ELPP_DEBUG_LOG) C##LEVEL##_AFTER_N(el::base::Writer, n, el::base::DispatchAction::SysLog, __VA_ARGS__) # define DCSYSLOG_N_TIMES(n, LEVEL, ...)\ if (_ELPP_DEBUG_LOG) C##LEVEL##_EVERY_N(el::base::Writer, n, el::base::DispatchAction::SysLog, __VA_ARGS__) # define DSYSLOG(LEVEL) DCSYSLOG(LEVEL, el::base::consts::kSysLogLoggerId) # define DSYSLOG_IF(condition, LEVEL) DCSYSLOG_IF(condition, LEVEL, el::base::consts::kSysLogLoggerId) # define DSYSLOG_EVERY_N(n, LEVEL) DCSYSLOG_EVERY_N(n, LEVEL, el::base::consts::kSysLogLoggerId) # define DSYSLOG_AFTER_N(n, LEVEL) DCSYSLOG_AFTER_N(n, LEVEL, el::base::consts::kSysLogLoggerId) # define DSYSLOG_N_TIMES(n, LEVEL) DCSYSLOG_N_TIMES(n, LEVEL, el::base::consts::kSysLogLoggerId) #else # define CSYSLOG(LEVEL, ...) el::base::NullWriter() # define CSYSLOG_IF(condition, LEVEL, ...) el::base::NullWriter() # define CSYSLOG_EVERY_N(n, LEVEL, ...) el::base::NullWriter() # define CSYSLOG_AFTER_N(n, LEVEL, ...) el::base::NullWriter() # define CSYSLOG_N_TIMES(n, LEVEL, ...) el::base::NullWriter() # define SYSLOG(LEVEL) el::base::NullWriter() # define SYSLOG_IF(condition, LEVEL) el::base::NullWriter() # define SYSLOG_EVERY_N(n, LEVEL) el::base::NullWriter() # define SYSLOG_AFTER_N(n, LEVEL) el::base::NullWriter() # define SYSLOG_N_TIMES(n, LEVEL) el::base::NullWriter() # define DCSYSLOG(LEVEL, ...) el::base::NullWriter() # define DCSYSLOG_IF(condition, LEVEL, ...) el::base::NullWriter() # define DCSYSLOG_EVERY_N(n, LEVEL, ...) el::base::NullWriter() # define DCSYSLOG_AFTER_N(n, LEVEL, ...) el::base::NullWriter() # define DCSYSLOG_N_TIMES(n, LEVEL, ...) el::base::NullWriter() # define DSYSLOG(LEVEL) el::base::NullWriter() # define DSYSLOG_IF(condition, LEVEL) el::base::NullWriter() # define DSYSLOG_EVERY_N(n, LEVEL) el::base::NullWriter() # define DSYSLOG_AFTER_N(n, LEVEL) el::base::NullWriter() # define DSYSLOG_N_TIMES(n, LEVEL) el::base::NullWriter() #endif // defined(_ELPP_SYSLOG) // // Custom Debug Only Loggers - Requires (level, loggerId/s) // // undef existing #undef DCLOG #undef DCVLOG #undef DCLOG_IF #undef DCVLOG_IF #undef DCLOG_EVERY_N #undef DCVLOG_EVERY_N #undef DCLOG_AFTER_N #undef DCVLOG_AFTER_N #undef DCLOG_N_TIMES #undef DCVLOG_N_TIMES // Normal logs #define DCLOG(LEVEL, ...) if (_ELPP_DEBUG_LOG) CLOG(LEVEL, __VA_ARGS__) #define DCLOG_VERBOSE(vlevel, ...) if (_ELPP_DEBUG_LOG) CLOG_VERBOSE(vlevel, __VA_ARGS__) #define DCVLOG(vlevel, ...) if (_ELPP_DEBUG_LOG) CVLOG(vlevel, __VA_ARGS__) // Conditional logs #define DCLOG_IF(condition, LEVEL, ...) if (_ELPP_DEBUG_LOG) CLOG_IF(condition, LEVEL, __VA_ARGS__) #define DCVLOG_IF(condition, vlevel, ...) if (_ELPP_DEBUG_LOG) CVLOG_IF(condition, vlevel, __VA_ARGS__) // Hit counts based logs #define DCLOG_EVERY_N(n, LEVEL, ...) if (_ELPP_DEBUG_LOG) CLOG_EVERY_N(n, LEVEL, __VA_ARGS__) #define DCVLOG_EVERY_N(n, vlevel, ...) if (_ELPP_DEBUG_LOG) CVLOG_EVERY_N(n, vlevel, __VA_ARGS__) #define DCLOG_AFTER_N(n, LEVEL, ...) if (_ELPP_DEBUG_LOG) CLOG_AFTER_N(n, LEVEL, __VA_ARGS__) #define DCVLOG_AFTER_N(n, vlevel, ...) if (_ELPP_DEBUG_LOG) CVLOG_AFTER_N(n, vlevel, __VA_ARGS__) #define DCLOG_N_TIMES(n, LEVEL, ...) if (_ELPP_DEBUG_LOG) CLOG_N_TIMES(n, LEVEL, __VA_ARGS__) #define DCVLOG_N_TIMES(n, vlevel, ...) if (_ELPP_DEBUG_LOG) CVLOG_N_TIMES(n, vlevel, __VA_ARGS__) // // Default Debug Only Loggers macro using CLOG(), CLOG_VERBOSE() and CVLOG() macros // // undef existing #undef DLOG #undef DVLOG #undef DLOG_IF #undef DVLOG_IF #undef DLOG_EVERY_N #undef DVLOG_EVERY_N #undef DLOG_AFTER_N #undef DVLOG_AFTER_N #undef DLOG_N_TIMES #undef DVLOG_N_TIMES // Normal logs #define DLOG(LEVEL) DCLOG(LEVEL, _CURRENT_FILE_LOGGER_ID) #define DVLOG(vlevel) DCVLOG(vlevel, _CURRENT_FILE_LOGGER_ID) // Conditional logs #define DLOG_IF(condition, LEVEL) DCLOG_IF(condition, LEVEL, _CURRENT_FILE_LOGGER_ID) #define DVLOG_IF(condition, vlevel) DCVLOG_IF(condition, vlevel, _CURRENT_FILE_LOGGER_ID) // Hit counts based logs #define DLOG_EVERY_N(n, LEVEL) DCLOG_EVERY_N(n, LEVEL, _CURRENT_FILE_LOGGER_ID) #define DVLOG_EVERY_N(n, vlevel) DCVLOG_EVERY_N(n, vlevel, _CURRENT_FILE_LOGGER_ID) #define DLOG_AFTER_N(n, LEVEL) DCLOG_AFTER_N(n, LEVEL, _CURRENT_FILE_LOGGER_ID) #define DVLOG_AFTER_N(n, vlevel) DCVLOG_AFTER_N(n, vlevel, _CURRENT_FILE_LOGGER_ID) #define DLOG_N_TIMES(n, LEVEL) DCLOG_N_TIMES(n, LEVEL, _CURRENT_FILE_LOGGER_ID) #define DVLOG_N_TIMES(n, vlevel) DCVLOG_N_TIMES(n, vlevel, _CURRENT_FILE_LOGGER_ID) // Check macros #undef CCHECK #undef CPCHECK #undef CCHECK_EQ #undef CCHECK_NE #undef CCHECK_LT #undef CCHECK_GT #undef CCHECK_LE #undef CCHECK_GE #undef CCHECK_NOTNULL #undef CCHECK_STRCASEEQ #undef CCHECK_STRCASENE #undef CHECK #undef PCHECK #undef CHECK_EQ #undef CHECK_NE #undef CHECK_LT #undef CHECK_GT #undef CHECK_LE #undef CHECK_GE #undef CHECK_NOTNULL #undef CHECK_STRCASEEQ #undef CHECK_STRCASENE #define CCHECK(condition, ...) CLOG_IF(!(condition), FATAL, __VA_ARGS__) << "Check failed: [" << #condition << "] " #define CPCHECK(condition, ...) CPLOG_IF(!(condition), FATAL, __VA_ARGS__) << "Check failed: [" << #condition << "] " #define CHECK(condition) CCHECK(condition, _CURRENT_FILE_LOGGER_ID) #define PCHECK(condition) CPCHECK(condition, _CURRENT_FILE_LOGGER_ID) #define CCHECK_EQ(a, b, ...) CCHECK(a == b, __VA_ARGS__) #define CCHECK_NE(a, b, ...) CCHECK(a != b, __VA_ARGS__) #define CCHECK_LT(a, b, ...) CCHECK(a < b, __VA_ARGS__) #define CCHECK_GT(a, b, ...) CCHECK(a > b, __VA_ARGS__) #define CCHECK_LE(a, b, ...) CCHECK(a <= b, __VA_ARGS__) #define CCHECK_GE(a, b, ...) CCHECK(a >= b, __VA_ARGS__) #define CHECK_EQ(a, b) CCHECK_EQ(a, b, _CURRENT_FILE_LOGGER_ID) #define CHECK_NE(a, b) CCHECK_NE(a, b, _CURRENT_FILE_LOGGER_ID) #define CHECK_LT(a, b) CCHECK_LT(a, b, _CURRENT_FILE_LOGGER_ID) #define CHECK_GT(a, b) CCHECK_GT(a, b, _CURRENT_FILE_LOGGER_ID) #define CHECK_LE(a, b) CCHECK_LE(a, b, _CURRENT_FILE_LOGGER_ID) #define CHECK_GE(a, b) CCHECK_GE(a, b, _CURRENT_FILE_LOGGER_ID) namespace el { namespace base { namespace utils { template static T* checkNotNull(T* ptr, const char* name, const char* loggers, ...) { CLOG_IF(ptr == nullptr, FATAL, loggers) << "Check failed: [" << name << " != nullptr]"; return ptr; } } // namespace utils } // namespace base } // namespace el #define CCHECK_NOTNULL(ptr, ...) el::base::utils::checkNotNull(ptr, #ptr, __VA_ARGS__) #define CCHECK_STREQ(str1, str2, ...) CLOG_IF(!el::base::utils::Str::cStringEq(str1, str2), FATAL, __VA_ARGS__) \ << "Check failed: [" << #str1 << " == " << #str2 << "] " #define CCHECK_STRNE(str1, str2, ...) CLOG_IF(el::base::utils::Str::cStringEq(str1, str2), FATAL, __VA_ARGS__) \ << "Check failed: [" << #str1 << " != " << #str2 << "] " #define CCHECK_STRCASEEQ(str1, str2, ...) CLOG_IF(!el::base::utils::Str::cStringCaseEq(str1, str2), FATAL, __VA_ARGS__) \ << "Check failed: [" << #str1 << " == " << #str2 << "] " #define CCHECK_STRCASENE(str1, str2, ...) CLOG_IF(el::base::utils::Str::cStringCaseEq(str1, str2), FATAL, __VA_ARGS__) \ << "Check failed: [" << #str1 << " != " << #str2 << "] " #define CHECK_NOTNULL(ptr) CCHECK_NOTNULL(ptr, _CURRENT_FILE_LOGGER_ID) #define CHECK_STREQ(str1, str2) CCHECK_STREQ(str1, str2, _CURRENT_FILE_LOGGER_ID) #define CHECK_STRNE(str1, str2) CCHECK_STRNE(str1, str2, _CURRENT_FILE_LOGGER_ID) #define CHECK_STRCASEEQ(str1, str2) CCHECK_STRCASEEQ(str1, str2, _CURRENT_FILE_LOGGER_ID) #define CHECK_STRCASENE(str1, str2) CCHECK_STRCASENE(str1, str2, _CURRENT_FILE_LOGGER_ID) #undef DCCHECK #undef DCCHECK_EQ #undef DCCHECK_NE #undef DCCHECK_LT #undef DCCHECK_GT #undef DCCHECK_LE #undef DCCHECK_GE #undef DCCHECK_NOTNULL #undef DCCHECK_STRCASEEQ #undef DCCHECK_STRCASENE #undef DCPCHECK #undef DCHECK #undef DCHECK_EQ #undef DCHECK_NE #undef DCHECK_LT #undef DCHECK_GT #undef DCHECK_LE #undef DCHECK_GE #undef DCHECK_NOTNULL #undef DCHECK_STRCASEEQ #undef DCHECK_STRCASENE #undef DPCHECK #define DCCHECK(condition, ...) if (_ELPP_DEBUG_LOG) CCHECK(condition, __VA_ARGS__) #define DCCHECK_EQ(a, b, ...) if (_ELPP_DEBUG_LOG) CCHECK_EQ(a, b, __VA_ARGS__) #define DCCHECK_NE(a, b, ...) if (_ELPP_DEBUG_LOG) CCHECK_NE(a, b, __VA_ARGS__) #define DCCHECK_LT(a, b, ...) if (_ELPP_DEBUG_LOG) CCHECK_LT(a, b, __VA_ARGS__) #define DCCHECK_GT(a, b, ...) if (_ELPP_DEBUG_LOG) CCHECK_GT(a, b, __VA_ARGS__) #define DCCHECK_LE(a, b, ...) if (_ELPP_DEBUG_LOG) CCHECK_LE(a, b, __VA_ARGS__) #define DCCHECK_GE(a, b, ...) if (_ELPP_DEBUG_LOG) CCHECK_GE(a, b, __VA_ARGS__) #define DCCHECK_NOTNULL(ptr, ...) if (_ELPP_DEBUG_LOG) CCHECK_NOTNULL(ptr, __VA_ARGS__) #define DCCHECK_STREQ(str1, str2, ...) if (_ELPP_DEBUG_LOG) CCHECK_STREQ(str1, str2, __VA_ARGS__) #define DCCHECK_STRNE(str1, str2, ...) if (_ELPP_DEBUG_LOG) CCHECK_STRNE(str1, str2, __VA_ARGS__) #define DCCHECK_STRCASEEQ(str1, str2, ...) if (_ELPP_DEBUG_LOG) CCHECK_STRCASEEQ(str1, str2, __VA_ARGS__) #define DCCHECK_STRCASENE(str1, str2, ...) if (_ELPP_DEBUG_LOG) CCHECK_STRCASENE(str1, str2, __VA_ARGS__) #define DCPCHECK(condition, ...) if (_ELPP_DEBUG_LOG) CPCHECK(condition, __VA_ARGS__) #define DCHECK(condition) DCCHECK(condition, _CURRENT_FILE_LOGGER_ID) #define DCHECK_EQ(a, b) DCCHECK_EQ(a, b, _CURRENT_FILE_LOGGER_ID) #define DCHECK_NE(a, b) DCCHECK_NE(a, b, _CURRENT_FILE_LOGGER_ID) #define DCHECK_LT(a, b) DCCHECK_LT(a, b, _CURRENT_FILE_LOGGER_ID) #define DCHECK_GT(a, b) DCCHECK_GT(a, b, _CURRENT_FILE_LOGGER_ID) #define DCHECK_LE(a, b) DCCHECK_LE(a, b, _CURRENT_FILE_LOGGER_ID) #define DCHECK_GE(a, b) DCCHECK_GE(a, b, _CURRENT_FILE_LOGGER_ID) #define DCHECK_NOTNULL(ptr) DCCHECK_NOTNULL(ptr, _CURRENT_FILE_LOGGER_ID) #define DCHECK_STREQ(str1, str2) DCCHECK_STREQ(str1, str2, _CURRENT_FILE_LOGGER_ID) #define DCHECK_STRNE(str1, str2) DCCHECK_STRNE(str1, str2, _CURRENT_FILE_LOGGER_ID) #define DCHECK_STRCASEEQ(str1, str2) DCCHECK_STRCASEEQ(str1, str2, _CURRENT_FILE_LOGGER_ID) #define DCHECK_STRCASENE(str1, str2) DCCHECK_STRCASENE(str1, str2, _CURRENT_FILE_LOGGER_ID) #define DPCHECK(condition) DCPCHECK(condition, _CURRENT_FILE_LOGGER_ID) #if defined(_ELPP_DISABLE_DEFAULT_CRASH_HANDLING) # define _ELPP_USE_DEF_CRASH_HANDLER false #else # define _ELPP_USE_DEF_CRASH_HANDLER true #endif // defined(_ELPP_DISABLE_DEFAULT_CRASH_HANDLING) #define _ELPP_CRASH_HANDLER_INIT #define _ELPP_INIT_EASYLOGGINGPP(val)\ _ELPP_INITI_BASIC_DECLR\ namespace el {\ namespace base {\ el::base::type::StoragePointer elStorage(val);\ }\ el::base::debug::CrashHandler elCrashHandler(_ELPP_USE_DEF_CRASH_HANDLER);\ } #define _INITIALIZE_EASYLOGGINGPP\ _ELPP_INIT_EASYLOGGINGPP(new el::base::Storage(el::LogBuilderPtr(new el::base::DefaultLogBuilder()))) #define _INITIALIZE_NULL_EASYLOGGINGPP\ _ELPP_INITI_BASIC_DECLR\ namespace el {\ namespace base {\ el::base::type::StoragePointer elStorage;\ }\ el::base::debug::CrashHandler elCrashHandler(_ELPP_USE_DEF_CRASH_HANDLER);\ } // NOTE: no _ELPP_INITI_BASIC_DECLR when sharing - causes double free corruption on external symbols #define _SHARE_EASYLOGGINGPP(initializedStorage)\ namespace el {\ namespace base {\ el::base::type::StoragePointer elStorage(initializedStorage);\ }\ el::base::debug::CrashHandler elCrashHandler(_ELPP_USE_DEF_CRASH_HANDLER);\ } #if defined(_ELPP_UNICODE) # define _START_EASYLOGGINGPP(argc, argv) el::Helpers::setArgs(argc, argv); std::locale::global(std::locale("")) #else # define _START_EASYLOGGINGPP(argc, argv) el::Helpers::setArgs(argc, argv) #endif // defined(_ELPP_UNICODE) // For minimal backward compatibility namespace easyloggingpp = el; #endif // EASYLOGGINGPP_H // NOLINT ================================================ FILE: OptolithiumC/libs/eikonal/CMakeLists.txt ================================================ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) CMAKE_POLICY(SET CMP0015 NEW) SET(CMAKE_USE_RELATIVE_PATHS ON) SET(CMAKE_SKIP_RPATH TRUE) INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/include") SET(CMAKE_BUILD_TYPE "Release") ADD_LIBRARY( eikonal STATIC "src/FMM_Core.c" "src/FMM_eikonal2d.c" "src/FMM_eikonal3d.c" "src/FMM_Heap.c" ) ================================================ FILE: OptolithiumC/libs/eikonal/include/FMM_API.h ================================================ /* * File: FMM_API.h * Copyrights: (c) 2005 The Trustees of Princeton University and Board of * Regents of the University of Texas. All rights reserved. * (c) 2009 Kevin T. Chu. All rights reserved. * Revision: $Revision: 149 $ * Modified: $Date: 2009-01-18 00:31:09 -0800 (Sun, 18 Jan 2009) $ * Description: Header file for 2D and 3D Fast Marching Method Algorithms */ #ifndef FMM_API_H_ #define FMM_API_H_ //#include "FMM_Real.h" /* Debugging macro */ #ifndef LSMLIB_DEBUG_NO_INLINE /* #undef LSMLIB_DEBUG_NO_INLINE */ #endif /* Macro defined if double precision library is being built. */ #ifndef LSMLIB_DOUBLE_PRECISION #define LSMLIB_DOUBLE_PRECISION 1 #endif /* Floating-point precision for LSMLIB_REAL */ #ifndef LSMLIB_REAL #define LSMLIB_REAL double #endif /* Zero tolerance */ #ifndef LSMLIB_ZERO_TOL #define LSMLIB_ZERO_TOL 1.e-11 #endif /* Maximum value for LSMLIB_REAL */ #ifndef LSMLIB_REAL_MAX #define LSMLIB_REAL_MAX DBL_MAX #endif /* Minimum value for LSMLIB_REAL */ #ifndef LSMLIB_REAL_MIN #define LSMLIB_REAL_MIN DBL_MIN #endif /* Machine epsilon value for LSMLIB_REAL */ #ifndef LSMLIB_REAL_EPSILON #define LSMLIB_REAL_EPSILON DBL_EPSILON #endif /*============================= Constants ===========================*/ #define LSM_FMM_TRUE (1) #define LSM_FMM_FALSE (0) #define LSM_FMM_DEFAULT_UPDATE_VALUE (-1) /*========================== Error Codes ============================*/ #define LSM_FMM_ERR_SUCCESS (0) #define LSM_FMM_ERR_FMM_DATA_CREATION_ERROR (1) #define LSM_FMM_ERR_INVALID_SPATIAL_DISCRETIZATION_ORDER (2) #ifdef __cplusplus extern "C" { #endif /*! \file FMM_API.h * * \brief * @ref lsm_fast_marching_method.h provides support for basic fast * marching method calculations: computing distance functions, * extensions of field variables (e.g. extension velocities, etc.) * off of the zero contour of a level set function, and solving the * Eikonal equation. * * The algorithm (and naming) closely follows the description in * "Level Set Methods and Fast Marching Methods" by J.A. Sethian * and "The Fast Construction of Extension Velocities in Level Set * Methods" by D. Adalsteinsson and J.A. Sethian (J. Comp. Phys, * vol 148, p 2-22, 1999). * * *

NOTES

* - The fast marching method library assumes that the field data * are stored in Fortran order (i.e. column-major order). * * - Error Codes: 0 - successful computation, * 1 - FMM_Data creation error, * 2 - invalid spatial discretization order * * - While @ref lsm_fast_marching_method.h only provides functions * for 2D and 3D FMM calculations, LSMLIB is capable of supporting higher * dimensional calculations (currently as high as 8, set by * FMM_HEAP_MAX_NDIM in @ref FMM_Heap.h). To use LSMLIB to do * higher dimensional fast marching method calculations, just modify * lsm_FMM_field_extension*d.c and/or lsm_FMM_eikonal*d.c so that * the data array sizes and index calculations are appropriate * for the dimensionality of the problem of interest. * */ /*! * computeExtensionFields2d uses the FMM algorithm to compute the * distance function and extension fields from the original level set * function, phi, and the specified source fields. * * Arguments: * - distance_function (out): updated distance function * - extension_fields (out): extension fields * - phi (in): original level set function * - mask (in): mask for domain of problem; * grid points outside of the domain * of the problem should be set to a * negative value. * - source_fields(in): source fields used to compute * extension fields * - num_extension_fields (in): number of extension fields to compute * - spatial_discretization_order (in): order of finite differences used * to compute spatial derivatives * - grid_dims (in): array of index space extents for all * fields * - dx (in): array of grid cell sizes in each * coordinate direction * * Return value: error code (see NOTES for translation) * * * NOTES: * - When the second-order spatial discretization is requested, only * the distance function is computed using the second-order scheme. * The extension fields are computed using a first-order * discretization of the gradient for the extension field and a * second-order accurate discretization of the gradient for the * distance function. We use a first-order discretization when * computing extension fields because the second-order * discretization is "unstable" and leads to amplification of the * errors introduced when initializing the extension fields in * the region around the zero level set. * * - The distance function computed when using a second-order spatial * discretization are approximately second-order accurate in the * L2 norm but are only first-order accurate in the L-infinity norm. * The reason for this behavior is that the current implementation * uses only a first-order accurate scheme for initializing the grid * points around the zero-level set. * * - For grid points that are masked out, the distance function and * extension fields are set to 0. * * - It is assumed that the user has allocated the memory for the * distance function, extension fields, phi, and source fields. * * - It is assumed that the phi and mask data arrays are both of * the same size. That is, all data fields are assumed to have * the same index space extents. * * - If mask is set to a NULL pointer, then all grid points are treated * as being in the interior of the domain. * * - The number of extension fields is assumed to be equal to the * number of source fields. * */ int computeExtensionFields2d( LSMLIB_REAL *distance_function, LSMLIB_REAL **extension_fields, LSMLIB_REAL *phi, LSMLIB_REAL *mark, LSMLIB_REAL **source_fields, int num_extension_fields, int spatial_discretization_order, int *grid_dims, LSMLIB_REAL *dx); /*! * computeDistanceFunction2d uses the FMM algorithm to compute the * a distance function from the original level set function, phi. * * Arguments: * - distance_function (out): updated distance function * - phi (in): original level set function * - mask (in): mask for domain of problem; * grid points outside of the domain * of the problem should be set to a * negative value. * - spatial_discretization_order (in): order of finite differences used * to compute spatial derivatives * - grid_dims (in): array of index space extents for all * fields * - dx (in): array of grid cell sizes in each * coordinate direction * * Return value: error code (see NOTES for translation) * * * NOTES: * - The distance function computed when using a second-order spatial * discretization are approximately second-order accurate in the * L2 norm but are only first-order accurate in the L-infinity norm. * The reason for this behavior is that the current implementation * uses only a first-order accurate scheme for initializing the grid * points around the zero-level set. * * - For grid points that are masked out, the distance function is * set to 0. * * - It is assumed that the user has allocated the memory for the * distance function and phi fields. * * - If mask is set to a NULL pointer, then all grid points are treated * as being in the interior of the domain. * * - It is assumed that the phi and mask data arrays are both of * the same size. That is, all data fields are assumed to have * the same index space extents. * */ int computeDistanceFunction2d( LSMLIB_REAL *distance_function, LSMLIB_REAL *phi, LSMLIB_REAL *mark, int spatial_discretization_order, int *grid_dims, LSMLIB_REAL *dx); /*! * solveEikonalEquation2d uses the FMM algorithm to solve the Eikonal * equation * * |grad(phi)| = 1/speed(x,y) * * in two space dimensions with the specified boundary data and * speed function. * * This function assumes that the solution phi is assumed to be * strictly non-negative with values in the interior of the domain * greater than the values on the boundaries. For problems where * phi takes on negative values with interior values greater than * boundary values, this function can be used to solve for * psi = phi + C, where C is a constant offset that ensures that psi * is strictly non-negative. For problems where interior values are * less than boundary values, this function can be used to solve for * psi = -phi. * * * Arguments: * - phi (in/out): pointer to solution to Eikonal * equation phi must be initialized as * specified in the NOTES below. * - speed (in): pointer to speed field * - mask (in): mask for domain of problem; * grid points outside of the domain * of the problem should be set to a * negative value. * - spatial_discretization_order (in): order of finite differences used * to compute spatial derivatives * - grid_dims (in): array of index space extents for all * fields * - dx (in): array of grid cell sizes in each * coordinate direction * * Return value: error code (see NOTES for translation) * * * NOTES: * - When using the second-order spatial discretization, the solution * phi is second-order accurate in the L-infinity norm only if the * "boundary values" of phi are specified in a layer of grid cells at * least two deep near the mathematical/physical domain boundary. * Otherwise, the values of the solution near the boundary will only * be first-order accurate. Close to second-order convergence in the * L2 norm is achieved using the second-order scheme even if only one * layer of boundary values is specified. * * - phi MUST be initialized so that the values for phi at grid points on * or adjacent to the boundary of the domain for the Eikonal equation * are correctly set. All other grid points should be set to have * negative values for phi. * * - For grid points that are masked out or have speed equal to zero, phi * is set to LSMLIB_REAL_MAX. * * - It is assumed that the phi, speed, and mask data arrays are all of * the same size. That is, all data fields are assumed to have the * same index space extents. * * - Both phi and the speed function MUST be strictly non-negative. * * - It is the user's responsibility to set the speed function. * * - If mask is set to a NULL pointer, then all grid points are treated * as being in the interior of the domain. * */ int solveEikonalEquation2d( LSMLIB_REAL *phi, const LSMLIB_REAL *speed, LSMLIB_REAL *mask, const int spatial_discretization_order, const int *grid_dims, const LSMLIB_REAL *dx); /*! * computeExtensionFields3d uses the FMM algorithm to compute the * distance function and extension fields from the original level set * function, phi, and the specified source fields. * * Arguments: * - distance_function (out): updated distance function * - extension_fields (out): extension fields * - phi (in): original level set function * - mask (in): mask for domain of problem; * grid points outside of the domain * of the problem should be set to a * negative value. * - source_fields(in): source fields used to compute * extension fields * - num_extension_fields (in): number of extension fields to compute * - spatial_discretization_order (in): order of finite differences used * to compute spatial derivatives * - grid_dims (in): array of index space extents for all * fields * - dx (in): array of grid cell sizes in each * coordinate direction * * Return value: error code (see NOTES for translation) * * * NOTES: * - When the second-order spatial discretization is requested, only * the distance function is computed using the second-order scheme. * The extension fields are computed using a first-order * discretization of the gradient for the extension field and a * second-order accurate discretization of the gradient for the * distance function. We use a first-order discretization when * computing extension fields because the second-order * discretization is "unstable" and leads to amplification of the * errors introduced when initializing the extension fields in * the region around the zero level set. * * - The distance function computed when using a second-order spatial * discretization are approximately second-order accurate in the * L2 norm but are only first-order accurate in the L-infinity norm. * The reason for this behavior is that the current implementation * uses only a first-order accurate scheme for initializing the grid * points around the zero-level set. * * - For grid points that are masked out, the distance function and * extension fields are set to 0. * * - It is assumed that the user has allocated the memory for the * distance function, extension fields, phi, and source fields. * * - It is assumed that the phi and mask data arrays are both of * the same size. That is, all data fields are assumed to have * the same index space extents. * * - If mask is set to a NULL pointer, then all grid points are treated * as being in the interior of the domain. * * - The number of extension fields is assumed to be equal to the * number of source fields. * */ int computeExtensionFields3d( LSMLIB_REAL *distance_function, LSMLIB_REAL **extension_fields, LSMLIB_REAL *phi, LSMLIB_REAL *mask, LSMLIB_REAL **source_fields, int num_extension_fields, int spatial_discretization_order, int *grid_dims, LSMLIB_REAL *dx); /*! * computeDistanceFunction3d uses the FMM algorithm to compute the * a distance function from the original level set function, phi. * * Arguments: * - distance_function (out): updated distance function * - phi (in): original level set function * - mask (in): mask for domain of problem; * grid points outside of the domain * of the problem should be set to a * negative value. * - spatial_discretization_order (in): order of finite differences used * to compute spatial derivatives * - grid_dims (in): array of index space extents for all * fields * - dx (in): array of grid cell sizes in each * coordinate direction * * Return value: error code (see NOTES for translation) * * * NOTES: * - The distance function computed when using a second-order spatial * discretization are approximately second-order accurate in the * L2 norm but are only first-order accurate in the L-infinity norm. * The reason for this behavior is that the current implementation * uses only a first-order accurate scheme for initializing the grid * points around the zero-level set. * * - For grid points that are masked out, the distance function is * set to 0. * * - It is assumed that the user has allocated the memory for the * distance function and phi fields. * * - If mask is set to a NULL pointer, then all grid points are treated * as being in the interior of the domain. * * - It is assumed that the phi and mask data arrays are both of * the same size. That is, all data fields are assumed to have * the same index space extents. * */ int computeDistanceFunction3d( LSMLIB_REAL *distance_function, LSMLIB_REAL *phi, LSMLIB_REAL *mask, int spatial_discretization_order, int *grid_dims, LSMLIB_REAL *dx); /*! * solveEikonalEquation3d uses the FMM algorithm to solve the Eikonal * equation * * |grad(phi)| = 1/speed(x,y,z) * * in three space dimensions with the specified boundary data * and speed function. * * This function assumes that the solution phi is assumed to be * strictly non-negative with values in the interior of the domain * greater than the values on the boundaries. For problems where * phi takes on negative values with interior values greater than * boundary values, this function can be used to solve for * psi = phi + C, where C is a constant offset that ensures that psi * is strictly non-negative. For problems where interior values are * less than boundary values, this function can be used to solve for * psi = -phi. * * * Arguments: * - phi (in/out): pointer to solution to Eikonal * equation phi must be initialized as * specified in the NOTES below. * - speed (in): pointer to speed field * - mask (in): mask for domain of problem; * grid points outside of the domain * of the problem should be set to a * negative value. * - spatial_discretization_order (in): order of finite differences used * to compute spatial derivatives * - grid_dims (in): array of index space extents for all * fields * - dx (in): array of grid cell sizes in each * coordinate direction * * Return value: error code (see NOTES for translation) * * * NOTES: * - When using the second-order spatial discretization, the solution * phi is second-order accurate in the L-infinity norm only if the * "boundary values" of phi are specified in a layer of grid cells at * least two deep near the mathematical/physical domain boundary. * Otherwise, the values of the solution near the boundary will only * be first-order accurate. Close to second-order convergence in the * L2 norm is achieved using the second-order scheme even if only one * layer of boundary values is specified. * * - phi MUST be initialized so that the values for phi at grid points on * or adjacent to the boundary of the domain for the Eikonal equation * are correctly set. All other grid points should be set to have * negative values for phi. * * - For grid points that are masked out or have speed equal to zero, phi * is set to LSMLIB_REAL_MAX. * * - It is assumed that the phi, speed, and mask data arrays are all of * the same size. That is, all data fields are assumed to have the * same index space extents. * * - Both phi and the speed function MUST be strictly non-negative. * * - It is the user's responsibility to set the speed function. * * - If mask is set to a NULL pointer, then all grid points are treated * as being in the interior of the domain. * */ int solveEikonalEquation3d( LSMLIB_REAL *phi, const LSMLIB_REAL *speed, LSMLIB_REAL *mask, const int spatial_discretization_order, const int *grid_dims, const LSMLIB_REAL *dx); #ifdef __cplusplus } #endif #endif ================================================ FILE: OptolithiumC/libs/eikonal/include/FMM_Config2d.h ================================================ /* * FMM_Config2d.h * * Created on: Aug 16, 2014 * Author: batman */ #ifndef FMM_CONFIG2D_H_ #define FMM_CONFIG2D_H_ /* Define required macros */ #define FMM_NDIM 2 #define FMM_EIKONAL_SOLVE_EIKONAL_EQUATION solveEikonalEquation2d #define FMM_EIKONAL_INITIALIZE_FRONT FMM_initializeFront_Eikonal2d #define FMM_EIKONAL_UPDATE_GRID_POINT_ORDER1 \ FMM_updateGridPoint_Eikonal2d_Order1 #define FMM_EIKONAL_UPDATE_GRID_POINT_ORDER2 \ FMM_updateGridPoint_Eikonal2d_Order2 #endif /* FMM_CONFIG2D_H_ */ ================================================ FILE: OptolithiumC/libs/eikonal/include/FMM_Config3d.h ================================================ /* * FMM_Config3d.h * * Created on: Aug 16, 2014 * Author: batman */ #ifndef FMM_CONFIG3D_H_ #define FMM_CONFIG3D_H_ /* Define required macros */ #define FMM_NDIM 3 #define FMM_EIKONAL_SOLVE_EIKONAL_EQUATION solveEikonalEquation3d #define FMM_EIKONAL_INITIALIZE_FRONT FMM_initializeFront_Eikonal3d #define FMM_EIKONAL_UPDATE_GRID_POINT_ORDER1 \ FMM_updateGridPoint_Eikonal3d_Order1 #define FMM_EIKONAL_UPDATE_GRID_POINT_ORDER2 \ FMM_updateGridPoint_Eikonal3d_Order2 #endif /* FMM_CONFIG3D_H_ */ ================================================ FILE: OptolithiumC/libs/eikonal/include/FMM_Core.h ================================================ /* * File: FMM_Core.h * Copyrights: (c) 2005 The Trustees of Princeton University and Board of * Regents of the University of Texas. All rights reserved. * (c) 2009 Kevin T. Chu. All rights reserved. * Revision: $Revision: 149 $ * Modified: $Date: 2009-01-18 00:31:09 -0800 (Sun, 18 Jan 2009) $ * Description: Header file for core Fast Marching Method algorithm functions */ #ifndef included_FMM_Core_h #define included_FMM_Core_h #include "FMM_API.h" #ifdef __cplusplus extern "C" { #endif /*! \file FMM_Core.h * * \brief * @ref FMM_Core.h provides functionality for the numerics independent * aspects of the Fast Marching Method algorithm in two- and * three-dimensions. * * Specific numerical calculations must be supplied by the user through * callback functions for detecting/initializing the front and updating * individual grid points. * * Dependencies: @ref FMM_Heap.h and user-supplied callback routines * *

Usage:

* * -# Provide implementations for the callback functions defined in * @ref FMM_Callback_API.h. * -# Create an FMM_CoreData structure using FMM_Core_createFMM_CoreData(). * -# Initialize the front using FMM_Core_initializeFront(). * -# Mark grid points that are outside of the mathematical domain for * the problem using the FMM_Core_markPointOutsideDomain() function. * -# Advance the front as far as desired using FMM_Core_advanceFront(). * Typically, the front is advanced until there are no more grid * points to update. * -# Clean up the memory allocated for the FMM_CoreData using * FMM_Core_destroyFMM_CoreData(). * */ /*================== FMM_Core Type Declarations ======================*/ /*! * FMM_CoreData is a data structure that contains information about the * current state of a fast marching method calculation. */ typedef struct FMM_CoreData FMM_CoreData; /*! * FMM_FieldData is a user-defined data structure that contains the field * data for the fast marching method calculation (e.g. phi, distance * function, source fields, extension fields). */ typedef struct FMM_FieldData FMM_FieldData; /*! * PointStatus is an enumerated type that represents the status of a * grid point during the Fast Marching Method computation. */ typedef enum { KNOWN, TRIAL, FAR, OUTSIDE_DOMAIN } PointStatus; /*! * initializeFrontFuncPtr is a function pointer to one of the * callback functions defined in @ref FMM_Callback_API.h, which must be * defined in order to use the functions in @ref FMM_Core.h. */ typedef void (*initializeFrontFuncPtr)( FMM_CoreData *fmm_core_data, FMM_FieldData *fmm_field_data, int num_dims, int *grid_dims, LSMLIB_REAL *dx); /*! * updateGridPointFuncPtr is a function pointer to one of the callback * functions defined in @ref FMM_Callback_API.h, which must be defined * in order to use the functions in @ref FMM_Core.h. */ typedef LSMLIB_REAL (*updateGridPointFuncPtr)( FMM_CoreData *fmm_core_data, FMM_FieldData *fmm_field_data, int *grid_idx, int num_dims, int *grid_dims, LSMLIB_REAL *dx); /*================== FMM_Core Function Declarations ==================*/ /*! * FMM_Core_createFMM_CoreData() allocates memory for an FMM_CoreData * structure and initializes it using the specified configuration information. * * Arguments: * - fmm_field_data (in): pointer to FMM_FieldData data structure * - num_dims (in): number of dimensions for FMM computation * - grid_dims (in): integer array of dimensions of computational * grid * - dx (in): LSMLIB_REAL array containing grid cell * sizes in each of the coordinate directions * - initializeFront (in): callback function pointer that is * used to find and initialize the front * at the beginning of the FMM algorithm * (see @ref FMM_Callback_API.h for more * details) * - updateGridPoint (in): callback function pointer that is * used to update individual grid points * during the FMM algorithm * (see @ref FMM_Callback_API.h for more * details) * - initial_front_mode (in): integer indicating whether the values * on the initial front are immutable or * may be updated during the FMM computation. * * Return value: pointer to new FMM_CoreData structure * containing the relevant information * for an FMM calculation * * NOTES: * - It is assumed that the user has allocated the memory and properly * set up the FMM_FieldData. * * - It is assumed that the grid_dims and dx arrays are at least * num_dims in length. * * - The updateGridPoint() and initializeFront() callback functions * MUST follow the protocol described in @ref FMM_Callback_API.h. * */ FMM_CoreData* FMM_Core_createFMM_CoreData( FMM_FieldData *fmm_field_data, const int num_dims, const int *grid_dims, const LSMLIB_REAL *dx, initializeFrontFuncPtr initializeFront, updateGridPointFuncPtr updateGridPoint); /*! * FMM_Core_destroyFMM_CoreData() frees the memory associated with an * FMM_CoreData structure. * * Arguments: * - fmm_core_data (in): FMM_CoreData "object" to be destroyed * * Return value: none * */ void FMM_Core_destroyFMM_CoreData(FMM_CoreData *fmm_core_data); /*! * FMM_Core_initializeFront() sets the initial set of "known" and "trial" * points. It first initializes the list of "known" points by * calling the user-provided initializeFront() function to locate * the points that border the interface. It then initializes the list * of "trial" points by updating and adding all of the neighbors of * "known" points. * * Arguments: * - fmm_core_data (in): FMM_CoreData "object" actively managing the * FMM computation * * Return value: none * */ void FMM_Core_initializeFront(FMM_CoreData *fmm_core_data); /*! * FMM_Core_setInitialFrontPoint() sets a grid point as being on the initial * front. * * Arguments: * - fmm_core_data (in): FMM_CoreData "object" actively managing the * FMM computation * - grid_idx (in): integer array containing the grid index of the * grid point to set as an initial front point * - value (in): value of initial front point from zero level * set (e.g. distance or arrival time) * * Return value: none * * NOTES: * - This function MUST be called during the user-defined * initializeFrontFuncPtr() callback function to add grid points * to the initial front. Otherwise, the initial front will remain * empty and the FMM calculation wll yield incorrect results. * * - If the value of a grid point is set to LSMLIB_REAL_MAX, then * it will be treated as being outside of the domain of the problem. * * - It is assumed that the size of the grid_idx array is at least * equal to the number of spatial dimensions of the problem. * */ void FMM_Core_setInitialFrontPoint( FMM_CoreData *fmm_core_data, int *grid_idx, LSMLIB_REAL value); /*! * FMM_Core_markPointOutsideDomain() sets a grid point as being outside of * the mathematical domain for the problem. * * Arguments: * - fmm_core_data (in): FMM_CoreData "object" actively managing the * FMM computation * - grid_idx (in): integer array containing the grid index of the * grid point to set outside of the domain * * Return value: none * * NOTES: * - This function MUST be called before FMM_Core_advanceFront() * to set grid points as being outside of the mathematical domain * for the problem. Otherwise, all grid points will be treated as * being in the interior of the domain. * * - It is assumed that the size of the grid_idx array is at least * equal to the number of spatial dimensions of the problem. * */ void FMM_Core_markPointOutsideDomain( FMM_CoreData *fmm_core_data, int *grid_idx); /*! * FMM_Core_advanceFront() advances the front of "known" grid points by * a single grid point. It basically carries out the main update * loop of the Fast Marching Method. * * Arguments: * - fmm_core_data (in): FMM_CoreData "object" actively managing the * FMM computation * * Return value: none * */ void FMM_Core_advanceFront(FMM_CoreData *fmm_core_data); /*! * FMM_Core_moreGridPointsToUpdate() determines whether there are more grid * points to update. * * Arguments: * - fmm_core_data (in): FMM_CoreData "object" actively managing the * FMM computation * * Return value: true (1) if there are more grid points to update; * false (0) otherwise * */ int FMM_Core_moreGridPointsToUpdate(FMM_CoreData *fmm_core_data); /*! * FMM_Core_getGridPointStatusData() is an accessor function for * the gridpoint_status data array managed by the FMM_CoreData structure. * * Arguments: * - fmm_core_data (in): FMM_CoreData "object" actively managing the * FMM computation * * Return value: pointer to gridpoint_status data array * */ int* FMM_Core_getGridPointStatusDataArray(FMM_CoreData *fmm_core_data); #ifdef __cplusplus } #endif #endif ================================================ FILE: OptolithiumC/libs/eikonal/include/FMM_Heap.h ================================================ /* * File: FMM_Heap.h * Copyrights: (c) 2005 The Trustees of Princeton University and Board of * Regents of the University of Texas. All rights reserved. * (c) 2009 Kevin T. Chu. All rights reserved. * Revision: $Revision: 149 $ * Modified: $Date: 2009-01-18 00:31:09 -0800 (Sun, 18 Jan 2009) $ * Description: Header file for C heap library for supporting FMM algorithm */ #ifndef included_FMM_Heap_h #define included_FMM_Heap_h #include "FMM_API.h" #ifdef __cplusplus extern "C" { #endif /*! \file FMM_Heap.h * * \brief * @ref FMM_Heap.h provides the heap data structure required to implement * the Fast Marching Method. * * In addition to the operations on a typical heap, FMM_Heap provides some * information on the movement of FMM_HeapNodes in the heap which is required * to maintain "back pointers" from the grid to the nodes in the heap. For * details see "Level Set Methods and Fast Marching Methods" by J.A. Sethian. * * It is designed to minimize the number of updates of "pointers" * from the grid to the FMM_HeapNodes when the tentative values of the * distance function are updated. This goal is achieved by storing * the FMM_HeapNodes separately from the array that represents the heap; * an auxilliary array of integer "pointers" to the array of FMM_HeapNodes * actually represents the heap. * * *

NOTES:

* - At this point in time, this library is only works for up * to 8 spatial dimensions. This source of this * is the size of the grid_idx data member in * of the FMM_HeapNode structure. * */ /*! * The Heap structure stores the internal data required to maintain * the state of the heap. */ typedef struct FMM_Heap FMM_Heap; /*! * maximum number of spatial dimensions in grid */ #define FMM_HEAP_MAX_NDIM (8) /*! * The FMM_HeapNode structure stores the index of a grid cell, the value * of the function within that cell, and heap_pos that is used * internally to maintain the heap. */ typedef struct HeapNode { int grid_idx[FMM_HEAP_MAX_NDIM]; /* grid index */ LSMLIB_REAL value; /* function value */ int heap_pos; /* internal data */ } FMM_HeapNode; /*! * FMM_Heap_createHeap() dynamically allocates an empty heap with the * specified amount of memory allocated for the heap and the specified * growth factor. * * Arguments: * - num_dims (in): number of spatial dimensions for FMM calculation * - heap_mem_size (in): number of nodes to initially allocate memory for * - growth_factor (in): factor used to grow size of memory allocated for * heap when the heap exhausts its memory allocation * * Return value: pointer to new heap * * NOTES: * - To use the default amount of memory (64 FMM_HeapNodes), * set heap_mem_size to 0. * * - To use the default growth factor (2), set growth_factor = 0. * */ FMM_Heap* FMM_Heap_createHeap(int num_dims, int heap_mem_size, LSMLIB_REAL growth_factor); /*! * FMM_Heap_destroyHeap() frees the memory used to store the heap. * * Arguments: * - heap (in): pointer to heap to be destroyed * * Return value: none * */ void FMM_Heap_destroyHeap(FMM_Heap* heap); /*! * FMM_Heap_insertNode() inserts a new node into the heap and returns * an integer handle to the node. * * Arguments: * - heap (in): pointer to heap * - grid_idx (in): grid index of node to insert into heap * - value (in): value of node to insert into heap * * Return value: integer handle to the FMM_HeapNode created for * the new node * * NOTE: the integer handle that is returned by this function * may be changed by an FMM_Heap_extractMin() operation and need * to be updated accordingly after calling FMM_Heap_extractMin(). */ int FMM_Heap_insertNode(FMM_Heap* heap, int *grid_idx, LSMLIB_REAL value); /*! * FMM_Heap_extractMin() removes the FMM_HeapNode with the minimum * function value from the heap and returns it as the return value. * Additionally, this method may change the node handle for * one node in the heap. Information about the node whose * handle is changed is optionally returned through the * moved_node and moved_handle arguments. If no FMM_HeapNode needed * to be moved during the operation, (*moved_handle) is set * to -1 and (*moved_node) is given a very large value * (invalid state). * * Arguments: * - heap (in): pointer to heap * - moved_node (out): FMM_HeapNode of node in the heap that was moved * (if a node was actually moved) * - moved_handle (out): integer handle for FMM_HeapNode that was moved * (if a node was actually moved) * * Return value: FMM_HeapNode possessing minimum value * * NOTES: * - the user is responsible for providing the memory for * moved_node and moved_handle. * * - moved_node and moved_handle may be independently set * to NULL if the moved node information is not needed. * */ FMM_HeapNode FMM_Heap_extractMin(FMM_Heap* heap, FMM_HeapNode* moved_node, int* moved_handle); /*! * FMM_Heap_updateNode() updates the value of function in the specified * node and moves it up or down the heap so that the heap-property * is preserved. * * Arguments: * - heap (in): pointer to heap * - node_handle (in): integer handle of node to update * - value (in): new value for updated node * * Return value: none * */ void FMM_Heap_updateNode(FMM_Heap* heap, int node_handle, LSMLIB_REAL value); /*! * FMM_Heap_clear() empties out the heap. * * Arguments: * - heap (in): pointer to heap * * Return value: none * */ void FMM_Heap_clear(FMM_Heap* heap); /*! * FMM_Heap_isEmpty() returns true (1) if the heap is empty and * false (0) otherwise. * * Arguments: * - heap (in): pointer to heap * * Return value: true (1) if the heap is empty; false (0) otherwise * */ int FMM_Heap_isEmpty(FMM_Heap* heap); /*! * FMM_Heap_getNode() returns the specified node * * Arguments: * - heap (in): pointer to heap * - node_handle (in): integer handle of requested node * * Return value: requested FMM_HeapNode * */ FMM_HeapNode FMM_Heap_getNode(FMM_Heap* heap,int node_handle); /*! * FMM_Heap_getHeapSize() returns the current number of nodes in the heap * * Arguments: * - heap (in): pointer to heap * * Return value: current number of nodes in heap * */ int FMM_Heap_getHeapSize(FMM_Heap* heap); /*! * FMM_Heap_getHeapMemSize() returns the current maximum number of nodes * that the heap can accomodate. * * Arguments: * - heap (in): pointer to heap * * Return value: maximum number of nodes that the heap can currently * accomodate before requiring memory reallocation * */ int FMM_Heap_getHeapMemSize(FMM_Heap* heap) ; /*! * FMM_Heap_prinHeapData() prints all data members for the specified * FMM_Heap structure. * * Arguments: * - heap (in): pointer to heap * * Return value: none * */ void FMM_Heap_printHeapData(FMM_Heap* heap); #ifdef __cplusplus } #endif #endif ================================================ FILE: OptolithiumC/libs/eikonal/include/FMM_Macros.h ================================================ /* * File: FMM_Macros.h * Copyrights: (c) 2005 The Trustees of Princeton University and Board of * Regents of the University of Texas. All rights reserved. * (c) 2009 Kevin T. Chu. All rights reserved. * Revision: $Revision: 149 $ * Modified: $Date: 2009-01-18 00:31:09 -0800 (Sun, 18 Jan 2009) $ * Description: Header file that defines several common macros used * for Fast Marching Method calculations */ /*! \file FMM_Macros.h * * \brief * @ref FMM_Macros.h provides several macros used for Fast Marching * Method calculations. * */ #ifndef included_FMM_Macros_h #define included_FMM_Macros_h /*======================= Helper Functions ==========================*/ /* LSM_FMM_ABS() computes the absolute value of its argument. */ /* This macro is defined so that LSMLIB does not have to rely on the */ /* C math library. */ #define LSM_FMM_ABS(x) ((x) > 0 ? (x) : -1.0*(x)) /* * LSM_FMM_IDX() computes the array index for the specified * grid index and grid dimensions. * * Arguments: * idx (out): array index * grid_idx (in): grid index * grid_dims (in): grid dimensions * * NOTES: * (1) idx MUST be a valid l-value. * (2) FMM_NDIM MUST be defined by user code. * */ #define LSM_FMM_IDX(idx, grid_idx, grid_dims) \ { \ int lsm_fmm_dir; \ int grid_size_lower_dims = 1; \ idx = 0; \ for (lsm_fmm_dir = 0; lsm_fmm_dir < FMM_NDIM; lsm_fmm_dir++) { \ idx += grid_idx[lsm_fmm_dir]*grid_size_lower_dims; \ grid_size_lower_dims *= grid_dims[lsm_fmm_dir]; \ } \ } /* * LSM_FMM_IDX_OUT_OF_BOUNDS() determines whether the given * grid index lies in the computational domain. * * Arguments: * result (out): 1 if grid index is out of bounds; 0 otherwise. * grid_idx (in): grid index * grid_dims (in): grid dimensions * * NOTES: * (1) result MUST be a valid l-value. * (2) FMM_NDIM MUST be defined by user code. * */ #define LSM_FMM_IDX_OUT_OF_BOUNDS(result, grid_idx, grid_dims) \ { \ int lsm_fmm_dir; \ result = 0; \ for (lsm_fmm_dir = 0; lsm_fmm_dir < FMM_NDIM; lsm_fmm_dir++) { \ if ( (grid_idx[lsm_fmm_dir]<0) \ || (grid_idx[lsm_fmm_dir]>grid_dims[lsm_fmm_dir]-1) ) { \ result = 1; \ break; \ } \ } \ } #endif ================================================ FILE: OptolithiumC/libs/eikonal/src/FMM_Core.c ================================================ /* * File: FMM_Core.c * Copyrights: (c) 2005 The Trustees of Princeton University and Board of * Regents of the University of Texas. All rights reserved. * (c) 2009 Kevin T. Chu. All rights reserved. * Revision: $Revision: 149 $ * Modified: $Date: 2009-01-18 00:31:09 -0800 (Sun, 18 Jan 2009) $ * Description: Implementation of FMM_Core functions */ #include #include #include #include "FMM_Heap.h" #include "FMM_Core.h" /*======================= FMM_Core Constants =========================*/ #define FMM_CORE_TRUE (1) #define FMM_CORE_FALSE (0) #define FMM_CORE_NULL (0) #define FMM_CORE_MAX_NDIM (FMM_HEAP_MAX_NDIM) /*======================= FMM_Core Macros =========================*/ #define FMM_CORE_ABS(x) ((x) > 0 ? (x) : -1.0*(x)) #define FMM_CORE_IDX(idx, num_dims, grid_idx, grid_dims) \ { \ int macro_i; /* loop variable */ \ int macro_num_gridpts_per_grid_idx = 1; \ idx = 0; \ for (macro_i = 0; macro_i < num_dims; macro_i++) { \ idx += macro_num_gridpts_per_grid_idx*grid_idx[macro_i]; \ macro_num_gridpts_per_grid_idx *= grid_dims[macro_i]; \ } \ } #define FMM_CORE_IDX_OUT_OF_BOUNDS(out_of_bounds, num_dims, grid_idx, \ grid_dims) \ { \ int macro_i; /* loop variable */ \ out_of_bounds = 0; \ for (macro_i = 0; macro_i < num_dims; macro_i++) { \ if ( (grid_idx[macro_i] < 0) \ || (grid_idx[macro_i] > grid_dims[macro_i]-1) ) { \ out_of_bounds = 1; \ break; \ } \ } \ } /*=============== FMM_Core Helper Function Declarations ==============*/ /* * FMM_Core_updateNeighbors() updates the neighbors of the specified * grid point. */ static void FMM_Core_updateNeighbors(FMM_CoreData *fmm_core_data, int *grid_idx); /*=============== Fast Marching Method Data Structures ==============*/ struct FMM_CoreData { /* field data */ int num_dims; FMM_FieldData *fmm_field_data; int grid_dims[FMM_CORE_MAX_NDIM]; LSMLIB_REAL dx[FMM_CORE_MAX_NDIM]; /* function pointer to grid update function */ initializeFrontFuncPtr initializeFront; updateGridPointFuncPtr updateGridPoint; /* internal data */ int* heapnode_handles; int* gridpoint_status; FMM_Heap* trial_points; FMM_Heap* known_points; }; /*=============== FMM_Core API Function Definitions ==============*/ FMM_CoreData* FMM_Core_createFMM_CoreData( FMM_FieldData *fmm_field_data, const int num_dims, const int *grid_dims, const LSMLIB_REAL *dx, initializeFrontFuncPtr initializeFront, updateGridPointFuncPtr updateGridPoint) { FMM_CoreData *fmm_core_data; /* pointer to new FMM_CoreData */ int num_gridpoints; /* number of grid points */ int initial_heap_size; /* initial size for FMM_Heap */ int i; /* loop variable */ int *ptr; /* integer pointer loop variable */ /* check that num_dimension is supported */ if ( num_dims > FMM_CORE_MAX_NDIM ) { fprintf(stderr, "ERROR: Invalid number of dimensions. Only NDIM < %d supported.\n", FMM_CORE_MAX_NDIM); exit(-1); } /* allocate memory for FMM_CoreData */ fmm_core_data = (FMM_CoreData*) malloc( sizeof(FMM_CoreData) ); /* compute number of grid points */ num_gridpoints = 1; for (i = 0; i < num_dims; i++) num_gridpoints *= grid_dims[i]; /* initialize FMM data */ fmm_core_data->heapnode_handles = (int*) malloc(num_gridpoints*sizeof(int)); fmm_core_data->gridpoint_status = (int*) malloc(num_gridpoints*sizeof(int)); fmm_core_data->num_dims = num_dims; fmm_core_data->fmm_field_data = fmm_field_data; fmm_core_data->initializeFront = initializeFront; fmm_core_data->updateGridPoint = updateGridPoint; /* initialize grid_dims and dx to zero */ for (i = 0; i < FMM_CORE_MAX_NDIM; i++) { fmm_core_data->grid_dims[i] = 0; fmm_core_data->dx[i] = 0.0; } /* copy of grid_dims and dx from user specified arguments */ /* NOTE: data is only copied for the number of */ /* dimensions specified for the computation. */ for (i = 0; i < num_dims; i++) { fmm_core_data->grid_dims[i] = grid_dims[i]; fmm_core_data->dx[i] = dx[i]; } /* create an FMM_Heap to store the trial points */ /* NOTE: using default heap growth factor by */ /* specifying 0 for the second argument */ initial_heap_size = 0; for (i = 0; i < num_dims; i++) initial_heap_size += grid_dims[i]; fmm_core_data->trial_points = FMM_Heap_createHeap(num_dims,initial_heap_size,0); /* initialize heapnode handles to have a default value of -1 */ ptr = fmm_core_data->heapnode_handles; for (i = 0; i < num_gridpoints; i++, ptr++) { *ptr = -1; } /* initialize gridpoint status of all cells to FAR */ ptr = fmm_core_data->gridpoint_status; for (i = 0; i < num_gridpoints; i++, ptr++) { *ptr = FAR; } return fmm_core_data; } void FMM_Core_destroyFMM_CoreData(FMM_CoreData *fmm_core_data) { free(fmm_core_data->heapnode_handles); free(fmm_core_data->gridpoint_status); FMM_Heap_destroyHeap(fmm_core_data->trial_points); if (fmm_core_data->known_points != FMM_CORE_NULL) FMM_Heap_destroyHeap(fmm_core_data->known_points); free(fmm_core_data); } void FMM_Core_initializeFront(FMM_CoreData *fmm_core_data) { int num_dims = fmm_core_data->num_dims; int *grid_dims = fmm_core_data->grid_dims; FMM_FieldData *fmm_field_data = fmm_core_data->fmm_field_data; int num_gridpoints; /* list of known points */ FMM_Heap *known_points; int initial_heap_size; int grid_idx[FMM_CORE_MAX_NDIM]; /* auxilliary variables */ int i; /* loop variable */ /* compute the number of grid points and initial heap size */ num_gridpoints = 1; initial_heap_size = 0; for (i = 0; i < num_dims; i++) { num_gridpoints *= grid_dims[i]; initial_heap_size += grid_dims[i]; } /* create FMM_Heap to contain known points */ /* NOTE: using default heap growth factor by */ /* specifying 0 for the second argument */ known_points = FMM_Heap_createHeap(num_dims,initial_heap_size,0); fmm_core_data->known_points = known_points; /* let user-provided callback function find and initialize the front */ fmm_core_data->initializeFront( fmm_core_data, fmm_field_data, fmm_core_data->num_dims, fmm_core_data->grid_dims, fmm_core_data->dx); /* * Set initial set of trial points (i.e. all of the * neighbors of the initial set of known points). * For all "known" points: * (1) update their neighbors * (2) add their neighbors to the list of trial points */ while (!FMM_Heap_isEmpty(known_points)) { /* extract grid index of next known point */ FMM_HeapNode node = FMM_Heap_extractMin(known_points, FMM_CORE_NULL, FMM_CORE_NULL); /* update neighbors if the value of the node is */ /* less than LSMLIB_REAL_MAX */ if (node.value < LSMLIB_REAL_MAX) { /* set grid_idx */ for (i = 0; i < num_dims; i++) { grid_idx[i] = node.grid_idx[i]; } for (i = num_dims; i < FMM_CORE_MAX_NDIM; i++) { grid_idx[i] = 0; } FMM_Core_updateNeighbors(fmm_core_data, grid_idx); } } /* end loop over "known" points */ /* clean up memory */ FMM_Heap_destroyHeap(known_points); fmm_core_data->known_points = FMM_CORE_NULL; } /* * FMM_Core_setInitialFrontPoint() first makes a local copy of the grid_idx * because the FMM_CORE_IDX calculation and FMM_Heap_insertNode() function * require that grid_idx is an array of size FMM_CORE_MAX_NDIM * (= FMM_HEAP_MAX_NDIM). */ void FMM_Core_setInitialFrontPoint( FMM_CoreData *fmm_core_data, int *grid_idx, LSMLIB_REAL value) { int num_dims = fmm_core_data->num_dims; int *grid_dims = fmm_core_data->grid_dims; int *gridpoint_status = fmm_core_data->gridpoint_status; int grid_idx_local[FMM_CORE_MAX_NDIM]; /* local copy of grid_idx */ /* auxilliary variables */ int i; /* loop variable */ int idx; /* data array index */ /* make local copy of grid index */ for (i = 0; i < num_dims; i++) { grid_idx_local[i] = grid_idx[i]; } for (i = num_dims; i < FMM_CORE_MAX_NDIM; i++) { grid_idx_local[i] = 0; } /* Set status of grid point based and add it to the "known_points" heap. */ FMM_CORE_IDX(idx, num_dims, grid_idx_local, grid_dims); gridpoint_status[idx] = KNOWN; FMM_Heap_insertNode(fmm_core_data->known_points,grid_idx_local,value); } /* * FMM_Core_markPointOutsideDomain() first makes a local copy of the grid_idx * because the FMM_CORE_IDX calculation and FMM_Heap_insertNode() function * require that grid_idx is an array of size FMM_CORE_MAX_NDIM * (= FMM_HEAP_MAX_NDIM). */ void FMM_Core_markPointOutsideDomain( FMM_CoreData *fmm_core_data, int *grid_idx) { int num_dims = fmm_core_data->num_dims; int *grid_dims = fmm_core_data->grid_dims; int *gridpoint_status = fmm_core_data->gridpoint_status; int grid_idx_local[FMM_CORE_MAX_NDIM]; /* local copy of grid_idx */ /* auxilliary variables */ int i; /* loop variable */ int idx; /* data array index */ /* make local copy of grid index */ for (i = 0; i < num_dims; i++) { grid_idx_local[i] = grid_idx[i]; } for (i = num_dims; i < FMM_CORE_MAX_NDIM; i++) { grid_idx_local[i] = 0; } /* set grid point status to OUTSIDE_DOMAIN */ FMM_CORE_IDX(idx, num_dims, grid_idx_local, grid_dims); gridpoint_status[idx] = OUTSIDE_DOMAIN; } /* * NOTES: * (1) There may be some error in the update of cells on the border * of the grid, but this error is not important as long as the * zero level set is sufficiently far away from the domain border. */ void FMM_Core_advanceFront(FMM_CoreData *fmm_core_data) { int num_dims = fmm_core_data->num_dims; int* grid_dims = fmm_core_data->grid_dims; FMM_Heap *fmm_trial_points = fmm_core_data->trial_points; int *heapnode_handles = fmm_core_data->heapnode_handles; int *gridpoint_status = fmm_core_data->gridpoint_status; FMM_HeapNode moved_node; int moved_handle; FMM_HeapNode min_node; int idx; /* * remove the point with the smallest value from the set of "trial" points. */ min_node = FMM_Heap_extractMin(fmm_trial_points, &moved_node, &moved_handle); /* correct the handle for the moved node */ if (-1 != moved_handle) { /* update heapnode_data if necessary */ FMM_CORE_IDX(idx, num_dims, moved_node.grid_idx, grid_dims); heapnode_handles[idx] = moved_handle; } /* set status of min node to "known" */ FMM_CORE_IDX(idx, num_dims, min_node.grid_idx, grid_dims); gridpoint_status[idx] = KNOWN; /* update neighbors */ FMM_Core_updateNeighbors(fmm_core_data, min_node.grid_idx); } int FMM_Core_moreGridPointsToUpdate(FMM_CoreData *fmm_core_data) { return ( FMM_Heap_isEmpty(fmm_core_data->trial_points) ? FMM_CORE_FALSE : FMM_CORE_TRUE); } int* FMM_Core_getGridPointStatusDataArray(FMM_CoreData *fmm_core_data) { return (fmm_core_data->gridpoint_status); } /*=============== FMM_Core Helper Function Definitions ==============*/ void FMM_Core_updateNeighbors(FMM_CoreData *fmm_core_data, int *grid_idx) { int* grid_dims = fmm_core_data->grid_dims; FMM_Heap *fmm_trial_points = fmm_core_data->trial_points; FMM_FieldData *fmm_field_data = fmm_core_data->fmm_field_data; int *heapnode_handles = fmm_core_data->heapnode_handles; int *gridpoint_status = fmm_core_data->gridpoint_status; int num_dims = fmm_core_data->num_dims; /* variables for update calculation */ int neighbor[FMM_CORE_MAX_NDIM]; int offset[FMM_CORE_MAX_NDIM]; LSMLIB_REAL value; int heapnode_handle; /* auxilliary variables */ int dir; /* loop variable for spatial directions */ int n; /* loop variable for neighbors */ int m; /* extra loop variable */ int idx; /* data array index */ int out_of_bounds; /* boolean indicating if index is out of bounds */ /* loop over coordinate directions */ for (dir = 0; dir < num_dims; dir++) { /* reset neighbor and offset */ for (m = 0; m < FMM_CORE_MAX_NDIM; m++) { neighbor[m] = 0; offset[m] = 0; } for (n = -1; n<=1; n+=2) { /* loop over neighbors */ PointStatus neighbor_status; offset[dir] = n; for (m = 0; m < num_dims; m++) neighbor[m] = grid_idx[m]+offset[m]; FMM_CORE_IDX_OUT_OF_BOUNDS(out_of_bounds, num_dims, neighbor, grid_dims); if (!out_of_bounds) { FMM_CORE_IDX(idx, num_dims, neighbor, grid_dims); neighbor_status = (PointStatus) gridpoint_status[idx]; if ( (KNOWN != neighbor_status) && (OUTSIDE_DOMAIN != neighbor_status) ) { /* compute trial values for neighbor */ value = fmm_core_data->updateGridPoint(fmm_core_data, fmm_field_data, neighbor, fmm_core_data->num_dims, fmm_core_data->grid_dims, fmm_core_data->dx); if (value < 0) value *= -1; /* only absolute value matters here */ if (FAR == neighbor_status) { /* set the status of the neighbor to TRIAL */ FMM_CORE_IDX(idx, num_dims, neighbor, grid_dims); gridpoint_status[idx] = TRIAL; /* insert the new TRIAL point into the FMM_Heap */ heapnode_handle = FMM_Heap_insertNode(fmm_trial_points, neighbor, value); /* set the heap node handle */ heapnode_handles[idx] = heapnode_handle; } else { /* * neighbor has status TRIAL, so just update its value in * the heap */ FMM_CORE_IDX(idx, num_dims, neighbor, grid_dims); FMM_Heap_updateNode(fmm_trial_points, heapnode_handles[idx], value); } } /* end update of neighbor point (not in "known" set) */ } /* end case: grid index of neighbor is not out of bounds */ } /* end loop over neighbors */ } /* end loop over coordinate directions */ } ================================================ FILE: OptolithiumC/libs/eikonal/src/FMM_Heap.c ================================================ /* * File: FMM_Heap.c * Copyrights: (c) 2005 The Trustees of Princeton University and Board of * Regents of the University of Texas. All rights reserved. * (c) 2009 Kevin T. Chu. All rights reserved. * Revision: $Revision: 149 $ * Modified: $Date: 2009-01-18 00:31:09 -0800 (Sun, 18 Jan 2009) $ * Description: C heap library for supporting fast marching method */ #include #include #include #include "FMM_Heap.h" /* * FMM_Heap Constants */ #define DEFAULT_HEAP_MEM_SIZE (64) #define DEFAULT_HEAP_GROWTH_FACTOR (2) /* * FMM_Heap Macros */ #define HEAP_POS(i) ( d_nodes[(i)].heap_pos ) #define PARENT_N(i) \ ( d_heap[ (int)( (d_nodes[(i)].heap_pos+1)/2 -1 )] ) #define CHILD_LEFT_N(i) \ ( d_heap[ (int)(2*(d_nodes[(i)].heap_pos+1) -1 )] ) #define CHILD_RIGHT_N(i) \ ( d_heap[ (int)( 2*(d_nodes[(i)].heap_pos+1) )] ) #define PARENT_H(i) ( (int)( ((i)+1)/2 -1 ) ) #define CHILD_LEFT_H(i) ( (int)( 2*((i)+1) -1 ) ) #define CHILD_RIGHT_H(i) ( (int)( 2*((i)+1) ) ) /* * Definition of FMM_Heap structure. */ struct FMM_Heap { int* d_heap; FMM_HeapNode* d_nodes; int d_num_dims; int d_heap_size; int d_heap_mem_size; LSMLIB_REAL d_heap_growth_factor; }; /*================== Helper Functions Declarations ==================*/ /* * FMM_Heap_makeNewHeap() allocates memory for and initializes all * nodes in the heap to have a big value (LSMLIB_REAL_MAX). * The amount of memory allocated is dynamically adjusted * to accomodate the number of nodes in the heap. */ static void FMM_Heap_makeNewHeap(FMM_Heap* heap, int heap_mem_size); /* * FMM_Heap_growHeap() increases the amount of the memory allocated for * the heap by the heap growth factor. * * NOTE: this is an EXPENSIVE operation because all FMM_HeapNodes * must be copied to the new array AND because all of the * "back-pointers" from the grid must be updated to reflect * the new locations of the FMM_HeapNodes. */ static void FMM_Heap_growHeap(FMM_Heap* heap); /* * FMM_Heap_upHeap() bubbles the specified position up the heap until * the value of the corresponding node is greater than its parent. */ static void FMM_Heap_upHeap(FMM_Heap* heap, int heap_pos); /* * FMM_Heap_downHeap() bubbles the specified position down the heap * until the value of the corresponding node is smaller than its parent. */ static void FMM_Heap_downHeap(FMM_Heap* heap, int heap_pos); /*===================================================================*/ /*==================== Function Definitions =========================*/ FMM_Heap* FMM_Heap_createHeap(int num_dims, int heap_mem_size, LSMLIB_REAL growth_factor) { FMM_Heap* heap; /* Check inputs */ if (heap_mem_size <= 0) heap_mem_size = DEFAULT_HEAP_MEM_SIZE; if (growth_factor < 1) growth_factor = DEFAULT_HEAP_GROWTH_FACTOR; heap = (FMM_Heap*) malloc(sizeof(FMM_Heap)); heap->d_num_dims = num_dims; heap->d_heap_size = 0; heap->d_heap_mem_size = heap_mem_size; heap->d_heap_growth_factor = growth_factor; FMM_Heap_makeNewHeap(heap, heap_mem_size); return heap; } void FMM_Heap_destroyHeap(FMM_Heap* heap) { free(heap->d_heap); free(heap->d_nodes); free(heap); } int FMM_Heap_insertNode(FMM_Heap* heap, int *grid_idx, LSMLIB_REAL value) { int *d_heap = heap->d_heap; FMM_HeapNode* d_nodes = heap->d_nodes; int d_heap_size = heap->d_heap_size; int i; /* insert node at bottom heap */ d_heap[d_heap_size] = d_heap_size; for (i = 0; i< heap->d_num_dims; i++) { d_nodes[d_heap_size].grid_idx[i] = grid_idx[i]; } d_nodes[d_heap_size].value = value; d_nodes[d_heap_size].heap_pos = d_heap_size; /* bubble it up the heap until the heap property is satisfied */ FMM_Heap_upHeap(heap, d_heap_size); /* update heap size information and grow heap memory if necessary */ heap->d_heap_size++; if (heap->d_heap_size == heap->d_heap_mem_size) FMM_Heap_growHeap(heap); return (heap->d_heap_size-1); } FMM_HeapNode FMM_Heap_extractMin(FMM_Heap* heap, FMM_HeapNode* moved_node, int* moved_handle) { int *d_heap = heap->d_heap; FMM_HeapNode* d_nodes = heap->d_nodes; int d_heap_size = heap->d_heap_size; int root_handle = d_heap[0]; /* handle for root of heap */ FMM_HeapNode moved_node_local; int moved_handle_local; FMM_HeapNode min_node = d_nodes[root_handle]; /* copy root of heap */ /* * if min_node was not located at the end of d_nodes, * fill the gap in d_heap left by moving the FMM_HeapNode * at the end of d_nodes to the position occupied * by min_node and the FMM_HeapNode at the end of d_nodes * into an invalid state */ if (root_handle != d_heap_size-1) { /* set moved node and handle */ moved_node_local = d_nodes[d_heap_size-1]; moved_handle_local = root_handle; /* replace min_node wth moved_node and fix pointer from d_heap */ d_nodes[root_handle] = moved_node_local; d_heap[moved_node_local.heap_pos] = root_handle; /* invalidate copy of moved_node */ d_nodes[d_heap_size-1].value = LSMLIB_REAL_MAX; } else { int i; /* set position occupied by root node to invalid state */ d_nodes[root_handle].value = LSMLIB_REAL_MAX; /* set moved_node and moved_handle to invalid state */ for (i = 0; i < FMM_HEAP_MAX_NDIM; i++) { moved_node_local.grid_idx[i] = -1; } moved_node_local.value = LSMLIB_REAL_MAX; moved_node_local.heap_pos = -1; moved_handle_local = -1; } /* * move the last FMM_HeapNode in the heap (d_heap NOT d_nodes) * to the root position and trickle it down until the heap * property is satisfied using the FMM_Heap_downHeap() method. */ HEAP_POS(d_heap[d_heap_size-1]) = 0; d_heap[0] = d_heap[d_heap_size-1]; FMM_Heap_downHeap(heap, 0); /* * copy the moved node data into moved_node and moved_handle *if they are not NULL */ if (moved_handle) (*moved_handle) = moved_handle_local; if (moved_node) { (*moved_node) = moved_node_local; /* * update moved_node's heap_pos field in case it changed * during the FMM_Heap_downHeap() operation */ if (0 < moved_handle_local) moved_node->heap_pos = HEAP_POS(moved_handle_local); } /* remove the last node from the heap */ d_heap[d_heap_size-1] = -1; heap->d_heap_size--; return min_node; } void FMM_Heap_updateNode(FMM_Heap* heap, int node_handle, LSMLIB_REAL value) { int *d_heap = heap->d_heap; FMM_HeapNode* d_nodes = heap->d_nodes; d_nodes[node_handle].value = value; /* update value of node */ /* bubble the node up/down the heap to reinstate heap property */ if ( (HEAP_POS(node_handle) > 0) /* make sure there is parent to check */ && (value < d_nodes[PARENT_N(node_handle)].value) ) { FMM_Heap_upHeap(heap, HEAP_POS(node_handle)); } else { FMM_Heap_downHeap(heap, HEAP_POS(node_handle)); } } void FMM_Heap_clear(FMM_Heap* heap) { int *d_heap = heap->d_heap; FMM_HeapNode* d_nodes = heap->d_nodes; int i; /* reset heap size to zero */ heap->d_heap_size = 0; /* * initialize the value of all nodes to LSMLIB_REAL_MAX and all * heap pointers to -1 */ for (i = 0; i < heap->d_heap_mem_size; i++) { d_heap[i] = -1; d_nodes[i].value = LSMLIB_REAL_MAX; } } /** * FMM_Heap_isEmpty() returns true if the heap is empty and false otherwise. */ int FMM_Heap_isEmpty(FMM_Heap* heap) { if (0 == heap->d_heap_size) return 1; else return 0; } /** * FMM_Heap_getNode() returns the specified node */ FMM_HeapNode FMM_Heap_getNode(FMM_Heap* heap,int node_handle) { return heap->d_nodes[node_handle]; } int FMM_Heap_getHeapSize(FMM_Heap* heap) { return heap->d_heap_size; } int FMM_Heap_getHeapMemSize(FMM_Heap* heap) { return heap->d_heap_mem_size; } void FMM_Heap_printHeapData(FMM_Heap* heap) { int *d_heap = heap->d_heap; FMM_HeapNode* d_nodes = heap->d_nodes; int d_heap_size = heap->d_heap_size; printf("\nprintHeapData...\n"); printf("FMM_Heap: this = %ld\n", (long int) heap); printf("d_heap = %ld\n", (long int) d_heap); printf("d_nodes = %ld\n", (long int) d_nodes); printf("d_heap_size = %d\n", d_heap_size); printf("d_heap_mem_size = %d\n", heap->d_heap_mem_size); printf("d_heap_growth_factor = %f\n\n", heap->d_heap_growth_factor); } /*================== Helper Functions Definitions ===================*/ void FMM_Heap_makeNewHeap(FMM_Heap* heap, int heap_mem_size) { int i; /* allocate memory for heap */ heap->d_heap = (int*) malloc(heap_mem_size*sizeof(int)); heap->d_nodes = (FMM_HeapNode*) malloc(heap_mem_size*sizeof(FMM_HeapNode)); /* initialize the value of all nodes to LSMLIB_REAL_MAX and all heap pointers to -1 */ for (i = 0; i < heap_mem_size; i++) { heap->d_heap[i] = -1; heap->d_nodes[i].value = LSMLIB_REAL_MAX; } } void FMM_Heap_growHeap(FMM_Heap* heap) { int *d_heap = heap->d_heap; FMM_HeapNode* d_nodes = heap->d_nodes; int d_heap_size = heap->d_heap_size; LSMLIB_REAL d_heap_growth_factor = heap->d_heap_growth_factor; int i; int *old_heap; FMM_HeapNode *old_nodes; /* compute new heap memory size */ heap->d_heap_mem_size = (int) (heap->d_heap_mem_size*d_heap_growth_factor+1); /* save pointer to old heap and allocate memory for new heap */ old_heap = d_heap; old_nodes = d_nodes; FMM_Heap_makeNewHeap(heap, heap->d_heap_mem_size); /* copy nodes from old heap to new heap */ d_heap_size = heap->d_heap_size; d_heap = heap->d_heap; d_nodes = heap->d_nodes; for (i=0;id_heap; FMM_HeapNode* d_nodes = heap->d_nodes; int parent_pos; int tmp; parent_pos = PARENT_H(heap_pos); while ( (heap_pos > 0) && (d_nodes[d_heap[heap_pos]].value < d_nodes[d_heap[parent_pos]].value) ) { /* swap heap positions in d_nodes */ HEAP_POS(d_heap[heap_pos]) = parent_pos; HEAP_POS(d_heap[parent_pos]) = heap_pos; /* swap node handle with parent node handle in d_heap */ tmp = d_heap[heap_pos]; d_heap[heap_pos] = d_heap[parent_pos]; d_heap[parent_pos] = tmp; /* update heap_pos and parent heap_pos */ heap_pos = parent_pos; parent_pos = PARENT_H(heap_pos); } } void FMM_Heap_downHeap(FMM_Heap* heap, int heap_pos) { int *d_heap = heap->d_heap; FMM_HeapNode* d_nodes = heap->d_nodes; int d_heap_size = heap->d_heap_size; int left_pos; int right_pos; LSMLIB_REAL cur_value; LSMLIB_REAL left_value; LSMLIB_REAL right_value; int tmp; int done = 0; while ( !done && (d_heap_size > CHILD_LEFT_H(heap_pos)) ) { left_pos = CHILD_LEFT_H(heap_pos); right_pos = CHILD_RIGHT_H(heap_pos); cur_value = d_nodes[d_heap[heap_pos]].value; left_value = d_nodes[d_heap[left_pos]].value; right_value = LSMLIB_REAL_MAX; if (right_pos < d_heap_size) { right_value = d_nodes[d_heap[right_pos]].value; } if ( (cur_value <= left_value) && (cur_value <= right_value) ) { /* heap_pos is min, so we're done */ done = 1; } else if ( (left_value < cur_value) && (left_value <= right_value) ){ /* left child is min */ /* swap heap positions in d_nodes */ HEAP_POS(d_heap[heap_pos]) = left_pos; HEAP_POS(d_heap[left_pos]) = heap_pos; /* swap node handle with left child node handle in d_heap */ tmp = d_heap[heap_pos]; d_heap[heap_pos] = d_heap[left_pos]; d_heap[left_pos] = tmp; /* set heap_pos to the left child of heap_pos */ heap_pos = left_pos; } else if (right_pos < d_heap_size) { /* right child is min */ /* swap heap positions in d_nodes */ HEAP_POS(d_heap[heap_pos]) = right_pos; HEAP_POS(d_heap[right_pos]) = heap_pos; /* swap node handle with right child node handle in d_heap */ tmp = d_heap[heap_pos]; d_heap[heap_pos] = d_heap[right_pos]; d_heap[right_pos] = tmp; /* set heap_pos to the right child of heap_pos */ heap_pos = right_pos; } } } ================================================ FILE: OptolithiumC/libs/eikonal/src/FMM_eikonal2d.c ================================================ /* * File: lsm_FMM_eikonal.c * Copyrights: (c) 2005 The Trustees of Princeton University and Board of * Regents of the University of Texas. All rights reserved. * (c) 2009 Kevin T. Chu. All rights reserved. * Revision: $Revision: 149 $ * Modified: $Date: 2009-01-18 00:31:09 -0800 (Sun, 18 Jan 2009) $ * Description: Implementation of Fast Marching Method for Eikonal equation */ /*! \file lsm_FMM_eikonal.c * * \brief * @ref lsm_FMM_eikonal.c provides "generic" implementations of * first- and second-order accurate Fast Marching Method schemes * for solving the Eikonal equation. The code is "templated" on * the number of dimensions through the use of macro definitions * that MUST be provided by the user. * * *

Usage:

* * -# Define the following macros: * -# FMM_NDIM: the number of spatial dimensions. * -# FMM_EIKONAL_SOLVE_EIKONAL_EQUATION: desired name of function * that solves the Eikonal equation. * -# FMM_EIKONAL_INITIALIZE_FRONT: desired name of function that * initializes the values on the front. * -# FMM_EIKONAL_UPDATE_GRID_POINT_ORDER1: desired name of function * that updates the value of the solution at grid points using * a first-order accurate discretization * -# FMM_EIKONAL_UPDATE_GRID_POINT_ORDER2: desired name of function * that updates the value of the solution at grid points using * a second-order accurate discretization * -# Include this file at the end of the implementation file * for the n-dimentsional Eikonal equation solver. * -# Compile code. * * *

NOTES:

* - Because this code depends on macros, care must be taken to * ensure that macros do not conflict. * */ #ifndef included_lsm_FMM_eikonal_c #define included_lsm_FMM_eikonal_c #include #include #include #include #include "FMM_Config2d.h" #include "FMM_Core.h" #include "FMM_Heap.h" #include "FMM_Macros.h" /* * This macro protect against misuse of the code in this file. It will * cause the compiler to complain. */ #ifndef FMM_NDIM #error "lsm_FMM_eikonal: required macro FMM_NDIM not defined!" #endif #ifndef FMM_EIKONAL_SOLVE_EIKONAL_EQUATION #error "lsm_FMM_eikonal: required macro FMM_EIKONAL_SOLVE_EIKONAL_EQUATION not defined!" #endif #ifndef FMM_EIKONAL_INITIALIZE_FRONT #error "lsm_FMM_eikonal: required macro FMM_EIKONAL_INITIALIZE_FRONT not defined!" #endif #ifndef FMM_EIKONAL_UPDATE_GRID_POINT_ORDER1 #error "lsm_FMM_eikonal: required macro FMM_EIKONAL_UPDATE_GRID_POINT_ORDER1 not defined!" #endif #ifndef FMM_EIKONAL_UPDATE_GRID_POINT_ORDER2 #error "lsm_FMM_eikonal: required macro FMM_EIKONAL_UPDATE_GRID_POINT_ORDER2 not defined!" #endif /*================== lsm_FMM_eikonal Data Structures ================*/ struct FMM_FieldData { LSMLIB_REAL *phi; /* solution to Eikonal equation */ const LSMLIB_REAL *speed; /* speed function */ }; /*============= FMM Eikonal Equation Solver Functions ===============*/ /* * FMM_EIKONAL_INITIALIZE_FRONT() implements the callback * function required by FMM_Core::FMM_initializeFront() to find * and initialize the front. */ void FMM_EIKONAL_INITIALIZE_FRONT( FMM_CoreData *fmm_core_data, FMM_FieldData *fmm_field_data, int num_dims, int *grid_dims, LSMLIB_REAL *dx); /* * FMM_EIKONAL_UPDATE_GRID_POINT_ORDER1() implements the callback * function required by FMM_Core::FMM_Core_updateNeighbors() to * update the solution at a grid point. It computes and returns * the updated phi value of the specified grid point using values of * neighbors that have status "KNOWN" and a first-order accurate * discretization of the gradient operator. */ LSMLIB_REAL FMM_EIKONAL_UPDATE_GRID_POINT_ORDER1( FMM_CoreData *fmm_core_data, FMM_FieldData *fmm_field_data, int *grid_idx, int num_dims, int *grid_dims, LSMLIB_REAL *dx); /* * FMM_EIKONAL_UPDATE_GRID_POINT_ORDER2() implements the callback * function required by FMM_Core::FMM_Core_updateNeighbors() to * update the solution at a grid point. It computes and returns * the updated phi value of the specified grid point using values of * neighbors that have status "KNOWN" and a second-order accurate * discretization of the gradient operator when a sufficient number * of "KNOWN" neighboring grid points are available. When there are * an insufficient number of "KNOWN" neighbors, the discretization * of the gradient drops to first-order accuracy. */ LSMLIB_REAL FMM_EIKONAL_UPDATE_GRID_POINT_ORDER2( FMM_CoreData *fmm_core_data, FMM_FieldData *fmm_field_data, int *grid_idx, int num_dims, int *grid_dims, LSMLIB_REAL *dx); /*==================== Function Definitions =========================*/ int FMM_EIKONAL_SOLVE_EIKONAL_EQUATION( LSMLIB_REAL *phi, const LSMLIB_REAL *speed, LSMLIB_REAL *mask, const int spatial_discretization_order, const int *grid_dims, const LSMLIB_REAL *dx) { /* fast marching method data */ FMM_CoreData *fmm_core_data; FMM_FieldData *fmm_field_data; /* pointers to callback functions */ updateGridPointFuncPtr updateGridPoint; initializeFrontFuncPtr initializeFront; /* auxiliary variables */ int num_gridpoints; /* number of grid points */ int i, idx; /* loop variables */ /****************************************************** * set up appropriate grid point update and front * detection/initialization functions based on the * specified spatial derivative order ******************************************************/ initializeFront = &FMM_EIKONAL_INITIALIZE_FRONT; if (spatial_discretization_order == 1) { updateGridPoint = &FMM_EIKONAL_UPDATE_GRID_POINT_ORDER1; } else if (spatial_discretization_order == 2) { updateGridPoint = &FMM_EIKONAL_UPDATE_GRID_POINT_ORDER2; } else { fprintf(stderr, "ERROR: Invalid spatial derivative order. Only first-\n"); fprintf(stderr, " and second-order finite differences supported.\n"); return LSM_FMM_ERR_INVALID_SPATIAL_DISCRETIZATION_ORDER; } /******************************************** * set up FMM Field Data ********************************************/ fmm_field_data = (FMM_FieldData*) malloc(sizeof(FMM_FieldData)); if (!fmm_field_data) return LSM_FMM_ERR_FMM_DATA_CREATION_ERROR; fmm_field_data->phi = phi; fmm_field_data->speed = speed; /******************************************** * initialize FMM Core Data ********************************************/ fmm_core_data = FMM_Core_createFMM_CoreData( fmm_field_data, FMM_NDIM, grid_dims, dx, initializeFront, updateGridPoint); if (!fmm_core_data) return LSM_FMM_ERR_FMM_DATA_CREATION_ERROR; /******************************************** * initialize phi and mark grid points * outside of the mathematical/physical * domain ********************************************/ num_gridpoints = 1; for (i = 0; i < FMM_NDIM; i++) { num_gridpoints *= grid_dims[i]; } for (idx = 0; idx < num_gridpoints; idx++) { /* temporary variables */ int grid_idx[FMM_NDIM]; /* grid index */ int idx_remainder = idx; /* compute grid_idx */ for (i = 0; i < FMM_NDIM; i++) { grid_idx[i] = idx_remainder%grid_dims[i]; idx_remainder -= grid_idx[i]; idx_remainder /= grid_dims[i]; } /* grid points with a negative mask value are taken to */ /* be outside of the mathemtatical/physical domain */ if ((mask) && (mask[idx] < 0)) { FMM_Core_markPointOutsideDomain(fmm_core_data, grid_idx); /* set phi to LSMLIB_REAL_MAX (i.e. infinity) */ phi[idx] = LSMLIB_REAL_MAX; } /* grid points with a non-positive speed are taken to */ /* be outside of the mathemtatical/physical domain */ if (speed[idx] < LSMLIB_ZERO_TOL) { FMM_Core_markPointOutsideDomain(fmm_core_data, grid_idx); /* speed is zero, so set phi to be LSMLIB_REAL_MAX (i.e. infinity) */ phi[idx] = LSMLIB_REAL_MAX; } } /* end loop over grid to mark points outside of domain */ /* initialize grid points around the front */ FMM_Core_initializeFront(fmm_core_data); /* update remaining grid points */ while (FMM_Core_moreGridPointsToUpdate(fmm_core_data)) { FMM_Core_advanceFront(fmm_core_data); } /* clean up memory */ FMM_Core_destroyFMM_CoreData(fmm_core_data); free(fmm_field_data); return LSM_FMM_ERR_SUCCESS; } void FMM_EIKONAL_INITIALIZE_FRONT( FMM_CoreData *fmm_core_data, FMM_FieldData *fmm_field_data, int num_dims, int *grid_dims, LSMLIB_REAL *dx) { /* Grid point status */ int *gridpoint_status = FMM_Core_getGridPointStatusDataArray(fmm_core_data); /* FMM Field Data variables */ LSMLIB_REAL *phi = fmm_field_data->phi; /* auxilliary variables */ int num_gridpoints; int i,idx; /* loop variables */ /* unused function parameters */ (void) num_dims; (void) dx; /* * loop through cells in grid and initialize points on the boundary * for Eikonal equation. */ num_gridpoints = 1; for (i = 0; i < FMM_NDIM; i++) { num_gridpoints *= grid_dims[i]; } for (idx = 0; idx < num_gridpoints; idx++) { /* temporary variables */ int grid_idx[FMM_NDIM]; int idx_remainder = idx; /* compute grid_idx */ for (i = 0; i < FMM_NDIM; i++) { grid_idx[i] = idx_remainder%grid_dims[i]; idx_remainder -= grid_idx[i]; idx_remainder /= grid_dims[i]; } /* set grid points on the initial front */ if ( (phi[idx] > -LSMLIB_ZERO_TOL) && (gridpoint_status[idx] != OUTSIDE_DOMAIN) ) { /* the value for phi(i,j) has already been provided */ FMM_Core_setInitialFrontPoint(fmm_core_data, grid_idx, phi[idx]); } } /* end loop over grid */ } LSMLIB_REAL FMM_EIKONAL_UPDATE_GRID_POINT_ORDER1( FMM_CoreData *fmm_core_data, FMM_FieldData *fmm_field_data, int *grid_idx, int num_dims, int *grid_dims, LSMLIB_REAL *dx) { int *gridpoint_status = FMM_Core_getGridPointStatusDataArray(fmm_core_data); /* FMM Field Data variables */ LSMLIB_REAL *phi = fmm_field_data->phi; const LSMLIB_REAL *speed = fmm_field_data->speed; /* variables used in phi update */ PointStatus neighbor_status; LSMLIB_REAL phi_upwind; LSMLIB_REAL phi_plus; LSMLIB_REAL inv_dx_sq; int offset[FMM_NDIM]; int neighbor[FMM_NDIM]; /* coefficients of quadratic equation for phi */ LSMLIB_REAL phi_A = 0; LSMLIB_REAL phi_B = 0; LSMLIB_REAL phi_C = 0; LSMLIB_REAL discriminant; LSMLIB_REAL phi_updated; /* auxilliary variables */ int dir; /* loop variable for spatial directions */ int l; /* extra loop variable */ int idx_cur_gridpoint, idx_neighbor; int grid_idx_out_of_bounds; /* unused function parameters */ (void) num_dims; /* compute index for current grid point */ LSM_FMM_IDX(idx_cur_gridpoint, grid_idx, grid_dims); /* calculate update to phi */ for (dir = 0; dir < FMM_NDIM; dir++) { /* reset offset */ for (l = 0; l < FMM_NDIM; l++) { offset[l] = 0; } /* find "upwind" direction and phi value */ phi_upwind = LSMLIB_REAL_MAX; /* check minus direction */ offset[dir] = -1; for (l = 0; l < FMM_NDIM; l++) { neighbor[l] = grid_idx[l] + offset[l]; } LSM_FMM_IDX_OUT_OF_BOUNDS(grid_idx_out_of_bounds,neighbor,grid_dims); if (!grid_idx_out_of_bounds) { LSM_FMM_IDX(idx_neighbor, neighbor, grid_dims); neighbor_status = (PointStatus) gridpoint_status[idx_neighbor]; if (KNOWN == neighbor_status) { phi_upwind = phi[idx_neighbor]; } } /* check plus direction */ offset[dir] = 1; for (l = 0; l < FMM_NDIM; l++) { neighbor[l] = grid_idx[l] + offset[l]; } LSM_FMM_IDX_OUT_OF_BOUNDS(grid_idx_out_of_bounds,neighbor,grid_dims); if (!grid_idx_out_of_bounds) { LSM_FMM_IDX(idx_neighbor, neighbor, grid_dims); neighbor_status = (PointStatus) gridpoint_status[idx_neighbor]; if (KNOWN == neighbor_status) { phi_plus = phi[idx_neighbor]; /* * choosing the upwind direction to be the direction * with the smaller abs(phi) value gives a consistent * solution to the "upwind" Eikonal equation. */ if (LSM_FMM_ABS(phi_plus) < LSM_FMM_ABS(phi_upwind)) { phi_upwind = phi_plus; } } } /* * accumulate coefficients for phi if any of the neighbors are "KNOWN" */ if (phi_upwind < LSMLIB_REAL_MAX) { /* accumulate coefs for phi */ inv_dx_sq = 1/dx[dir]; inv_dx_sq *= inv_dx_sq; phi_A += inv_dx_sq; phi_B += inv_dx_sq*phi_upwind; phi_C += inv_dx_sq*phi_upwind*phi_upwind; } } /* loop over coordinate directions */ /* check that phi_A is nonzero */ if (LSM_FMM_ABS(phi_A) == 0) { fprintf(stderr,"ERROR: phi update - no KNOWN neighbors!!!\n"); fprintf(stderr," phi set to 'infinity'.\n"); return LSMLIB_REAL_MAX; } /* complete computation of phi_B and phi_C */ phi_B *= -2.0; phi_C -= 1/speed[idx_cur_gridpoint]/speed[idx_cur_gridpoint]; /* compute phi by solving quadratic equation */ discriminant = phi_B*phi_B - 4.0*phi_A*phi_C; phi_updated = LSMLIB_REAL_MAX; if (discriminant >= 0) { phi_updated = 0.5*(-phi_B + sqrt(discriminant))/phi_A; } else { /* discriminant is negative ... set phi_updated to the */ /* value of phi at the current grid point so that the */ /* solution to the Eikonal equation is not corrupted by */ /* infinities if it has already been assigned a value */ /* based on a different set of KNOWN neighbors. */ /* This situation occurs when the boundary data are not */ /* completely self-consistent from the perspective of the */ /* discretized Eikonal equation. Using the previously */ /* computed value does not introduce any significant */ /* errors into the numerical solution. */ phi_updated = phi[idx_cur_gridpoint]; } /* set phi at current grid point */ phi[idx_cur_gridpoint] = phi_updated; return phi_updated; } LSMLIB_REAL FMM_EIKONAL_UPDATE_GRID_POINT_ORDER2( FMM_CoreData *fmm_core_data, FMM_FieldData *fmm_field_data, int *grid_idx, int num_dims, int *grid_dims, LSMLIB_REAL *dx) { int *gridpoint_status = FMM_Core_getGridPointStatusDataArray(fmm_core_data); /* FMM Field Data variables */ LSMLIB_REAL *phi = fmm_field_data->phi; const LSMLIB_REAL *speed = fmm_field_data->speed; /* variables used in phi update */ PointStatus neighbor_status; LSMLIB_REAL phi_upwind1, phi_upwind2; LSMLIB_REAL phi_plus; int second_order_switch; LSMLIB_REAL inv_dx_sq; int offset[FMM_NDIM]; int neighbor1[FMM_NDIM]; int neighbor2[FMM_NDIM]; /* coefficients of quadratic equation for phi */ LSMLIB_REAL phi_A = 0; LSMLIB_REAL phi_B = 0; LSMLIB_REAL phi_C = 0; LSMLIB_REAL discriminant; LSMLIB_REAL phi_updated; /* auxilliary variables */ int dir; /* loop variable for spatial directions */ int l; /* extra loop variable */ int idx_cur_gridpoint, idx_neighbor1, idx_neighbor2; int grid_idx_out_of_bounds; /* unused function parameters */ (void) num_dims; /* compute index for current grid point */ LSM_FMM_IDX(idx_cur_gridpoint, grid_idx, grid_dims); /* calculate update to phi */ for (dir = 0; dir < FMM_NDIM; dir++) { /* reset offset */ for (l = 0; l < FMM_NDIM; l++) { offset[l] = 0; } /* reset phi_upwind1 and phi_upwind2 to LSMLIB_REAL_MAX */ phi_upwind1 = LSMLIB_REAL_MAX; phi_upwind2 = LSMLIB_REAL_MAX; /* reset second_order_switch to 0 (i.e. assume there are not enough */ /* KNOWN neighbors for second-order discretization. */ second_order_switch = 0; /* check minus direction */ offset[dir] = -1; for (l = 0; l < FMM_NDIM; l++) { neighbor1[l] = grid_idx[l] + offset[l]; neighbor2[l] = grid_idx[l] + 2*offset[l]; } LSM_FMM_IDX_OUT_OF_BOUNDS(grid_idx_out_of_bounds,neighbor1,grid_dims); if (!grid_idx_out_of_bounds) { LSM_FMM_IDX(idx_neighbor1, neighbor1, grid_dims); neighbor_status = (PointStatus) gridpoint_status[idx_neighbor1]; if (KNOWN == neighbor_status) { phi_upwind1 = phi[idx_neighbor1]; /* check for neighbor required for second-order accuracy */ LSM_FMM_IDX_OUT_OF_BOUNDS(grid_idx_out_of_bounds,neighbor2,grid_dims); if (!grid_idx_out_of_bounds) { LSM_FMM_IDX(idx_neighbor2, neighbor2, grid_dims); neighbor_status = (PointStatus) gridpoint_status[idx_neighbor2]; if ( (KNOWN == neighbor_status) && ( LSM_FMM_ABS(phi[idx_neighbor2]) <= LSM_FMM_ABS(phi_upwind1)) ) { phi_upwind2 = phi[idx_neighbor2]; second_order_switch = 1; } } } /* end case: first-order neighbor is KNOWN */ } /* check plus direction */ offset[dir] = 1; for (l = 0; l < FMM_NDIM; l++) { neighbor1[l] = grid_idx[l] + offset[l]; neighbor2[l] = grid_idx[l] + 2*offset[l]; } LSM_FMM_IDX_OUT_OF_BOUNDS(grid_idx_out_of_bounds,neighbor1,grid_dims); if (!grid_idx_out_of_bounds) { LSM_FMM_IDX(idx_neighbor1, neighbor1, grid_dims); neighbor_status = (PointStatus) gridpoint_status[idx_neighbor1]; if (KNOWN == neighbor_status) { phi_plus = phi[idx_neighbor1]; /* * choosing the upwind direction to be the direction * with the smaller abs(phi) value gives a consistent * solution to the "upwind" Eikonal equation. */ if (LSM_FMM_ABS(phi_plus) < LSM_FMM_ABS(phi_upwind1)) { phi_upwind1 = phi_plus; phi_upwind2 = LSMLIB_REAL_MAX; second_order_switch = 0; /* check for neighbor required for second-order accuracy */ LSM_FMM_IDX_OUT_OF_BOUNDS(grid_idx_out_of_bounds,neighbor2,grid_dims); if (!grid_idx_out_of_bounds) { LSM_FMM_IDX(idx_neighbor2, neighbor2, grid_dims); neighbor_status = (PointStatus) gridpoint_status[idx_neighbor2]; if ( (KNOWN == neighbor_status) && ( LSM_FMM_ABS(phi[idx_neighbor2]) <= LSM_FMM_ABS(phi_upwind1)) ) { phi_upwind2 = phi[idx_neighbor2]; second_order_switch = 1; } } } /* end if: plus is upwind direction */ } /* end case: first-order neighbor is KNOWN */ } /* * accumulate coefficients for phi if any of the neighbors are "KNOWN" */ if (phi_upwind1 < LSMLIB_REAL_MAX) { /* temporary variables */ LSMLIB_REAL one_plus_switch_over_two = 1.0+0.5*second_order_switch; LSMLIB_REAL phi_upwind_contrib; /* set phi_upwind_contrib to be first- or second-order */ /* contribution based on value of second_order_switch */ if (second_order_switch == 1) { phi_upwind_contrib = 2.0*phi_upwind1 - 0.5*phi_upwind2; } else { phi_upwind_contrib = phi_upwind1; } /* accumulate coefs for phi */ inv_dx_sq = 1/dx[dir]; inv_dx_sq *= inv_dx_sq; phi_A += inv_dx_sq*one_plus_switch_over_two*one_plus_switch_over_two; phi_B += inv_dx_sq*one_plus_switch_over_two*phi_upwind_contrib; phi_C += inv_dx_sq*phi_upwind_contrib*phi_upwind_contrib; } } /* loop over coordinate directions */ /* check that phi_A is nonzero */ if (LSM_FMM_ABS(phi_A) == 0) { fprintf(stderr,"ERROR: phi update - no KNOWN neighbors!!!\n"); fprintf(stderr," phi set to 'infinity'.\n"); return LSMLIB_REAL_MAX; } /* complete computation of phi_B and phi_C */ phi_B *= -2.0; phi_C -= 1/speed[idx_cur_gridpoint]/speed[idx_cur_gridpoint]; /* compute phi by solving quadratic equation */ discriminant = phi_B*phi_B - 4.0*phi_A*phi_C; phi_updated = LSMLIB_REAL_MAX; if (discriminant >= 0) { phi_updated = 0.5*(-phi_B + sqrt(discriminant))/phi_A; } else { /* discriminant is negative ... set phi_updated to the */ /* value of phi at the current grid point so that the */ /* solution to the Eikonal equation is not corrupted by */ /* infinities if it has already been assigned a value */ /* based on a different set of KNOWN neighbors. */ /* This situation occurs when the boundary data are not */ /* completely self-consistent from the perspective of the */ /* discretized Eikonal equation. Using the previously */ /* computed value does not introduce any significant */ /* errors into the numerical solution. */ phi_updated = phi[idx_cur_gridpoint]; } /* set phi at current grid point */ phi[idx_cur_gridpoint] = phi_updated; return phi_updated; } #endif ================================================ FILE: OptolithiumC/libs/eikonal/src/FMM_eikonal3d.c ================================================ /* * File: lsm_FMM_eikonal.c * Copyrights: (c) 2005 The Trustees of Princeton University and Board of * Regents of the University of Texas. All rights reserved. * (c) 2009 Kevin T. Chu. All rights reserved. * Revision: $Revision: 149 $ * Modified: $Date: 2009-01-18 00:31:09 -0800 (Sun, 18 Jan 2009) $ * Description: Implementation of Fast Marching Method for Eikonal equation */ /*! \file lsm_FMM_eikonal.c * * \brief * @ref lsm_FMM_eikonal.c provides "generic" implementations of * first- and second-order accurate Fast Marching Method schemes * for solving the Eikonal equation. The code is "templated" on * the number of dimensions through the use of macro definitions * that MUST be provided by the user. * * *

Usage:

* * -# Define the following macros: * -# FMM_NDIM: the number of spatial dimensions. * -# FMM_EIKONAL_SOLVE_EIKONAL_EQUATION: desired name of function * that solves the Eikonal equation. * -# FMM_EIKONAL_INITIALIZE_FRONT: desired name of function that * initializes the values on the front. * -# FMM_EIKONAL_UPDATE_GRID_POINT_ORDER1: desired name of function * that updates the value of the solution at grid points using * a first-order accurate discretization * -# FMM_EIKONAL_UPDATE_GRID_POINT_ORDER2: desired name of function * that updates the value of the solution at grid points using * a second-order accurate discretization * -# Include this file at the end of the implementation file * for the n-dimentsional Eikonal equation solver. * -# Compile code. * * *

NOTES:

* - Because this code depends on macros, care must be taken to * ensure that macros do not conflict. * */ #ifndef included_lsm_FMM_eikonal_c #define included_lsm_FMM_eikonal_c #include #include #include #include #include "FMM_Config3d.h" #include "FMM_Core.h" #include "FMM_Heap.h" #include "FMM_Macros.h" /* * This macro protect against misuse of the code in this file. It will * cause the compiler to complain. */ #ifndef FMM_NDIM #error "lsm_FMM_eikonal: required macro FMM_NDIM not defined!" #endif #ifndef FMM_EIKONAL_SOLVE_EIKONAL_EQUATION #error "lsm_FMM_eikonal: required macro FMM_EIKONAL_SOLVE_EIKONAL_EQUATION not defined!" #endif #ifndef FMM_EIKONAL_INITIALIZE_FRONT #error "lsm_FMM_eikonal: required macro FMM_EIKONAL_INITIALIZE_FRONT not defined!" #endif #ifndef FMM_EIKONAL_UPDATE_GRID_POINT_ORDER1 #error "lsm_FMM_eikonal: required macro FMM_EIKONAL_UPDATE_GRID_POINT_ORDER1 not defined!" #endif #ifndef FMM_EIKONAL_UPDATE_GRID_POINT_ORDER2 #error "lsm_FMM_eikonal: required macro FMM_EIKONAL_UPDATE_GRID_POINT_ORDER2 not defined!" #endif /*================== lsm_FMM_eikonal Data Structures ================*/ struct FMM_FieldData { LSMLIB_REAL *phi; /* solution to Eikonal equation */ const LSMLIB_REAL *speed; /* speed function */ }; /*============= FMM Eikonal Equation Solver Functions ===============*/ /* * FMM_EIKONAL_INITIALIZE_FRONT() implements the callback * function required by FMM_Core::FMM_initializeFront() to find * and initialize the front. */ void FMM_EIKONAL_INITIALIZE_FRONT( FMM_CoreData *fmm_core_data, FMM_FieldData *fmm_field_data, int num_dims, int *grid_dims, LSMLIB_REAL *dx); /* * FMM_EIKONAL_UPDATE_GRID_POINT_ORDER1() implements the callback * function required by FMM_Core::FMM_Core_updateNeighbors() to * update the solution at a grid point. It computes and returns * the updated phi value of the specified grid point using values of * neighbors that have status "KNOWN" and a first-order accurate * discretization of the gradient operator. */ LSMLIB_REAL FMM_EIKONAL_UPDATE_GRID_POINT_ORDER1( FMM_CoreData *fmm_core_data, FMM_FieldData *fmm_field_data, int *grid_idx, int num_dims, int *grid_dims, LSMLIB_REAL *dx); /* * FMM_EIKONAL_UPDATE_GRID_POINT_ORDER2() implements the callback * function required by FMM_Core::FMM_Core_updateNeighbors() to * update the solution at a grid point. It computes and returns * the updated phi value of the specified grid point using values of * neighbors that have status "KNOWN" and a second-order accurate * discretization of the gradient operator when a sufficient number * of "KNOWN" neighboring grid points are available. When there are * an insufficient number of "KNOWN" neighbors, the discretization * of the gradient drops to first-order accuracy. */ LSMLIB_REAL FMM_EIKONAL_UPDATE_GRID_POINT_ORDER2( FMM_CoreData *fmm_core_data, FMM_FieldData *fmm_field_data, int *grid_idx, int num_dims, int *grid_dims, LSMLIB_REAL *dx); /*==================== Function Definitions =========================*/ int FMM_EIKONAL_SOLVE_EIKONAL_EQUATION( LSMLIB_REAL *phi, const LSMLIB_REAL *speed, LSMLIB_REAL *mask, const int spatial_discretization_order, const int *grid_dims, const LSMLIB_REAL *dx) { /* fast marching method data */ FMM_CoreData *fmm_core_data; FMM_FieldData *fmm_field_data; /* pointers to callback functions */ updateGridPointFuncPtr updateGridPoint; initializeFrontFuncPtr initializeFront; /* auxiliary variables */ int num_gridpoints; /* number of grid points */ int i, idx; /* loop variables */ /****************************************************** * set up appropriate grid point update and front * detection/initialization functions based on the * specified spatial derivative order ******************************************************/ initializeFront = &FMM_EIKONAL_INITIALIZE_FRONT; if (spatial_discretization_order == 1) { updateGridPoint = &FMM_EIKONAL_UPDATE_GRID_POINT_ORDER1; } else if (spatial_discretization_order == 2) { updateGridPoint = &FMM_EIKONAL_UPDATE_GRID_POINT_ORDER2; } else { fprintf(stderr, "ERROR: Invalid spatial derivative order. Only first-\n"); fprintf(stderr, " and second-order finite differences supported.\n"); return LSM_FMM_ERR_INVALID_SPATIAL_DISCRETIZATION_ORDER; } /******************************************** * set up FMM Field Data ********************************************/ fmm_field_data = (FMM_FieldData*) malloc(sizeof(FMM_FieldData)); if (!fmm_field_data) return LSM_FMM_ERR_FMM_DATA_CREATION_ERROR; fmm_field_data->phi = phi; fmm_field_data->speed = speed; /******************************************** * initialize FMM Core Data ********************************************/ fmm_core_data = FMM_Core_createFMM_CoreData( fmm_field_data, FMM_NDIM, grid_dims, dx, initializeFront, updateGridPoint); if (!fmm_core_data) return LSM_FMM_ERR_FMM_DATA_CREATION_ERROR; /******************************************** * initialize phi and mark grid points * outside of the mathematical/physical * domain ********************************************/ num_gridpoints = 1; for (i = 0; i < FMM_NDIM; i++) { num_gridpoints *= grid_dims[i]; } for (idx = 0; idx < num_gridpoints; idx++) { /* temporary variables */ int grid_idx[FMM_NDIM]; /* grid index */ int idx_remainder = idx; /* compute grid_idx */ for (i = 0; i < FMM_NDIM; i++) { grid_idx[i] = idx_remainder%grid_dims[i]; idx_remainder -= grid_idx[i]; idx_remainder /= grid_dims[i]; } /* grid points with a negative mask value are taken to */ /* be outside of the mathemtatical/physical domain */ if ((mask) && (mask[idx] < 0)) { FMM_Core_markPointOutsideDomain(fmm_core_data, grid_idx); /* set phi to LSMLIB_REAL_MAX (i.e. infinity) */ phi[idx] = LSMLIB_REAL_MAX; } /* grid points with a non-positive speed are taken to */ /* be outside of the mathemtatical/physical domain */ if (speed[idx] < LSMLIB_ZERO_TOL) { FMM_Core_markPointOutsideDomain(fmm_core_data, grid_idx); /* speed is zero, so set phi to be LSMLIB_REAL_MAX (i.e. infinity) */ phi[idx] = LSMLIB_REAL_MAX; } } /* end loop over grid to mark points outside of domain */ /* initialize grid points around the front */ FMM_Core_initializeFront(fmm_core_data); /* update remaining grid points */ while (FMM_Core_moreGridPointsToUpdate(fmm_core_data)) { FMM_Core_advanceFront(fmm_core_data); } /* clean up memory */ FMM_Core_destroyFMM_CoreData(fmm_core_data); free(fmm_field_data); return LSM_FMM_ERR_SUCCESS; } void FMM_EIKONAL_INITIALIZE_FRONT( FMM_CoreData *fmm_core_data, FMM_FieldData *fmm_field_data, int num_dims, int *grid_dims, LSMLIB_REAL *dx) { /* Grid point status */ int *gridpoint_status = FMM_Core_getGridPointStatusDataArray(fmm_core_data); /* FMM Field Data variables */ LSMLIB_REAL *phi = fmm_field_data->phi; /* auxilliary variables */ int num_gridpoints; int i,idx; /* loop variables */ /* unused function parameters */ (void) num_dims; (void) dx; /* * loop through cells in grid and initialize points on the boundary * for Eikonal equation. */ num_gridpoints = 1; for (i = 0; i < FMM_NDIM; i++) { num_gridpoints *= grid_dims[i]; } for (idx = 0; idx < num_gridpoints; idx++) { /* temporary variables */ int grid_idx[FMM_NDIM]; int idx_remainder = idx; /* compute grid_idx */ for (i = 0; i < FMM_NDIM; i++) { grid_idx[i] = idx_remainder%grid_dims[i]; idx_remainder -= grid_idx[i]; idx_remainder /= grid_dims[i]; } /* set grid points on the initial front */ if ( (phi[idx] > -LSMLIB_ZERO_TOL) && (gridpoint_status[idx] != OUTSIDE_DOMAIN) ) { /* the value for phi(i,j) has already been provided */ FMM_Core_setInitialFrontPoint(fmm_core_data, grid_idx, phi[idx]); } } /* end loop over grid */ } LSMLIB_REAL FMM_EIKONAL_UPDATE_GRID_POINT_ORDER1( FMM_CoreData *fmm_core_data, FMM_FieldData *fmm_field_data, int *grid_idx, int num_dims, int *grid_dims, LSMLIB_REAL *dx) { int *gridpoint_status = FMM_Core_getGridPointStatusDataArray(fmm_core_data); /* FMM Field Data variables */ LSMLIB_REAL *phi = fmm_field_data->phi; const LSMLIB_REAL *speed = fmm_field_data->speed; /* variables used in phi update */ PointStatus neighbor_status; LSMLIB_REAL phi_upwind; LSMLIB_REAL phi_plus; LSMLIB_REAL inv_dx_sq; int offset[FMM_NDIM]; int neighbor[FMM_NDIM]; /* coefficients of quadratic equation for phi */ LSMLIB_REAL phi_A = 0; LSMLIB_REAL phi_B = 0; LSMLIB_REAL phi_C = 0; LSMLIB_REAL discriminant; LSMLIB_REAL phi_updated; /* auxilliary variables */ int dir; /* loop variable for spatial directions */ int l; /* extra loop variable */ int idx_cur_gridpoint, idx_neighbor; int grid_idx_out_of_bounds; /* unused function parameters */ (void) num_dims; /* compute index for current grid point */ LSM_FMM_IDX(idx_cur_gridpoint, grid_idx, grid_dims); /* calculate update to phi */ for (dir = 0; dir < FMM_NDIM; dir++) { /* reset offset */ for (l = 0; l < FMM_NDIM; l++) { offset[l] = 0; } /* find "upwind" direction and phi value */ phi_upwind = LSMLIB_REAL_MAX; /* check minus direction */ offset[dir] = -1; for (l = 0; l < FMM_NDIM; l++) { neighbor[l] = grid_idx[l] + offset[l]; } LSM_FMM_IDX_OUT_OF_BOUNDS(grid_idx_out_of_bounds,neighbor,grid_dims); if (!grid_idx_out_of_bounds) { LSM_FMM_IDX(idx_neighbor, neighbor, grid_dims); neighbor_status = (PointStatus) gridpoint_status[idx_neighbor]; if (KNOWN == neighbor_status) { phi_upwind = phi[idx_neighbor]; } } /* check plus direction */ offset[dir] = 1; for (l = 0; l < FMM_NDIM; l++) { neighbor[l] = grid_idx[l] + offset[l]; } LSM_FMM_IDX_OUT_OF_BOUNDS(grid_idx_out_of_bounds,neighbor,grid_dims); if (!grid_idx_out_of_bounds) { LSM_FMM_IDX(idx_neighbor, neighbor, grid_dims); neighbor_status = (PointStatus) gridpoint_status[idx_neighbor]; if (KNOWN == neighbor_status) { phi_plus = phi[idx_neighbor]; /* * choosing the upwind direction to be the direction * with the smaller abs(phi) value gives a consistent * solution to the "upwind" Eikonal equation. */ if (LSM_FMM_ABS(phi_plus) < LSM_FMM_ABS(phi_upwind)) { phi_upwind = phi_plus; } } } /* * accumulate coefficients for phi if any of the neighbors are "KNOWN" */ if (phi_upwind < LSMLIB_REAL_MAX) { /* accumulate coefs for phi */ inv_dx_sq = 1/dx[dir]; inv_dx_sq *= inv_dx_sq; phi_A += inv_dx_sq; phi_B += inv_dx_sq*phi_upwind; phi_C += inv_dx_sq*phi_upwind*phi_upwind; } } /* loop over coordinate directions */ /* check that phi_A is nonzero */ if (LSM_FMM_ABS(phi_A) == 0) { fprintf(stderr,"ERROR: phi update - no KNOWN neighbors!!!\n"); fprintf(stderr," phi set to 'infinity'.\n"); return LSMLIB_REAL_MAX; } /* complete computation of phi_B and phi_C */ phi_B *= -2.0; phi_C -= 1/speed[idx_cur_gridpoint]/speed[idx_cur_gridpoint]; /* compute phi by solving quadratic equation */ discriminant = phi_B*phi_B - 4.0*phi_A*phi_C; phi_updated = LSMLIB_REAL_MAX; if (discriminant >= 0) { phi_updated = 0.5*(-phi_B + sqrt(discriminant))/phi_A; } else { /* discriminant is negative ... set phi_updated to the */ /* value of phi at the current grid point so that the */ /* solution to the Eikonal equation is not corrupted by */ /* infinities if it has already been assigned a value */ /* based on a different set of KNOWN neighbors. */ /* This situation occurs when the boundary data are not */ /* completely self-consistent from the perspective of the */ /* discretized Eikonal equation. Using the previously */ /* computed value does not introduce any significant */ /* errors into the numerical solution. */ phi_updated = phi[idx_cur_gridpoint]; } /* set phi at current grid point */ phi[idx_cur_gridpoint] = phi_updated; return phi_updated; } LSMLIB_REAL FMM_EIKONAL_UPDATE_GRID_POINT_ORDER2( FMM_CoreData *fmm_core_data, FMM_FieldData *fmm_field_data, int *grid_idx, int num_dims, int *grid_dims, LSMLIB_REAL *dx) { int *gridpoint_status = FMM_Core_getGridPointStatusDataArray(fmm_core_data); /* FMM Field Data variables */ LSMLIB_REAL *phi = fmm_field_data->phi; const LSMLIB_REAL *speed = fmm_field_data->speed; /* variables used in phi update */ PointStatus neighbor_status; LSMLIB_REAL phi_upwind1, phi_upwind2; LSMLIB_REAL phi_plus; int second_order_switch; LSMLIB_REAL inv_dx_sq; int offset[FMM_NDIM]; int neighbor1[FMM_NDIM]; int neighbor2[FMM_NDIM]; /* coefficients of quadratic equation for phi */ LSMLIB_REAL phi_A = 0; LSMLIB_REAL phi_B = 0; LSMLIB_REAL phi_C = 0; LSMLIB_REAL discriminant; LSMLIB_REAL phi_updated; /* auxilliary variables */ int dir; /* loop variable for spatial directions */ int l; /* extra loop variable */ int idx_cur_gridpoint, idx_neighbor1, idx_neighbor2; int grid_idx_out_of_bounds; /* unused function parameters */ (void) num_dims; /* compute index for current grid point */ LSM_FMM_IDX(idx_cur_gridpoint, grid_idx, grid_dims); /* calculate update to phi */ for (dir = 0; dir < FMM_NDIM; dir++) { /* reset offset */ for (l = 0; l < FMM_NDIM; l++) { offset[l] = 0; } /* reset phi_upwind1 and phi_upwind2 to LSMLIB_REAL_MAX */ phi_upwind1 = LSMLIB_REAL_MAX; phi_upwind2 = LSMLIB_REAL_MAX; /* reset second_order_switch to 0 (i.e. assume there are not enough */ /* KNOWN neighbors for second-order discretization. */ second_order_switch = 0; /* check minus direction */ offset[dir] = -1; for (l = 0; l < FMM_NDIM; l++) { neighbor1[l] = grid_idx[l] + offset[l]; neighbor2[l] = grid_idx[l] + 2*offset[l]; } LSM_FMM_IDX_OUT_OF_BOUNDS(grid_idx_out_of_bounds,neighbor1,grid_dims); if (!grid_idx_out_of_bounds) { LSM_FMM_IDX(idx_neighbor1, neighbor1, grid_dims); neighbor_status = (PointStatus) gridpoint_status[idx_neighbor1]; if (KNOWN == neighbor_status) { phi_upwind1 = phi[idx_neighbor1]; /* check for neighbor required for second-order accuracy */ LSM_FMM_IDX_OUT_OF_BOUNDS(grid_idx_out_of_bounds,neighbor2,grid_dims); if (!grid_idx_out_of_bounds) { LSM_FMM_IDX(idx_neighbor2, neighbor2, grid_dims); neighbor_status = (PointStatus) gridpoint_status[idx_neighbor2]; if ( (KNOWN == neighbor_status) && ( LSM_FMM_ABS(phi[idx_neighbor2]) <= LSM_FMM_ABS(phi_upwind1)) ) { phi_upwind2 = phi[idx_neighbor2]; second_order_switch = 1; } } } /* end case: first-order neighbor is KNOWN */ } /* check plus direction */ offset[dir] = 1; for (l = 0; l < FMM_NDIM; l++) { neighbor1[l] = grid_idx[l] + offset[l]; neighbor2[l] = grid_idx[l] + 2*offset[l]; } LSM_FMM_IDX_OUT_OF_BOUNDS(grid_idx_out_of_bounds,neighbor1,grid_dims); if (!grid_idx_out_of_bounds) { LSM_FMM_IDX(idx_neighbor1, neighbor1, grid_dims); neighbor_status = (PointStatus) gridpoint_status[idx_neighbor1]; if (KNOWN == neighbor_status) { phi_plus = phi[idx_neighbor1]; /* * choosing the upwind direction to be the direction * with the smaller abs(phi) value gives a consistent * solution to the "upwind" Eikonal equation. */ if (LSM_FMM_ABS(phi_plus) < LSM_FMM_ABS(phi_upwind1)) { phi_upwind1 = phi_plus; phi_upwind2 = LSMLIB_REAL_MAX; second_order_switch = 0; /* check for neighbor required for second-order accuracy */ LSM_FMM_IDX_OUT_OF_BOUNDS(grid_idx_out_of_bounds,neighbor2,grid_dims); if (!grid_idx_out_of_bounds) { LSM_FMM_IDX(idx_neighbor2, neighbor2, grid_dims); neighbor_status = (PointStatus) gridpoint_status[idx_neighbor2]; if ( (KNOWN == neighbor_status) && ( LSM_FMM_ABS(phi[idx_neighbor2]) <= LSM_FMM_ABS(phi_upwind1)) ) { phi_upwind2 = phi[idx_neighbor2]; second_order_switch = 1; } } } /* end if: plus is upwind direction */ } /* end case: first-order neighbor is KNOWN */ } /* * accumulate coefficients for phi if any of the neighbors are "KNOWN" */ if (phi_upwind1 < LSMLIB_REAL_MAX) { /* temporary variables */ LSMLIB_REAL one_plus_switch_over_two = 1.0+0.5*second_order_switch; LSMLIB_REAL phi_upwind_contrib; /* set phi_upwind_contrib to be first- or second-order */ /* contribution based on value of second_order_switch */ if (second_order_switch == 1) { phi_upwind_contrib = 2.0*phi_upwind1 - 0.5*phi_upwind2; } else { phi_upwind_contrib = phi_upwind1; } /* accumulate coefs for phi */ inv_dx_sq = 1/dx[dir]; inv_dx_sq *= inv_dx_sq; phi_A += inv_dx_sq*one_plus_switch_over_two*one_plus_switch_over_two; phi_B += inv_dx_sq*one_plus_switch_over_two*phi_upwind_contrib; phi_C += inv_dx_sq*phi_upwind_contrib*phi_upwind_contrib; } } /* loop over coordinate directions */ /* check that phi_A is nonzero */ if (LSM_FMM_ABS(phi_A) == 0) { fprintf(stderr,"ERROR: phi update - no KNOWN neighbors!!!\n"); fprintf(stderr," phi set to 'infinity'.\n"); return LSMLIB_REAL_MAX; } /* complete computation of phi_B and phi_C */ phi_B *= -2.0; phi_C -= 1/speed[idx_cur_gridpoint]/speed[idx_cur_gridpoint]; /* compute phi by solving quadratic equation */ discriminant = phi_B*phi_B - 4.0*phi_A*phi_C; phi_updated = LSMLIB_REAL_MAX; if (discriminant >= 0) { phi_updated = 0.5*(-phi_B + sqrt(discriminant))/phi_A; } else { /* discriminant is negative ... set phi_updated to the */ /* value of phi at the current grid point so that the */ /* solution to the Eikonal equation is not corrupted by */ /* infinities if it has already been assigned a value */ /* based on a different set of KNOWN neighbors. */ /* This situation occurs when the boundary data are not */ /* completely self-consistent from the perspective of the */ /* discretized Eikonal equation. Using the previously */ /* computed value does not introduce any significant */ /* errors into the numerical solution. */ phi_updated = phi[idx_cur_gridpoint]; } /* set phi at current grid point */ phi[idx_cur_gridpoint] = phi_updated; return phi_updated; } #endif ================================================ FILE: OptolithiumC/libs/fftw3-win32/fftw3.f ================================================ INTEGER FFTW_R2HC PARAMETER (FFTW_R2HC=0) INTEGER FFTW_HC2R PARAMETER (FFTW_HC2R=1) INTEGER FFTW_DHT PARAMETER (FFTW_DHT=2) INTEGER FFTW_REDFT00 PARAMETER (FFTW_REDFT00=3) INTEGER FFTW_REDFT01 PARAMETER (FFTW_REDFT01=4) INTEGER FFTW_REDFT10 PARAMETER (FFTW_REDFT10=5) INTEGER FFTW_REDFT11 PARAMETER (FFTW_REDFT11=6) INTEGER FFTW_RODFT00 PARAMETER (FFTW_RODFT00=7) INTEGER FFTW_RODFT01 PARAMETER (FFTW_RODFT01=8) INTEGER FFTW_RODFT10 PARAMETER (FFTW_RODFT10=9) INTEGER FFTW_RODFT11 PARAMETER (FFTW_RODFT11=10) INTEGER FFTW_FORWARD PARAMETER (FFTW_FORWARD=-1) INTEGER FFTW_BACKWARD PARAMETER (FFTW_BACKWARD=+1) INTEGER FFTW_MEASURE PARAMETER (FFTW_MEASURE=0) INTEGER FFTW_DESTROY_INPUT PARAMETER (FFTW_DESTROY_INPUT=1) INTEGER FFTW_UNALIGNED PARAMETER (FFTW_UNALIGNED=2) INTEGER FFTW_CONSERVE_MEMORY PARAMETER (FFTW_CONSERVE_MEMORY=4) INTEGER FFTW_EXHAUSTIVE PARAMETER (FFTW_EXHAUSTIVE=8) INTEGER FFTW_PRESERVE_INPUT PARAMETER (FFTW_PRESERVE_INPUT=16) INTEGER FFTW_PATIENT PARAMETER (FFTW_PATIENT=32) INTEGER FFTW_ESTIMATE PARAMETER (FFTW_ESTIMATE=64) INTEGER FFTW_WISDOM_ONLY PARAMETER (FFTW_WISDOM_ONLY=2097152) INTEGER FFTW_ESTIMATE_PATIENT PARAMETER (FFTW_ESTIMATE_PATIENT=128) INTEGER FFTW_BELIEVE_PCOST PARAMETER (FFTW_BELIEVE_PCOST=256) INTEGER FFTW_NO_DFT_R2HC PARAMETER (FFTW_NO_DFT_R2HC=512) INTEGER FFTW_NO_NONTHREADED PARAMETER (FFTW_NO_NONTHREADED=1024) INTEGER FFTW_NO_BUFFERING PARAMETER (FFTW_NO_BUFFERING=2048) INTEGER FFTW_NO_INDIRECT_OP PARAMETER (FFTW_NO_INDIRECT_OP=4096) INTEGER FFTW_ALLOW_LARGE_GENERIC PARAMETER (FFTW_ALLOW_LARGE_GENERIC=8192) INTEGER FFTW_NO_RANK_SPLITS PARAMETER (FFTW_NO_RANK_SPLITS=16384) INTEGER FFTW_NO_VRANK_SPLITS PARAMETER (FFTW_NO_VRANK_SPLITS=32768) INTEGER FFTW_NO_VRECURSE PARAMETER (FFTW_NO_VRECURSE=65536) INTEGER FFTW_NO_SIMD PARAMETER (FFTW_NO_SIMD=131072) INTEGER FFTW_NO_SLOW PARAMETER (FFTW_NO_SLOW=262144) INTEGER FFTW_NO_FIXED_RADIX_LARGE_N PARAMETER (FFTW_NO_FIXED_RADIX_LARGE_N=524288) INTEGER FFTW_ALLOW_PRUNING PARAMETER (FFTW_ALLOW_PRUNING=1048576) ================================================ FILE: OptolithiumC/libs/fftw3-win32/fftw3.f03 ================================================ ! Generated automatically. DO NOT EDIT! integer, parameter :: C_FFTW_R2R_KIND = C_INT32_T integer(C_INT), parameter :: FFTW_R2HC = 0 integer(C_INT), parameter :: FFTW_HC2R = 1 integer(C_INT), parameter :: FFTW_DHT = 2 integer(C_INT), parameter :: FFTW_REDFT00 = 3 integer(C_INT), parameter :: FFTW_REDFT01 = 4 integer(C_INT), parameter :: FFTW_REDFT10 = 5 integer(C_INT), parameter :: FFTW_REDFT11 = 6 integer(C_INT), parameter :: FFTW_RODFT00 = 7 integer(C_INT), parameter :: FFTW_RODFT01 = 8 integer(C_INT), parameter :: FFTW_RODFT10 = 9 integer(C_INT), parameter :: FFTW_RODFT11 = 10 integer(C_INT), parameter :: FFTW_FORWARD = -1 integer(C_INT), parameter :: FFTW_BACKWARD = +1 integer(C_INT), parameter :: FFTW_MEASURE = 0 integer(C_INT), parameter :: FFTW_DESTROY_INPUT = 1 integer(C_INT), parameter :: FFTW_UNALIGNED = 2 integer(C_INT), parameter :: FFTW_CONSERVE_MEMORY = 4 integer(C_INT), parameter :: FFTW_EXHAUSTIVE = 8 integer(C_INT), parameter :: FFTW_PRESERVE_INPUT = 16 integer(C_INT), parameter :: FFTW_PATIENT = 32 integer(C_INT), parameter :: FFTW_ESTIMATE = 64 integer(C_INT), parameter :: FFTW_WISDOM_ONLY = 2097152 integer(C_INT), parameter :: FFTW_ESTIMATE_PATIENT = 128 integer(C_INT), parameter :: FFTW_BELIEVE_PCOST = 256 integer(C_INT), parameter :: FFTW_NO_DFT_R2HC = 512 integer(C_INT), parameter :: FFTW_NO_NONTHREADED = 1024 integer(C_INT), parameter :: FFTW_NO_BUFFERING = 2048 integer(C_INT), parameter :: FFTW_NO_INDIRECT_OP = 4096 integer(C_INT), parameter :: FFTW_ALLOW_LARGE_GENERIC = 8192 integer(C_INT), parameter :: FFTW_NO_RANK_SPLITS = 16384 integer(C_INT), parameter :: FFTW_NO_VRANK_SPLITS = 32768 integer(C_INT), parameter :: FFTW_NO_VRECURSE = 65536 integer(C_INT), parameter :: FFTW_NO_SIMD = 131072 integer(C_INT), parameter :: FFTW_NO_SLOW = 262144 integer(C_INT), parameter :: FFTW_NO_FIXED_RADIX_LARGE_N = 524288 integer(C_INT), parameter :: FFTW_ALLOW_PRUNING = 1048576 type, bind(C) :: fftw_iodim integer(C_INT) n, is, os end type fftw_iodim type, bind(C) :: fftw_iodim64 integer(C_INTPTR_T) n, is, os end type fftw_iodim64 interface type(C_PTR) function fftw_plan_dft(rank,n,in,out,sign,flags) bind(C, name='fftw_plan_dft') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftw_plan_dft type(C_PTR) function fftw_plan_dft_1d(n,in,out,sign,flags) bind(C, name='fftw_plan_dft_1d') import integer(C_INT), value :: n complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftw_plan_dft_1d type(C_PTR) function fftw_plan_dft_2d(n0,n1,in,out,sign,flags) bind(C, name='fftw_plan_dft_2d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftw_plan_dft_2d type(C_PTR) function fftw_plan_dft_3d(n0,n1,n2,in,out,sign,flags) bind(C, name='fftw_plan_dft_3d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 integer(C_INT), value :: n2 complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftw_plan_dft_3d type(C_PTR) function fftw_plan_many_dft(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,sign,flags) & bind(C, name='fftw_plan_many_dft') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n integer(C_INT), value :: howmany complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in integer(C_INT), dimension(*), intent(in) :: inembed integer(C_INT), value :: istride integer(C_INT), value :: idist complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), dimension(*), intent(in) :: onembed integer(C_INT), value :: ostride integer(C_INT), value :: odist integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftw_plan_many_dft type(C_PTR) function fftw_plan_guru_dft(rank,dims,howmany_rank,howmany_dims,in,out,sign,flags) & bind(C, name='fftw_plan_guru_dft') import integer(C_INT), value :: rank type(fftw_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftw_iodim), dimension(*), intent(in) :: howmany_dims complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftw_plan_guru_dft type(C_PTR) function fftw_plan_guru_split_dft(rank,dims,howmany_rank,howmany_dims,ri,ii,ro,io,flags) & bind(C, name='fftw_plan_guru_split_dft') import integer(C_INT), value :: rank type(fftw_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftw_iodim), dimension(*), intent(in) :: howmany_dims real(C_DOUBLE), dimension(*), intent(out) :: ri real(C_DOUBLE), dimension(*), intent(out) :: ii real(C_DOUBLE), dimension(*), intent(out) :: ro real(C_DOUBLE), dimension(*), intent(out) :: io integer(C_INT), value :: flags end function fftw_plan_guru_split_dft type(C_PTR) function fftw_plan_guru64_dft(rank,dims,howmany_rank,howmany_dims,in,out,sign,flags) & bind(C, name='fftw_plan_guru64_dft') import integer(C_INT), value :: rank type(fftw_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftw_plan_guru64_dft type(C_PTR) function fftw_plan_guru64_split_dft(rank,dims,howmany_rank,howmany_dims,ri,ii,ro,io,flags) & bind(C, name='fftw_plan_guru64_split_dft') import integer(C_INT), value :: rank type(fftw_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims real(C_DOUBLE), dimension(*), intent(out) :: ri real(C_DOUBLE), dimension(*), intent(out) :: ii real(C_DOUBLE), dimension(*), intent(out) :: ro real(C_DOUBLE), dimension(*), intent(out) :: io integer(C_INT), value :: flags end function fftw_plan_guru64_split_dft subroutine fftw_execute_dft(p,in,out) bind(C, name='fftw_execute_dft') import type(C_PTR), value :: p complex(C_DOUBLE_COMPLEX), dimension(*), intent(inout) :: in complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out end subroutine fftw_execute_dft subroutine fftw_execute_split_dft(p,ri,ii,ro,io) bind(C, name='fftw_execute_split_dft') import type(C_PTR), value :: p real(C_DOUBLE), dimension(*), intent(inout) :: ri real(C_DOUBLE), dimension(*), intent(inout) :: ii real(C_DOUBLE), dimension(*), intent(out) :: ro real(C_DOUBLE), dimension(*), intent(out) :: io end subroutine fftw_execute_split_dft type(C_PTR) function fftw_plan_many_dft_r2c(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,flags) & bind(C, name='fftw_plan_many_dft_r2c') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n integer(C_INT), value :: howmany real(C_DOUBLE), dimension(*), intent(out) :: in integer(C_INT), dimension(*), intent(in) :: inembed integer(C_INT), value :: istride integer(C_INT), value :: idist complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), dimension(*), intent(in) :: onembed integer(C_INT), value :: ostride integer(C_INT), value :: odist integer(C_INT), value :: flags end function fftw_plan_many_dft_r2c type(C_PTR) function fftw_plan_dft_r2c(rank,n,in,out,flags) bind(C, name='fftw_plan_dft_r2c') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n real(C_DOUBLE), dimension(*), intent(out) :: in complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftw_plan_dft_r2c type(C_PTR) function fftw_plan_dft_r2c_1d(n,in,out,flags) bind(C, name='fftw_plan_dft_r2c_1d') import integer(C_INT), value :: n real(C_DOUBLE), dimension(*), intent(out) :: in complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftw_plan_dft_r2c_1d type(C_PTR) function fftw_plan_dft_r2c_2d(n0,n1,in,out,flags) bind(C, name='fftw_plan_dft_r2c_2d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 real(C_DOUBLE), dimension(*), intent(out) :: in complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftw_plan_dft_r2c_2d type(C_PTR) function fftw_plan_dft_r2c_3d(n0,n1,n2,in,out,flags) bind(C, name='fftw_plan_dft_r2c_3d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 integer(C_INT), value :: n2 real(C_DOUBLE), dimension(*), intent(out) :: in complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftw_plan_dft_r2c_3d type(C_PTR) function fftw_plan_many_dft_c2r(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,flags) & bind(C, name='fftw_plan_many_dft_c2r') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n integer(C_INT), value :: howmany complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in integer(C_INT), dimension(*), intent(in) :: inembed integer(C_INT), value :: istride integer(C_INT), value :: idist real(C_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), dimension(*), intent(in) :: onembed integer(C_INT), value :: ostride integer(C_INT), value :: odist integer(C_INT), value :: flags end function fftw_plan_many_dft_c2r type(C_PTR) function fftw_plan_dft_c2r(rank,n,in,out,flags) bind(C, name='fftw_plan_dft_c2r') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in real(C_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftw_plan_dft_c2r type(C_PTR) function fftw_plan_dft_c2r_1d(n,in,out,flags) bind(C, name='fftw_plan_dft_c2r_1d') import integer(C_INT), value :: n complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in real(C_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftw_plan_dft_c2r_1d type(C_PTR) function fftw_plan_dft_c2r_2d(n0,n1,in,out,flags) bind(C, name='fftw_plan_dft_c2r_2d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in real(C_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftw_plan_dft_c2r_2d type(C_PTR) function fftw_plan_dft_c2r_3d(n0,n1,n2,in,out,flags) bind(C, name='fftw_plan_dft_c2r_3d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 integer(C_INT), value :: n2 complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in real(C_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftw_plan_dft_c2r_3d type(C_PTR) function fftw_plan_guru_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,out,flags) & bind(C, name='fftw_plan_guru_dft_r2c') import integer(C_INT), value :: rank type(fftw_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftw_iodim), dimension(*), intent(in) :: howmany_dims real(C_DOUBLE), dimension(*), intent(out) :: in complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftw_plan_guru_dft_r2c type(C_PTR) function fftw_plan_guru_dft_c2r(rank,dims,howmany_rank,howmany_dims,in,out,flags) & bind(C, name='fftw_plan_guru_dft_c2r') import integer(C_INT), value :: rank type(fftw_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftw_iodim), dimension(*), intent(in) :: howmany_dims complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in real(C_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftw_plan_guru_dft_c2r type(C_PTR) function fftw_plan_guru_split_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,ro,io,flags) & bind(C, name='fftw_plan_guru_split_dft_r2c') import integer(C_INT), value :: rank type(fftw_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftw_iodim), dimension(*), intent(in) :: howmany_dims real(C_DOUBLE), dimension(*), intent(out) :: in real(C_DOUBLE), dimension(*), intent(out) :: ro real(C_DOUBLE), dimension(*), intent(out) :: io integer(C_INT), value :: flags end function fftw_plan_guru_split_dft_r2c type(C_PTR) function fftw_plan_guru_split_dft_c2r(rank,dims,howmany_rank,howmany_dims,ri,ii,out,flags) & bind(C, name='fftw_plan_guru_split_dft_c2r') import integer(C_INT), value :: rank type(fftw_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftw_iodim), dimension(*), intent(in) :: howmany_dims real(C_DOUBLE), dimension(*), intent(out) :: ri real(C_DOUBLE), dimension(*), intent(out) :: ii real(C_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftw_plan_guru_split_dft_c2r type(C_PTR) function fftw_plan_guru64_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,out,flags) & bind(C, name='fftw_plan_guru64_dft_r2c') import integer(C_INT), value :: rank type(fftw_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims real(C_DOUBLE), dimension(*), intent(out) :: in complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftw_plan_guru64_dft_r2c type(C_PTR) function fftw_plan_guru64_dft_c2r(rank,dims,howmany_rank,howmany_dims,in,out,flags) & bind(C, name='fftw_plan_guru64_dft_c2r') import integer(C_INT), value :: rank type(fftw_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: in real(C_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftw_plan_guru64_dft_c2r type(C_PTR) function fftw_plan_guru64_split_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,ro,io,flags) & bind(C, name='fftw_plan_guru64_split_dft_r2c') import integer(C_INT), value :: rank type(fftw_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims real(C_DOUBLE), dimension(*), intent(out) :: in real(C_DOUBLE), dimension(*), intent(out) :: ro real(C_DOUBLE), dimension(*), intent(out) :: io integer(C_INT), value :: flags end function fftw_plan_guru64_split_dft_r2c type(C_PTR) function fftw_plan_guru64_split_dft_c2r(rank,dims,howmany_rank,howmany_dims,ri,ii,out,flags) & bind(C, name='fftw_plan_guru64_split_dft_c2r') import integer(C_INT), value :: rank type(fftw_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims real(C_DOUBLE), dimension(*), intent(out) :: ri real(C_DOUBLE), dimension(*), intent(out) :: ii real(C_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftw_plan_guru64_split_dft_c2r subroutine fftw_execute_dft_r2c(p,in,out) bind(C, name='fftw_execute_dft_r2c') import type(C_PTR), value :: p real(C_DOUBLE), dimension(*), intent(inout) :: in complex(C_DOUBLE_COMPLEX), dimension(*), intent(out) :: out end subroutine fftw_execute_dft_r2c subroutine fftw_execute_dft_c2r(p,in,out) bind(C, name='fftw_execute_dft_c2r') import type(C_PTR), value :: p complex(C_DOUBLE_COMPLEX), dimension(*), intent(inout) :: in real(C_DOUBLE), dimension(*), intent(out) :: out end subroutine fftw_execute_dft_c2r subroutine fftw_execute_split_dft_r2c(p,in,ro,io) bind(C, name='fftw_execute_split_dft_r2c') import type(C_PTR), value :: p real(C_DOUBLE), dimension(*), intent(inout) :: in real(C_DOUBLE), dimension(*), intent(out) :: ro real(C_DOUBLE), dimension(*), intent(out) :: io end subroutine fftw_execute_split_dft_r2c subroutine fftw_execute_split_dft_c2r(p,ri,ii,out) bind(C, name='fftw_execute_split_dft_c2r') import type(C_PTR), value :: p real(C_DOUBLE), dimension(*), intent(inout) :: ri real(C_DOUBLE), dimension(*), intent(inout) :: ii real(C_DOUBLE), dimension(*), intent(out) :: out end subroutine fftw_execute_split_dft_c2r type(C_PTR) function fftw_plan_many_r2r(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,kind,flags) & bind(C, name='fftw_plan_many_r2r') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n integer(C_INT), value :: howmany real(C_DOUBLE), dimension(*), intent(out) :: in integer(C_INT), dimension(*), intent(in) :: inembed integer(C_INT), value :: istride integer(C_INT), value :: idist real(C_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), dimension(*), intent(in) :: onembed integer(C_INT), value :: ostride integer(C_INT), value :: odist integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind integer(C_INT), value :: flags end function fftw_plan_many_r2r type(C_PTR) function fftw_plan_r2r(rank,n,in,out,kind,flags) bind(C, name='fftw_plan_r2r') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n real(C_DOUBLE), dimension(*), intent(out) :: in real(C_DOUBLE), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind integer(C_INT), value :: flags end function fftw_plan_r2r type(C_PTR) function fftw_plan_r2r_1d(n,in,out,kind,flags) bind(C, name='fftw_plan_r2r_1d') import integer(C_INT), value :: n real(C_DOUBLE), dimension(*), intent(out) :: in real(C_DOUBLE), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), value :: kind integer(C_INT), value :: flags end function fftw_plan_r2r_1d type(C_PTR) function fftw_plan_r2r_2d(n0,n1,in,out,kind0,kind1,flags) bind(C, name='fftw_plan_r2r_2d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 real(C_DOUBLE), dimension(*), intent(out) :: in real(C_DOUBLE), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), value :: kind0 integer(C_FFTW_R2R_KIND), value :: kind1 integer(C_INT), value :: flags end function fftw_plan_r2r_2d type(C_PTR) function fftw_plan_r2r_3d(n0,n1,n2,in,out,kind0,kind1,kind2,flags) bind(C, name='fftw_plan_r2r_3d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 integer(C_INT), value :: n2 real(C_DOUBLE), dimension(*), intent(out) :: in real(C_DOUBLE), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), value :: kind0 integer(C_FFTW_R2R_KIND), value :: kind1 integer(C_FFTW_R2R_KIND), value :: kind2 integer(C_INT), value :: flags end function fftw_plan_r2r_3d type(C_PTR) function fftw_plan_guru_r2r(rank,dims,howmany_rank,howmany_dims,in,out,kind,flags) & bind(C, name='fftw_plan_guru_r2r') import integer(C_INT), value :: rank type(fftw_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftw_iodim), dimension(*), intent(in) :: howmany_dims real(C_DOUBLE), dimension(*), intent(out) :: in real(C_DOUBLE), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind integer(C_INT), value :: flags end function fftw_plan_guru_r2r type(C_PTR) function fftw_plan_guru64_r2r(rank,dims,howmany_rank,howmany_dims,in,out,kind,flags) & bind(C, name='fftw_plan_guru64_r2r') import integer(C_INT), value :: rank type(fftw_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftw_iodim64), dimension(*), intent(in) :: howmany_dims real(C_DOUBLE), dimension(*), intent(out) :: in real(C_DOUBLE), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind integer(C_INT), value :: flags end function fftw_plan_guru64_r2r subroutine fftw_execute_r2r(p,in,out) bind(C, name='fftw_execute_r2r') import type(C_PTR), value :: p real(C_DOUBLE), dimension(*), intent(inout) :: in real(C_DOUBLE), dimension(*), intent(out) :: out end subroutine fftw_execute_r2r subroutine fftw_destroy_plan(p) bind(C, name='fftw_destroy_plan') import type(C_PTR), value :: p end subroutine fftw_destroy_plan subroutine fftw_forget_wisdom() bind(C, name='fftw_forget_wisdom') import end subroutine fftw_forget_wisdom subroutine fftw_cleanup() bind(C, name='fftw_cleanup') import end subroutine fftw_cleanup subroutine fftw_set_timelimit(t) bind(C, name='fftw_set_timelimit') import real(C_DOUBLE), value :: t end subroutine fftw_set_timelimit subroutine fftw_plan_with_nthreads(nthreads) bind(C, name='fftw_plan_with_nthreads') import integer(C_INT), value :: nthreads end subroutine fftw_plan_with_nthreads integer(C_INT) function fftw_init_threads() bind(C, name='fftw_init_threads') import end function fftw_init_threads subroutine fftw_cleanup_threads() bind(C, name='fftw_cleanup_threads') import end subroutine fftw_cleanup_threads integer(C_INT) function fftw_export_wisdom_to_filename(filename) bind(C, name='fftw_export_wisdom_to_filename') import character(C_CHAR), dimension(*), intent(in) :: filename end function fftw_export_wisdom_to_filename subroutine fftw_export_wisdom_to_file(output_file) bind(C, name='fftw_export_wisdom_to_file') import type(C_PTR), value :: output_file end subroutine fftw_export_wisdom_to_file type(C_PTR) function fftw_export_wisdom_to_string() bind(C, name='fftw_export_wisdom_to_string') import end function fftw_export_wisdom_to_string subroutine fftw_export_wisdom(write_char,data) bind(C, name='fftw_export_wisdom') import type(C_FUNPTR), value :: write_char type(C_PTR), value :: data end subroutine fftw_export_wisdom integer(C_INT) function fftw_import_system_wisdom() bind(C, name='fftw_import_system_wisdom') import end function fftw_import_system_wisdom integer(C_INT) function fftw_import_wisdom_from_filename(filename) bind(C, name='fftw_import_wisdom_from_filename') import character(C_CHAR), dimension(*), intent(in) :: filename end function fftw_import_wisdom_from_filename integer(C_INT) function fftw_import_wisdom_from_file(input_file) bind(C, name='fftw_import_wisdom_from_file') import type(C_PTR), value :: input_file end function fftw_import_wisdom_from_file integer(C_INT) function fftw_import_wisdom_from_string(input_string) bind(C, name='fftw_import_wisdom_from_string') import character(C_CHAR), dimension(*), intent(in) :: input_string end function fftw_import_wisdom_from_string integer(C_INT) function fftw_import_wisdom(read_char,data) bind(C, name='fftw_import_wisdom') import type(C_FUNPTR), value :: read_char type(C_PTR), value :: data end function fftw_import_wisdom subroutine fftw_fprint_plan(p,output_file) bind(C, name='fftw_fprint_plan') import type(C_PTR), value :: p type(C_PTR), value :: output_file end subroutine fftw_fprint_plan subroutine fftw_print_plan(p) bind(C, name='fftw_print_plan') import type(C_PTR), value :: p end subroutine fftw_print_plan type(C_PTR) function fftw_sprint_plan(p) bind(C, name='fftw_sprint_plan') import type(C_PTR), value :: p end function fftw_sprint_plan type(C_PTR) function fftw_malloc(n) bind(C, name='fftw_malloc') import integer(C_SIZE_T), value :: n end function fftw_malloc type(C_PTR) function fftw_alloc_real(n) bind(C, name='fftw_alloc_real') import integer(C_SIZE_T), value :: n end function fftw_alloc_real type(C_PTR) function fftw_alloc_complex(n) bind(C, name='fftw_alloc_complex') import integer(C_SIZE_T), value :: n end function fftw_alloc_complex subroutine fftw_free(p) bind(C, name='fftw_free') import type(C_PTR), value :: p end subroutine fftw_free subroutine fftw_flops(p,add,mul,fmas) bind(C, name='fftw_flops') import type(C_PTR), value :: p real(C_DOUBLE), intent(out) :: add real(C_DOUBLE), intent(out) :: mul real(C_DOUBLE), intent(out) :: fmas end subroutine fftw_flops real(C_DOUBLE) function fftw_estimate_cost(p) bind(C, name='fftw_estimate_cost') import type(C_PTR), value :: p end function fftw_estimate_cost real(C_DOUBLE) function fftw_cost(p) bind(C, name='fftw_cost') import type(C_PTR), value :: p end function fftw_cost integer(C_INT) function fftw_alignment_of(p) bind(C, name='fftw_alignment_of') import real(C_DOUBLE), dimension(*), intent(out) :: p end function fftw_alignment_of end interface type, bind(C) :: fftwf_iodim integer(C_INT) n, is, os end type fftwf_iodim type, bind(C) :: fftwf_iodim64 integer(C_INTPTR_T) n, is, os end type fftwf_iodim64 interface type(C_PTR) function fftwf_plan_dft(rank,n,in,out,sign,flags) bind(C, name='fftwf_plan_dft') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwf_plan_dft type(C_PTR) function fftwf_plan_dft_1d(n,in,out,sign,flags) bind(C, name='fftwf_plan_dft_1d') import integer(C_INT), value :: n complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwf_plan_dft_1d type(C_PTR) function fftwf_plan_dft_2d(n0,n1,in,out,sign,flags) bind(C, name='fftwf_plan_dft_2d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwf_plan_dft_2d type(C_PTR) function fftwf_plan_dft_3d(n0,n1,n2,in,out,sign,flags) bind(C, name='fftwf_plan_dft_3d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 integer(C_INT), value :: n2 complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwf_plan_dft_3d type(C_PTR) function fftwf_plan_many_dft(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,sign,flags) & bind(C, name='fftwf_plan_many_dft') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n integer(C_INT), value :: howmany complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in integer(C_INT), dimension(*), intent(in) :: inembed integer(C_INT), value :: istride integer(C_INT), value :: idist complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), dimension(*), intent(in) :: onembed integer(C_INT), value :: ostride integer(C_INT), value :: odist integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwf_plan_many_dft type(C_PTR) function fftwf_plan_guru_dft(rank,dims,howmany_rank,howmany_dims,in,out,sign,flags) & bind(C, name='fftwf_plan_guru_dft') import integer(C_INT), value :: rank type(fftwf_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwf_iodim), dimension(*), intent(in) :: howmany_dims complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwf_plan_guru_dft type(C_PTR) function fftwf_plan_guru_split_dft(rank,dims,howmany_rank,howmany_dims,ri,ii,ro,io,flags) & bind(C, name='fftwf_plan_guru_split_dft') import integer(C_INT), value :: rank type(fftwf_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwf_iodim), dimension(*), intent(in) :: howmany_dims real(C_FLOAT), dimension(*), intent(out) :: ri real(C_FLOAT), dimension(*), intent(out) :: ii real(C_FLOAT), dimension(*), intent(out) :: ro real(C_FLOAT), dimension(*), intent(out) :: io integer(C_INT), value :: flags end function fftwf_plan_guru_split_dft type(C_PTR) function fftwf_plan_guru64_dft(rank,dims,howmany_rank,howmany_dims,in,out,sign,flags) & bind(C, name='fftwf_plan_guru64_dft') import integer(C_INT), value :: rank type(fftwf_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwf_iodim64), dimension(*), intent(in) :: howmany_dims complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwf_plan_guru64_dft type(C_PTR) function fftwf_plan_guru64_split_dft(rank,dims,howmany_rank,howmany_dims,ri,ii,ro,io,flags) & bind(C, name='fftwf_plan_guru64_split_dft') import integer(C_INT), value :: rank type(fftwf_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwf_iodim64), dimension(*), intent(in) :: howmany_dims real(C_FLOAT), dimension(*), intent(out) :: ri real(C_FLOAT), dimension(*), intent(out) :: ii real(C_FLOAT), dimension(*), intent(out) :: ro real(C_FLOAT), dimension(*), intent(out) :: io integer(C_INT), value :: flags end function fftwf_plan_guru64_split_dft subroutine fftwf_execute_dft(p,in,out) bind(C, name='fftwf_execute_dft') import type(C_PTR), value :: p complex(C_FLOAT_COMPLEX), dimension(*), intent(inout) :: in complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out end subroutine fftwf_execute_dft subroutine fftwf_execute_split_dft(p,ri,ii,ro,io) bind(C, name='fftwf_execute_split_dft') import type(C_PTR), value :: p real(C_FLOAT), dimension(*), intent(inout) :: ri real(C_FLOAT), dimension(*), intent(inout) :: ii real(C_FLOAT), dimension(*), intent(out) :: ro real(C_FLOAT), dimension(*), intent(out) :: io end subroutine fftwf_execute_split_dft type(C_PTR) function fftwf_plan_many_dft_r2c(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,flags) & bind(C, name='fftwf_plan_many_dft_r2c') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n integer(C_INT), value :: howmany real(C_FLOAT), dimension(*), intent(out) :: in integer(C_INT), dimension(*), intent(in) :: inembed integer(C_INT), value :: istride integer(C_INT), value :: idist complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), dimension(*), intent(in) :: onembed integer(C_INT), value :: ostride integer(C_INT), value :: odist integer(C_INT), value :: flags end function fftwf_plan_many_dft_r2c type(C_PTR) function fftwf_plan_dft_r2c(rank,n,in,out,flags) bind(C, name='fftwf_plan_dft_r2c') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n real(C_FLOAT), dimension(*), intent(out) :: in complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwf_plan_dft_r2c type(C_PTR) function fftwf_plan_dft_r2c_1d(n,in,out,flags) bind(C, name='fftwf_plan_dft_r2c_1d') import integer(C_INT), value :: n real(C_FLOAT), dimension(*), intent(out) :: in complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwf_plan_dft_r2c_1d type(C_PTR) function fftwf_plan_dft_r2c_2d(n0,n1,in,out,flags) bind(C, name='fftwf_plan_dft_r2c_2d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 real(C_FLOAT), dimension(*), intent(out) :: in complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwf_plan_dft_r2c_2d type(C_PTR) function fftwf_plan_dft_r2c_3d(n0,n1,n2,in,out,flags) bind(C, name='fftwf_plan_dft_r2c_3d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 integer(C_INT), value :: n2 real(C_FLOAT), dimension(*), intent(out) :: in complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwf_plan_dft_r2c_3d type(C_PTR) function fftwf_plan_many_dft_c2r(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,flags) & bind(C, name='fftwf_plan_many_dft_c2r') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n integer(C_INT), value :: howmany complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in integer(C_INT), dimension(*), intent(in) :: inembed integer(C_INT), value :: istride integer(C_INT), value :: idist real(C_FLOAT), dimension(*), intent(out) :: out integer(C_INT), dimension(*), intent(in) :: onembed integer(C_INT), value :: ostride integer(C_INT), value :: odist integer(C_INT), value :: flags end function fftwf_plan_many_dft_c2r type(C_PTR) function fftwf_plan_dft_c2r(rank,n,in,out,flags) bind(C, name='fftwf_plan_dft_c2r') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in real(C_FLOAT), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwf_plan_dft_c2r type(C_PTR) function fftwf_plan_dft_c2r_1d(n,in,out,flags) bind(C, name='fftwf_plan_dft_c2r_1d') import integer(C_INT), value :: n complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in real(C_FLOAT), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwf_plan_dft_c2r_1d type(C_PTR) function fftwf_plan_dft_c2r_2d(n0,n1,in,out,flags) bind(C, name='fftwf_plan_dft_c2r_2d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in real(C_FLOAT), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwf_plan_dft_c2r_2d type(C_PTR) function fftwf_plan_dft_c2r_3d(n0,n1,n2,in,out,flags) bind(C, name='fftwf_plan_dft_c2r_3d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 integer(C_INT), value :: n2 complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in real(C_FLOAT), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwf_plan_dft_c2r_3d type(C_PTR) function fftwf_plan_guru_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,out,flags) & bind(C, name='fftwf_plan_guru_dft_r2c') import integer(C_INT), value :: rank type(fftwf_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwf_iodim), dimension(*), intent(in) :: howmany_dims real(C_FLOAT), dimension(*), intent(out) :: in complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwf_plan_guru_dft_r2c type(C_PTR) function fftwf_plan_guru_dft_c2r(rank,dims,howmany_rank,howmany_dims,in,out,flags) & bind(C, name='fftwf_plan_guru_dft_c2r') import integer(C_INT), value :: rank type(fftwf_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwf_iodim), dimension(*), intent(in) :: howmany_dims complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in real(C_FLOAT), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwf_plan_guru_dft_c2r type(C_PTR) function fftwf_plan_guru_split_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,ro,io,flags) & bind(C, name='fftwf_plan_guru_split_dft_r2c') import integer(C_INT), value :: rank type(fftwf_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwf_iodim), dimension(*), intent(in) :: howmany_dims real(C_FLOAT), dimension(*), intent(out) :: in real(C_FLOAT), dimension(*), intent(out) :: ro real(C_FLOAT), dimension(*), intent(out) :: io integer(C_INT), value :: flags end function fftwf_plan_guru_split_dft_r2c type(C_PTR) function fftwf_plan_guru_split_dft_c2r(rank,dims,howmany_rank,howmany_dims,ri,ii,out,flags) & bind(C, name='fftwf_plan_guru_split_dft_c2r') import integer(C_INT), value :: rank type(fftwf_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwf_iodim), dimension(*), intent(in) :: howmany_dims real(C_FLOAT), dimension(*), intent(out) :: ri real(C_FLOAT), dimension(*), intent(out) :: ii real(C_FLOAT), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwf_plan_guru_split_dft_c2r type(C_PTR) function fftwf_plan_guru64_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,out,flags) & bind(C, name='fftwf_plan_guru64_dft_r2c') import integer(C_INT), value :: rank type(fftwf_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwf_iodim64), dimension(*), intent(in) :: howmany_dims real(C_FLOAT), dimension(*), intent(out) :: in complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwf_plan_guru64_dft_r2c type(C_PTR) function fftwf_plan_guru64_dft_c2r(rank,dims,howmany_rank,howmany_dims,in,out,flags) & bind(C, name='fftwf_plan_guru64_dft_c2r') import integer(C_INT), value :: rank type(fftwf_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwf_iodim64), dimension(*), intent(in) :: howmany_dims complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: in real(C_FLOAT), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwf_plan_guru64_dft_c2r type(C_PTR) function fftwf_plan_guru64_split_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,ro,io,flags) & bind(C, name='fftwf_plan_guru64_split_dft_r2c') import integer(C_INT), value :: rank type(fftwf_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwf_iodim64), dimension(*), intent(in) :: howmany_dims real(C_FLOAT), dimension(*), intent(out) :: in real(C_FLOAT), dimension(*), intent(out) :: ro real(C_FLOAT), dimension(*), intent(out) :: io integer(C_INT), value :: flags end function fftwf_plan_guru64_split_dft_r2c type(C_PTR) function fftwf_plan_guru64_split_dft_c2r(rank,dims,howmany_rank,howmany_dims,ri,ii,out,flags) & bind(C, name='fftwf_plan_guru64_split_dft_c2r') import integer(C_INT), value :: rank type(fftwf_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwf_iodim64), dimension(*), intent(in) :: howmany_dims real(C_FLOAT), dimension(*), intent(out) :: ri real(C_FLOAT), dimension(*), intent(out) :: ii real(C_FLOAT), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwf_plan_guru64_split_dft_c2r subroutine fftwf_execute_dft_r2c(p,in,out) bind(C, name='fftwf_execute_dft_r2c') import type(C_PTR), value :: p real(C_FLOAT), dimension(*), intent(inout) :: in complex(C_FLOAT_COMPLEX), dimension(*), intent(out) :: out end subroutine fftwf_execute_dft_r2c subroutine fftwf_execute_dft_c2r(p,in,out) bind(C, name='fftwf_execute_dft_c2r') import type(C_PTR), value :: p complex(C_FLOAT_COMPLEX), dimension(*), intent(inout) :: in real(C_FLOAT), dimension(*), intent(out) :: out end subroutine fftwf_execute_dft_c2r subroutine fftwf_execute_split_dft_r2c(p,in,ro,io) bind(C, name='fftwf_execute_split_dft_r2c') import type(C_PTR), value :: p real(C_FLOAT), dimension(*), intent(inout) :: in real(C_FLOAT), dimension(*), intent(out) :: ro real(C_FLOAT), dimension(*), intent(out) :: io end subroutine fftwf_execute_split_dft_r2c subroutine fftwf_execute_split_dft_c2r(p,ri,ii,out) bind(C, name='fftwf_execute_split_dft_c2r') import type(C_PTR), value :: p real(C_FLOAT), dimension(*), intent(inout) :: ri real(C_FLOAT), dimension(*), intent(inout) :: ii real(C_FLOAT), dimension(*), intent(out) :: out end subroutine fftwf_execute_split_dft_c2r type(C_PTR) function fftwf_plan_many_r2r(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,kind,flags) & bind(C, name='fftwf_plan_many_r2r') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n integer(C_INT), value :: howmany real(C_FLOAT), dimension(*), intent(out) :: in integer(C_INT), dimension(*), intent(in) :: inembed integer(C_INT), value :: istride integer(C_INT), value :: idist real(C_FLOAT), dimension(*), intent(out) :: out integer(C_INT), dimension(*), intent(in) :: onembed integer(C_INT), value :: ostride integer(C_INT), value :: odist integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind integer(C_INT), value :: flags end function fftwf_plan_many_r2r type(C_PTR) function fftwf_plan_r2r(rank,n,in,out,kind,flags) bind(C, name='fftwf_plan_r2r') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n real(C_FLOAT), dimension(*), intent(out) :: in real(C_FLOAT), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind integer(C_INT), value :: flags end function fftwf_plan_r2r type(C_PTR) function fftwf_plan_r2r_1d(n,in,out,kind,flags) bind(C, name='fftwf_plan_r2r_1d') import integer(C_INT), value :: n real(C_FLOAT), dimension(*), intent(out) :: in real(C_FLOAT), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), value :: kind integer(C_INT), value :: flags end function fftwf_plan_r2r_1d type(C_PTR) function fftwf_plan_r2r_2d(n0,n1,in,out,kind0,kind1,flags) bind(C, name='fftwf_plan_r2r_2d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 real(C_FLOAT), dimension(*), intent(out) :: in real(C_FLOAT), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), value :: kind0 integer(C_FFTW_R2R_KIND), value :: kind1 integer(C_INT), value :: flags end function fftwf_plan_r2r_2d type(C_PTR) function fftwf_plan_r2r_3d(n0,n1,n2,in,out,kind0,kind1,kind2,flags) bind(C, name='fftwf_plan_r2r_3d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 integer(C_INT), value :: n2 real(C_FLOAT), dimension(*), intent(out) :: in real(C_FLOAT), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), value :: kind0 integer(C_FFTW_R2R_KIND), value :: kind1 integer(C_FFTW_R2R_KIND), value :: kind2 integer(C_INT), value :: flags end function fftwf_plan_r2r_3d type(C_PTR) function fftwf_plan_guru_r2r(rank,dims,howmany_rank,howmany_dims,in,out,kind,flags) & bind(C, name='fftwf_plan_guru_r2r') import integer(C_INT), value :: rank type(fftwf_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwf_iodim), dimension(*), intent(in) :: howmany_dims real(C_FLOAT), dimension(*), intent(out) :: in real(C_FLOAT), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind integer(C_INT), value :: flags end function fftwf_plan_guru_r2r type(C_PTR) function fftwf_plan_guru64_r2r(rank,dims,howmany_rank,howmany_dims,in,out,kind,flags) & bind(C, name='fftwf_plan_guru64_r2r') import integer(C_INT), value :: rank type(fftwf_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwf_iodim64), dimension(*), intent(in) :: howmany_dims real(C_FLOAT), dimension(*), intent(out) :: in real(C_FLOAT), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind integer(C_INT), value :: flags end function fftwf_plan_guru64_r2r subroutine fftwf_execute_r2r(p,in,out) bind(C, name='fftwf_execute_r2r') import type(C_PTR), value :: p real(C_FLOAT), dimension(*), intent(inout) :: in real(C_FLOAT), dimension(*), intent(out) :: out end subroutine fftwf_execute_r2r subroutine fftwf_destroy_plan(p) bind(C, name='fftwf_destroy_plan') import type(C_PTR), value :: p end subroutine fftwf_destroy_plan subroutine fftwf_forget_wisdom() bind(C, name='fftwf_forget_wisdom') import end subroutine fftwf_forget_wisdom subroutine fftwf_cleanup() bind(C, name='fftwf_cleanup') import end subroutine fftwf_cleanup subroutine fftwf_set_timelimit(t) bind(C, name='fftwf_set_timelimit') import real(C_DOUBLE), value :: t end subroutine fftwf_set_timelimit subroutine fftwf_plan_with_nthreads(nthreads) bind(C, name='fftwf_plan_with_nthreads') import integer(C_INT), value :: nthreads end subroutine fftwf_plan_with_nthreads integer(C_INT) function fftwf_init_threads() bind(C, name='fftwf_init_threads') import end function fftwf_init_threads subroutine fftwf_cleanup_threads() bind(C, name='fftwf_cleanup_threads') import end subroutine fftwf_cleanup_threads integer(C_INT) function fftwf_export_wisdom_to_filename(filename) bind(C, name='fftwf_export_wisdom_to_filename') import character(C_CHAR), dimension(*), intent(in) :: filename end function fftwf_export_wisdom_to_filename subroutine fftwf_export_wisdom_to_file(output_file) bind(C, name='fftwf_export_wisdom_to_file') import type(C_PTR), value :: output_file end subroutine fftwf_export_wisdom_to_file type(C_PTR) function fftwf_export_wisdom_to_string() bind(C, name='fftwf_export_wisdom_to_string') import end function fftwf_export_wisdom_to_string subroutine fftwf_export_wisdom(write_char,data) bind(C, name='fftwf_export_wisdom') import type(C_FUNPTR), value :: write_char type(C_PTR), value :: data end subroutine fftwf_export_wisdom integer(C_INT) function fftwf_import_system_wisdom() bind(C, name='fftwf_import_system_wisdom') import end function fftwf_import_system_wisdom integer(C_INT) function fftwf_import_wisdom_from_filename(filename) bind(C, name='fftwf_import_wisdom_from_filename') import character(C_CHAR), dimension(*), intent(in) :: filename end function fftwf_import_wisdom_from_filename integer(C_INT) function fftwf_import_wisdom_from_file(input_file) bind(C, name='fftwf_import_wisdom_from_file') import type(C_PTR), value :: input_file end function fftwf_import_wisdom_from_file integer(C_INT) function fftwf_import_wisdom_from_string(input_string) bind(C, name='fftwf_import_wisdom_from_string') import character(C_CHAR), dimension(*), intent(in) :: input_string end function fftwf_import_wisdom_from_string integer(C_INT) function fftwf_import_wisdom(read_char,data) bind(C, name='fftwf_import_wisdom') import type(C_FUNPTR), value :: read_char type(C_PTR), value :: data end function fftwf_import_wisdom subroutine fftwf_fprint_plan(p,output_file) bind(C, name='fftwf_fprint_plan') import type(C_PTR), value :: p type(C_PTR), value :: output_file end subroutine fftwf_fprint_plan subroutine fftwf_print_plan(p) bind(C, name='fftwf_print_plan') import type(C_PTR), value :: p end subroutine fftwf_print_plan type(C_PTR) function fftwf_sprint_plan(p) bind(C, name='fftwf_sprint_plan') import type(C_PTR), value :: p end function fftwf_sprint_plan type(C_PTR) function fftwf_malloc(n) bind(C, name='fftwf_malloc') import integer(C_SIZE_T), value :: n end function fftwf_malloc type(C_PTR) function fftwf_alloc_real(n) bind(C, name='fftwf_alloc_real') import integer(C_SIZE_T), value :: n end function fftwf_alloc_real type(C_PTR) function fftwf_alloc_complex(n) bind(C, name='fftwf_alloc_complex') import integer(C_SIZE_T), value :: n end function fftwf_alloc_complex subroutine fftwf_free(p) bind(C, name='fftwf_free') import type(C_PTR), value :: p end subroutine fftwf_free subroutine fftwf_flops(p,add,mul,fmas) bind(C, name='fftwf_flops') import type(C_PTR), value :: p real(C_DOUBLE), intent(out) :: add real(C_DOUBLE), intent(out) :: mul real(C_DOUBLE), intent(out) :: fmas end subroutine fftwf_flops real(C_DOUBLE) function fftwf_estimate_cost(p) bind(C, name='fftwf_estimate_cost') import type(C_PTR), value :: p end function fftwf_estimate_cost real(C_DOUBLE) function fftwf_cost(p) bind(C, name='fftwf_cost') import type(C_PTR), value :: p end function fftwf_cost integer(C_INT) function fftwf_alignment_of(p) bind(C, name='fftwf_alignment_of') import real(C_FLOAT), dimension(*), intent(out) :: p end function fftwf_alignment_of end interface ================================================ FILE: OptolithiumC/libs/fftw3-win32/fftw3.h ================================================ /* * Copyright (c) 2003, 2007-14 Matteo Frigo * Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology * * The following statement of license applies *only* to this header file, * and *not* to the other files distributed with FFTW or derived therefrom: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /***************************** NOTE TO USERS ********************************* * * THIS IS A HEADER FILE, NOT A MANUAL * * If you want to know how to use FFTW, please read the manual, * online at http://www.fftw.org/doc/ and also included with FFTW. * For a quick start, see the manual's tutorial section. * * (Reading header files to learn how to use a library is a habit * stemming from code lacking a proper manual. Arguably, it's a * *bad* habit in most cases, because header files can contain * interfaces that are not part of the public, stable API.) * ****************************************************************************/ #ifndef FFTW3_H #define FFTW3_H #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* If is included, use the C99 complex type. Otherwise define a type bit-compatible with C99 complex */ #if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I) # define FFTW_DEFINE_COMPLEX(R, C) typedef R _Complex C #else # define FFTW_DEFINE_COMPLEX(R, C) typedef R C[2] #endif #define FFTW_CONCAT(prefix, name) prefix ## name #define FFTW_MANGLE_DOUBLE(name) FFTW_CONCAT(fftw_, name) #define FFTW_MANGLE_FLOAT(name) FFTW_CONCAT(fftwf_, name) #define FFTW_MANGLE_LONG_DOUBLE(name) FFTW_CONCAT(fftwl_, name) #define FFTW_MANGLE_QUAD(name) FFTW_CONCAT(fftwq_, name) /* IMPORTANT: for Windows compilers, you should add a line */ #define FFTW_DLL /* here and in kernel/ifftw.h if you are compiling/using FFTW as a DLL, in order to do the proper importing/exporting, or alternatively compile with -DFFTW_DLL or the equivalent command-line flag. This is not necessary under MinGW/Cygwin, where libtool does the imports/exports automatically. */ #if defined(FFTW_DLL) && (defined(_WIN32) || defined(__WIN32__)) /* annoying Windows syntax for shared-library declarations */ # if defined(COMPILING_FFTW) /* defined in api.h when compiling FFTW */ # define FFTW_EXTERN extern __declspec(dllexport) # else /* user is calling FFTW; import symbol */ # define FFTW_EXTERN extern __declspec(dllimport) # endif #else # define FFTW_EXTERN extern #endif enum fftw_r2r_kind_do_not_use_me { FFTW_R2HC=0, FFTW_HC2R=1, FFTW_DHT=2, FFTW_REDFT00=3, FFTW_REDFT01=4, FFTW_REDFT10=5, FFTW_REDFT11=6, FFTW_RODFT00=7, FFTW_RODFT01=8, FFTW_RODFT10=9, FFTW_RODFT11=10 }; struct fftw_iodim_do_not_use_me { int n; /* dimension size */ int is; /* input stride */ int os; /* output stride */ }; #include /* for ptrdiff_t */ struct fftw_iodim64_do_not_use_me { ptrdiff_t n; /* dimension size */ ptrdiff_t is; /* input stride */ ptrdiff_t os; /* output stride */ }; typedef void (*fftw_write_char_func_do_not_use_me)(char c, void *); typedef int (*fftw_read_char_func_do_not_use_me)(void *); /* huge second-order macro that defines prototypes for all API functions. We expand this macro for each supported precision X: name-mangling macro R: real data type C: complex data type */ #define FFTW_DEFINE_API(X, R, C) \ \ FFTW_DEFINE_COMPLEX(R, C); \ \ typedef struct X(plan_s) *X(plan); \ \ typedef struct fftw_iodim_do_not_use_me X(iodim); \ typedef struct fftw_iodim64_do_not_use_me X(iodim64); \ \ typedef enum fftw_r2r_kind_do_not_use_me X(r2r_kind); \ \ typedef fftw_write_char_func_do_not_use_me X(write_char_func); \ typedef fftw_read_char_func_do_not_use_me X(read_char_func); \ \ FFTW_EXTERN void X(execute)(const X(plan) p); \ \ FFTW_EXTERN X(plan) X(plan_dft)(int rank, const int *n, \ C *in, C *out, int sign, unsigned flags); \ \ FFTW_EXTERN X(plan) X(plan_dft_1d)(int n, C *in, C *out, int sign, \ unsigned flags); \ FFTW_EXTERN X(plan) X(plan_dft_2d)(int n0, int n1, \ C *in, C *out, int sign, unsigned flags); \ FFTW_EXTERN X(plan) X(plan_dft_3d)(int n0, int n1, int n2, \ C *in, C *out, int sign, unsigned flags); \ \ FFTW_EXTERN X(plan) X(plan_many_dft)(int rank, const int *n, \ int howmany, \ C *in, const int *inembed, \ int istride, int idist, \ C *out, const int *onembed, \ int ostride, int odist, \ int sign, unsigned flags); \ \ FFTW_EXTERN X(plan) X(plan_guru_dft)(int rank, const X(iodim) *dims, \ int howmany_rank, \ const X(iodim) *howmany_dims, \ C *in, C *out, \ int sign, unsigned flags); \ FFTW_EXTERN X(plan) X(plan_guru_split_dft)(int rank, const X(iodim) *dims, \ int howmany_rank, \ const X(iodim) *howmany_dims, \ R *ri, R *ii, R *ro, R *io, \ unsigned flags); \ \ FFTW_EXTERN X(plan) X(plan_guru64_dft)(int rank, \ const X(iodim64) *dims, \ int howmany_rank, \ const X(iodim64) *howmany_dims, \ C *in, C *out, \ int sign, unsigned flags); \ FFTW_EXTERN X(plan) X(plan_guru64_split_dft)(int rank, \ const X(iodim64) *dims, \ int howmany_rank, \ const X(iodim64) *howmany_dims, \ R *ri, R *ii, R *ro, R *io, \ unsigned flags); \ \ FFTW_EXTERN void X(execute_dft)(const X(plan) p, C *in, C *out); \ FFTW_EXTERN void X(execute_split_dft)(const X(plan) p, R *ri, R *ii, \ R *ro, R *io); \ \ FFTW_EXTERN X(plan) X(plan_many_dft_r2c)(int rank, const int *n, \ int howmany, \ R *in, const int *inembed, \ int istride, int idist, \ C *out, const int *onembed, \ int ostride, int odist, \ unsigned flags); \ \ FFTW_EXTERN X(plan) X(plan_dft_r2c)(int rank, const int *n, \ R *in, C *out, unsigned flags); \ \ FFTW_EXTERN X(plan) X(plan_dft_r2c_1d)(int n,R *in,C *out,unsigned flags); \ FFTW_EXTERN X(plan) X(plan_dft_r2c_2d)(int n0, int n1, \ R *in, C *out, unsigned flags); \ FFTW_EXTERN X(plan) X(plan_dft_r2c_3d)(int n0, int n1, \ int n2, \ R *in, C *out, unsigned flags); \ \ \ FFTW_EXTERN X(plan) X(plan_many_dft_c2r)(int rank, const int *n, \ int howmany, \ C *in, const int *inembed, \ int istride, int idist, \ R *out, const int *onembed, \ int ostride, int odist, \ unsigned flags); \ \ FFTW_EXTERN X(plan) X(plan_dft_c2r)(int rank, const int *n, \ C *in, R *out, unsigned flags); \ \ FFTW_EXTERN X(plan) X(plan_dft_c2r_1d)(int n,C *in,R *out,unsigned flags); \ FFTW_EXTERN X(plan) X(plan_dft_c2r_2d)(int n0, int n1, \ C *in, R *out, unsigned flags); \ FFTW_EXTERN X(plan) X(plan_dft_c2r_3d)(int n0, int n1, \ int n2, \ C *in, R *out, unsigned flags); \ \ FFTW_EXTERN X(plan) X(plan_guru_dft_r2c)(int rank, const X(iodim) *dims, \ int howmany_rank, \ const X(iodim) *howmany_dims, \ R *in, C *out, \ unsigned flags); \ FFTW_EXTERN X(plan) X(plan_guru_dft_c2r)(int rank, const X(iodim) *dims, \ int howmany_rank, \ const X(iodim) *howmany_dims, \ C *in, R *out, \ unsigned flags); \ \ FFTW_EXTERN X(plan) X(plan_guru_split_dft_r2c)( \ int rank, const X(iodim) *dims, \ int howmany_rank, \ const X(iodim) *howmany_dims, \ R *in, R *ro, R *io, \ unsigned flags); \ FFTW_EXTERN X(plan) X(plan_guru_split_dft_c2r)( \ int rank, const X(iodim) *dims, \ int howmany_rank, \ const X(iodim) *howmany_dims, \ R *ri, R *ii, R *out, \ unsigned flags); \ \ FFTW_EXTERN X(plan) X(plan_guru64_dft_r2c)(int rank, \ const X(iodim64) *dims, \ int howmany_rank, \ const X(iodim64) *howmany_dims, \ R *in, C *out, \ unsigned flags); \ FFTW_EXTERN X(plan) X(plan_guru64_dft_c2r)(int rank, \ const X(iodim64) *dims, \ int howmany_rank, \ const X(iodim64) *howmany_dims, \ C *in, R *out, \ unsigned flags); \ \ FFTW_EXTERN X(plan) X(plan_guru64_split_dft_r2c)( \ int rank, const X(iodim64) *dims, \ int howmany_rank, \ const X(iodim64) *howmany_dims, \ R *in, R *ro, R *io, \ unsigned flags); \ FFTW_EXTERN X(plan) X(plan_guru64_split_dft_c2r)( \ int rank, const X(iodim64) *dims, \ int howmany_rank, \ const X(iodim64) *howmany_dims, \ R *ri, R *ii, R *out, \ unsigned flags); \ \ FFTW_EXTERN void X(execute_dft_r2c)(const X(plan) p, R *in, C *out); \ FFTW_EXTERN void X(execute_dft_c2r)(const X(plan) p, C *in, R *out); \ \ FFTW_EXTERN void X(execute_split_dft_r2c)(const X(plan) p, \ R *in, R *ro, R *io); \ FFTW_EXTERN void X(execute_split_dft_c2r)(const X(plan) p, \ R *ri, R *ii, R *out); \ \ FFTW_EXTERN X(plan) X(plan_many_r2r)(int rank, const int *n, \ int howmany, \ R *in, const int *inembed, \ int istride, int idist, \ R *out, const int *onembed, \ int ostride, int odist, \ const X(r2r_kind) *kind, unsigned flags); \ \ FFTW_EXTERN X(plan) X(plan_r2r)(int rank, const int *n, R *in, R *out, \ const X(r2r_kind) *kind, unsigned flags); \ \ FFTW_EXTERN X(plan) X(plan_r2r_1d)(int n, R *in, R *out, \ X(r2r_kind) kind, unsigned flags); \ FFTW_EXTERN X(plan) X(plan_r2r_2d)(int n0, int n1, R *in, R *out, \ X(r2r_kind) kind0, X(r2r_kind) kind1, \ unsigned flags); \ FFTW_EXTERN X(plan) X(plan_r2r_3d)(int n0, int n1, int n2, \ R *in, R *out, X(r2r_kind) kind0, \ X(r2r_kind) kind1, X(r2r_kind) kind2, \ unsigned flags); \ \ FFTW_EXTERN X(plan) X(plan_guru_r2r)(int rank, const X(iodim) *dims, \ int howmany_rank, \ const X(iodim) *howmany_dims, \ R *in, R *out, \ const X(r2r_kind) *kind, unsigned flags); \ \ FFTW_EXTERN X(plan) X(plan_guru64_r2r)(int rank, const X(iodim64) *dims, \ int howmany_rank, \ const X(iodim64) *howmany_dims, \ R *in, R *out, \ const X(r2r_kind) *kind, unsigned flags); \ \ FFTW_EXTERN void X(execute_r2r)(const X(plan) p, R *in, R *out); \ \ FFTW_EXTERN void X(destroy_plan)(X(plan) p); \ FFTW_EXTERN void X(forget_wisdom)(void); \ FFTW_EXTERN void X(cleanup)(void); \ \ FFTW_EXTERN void X(set_timelimit)(double t); \ \ FFTW_EXTERN void X(plan_with_nthreads)(int nthreads); \ FFTW_EXTERN int X(init_threads)(void); \ FFTW_EXTERN void X(cleanup_threads)(void); \ \ FFTW_EXTERN int X(export_wisdom_to_filename)(const char *filename); \ FFTW_EXTERN void X(export_wisdom_to_file)(FILE *output_file); \ FFTW_EXTERN char *X(export_wisdom_to_string)(void); \ FFTW_EXTERN void X(export_wisdom)(X(write_char_func) write_char, \ void *data); \ FFTW_EXTERN int X(import_system_wisdom)(void); \ FFTW_EXTERN int X(import_wisdom_from_filename)(const char *filename); \ FFTW_EXTERN int X(import_wisdom_from_file)(FILE *input_file); \ FFTW_EXTERN int X(import_wisdom_from_string)(const char *input_string); \ FFTW_EXTERN int X(import_wisdom)(X(read_char_func) read_char, void *data); \ \ FFTW_EXTERN void X(fprint_plan)(const X(plan) p, FILE *output_file); \ FFTW_EXTERN void X(print_plan)(const X(plan) p); \ FFTW_EXTERN char *X(sprint_plan)(const X(plan) p); \ \ FFTW_EXTERN void *X(malloc)(size_t n); \ FFTW_EXTERN R *X(alloc_real)(size_t n); \ FFTW_EXTERN C *X(alloc_complex)(size_t n); \ FFTW_EXTERN void X(free)(void *p); \ \ FFTW_EXTERN void X(flops)(const X(plan) p, \ double *add, double *mul, double *fmas); \ FFTW_EXTERN double X(estimate_cost)(const X(plan) p); \ FFTW_EXTERN double X(cost)(const X(plan) p); \ \ FFTW_EXTERN int X(alignment_of)(R *p); \ FFTW_EXTERN const char X(version)[]; \ FFTW_EXTERN const char X(cc)[]; \ FFTW_EXTERN const char X(codelet_optim)[]; /* end of FFTW_DEFINE_API macro */ FFTW_DEFINE_API(FFTW_MANGLE_DOUBLE, double, fftw_complex) FFTW_DEFINE_API(FFTW_MANGLE_FLOAT, float, fftwf_complex) FFTW_DEFINE_API(FFTW_MANGLE_LONG_DOUBLE, long double, fftwl_complex) /* __float128 (quad precision) is a gcc extension on i386, x86_64, and ia64 for gcc >= 4.6 (compiled in FFTW with --enable-quad-precision) */ #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) \ && !(defined(__ICC) || defined(__INTEL_COMPILER)) \ && (defined(__i386__) || defined(__x86_64__) || defined(__ia64__)) # if !defined(FFTW_NO_Complex) && defined(_Complex_I) && defined(complex) && defined(I) /* note: __float128 is a typedef, which is not supported with the _Complex keyword in gcc, so instead we use this ugly __attribute__ version. However, we can't simply pass the __attribute__ version to FFTW_DEFINE_API because the __attribute__ confuses gcc in pointer types. Hence redefining FFTW_DEFINE_COMPLEX. Ugh. */ # undef FFTW_DEFINE_COMPLEX # define FFTW_DEFINE_COMPLEX(R, C) typedef _Complex float __attribute__((mode(TC))) C # endif FFTW_DEFINE_API(FFTW_MANGLE_QUAD, __float128, fftwq_complex) #endif #define FFTW_FORWARD (-1) #define FFTW_BACKWARD (+1) #define FFTW_NO_TIMELIMIT (-1.0) /* documented flags */ #define FFTW_MEASURE (0U) #define FFTW_DESTROY_INPUT (1U << 0) #define FFTW_UNALIGNED (1U << 1) #define FFTW_CONSERVE_MEMORY (1U << 2) #define FFTW_EXHAUSTIVE (1U << 3) /* NO_EXHAUSTIVE is default */ #define FFTW_PRESERVE_INPUT (1U << 4) /* cancels FFTW_DESTROY_INPUT */ #define FFTW_PATIENT (1U << 5) /* IMPATIENT is default */ #define FFTW_ESTIMATE (1U << 6) #define FFTW_WISDOM_ONLY (1U << 21) /* undocumented beyond-guru flags */ #define FFTW_ESTIMATE_PATIENT (1U << 7) #define FFTW_BELIEVE_PCOST (1U << 8) #define FFTW_NO_DFT_R2HC (1U << 9) #define FFTW_NO_NONTHREADED (1U << 10) #define FFTW_NO_BUFFERING (1U << 11) #define FFTW_NO_INDIRECT_OP (1U << 12) #define FFTW_ALLOW_LARGE_GENERIC (1U << 13) /* NO_LARGE_GENERIC is default */ #define FFTW_NO_RANK_SPLITS (1U << 14) #define FFTW_NO_VRANK_SPLITS (1U << 15) #define FFTW_NO_VRECURSE (1U << 16) #define FFTW_NO_SIMD (1U << 17) #define FFTW_NO_SLOW (1U << 18) #define FFTW_NO_FIXED_RADIX_LARGE_N (1U << 19) #define FFTW_ALLOW_PRUNING (1U << 20) #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #endif /* FFTW3_H */ ================================================ FILE: OptolithiumC/libs/fftw3-win32/fftw3l.f03 ================================================ ! Generated automatically. DO NOT EDIT! type, bind(C) :: fftwl_iodim integer(C_INT) n, is, os end type fftwl_iodim type, bind(C) :: fftwl_iodim64 integer(C_INTPTR_T) n, is, os end type fftwl_iodim64 interface type(C_PTR) function fftwl_plan_dft(rank,n,in,out,sign,flags) bind(C, name='fftwl_plan_dft') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: in complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwl_plan_dft type(C_PTR) function fftwl_plan_dft_1d(n,in,out,sign,flags) bind(C, name='fftwl_plan_dft_1d') import integer(C_INT), value :: n complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: in complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwl_plan_dft_1d type(C_PTR) function fftwl_plan_dft_2d(n0,n1,in,out,sign,flags) bind(C, name='fftwl_plan_dft_2d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: in complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwl_plan_dft_2d type(C_PTR) function fftwl_plan_dft_3d(n0,n1,n2,in,out,sign,flags) bind(C, name='fftwl_plan_dft_3d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 integer(C_INT), value :: n2 complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: in complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwl_plan_dft_3d type(C_PTR) function fftwl_plan_many_dft(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,sign,flags) & bind(C, name='fftwl_plan_many_dft') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n integer(C_INT), value :: howmany complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: in integer(C_INT), dimension(*), intent(in) :: inembed integer(C_INT), value :: istride integer(C_INT), value :: idist complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), dimension(*), intent(in) :: onembed integer(C_INT), value :: ostride integer(C_INT), value :: odist integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwl_plan_many_dft type(C_PTR) function fftwl_plan_guru_dft(rank,dims,howmany_rank,howmany_dims,in,out,sign,flags) & bind(C, name='fftwl_plan_guru_dft') import integer(C_INT), value :: rank type(fftwl_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwl_iodim), dimension(*), intent(in) :: howmany_dims complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: in complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwl_plan_guru_dft type(C_PTR) function fftwl_plan_guru_split_dft(rank,dims,howmany_rank,howmany_dims,ri,ii,ro,io,flags) & bind(C, name='fftwl_plan_guru_split_dft') import integer(C_INT), value :: rank type(fftwl_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwl_iodim), dimension(*), intent(in) :: howmany_dims real(C_LONG_DOUBLE), dimension(*), intent(out) :: ri real(C_LONG_DOUBLE), dimension(*), intent(out) :: ii real(C_LONG_DOUBLE), dimension(*), intent(out) :: ro real(C_LONG_DOUBLE), dimension(*), intent(out) :: io integer(C_INT), value :: flags end function fftwl_plan_guru_split_dft type(C_PTR) function fftwl_plan_guru64_dft(rank,dims,howmany_rank,howmany_dims,in,out,sign,flags) & bind(C, name='fftwl_plan_guru64_dft') import integer(C_INT), value :: rank type(fftwl_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwl_iodim64), dimension(*), intent(in) :: howmany_dims complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: in complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwl_plan_guru64_dft type(C_PTR) function fftwl_plan_guru64_split_dft(rank,dims,howmany_rank,howmany_dims,ri,ii,ro,io,flags) & bind(C, name='fftwl_plan_guru64_split_dft') import integer(C_INT), value :: rank type(fftwl_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwl_iodim64), dimension(*), intent(in) :: howmany_dims real(C_LONG_DOUBLE), dimension(*), intent(out) :: ri real(C_LONG_DOUBLE), dimension(*), intent(out) :: ii real(C_LONG_DOUBLE), dimension(*), intent(out) :: ro real(C_LONG_DOUBLE), dimension(*), intent(out) :: io integer(C_INT), value :: flags end function fftwl_plan_guru64_split_dft subroutine fftwl_execute_dft(p,in,out) bind(C, name='fftwl_execute_dft') import type(C_PTR), value :: p complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(inout) :: in complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: out end subroutine fftwl_execute_dft subroutine fftwl_execute_split_dft(p,ri,ii,ro,io) bind(C, name='fftwl_execute_split_dft') import type(C_PTR), value :: p real(C_LONG_DOUBLE), dimension(*), intent(inout) :: ri real(C_LONG_DOUBLE), dimension(*), intent(inout) :: ii real(C_LONG_DOUBLE), dimension(*), intent(out) :: ro real(C_LONG_DOUBLE), dimension(*), intent(out) :: io end subroutine fftwl_execute_split_dft type(C_PTR) function fftwl_plan_many_dft_r2c(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,flags) & bind(C, name='fftwl_plan_many_dft_r2c') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n integer(C_INT), value :: howmany real(C_LONG_DOUBLE), dimension(*), intent(out) :: in integer(C_INT), dimension(*), intent(in) :: inembed integer(C_INT), value :: istride integer(C_INT), value :: idist complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), dimension(*), intent(in) :: onembed integer(C_INT), value :: ostride integer(C_INT), value :: odist integer(C_INT), value :: flags end function fftwl_plan_many_dft_r2c type(C_PTR) function fftwl_plan_dft_r2c(rank,n,in,out,flags) bind(C, name='fftwl_plan_dft_r2c') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n real(C_LONG_DOUBLE), dimension(*), intent(out) :: in complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwl_plan_dft_r2c type(C_PTR) function fftwl_plan_dft_r2c_1d(n,in,out,flags) bind(C, name='fftwl_plan_dft_r2c_1d') import integer(C_INT), value :: n real(C_LONG_DOUBLE), dimension(*), intent(out) :: in complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwl_plan_dft_r2c_1d type(C_PTR) function fftwl_plan_dft_r2c_2d(n0,n1,in,out,flags) bind(C, name='fftwl_plan_dft_r2c_2d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 real(C_LONG_DOUBLE), dimension(*), intent(out) :: in complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwl_plan_dft_r2c_2d type(C_PTR) function fftwl_plan_dft_r2c_3d(n0,n1,n2,in,out,flags) bind(C, name='fftwl_plan_dft_r2c_3d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 integer(C_INT), value :: n2 real(C_LONG_DOUBLE), dimension(*), intent(out) :: in complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwl_plan_dft_r2c_3d type(C_PTR) function fftwl_plan_many_dft_c2r(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,flags) & bind(C, name='fftwl_plan_many_dft_c2r') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n integer(C_INT), value :: howmany complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: in integer(C_INT), dimension(*), intent(in) :: inembed integer(C_INT), value :: istride integer(C_INT), value :: idist real(C_LONG_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), dimension(*), intent(in) :: onembed integer(C_INT), value :: ostride integer(C_INT), value :: odist integer(C_INT), value :: flags end function fftwl_plan_many_dft_c2r type(C_PTR) function fftwl_plan_dft_c2r(rank,n,in,out,flags) bind(C, name='fftwl_plan_dft_c2r') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwl_plan_dft_c2r type(C_PTR) function fftwl_plan_dft_c2r_1d(n,in,out,flags) bind(C, name='fftwl_plan_dft_c2r_1d') import integer(C_INT), value :: n complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwl_plan_dft_c2r_1d type(C_PTR) function fftwl_plan_dft_c2r_2d(n0,n1,in,out,flags) bind(C, name='fftwl_plan_dft_c2r_2d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwl_plan_dft_c2r_2d type(C_PTR) function fftwl_plan_dft_c2r_3d(n0,n1,n2,in,out,flags) bind(C, name='fftwl_plan_dft_c2r_3d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 integer(C_INT), value :: n2 complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwl_plan_dft_c2r_3d type(C_PTR) function fftwl_plan_guru_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,out,flags) & bind(C, name='fftwl_plan_guru_dft_r2c') import integer(C_INT), value :: rank type(fftwl_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwl_iodim), dimension(*), intent(in) :: howmany_dims real(C_LONG_DOUBLE), dimension(*), intent(out) :: in complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwl_plan_guru_dft_r2c type(C_PTR) function fftwl_plan_guru_dft_c2r(rank,dims,howmany_rank,howmany_dims,in,out,flags) & bind(C, name='fftwl_plan_guru_dft_c2r') import integer(C_INT), value :: rank type(fftwl_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwl_iodim), dimension(*), intent(in) :: howmany_dims complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwl_plan_guru_dft_c2r type(C_PTR) function fftwl_plan_guru_split_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,ro,io,flags) & bind(C, name='fftwl_plan_guru_split_dft_r2c') import integer(C_INT), value :: rank type(fftwl_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwl_iodim), dimension(*), intent(in) :: howmany_dims real(C_LONG_DOUBLE), dimension(*), intent(out) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: ro real(C_LONG_DOUBLE), dimension(*), intent(out) :: io integer(C_INT), value :: flags end function fftwl_plan_guru_split_dft_r2c type(C_PTR) function fftwl_plan_guru_split_dft_c2r(rank,dims,howmany_rank,howmany_dims,ri,ii,out,flags) & bind(C, name='fftwl_plan_guru_split_dft_c2r') import integer(C_INT), value :: rank type(fftwl_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwl_iodim), dimension(*), intent(in) :: howmany_dims real(C_LONG_DOUBLE), dimension(*), intent(out) :: ri real(C_LONG_DOUBLE), dimension(*), intent(out) :: ii real(C_LONG_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwl_plan_guru_split_dft_c2r type(C_PTR) function fftwl_plan_guru64_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,out,flags) & bind(C, name='fftwl_plan_guru64_dft_r2c') import integer(C_INT), value :: rank type(fftwl_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwl_iodim64), dimension(*), intent(in) :: howmany_dims real(C_LONG_DOUBLE), dimension(*), intent(out) :: in complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwl_plan_guru64_dft_r2c type(C_PTR) function fftwl_plan_guru64_dft_c2r(rank,dims,howmany_rank,howmany_dims,in,out,flags) & bind(C, name='fftwl_plan_guru64_dft_c2r') import integer(C_INT), value :: rank type(fftwl_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwl_iodim64), dimension(*), intent(in) :: howmany_dims complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwl_plan_guru64_dft_c2r type(C_PTR) function fftwl_plan_guru64_split_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,ro,io,flags) & bind(C, name='fftwl_plan_guru64_split_dft_r2c') import integer(C_INT), value :: rank type(fftwl_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwl_iodim64), dimension(*), intent(in) :: howmany_dims real(C_LONG_DOUBLE), dimension(*), intent(out) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: ro real(C_LONG_DOUBLE), dimension(*), intent(out) :: io integer(C_INT), value :: flags end function fftwl_plan_guru64_split_dft_r2c type(C_PTR) function fftwl_plan_guru64_split_dft_c2r(rank,dims,howmany_rank,howmany_dims,ri,ii,out,flags) & bind(C, name='fftwl_plan_guru64_split_dft_c2r') import integer(C_INT), value :: rank type(fftwl_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwl_iodim64), dimension(*), intent(in) :: howmany_dims real(C_LONG_DOUBLE), dimension(*), intent(out) :: ri real(C_LONG_DOUBLE), dimension(*), intent(out) :: ii real(C_LONG_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwl_plan_guru64_split_dft_c2r subroutine fftwl_execute_dft_r2c(p,in,out) bind(C, name='fftwl_execute_dft_r2c') import type(C_PTR), value :: p real(C_LONG_DOUBLE), dimension(*), intent(inout) :: in complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(out) :: out end subroutine fftwl_execute_dft_r2c subroutine fftwl_execute_dft_c2r(p,in,out) bind(C, name='fftwl_execute_dft_c2r') import type(C_PTR), value :: p complex(C_LONG_DOUBLE_COMPLEX), dimension(*), intent(inout) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: out end subroutine fftwl_execute_dft_c2r subroutine fftwl_execute_split_dft_r2c(p,in,ro,io) bind(C, name='fftwl_execute_split_dft_r2c') import type(C_PTR), value :: p real(C_LONG_DOUBLE), dimension(*), intent(inout) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: ro real(C_LONG_DOUBLE), dimension(*), intent(out) :: io end subroutine fftwl_execute_split_dft_r2c subroutine fftwl_execute_split_dft_c2r(p,ri,ii,out) bind(C, name='fftwl_execute_split_dft_c2r') import type(C_PTR), value :: p real(C_LONG_DOUBLE), dimension(*), intent(inout) :: ri real(C_LONG_DOUBLE), dimension(*), intent(inout) :: ii real(C_LONG_DOUBLE), dimension(*), intent(out) :: out end subroutine fftwl_execute_split_dft_c2r type(C_PTR) function fftwl_plan_many_r2r(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,kind,flags) & bind(C, name='fftwl_plan_many_r2r') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n integer(C_INT), value :: howmany real(C_LONG_DOUBLE), dimension(*), intent(out) :: in integer(C_INT), dimension(*), intent(in) :: inembed integer(C_INT), value :: istride integer(C_INT), value :: idist real(C_LONG_DOUBLE), dimension(*), intent(out) :: out integer(C_INT), dimension(*), intent(in) :: onembed integer(C_INT), value :: ostride integer(C_INT), value :: odist integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind integer(C_INT), value :: flags end function fftwl_plan_many_r2r type(C_PTR) function fftwl_plan_r2r(rank,n,in,out,kind,flags) bind(C, name='fftwl_plan_r2r') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n real(C_LONG_DOUBLE), dimension(*), intent(out) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind integer(C_INT), value :: flags end function fftwl_plan_r2r type(C_PTR) function fftwl_plan_r2r_1d(n,in,out,kind,flags) bind(C, name='fftwl_plan_r2r_1d') import integer(C_INT), value :: n real(C_LONG_DOUBLE), dimension(*), intent(out) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), value :: kind integer(C_INT), value :: flags end function fftwl_plan_r2r_1d type(C_PTR) function fftwl_plan_r2r_2d(n0,n1,in,out,kind0,kind1,flags) bind(C, name='fftwl_plan_r2r_2d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 real(C_LONG_DOUBLE), dimension(*), intent(out) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), value :: kind0 integer(C_FFTW_R2R_KIND), value :: kind1 integer(C_INT), value :: flags end function fftwl_plan_r2r_2d type(C_PTR) function fftwl_plan_r2r_3d(n0,n1,n2,in,out,kind0,kind1,kind2,flags) bind(C, name='fftwl_plan_r2r_3d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 integer(C_INT), value :: n2 real(C_LONG_DOUBLE), dimension(*), intent(out) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), value :: kind0 integer(C_FFTW_R2R_KIND), value :: kind1 integer(C_FFTW_R2R_KIND), value :: kind2 integer(C_INT), value :: flags end function fftwl_plan_r2r_3d type(C_PTR) function fftwl_plan_guru_r2r(rank,dims,howmany_rank,howmany_dims,in,out,kind,flags) & bind(C, name='fftwl_plan_guru_r2r') import integer(C_INT), value :: rank type(fftwl_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwl_iodim), dimension(*), intent(in) :: howmany_dims real(C_LONG_DOUBLE), dimension(*), intent(out) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind integer(C_INT), value :: flags end function fftwl_plan_guru_r2r type(C_PTR) function fftwl_plan_guru64_r2r(rank,dims,howmany_rank,howmany_dims,in,out,kind,flags) & bind(C, name='fftwl_plan_guru64_r2r') import integer(C_INT), value :: rank type(fftwl_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwl_iodim64), dimension(*), intent(in) :: howmany_dims real(C_LONG_DOUBLE), dimension(*), intent(out) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind integer(C_INT), value :: flags end function fftwl_plan_guru64_r2r subroutine fftwl_execute_r2r(p,in,out) bind(C, name='fftwl_execute_r2r') import type(C_PTR), value :: p real(C_LONG_DOUBLE), dimension(*), intent(inout) :: in real(C_LONG_DOUBLE), dimension(*), intent(out) :: out end subroutine fftwl_execute_r2r subroutine fftwl_destroy_plan(p) bind(C, name='fftwl_destroy_plan') import type(C_PTR), value :: p end subroutine fftwl_destroy_plan subroutine fftwl_forget_wisdom() bind(C, name='fftwl_forget_wisdom') import end subroutine fftwl_forget_wisdom subroutine fftwl_cleanup() bind(C, name='fftwl_cleanup') import end subroutine fftwl_cleanup subroutine fftwl_set_timelimit(t) bind(C, name='fftwl_set_timelimit') import real(C_DOUBLE), value :: t end subroutine fftwl_set_timelimit subroutine fftwl_plan_with_nthreads(nthreads) bind(C, name='fftwl_plan_with_nthreads') import integer(C_INT), value :: nthreads end subroutine fftwl_plan_with_nthreads integer(C_INT) function fftwl_init_threads() bind(C, name='fftwl_init_threads') import end function fftwl_init_threads subroutine fftwl_cleanup_threads() bind(C, name='fftwl_cleanup_threads') import end subroutine fftwl_cleanup_threads integer(C_INT) function fftwl_export_wisdom_to_filename(filename) bind(C, name='fftwl_export_wisdom_to_filename') import character(C_CHAR), dimension(*), intent(in) :: filename end function fftwl_export_wisdom_to_filename subroutine fftwl_export_wisdom_to_file(output_file) bind(C, name='fftwl_export_wisdom_to_file') import type(C_PTR), value :: output_file end subroutine fftwl_export_wisdom_to_file type(C_PTR) function fftwl_export_wisdom_to_string() bind(C, name='fftwl_export_wisdom_to_string') import end function fftwl_export_wisdom_to_string subroutine fftwl_export_wisdom(write_char,data) bind(C, name='fftwl_export_wisdom') import type(C_FUNPTR), value :: write_char type(C_PTR), value :: data end subroutine fftwl_export_wisdom integer(C_INT) function fftwl_import_system_wisdom() bind(C, name='fftwl_import_system_wisdom') import end function fftwl_import_system_wisdom integer(C_INT) function fftwl_import_wisdom_from_filename(filename) bind(C, name='fftwl_import_wisdom_from_filename') import character(C_CHAR), dimension(*), intent(in) :: filename end function fftwl_import_wisdom_from_filename integer(C_INT) function fftwl_import_wisdom_from_file(input_file) bind(C, name='fftwl_import_wisdom_from_file') import type(C_PTR), value :: input_file end function fftwl_import_wisdom_from_file integer(C_INT) function fftwl_import_wisdom_from_string(input_string) bind(C, name='fftwl_import_wisdom_from_string') import character(C_CHAR), dimension(*), intent(in) :: input_string end function fftwl_import_wisdom_from_string integer(C_INT) function fftwl_import_wisdom(read_char,data) bind(C, name='fftwl_import_wisdom') import type(C_FUNPTR), value :: read_char type(C_PTR), value :: data end function fftwl_import_wisdom subroutine fftwl_fprint_plan(p,output_file) bind(C, name='fftwl_fprint_plan') import type(C_PTR), value :: p type(C_PTR), value :: output_file end subroutine fftwl_fprint_plan subroutine fftwl_print_plan(p) bind(C, name='fftwl_print_plan') import type(C_PTR), value :: p end subroutine fftwl_print_plan type(C_PTR) function fftwl_sprint_plan(p) bind(C, name='fftwl_sprint_plan') import type(C_PTR), value :: p end function fftwl_sprint_plan type(C_PTR) function fftwl_malloc(n) bind(C, name='fftwl_malloc') import integer(C_SIZE_T), value :: n end function fftwl_malloc type(C_PTR) function fftwl_alloc_real(n) bind(C, name='fftwl_alloc_real') import integer(C_SIZE_T), value :: n end function fftwl_alloc_real type(C_PTR) function fftwl_alloc_complex(n) bind(C, name='fftwl_alloc_complex') import integer(C_SIZE_T), value :: n end function fftwl_alloc_complex subroutine fftwl_free(p) bind(C, name='fftwl_free') import type(C_PTR), value :: p end subroutine fftwl_free subroutine fftwl_flops(p,add,mul,fmas) bind(C, name='fftwl_flops') import type(C_PTR), value :: p real(C_DOUBLE), intent(out) :: add real(C_DOUBLE), intent(out) :: mul real(C_DOUBLE), intent(out) :: fmas end subroutine fftwl_flops real(C_DOUBLE) function fftwl_estimate_cost(p) bind(C, name='fftwl_estimate_cost') import type(C_PTR), value :: p end function fftwl_estimate_cost real(C_DOUBLE) function fftwl_cost(p) bind(C, name='fftwl_cost') import type(C_PTR), value :: p end function fftwl_cost integer(C_INT) function fftwl_alignment_of(p) bind(C, name='fftwl_alignment_of') import real(C_LONG_DOUBLE), dimension(*), intent(out) :: p end function fftwl_alignment_of end interface ================================================ FILE: OptolithiumC/libs/fftw3-win32/fftw3q.f03 ================================================ ! Generated automatically. DO NOT EDIT! type, bind(C) :: fftwq_iodim integer(C_INT) n, is, os end type fftwq_iodim type, bind(C) :: fftwq_iodim64 integer(C_INTPTR_T) n, is, os end type fftwq_iodim64 interface type(C_PTR) function fftwq_plan_dft(rank,n,in,out,sign,flags) bind(C, name='fftwq_plan_dft') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n complex(16), dimension(*), intent(out) :: in complex(16), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwq_plan_dft type(C_PTR) function fftwq_plan_dft_1d(n,in,out,sign,flags) bind(C, name='fftwq_plan_dft_1d') import integer(C_INT), value :: n complex(16), dimension(*), intent(out) :: in complex(16), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwq_plan_dft_1d type(C_PTR) function fftwq_plan_dft_2d(n0,n1,in,out,sign,flags) bind(C, name='fftwq_plan_dft_2d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 complex(16), dimension(*), intent(out) :: in complex(16), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwq_plan_dft_2d type(C_PTR) function fftwq_plan_dft_3d(n0,n1,n2,in,out,sign,flags) bind(C, name='fftwq_plan_dft_3d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 integer(C_INT), value :: n2 complex(16), dimension(*), intent(out) :: in complex(16), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwq_plan_dft_3d type(C_PTR) function fftwq_plan_many_dft(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,sign,flags) & bind(C, name='fftwq_plan_many_dft') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n integer(C_INT), value :: howmany complex(16), dimension(*), intent(out) :: in integer(C_INT), dimension(*), intent(in) :: inembed integer(C_INT), value :: istride integer(C_INT), value :: idist complex(16), dimension(*), intent(out) :: out integer(C_INT), dimension(*), intent(in) :: onembed integer(C_INT), value :: ostride integer(C_INT), value :: odist integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwq_plan_many_dft type(C_PTR) function fftwq_plan_guru_dft(rank,dims,howmany_rank,howmany_dims,in,out,sign,flags) & bind(C, name='fftwq_plan_guru_dft') import integer(C_INT), value :: rank type(fftwq_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwq_iodim), dimension(*), intent(in) :: howmany_dims complex(16), dimension(*), intent(out) :: in complex(16), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwq_plan_guru_dft type(C_PTR) function fftwq_plan_guru_split_dft(rank,dims,howmany_rank,howmany_dims,ri,ii,ro,io,flags) & bind(C, name='fftwq_plan_guru_split_dft') import integer(C_INT), value :: rank type(fftwq_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwq_iodim), dimension(*), intent(in) :: howmany_dims real(16), dimension(*), intent(out) :: ri real(16), dimension(*), intent(out) :: ii real(16), dimension(*), intent(out) :: ro real(16), dimension(*), intent(out) :: io integer(C_INT), value :: flags end function fftwq_plan_guru_split_dft type(C_PTR) function fftwq_plan_guru64_dft(rank,dims,howmany_rank,howmany_dims,in,out,sign,flags) & bind(C, name='fftwq_plan_guru64_dft') import integer(C_INT), value :: rank type(fftwq_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwq_iodim64), dimension(*), intent(in) :: howmany_dims complex(16), dimension(*), intent(out) :: in complex(16), dimension(*), intent(out) :: out integer(C_INT), value :: sign integer(C_INT), value :: flags end function fftwq_plan_guru64_dft type(C_PTR) function fftwq_plan_guru64_split_dft(rank,dims,howmany_rank,howmany_dims,ri,ii,ro,io,flags) & bind(C, name='fftwq_plan_guru64_split_dft') import integer(C_INT), value :: rank type(fftwq_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwq_iodim64), dimension(*), intent(in) :: howmany_dims real(16), dimension(*), intent(out) :: ri real(16), dimension(*), intent(out) :: ii real(16), dimension(*), intent(out) :: ro real(16), dimension(*), intent(out) :: io integer(C_INT), value :: flags end function fftwq_plan_guru64_split_dft subroutine fftwq_execute_dft(p,in,out) bind(C, name='fftwq_execute_dft') import type(C_PTR), value :: p complex(16), dimension(*), intent(inout) :: in complex(16), dimension(*), intent(out) :: out end subroutine fftwq_execute_dft subroutine fftwq_execute_split_dft(p,ri,ii,ro,io) bind(C, name='fftwq_execute_split_dft') import type(C_PTR), value :: p real(16), dimension(*), intent(inout) :: ri real(16), dimension(*), intent(inout) :: ii real(16), dimension(*), intent(out) :: ro real(16), dimension(*), intent(out) :: io end subroutine fftwq_execute_split_dft type(C_PTR) function fftwq_plan_many_dft_r2c(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,flags) & bind(C, name='fftwq_plan_many_dft_r2c') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n integer(C_INT), value :: howmany real(16), dimension(*), intent(out) :: in integer(C_INT), dimension(*), intent(in) :: inembed integer(C_INT), value :: istride integer(C_INT), value :: idist complex(16), dimension(*), intent(out) :: out integer(C_INT), dimension(*), intent(in) :: onembed integer(C_INT), value :: ostride integer(C_INT), value :: odist integer(C_INT), value :: flags end function fftwq_plan_many_dft_r2c type(C_PTR) function fftwq_plan_dft_r2c(rank,n,in,out,flags) bind(C, name='fftwq_plan_dft_r2c') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n real(16), dimension(*), intent(out) :: in complex(16), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwq_plan_dft_r2c type(C_PTR) function fftwq_plan_dft_r2c_1d(n,in,out,flags) bind(C, name='fftwq_plan_dft_r2c_1d') import integer(C_INT), value :: n real(16), dimension(*), intent(out) :: in complex(16), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwq_plan_dft_r2c_1d type(C_PTR) function fftwq_plan_dft_r2c_2d(n0,n1,in,out,flags) bind(C, name='fftwq_plan_dft_r2c_2d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 real(16), dimension(*), intent(out) :: in complex(16), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwq_plan_dft_r2c_2d type(C_PTR) function fftwq_plan_dft_r2c_3d(n0,n1,n2,in,out,flags) bind(C, name='fftwq_plan_dft_r2c_3d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 integer(C_INT), value :: n2 real(16), dimension(*), intent(out) :: in complex(16), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwq_plan_dft_r2c_3d type(C_PTR) function fftwq_plan_many_dft_c2r(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,flags) & bind(C, name='fftwq_plan_many_dft_c2r') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n integer(C_INT), value :: howmany complex(16), dimension(*), intent(out) :: in integer(C_INT), dimension(*), intent(in) :: inembed integer(C_INT), value :: istride integer(C_INT), value :: idist real(16), dimension(*), intent(out) :: out integer(C_INT), dimension(*), intent(in) :: onembed integer(C_INT), value :: ostride integer(C_INT), value :: odist integer(C_INT), value :: flags end function fftwq_plan_many_dft_c2r type(C_PTR) function fftwq_plan_dft_c2r(rank,n,in,out,flags) bind(C, name='fftwq_plan_dft_c2r') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n complex(16), dimension(*), intent(out) :: in real(16), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwq_plan_dft_c2r type(C_PTR) function fftwq_plan_dft_c2r_1d(n,in,out,flags) bind(C, name='fftwq_plan_dft_c2r_1d') import integer(C_INT), value :: n complex(16), dimension(*), intent(out) :: in real(16), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwq_plan_dft_c2r_1d type(C_PTR) function fftwq_plan_dft_c2r_2d(n0,n1,in,out,flags) bind(C, name='fftwq_plan_dft_c2r_2d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 complex(16), dimension(*), intent(out) :: in real(16), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwq_plan_dft_c2r_2d type(C_PTR) function fftwq_plan_dft_c2r_3d(n0,n1,n2,in,out,flags) bind(C, name='fftwq_plan_dft_c2r_3d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 integer(C_INT), value :: n2 complex(16), dimension(*), intent(out) :: in real(16), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwq_plan_dft_c2r_3d type(C_PTR) function fftwq_plan_guru_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,out,flags) & bind(C, name='fftwq_plan_guru_dft_r2c') import integer(C_INT), value :: rank type(fftwq_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwq_iodim), dimension(*), intent(in) :: howmany_dims real(16), dimension(*), intent(out) :: in complex(16), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwq_plan_guru_dft_r2c type(C_PTR) function fftwq_plan_guru_dft_c2r(rank,dims,howmany_rank,howmany_dims,in,out,flags) & bind(C, name='fftwq_plan_guru_dft_c2r') import integer(C_INT), value :: rank type(fftwq_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwq_iodim), dimension(*), intent(in) :: howmany_dims complex(16), dimension(*), intent(out) :: in real(16), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwq_plan_guru_dft_c2r type(C_PTR) function fftwq_plan_guru_split_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,ro,io,flags) & bind(C, name='fftwq_plan_guru_split_dft_r2c') import integer(C_INT), value :: rank type(fftwq_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwq_iodim), dimension(*), intent(in) :: howmany_dims real(16), dimension(*), intent(out) :: in real(16), dimension(*), intent(out) :: ro real(16), dimension(*), intent(out) :: io integer(C_INT), value :: flags end function fftwq_plan_guru_split_dft_r2c type(C_PTR) function fftwq_plan_guru_split_dft_c2r(rank,dims,howmany_rank,howmany_dims,ri,ii,out,flags) & bind(C, name='fftwq_plan_guru_split_dft_c2r') import integer(C_INT), value :: rank type(fftwq_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwq_iodim), dimension(*), intent(in) :: howmany_dims real(16), dimension(*), intent(out) :: ri real(16), dimension(*), intent(out) :: ii real(16), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwq_plan_guru_split_dft_c2r type(C_PTR) function fftwq_plan_guru64_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,out,flags) & bind(C, name='fftwq_plan_guru64_dft_r2c') import integer(C_INT), value :: rank type(fftwq_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwq_iodim64), dimension(*), intent(in) :: howmany_dims real(16), dimension(*), intent(out) :: in complex(16), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwq_plan_guru64_dft_r2c type(C_PTR) function fftwq_plan_guru64_dft_c2r(rank,dims,howmany_rank,howmany_dims,in,out,flags) & bind(C, name='fftwq_plan_guru64_dft_c2r') import integer(C_INT), value :: rank type(fftwq_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwq_iodim64), dimension(*), intent(in) :: howmany_dims complex(16), dimension(*), intent(out) :: in real(16), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwq_plan_guru64_dft_c2r type(C_PTR) function fftwq_plan_guru64_split_dft_r2c(rank,dims,howmany_rank,howmany_dims,in,ro,io,flags) & bind(C, name='fftwq_plan_guru64_split_dft_r2c') import integer(C_INT), value :: rank type(fftwq_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwq_iodim64), dimension(*), intent(in) :: howmany_dims real(16), dimension(*), intent(out) :: in real(16), dimension(*), intent(out) :: ro real(16), dimension(*), intent(out) :: io integer(C_INT), value :: flags end function fftwq_plan_guru64_split_dft_r2c type(C_PTR) function fftwq_plan_guru64_split_dft_c2r(rank,dims,howmany_rank,howmany_dims,ri,ii,out,flags) & bind(C, name='fftwq_plan_guru64_split_dft_c2r') import integer(C_INT), value :: rank type(fftwq_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwq_iodim64), dimension(*), intent(in) :: howmany_dims real(16), dimension(*), intent(out) :: ri real(16), dimension(*), intent(out) :: ii real(16), dimension(*), intent(out) :: out integer(C_INT), value :: flags end function fftwq_plan_guru64_split_dft_c2r subroutine fftwq_execute_dft_r2c(p,in,out) bind(C, name='fftwq_execute_dft_r2c') import type(C_PTR), value :: p real(16), dimension(*), intent(inout) :: in complex(16), dimension(*), intent(out) :: out end subroutine fftwq_execute_dft_r2c subroutine fftwq_execute_dft_c2r(p,in,out) bind(C, name='fftwq_execute_dft_c2r') import type(C_PTR), value :: p complex(16), dimension(*), intent(inout) :: in real(16), dimension(*), intent(out) :: out end subroutine fftwq_execute_dft_c2r subroutine fftwq_execute_split_dft_r2c(p,in,ro,io) bind(C, name='fftwq_execute_split_dft_r2c') import type(C_PTR), value :: p real(16), dimension(*), intent(inout) :: in real(16), dimension(*), intent(out) :: ro real(16), dimension(*), intent(out) :: io end subroutine fftwq_execute_split_dft_r2c subroutine fftwq_execute_split_dft_c2r(p,ri,ii,out) bind(C, name='fftwq_execute_split_dft_c2r') import type(C_PTR), value :: p real(16), dimension(*), intent(inout) :: ri real(16), dimension(*), intent(inout) :: ii real(16), dimension(*), intent(out) :: out end subroutine fftwq_execute_split_dft_c2r type(C_PTR) function fftwq_plan_many_r2r(rank,n,howmany,in,inembed,istride,idist,out,onembed,ostride,odist,kind,flags) & bind(C, name='fftwq_plan_many_r2r') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n integer(C_INT), value :: howmany real(16), dimension(*), intent(out) :: in integer(C_INT), dimension(*), intent(in) :: inembed integer(C_INT), value :: istride integer(C_INT), value :: idist real(16), dimension(*), intent(out) :: out integer(C_INT), dimension(*), intent(in) :: onembed integer(C_INT), value :: ostride integer(C_INT), value :: odist integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind integer(C_INT), value :: flags end function fftwq_plan_many_r2r type(C_PTR) function fftwq_plan_r2r(rank,n,in,out,kind,flags) bind(C, name='fftwq_plan_r2r') import integer(C_INT), value :: rank integer(C_INT), dimension(*), intent(in) :: n real(16), dimension(*), intent(out) :: in real(16), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind integer(C_INT), value :: flags end function fftwq_plan_r2r type(C_PTR) function fftwq_plan_r2r_1d(n,in,out,kind,flags) bind(C, name='fftwq_plan_r2r_1d') import integer(C_INT), value :: n real(16), dimension(*), intent(out) :: in real(16), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), value :: kind integer(C_INT), value :: flags end function fftwq_plan_r2r_1d type(C_PTR) function fftwq_plan_r2r_2d(n0,n1,in,out,kind0,kind1,flags) bind(C, name='fftwq_plan_r2r_2d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 real(16), dimension(*), intent(out) :: in real(16), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), value :: kind0 integer(C_FFTW_R2R_KIND), value :: kind1 integer(C_INT), value :: flags end function fftwq_plan_r2r_2d type(C_PTR) function fftwq_plan_r2r_3d(n0,n1,n2,in,out,kind0,kind1,kind2,flags) bind(C, name='fftwq_plan_r2r_3d') import integer(C_INT), value :: n0 integer(C_INT), value :: n1 integer(C_INT), value :: n2 real(16), dimension(*), intent(out) :: in real(16), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), value :: kind0 integer(C_FFTW_R2R_KIND), value :: kind1 integer(C_FFTW_R2R_KIND), value :: kind2 integer(C_INT), value :: flags end function fftwq_plan_r2r_3d type(C_PTR) function fftwq_plan_guru_r2r(rank,dims,howmany_rank,howmany_dims,in,out,kind,flags) & bind(C, name='fftwq_plan_guru_r2r') import integer(C_INT), value :: rank type(fftwq_iodim), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwq_iodim), dimension(*), intent(in) :: howmany_dims real(16), dimension(*), intent(out) :: in real(16), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind integer(C_INT), value :: flags end function fftwq_plan_guru_r2r type(C_PTR) function fftwq_plan_guru64_r2r(rank,dims,howmany_rank,howmany_dims,in,out,kind,flags) & bind(C, name='fftwq_plan_guru64_r2r') import integer(C_INT), value :: rank type(fftwq_iodim64), dimension(*), intent(in) :: dims integer(C_INT), value :: howmany_rank type(fftwq_iodim64), dimension(*), intent(in) :: howmany_dims real(16), dimension(*), intent(out) :: in real(16), dimension(*), intent(out) :: out integer(C_FFTW_R2R_KIND), dimension(*), intent(in) :: kind integer(C_INT), value :: flags end function fftwq_plan_guru64_r2r subroutine fftwq_execute_r2r(p,in,out) bind(C, name='fftwq_execute_r2r') import type(C_PTR), value :: p real(16), dimension(*), intent(inout) :: in real(16), dimension(*), intent(out) :: out end subroutine fftwq_execute_r2r subroutine fftwq_destroy_plan(p) bind(C, name='fftwq_destroy_plan') import type(C_PTR), value :: p end subroutine fftwq_destroy_plan subroutine fftwq_forget_wisdom() bind(C, name='fftwq_forget_wisdom') import end subroutine fftwq_forget_wisdom subroutine fftwq_cleanup() bind(C, name='fftwq_cleanup') import end subroutine fftwq_cleanup subroutine fftwq_set_timelimit(t) bind(C, name='fftwq_set_timelimit') import real(C_DOUBLE), value :: t end subroutine fftwq_set_timelimit subroutine fftwq_plan_with_nthreads(nthreads) bind(C, name='fftwq_plan_with_nthreads') import integer(C_INT), value :: nthreads end subroutine fftwq_plan_with_nthreads integer(C_INT) function fftwq_init_threads() bind(C, name='fftwq_init_threads') import end function fftwq_init_threads subroutine fftwq_cleanup_threads() bind(C, name='fftwq_cleanup_threads') import end subroutine fftwq_cleanup_threads integer(C_INT) function fftwq_export_wisdom_to_filename(filename) bind(C, name='fftwq_export_wisdom_to_filename') import character(C_CHAR), dimension(*), intent(in) :: filename end function fftwq_export_wisdom_to_filename subroutine fftwq_export_wisdom_to_file(output_file) bind(C, name='fftwq_export_wisdom_to_file') import type(C_PTR), value :: output_file end subroutine fftwq_export_wisdom_to_file type(C_PTR) function fftwq_export_wisdom_to_string() bind(C, name='fftwq_export_wisdom_to_string') import end function fftwq_export_wisdom_to_string subroutine fftwq_export_wisdom(write_char,data) bind(C, name='fftwq_export_wisdom') import type(C_FUNPTR), value :: write_char type(C_PTR), value :: data end subroutine fftwq_export_wisdom integer(C_INT) function fftwq_import_system_wisdom() bind(C, name='fftwq_import_system_wisdom') import end function fftwq_import_system_wisdom integer(C_INT) function fftwq_import_wisdom_from_filename(filename) bind(C, name='fftwq_import_wisdom_from_filename') import character(C_CHAR), dimension(*), intent(in) :: filename end function fftwq_import_wisdom_from_filename integer(C_INT) function fftwq_import_wisdom_from_file(input_file) bind(C, name='fftwq_import_wisdom_from_file') import type(C_PTR), value :: input_file end function fftwq_import_wisdom_from_file integer(C_INT) function fftwq_import_wisdom_from_string(input_string) bind(C, name='fftwq_import_wisdom_from_string') import character(C_CHAR), dimension(*), intent(in) :: input_string end function fftwq_import_wisdom_from_string integer(C_INT) function fftwq_import_wisdom(read_char,data) bind(C, name='fftwq_import_wisdom') import type(C_FUNPTR), value :: read_char type(C_PTR), value :: data end function fftwq_import_wisdom subroutine fftwq_fprint_plan(p,output_file) bind(C, name='fftwq_fprint_plan') import type(C_PTR), value :: p type(C_PTR), value :: output_file end subroutine fftwq_fprint_plan subroutine fftwq_print_plan(p) bind(C, name='fftwq_print_plan') import type(C_PTR), value :: p end subroutine fftwq_print_plan type(C_PTR) function fftwq_sprint_plan(p) bind(C, name='fftwq_sprint_plan') import type(C_PTR), value :: p end function fftwq_sprint_plan type(C_PTR) function fftwq_malloc(n) bind(C, name='fftwq_malloc') import integer(C_SIZE_T), value :: n end function fftwq_malloc ! Unable to generate Fortran interface for fftwq_alloc_real type(C_PTR) function fftwq_alloc_complex(n) bind(C, name='fftwq_alloc_complex') import integer(C_SIZE_T), value :: n end function fftwq_alloc_complex subroutine fftwq_free(p) bind(C, name='fftwq_free') import type(C_PTR), value :: p end subroutine fftwq_free subroutine fftwq_flops(p,add,mul,fmas) bind(C, name='fftwq_flops') import type(C_PTR), value :: p real(C_DOUBLE), intent(out) :: add real(C_DOUBLE), intent(out) :: mul real(C_DOUBLE), intent(out) :: fmas end subroutine fftwq_flops real(C_DOUBLE) function fftwq_estimate_cost(p) bind(C, name='fftwq_estimate_cost') import type(C_PTR), value :: p end function fftwq_estimate_cost real(C_DOUBLE) function fftwq_cost(p) bind(C, name='fftwq_cost') import type(C_PTR), value :: p end function fftwq_cost integer(C_INT) function fftwq_alignment_of(p) bind(C, name='fftwq_alignment_of') import real(16), dimension(*), intent(out) :: p end function fftwq_alignment_of end interface ================================================ FILE: OptolithiumC/libs/fftw3-win32/libfftw3-3.def ================================================ LIBRARY libfftw3-3.dll EXPORTS dfftw_cleanup_ dfftw_cleanup__ dfftw_cleanup_threads_ dfftw_cleanup_threads__ dfftw_cost_ dfftw_cost__ dfftw_destroy_plan_ dfftw_destroy_plan__ dfftw_estimate_cost_ dfftw_estimate_cost__ dfftw_execute_ dfftw_execute__ dfftw_execute_dft_ dfftw_execute_dft__ dfftw_execute_dft_c2r_ dfftw_execute_dft_c2r__ dfftw_execute_dft_r2c_ dfftw_execute_dft_r2c__ dfftw_execute_r2r_ dfftw_execute_r2r__ dfftw_execute_split_dft_ dfftw_execute_split_dft__ dfftw_execute_split_dft_c2r_ dfftw_execute_split_dft_c2r__ dfftw_execute_split_dft_r2c_ dfftw_execute_split_dft_r2c__ dfftw_export_wisdom_ dfftw_export_wisdom__ dfftw_flops_ dfftw_flops__ dfftw_forget_wisdom_ dfftw_forget_wisdom__ dfftw_import_system_wisdom_ dfftw_import_system_wisdom__ dfftw_import_wisdom_ dfftw_import_wisdom__ dfftw_init_threads_ dfftw_init_threads__ dfftw_plan_dft_ dfftw_plan_dft_1d_ dfftw_plan_dft_1d__ dfftw_plan_dft_2d_ dfftw_plan_dft_2d__ dfftw_plan_dft_3d_ dfftw_plan_dft_3d__ dfftw_plan_dft__ dfftw_plan_dft_c2r_ dfftw_plan_dft_c2r_1d_ dfftw_plan_dft_c2r_1d__ dfftw_plan_dft_c2r_2d_ dfftw_plan_dft_c2r_2d__ dfftw_plan_dft_c2r_3d_ dfftw_plan_dft_c2r_3d__ dfftw_plan_dft_c2r__ dfftw_plan_dft_r2c_ dfftw_plan_dft_r2c_1d_ dfftw_plan_dft_r2c_1d__ dfftw_plan_dft_r2c_2d_ dfftw_plan_dft_r2c_2d__ dfftw_plan_dft_r2c_3d_ dfftw_plan_dft_r2c_3d__ dfftw_plan_dft_r2c__ dfftw_plan_guru_dft_ dfftw_plan_guru_dft__ dfftw_plan_guru_dft_c2r_ dfftw_plan_guru_dft_c2r__ dfftw_plan_guru_dft_r2c_ dfftw_plan_guru_dft_r2c__ dfftw_plan_guru_r2r_ dfftw_plan_guru_r2r__ dfftw_plan_guru_split_dft_ dfftw_plan_guru_split_dft__ dfftw_plan_guru_split_dft_c2r_ dfftw_plan_guru_split_dft_c2r__ dfftw_plan_guru_split_dft_r2c_ dfftw_plan_guru_split_dft_r2c__ dfftw_plan_many_dft_ dfftw_plan_many_dft__ dfftw_plan_many_dft_c2r_ dfftw_plan_many_dft_c2r__ dfftw_plan_many_dft_r2c_ dfftw_plan_many_dft_r2c__ dfftw_plan_many_r2r_ dfftw_plan_many_r2r__ dfftw_plan_r2r_ dfftw_plan_r2r_1d_ dfftw_plan_r2r_1d__ dfftw_plan_r2r_2d_ dfftw_plan_r2r_2d__ dfftw_plan_r2r_3d_ dfftw_plan_r2r_3d__ dfftw_plan_r2r__ dfftw_plan_with_nthreads_ dfftw_plan_with_nthreads__ dfftw_print_plan_ dfftw_print_plan__ dfftw_set_timelimit_ dfftw_set_timelimit__ fftw_alignment_of fftw_alloc_complex fftw_alloc_real fftw_assertion_failed fftw_bufdist fftw_check_alignment_of_sse2_pm fftw_choose_radix fftw_cleanup fftw_cleanup_threads fftw_codelet_e01_8 fftw_codelet_e10_8 fftw_codelet_hb2_16 fftw_codelet_hb2_20 fftw_codelet_hb2_25 fftw_codelet_hb2_32 fftw_codelet_hb2_4 fftw_codelet_hb2_5 fftw_codelet_hb2_8 fftw_codelet_hb_10 fftw_codelet_hb_12 fftw_codelet_hb_15 fftw_codelet_hb_16 fftw_codelet_hb_2 fftw_codelet_hb_20 fftw_codelet_hb_25 fftw_codelet_hb_3 fftw_codelet_hb_32 fftw_codelet_hb_4 fftw_codelet_hb_5 fftw_codelet_hb_6 fftw_codelet_hb_64 fftw_codelet_hb_7 fftw_codelet_hb_8 fftw_codelet_hb_9 fftw_codelet_hc2cb2_16 fftw_codelet_hc2cb2_20 fftw_codelet_hc2cb2_32 fftw_codelet_hc2cb2_4 fftw_codelet_hc2cb2_8 fftw_codelet_hc2cb_10 fftw_codelet_hc2cb_12 fftw_codelet_hc2cb_16 fftw_codelet_hc2cb_2 fftw_codelet_hc2cb_20 fftw_codelet_hc2cb_32 fftw_codelet_hc2cb_4 fftw_codelet_hc2cb_6 fftw_codelet_hc2cb_8 fftw_codelet_hc2cbdft2_16 fftw_codelet_hc2cbdft2_20 fftw_codelet_hc2cbdft2_32 fftw_codelet_hc2cbdft2_4 fftw_codelet_hc2cbdft2_8 fftw_codelet_hc2cbdft_10 fftw_codelet_hc2cbdft_12 fftw_codelet_hc2cbdft_16 fftw_codelet_hc2cbdft_2 fftw_codelet_hc2cbdft_20 fftw_codelet_hc2cbdft_32 fftw_codelet_hc2cbdft_4 fftw_codelet_hc2cbdft_6 fftw_codelet_hc2cbdft_8 fftw_codelet_hc2cbdftv_10_avx fftw_codelet_hc2cbdftv_10_sse2 fftw_codelet_hc2cbdftv_12_avx fftw_codelet_hc2cbdftv_12_sse2 fftw_codelet_hc2cbdftv_16_avx fftw_codelet_hc2cbdftv_16_sse2 fftw_codelet_hc2cbdftv_20_avx fftw_codelet_hc2cbdftv_20_sse2 fftw_codelet_hc2cbdftv_2_avx fftw_codelet_hc2cbdftv_2_sse2 fftw_codelet_hc2cbdftv_32_avx fftw_codelet_hc2cbdftv_32_sse2 fftw_codelet_hc2cbdftv_4_avx fftw_codelet_hc2cbdftv_4_sse2 fftw_codelet_hc2cbdftv_6_avx fftw_codelet_hc2cbdftv_6_sse2 fftw_codelet_hc2cbdftv_8_avx fftw_codelet_hc2cbdftv_8_sse2 fftw_codelet_hc2cf2_16 fftw_codelet_hc2cf2_20 fftw_codelet_hc2cf2_32 fftw_codelet_hc2cf2_4 fftw_codelet_hc2cf2_8 fftw_codelet_hc2cf_10 fftw_codelet_hc2cf_12 fftw_codelet_hc2cf_16 fftw_codelet_hc2cf_2 fftw_codelet_hc2cf_20 fftw_codelet_hc2cf_32 fftw_codelet_hc2cf_4 fftw_codelet_hc2cf_6 fftw_codelet_hc2cf_8 fftw_codelet_hc2cfdft2_16 fftw_codelet_hc2cfdft2_20 fftw_codelet_hc2cfdft2_32 fftw_codelet_hc2cfdft2_4 fftw_codelet_hc2cfdft2_8 fftw_codelet_hc2cfdft_10 fftw_codelet_hc2cfdft_12 fftw_codelet_hc2cfdft_16 fftw_codelet_hc2cfdft_2 fftw_codelet_hc2cfdft_20 fftw_codelet_hc2cfdft_32 fftw_codelet_hc2cfdft_4 fftw_codelet_hc2cfdft_6 fftw_codelet_hc2cfdft_8 fftw_codelet_hc2cfdftv_10_avx fftw_codelet_hc2cfdftv_10_sse2 fftw_codelet_hc2cfdftv_12_avx fftw_codelet_hc2cfdftv_12_sse2 fftw_codelet_hc2cfdftv_16_avx fftw_codelet_hc2cfdftv_16_sse2 fftw_codelet_hc2cfdftv_20_avx fftw_codelet_hc2cfdftv_20_sse2 fftw_codelet_hc2cfdftv_2_avx fftw_codelet_hc2cfdftv_2_sse2 fftw_codelet_hc2cfdftv_32_avx fftw_codelet_hc2cfdftv_32_sse2 fftw_codelet_hc2cfdftv_4_avx fftw_codelet_hc2cfdftv_4_sse2 fftw_codelet_hc2cfdftv_6_avx fftw_codelet_hc2cfdftv_6_sse2 fftw_codelet_hc2cfdftv_8_avx fftw_codelet_hc2cfdftv_8_sse2 fftw_codelet_hf2_16 fftw_codelet_hf2_20 fftw_codelet_hf2_25 fftw_codelet_hf2_32 fftw_codelet_hf2_4 fftw_codelet_hf2_5 fftw_codelet_hf2_8 fftw_codelet_hf_10 fftw_codelet_hf_12 fftw_codelet_hf_15 fftw_codelet_hf_16 fftw_codelet_hf_2 fftw_codelet_hf_20 fftw_codelet_hf_25 fftw_codelet_hf_3 fftw_codelet_hf_32 fftw_codelet_hf_4 fftw_codelet_hf_5 fftw_codelet_hf_6 fftw_codelet_hf_64 fftw_codelet_hf_7 fftw_codelet_hf_8 fftw_codelet_hf_9 fftw_codelet_n1_10 fftw_codelet_n1_11 fftw_codelet_n1_12 fftw_codelet_n1_13 fftw_codelet_n1_14 fftw_codelet_n1_15 fftw_codelet_n1_16 fftw_codelet_n1_2 fftw_codelet_n1_20 fftw_codelet_n1_25 fftw_codelet_n1_3 fftw_codelet_n1_32 fftw_codelet_n1_4 fftw_codelet_n1_5 fftw_codelet_n1_6 fftw_codelet_n1_64 fftw_codelet_n1_7 fftw_codelet_n1_8 fftw_codelet_n1_9 fftw_codelet_n1bv_10_avx fftw_codelet_n1bv_10_sse2 fftw_codelet_n1bv_11_avx fftw_codelet_n1bv_11_sse2 fftw_codelet_n1bv_128_avx fftw_codelet_n1bv_128_sse2 fftw_codelet_n1bv_12_avx fftw_codelet_n1bv_12_sse2 fftw_codelet_n1bv_13_avx fftw_codelet_n1bv_13_sse2 fftw_codelet_n1bv_14_avx fftw_codelet_n1bv_14_sse2 fftw_codelet_n1bv_15_avx fftw_codelet_n1bv_15_sse2 fftw_codelet_n1bv_16_avx fftw_codelet_n1bv_16_sse2 fftw_codelet_n1bv_20_avx fftw_codelet_n1bv_20_sse2 fftw_codelet_n1bv_25_avx fftw_codelet_n1bv_25_sse2 fftw_codelet_n1bv_2_avx fftw_codelet_n1bv_2_sse2 fftw_codelet_n1bv_32_avx fftw_codelet_n1bv_32_sse2 fftw_codelet_n1bv_3_avx fftw_codelet_n1bv_3_sse2 fftw_codelet_n1bv_4_avx fftw_codelet_n1bv_4_sse2 fftw_codelet_n1bv_5_avx fftw_codelet_n1bv_5_sse2 fftw_codelet_n1bv_64_avx fftw_codelet_n1bv_64_sse2 fftw_codelet_n1bv_6_avx fftw_codelet_n1bv_6_sse2 fftw_codelet_n1bv_7_avx fftw_codelet_n1bv_7_sse2 fftw_codelet_n1bv_8_avx fftw_codelet_n1bv_8_sse2 fftw_codelet_n1bv_9_avx fftw_codelet_n1bv_9_sse2 fftw_codelet_n1fv_10_avx fftw_codelet_n1fv_10_sse2 fftw_codelet_n1fv_11_avx fftw_codelet_n1fv_11_sse2 fftw_codelet_n1fv_128_avx fftw_codelet_n1fv_128_sse2 fftw_codelet_n1fv_12_avx fftw_codelet_n1fv_12_sse2 fftw_codelet_n1fv_13_avx fftw_codelet_n1fv_13_sse2 fftw_codelet_n1fv_14_avx fftw_codelet_n1fv_14_sse2 fftw_codelet_n1fv_15_avx fftw_codelet_n1fv_15_sse2 fftw_codelet_n1fv_16_avx fftw_codelet_n1fv_16_sse2 fftw_codelet_n1fv_20_avx fftw_codelet_n1fv_20_sse2 fftw_codelet_n1fv_25_avx fftw_codelet_n1fv_25_sse2 fftw_codelet_n1fv_2_avx fftw_codelet_n1fv_2_sse2 fftw_codelet_n1fv_32_avx fftw_codelet_n1fv_32_sse2 fftw_codelet_n1fv_3_avx fftw_codelet_n1fv_3_sse2 fftw_codelet_n1fv_4_avx fftw_codelet_n1fv_4_sse2 fftw_codelet_n1fv_5_avx fftw_codelet_n1fv_5_sse2 fftw_codelet_n1fv_64_avx fftw_codelet_n1fv_64_sse2 fftw_codelet_n1fv_6_avx fftw_codelet_n1fv_6_sse2 fftw_codelet_n1fv_7_avx fftw_codelet_n1fv_7_sse2 fftw_codelet_n1fv_8_avx fftw_codelet_n1fv_8_sse2 fftw_codelet_n1fv_9_avx fftw_codelet_n1fv_9_sse2 fftw_codelet_n2bv_10_avx fftw_codelet_n2bv_10_sse2 fftw_codelet_n2bv_12_avx fftw_codelet_n2bv_12_sse2 fftw_codelet_n2bv_14_avx fftw_codelet_n2bv_14_sse2 fftw_codelet_n2bv_16_avx fftw_codelet_n2bv_16_sse2 fftw_codelet_n2bv_20_avx fftw_codelet_n2bv_20_sse2 fftw_codelet_n2bv_2_avx fftw_codelet_n2bv_2_sse2 fftw_codelet_n2bv_32_avx fftw_codelet_n2bv_32_sse2 fftw_codelet_n2bv_4_avx fftw_codelet_n2bv_4_sse2 fftw_codelet_n2bv_64_avx fftw_codelet_n2bv_64_sse2 fftw_codelet_n2bv_6_avx fftw_codelet_n2bv_6_sse2 fftw_codelet_n2bv_8_avx fftw_codelet_n2bv_8_sse2 fftw_codelet_n2fv_10_avx fftw_codelet_n2fv_10_sse2 fftw_codelet_n2fv_12_avx fftw_codelet_n2fv_12_sse2 fftw_codelet_n2fv_14_avx fftw_codelet_n2fv_14_sse2 fftw_codelet_n2fv_16_avx fftw_codelet_n2fv_16_sse2 fftw_codelet_n2fv_20_avx fftw_codelet_n2fv_20_sse2 fftw_codelet_n2fv_2_avx fftw_codelet_n2fv_2_sse2 fftw_codelet_n2fv_32_avx fftw_codelet_n2fv_32_sse2 fftw_codelet_n2fv_4_avx fftw_codelet_n2fv_4_sse2 fftw_codelet_n2fv_64_avx fftw_codelet_n2fv_64_sse2 fftw_codelet_n2fv_6_avx fftw_codelet_n2fv_6_sse2 fftw_codelet_n2fv_8_avx fftw_codelet_n2fv_8_sse2 fftw_codelet_n2sv_16_avx fftw_codelet_n2sv_16_sse2 fftw_codelet_n2sv_32_avx fftw_codelet_n2sv_32_sse2 fftw_codelet_n2sv_4_avx fftw_codelet_n2sv_4_sse2 fftw_codelet_n2sv_64_avx fftw_codelet_n2sv_64_sse2 fftw_codelet_n2sv_8_avx fftw_codelet_n2sv_8_sse2 fftw_codelet_q1_2 fftw_codelet_q1_3 fftw_codelet_q1_4 fftw_codelet_q1_5 fftw_codelet_q1_6 fftw_codelet_q1_8 fftw_codelet_q1bv_2_avx fftw_codelet_q1bv_2_sse2 fftw_codelet_q1bv_4_avx fftw_codelet_q1bv_4_sse2 fftw_codelet_q1bv_5_avx fftw_codelet_q1bv_5_sse2 fftw_codelet_q1bv_8_avx fftw_codelet_q1bv_8_sse2 fftw_codelet_q1fv_2_avx fftw_codelet_q1fv_2_sse2 fftw_codelet_q1fv_4_avx fftw_codelet_q1fv_4_sse2 fftw_codelet_q1fv_5_avx fftw_codelet_q1fv_5_sse2 fftw_codelet_q1fv_8_avx fftw_codelet_q1fv_8_sse2 fftw_codelet_r2cbIII_10 fftw_codelet_r2cbIII_12 fftw_codelet_r2cbIII_15 fftw_codelet_r2cbIII_16 fftw_codelet_r2cbIII_2 fftw_codelet_r2cbIII_20 fftw_codelet_r2cbIII_25 fftw_codelet_r2cbIII_3 fftw_codelet_r2cbIII_32 fftw_codelet_r2cbIII_4 fftw_codelet_r2cbIII_5 fftw_codelet_r2cbIII_6 fftw_codelet_r2cbIII_64 fftw_codelet_r2cbIII_7 fftw_codelet_r2cbIII_8 fftw_codelet_r2cbIII_9 fftw_codelet_r2cb_10 fftw_codelet_r2cb_11 fftw_codelet_r2cb_12 fftw_codelet_r2cb_128 fftw_codelet_r2cb_13 fftw_codelet_r2cb_14 fftw_codelet_r2cb_15 fftw_codelet_r2cb_16 fftw_codelet_r2cb_2 fftw_codelet_r2cb_20 fftw_codelet_r2cb_25 fftw_codelet_r2cb_3 fftw_codelet_r2cb_32 fftw_codelet_r2cb_4 fftw_codelet_r2cb_5 fftw_codelet_r2cb_6 fftw_codelet_r2cb_64 fftw_codelet_r2cb_7 fftw_codelet_r2cb_8 fftw_codelet_r2cb_9 fftw_codelet_r2cfII_10 fftw_codelet_r2cfII_12 fftw_codelet_r2cfII_15 fftw_codelet_r2cfII_16 fftw_codelet_r2cfII_2 fftw_codelet_r2cfII_20 fftw_codelet_r2cfII_25 fftw_codelet_r2cfII_3 fftw_codelet_r2cfII_32 fftw_codelet_r2cfII_4 fftw_codelet_r2cfII_5 fftw_codelet_r2cfII_6 fftw_codelet_r2cfII_64 fftw_codelet_r2cfII_7 fftw_codelet_r2cfII_8 fftw_codelet_r2cfII_9 fftw_codelet_r2cf_10 fftw_codelet_r2cf_11 fftw_codelet_r2cf_12 fftw_codelet_r2cf_128 fftw_codelet_r2cf_13 fftw_codelet_r2cf_14 fftw_codelet_r2cf_15 fftw_codelet_r2cf_16 fftw_codelet_r2cf_2 fftw_codelet_r2cf_20 fftw_codelet_r2cf_25 fftw_codelet_r2cf_3 fftw_codelet_r2cf_32 fftw_codelet_r2cf_4 fftw_codelet_r2cf_5 fftw_codelet_r2cf_6 fftw_codelet_r2cf_64 fftw_codelet_r2cf_7 fftw_codelet_r2cf_8 fftw_codelet_r2cf_9 fftw_codelet_t1_10 fftw_codelet_t1_12 fftw_codelet_t1_15 fftw_codelet_t1_16 fftw_codelet_t1_2 fftw_codelet_t1_20 fftw_codelet_t1_25 fftw_codelet_t1_3 fftw_codelet_t1_32 fftw_codelet_t1_4 fftw_codelet_t1_5 fftw_codelet_t1_6 fftw_codelet_t1_64 fftw_codelet_t1_7 fftw_codelet_t1_8 fftw_codelet_t1_9 fftw_codelet_t1buv_10_avx fftw_codelet_t1buv_10_sse2 fftw_codelet_t1buv_2_avx fftw_codelet_t1buv_2_sse2 fftw_codelet_t1buv_3_avx fftw_codelet_t1buv_3_sse2 fftw_codelet_t1buv_4_avx fftw_codelet_t1buv_4_sse2 fftw_codelet_t1buv_5_avx fftw_codelet_t1buv_5_sse2 fftw_codelet_t1buv_6_avx fftw_codelet_t1buv_6_sse2 fftw_codelet_t1buv_7_avx fftw_codelet_t1buv_7_sse2 fftw_codelet_t1buv_8_avx fftw_codelet_t1buv_8_sse2 fftw_codelet_t1buv_9_avx fftw_codelet_t1buv_9_sse2 fftw_codelet_t1bv_10_avx fftw_codelet_t1bv_10_sse2 fftw_codelet_t1bv_12_avx fftw_codelet_t1bv_12_sse2 fftw_codelet_t1bv_15_avx fftw_codelet_t1bv_15_sse2 fftw_codelet_t1bv_16_avx fftw_codelet_t1bv_16_sse2 fftw_codelet_t1bv_20_avx fftw_codelet_t1bv_20_sse2 fftw_codelet_t1bv_25_avx fftw_codelet_t1bv_25_sse2 fftw_codelet_t1bv_2_avx fftw_codelet_t1bv_2_sse2 fftw_codelet_t1bv_32_avx fftw_codelet_t1bv_32_sse2 fftw_codelet_t1bv_3_avx fftw_codelet_t1bv_3_sse2 fftw_codelet_t1bv_4_avx fftw_codelet_t1bv_4_sse2 fftw_codelet_t1bv_5_avx fftw_codelet_t1bv_5_sse2 fftw_codelet_t1bv_64_avx fftw_codelet_t1bv_64_sse2 fftw_codelet_t1bv_6_avx fftw_codelet_t1bv_6_sse2 fftw_codelet_t1bv_7_avx fftw_codelet_t1bv_7_sse2 fftw_codelet_t1bv_8_avx fftw_codelet_t1bv_8_sse2 fftw_codelet_t1bv_9_avx fftw_codelet_t1bv_9_sse2 fftw_codelet_t1fuv_10_avx fftw_codelet_t1fuv_10_sse2 fftw_codelet_t1fuv_2_avx fftw_codelet_t1fuv_2_sse2 fftw_codelet_t1fuv_3_avx fftw_codelet_t1fuv_3_sse2 fftw_codelet_t1fuv_4_avx fftw_codelet_t1fuv_4_sse2 fftw_codelet_t1fuv_5_avx fftw_codelet_t1fuv_5_sse2 fftw_codelet_t1fuv_6_avx fftw_codelet_t1fuv_6_sse2 fftw_codelet_t1fuv_7_avx fftw_codelet_t1fuv_7_sse2 fftw_codelet_t1fuv_8_avx fftw_codelet_t1fuv_8_sse2 fftw_codelet_t1fuv_9_avx fftw_codelet_t1fuv_9_sse2 fftw_codelet_t1fv_10_avx fftw_codelet_t1fv_10_sse2 fftw_codelet_t1fv_12_avx fftw_codelet_t1fv_12_sse2 fftw_codelet_t1fv_15_avx fftw_codelet_t1fv_15_sse2 fftw_codelet_t1fv_16_avx fftw_codelet_t1fv_16_sse2 fftw_codelet_t1fv_20_avx fftw_codelet_t1fv_20_sse2 fftw_codelet_t1fv_25_avx fftw_codelet_t1fv_25_sse2 fftw_codelet_t1fv_2_avx fftw_codelet_t1fv_2_sse2 fftw_codelet_t1fv_32_avx fftw_codelet_t1fv_32_sse2 fftw_codelet_t1fv_3_avx fftw_codelet_t1fv_3_sse2 fftw_codelet_t1fv_4_avx fftw_codelet_t1fv_4_sse2 fftw_codelet_t1fv_5_avx fftw_codelet_t1fv_5_sse2 fftw_codelet_t1fv_64_avx fftw_codelet_t1fv_64_sse2 fftw_codelet_t1fv_6_avx fftw_codelet_t1fv_6_sse2 fftw_codelet_t1fv_7_avx fftw_codelet_t1fv_7_sse2 fftw_codelet_t1fv_8_avx fftw_codelet_t1fv_8_sse2 fftw_codelet_t1fv_9_avx fftw_codelet_t1fv_9_sse2 fftw_codelet_t1sv_16_avx fftw_codelet_t1sv_16_sse2 fftw_codelet_t1sv_2_avx fftw_codelet_t1sv_2_sse2 fftw_codelet_t1sv_32_avx fftw_codelet_t1sv_32_sse2 fftw_codelet_t1sv_4_avx fftw_codelet_t1sv_4_sse2 fftw_codelet_t1sv_8_avx fftw_codelet_t1sv_8_sse2 fftw_codelet_t2_10 fftw_codelet_t2_16 fftw_codelet_t2_20 fftw_codelet_t2_25 fftw_codelet_t2_32 fftw_codelet_t2_4 fftw_codelet_t2_5 fftw_codelet_t2_64 fftw_codelet_t2_8 fftw_codelet_t2bv_10_avx fftw_codelet_t2bv_10_sse2 fftw_codelet_t2bv_16_avx fftw_codelet_t2bv_16_sse2 fftw_codelet_t2bv_20_avx fftw_codelet_t2bv_20_sse2 fftw_codelet_t2bv_25_avx fftw_codelet_t2bv_25_sse2 fftw_codelet_t2bv_2_avx fftw_codelet_t2bv_2_sse2 fftw_codelet_t2bv_32_avx fftw_codelet_t2bv_32_sse2 fftw_codelet_t2bv_4_avx fftw_codelet_t2bv_4_sse2 fftw_codelet_t2bv_5_avx fftw_codelet_t2bv_5_sse2 fftw_codelet_t2bv_64_avx fftw_codelet_t2bv_64_sse2 fftw_codelet_t2bv_8_avx fftw_codelet_t2bv_8_sse2 fftw_codelet_t2fv_10_avx fftw_codelet_t2fv_10_sse2 fftw_codelet_t2fv_16_avx fftw_codelet_t2fv_16_sse2 fftw_codelet_t2fv_20_avx fftw_codelet_t2fv_20_sse2 fftw_codelet_t2fv_25_avx fftw_codelet_t2fv_25_sse2 fftw_codelet_t2fv_2_avx fftw_codelet_t2fv_2_sse2 fftw_codelet_t2fv_32_avx fftw_codelet_t2fv_32_sse2 fftw_codelet_t2fv_4_avx fftw_codelet_t2fv_4_sse2 fftw_codelet_t2fv_5_avx fftw_codelet_t2fv_5_sse2 fftw_codelet_t2fv_64_avx fftw_codelet_t2fv_64_sse2 fftw_codelet_t2fv_8_avx fftw_codelet_t2fv_8_sse2 fftw_codelet_t2sv_16_avx fftw_codelet_t2sv_16_sse2 fftw_codelet_t2sv_32_avx fftw_codelet_t2sv_32_sse2 fftw_codelet_t2sv_4_avx fftw_codelet_t2sv_4_sse2 fftw_codelet_t2sv_8_avx fftw_codelet_t2sv_8_sse2 fftw_codelet_t3bv_10_avx fftw_codelet_t3bv_10_sse2 fftw_codelet_t3bv_16_avx fftw_codelet_t3bv_16_sse2 fftw_codelet_t3bv_20_avx fftw_codelet_t3bv_20_sse2 fftw_codelet_t3bv_25_avx fftw_codelet_t3bv_25_sse2 fftw_codelet_t3bv_32_avx fftw_codelet_t3bv_32_sse2 fftw_codelet_t3bv_4_avx fftw_codelet_t3bv_4_sse2 fftw_codelet_t3bv_5_avx fftw_codelet_t3bv_5_sse2 fftw_codelet_t3bv_8_avx fftw_codelet_t3bv_8_sse2 fftw_codelet_t3fv_10_avx fftw_codelet_t3fv_10_sse2 fftw_codelet_t3fv_16_avx fftw_codelet_t3fv_16_sse2 fftw_codelet_t3fv_20_avx fftw_codelet_t3fv_20_sse2 fftw_codelet_t3fv_25_avx fftw_codelet_t3fv_25_sse2 fftw_codelet_t3fv_32_avx fftw_codelet_t3fv_32_sse2 fftw_codelet_t3fv_4_avx fftw_codelet_t3fv_4_sse2 fftw_codelet_t3fv_5_avx fftw_codelet_t3fv_5_sse2 fftw_codelet_t3fv_8_avx fftw_codelet_t3fv_8_sse2 fftw_compute_tilesz fftw_configure_planner fftw_cost fftw_cpy1d fftw_cpy2d fftw_cpy2d_ci fftw_cpy2d_co fftw_cpy2d_pair fftw_cpy2d_pair_ci fftw_cpy2d_pair_co fftw_cpy2d_tiled fftw_cpy2d_tiledbuf fftw_ct_applicable fftw_ct_generic_register fftw_ct_genericbuf_register fftw_ct_uglyp fftw_destroy_plan fftw_dft_bluestein_register fftw_dft_buffered_register fftw_dft_conf_standard fftw_dft_generic_register fftw_dft_indirect_register fftw_dft_indirect_transpose_register fftw_dft_nop_register fftw_dft_r2hc_register fftw_dft_rader_register fftw_dft_rank_geq2_register fftw_dft_solve fftw_dft_thr_vrank_geq1_register fftw_dft_vrank_geq1_register fftw_dft_zerotens fftw_dht_r2hc_register fftw_dht_rader_register fftw_dimcmp fftw_elapsed_since fftw_estimate_cost fftw_execute fftw_execute_dft fftw_execute_dft_c2r fftw_execute_dft_r2c fftw_execute_r2r fftw_execute_split_dft fftw_execute_split_dft_c2r fftw_execute_split_dft_r2c fftw_export_wisdom fftw_export_wisdom_to_file fftw_export_wisdom_to_filename fftw_export_wisdom_to_string fftw_extract_reim fftw_factors_into fftw_factors_into_small_primes fftw_find_generator fftw_first_divisor fftw_flops fftw_forget_wisdom fftw_fprint_plan fftw_free fftw_get_crude_time fftw_guru64_kosherp fftw_guru_kosherp fftw_hash fftw_have_simd_avx fftw_have_simd_sse2 fftw_hc2c_applicable fftw_hc2hc_applicable fftw_hc2hc_generic_register fftw_iabs fftw_iestimate_cost fftw_ifree fftw_ifree0 fftw_imax fftw_imin fftw_import_system_wisdom fftw_import_wisdom fftw_import_wisdom_from_file fftw_import_wisdom_from_filename fftw_import_wisdom_from_string fftw_init_threads fftw_is_prime fftw_isqrt fftw_ithreads_init fftw_join_taint fftw_kdft_dif_register fftw_kdft_difsq_register fftw_kdft_dit_register fftw_kdft_register fftw_kernel_free fftw_kernel_malloc fftw_khc2c_register fftw_khc2hc_register fftw_kr2c_register fftw_kr2r_register fftw_malloc fftw_malloc_plain fftw_many_kosherp fftw_map_r2r_kind fftw_mapflags fftw_md5INT fftw_md5begin fftw_md5end fftw_md5int fftw_md5putb fftw_md5putc fftw_md5puts fftw_md5unsigned fftw_measure_execution_time fftw_mkapiplan fftw_mkplan fftw_mkplan_d fftw_mkplan_dft fftw_mkplan_dftw fftw_mkplan_f_d fftw_mkplan_hc2c fftw_mkplan_hc2hc fftw_mkplan_rdft fftw_mkplan_rdft2 fftw_mkplanner fftw_mkprinter fftw_mkprinter_cnt fftw_mkprinter_file fftw_mkprinter_str fftw_mkproblem fftw_mkproblem_dft fftw_mkproblem_dft_d fftw_mkproblem_rdft fftw_mkproblem_rdft2 fftw_mkproblem_rdft2_d fftw_mkproblem_rdft2_d_3pointers fftw_mkproblem_rdft_0_d fftw_mkproblem_rdft_1 fftw_mkproblem_rdft_1_d fftw_mkproblem_rdft_d fftw_mkproblem_unsolvable fftw_mkscanner fftw_mksolver fftw_mksolver_ct fftw_mksolver_ct_threads fftw_mksolver_dft_direct fftw_mksolver_dft_directbuf fftw_mksolver_hc2c fftw_mksolver_hc2hc fftw_mksolver_hc2hc_threads fftw_mksolver_rdft2_direct fftw_mksolver_rdft_r2c_direct fftw_mksolver_rdft_r2c_directbuf fftw_mksolver_rdft_r2r_direct fftw_mkstride fftw_mktensor fftw_mktensor_0d fftw_mktensor_1d fftw_mktensor_2d fftw_mktensor_3d fftw_mktensor_4d fftw_mktensor_5d fftw_mktensor_iodims fftw_mktensor_iodims64 fftw_mktensor_rowmajor fftw_mktriggen fftw_modulo fftw_nbuf fftw_nbuf_redundant fftw_next_prime fftw_null_awake fftw_ops_add fftw_ops_add2 fftw_ops_cpy fftw_ops_madd fftw_ops_madd2 fftw_ops_other fftw_ops_zero fftw_pickdim fftw_plan_awake fftw_plan_destroy_internal fftw_plan_dft fftw_plan_dft_1d fftw_plan_dft_2d fftw_plan_dft_3d fftw_plan_dft_c2r fftw_plan_dft_c2r_1d fftw_plan_dft_c2r_2d fftw_plan_dft_c2r_3d fftw_plan_dft_r2c fftw_plan_dft_r2c_1d fftw_plan_dft_r2c_2d fftw_plan_dft_r2c_3d fftw_plan_guru64_dft fftw_plan_guru64_dft_c2r fftw_plan_guru64_dft_r2c fftw_plan_guru64_r2r fftw_plan_guru64_split_dft fftw_plan_guru64_split_dft_c2r fftw_plan_guru64_split_dft_r2c fftw_plan_guru_dft fftw_plan_guru_dft_c2r fftw_plan_guru_dft_r2c fftw_plan_guru_r2r fftw_plan_guru_split_dft fftw_plan_guru_split_dft_c2r fftw_plan_guru_split_dft_r2c fftw_plan_many_dft fftw_plan_many_dft_c2r fftw_plan_many_dft_r2c fftw_plan_many_r2r fftw_plan_null_destroy fftw_plan_r2r fftw_plan_r2r_1d fftw_plan_r2r_2d fftw_plan_r2r_3d fftw_plan_with_nthreads fftw_planner_destroy fftw_power_mod fftw_print_plan fftw_printer_destroy fftw_problem_destroy fftw_rader_tl_delete fftw_rader_tl_find fftw_rader_tl_insert fftw_rdft2_buffered_register fftw_rdft2_complex_n fftw_rdft2_inplace_strides fftw_rdft2_nop_register fftw_rdft2_pad fftw_rdft2_rank0_register fftw_rdft2_rank_geq2_register fftw_rdft2_rdft_register fftw_rdft2_solve fftw_rdft2_strides fftw_rdft2_tensor_max_index fftw_rdft2_thr_vrank_geq1_register fftw_rdft2_vrank_geq1_register fftw_rdft_buffered_register fftw_rdft_conf_standard fftw_rdft_dht_register fftw_rdft_generic_register fftw_rdft_indirect_register fftw_rdft_kind_str fftw_rdft_nop_register fftw_rdft_rank0_register fftw_rdft_rank_geq2_register fftw_rdft_solve fftw_rdft_thr_vrank_geq1_register fftw_rdft_vrank3_transpose_register fftw_rdft_vrank_geq1_register fftw_rdft_zerotens fftw_redft00e_r2hc_pad_register fftw_regsolver_ct_directw fftw_regsolver_ct_directwsq fftw_regsolver_hc2c_direct fftw_regsolver_hc2hc_direct fftw_reodft00e_splitradix_register fftw_reodft010e_r2hc_register fftw_reodft11e_r2hc_odd_register fftw_reodft11e_radix2_r2hc_register fftw_reodft_conf_standard fftw_rodft00e_r2hc_pad_register fftw_safe_mulmod fftw_scanner_destroy fftw_set_timelimit fftw_solver_destroy fftw_solver_register fftw_solver_use fftw_solvtab_exec fftw_spawn_loop fftw_sprint_plan fftw_stride_destroy fftw_taint fftw_tensor_append fftw_tensor_compress fftw_tensor_compress_contiguous fftw_tensor_copy fftw_tensor_copy_except fftw_tensor_copy_inplace fftw_tensor_copy_sub fftw_tensor_destroy fftw_tensor_destroy2 fftw_tensor_destroy4 fftw_tensor_equal fftw_tensor_inplace_locations fftw_tensor_inplace_strides fftw_tensor_inplace_strides2 fftw_tensor_kosherp fftw_tensor_max_index fftw_tensor_md5 fftw_tensor_min_istride fftw_tensor_min_ostride fftw_tensor_min_stride fftw_tensor_print fftw_tensor_split fftw_tensor_strides_decrease fftw_tensor_sz fftw_tensor_tornk1 fftw_the_planner fftw_threads_cleanup fftw_threads_conf_standard fftw_tile2d fftw_toobig fftw_transpose fftw_transpose_tiled fftw_transpose_tiledbuf fftw_triggen_destroy fftw_twiddle_awake fftw_twiddle_length ================================================ FILE: OptolithiumC/libs/fftw3-win32/libfftw3f-3.def ================================================ LIBRARY libfftw3f-3.dll EXPORTS fftwf_alignment_of fftwf_alloc_complex fftwf_alloc_real fftwf_assertion_failed fftwf_bufdist fftwf_check_alignment_of_sse2_pm fftwf_choose_radix fftwf_cleanup fftwf_cleanup_threads fftwf_codelet_e01_8 fftwf_codelet_e10_8 fftwf_codelet_hb2_16 fftwf_codelet_hb2_20 fftwf_codelet_hb2_25 fftwf_codelet_hb2_32 fftwf_codelet_hb2_4 fftwf_codelet_hb2_5 fftwf_codelet_hb2_8 fftwf_codelet_hb_10 fftwf_codelet_hb_12 fftwf_codelet_hb_15 fftwf_codelet_hb_16 fftwf_codelet_hb_2 fftwf_codelet_hb_20 fftwf_codelet_hb_25 fftwf_codelet_hb_3 fftwf_codelet_hb_32 fftwf_codelet_hb_4 fftwf_codelet_hb_5 fftwf_codelet_hb_6 fftwf_codelet_hb_64 fftwf_codelet_hb_7 fftwf_codelet_hb_8 fftwf_codelet_hb_9 fftwf_codelet_hc2cb2_16 fftwf_codelet_hc2cb2_20 fftwf_codelet_hc2cb2_32 fftwf_codelet_hc2cb2_4 fftwf_codelet_hc2cb2_8 fftwf_codelet_hc2cb_10 fftwf_codelet_hc2cb_12 fftwf_codelet_hc2cb_16 fftwf_codelet_hc2cb_2 fftwf_codelet_hc2cb_20 fftwf_codelet_hc2cb_32 fftwf_codelet_hc2cb_4 fftwf_codelet_hc2cb_6 fftwf_codelet_hc2cb_8 fftwf_codelet_hc2cbdft2_16 fftwf_codelet_hc2cbdft2_20 fftwf_codelet_hc2cbdft2_32 fftwf_codelet_hc2cbdft2_4 fftwf_codelet_hc2cbdft2_8 fftwf_codelet_hc2cbdft_10 fftwf_codelet_hc2cbdft_12 fftwf_codelet_hc2cbdft_16 fftwf_codelet_hc2cbdft_2 fftwf_codelet_hc2cbdft_20 fftwf_codelet_hc2cbdft_32 fftwf_codelet_hc2cbdft_4 fftwf_codelet_hc2cbdft_6 fftwf_codelet_hc2cbdft_8 fftwf_codelet_hc2cbdftv_10_avx fftwf_codelet_hc2cbdftv_10_sse2 fftwf_codelet_hc2cbdftv_12_avx fftwf_codelet_hc2cbdftv_12_sse2 fftwf_codelet_hc2cbdftv_16_avx fftwf_codelet_hc2cbdftv_16_sse2 fftwf_codelet_hc2cbdftv_20_avx fftwf_codelet_hc2cbdftv_20_sse2 fftwf_codelet_hc2cbdftv_2_avx fftwf_codelet_hc2cbdftv_2_sse2 fftwf_codelet_hc2cbdftv_32_avx fftwf_codelet_hc2cbdftv_32_sse2 fftwf_codelet_hc2cbdftv_4_avx fftwf_codelet_hc2cbdftv_4_sse2 fftwf_codelet_hc2cbdftv_6_avx fftwf_codelet_hc2cbdftv_6_sse2 fftwf_codelet_hc2cbdftv_8_avx fftwf_codelet_hc2cbdftv_8_sse2 fftwf_codelet_hc2cf2_16 fftwf_codelet_hc2cf2_20 fftwf_codelet_hc2cf2_32 fftwf_codelet_hc2cf2_4 fftwf_codelet_hc2cf2_8 fftwf_codelet_hc2cf_10 fftwf_codelet_hc2cf_12 fftwf_codelet_hc2cf_16 fftwf_codelet_hc2cf_2 fftwf_codelet_hc2cf_20 fftwf_codelet_hc2cf_32 fftwf_codelet_hc2cf_4 fftwf_codelet_hc2cf_6 fftwf_codelet_hc2cf_8 fftwf_codelet_hc2cfdft2_16 fftwf_codelet_hc2cfdft2_20 fftwf_codelet_hc2cfdft2_32 fftwf_codelet_hc2cfdft2_4 fftwf_codelet_hc2cfdft2_8 fftwf_codelet_hc2cfdft_10 fftwf_codelet_hc2cfdft_12 fftwf_codelet_hc2cfdft_16 fftwf_codelet_hc2cfdft_2 fftwf_codelet_hc2cfdft_20 fftwf_codelet_hc2cfdft_32 fftwf_codelet_hc2cfdft_4 fftwf_codelet_hc2cfdft_6 fftwf_codelet_hc2cfdft_8 fftwf_codelet_hc2cfdftv_10_avx fftwf_codelet_hc2cfdftv_10_sse2 fftwf_codelet_hc2cfdftv_12_avx fftwf_codelet_hc2cfdftv_12_sse2 fftwf_codelet_hc2cfdftv_16_avx fftwf_codelet_hc2cfdftv_16_sse2 fftwf_codelet_hc2cfdftv_20_avx fftwf_codelet_hc2cfdftv_20_sse2 fftwf_codelet_hc2cfdftv_2_avx fftwf_codelet_hc2cfdftv_2_sse2 fftwf_codelet_hc2cfdftv_32_avx fftwf_codelet_hc2cfdftv_32_sse2 fftwf_codelet_hc2cfdftv_4_avx fftwf_codelet_hc2cfdftv_4_sse2 fftwf_codelet_hc2cfdftv_6_avx fftwf_codelet_hc2cfdftv_6_sse2 fftwf_codelet_hc2cfdftv_8_avx fftwf_codelet_hc2cfdftv_8_sse2 fftwf_codelet_hf2_16 fftwf_codelet_hf2_20 fftwf_codelet_hf2_25 fftwf_codelet_hf2_32 fftwf_codelet_hf2_4 fftwf_codelet_hf2_5 fftwf_codelet_hf2_8 fftwf_codelet_hf_10 fftwf_codelet_hf_12 fftwf_codelet_hf_15 fftwf_codelet_hf_16 fftwf_codelet_hf_2 fftwf_codelet_hf_20 fftwf_codelet_hf_25 fftwf_codelet_hf_3 fftwf_codelet_hf_32 fftwf_codelet_hf_4 fftwf_codelet_hf_5 fftwf_codelet_hf_6 fftwf_codelet_hf_64 fftwf_codelet_hf_7 fftwf_codelet_hf_8 fftwf_codelet_hf_9 fftwf_codelet_n1_10 fftwf_codelet_n1_11 fftwf_codelet_n1_12 fftwf_codelet_n1_13 fftwf_codelet_n1_14 fftwf_codelet_n1_15 fftwf_codelet_n1_16 fftwf_codelet_n1_2 fftwf_codelet_n1_20 fftwf_codelet_n1_25 fftwf_codelet_n1_3 fftwf_codelet_n1_32 fftwf_codelet_n1_4 fftwf_codelet_n1_5 fftwf_codelet_n1_6 fftwf_codelet_n1_64 fftwf_codelet_n1_7 fftwf_codelet_n1_8 fftwf_codelet_n1_9 fftwf_codelet_n1bv_10_avx fftwf_codelet_n1bv_10_sse2 fftwf_codelet_n1bv_11_avx fftwf_codelet_n1bv_11_sse2 fftwf_codelet_n1bv_128_avx fftwf_codelet_n1bv_128_sse2 fftwf_codelet_n1bv_12_avx fftwf_codelet_n1bv_12_sse2 fftwf_codelet_n1bv_13_avx fftwf_codelet_n1bv_13_sse2 fftwf_codelet_n1bv_14_avx fftwf_codelet_n1bv_14_sse2 fftwf_codelet_n1bv_15_avx fftwf_codelet_n1bv_15_sse2 fftwf_codelet_n1bv_16_avx fftwf_codelet_n1bv_16_sse2 fftwf_codelet_n1bv_20_avx fftwf_codelet_n1bv_20_sse2 fftwf_codelet_n1bv_25_avx fftwf_codelet_n1bv_25_sse2 fftwf_codelet_n1bv_2_avx fftwf_codelet_n1bv_2_sse2 fftwf_codelet_n1bv_32_avx fftwf_codelet_n1bv_32_sse2 fftwf_codelet_n1bv_3_avx fftwf_codelet_n1bv_3_sse2 fftwf_codelet_n1bv_4_avx fftwf_codelet_n1bv_4_sse2 fftwf_codelet_n1bv_5_avx fftwf_codelet_n1bv_5_sse2 fftwf_codelet_n1bv_64_avx fftwf_codelet_n1bv_64_sse2 fftwf_codelet_n1bv_6_avx fftwf_codelet_n1bv_6_sse2 fftwf_codelet_n1bv_7_avx fftwf_codelet_n1bv_7_sse2 fftwf_codelet_n1bv_8_avx fftwf_codelet_n1bv_8_sse2 fftwf_codelet_n1bv_9_avx fftwf_codelet_n1bv_9_sse2 fftwf_codelet_n1fv_10_avx fftwf_codelet_n1fv_10_sse2 fftwf_codelet_n1fv_11_avx fftwf_codelet_n1fv_11_sse2 fftwf_codelet_n1fv_128_avx fftwf_codelet_n1fv_128_sse2 fftwf_codelet_n1fv_12_avx fftwf_codelet_n1fv_12_sse2 fftwf_codelet_n1fv_13_avx fftwf_codelet_n1fv_13_sse2 fftwf_codelet_n1fv_14_avx fftwf_codelet_n1fv_14_sse2 fftwf_codelet_n1fv_15_avx fftwf_codelet_n1fv_15_sse2 fftwf_codelet_n1fv_16_avx fftwf_codelet_n1fv_16_sse2 fftwf_codelet_n1fv_20_avx fftwf_codelet_n1fv_20_sse2 fftwf_codelet_n1fv_25_avx fftwf_codelet_n1fv_25_sse2 fftwf_codelet_n1fv_2_avx fftwf_codelet_n1fv_2_sse2 fftwf_codelet_n1fv_32_avx fftwf_codelet_n1fv_32_sse2 fftwf_codelet_n1fv_3_avx fftwf_codelet_n1fv_3_sse2 fftwf_codelet_n1fv_4_avx fftwf_codelet_n1fv_4_sse2 fftwf_codelet_n1fv_5_avx fftwf_codelet_n1fv_5_sse2 fftwf_codelet_n1fv_64_avx fftwf_codelet_n1fv_64_sse2 fftwf_codelet_n1fv_6_avx fftwf_codelet_n1fv_6_sse2 fftwf_codelet_n1fv_7_avx fftwf_codelet_n1fv_7_sse2 fftwf_codelet_n1fv_8_avx fftwf_codelet_n1fv_8_sse2 fftwf_codelet_n1fv_9_avx fftwf_codelet_n1fv_9_sse2 fftwf_codelet_n2bv_10_avx fftwf_codelet_n2bv_10_sse2 fftwf_codelet_n2bv_12_avx fftwf_codelet_n2bv_12_sse2 fftwf_codelet_n2bv_14_avx fftwf_codelet_n2bv_14_sse2 fftwf_codelet_n2bv_16_avx fftwf_codelet_n2bv_16_sse2 fftwf_codelet_n2bv_20_avx fftwf_codelet_n2bv_20_sse2 fftwf_codelet_n2bv_2_avx fftwf_codelet_n2bv_2_sse2 fftwf_codelet_n2bv_32_avx fftwf_codelet_n2bv_32_sse2 fftwf_codelet_n2bv_4_avx fftwf_codelet_n2bv_4_sse2 fftwf_codelet_n2bv_64_avx fftwf_codelet_n2bv_64_sse2 fftwf_codelet_n2bv_6_avx fftwf_codelet_n2bv_6_sse2 fftwf_codelet_n2bv_8_avx fftwf_codelet_n2bv_8_sse2 fftwf_codelet_n2fv_10_avx fftwf_codelet_n2fv_10_sse2 fftwf_codelet_n2fv_12_avx fftwf_codelet_n2fv_12_sse2 fftwf_codelet_n2fv_14_avx fftwf_codelet_n2fv_14_sse2 fftwf_codelet_n2fv_16_avx fftwf_codelet_n2fv_16_sse2 fftwf_codelet_n2fv_20_avx fftwf_codelet_n2fv_20_sse2 fftwf_codelet_n2fv_2_avx fftwf_codelet_n2fv_2_sse2 fftwf_codelet_n2fv_32_avx fftwf_codelet_n2fv_32_sse2 fftwf_codelet_n2fv_4_avx fftwf_codelet_n2fv_4_sse2 fftwf_codelet_n2fv_64_avx fftwf_codelet_n2fv_64_sse2 fftwf_codelet_n2fv_6_avx fftwf_codelet_n2fv_6_sse2 fftwf_codelet_n2fv_8_avx fftwf_codelet_n2fv_8_sse2 fftwf_codelet_n2sv_16_avx fftwf_codelet_n2sv_16_sse2 fftwf_codelet_n2sv_32_avx fftwf_codelet_n2sv_32_sse2 fftwf_codelet_n2sv_4_avx fftwf_codelet_n2sv_4_sse2 fftwf_codelet_n2sv_64_avx fftwf_codelet_n2sv_64_sse2 fftwf_codelet_n2sv_8_avx fftwf_codelet_n2sv_8_sse2 fftwf_codelet_q1_2 fftwf_codelet_q1_3 fftwf_codelet_q1_4 fftwf_codelet_q1_5 fftwf_codelet_q1_6 fftwf_codelet_q1_8 fftwf_codelet_q1bv_2_avx fftwf_codelet_q1bv_2_sse2 fftwf_codelet_q1bv_4_avx fftwf_codelet_q1bv_4_sse2 fftwf_codelet_q1bv_5_avx fftwf_codelet_q1bv_5_sse2 fftwf_codelet_q1bv_8_avx fftwf_codelet_q1bv_8_sse2 fftwf_codelet_q1fv_2_avx fftwf_codelet_q1fv_2_sse2 fftwf_codelet_q1fv_4_avx fftwf_codelet_q1fv_4_sse2 fftwf_codelet_q1fv_5_avx fftwf_codelet_q1fv_5_sse2 fftwf_codelet_q1fv_8_avx fftwf_codelet_q1fv_8_sse2 fftwf_codelet_r2cbIII_10 fftwf_codelet_r2cbIII_12 fftwf_codelet_r2cbIII_15 fftwf_codelet_r2cbIII_16 fftwf_codelet_r2cbIII_2 fftwf_codelet_r2cbIII_20 fftwf_codelet_r2cbIII_25 fftwf_codelet_r2cbIII_3 fftwf_codelet_r2cbIII_32 fftwf_codelet_r2cbIII_4 fftwf_codelet_r2cbIII_5 fftwf_codelet_r2cbIII_6 fftwf_codelet_r2cbIII_64 fftwf_codelet_r2cbIII_7 fftwf_codelet_r2cbIII_8 fftwf_codelet_r2cbIII_9 fftwf_codelet_r2cb_10 fftwf_codelet_r2cb_11 fftwf_codelet_r2cb_12 fftwf_codelet_r2cb_128 fftwf_codelet_r2cb_13 fftwf_codelet_r2cb_14 fftwf_codelet_r2cb_15 fftwf_codelet_r2cb_16 fftwf_codelet_r2cb_2 fftwf_codelet_r2cb_20 fftwf_codelet_r2cb_25 fftwf_codelet_r2cb_3 fftwf_codelet_r2cb_32 fftwf_codelet_r2cb_4 fftwf_codelet_r2cb_5 fftwf_codelet_r2cb_6 fftwf_codelet_r2cb_64 fftwf_codelet_r2cb_7 fftwf_codelet_r2cb_8 fftwf_codelet_r2cb_9 fftwf_codelet_r2cfII_10 fftwf_codelet_r2cfII_12 fftwf_codelet_r2cfII_15 fftwf_codelet_r2cfII_16 fftwf_codelet_r2cfII_2 fftwf_codelet_r2cfII_20 fftwf_codelet_r2cfII_25 fftwf_codelet_r2cfII_3 fftwf_codelet_r2cfII_32 fftwf_codelet_r2cfII_4 fftwf_codelet_r2cfII_5 fftwf_codelet_r2cfII_6 fftwf_codelet_r2cfII_64 fftwf_codelet_r2cfII_7 fftwf_codelet_r2cfII_8 fftwf_codelet_r2cfII_9 fftwf_codelet_r2cf_10 fftwf_codelet_r2cf_11 fftwf_codelet_r2cf_12 fftwf_codelet_r2cf_128 fftwf_codelet_r2cf_13 fftwf_codelet_r2cf_14 fftwf_codelet_r2cf_15 fftwf_codelet_r2cf_16 fftwf_codelet_r2cf_2 fftwf_codelet_r2cf_20 fftwf_codelet_r2cf_25 fftwf_codelet_r2cf_3 fftwf_codelet_r2cf_32 fftwf_codelet_r2cf_4 fftwf_codelet_r2cf_5 fftwf_codelet_r2cf_6 fftwf_codelet_r2cf_64 fftwf_codelet_r2cf_7 fftwf_codelet_r2cf_8 fftwf_codelet_r2cf_9 fftwf_codelet_t1_10 fftwf_codelet_t1_12 fftwf_codelet_t1_15 fftwf_codelet_t1_16 fftwf_codelet_t1_2 fftwf_codelet_t1_20 fftwf_codelet_t1_25 fftwf_codelet_t1_3 fftwf_codelet_t1_32 fftwf_codelet_t1_4 fftwf_codelet_t1_5 fftwf_codelet_t1_6 fftwf_codelet_t1_64 fftwf_codelet_t1_7 fftwf_codelet_t1_8 fftwf_codelet_t1_9 fftwf_codelet_t1buv_10_avx fftwf_codelet_t1buv_10_sse2 fftwf_codelet_t1buv_2_avx fftwf_codelet_t1buv_2_sse2 fftwf_codelet_t1buv_3_avx fftwf_codelet_t1buv_3_sse2 fftwf_codelet_t1buv_4_avx fftwf_codelet_t1buv_4_sse2 fftwf_codelet_t1buv_5_avx fftwf_codelet_t1buv_5_sse2 fftwf_codelet_t1buv_6_avx fftwf_codelet_t1buv_6_sse2 fftwf_codelet_t1buv_7_avx fftwf_codelet_t1buv_7_sse2 fftwf_codelet_t1buv_8_avx fftwf_codelet_t1buv_8_sse2 fftwf_codelet_t1buv_9_avx fftwf_codelet_t1buv_9_sse2 fftwf_codelet_t1bv_10_avx fftwf_codelet_t1bv_10_sse2 fftwf_codelet_t1bv_12_avx fftwf_codelet_t1bv_12_sse2 fftwf_codelet_t1bv_15_avx fftwf_codelet_t1bv_15_sse2 fftwf_codelet_t1bv_16_avx fftwf_codelet_t1bv_16_sse2 fftwf_codelet_t1bv_20_avx fftwf_codelet_t1bv_20_sse2 fftwf_codelet_t1bv_25_avx fftwf_codelet_t1bv_25_sse2 fftwf_codelet_t1bv_2_avx fftwf_codelet_t1bv_2_sse2 fftwf_codelet_t1bv_32_avx fftwf_codelet_t1bv_32_sse2 fftwf_codelet_t1bv_3_avx fftwf_codelet_t1bv_3_sse2 fftwf_codelet_t1bv_4_avx fftwf_codelet_t1bv_4_sse2 fftwf_codelet_t1bv_5_avx fftwf_codelet_t1bv_5_sse2 fftwf_codelet_t1bv_64_avx fftwf_codelet_t1bv_64_sse2 fftwf_codelet_t1bv_6_avx fftwf_codelet_t1bv_6_sse2 fftwf_codelet_t1bv_7_avx fftwf_codelet_t1bv_7_sse2 fftwf_codelet_t1bv_8_avx fftwf_codelet_t1bv_8_sse2 fftwf_codelet_t1bv_9_avx fftwf_codelet_t1bv_9_sse2 fftwf_codelet_t1fuv_10_avx fftwf_codelet_t1fuv_10_sse2 fftwf_codelet_t1fuv_2_avx fftwf_codelet_t1fuv_2_sse2 fftwf_codelet_t1fuv_3_avx fftwf_codelet_t1fuv_3_sse2 fftwf_codelet_t1fuv_4_avx fftwf_codelet_t1fuv_4_sse2 fftwf_codelet_t1fuv_5_avx fftwf_codelet_t1fuv_5_sse2 fftwf_codelet_t1fuv_6_avx fftwf_codelet_t1fuv_6_sse2 fftwf_codelet_t1fuv_7_avx fftwf_codelet_t1fuv_7_sse2 fftwf_codelet_t1fuv_8_avx fftwf_codelet_t1fuv_8_sse2 fftwf_codelet_t1fuv_9_avx fftwf_codelet_t1fuv_9_sse2 fftwf_codelet_t1fv_10_avx fftwf_codelet_t1fv_10_sse2 fftwf_codelet_t1fv_12_avx fftwf_codelet_t1fv_12_sse2 fftwf_codelet_t1fv_15_avx fftwf_codelet_t1fv_15_sse2 fftwf_codelet_t1fv_16_avx fftwf_codelet_t1fv_16_sse2 fftwf_codelet_t1fv_20_avx fftwf_codelet_t1fv_20_sse2 fftwf_codelet_t1fv_25_avx fftwf_codelet_t1fv_25_sse2 fftwf_codelet_t1fv_2_avx fftwf_codelet_t1fv_2_sse2 fftwf_codelet_t1fv_32_avx fftwf_codelet_t1fv_32_sse2 fftwf_codelet_t1fv_3_avx fftwf_codelet_t1fv_3_sse2 fftwf_codelet_t1fv_4_avx fftwf_codelet_t1fv_4_sse2 fftwf_codelet_t1fv_5_avx fftwf_codelet_t1fv_5_sse2 fftwf_codelet_t1fv_64_avx fftwf_codelet_t1fv_64_sse2 fftwf_codelet_t1fv_6_avx fftwf_codelet_t1fv_6_sse2 fftwf_codelet_t1fv_7_avx fftwf_codelet_t1fv_7_sse2 fftwf_codelet_t1fv_8_avx fftwf_codelet_t1fv_8_sse2 fftwf_codelet_t1fv_9_avx fftwf_codelet_t1fv_9_sse2 fftwf_codelet_t1sv_16_avx fftwf_codelet_t1sv_16_sse2 fftwf_codelet_t1sv_2_avx fftwf_codelet_t1sv_2_sse2 fftwf_codelet_t1sv_32_avx fftwf_codelet_t1sv_32_sse2 fftwf_codelet_t1sv_4_avx fftwf_codelet_t1sv_4_sse2 fftwf_codelet_t1sv_8_avx fftwf_codelet_t1sv_8_sse2 fftwf_codelet_t2_10 fftwf_codelet_t2_16 fftwf_codelet_t2_20 fftwf_codelet_t2_25 fftwf_codelet_t2_32 fftwf_codelet_t2_4 fftwf_codelet_t2_5 fftwf_codelet_t2_64 fftwf_codelet_t2_8 fftwf_codelet_t2bv_10_avx fftwf_codelet_t2bv_10_sse2 fftwf_codelet_t2bv_16_avx fftwf_codelet_t2bv_16_sse2 fftwf_codelet_t2bv_20_avx fftwf_codelet_t2bv_20_sse2 fftwf_codelet_t2bv_25_avx fftwf_codelet_t2bv_25_sse2 fftwf_codelet_t2bv_2_avx fftwf_codelet_t2bv_2_sse2 fftwf_codelet_t2bv_32_avx fftwf_codelet_t2bv_32_sse2 fftwf_codelet_t2bv_4_avx fftwf_codelet_t2bv_4_sse2 fftwf_codelet_t2bv_5_avx fftwf_codelet_t2bv_5_sse2 fftwf_codelet_t2bv_64_avx fftwf_codelet_t2bv_64_sse2 fftwf_codelet_t2bv_8_avx fftwf_codelet_t2bv_8_sse2 fftwf_codelet_t2fv_10_avx fftwf_codelet_t2fv_10_sse2 fftwf_codelet_t2fv_16_avx fftwf_codelet_t2fv_16_sse2 fftwf_codelet_t2fv_20_avx fftwf_codelet_t2fv_20_sse2 fftwf_codelet_t2fv_25_avx fftwf_codelet_t2fv_25_sse2 fftwf_codelet_t2fv_2_avx fftwf_codelet_t2fv_2_sse2 fftwf_codelet_t2fv_32_avx fftwf_codelet_t2fv_32_sse2 fftwf_codelet_t2fv_4_avx fftwf_codelet_t2fv_4_sse2 fftwf_codelet_t2fv_5_avx fftwf_codelet_t2fv_5_sse2 fftwf_codelet_t2fv_64_avx fftwf_codelet_t2fv_64_sse2 fftwf_codelet_t2fv_8_avx fftwf_codelet_t2fv_8_sse2 fftwf_codelet_t2sv_16_avx fftwf_codelet_t2sv_16_sse2 fftwf_codelet_t2sv_32_avx fftwf_codelet_t2sv_32_sse2 fftwf_codelet_t2sv_4_avx fftwf_codelet_t2sv_4_sse2 fftwf_codelet_t2sv_8_avx fftwf_codelet_t2sv_8_sse2 fftwf_codelet_t3bv_10_avx fftwf_codelet_t3bv_10_sse2 fftwf_codelet_t3bv_16_avx fftwf_codelet_t3bv_16_sse2 fftwf_codelet_t3bv_20_avx fftwf_codelet_t3bv_20_sse2 fftwf_codelet_t3bv_25_avx fftwf_codelet_t3bv_25_sse2 fftwf_codelet_t3bv_32_avx fftwf_codelet_t3bv_32_sse2 fftwf_codelet_t3bv_4_avx fftwf_codelet_t3bv_4_sse2 fftwf_codelet_t3bv_5_avx fftwf_codelet_t3bv_5_sse2 fftwf_codelet_t3bv_8_avx fftwf_codelet_t3bv_8_sse2 fftwf_codelet_t3fv_10_avx fftwf_codelet_t3fv_10_sse2 fftwf_codelet_t3fv_16_avx fftwf_codelet_t3fv_16_sse2 fftwf_codelet_t3fv_20_avx fftwf_codelet_t3fv_20_sse2 fftwf_codelet_t3fv_25_avx fftwf_codelet_t3fv_25_sse2 fftwf_codelet_t3fv_32_avx fftwf_codelet_t3fv_32_sse2 fftwf_codelet_t3fv_4_avx fftwf_codelet_t3fv_4_sse2 fftwf_codelet_t3fv_5_avx fftwf_codelet_t3fv_5_sse2 fftwf_codelet_t3fv_8_avx fftwf_codelet_t3fv_8_sse2 fftwf_compute_tilesz fftwf_configure_planner fftwf_cost fftwf_cpy1d fftwf_cpy2d fftwf_cpy2d_ci fftwf_cpy2d_co fftwf_cpy2d_pair fftwf_cpy2d_pair_ci fftwf_cpy2d_pair_co fftwf_cpy2d_tiled fftwf_cpy2d_tiledbuf fftwf_ct_applicable fftwf_ct_generic_register fftwf_ct_genericbuf_register fftwf_ct_uglyp fftwf_destroy_plan fftwf_dft_bluestein_register fftwf_dft_buffered_register fftwf_dft_conf_standard fftwf_dft_generic_register fftwf_dft_indirect_register fftwf_dft_indirect_transpose_register fftwf_dft_nop_register fftwf_dft_r2hc_register fftwf_dft_rader_register fftwf_dft_rank_geq2_register fftwf_dft_solve fftwf_dft_thr_vrank_geq1_register fftwf_dft_vrank_geq1_register fftwf_dft_zerotens fftwf_dht_r2hc_register fftwf_dht_rader_register fftwf_dimcmp fftwf_elapsed_since fftwf_estimate_cost fftwf_execute fftwf_execute_dft fftwf_execute_dft_c2r fftwf_execute_dft_r2c fftwf_execute_r2r fftwf_execute_split_dft fftwf_execute_split_dft_c2r fftwf_execute_split_dft_r2c fftwf_export_wisdom fftwf_export_wisdom_to_file fftwf_export_wisdom_to_filename fftwf_export_wisdom_to_string fftwf_extract_reim fftwf_factors_into fftwf_factors_into_small_primes fftwf_find_generator fftwf_first_divisor fftwf_flops fftwf_forget_wisdom fftwf_fprint_plan fftwf_free fftwf_get_crude_time fftwf_guru64_kosherp fftwf_guru_kosherp fftwf_hash fftwf_have_simd_avx fftwf_have_simd_sse2 fftwf_hc2c_applicable fftwf_hc2hc_applicable fftwf_hc2hc_generic_register fftwf_iabs fftwf_iestimate_cost fftwf_ifree fftwf_ifree0 fftwf_imax fftwf_imin fftwf_import_system_wisdom fftwf_import_wisdom fftwf_import_wisdom_from_file fftwf_import_wisdom_from_filename fftwf_import_wisdom_from_string fftwf_init_threads fftwf_is_prime fftwf_isqrt fftwf_ithreads_init fftwf_join_taint fftwf_kdft_dif_register fftwf_kdft_difsq_register fftwf_kdft_dit_register fftwf_kdft_register fftwf_kernel_free fftwf_kernel_malloc fftwf_khc2c_register fftwf_khc2hc_register fftwf_kr2c_register fftwf_kr2r_register fftwf_malloc fftwf_malloc_plain fftwf_many_kosherp fftwf_map_r2r_kind fftwf_mapflags fftwf_md5INT fftwf_md5begin fftwf_md5end fftwf_md5int fftwf_md5putb fftwf_md5putc fftwf_md5puts fftwf_md5unsigned fftwf_measure_execution_time fftwf_mkapiplan fftwf_mkplan fftwf_mkplan_d fftwf_mkplan_dft fftwf_mkplan_dftw fftwf_mkplan_f_d fftwf_mkplan_hc2c fftwf_mkplan_hc2hc fftwf_mkplan_rdft fftwf_mkplan_rdft2 fftwf_mkplanner fftwf_mkprinter fftwf_mkprinter_cnt fftwf_mkprinter_file fftwf_mkprinter_str fftwf_mkproblem fftwf_mkproblem_dft fftwf_mkproblem_dft_d fftwf_mkproblem_rdft fftwf_mkproblem_rdft2 fftwf_mkproblem_rdft2_d fftwf_mkproblem_rdft2_d_3pointers fftwf_mkproblem_rdft_0_d fftwf_mkproblem_rdft_1 fftwf_mkproblem_rdft_1_d fftwf_mkproblem_rdft_d fftwf_mkproblem_unsolvable fftwf_mkscanner fftwf_mksolver fftwf_mksolver_ct fftwf_mksolver_ct_threads fftwf_mksolver_dft_direct fftwf_mksolver_dft_directbuf fftwf_mksolver_hc2c fftwf_mksolver_hc2hc fftwf_mksolver_hc2hc_threads fftwf_mksolver_rdft2_direct fftwf_mksolver_rdft_r2c_direct fftwf_mksolver_rdft_r2c_directbuf fftwf_mksolver_rdft_r2r_direct fftwf_mkstride fftwf_mktensor fftwf_mktensor_0d fftwf_mktensor_1d fftwf_mktensor_2d fftwf_mktensor_3d fftwf_mktensor_4d fftwf_mktensor_5d fftwf_mktensor_iodims fftwf_mktensor_iodims64 fftwf_mktensor_rowmajor fftwf_mktriggen fftwf_modulo fftwf_nbuf fftwf_nbuf_redundant fftwf_next_prime fftwf_null_awake fftwf_ops_add fftwf_ops_add2 fftwf_ops_cpy fftwf_ops_madd fftwf_ops_madd2 fftwf_ops_other fftwf_ops_zero fftwf_pickdim fftwf_plan_awake fftwf_plan_destroy_internal fftwf_plan_dft fftwf_plan_dft_1d fftwf_plan_dft_2d fftwf_plan_dft_3d fftwf_plan_dft_c2r fftwf_plan_dft_c2r_1d fftwf_plan_dft_c2r_2d fftwf_plan_dft_c2r_3d fftwf_plan_dft_r2c fftwf_plan_dft_r2c_1d fftwf_plan_dft_r2c_2d fftwf_plan_dft_r2c_3d fftwf_plan_guru64_dft fftwf_plan_guru64_dft_c2r fftwf_plan_guru64_dft_r2c fftwf_plan_guru64_r2r fftwf_plan_guru64_split_dft fftwf_plan_guru64_split_dft_c2r fftwf_plan_guru64_split_dft_r2c fftwf_plan_guru_dft fftwf_plan_guru_dft_c2r fftwf_plan_guru_dft_r2c fftwf_plan_guru_r2r fftwf_plan_guru_split_dft fftwf_plan_guru_split_dft_c2r fftwf_plan_guru_split_dft_r2c fftwf_plan_many_dft fftwf_plan_many_dft_c2r fftwf_plan_many_dft_r2c fftwf_plan_many_r2r fftwf_plan_null_destroy fftwf_plan_r2r fftwf_plan_r2r_1d fftwf_plan_r2r_2d fftwf_plan_r2r_3d fftwf_plan_with_nthreads fftwf_planner_destroy fftwf_power_mod fftwf_print_plan fftwf_printer_destroy fftwf_problem_destroy fftwf_rader_tl_delete fftwf_rader_tl_find fftwf_rader_tl_insert fftwf_rdft2_buffered_register fftwf_rdft2_complex_n fftwf_rdft2_inplace_strides fftwf_rdft2_nop_register fftwf_rdft2_pad fftwf_rdft2_rank0_register fftwf_rdft2_rank_geq2_register fftwf_rdft2_rdft_register fftwf_rdft2_solve fftwf_rdft2_strides fftwf_rdft2_tensor_max_index fftwf_rdft2_thr_vrank_geq1_register fftwf_rdft2_vrank_geq1_register fftwf_rdft_buffered_register fftwf_rdft_conf_standard fftwf_rdft_dht_register fftwf_rdft_generic_register fftwf_rdft_indirect_register fftwf_rdft_kind_str fftwf_rdft_nop_register fftwf_rdft_rank0_register fftwf_rdft_rank_geq2_register fftwf_rdft_solve fftwf_rdft_thr_vrank_geq1_register fftwf_rdft_vrank3_transpose_register fftwf_rdft_vrank_geq1_register fftwf_rdft_zerotens fftwf_redft00e_r2hc_pad_register fftwf_regsolver_ct_directw fftwf_regsolver_ct_directwsq fftwf_regsolver_hc2c_direct fftwf_regsolver_hc2hc_direct fftwf_reodft00e_splitradix_register fftwf_reodft010e_r2hc_register fftwf_reodft11e_r2hc_odd_register fftwf_reodft11e_radix2_r2hc_register fftwf_reodft_conf_standard fftwf_rodft00e_r2hc_pad_register fftwf_safe_mulmod fftwf_scanner_destroy fftwf_set_timelimit fftwf_solver_destroy fftwf_solver_register fftwf_solver_use fftwf_solvtab_exec fftwf_spawn_loop fftwf_sprint_plan fftwf_stride_destroy fftwf_taint fftwf_tensor_append fftwf_tensor_compress fftwf_tensor_compress_contiguous fftwf_tensor_copy fftwf_tensor_copy_except fftwf_tensor_copy_inplace fftwf_tensor_copy_sub fftwf_tensor_destroy fftwf_tensor_destroy2 fftwf_tensor_destroy4 fftwf_tensor_equal fftwf_tensor_inplace_locations fftwf_tensor_inplace_strides fftwf_tensor_inplace_strides2 fftwf_tensor_kosherp fftwf_tensor_max_index fftwf_tensor_md5 fftwf_tensor_min_istride fftwf_tensor_min_ostride fftwf_tensor_min_stride fftwf_tensor_print fftwf_tensor_split fftwf_tensor_strides_decrease fftwf_tensor_sz fftwf_tensor_tornk1 fftwf_the_planner fftwf_threads_cleanup fftwf_threads_conf_standard fftwf_tile2d fftwf_toobig fftwf_transpose fftwf_transpose_tiled fftwf_transpose_tiledbuf fftwf_triggen_destroy fftwf_twiddle_awake fftwf_twiddle_length sfftw_cleanup_ sfftw_cleanup__ sfftw_cleanup_threads_ sfftw_cleanup_threads__ sfftw_cost_ sfftw_cost__ sfftw_destroy_plan_ sfftw_destroy_plan__ sfftw_estimate_cost_ sfftw_estimate_cost__ sfftw_execute_ sfftw_execute__ sfftw_execute_dft_ sfftw_execute_dft__ sfftw_execute_dft_c2r_ sfftw_execute_dft_c2r__ sfftw_execute_dft_r2c_ sfftw_execute_dft_r2c__ sfftw_execute_r2r_ sfftw_execute_r2r__ sfftw_execute_split_dft_ sfftw_execute_split_dft__ sfftw_execute_split_dft_c2r_ sfftw_execute_split_dft_c2r__ sfftw_execute_split_dft_r2c_ sfftw_execute_split_dft_r2c__ sfftw_export_wisdom_ sfftw_export_wisdom__ sfftw_flops_ sfftw_flops__ sfftw_forget_wisdom_ sfftw_forget_wisdom__ sfftw_import_system_wisdom_ sfftw_import_system_wisdom__ sfftw_import_wisdom_ sfftw_import_wisdom__ sfftw_init_threads_ sfftw_init_threads__ sfftw_plan_dft_ sfftw_plan_dft_1d_ sfftw_plan_dft_1d__ sfftw_plan_dft_2d_ sfftw_plan_dft_2d__ sfftw_plan_dft_3d_ sfftw_plan_dft_3d__ sfftw_plan_dft__ sfftw_plan_dft_c2r_ sfftw_plan_dft_c2r_1d_ sfftw_plan_dft_c2r_1d__ sfftw_plan_dft_c2r_2d_ sfftw_plan_dft_c2r_2d__ sfftw_plan_dft_c2r_3d_ sfftw_plan_dft_c2r_3d__ sfftw_plan_dft_c2r__ sfftw_plan_dft_r2c_ sfftw_plan_dft_r2c_1d_ sfftw_plan_dft_r2c_1d__ sfftw_plan_dft_r2c_2d_ sfftw_plan_dft_r2c_2d__ sfftw_plan_dft_r2c_3d_ sfftw_plan_dft_r2c_3d__ sfftw_plan_dft_r2c__ sfftw_plan_guru_dft_ sfftw_plan_guru_dft__ sfftw_plan_guru_dft_c2r_ sfftw_plan_guru_dft_c2r__ sfftw_plan_guru_dft_r2c_ sfftw_plan_guru_dft_r2c__ sfftw_plan_guru_r2r_ sfftw_plan_guru_r2r__ sfftw_plan_guru_split_dft_ sfftw_plan_guru_split_dft__ sfftw_plan_guru_split_dft_c2r_ sfftw_plan_guru_split_dft_c2r__ sfftw_plan_guru_split_dft_r2c_ sfftw_plan_guru_split_dft_r2c__ sfftw_plan_many_dft_ sfftw_plan_many_dft__ sfftw_plan_many_dft_c2r_ sfftw_plan_many_dft_c2r__ sfftw_plan_many_dft_r2c_ sfftw_plan_many_dft_r2c__ sfftw_plan_many_r2r_ sfftw_plan_many_r2r__ sfftw_plan_r2r_ sfftw_plan_r2r_1d_ sfftw_plan_r2r_1d__ sfftw_plan_r2r_2d_ sfftw_plan_r2r_2d__ sfftw_plan_r2r_3d_ sfftw_plan_r2r_3d__ sfftw_plan_r2r__ sfftw_plan_with_nthreads_ sfftw_plan_with_nthreads__ sfftw_print_plan_ sfftw_print_plan__ sfftw_set_timelimit_ sfftw_set_timelimit__ ================================================ FILE: OptolithiumC/libs/fftw3-win32/libfftw3l-3.def ================================================ LIBRARY libfftw3l-3.dll EXPORTS fftwl_alignment_of fftwl_alloc_complex fftwl_alloc_real fftwl_assertion_failed fftwl_bufdist fftwl_choose_radix fftwl_cleanup fftwl_cleanup_threads fftwl_codelet_e01_8 fftwl_codelet_e10_8 fftwl_codelet_hb2_16 fftwl_codelet_hb2_20 fftwl_codelet_hb2_25 fftwl_codelet_hb2_32 fftwl_codelet_hb2_4 fftwl_codelet_hb2_5 fftwl_codelet_hb2_8 fftwl_codelet_hb_10 fftwl_codelet_hb_12 fftwl_codelet_hb_15 fftwl_codelet_hb_16 fftwl_codelet_hb_2 fftwl_codelet_hb_20 fftwl_codelet_hb_25 fftwl_codelet_hb_3 fftwl_codelet_hb_32 fftwl_codelet_hb_4 fftwl_codelet_hb_5 fftwl_codelet_hb_6 fftwl_codelet_hb_64 fftwl_codelet_hb_7 fftwl_codelet_hb_8 fftwl_codelet_hb_9 fftwl_codelet_hc2cb2_16 fftwl_codelet_hc2cb2_20 fftwl_codelet_hc2cb2_32 fftwl_codelet_hc2cb2_4 fftwl_codelet_hc2cb2_8 fftwl_codelet_hc2cb_10 fftwl_codelet_hc2cb_12 fftwl_codelet_hc2cb_16 fftwl_codelet_hc2cb_2 fftwl_codelet_hc2cb_20 fftwl_codelet_hc2cb_32 fftwl_codelet_hc2cb_4 fftwl_codelet_hc2cb_6 fftwl_codelet_hc2cb_8 fftwl_codelet_hc2cbdft2_16 fftwl_codelet_hc2cbdft2_20 fftwl_codelet_hc2cbdft2_32 fftwl_codelet_hc2cbdft2_4 fftwl_codelet_hc2cbdft2_8 fftwl_codelet_hc2cbdft_10 fftwl_codelet_hc2cbdft_12 fftwl_codelet_hc2cbdft_16 fftwl_codelet_hc2cbdft_2 fftwl_codelet_hc2cbdft_20 fftwl_codelet_hc2cbdft_32 fftwl_codelet_hc2cbdft_4 fftwl_codelet_hc2cbdft_6 fftwl_codelet_hc2cbdft_8 fftwl_codelet_hc2cf2_16 fftwl_codelet_hc2cf2_20 fftwl_codelet_hc2cf2_32 fftwl_codelet_hc2cf2_4 fftwl_codelet_hc2cf2_8 fftwl_codelet_hc2cf_10 fftwl_codelet_hc2cf_12 fftwl_codelet_hc2cf_16 fftwl_codelet_hc2cf_2 fftwl_codelet_hc2cf_20 fftwl_codelet_hc2cf_32 fftwl_codelet_hc2cf_4 fftwl_codelet_hc2cf_6 fftwl_codelet_hc2cf_8 fftwl_codelet_hc2cfdft2_16 fftwl_codelet_hc2cfdft2_20 fftwl_codelet_hc2cfdft2_32 fftwl_codelet_hc2cfdft2_4 fftwl_codelet_hc2cfdft2_8 fftwl_codelet_hc2cfdft_10 fftwl_codelet_hc2cfdft_12 fftwl_codelet_hc2cfdft_16 fftwl_codelet_hc2cfdft_2 fftwl_codelet_hc2cfdft_20 fftwl_codelet_hc2cfdft_32 fftwl_codelet_hc2cfdft_4 fftwl_codelet_hc2cfdft_6 fftwl_codelet_hc2cfdft_8 fftwl_codelet_hf2_16 fftwl_codelet_hf2_20 fftwl_codelet_hf2_25 fftwl_codelet_hf2_32 fftwl_codelet_hf2_4 fftwl_codelet_hf2_5 fftwl_codelet_hf2_8 fftwl_codelet_hf_10 fftwl_codelet_hf_12 fftwl_codelet_hf_15 fftwl_codelet_hf_16 fftwl_codelet_hf_2 fftwl_codelet_hf_20 fftwl_codelet_hf_25 fftwl_codelet_hf_3 fftwl_codelet_hf_32 fftwl_codelet_hf_4 fftwl_codelet_hf_5 fftwl_codelet_hf_6 fftwl_codelet_hf_64 fftwl_codelet_hf_7 fftwl_codelet_hf_8 fftwl_codelet_hf_9 fftwl_codelet_n1_10 fftwl_codelet_n1_11 fftwl_codelet_n1_12 fftwl_codelet_n1_13 fftwl_codelet_n1_14 fftwl_codelet_n1_15 fftwl_codelet_n1_16 fftwl_codelet_n1_2 fftwl_codelet_n1_20 fftwl_codelet_n1_25 fftwl_codelet_n1_3 fftwl_codelet_n1_32 fftwl_codelet_n1_4 fftwl_codelet_n1_5 fftwl_codelet_n1_6 fftwl_codelet_n1_64 fftwl_codelet_n1_7 fftwl_codelet_n1_8 fftwl_codelet_n1_9 fftwl_codelet_q1_2 fftwl_codelet_q1_3 fftwl_codelet_q1_4 fftwl_codelet_q1_5 fftwl_codelet_q1_6 fftwl_codelet_q1_8 fftwl_codelet_r2cbIII_10 fftwl_codelet_r2cbIII_12 fftwl_codelet_r2cbIII_15 fftwl_codelet_r2cbIII_16 fftwl_codelet_r2cbIII_2 fftwl_codelet_r2cbIII_20 fftwl_codelet_r2cbIII_25 fftwl_codelet_r2cbIII_3 fftwl_codelet_r2cbIII_32 fftwl_codelet_r2cbIII_4 fftwl_codelet_r2cbIII_5 fftwl_codelet_r2cbIII_6 fftwl_codelet_r2cbIII_64 fftwl_codelet_r2cbIII_7 fftwl_codelet_r2cbIII_8 fftwl_codelet_r2cbIII_9 fftwl_codelet_r2cb_10 fftwl_codelet_r2cb_11 fftwl_codelet_r2cb_12 fftwl_codelet_r2cb_128 fftwl_codelet_r2cb_13 fftwl_codelet_r2cb_14 fftwl_codelet_r2cb_15 fftwl_codelet_r2cb_16 fftwl_codelet_r2cb_2 fftwl_codelet_r2cb_20 fftwl_codelet_r2cb_25 fftwl_codelet_r2cb_3 fftwl_codelet_r2cb_32 fftwl_codelet_r2cb_4 fftwl_codelet_r2cb_5 fftwl_codelet_r2cb_6 fftwl_codelet_r2cb_64 fftwl_codelet_r2cb_7 fftwl_codelet_r2cb_8 fftwl_codelet_r2cb_9 fftwl_codelet_r2cfII_10 fftwl_codelet_r2cfII_12 fftwl_codelet_r2cfII_15 fftwl_codelet_r2cfII_16 fftwl_codelet_r2cfII_2 fftwl_codelet_r2cfII_20 fftwl_codelet_r2cfII_25 fftwl_codelet_r2cfII_3 fftwl_codelet_r2cfII_32 fftwl_codelet_r2cfII_4 fftwl_codelet_r2cfII_5 fftwl_codelet_r2cfII_6 fftwl_codelet_r2cfII_64 fftwl_codelet_r2cfII_7 fftwl_codelet_r2cfII_8 fftwl_codelet_r2cfII_9 fftwl_codelet_r2cf_10 fftwl_codelet_r2cf_11 fftwl_codelet_r2cf_12 fftwl_codelet_r2cf_128 fftwl_codelet_r2cf_13 fftwl_codelet_r2cf_14 fftwl_codelet_r2cf_15 fftwl_codelet_r2cf_16 fftwl_codelet_r2cf_2 fftwl_codelet_r2cf_20 fftwl_codelet_r2cf_25 fftwl_codelet_r2cf_3 fftwl_codelet_r2cf_32 fftwl_codelet_r2cf_4 fftwl_codelet_r2cf_5 fftwl_codelet_r2cf_6 fftwl_codelet_r2cf_64 fftwl_codelet_r2cf_7 fftwl_codelet_r2cf_8 fftwl_codelet_r2cf_9 fftwl_codelet_t1_10 fftwl_codelet_t1_12 fftwl_codelet_t1_15 fftwl_codelet_t1_16 fftwl_codelet_t1_2 fftwl_codelet_t1_20 fftwl_codelet_t1_25 fftwl_codelet_t1_3 fftwl_codelet_t1_32 fftwl_codelet_t1_4 fftwl_codelet_t1_5 fftwl_codelet_t1_6 fftwl_codelet_t1_64 fftwl_codelet_t1_7 fftwl_codelet_t1_8 fftwl_codelet_t1_9 fftwl_codelet_t2_10 fftwl_codelet_t2_16 fftwl_codelet_t2_20 fftwl_codelet_t2_25 fftwl_codelet_t2_32 fftwl_codelet_t2_4 fftwl_codelet_t2_5 fftwl_codelet_t2_64 fftwl_codelet_t2_8 fftwl_compute_tilesz fftwl_configure_planner fftwl_cost fftwl_cpy1d fftwl_cpy2d fftwl_cpy2d_ci fftwl_cpy2d_co fftwl_cpy2d_pair fftwl_cpy2d_pair_ci fftwl_cpy2d_pair_co fftwl_cpy2d_tiled fftwl_cpy2d_tiledbuf fftwl_ct_applicable fftwl_ct_generic_register fftwl_ct_genericbuf_register fftwl_ct_uglyp fftwl_destroy_plan fftwl_dft_bluestein_register fftwl_dft_buffered_register fftwl_dft_conf_standard fftwl_dft_generic_register fftwl_dft_indirect_register fftwl_dft_indirect_transpose_register fftwl_dft_nop_register fftwl_dft_r2hc_register fftwl_dft_rader_register fftwl_dft_rank_geq2_register fftwl_dft_solve fftwl_dft_thr_vrank_geq1_register fftwl_dft_vrank_geq1_register fftwl_dft_zerotens fftwl_dht_r2hc_register fftwl_dht_rader_register fftwl_dimcmp fftwl_elapsed_since fftwl_estimate_cost fftwl_execute fftwl_execute_dft fftwl_execute_dft_c2r fftwl_execute_dft_r2c fftwl_execute_r2r fftwl_execute_split_dft fftwl_execute_split_dft_c2r fftwl_execute_split_dft_r2c fftwl_export_wisdom fftwl_export_wisdom_to_file fftwl_export_wisdom_to_filename fftwl_export_wisdom_to_string fftwl_extract_reim fftwl_factors_into fftwl_factors_into_small_primes fftwl_find_generator fftwl_first_divisor fftwl_flops fftwl_forget_wisdom fftwl_fprint_plan fftwl_free fftwl_get_crude_time fftwl_guru64_kosherp fftwl_guru_kosherp fftwl_hash fftwl_hc2c_applicable fftwl_hc2hc_applicable fftwl_hc2hc_generic_register fftwl_iabs fftwl_iestimate_cost fftwl_ifree fftwl_ifree0 fftwl_imax fftwl_imin fftwl_import_system_wisdom fftwl_import_wisdom fftwl_import_wisdom_from_file fftwl_import_wisdom_from_filename fftwl_import_wisdom_from_string fftwl_init_threads fftwl_is_prime fftwl_isqrt fftwl_ithreads_init fftwl_kdft_dif_register fftwl_kdft_difsq_register fftwl_kdft_dit_register fftwl_kdft_register fftwl_kernel_free fftwl_kernel_malloc fftwl_khc2c_register fftwl_khc2hc_register fftwl_kr2c_register fftwl_kr2r_register fftwl_malloc fftwl_malloc_plain fftwl_many_kosherp fftwl_map_r2r_kind fftwl_mapflags fftwl_md5INT fftwl_md5begin fftwl_md5end fftwl_md5int fftwl_md5putb fftwl_md5putc fftwl_md5puts fftwl_md5unsigned fftwl_measure_execution_time fftwl_mkapiplan fftwl_mkplan fftwl_mkplan_d fftwl_mkplan_dft fftwl_mkplan_dftw fftwl_mkplan_f_d fftwl_mkplan_hc2c fftwl_mkplan_hc2hc fftwl_mkplan_rdft fftwl_mkplan_rdft2 fftwl_mkplanner fftwl_mkprinter fftwl_mkprinter_cnt fftwl_mkprinter_file fftwl_mkprinter_str fftwl_mkproblem fftwl_mkproblem_dft fftwl_mkproblem_dft_d fftwl_mkproblem_rdft fftwl_mkproblem_rdft2 fftwl_mkproblem_rdft2_d fftwl_mkproblem_rdft2_d_3pointers fftwl_mkproblem_rdft_0_d fftwl_mkproblem_rdft_1 fftwl_mkproblem_rdft_1_d fftwl_mkproblem_rdft_d fftwl_mkproblem_unsolvable fftwl_mkscanner fftwl_mksolver fftwl_mksolver_ct fftwl_mksolver_ct_threads fftwl_mksolver_dft_direct fftwl_mksolver_dft_directbuf fftwl_mksolver_hc2c fftwl_mksolver_hc2hc fftwl_mksolver_hc2hc_threads fftwl_mksolver_rdft2_direct fftwl_mksolver_rdft_r2c_direct fftwl_mksolver_rdft_r2c_directbuf fftwl_mksolver_rdft_r2r_direct fftwl_mktensor fftwl_mktensor_0d fftwl_mktensor_1d fftwl_mktensor_2d fftwl_mktensor_3d fftwl_mktensor_4d fftwl_mktensor_5d fftwl_mktensor_iodims fftwl_mktensor_iodims64 fftwl_mktensor_rowmajor fftwl_mktriggen fftwl_modulo fftwl_nbuf fftwl_nbuf_redundant fftwl_next_prime fftwl_null_awake fftwl_ops_add fftwl_ops_add2 fftwl_ops_cpy fftwl_ops_madd fftwl_ops_madd2 fftwl_ops_other fftwl_ops_zero fftwl_pickdim fftwl_plan_awake fftwl_plan_destroy_internal fftwl_plan_dft fftwl_plan_dft_1d fftwl_plan_dft_2d fftwl_plan_dft_3d fftwl_plan_dft_c2r fftwl_plan_dft_c2r_1d fftwl_plan_dft_c2r_2d fftwl_plan_dft_c2r_3d fftwl_plan_dft_r2c fftwl_plan_dft_r2c_1d fftwl_plan_dft_r2c_2d fftwl_plan_dft_r2c_3d fftwl_plan_guru64_dft fftwl_plan_guru64_dft_c2r fftwl_plan_guru64_dft_r2c fftwl_plan_guru64_r2r fftwl_plan_guru64_split_dft fftwl_plan_guru64_split_dft_c2r fftwl_plan_guru64_split_dft_r2c fftwl_plan_guru_dft fftwl_plan_guru_dft_c2r fftwl_plan_guru_dft_r2c fftwl_plan_guru_r2r fftwl_plan_guru_split_dft fftwl_plan_guru_split_dft_c2r fftwl_plan_guru_split_dft_r2c fftwl_plan_many_dft fftwl_plan_many_dft_c2r fftwl_plan_many_dft_r2c fftwl_plan_many_r2r fftwl_plan_null_destroy fftwl_plan_r2r fftwl_plan_r2r_1d fftwl_plan_r2r_2d fftwl_plan_r2r_3d fftwl_plan_with_nthreads fftwl_planner_destroy fftwl_power_mod fftwl_print_plan fftwl_printer_destroy fftwl_problem_destroy fftwl_rader_tl_delete fftwl_rader_tl_find fftwl_rader_tl_insert fftwl_rdft2_buffered_register fftwl_rdft2_complex_n fftwl_rdft2_inplace_strides fftwl_rdft2_nop_register fftwl_rdft2_pad fftwl_rdft2_rank0_register fftwl_rdft2_rank_geq2_register fftwl_rdft2_rdft_register fftwl_rdft2_solve fftwl_rdft2_strides fftwl_rdft2_tensor_max_index fftwl_rdft2_thr_vrank_geq1_register fftwl_rdft2_vrank_geq1_register fftwl_rdft_buffered_register fftwl_rdft_conf_standard fftwl_rdft_dht_register fftwl_rdft_generic_register fftwl_rdft_indirect_register fftwl_rdft_kind_str fftwl_rdft_nop_register fftwl_rdft_rank0_register fftwl_rdft_rank_geq2_register fftwl_rdft_solve fftwl_rdft_thr_vrank_geq1_register fftwl_rdft_vrank3_transpose_register fftwl_rdft_vrank_geq1_register fftwl_rdft_zerotens fftwl_redft00e_r2hc_pad_register fftwl_regsolver_ct_directw fftwl_regsolver_ct_directwsq fftwl_regsolver_hc2c_direct fftwl_regsolver_hc2hc_direct fftwl_reodft00e_splitradix_register fftwl_reodft010e_r2hc_register fftwl_reodft11e_r2hc_odd_register fftwl_reodft11e_radix2_r2hc_register fftwl_reodft_conf_standard fftwl_rodft00e_r2hc_pad_register fftwl_safe_mulmod fftwl_scanner_destroy fftwl_set_timelimit fftwl_solver_destroy fftwl_solver_register fftwl_solver_use fftwl_solvtab_exec fftwl_spawn_loop fftwl_sprint_plan fftwl_tensor_append fftwl_tensor_compress fftwl_tensor_compress_contiguous fftwl_tensor_copy fftwl_tensor_copy_except fftwl_tensor_copy_inplace fftwl_tensor_copy_sub fftwl_tensor_destroy fftwl_tensor_destroy2 fftwl_tensor_destroy4 fftwl_tensor_equal fftwl_tensor_inplace_locations fftwl_tensor_inplace_strides fftwl_tensor_inplace_strides2 fftwl_tensor_kosherp fftwl_tensor_max_index fftwl_tensor_md5 fftwl_tensor_min_istride fftwl_tensor_min_ostride fftwl_tensor_min_stride fftwl_tensor_print fftwl_tensor_split fftwl_tensor_strides_decrease fftwl_tensor_sz fftwl_tensor_tornk1 fftwl_the_planner fftwl_threads_cleanup fftwl_threads_conf_standard fftwl_tile2d fftwl_toobig fftwl_transpose fftwl_transpose_tiled fftwl_transpose_tiledbuf fftwl_triggen_destroy fftwl_twiddle_awake fftwl_twiddle_length lfftw_cleanup_ lfftw_cleanup__ lfftw_cleanup_threads_ lfftw_cleanup_threads__ lfftw_cost_ lfftw_cost__ lfftw_destroy_plan_ lfftw_destroy_plan__ lfftw_estimate_cost_ lfftw_estimate_cost__ lfftw_execute_ lfftw_execute__ lfftw_execute_dft_ lfftw_execute_dft__ lfftw_execute_dft_c2r_ lfftw_execute_dft_c2r__ lfftw_execute_dft_r2c_ lfftw_execute_dft_r2c__ lfftw_execute_r2r_ lfftw_execute_r2r__ lfftw_execute_split_dft_ lfftw_execute_split_dft__ lfftw_execute_split_dft_c2r_ lfftw_execute_split_dft_c2r__ lfftw_execute_split_dft_r2c_ lfftw_execute_split_dft_r2c__ lfftw_export_wisdom_ lfftw_export_wisdom__ lfftw_flops_ lfftw_flops__ lfftw_forget_wisdom_ lfftw_forget_wisdom__ lfftw_import_system_wisdom_ lfftw_import_system_wisdom__ lfftw_import_wisdom_ lfftw_import_wisdom__ lfftw_init_threads_ lfftw_init_threads__ lfftw_plan_dft_ lfftw_plan_dft_1d_ lfftw_plan_dft_1d__ lfftw_plan_dft_2d_ lfftw_plan_dft_2d__ lfftw_plan_dft_3d_ lfftw_plan_dft_3d__ lfftw_plan_dft__ lfftw_plan_dft_c2r_ lfftw_plan_dft_c2r_1d_ lfftw_plan_dft_c2r_1d__ lfftw_plan_dft_c2r_2d_ lfftw_plan_dft_c2r_2d__ lfftw_plan_dft_c2r_3d_ lfftw_plan_dft_c2r_3d__ lfftw_plan_dft_c2r__ lfftw_plan_dft_r2c_ lfftw_plan_dft_r2c_1d_ lfftw_plan_dft_r2c_1d__ lfftw_plan_dft_r2c_2d_ lfftw_plan_dft_r2c_2d__ lfftw_plan_dft_r2c_3d_ lfftw_plan_dft_r2c_3d__ lfftw_plan_dft_r2c__ lfftw_plan_guru_dft_ lfftw_plan_guru_dft__ lfftw_plan_guru_dft_c2r_ lfftw_plan_guru_dft_c2r__ lfftw_plan_guru_dft_r2c_ lfftw_plan_guru_dft_r2c__ lfftw_plan_guru_r2r_ lfftw_plan_guru_r2r__ lfftw_plan_guru_split_dft_ lfftw_plan_guru_split_dft__ lfftw_plan_guru_split_dft_c2r_ lfftw_plan_guru_split_dft_c2r__ lfftw_plan_guru_split_dft_r2c_ lfftw_plan_guru_split_dft_r2c__ lfftw_plan_many_dft_ lfftw_plan_many_dft__ lfftw_plan_many_dft_c2r_ lfftw_plan_many_dft_c2r__ lfftw_plan_many_dft_r2c_ lfftw_plan_many_dft_r2c__ lfftw_plan_many_r2r_ lfftw_plan_many_r2r__ lfftw_plan_r2r_ lfftw_plan_r2r_1d_ lfftw_plan_r2r_1d__ lfftw_plan_r2r_2d_ lfftw_plan_r2r_2d__ lfftw_plan_r2r_3d_ lfftw_plan_r2r_3d__ lfftw_plan_r2r__ lfftw_plan_with_nthreads_ lfftw_plan_with_nthreads__ lfftw_print_plan_ lfftw_print_plan__ lfftw_set_timelimit_ lfftw_set_timelimit__ ================================================ FILE: OptolithiumC/libs/fourier/CMakeLists.txt ================================================ CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0) PROJECT(fourier) SET(CMAKE_USE_RELATIVE_PATHS ON) SET(CMAKE_SKIP_RPATH TRUE) SET(CMAKE_BUILD_TYPE "Release") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Ofast -fmerge-all-constants -funroll-loops") # SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fassociative-math -ffinite-math-only -freciprocal-math" ) INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/include") ADD_LIBRARY(fourier STATIC "src/fourier.c" "src/primes.c") FIND_PACKAGE(FFTW REQUIRED) INCLUDE_DIRECTORIES("${FFTW_INCLUDES}") ADD_EXECUTABLE(check "src/check.c") TARGET_LINK_LIBRARIES(check ${FFTW_LIBRARIES}) TARGET_LINK_LIBRARIES(check fourier) ================================================ FILE: OptolithiumC/libs/fourier/include/basics.h ================================================ /* * Fourier Transform library for Optolithium lithography modelling software * * Copyright (C) 2015 Alexei Gladkikh * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that * the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the names of the copyright holders nor the names of any * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, ORCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #ifndef BASICS_H_ #define BASICS_H_ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include "fourier.h" #define FORCE_INLINE __attribute__((always_inline)) #if FOURIER_LOG_VERBOSE_LEVEL <= 50 extern unsigned int RECURSION_DEPTH; #define INCREASE_RECURSION_DEPTH() RECURSION_DEPTH++; #define DECREASE_RECURSION_DEPTH() \ if (FOURIER_LOG_VERBOSE_LEVEL <= 50) { \ FOURIER_LOG(50, "<--- Recursion depth: %d", RECURSION_DEPTH); \ RECURSION_DEPTH--; \ } static inline void _print_log_recursion_tabs(void) { unsigned int k = 0; if (RECURSION_DEPTH > 0) { for (k = 0; k < RECURSION_DEPTH-1; k++) { fprintf(stdout, "\t"); } } } #else // When heavy logging disabled then remove recursion depth follow for multithreading extern unsigned int RECURSION_DEPTH; #define INCREASE_RECURSION_DEPTH() #define DECREASE_RECURSION_DEPTH() static inline void _print_log_recursion_tabs(void) { } #endif static char *ECHO_NAME_MAP[] = {"DEBUG", "VERBOSE", "CRITICAL"}; #define FOURIER_ASSERT(condition, level, message, ...) \ /* This code will be optimized out if current level unsatisfied */ \ if (level >= FOURIER_ASSERT_VERBOSE_LEVEL) { \ if (!(condition)) { \ fflush(stdout); \ fprintf(stderr, "[%s] Fourier library assertion in [%s:%4d]:\n\t"message, \ ECHO_NAME_MAP[level], __func__, __LINE__, ##__VA_ARGS__); \ exit(-1); \ } \ } #define FOURIER_LOG(level, message, ...) \ /* This code will be optimized out if current level unsatisfied */ \ if (level >= FOURIER_LOG_VERBOSE_LEVEL) { \ fprintf(stdout, "[%2d] Fourier log [%18s:%4d]: ", level, __func__, __LINE__); \ _print_log_recursion_tabs(); \ fprintf(stdout, message"\n", ##__VA_ARGS__); \ fflush(stdout); \ } #if FOURIER_LOG_VERBOSE_LEVEL <= 50 #define INCREASE_CALCULATED_TWIDDLES(_plan) _plan->calculated_twiddles++; #define INIT_CALCULATED_TWIDDLES(_plan) _plan->calculated_twiddles = 0; #define PRINT_CALCULATED_TWIDDLES(_plan) \ FOURIER_LOG(50, "Total calculated twiddles = %d", plan->calculated_twiddles); #else #define INCREASE_CALCULATED_TWIDDLES(_plan) #define INIT_CALCULATED_TWIDDLES(_plan) #define PRINT_CALCULATED_TWIDDLES(_plan) #endif static FORCE_INLINE void* wmalloc(size_t n_bytes) { void* result = _mm_malloc(n_bytes, 16); if (FOURIER_LOG_VERBOSE_LEVEL >= 30) { memset(result, 0, n_bytes); } FOURIER_LOG(30, "Allocated %d bytes of memory at %p", (unsigned int) n_bytes, result); return result; } static FORCE_INLINE void wfree(void* ptr) { FOURIER_LOG(30, "Memory at pointer %p has been freed", ptr); _mm_free(ptr); } #define MALLOC(count, type) (type*) wmalloc(count*sizeof(type)) #define MEMCPY(dst, src, count, type) memcpy(dst, src, count*sizeof(type)) #define FREE(ptr) \ if (ptr != NULL) { \ wfree(ptr); \ ptr = NULL; \ } #define SWAP(type, v1, v2) \ { \ type tmp = v1; \ v1 = v2; \ v2 = tmp; \ } #define FOURIER_ALGORITHM_STD_ASSERTS(_level, _plan, _min_samples) \ FOURIER_ASSERT(_plan->count >= _min_samples, _level, \ "FFT algorithm implemented only for more than %d samples in the input sequence: %d\n", \ _min_samples, _plan->count); \ FOURIER_ASSERT(_plan->howMany > 0, _level, "Plan howMany must be greater than zero: %d\n", _plan->howMany); \ FOURIER_ASSERT(_plan->in != NULL, _level, "Plan input array must be allocated: %p\n", _plan->in); \ FOURIER_ASSERT(_plan->out != NULL, _level, "Plan output array must be allocated: %p\n", _plan->out); \ FOURIER_ASSERT(_plan->direction == FFT_LITHO_BACKWARD || _plan->direction == FFT_LITHO_FORWARD, \ FOURIER_ECHO_DEBUG, "Direction of FFT can be -1 or 1 but specified: %d\n", _plan->direction); #define FOURIER_ALGORITHM_STD_LOG(_level, _plan, _name) \ FOURIER_LOG(_level, "---> [%2d] FFT ALGORITHM: '"_name \ "' count=%d howMany=%d iodist=%d/%d iostride=%d/%d dir=%d", \ RECURSION_DEPTH, _plan->count, _plan->howMany, _plan->idist, _plan->odist, \ _plan->istride, _plan->ostride, _plan->direction); #define USE_FFT_SSE3 #ifdef USE_FFT_SSE3 static FORCE_INLINE fft_complex_t c_add(const fft_complex_t a, const fft_complex_t b) { __m128d x = _mm_load_pd(&a.r); __m128d y = _mm_load_pd(&b.r); __m128d z = _mm_add_pd(x, y); fft_complex_t result; _mm_store_pd((double *)&result, z); return result; } #else static FORCE_INLINE fft_complex_t c_add(const fft_complex_t a, const fft_complex_t b) { fft_complex_t result = { .r = a.r + b.r, .i = a.i + b.i }; return result; } #endif #ifdef USE_FFT_SSE3 static FORCE_INLINE fft_complex_t c_sub(const fft_complex_t a, const fft_complex_t b) { __m128d x = _mm_load_pd(&a.r); __m128d y = _mm_load_pd(&b.r); __m128d z = _mm_sub_pd(x, y); fft_complex_t result; _mm_store_pd((double *)&result, z); return result; } #else static FORCE_INLINE fft_complex_t c_sub(const fft_complex_t a, const fft_complex_t b) { fft_complex_t result = { .r = a.r - b.r, .i = a.i - b.i }; return result; } #endif #ifdef USE_FFT_SSE3 static FORCE_INLINE fft_complex_t c_mul(const fft_complex_t a, const fft_complex_t b) { // Duplicates lower vector element into upper vector element. // num1: [x.real, x.real] __m128d x = _mm_loaddup_pd(&a.r); // Move y elements into a vector // num2: [y.img, y.real] __m128d y = _mm_set_pd(b.i, b.r); // Multiplies vector elements // num3: [(x.real*y.img), (x.real*y.real)] __m128d z = _mm_mul_pd(y, x); // num1: [x.img, x.img] x = _mm_loaddup_pd(&a.i); // Swaps the vector elements // num2: [y.real, y.img] y = _mm_shuffle_pd(y, y, 1); // num2: [(x.img*y.real), (x.img*y.img)] y = _mm_mul_pd(y, x); // Adds upper vector element while subtracting lower vector element // num3: [((x.real *y.img)+(x.img*y.real)), // ((x.real*y.real)-(x.img*y.img))] z = _mm_addsub_pd(z, y); fft_complex_t result; _mm_store_pd((double *)&result, z); return result; } #else #define C_MUL_RE(a, b) a.r * b.r - a.i * b.i #define C_MUL_IM(a, b) a.r * b.i + a.i * b.r static FORCE_INLINE fft_complex_t c_mul(const fft_complex_t a, const fft_complex_t b) { fft_complex_t result = { .r = C_MUL_RE(a, b), .i = C_MUL_IM(a, b) }; return result; } #endif static FORCE_INLINE fft_complex_t* c_divbyv(fft_complex_t* a, const double v) { a->r /= v; a->i /= v; return a; } static FORCE_INLINE fft_complex_t c_divv(fft_complex_t a, const double v) { fft_complex_t result = { .r = a.r / v, .i = a.i / v }; return result; } static FORCE_INLINE fft_complex_t* c_addto(fft_complex_t *a, const fft_complex_t b) { a->r += b.r; a->i += b.i; return a; } static FORCE_INLINE fft_complex_t* c_subfrom(fft_complex_t *a, const fft_complex_t b) { a->r -= b.r; a->i -= b.i; return a; } static FORCE_INLINE fft_complex_t* c_mulby(fft_complex_t *a, const fft_complex_t b) { *a = c_mul(*a, b); return a; } static FORCE_INLINE fft_complex_t c_exp(fft_complex_t a) { fft_complex_t result = { .r = exp(a.r) * cos(a.i), .i = exp(a.r) * sin(a.i) }; return result; }; static FORCE_INLINE fft_complex_t c_expi(double imag) { fft_complex_t result = { .r = cos(imag), .i = sin(imag) }; return result; }; static FORCE_INLINE fft_complex_t c_rone(void) { fft_complex_t result = { .r = 1.0, .i = 0.0 }; return result; } static FORCE_INLINE fft_complex_t c_ione(void) { fft_complex_t result = { .r = 0.0, .i = 1.0 }; return result; } static FORCE_INLINE fft_complex_t c_zero(void) { fft_complex_t result = { .r = 0.0, .i = 0.0 }; return result; } static FORCE_INLINE fft_complex_t* c_clear(fft_complex_t* a) { a->r = 0.0; a->i = 0.0; return a; }; static FORCE_INLINE fft_complex_t c_neg(const fft_complex_t a) { fft_complex_t result = { .r = -a.r, .i = -a.i }; return result; }; static FORCE_INLINE fft_complex_t c_mulpj(const fft_complex_t a) { fft_complex_t result = { .r = -a.i, .i = a.r }; return result; }; static FORCE_INLINE fft_complex_t c_mulnj(const fft_complex_t a) { fft_complex_t result = { .r = a.i, .i = -a.r }; return result; }; static FORCE_INLINE fft_complex_t c_mulj(const fft_complex_t a, const int sign) { FOURIER_ASSERT(sign > 0 || sign < 0, FOURIER_ECHO_DEBUG, "Sign must be > 0 or < 0"); return (sign < 0) ? c_mulpj(a) : c_mulnj(a); }; /* * WARNING: This function can't be inlined */ static FORCE_INLINE fft_complex_t* c_sumto(fft_complex_t* result, const unsigned int count, ...) { va_list args; va_start(args, count); unsigned int k = 0; for (k = 0; k < count; k++) { fft_complex_t value = va_arg(args, fft_complex_t); c_addto(result, value); } va_end(args); return result; } /* * WARNING: This function can't be inlined */ static FORCE_INLINE fft_complex_t c_sum(const unsigned int count, ...) { va_list args; va_start(args, count); fft_complex_t result = c_zero(); c_sumto(&result, count, args); va_end(args); return result; } static FORCE_INLINE fft_complex_t* ivp(const struct fft_plan_t* plan, unsigned int s, unsigned int k) { fft_complex_t* result = plan->in + s * plan->istride + k * plan->idist; FOURIER_ASSERT(s < plan->howMany, FOURIER_ECHO_DEBUG, "Signal number (s) must be lower than plan->howMany"); FOURIER_ASSERT(k < plan->count, FOURIER_ECHO_DEBUG, "Item number (k) must be lower than plan->count"); FOURIER_ASSERT(s == 0 || plan->istride != 0, FOURIER_ECHO_DEBUG, "s != 0 and plan->istride == 0: s = %d of %d with istride %d and k = %d of %d with idist %d", s, plan->howMany, plan->istride, k, plan->count, plan->idist); FOURIER_ASSERT(k == 0 || plan->idist != 0, FOURIER_ECHO_DEBUG, "k != 0 and plan->idist == 0: s = %d of %d with istride %d and k = %d of %d with idist %d", s, plan->howMany, plan->istride, k, plan->count, plan->idist); FOURIER_LOG(40, "s = %d of %d with istride %d and k = %d of %d with idist %d -> (%.4f, %.4f)", s, plan->howMany, plan->istride, k, plan->count, plan->idist, result->r, result->i); return result; } static FORCE_INLINE fft_complex_t iv(const struct fft_plan_t* plan, unsigned int s, unsigned int k) { return *ivp(plan, s, k); } static FORCE_INLINE fft_complex_t* ovp(const struct fft_plan_t* plan, unsigned int s, unsigned int k) { fft_complex_t* result = plan->out + s * plan->ostride + k * plan->odist; FOURIER_ASSERT(s < plan->howMany, FOURIER_ECHO_DEBUG, "Signal number (s) must be lower than plan->howMany"); FOURIER_ASSERT(k < plan->count, FOURIER_ECHO_DEBUG, "Item number (k) must be lower than plan->count"); FOURIER_ASSERT(s == 0 || plan->ostride != 0, FOURIER_ECHO_DEBUG, "s != 0 and plan->istride == 0: s = %d of %d with ostride %d and k = %d of %d with odist %d", s, plan->howMany, plan->ostride, k, plan->count, plan->odist); FOURIER_ASSERT(k == 0 || plan->odist != 0, FOURIER_ECHO_DEBUG, "k != 0 and plan->idist == 0: s = %d of %d with ostride %d and k = %d of %d with odist %d", s, plan->howMany, plan->ostride, k, plan->count, plan->odist); FOURIER_LOG(40, "s = %d of %d with ostride %d and k = %d of %d with odist %d -> (%.4f, %.4f)", s, plan->howMany, plan->ostride, k, plan->count, plan->odist, result->r, result->i); return result; } static FORCE_INLINE fft_complex_t ov(const struct fft_plan_t* plan, unsigned int s, unsigned int k) { return *ovp(plan, s, k); } // Normalize array if backward transform (according to Matlab) #if FOURIER_NORMALIZATION_TYPE != FOURIER_DISABLE_NORMALIZATION #define FOURIER_NORMALIZE(_plan, _s, _k) \ if (_plan->direction == FOURIER_NORMALIZATION_TYPE) { \ for (_k = 0; _k < _plan->count; _k++) { \ c_divbyv(ovp(_plan, _s, _k), _plan->count); \ } \ } #else #define FOURIER_NORMALIZE(_plan, _s, _k) #endif // This macros should be used for "manual" implementation of FFT for some samples count // routine that specified in fft_handlers array. Each function that included in fft_handlers // should be started with FFT_IMPLEMENTATION_BEGIN macro and finished with // FFT_IMPLEMENTATION_END macro. In this macros defined next variables that required to // implement FFT: // complex iv[] - array of input values // complex *ovp[] - array of pointers to output values // complex w[] - array of twiddles, w[1] = twiddle(1,N) // Between this macros code for calculation each output value of FFT should be placed. // Begin and end macros calculate required twiddles factors, normalization (for backward // transform), input value (according to idist, istride, inext) and output values places. // !!! NOTE !!! Loop that used in the macros optimized by compiler to linear code execution. #define FFT_IMPLEMENTATION_BEGIN(_plan, _length) \ INCREASE_RECURSION_DEPTH(); \ FOURIER_ALGORITHM_STD_LOG(50, _plan, "Butterfly"); \ FOURIER_ALGORITHM_STD_ASSERTS(FOURIER_ECHO_DEBUG, _plan, _length) \ FOURIER_ASSERT(_plan->count == _length, FOURIER_ECHO_DEBUG, "Samples count must be equal to %d\n", _length); \ unsigned int k = 0, s = 0; \ const int len = _length; \ for (s = 0; s < _plan->howMany; s++) { \ #if FOURIER_NORMALIZATION_TYPE != FOURIER_DISABLE_NORMALIZATION #define FFT_IMPLEMENTATION_END(_plan) \ if (_plan->direction == FOURIER_NORMALIZATION_TYPE) { \ for (k = 0; k < len; k++) { \ c_divbyv(ovp(_plan,s,k), len); \ } \ } \ } \ DECREASE_RECURSION_DEPTH(); #else #define FFT_IMPLEMENTATION_END(_plan) } DECREASE_RECURSION_DEPTH(); #endif #define X(k) iv(plan, s, k) #ifdef __cplusplus } #endif #endif ================================================ FILE: OptolithiumC/libs/fourier/include/fourier.h ================================================ /* * Fourier Transform library for Optolithium lithography modelling software * * Copyright (C) 2015 Alexei Gladkikh * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that * the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the names of the copyright holders nor the names of any * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, ORCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #ifndef FOURIER_H_ #define FOURIER_H_ #ifdef __cplusplus extern "C" { #endif #define FOURIER_ASSERT_UNCONDITION 0 #define FOURIER_ECHO_DEBUG 0 #define FOURIER_ECHO_VERBOSE 1 #define FOURIER_ECHO_CRITICAL 2 #define FOURIER_ECHO_NONE 3 #define FFT_LITHO_FORWARD (-1) #define FFT_LITHO_BACKWARD (+1) #define FOURIER_DISABLE_NORMALIZATION 0 #define FOURIER_BACKWARD_NORMALIZATION FFT_LITHO_BACKWARD #define FOURIER_FORWARD_NORMALIZATION FFT_LITHO_FORWARD #ifndef FOURIER_LOG_VERBOSE_LEVEL #define FOURIER_LOG_VERBOSE_LEVEL 100 #endif #ifndef FOURIER_ASSERT_VERBOSE_LEVEL #define FOURIER_ASSERT_VERBOSE_LEVEL FOURIER_ECHO_NONE //#define FOURIER_ASSERT_VERBOSE_LEVEL FOURIER_ECHO_DEBUG #endif #ifndef FOURIER_NORMALIZATION_TYPE #define FOURIER_NORMALIZATION_TYPE FOURIER_DISABLE_NORMALIZATION //#define FOURIER_NORMALIZATION_TYPE FFT_LITHO_BACKWARD #endif #define MAX_PRIMES_COUNT 32 typedef struct { double r; double i; } fft_complex_t; void fftshift(fft_complex_t *data, unsigned int count); void ifftshift(fft_complex_t *data, unsigned int count); /* * result - Obtained primes of the number N * Note: Maximum number of element after factorization may occurred if number is only radix-2. * For 32-bit int value in this case obviously that maximum prime multipliers count is 32. * This value is also maximum multiplier count because for any other prime value number of * multiplier will be reduced. * return: Count of prime factors */ // TODO: Sieve of Eratosthenes int prime_factorize(int result[32], unsigned int N); int is_prime(unsigned int N); int is_power2(unsigned int x); // Twiddles cache structure definition #define MAX_TWIDDLES_CACHE_CHILDREN 3 struct _fft_twiddles_cache_t; typedef struct { int is_calculated; fft_complex_t value; } fft_cache_item_t; struct _fft_twiddles_cache_t { unsigned int count; fft_cache_item_t* data; struct _fft_twiddles_cache_t* children[MAX_TWIDDLES_CACHE_CHILDREN]; }; // FFT plan structure definition #define FFT_NO_FLAGS 0x00 #define FFT_USE_CACHE 0x01 #define FFT_USE_RADIX2_TABLE 0x02 struct fft_plan_t { unsigned int count; // Number of FFT samples unsigned int howMany; // Number of FFT transforms fft_complex_t* in; // Memory block of input array int idist; // Shift between samples for the same signal (for single normal FFT transform istride = 1) int istride; // Shift between samples for different signal (algorithm use it only if howMany > 1) int __unused _inext; // Used only if required to calculate only one harmonic for many signals and should // be set to shift between different signal (else equal to 0). // Option is used to calculate one frequency sample // for different input signal. For first frequency in[n] will be used, for // the second frequency in[count + n], etc. So result spectrum calculated // using in[k*count+n], where k - frequency number, n - input signal sample fft_complex_t* out; // Memory block of output array (memory must be preallocated) int ostride; // See istride. int odist; // See idist. int direction; // One of FFT_LITHO_FORWARD or FFT_LITHO_BACKWARD // Input sample address calculated as: in + k*inext + s*istride + k*idist // Output sample address calculated as: out + s*ostride + k*odist // where s - iterate to howMany, k - iterate to sample count fft_complex_t *tmpbuf; // Temporary buffer for in place transformation struct _fft_twiddles_cache_t** cache; unsigned int flags; // Multi-dimension extensions unsigned int total; // Total items for N-dimensions transformation unsigned int rank; // Number of independent dimensions unsigned int *dims; // Pointer to array with each dimension elements count // Performance debug #if FOURIER_LOG_VERBOSE_LEVEL <= 50 unsigned int calculated_twiddles; #endif }; typedef struct _fft_twiddles_cache_t fft_twiddles_cache_t; //void fft_radix_2(struct fft_plan_t* plan); //void fft_prime(struct fft_plan_t *plan); //void fft_mixed_radix(struct fft_plan_t *plan); // Initialize internal arrays for radix-2 transform. // This function perform at the first plan creation, // but it can be called at any point program before FFT used. void fft_initialize_radix_2(void); struct fft_plan_t* fft_plan_create_1d( unsigned int count, fft_complex_t* in, fft_complex_t* out, int direction, unsigned int flags); struct fft_plan_t* fft_plan_create_many_1d( unsigned int count, unsigned int howMany, fft_complex_t* in, fft_complex_t* out, int direction, unsigned int flags); struct fft_plan_t* fft_plan_create_2d( unsigned int n_rows, unsigned int n_cols, fft_complex_t* in, fft_complex_t* out, int direction, unsigned int flags); struct fft_plan_t* fft_plan_create_nd( unsigned int rank, unsigned int* dims, fft_complex_t* in, fft_complex_t* out, int direction, unsigned int flags); void fft_plan_destroy(struct fft_plan_t* state); void fft_execute_1d(struct fft_plan_t* plan); void fft_execute_2d(struct fft_plan_t* plan); void fft_execute_nd(struct fft_plan_t* plan); void fft_execute(struct fft_plan_t* plan); #ifdef __cplusplus } #endif #endif /* FOURIER_H_ */ ================================================ FILE: OptolithiumC/libs/fourier/include/primes.h ================================================ /* * Fourier Transform library for Optolithium lithography modelling software * * Copyright (C) 2015 Alexei Gladkikh * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that * the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the names of the copyright holders nor the names of any * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, ORCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #ifndef PRIMES_H_ #define PRIMES_H_ #ifdef __cplusplus extern "C" { #endif #include "basics.h" // Definition of the implemented FFT callback's type typedef void (*fft_handler_t)(struct fft_plan_t *); typedef struct { unsigned int count; fft_handler_t handler; } fft_handler_desc_t; extern const fft_handler_desc_t fft_handlers[]; extern const unsigned int FFT_IMPLEMENTED_RADIX_COUNT; #ifdef __cplusplus } #endif #endif ================================================ FILE: OptolithiumC/libs/fourier/src/check.c ================================================ /* * Benchmark and test the Fourier library for Optolithium software * * Copyright (C) 2015 Alexei Gladkikh * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ #include #include #include #include #include #include #define MEASURE_START() { \ struct timeval tval_before, tval_after, tval_result; \ gettimeofday(&tval_before, NULL); #define MEASURE_FINISH(result) \ gettimeofday(&tval_after, NULL); \ timersub(&tval_after, &tval_before, &tval_result); \ result = (double) (tval_result.tv_sec) + (double)(tval_result.tv_usec)/1.0E6; \ } #define FFT_DIRECTION FFT_LITHO_FORWARD //#define FFT_DIRECTION FFT_LITHO_BACKWARD #define N_START 1 #define N_STOP 1024 //#define N_STOP 5 #define HOW_MANY 128 #define ERROR_THRESHOLD 1.0 #define PRINT_EVERY_NTEST 512 #define USE_FFTW_ONE_EXECUTE //#define ONLY_POWER_OF_2 int main(int argc, char* argv[]) { unsigned int n_test, s = 0; double sum_coef = 0.0; double sum_fourier_time = 0.0; double sum_fftw_time = 0.0; unsigned int count = 0; unsigned int total_prime = 0; unsigned int total_radix2 = 0; unsigned int total_mixed = 0; double ft_rate = 0.0; double fftw_rate = 0.0; double mean_ft_rate = 0.0; double mean_fftw_rate = 0.0; double prime_time_fftw = 0.0; double radix2_time_fftw = 0.0; double mixed_time_fftw = 0.0; double prime_time_ft = 0.0; double radix2_time_ft = 0.0; double mixed_time_ft = 0.0; time_t current_time; time(¤t_time); srand((unsigned int) current_time); double fftw_time, fourier_time; fft_initialize_radix_2(); for (n_test = N_START; n_test <= N_STOP; n_test++) { #ifdef ONLY_POWER_OF_2 if (is_power2(n_test)) { #endif unsigned int total = HOW_MANY * n_test; fft_complex_t *in_buf = (fft_complex_t *) malloc(total * sizeof(fft_complex_t)); fft_complex_t *opl_buf = (fft_complex_t *) malloc(total * sizeof(fft_complex_t)); #ifdef USE_FFTW_ONE_EXECUTE fftw_complex *fftw_buf_in = (fftw_complex *) malloc(total * sizeof(fftw_complex)); fftw_complex *fftw_buf_out = (fftw_complex *) malloc(total * sizeof(fftw_complex)); for (s = 0; s < total; s++) { in_buf[s].r = opl_buf[s].r = fftw_buf_in[s][0] = (double) (rand() % 32768) / 512.0; in_buf[s].i = opl_buf[s].i = fftw_buf_in[s][1] = (double) (rand() % 32768) / 512.0; } #else fftw_complex *fftw_buf = (fftw_complex *) malloc(total * sizeof(fftw_complex)); for (s = 0; s < total; s++) { in_buf[s].r = opl_buf[s].r = fftw_buf[s][0] = (double) (rand() % 32768) / 512.0; in_buf[s].i = opl_buf[s].i = fftw_buf[s][1] = (double) (rand() % 32768) / 512.0; } #endif // for (s = 0; s < total; s++) { // in_buf[s].r = opl_buf[s].r = fftw_buf[s][0] = 10.0*(s+1); // in_buf[s].i = opl_buf[s].i = fftw_buf[s][1] = 4.0*(s+1); // } MEASURE_START() #ifdef USE_FFTW_ONE_EXECUTE int dims[1] = { n_test }; fftw_plan fftw_pln = fftw_plan_many_dft( 1, dims, HOW_MANY, fftw_buf_in, dims, 1, n_test, fftw_buf_out, dims, 1, n_test, FFT_DIRECTION, FFTW_ESTIMATE); fftw_execute(fftw_pln); #else fftw_complex *tmp = fftw_buf; unsigned int k = 0; for (k = 0; k < HOW_MANY; k++) { fftw_plan fftw_pln = fftw_plan_dft_1d(n_test, tmp, tmp, FFT_DIRECTION, FFTW_ESTIMATE); fftw_execute(fftw_pln); tmp += n_test; } #endif MEASURE_FINISH(fftw_time) MEASURE_START() // struct fft_plan_t* opl_plan = fft_plan_create_many_1d(n_test, HOW_MANY, opl_buf, opl_buf, FFT_DIRECTION, FFT_NO_FLAGS); // struct fft_plan_t* opl_plan = fft_plan_create_many_1d(n_test, HOW_MANY, opl_buf, opl_buf, FFT_DIRECTION, FFT_USE_RADIX2_TABLE); // struct fft_plan_t* opl_plan = fft_plan_create_many_1d(n_test, HOW_MANY, opl_buf, opl_buf, FFT_DIRECTION, FFT_USE_CACHE); struct fft_plan_t *opl_plan = fft_plan_create_many_1d( n_test, HOW_MANY, opl_buf, opl_buf, FFT_DIRECTION, FFT_USE_CACHE | FFT_USE_RADIX2_TABLE); fft_execute(opl_plan); MEASURE_FINISH(fourier_time) double std = 0.0, error = 0.0; for (s = 0; s < total; s++) { #ifdef USE_FFTW_ONE_EXECUTE double dr = fabs(opl_buf[s].r - fftw_buf_out[s][0]); double di = fabs(opl_buf[s].i - fftw_buf_out[s][1]); #else double dr = fabs(opl_buf[s].r - fftw_buf[s][0]); double di = fabs(opl_buf[s].i - fftw_buf[s][1]); #endif std += sqrt(dr * dr + di * di); } ft_rate += 5 * n_test * log2(n_test) / (fourier_time * 1E6 / (double) HOW_MANY); fftw_rate += 5 * n_test * log2(n_test) / (fftw_time * 1E6 / (double) HOW_MANY); mean_ft_rate += ft_rate; mean_fftw_rate += fftw_rate; fftw_time /= (double) HOW_MANY; fourier_time /= (double) HOW_MANY; std /= (double) (total); sum_fftw_time += fftw_time; sum_fourier_time += fourier_time; sum_coef += (fourier_time / fftw_time); count++; if (is_prime(n_test)) { prime_time_fftw += fftw_time; prime_time_ft += fourier_time; total_prime++; } else if (is_power2(n_test)) { radix2_time_fftw += fftw_time; radix2_time_ft += fourier_time; total_radix2++; } else { mixed_time_fftw += fftw_time; mixed_time_ft += fourier_time; total_mixed++; } #ifdef ONLY_POWER_OF_2 if (is_power2(n_test) || std > ERROR_THRESHOLD) { #else if (n_test % PRINT_EVERY_NTEST == 0 || std > ERROR_THRESHOLD) { #endif printf("---- [%6d] Results Fourier/FFTW -> cur: |%6d|%.6f|%.6f| = %7.2f total: |%.6f|%.6f| mean = %5.2f Rate: |%5.0f|%5.0f| ----\n", n_test, n_test, fourier_time, fftw_time, fourier_time / fftw_time, sum_fourier_time, sum_fftw_time, sum_coef / (double) count, ft_rate/(double)count, fftw_rate/(double)count); fflush(stdout); sum_fftw_time = 0; sum_fourier_time = 0; sum_coef = 0; count = 0; ft_rate = 0; fftw_rate = 0; } if (std > ERROR_THRESHOLD) { for (s = 0; s < total; s++) { #ifdef USE_FFTW_ONE_EXECUTE printf("values[%3d] = (%.3f, %.3fi) -> fftw = (%.3f, %.3fi) opl = (%.3f, %.3fi)\n", s, in_buf[s].r, in_buf[s].i, fftw_buf_out[s][0], fftw_buf_out[s][1], opl_buf[s].r, opl_buf[s].i); #else printf("values[%3d] = (%.3f, %.3fi) -> fftw = (%.3f, %.3fi) opl = (%.3f, %.3fi)\n", s, in_buf[s].r, in_buf[s].i, fftw_buf[s][0], fftw_buf[s][1], opl_buf[s].r, opl_buf[s].i); #endif } printf("ERROR: TEST WAS NOT PASSED! -> TOO BIG ERROR\n"); return -1; } free(in_buf); free(opl_buf); #ifdef USE_FFTW_ONE_EXECUTE free(fftw_buf_out); free(fftw_buf_in); #else free(fftw_buf); #endif #ifdef ONLY_POWER_OF_2 } #endif } const unsigned int total = total_mixed+total_prime+total_radix2; printf("Total count: %d\n", total); printf("Fourier/FFTW total -> prime %d radix-2 %d mixed %d\n", total_prime, total_radix2, total_mixed); printf("Fourier/FFTW total -> prime |%.6f|%.6f| radix-2 |%.6f|%.6f| mixed |%.6f|%.6f|\n", prime_time_ft, prime_time_fftw, radix2_time_ft, radix2_time_fftw, mixed_time_ft, mixed_time_fftw); printf("Fourier/FFTW mean -> prime |%.6f|%.6f| radix-2 |%.6f|%.6f| mixed |%.6f|%.6f|\n", prime_time_ft/(double)total_prime, prime_time_fftw/(double)total_prime, radix2_time_ft/(double)total_radix2, radix2_time_fftw/(double)total_radix2, mixed_time_ft/(double)total_mixed, mixed_time_fftw/(double)total_mixed); printf("Mean rate Fourier/FFTW: |%5.0f|%5.0f|\n", mean_ft_rate/(double) total, mean_fftw_rate/(double) total); return 0; } ================================================ FILE: OptolithiumC/libs/fourier/src/fourier.c ================================================ /* * Fourier Transform library for Optolithium lithography modelling software * * Copyright (C) 2015 Alexei Gladkikh * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that * the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the names of the copyright holders nor the names of any * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #include "basics.h" #include "primes.h" unsigned int RECURSION_DEPTH = 0; void perform_bitrev(unsigned int *indexes, unsigned int count) { unsigned int i, forward, rev, zeros; // to hold bitwise negated or odd values unsigned int nodd, noddrev; unsigned int halfn, quartn, nmin1; // frequently used 'constants' // N = 1 << logN; halfn = count >> 1; quartn = count >> 2; nmin1 = count - 1; // variable initializations forward = halfn; rev = 1; // start of bitreversed permutation loop, N/4 iterations for (i = quartn; i; i--) { // Gray code generator for even values: // counting ones is easier nodd = ~i; // find trailing zero's in i for (zeros = 0; nodd & 1; zeros++) { nodd >>= 1; } // toggle one bit of forward forward ^= 2 << zeros; // toggle one bit of rev rev ^= quartn >> zeros; // swap even and ~even conditionally if (forward < rev) { SWAP(unsigned int, indexes[forward], indexes[rev]); // compute the bitwise negations nodd = nmin1 ^ forward; noddrev = nmin1 ^ rev; // swap bitwise-negated pairs SWAP(unsigned int, indexes[nodd], indexes[noddrev]); } // compute the odd values from the even nodd = forward ^ 1; noddrev = rev ^ halfn; // swap odd unconditionally SWAP(unsigned int, indexes[nodd], indexes[noddrev]); } // end of the bitreverse permutation loop } unsigned int *create_bitrev(unsigned int length) { FOURIER_LOG(35, "Create bit reversal array of length %d", length); unsigned int k = 0; unsigned int *bit_reversed_indx = MALLOC(length, unsigned int); for (k = 0; k < length; k++) { bit_reversed_indx[k] = k; } perform_bitrev(bit_reversed_indx, length); return bit_reversed_indx; } static int RADIX2_INIT = 0; #define TWIDDLE_ARRAY_SIZE (1 << 18) static double TWIDDLE_ARRAY[TWIDDLE_ARRAY_SIZE] = { 0.0 }; #define BITREV_POWERS_NUM 18 #define BITREV_MAX_LENGTH (1 << BITREV_POWERS_NUM) static unsigned int* BITREV_ARRAY[BITREV_POWERS_NUM+1] = { NULL }; void fft_initialize_radix_2(void) { FOURIER_LOG(50, "Initialize FFT radix-2 internal arrays: %d", RADIX2_INIT) if (!RADIX2_INIT) { unsigned int k = 0; for (k = 0; k < TWIDDLE_ARRAY_SIZE; k++) { double x = 2.0 * M_PI * (double) k / (double) TWIDDLE_ARRAY_SIZE; TWIDDLE_ARRAY[k] = sin(x); } for (k = 1; k <= BITREV_POWERS_NUM; k++) { BITREV_ARRAY[k] = create_bitrev((unsigned int)(1 << k)); } RADIX2_INIT = 1; } } unsigned int log2shift(unsigned int N) { FOURIER_LOG(5, "Calculate for N = %d", N); FOURIER_ASSERT(N > 0, FOURIER_ECHO_CRITICAL, "N must be greater than zero!\n"); unsigned int log2N = 0; while (N != 0) { N >>= 1; log2N++; } return log2N - 1; } static FORCE_INLINE unsigned int *get_bitrev(unsigned int length) { unsigned int pow = log2shift(length); if (pow <= BITREV_POWERS_NUM) { FOURIER_LOG(35, "Get bitrev array from stored data: %d", length); return BITREV_ARRAY[pow]; } else { return create_bitrev(length); } } static FORCE_INLINE void free_bitrev(unsigned int* ptr, unsigned int length) { if (length > BITREV_MAX_LENGTH) { wfree(ptr); } } void fftshift(fft_complex_t *data, unsigned int count) { int k = 0; // Central element int c = (int) floor((float) count / 2); // For odd and for even numbers of element use different algorithm if (count % 2 == 0) { for (k = 0; k < c; k++) { SWAP(fft_complex_t, data[k], data[k + c]) } } else { fft_complex_t tmp = data[0]; for (k = 0; k < c; k++) { data[k] = data[c + k + 1]; data[c + k + 1] = data[k + 1]; } data[c] = tmp; } } void ifftshift(fft_complex_t *data, unsigned int count) { int k = 0; int c = (int) floor((float) count / 2); if (count % 2 == 0) { for (k = 0; k < c; k++) { SWAP(fft_complex_t, data[k], data[k + c]) } } else { fft_complex_t tmp = data[count - 1]; for (k = c - 1; k >= 0; k--) { data[c + k + 1] = data[k]; data[k] = data[c + k]; } data[c] = tmp; } } int prime_factorize(int result[MAX_PRIMES_COUNT], unsigned int N) { FOURIER_ASSERT(N > 0, FOURIER_ECHO_DEBUG, "Argument N = %d less than or equal zero", N); if (N < 4) { result[0] = N; return 1; } // Count of prime factors int count = 0; // Current prime multiplier int div = 2; while (N > 1) { if (N % div != 0) { div++; } else { N /= div; result[count++] = div; } } return count; } FORCE_INLINE int is_prime(unsigned int N) { // TODO: I know that is ugly and very time expensive and it will be change later // (e.g. Sieve of Eratosthenes) int primes[MAX_PRIMES_COUNT]; int count = prime_factorize(primes, N); return count > 1 ? 0 : 1; } FORCE_INLINE int is_power2(unsigned int x) { return x && !(x & (x - 1)); } FORCE_INLINE int is_power4(unsigned int x) { return x && !(x & (x - 1)) && (x & 0x55555555); } FORCE_INLINE void _add_cache_as_table(const fft_twiddles_cache_t* cache, const int k) { int imag_indx = TWIDDLE_ARRAY_SIZE / cache->count * k; int real_indx = (imag_indx + TWIDDLE_ARRAY_SIZE / 4) % TWIDDLE_ARRAY_SIZE; fft_cache_item_t item = { .is_calculated = 1, .value.r = TWIDDLE_ARRAY[real_indx], .value.i = TWIDDLE_ARRAY[imag_indx] }; cache->data[k] = item; } FORCE_INLINE void _add_cache_as_calc(const fft_twiddles_cache_t* cache, const int k) { fft_cache_item_t item = { .is_calculated = 1, .value = c_expi(2 * M_PI * (double) k / (double) cache->count) }; cache->data[k] = item; } FORCE_INLINE fft_complex_t _cached(const fft_twiddles_cache_t* cache, const int k, const int dir) { fft_complex_t cached = cache->data[k].value; fft_complex_t twiddle = { .r = cached.r, .i = (dir == FFT_LITHO_BACKWARD) ? cached.i : -cached.i }; return twiddle; } FORCE_INLINE fft_complex_t _calc_twiddle_by_table(const int k, const struct fft_plan_t* plan) { FOURIER_LOG(70, "Calculate twiddle using table...") int imag_indx = TWIDDLE_ARRAY_SIZE / plan->count * k; int real_indx = (imag_indx + TWIDDLE_ARRAY_SIZE / 4) % TWIDDLE_ARRAY_SIZE; fft_complex_t twiddle = { .r = TWIDDLE_ARRAY[real_indx], .i = (plan->direction == FFT_LITHO_BACKWARD) ? TWIDDLE_ARRAY[imag_indx] : -TWIDDLE_ARRAY[imag_indx] }; return twiddle; }; FORCE_INLINE fft_complex_t _calc_twiddle(const int k, const int N, const int d) { return c_expi(2 * M_PI * d * (double) k / (double) N); }; FORCE_INLINE fft_complex_t _calc_twiddle_by_exp(const int k, const struct fft_plan_t* plan) { FOURIER_LOG(70, "Calculate twiddle using c_expi...") return _calc_twiddle(k, plan->count, plan->direction); }; FORCE_INLINE fft_twiddles_cache_t* fft_cache_create_node(const unsigned int count) { unsigned int k = 0; fft_twiddles_cache_t* cache = MALLOC(1, fft_twiddles_cache_t); if (count != 0) { cache->count = count; cache->data = MALLOC(count, fft_cache_item_t); for (k = 0; k < count; k++) { cache->data[k].is_calculated = 0; } } for (k = 0; k < MAX_TWIDDLES_CACHE_CHILDREN; k++) { cache->children[k] = NULL; } return cache; } FORCE_INLINE fft_twiddles_cache_t* fft_cache_alloc_child( fft_twiddles_cache_t* cache, const struct fft_plan_t* plan, const int indx) { if (cache != NULL) { if (cache->children[indx] == NULL) { cache->children[indx] = fft_cache_create_node(plan->count); } return cache->children[indx]; } else { return NULL; } } FORCE_INLINE void fft_cache_init(struct fft_plan_t* plan) { unsigned int k = 0; plan->cache = MALLOC(plan->rank, fft_twiddles_cache_t*); for (k = 0; k < plan->rank; k++) { plan->cache[k] = plan->flags & FFT_USE_CACHE ? fft_cache_create_node(plan->dims[k]) : NULL; } } FORCE_INLINE void _fft_cache_destroy(fft_twiddles_cache_t* cache) { if (cache != NULL) { unsigned int k = 0; for (k = 0; k < MAX_TWIDDLES_CACHE_CHILDREN; k++) { _fft_cache_destroy(cache->children[k]); } FREE(cache->data); FREE(cache); } } FORCE_INLINE void fft_cache_destroy(struct fft_plan_t* plan) { unsigned int k = 0; for (k = 0; k < plan->rank; k++) { _fft_cache_destroy(plan->cache[k]); } } #define USE_RADIX2_TABLE(_plan) \ TWIDDLE_ARRAY_SIZE % _plan->count == 0 && _plan->count < TWIDDLE_ARRAY_SIZE && _plan->flags & FFT_USE_RADIX2_TABLE FORCE_INLINE fft_complex_t calc_twiddle(const int k, struct fft_plan_t* plan, fft_twiddles_cache_t* cache) { // Get indexes from sinus array that represent specified complex exponent // cos(A + pi/2) = sin(A) // cos(-A) = cos(A) // sin(-A) = -sin(A) INCREASE_CALCULATED_TWIDDLES(plan); fft_complex_t twiddle; if (cache != NULL) { if (!cache->data[k].is_calculated) { if (USE_RADIX2_TABLE(plan)) { _add_cache_as_table(cache, k); } else { _add_cache_as_calc(cache, k); } } twiddle = _cached(cache, k, plan->direction); } else { twiddle = USE_RADIX2_TABLE(plan) ? _calc_twiddle_by_table(k, plan) : _calc_twiddle_by_exp(k, plan); } FOURIER_LOG(45, "k = %3d N = %3d dir = %2d -> (%7.4f, %7.4f)", k, plan->count, plan->direction, twiddle.r, twiddle.i); return twiddle; } FORCE_INLINE int sign_rotation(int k, int p) { // Return value depending on k and p (period) by the next law: // 0 1 2 3 4 5 6 7 ... // 0 1 0 1 0 1 0 1 ... p = 1 // 0 0 1 1 0 0 1 1 ... p = 2 // 0 0 0 0 1 1 1 1 ... p = 4 // Where alternation of 0 and 1 is equal to p return (k / p) % 2; } FORCE_INLINE int get_twiddle_sign(int k, int n) { // Table of what alternation period has each of twiddle factor // 2 4 8 // 0 -> 0 0 0 // 1 -> 1 0 0 // 2 -> 0 1 0 // 3 -> 1 1 0 // 4 -> 0 0 1 // ............. // For example, sign of zero twiddle factor hasn't got rotation period throught frequency number // so for all frequency sign is equal. But for third twiddle factor sign has rotation period // by 2 and by 4 depending on frequency number (k). In this case sign equal to: // sign_period(k, 2) * sign_period(k, 4). In the code below multiplication replaced by XOR // because in the code boolean value used (XOR of boolean values equal to +1/-1 multiplication). int p = 0, sign = 0; for (p = 1; p <= n; p <<= 1) { if (p & n) { sign ^= sign_rotation(k, 2 * p); } } return sign ? -1 : 1; } #define FFT_RADIX2_CACHED(_plan, _cache, _childno) { \ fft_twiddles_cache_t* child_cache = fft_cache_alloc_child(cache, _plan, _childno);\ fft_radix_2(_plan, child_cache); \ } /* * fft_radix_2 - Perform Fast Fourier Transform from input signal specified by * that have power of two number of samples. */ void fft_radix_2(struct fft_plan_t *plan, fft_twiddles_cache_t* cache) { INCREASE_RECURSION_DEPTH(); FOURIER_ALGORITHM_STD_LOG(50, plan, "Cooley–Tukey Radix-2"); FOURIER_ALGORITHM_STD_ASSERTS(FOURIER_ECHO_DEBUG, plan, 2); unsigned int s = 0; // Transform number // If frequencies is generated for similar signals then pairs can be calculated once // else for different frequency (k) pairs will be also different. unsigned int *bitrev_indx = get_bitrev(plan->count); for (s = 0; s < plan->howMany; s++) { unsigned int stage, group, pair, k; for (k = 0; k < plan->count; k+=2) { *ovp(plan, s, k + 0) = c_add(iv(plan, s, bitrev_indx[k]), iv(plan, s, bitrev_indx[k+1])); *ovp(plan, s, k + 1) = c_sub(iv(plan, s, bitrev_indx[k]), iv(plan, s, bitrev_indx[k+1])); } for (stage = 2; stage < plan->count; stage <<= 1) { const unsigned int jump = stage << 1; for (group = 0; group < stage; group++) { fft_complex_t twiddle = calc_twiddle(plan->count*group/jump, plan, cache); for (pair = group; pair < plan->count; pair += jump) { const unsigned int match = pair + stage; FOURIER_LOG(70, "stage = %2d group = %2d pair = %2d, match = %d", stage, group, pair, match); fft_complex_t t = c_mul(twiddle, ov(plan, s, match)); *ovp(plan, s, match) = c_sub(ov(plan, s, pair), t); c_addto(ovp(plan, s, pair), t); } } } FOURIER_NORMALIZE(plan, s, k); } free_bitrev(bitrev_indx, plan->count); DECREASE_RECURSION_DEPTH(); } // Calculate modulus exponent R(b, e, m) = b^e mod m FORCE_INLINE unsigned int modpow(unsigned int base, unsigned int exp, unsigned int modulus) { unsigned int result = 1; base %= modulus; while (exp > 0) { if (exp & 1) { result = (result * base) % modulus; } base = (base * base) % modulus; exp >>= 1; } return result; } // Calculate generator number "g" for Galois Field. R(k) = g^k mod N // If k = 1..M, then generator is "g" such that any number from R(k) not repeat and belong [1; M] // For example if g = 2, N = 5, and // k = 1 2 3 4 5 6 7 8 // R = 1 3 4 2 1 3 4 2 // then "g" is generator for "N" // // Criteria for "g" is generator is C(k) = g^((N-1)/p[k]) mod N != 1 for any p[k], // where p[k] is primes of the N-1. One generator must exist for any prime "N". unsigned int calc_primitive_root(unsigned int N) { if (N == 2) { return 1; } else if (N == 3) { return 2; } int primes[MAX_PRIMES_COUNT]; unsigned int g, k = 0; // Calculate prime number of N-1 int primes_count = prime_factorize(primes, N - 1); // Check that N is prime: // if N-1 is have only one prime_count then N-1 is prime then N can't be prime FOURIER_ASSERT( primes_count != 1, FOURIER_ECHO_DEBUG, "N-1 = %d is prime number then N = %d can't be prime\n", N - 1, N); for (g = 2; g < N; g++) { int is_generator = 1; for (k = 0; is_generator && k < primes_count; k++) { is_generator = (modpow(g, (N - 1) / primes[k], N) != 1); } if (is_generator) { return g; } } FOURIER_ASSERT(FOURIER_ASSERT_UNCONDITION, FOURIER_ECHO_CRITICAL, "Generator not found for N = %d\n", N); return 0; } void fft_mixed_radix(struct fft_plan_t* plan, fft_twiddles_cache_t* cache); #define FFT_MIXED_CACHED(_plan, _cache, _childno) { \ fft_twiddles_cache_t* child_cache = fft_cache_alloc_child(cache, _plan, _childno);\ fft_mixed_radix(_plan, child_cache); \ } #define FFT_PRIME_CACHED(_plan, _cache, _childno) { \ fft_twiddles_cache_t* child_cache = fft_cache_alloc_child(cache, _plan, _childno);\ fft_prime(_plan, child_cache); \ } void fft_prime(struct fft_plan_t *plan, fft_twiddles_cache_t* cache) { INCREASE_RECURSION_DEPTH(); FOURIER_ALGORITHM_STD_LOG(50, plan, "Prime number"); FOURIER_ALGORITHM_STD_ASSERTS(FOURIER_ECHO_DEBUG, plan, 2); unsigned int s = 0, k = 0; unsigned int twiddles_generator = calc_primitive_root(plan->count); // Samples generator is differ from twiddles generator and is equals to the next generator // number. It can be calculated as g^(-1) mod N. Because loop of the sequence [1] = [N], // [0] = [N-1] and [-1] = [N-2]. unsigned int samples_generator = modpow(twiddles_generator, plan->count - 2, plan->count); // Number of samples used in convolution unsigned int conv_samples_count = plan->count - 1; // Make a convolution between twiddles from generator and part input samples (without zero sample) struct fft_plan_t twiddle_plan = { .count = conv_samples_count, .howMany = 1, .in = MALLOC(conv_samples_count, fft_complex_t), .idist = 1, .istride = 0, .out = MALLOC(conv_samples_count, fft_complex_t), .odist = 1, .ostride = 0, .direction = FFT_LITHO_FORWARD }; unsigned int *twiddles_indxes = MALLOC(conv_samples_count, unsigned int); unsigned int *samples_indxes = MALLOC(conv_samples_count, unsigned int); FOURIER_LOG(30, "Calculate twiddles array to perform convolution"); for (k = 0; k < conv_samples_count; k++) { twiddles_indxes[k] = modpow(twiddles_generator, k, plan->count); samples_indxes[k] = modpow(samples_generator, k, plan->count); twiddle_plan.in[k] = calc_twiddle(twiddles_indxes[k], plan, cache); } // Perform twiddle forward transform (required for convolution) FFT_MIXED_CACHED(&twiddle_plan, cache, 0); // Direction will be set within loop, because it changed in it struct fft_plan_t samples_plan = { .count = conv_samples_count, .howMany = 1, .in = MALLOC(conv_samples_count, fft_complex_t), .idist = 1, .istride = 0, .out = MALLOC(conv_samples_count, fft_complex_t), .odist = 1, .ostride = 0, }; fft_twiddles_cache_t* sample_cache = fft_cache_alloc_child(cache, &samples_plan, 1); for (s = 0; s < plan->howMany; s++) { FOURIER_LOG(30, "Calculate of samples array #%d/%d FFT to perform convolution", s, plan->howMany); // Using modulus generator permutation fill twiddles and samples arrays for convolution for (k = 0; k < conv_samples_count; k++) { // Calculate result sample index with the offset samples_plan.in[k] = iv(plan, s, samples_indxes[k]); } // Perform FORWARD FFT (convolution, st.1) samples_plan.direction = FFT_LITHO_FORWARD; fft_mixed_radix(&samples_plan, sample_cache); FOURIER_LOG(30, "Calculate specturm multiplication of twiddles and samples #%d/%d", s, plan->howMany); // Perform spectrum multiplication (convolution, st.2) for (k = 0; k < conv_samples_count; k++) { c_mulby(&samples_plan.out[k], twiddle_plan.out[k]); } FOURIER_LOG(30, "Calculate backward FFT of multiplied spectrums #%d/%d", s, plan->howMany); // Perform BACKWARD FFT (convolution, st.3) SWAP(fft_complex_t*, samples_plan.in, samples_plan.out); samples_plan.direction = FFT_LITHO_BACKWARD; fft_mixed_radix(&samples_plan, sample_cache); #if FOURIER_NORMALIZATION_TYPE == FOURIER_DISABLE_NORMALIZATION for (k = 0; k < conv_samples_count; k++) { // Normalize data after convolution if in standard FFT normalization disabled c_divbyv(&samples_plan.out[k], conv_samples_count); } #endif FOURIER_LOG(30, "Calculate zero spectrum data of samples array #%d/%d", s, plan->howMany); // Calculate zero spectrum sample by summing all of input elements // and add zero input sample to calculated spectrum values (required according to algorithm). // Also perform reverse generator permutation // out[0] = in[0], assign the zero sample for s-th array *ovp(plan, s, 0) = *ivp(plan, s, 0); for (k = 1; k < plan->count; k++) { // Calculate zero spectrum sample c_addto(ovp(plan, s, 0), iv(plan, s, twiddles_indxes[k - 1])); // Calculate others spectrum samples by mean of sum with the zero spectrum sample *ovp(plan, s, twiddles_indxes[k - 1]) = c_add(samples_plan.out[k - 1], iv(plan, s, 0)); } // Normalization for backward transform only. // TODO: may be divide in the above loop is faster? FOURIER_NORMALIZE(plan, s, k); } wfree(samples_indxes); wfree(twiddles_indxes); wfree(samples_plan.in); wfree(samples_plan.out); wfree(twiddle_plan.in); wfree(twiddle_plan.out); DECREASE_RECURSION_DEPTH(); } int check_implemented_fft(int count, fft_handler_t *handler) { int k = 0; for (k = FFT_IMPLEMENTED_RADIX_COUNT - 1; k >= 0; k--) { if (count == fft_handlers[k].count) { if (handler != NULL) { *handler = fft_handlers[k].handler; } FOURIER_LOG(50, "Factor = %d, radix index = %d", fft_handlers[k].count, k); return k; } } // Automatical returns -1 if not found return k; } // TODO: NOT USED - DELETE? int factorize_number(int result[MAX_PRIMES_COUNT], unsigned int N) { int k = 0, count = 0; // If number divide by 2 then lookup maximum nearest and lower than number power of two if (N % 2 == 0) { int radix2 = 1 << log2shift(N); while (N % radix2 != 0) { radix2 >>= 1; } result[count++] = radix2; N /= result[count]; } // Look up for radix that have fast optimized implementation for (k = 0; N > 1 && k < FFT_IMPLEMENTED_RADIX_COUNT; k++) { if (N % fft_handlers[k].count == 0) { result[count++] = fft_handlers[k].count; N /= result[count]; } } // Look up odd multipliers int div = 3; while (N > 1) { if (N % div != 0) { div += 2; } else { N /= div; result[count++] = div; } } return count; } unsigned int fft_get_factor(unsigned int N, int *imp_radix_indx) { FOURIER_LOG(10, "Factorize number N = %d", N); FOURIER_ASSERT(N > 1, FOURIER_ECHO_DEBUG, "N = %d and can't be factorized\n", N); int k = 0; // Look up for radix that have fast optimized implementation for (k = FFT_IMPLEMENTED_RADIX_COUNT-1; k >= 0; k--) { if (N % fft_handlers[k].count == 0) { if (imp_radix_indx != NULL) { *imp_radix_indx = k; } FOURIER_LOG(50, "Factor = %d, radix index = %d", fft_handlers[k].count, k); return fft_handlers[k].count; } } // If number divide by 2 then lookup maximum nearest and lower than number power of two if (N % 2 == 0) { unsigned int radix2 = (1U) << log2shift(N); while (N % radix2 != 0) { radix2 >>= 1; } if (imp_radix_indx != NULL) { *imp_radix_indx = -1; } FOURIER_LOG(10, "Factor = %d, radix index = %d", radix2, *imp_radix_indx); return radix2; } // Look up odd multipliers unsigned int div = 3; while (N % div != 0) { div += 2; } if (imp_radix_indx != NULL) { *imp_radix_indx = -1; } FOURIER_LOG(10, "Factor = %d, radix index = %d", div, *imp_radix_indx); return div; } void fft_singular(struct fft_plan_t *plan) { INCREASE_RECURSION_DEPTH(); FOURIER_ALGORITHM_STD_LOG(50, plan, "Copy") // Copy input data to the output unsigned int s = 0; for (s = 0; s < plan->howMany; s++) { *ovp(plan, s, 0) = *ivp(plan, s, 0); } DECREASE_RECURSION_DEPTH(); } void fft_split_radix(struct fft_plan_t* plan, fft_twiddles_cache_t* cache) { INCREASE_RECURSION_DEPTH(); FOURIER_ALGORITHM_STD_LOG(50, plan, "Split radix"); FOURIER_ALGORITHM_STD_ASSERTS(FOURIER_ECHO_DEBUG, plan, 2); unsigned int s, k; // Here value imp_radix_indx equal index of one of implemented FFT radix if plan->count divide on this radix int imp_radix_indx = -1; unsigned int prime_factor = fft_get_factor(plan->count, &imp_radix_indx); unsigned int mixed_factor = plan->count / prime_factor; struct fft_plan_t step_plan; step_plan.in = MALLOC(plan->count, fft_complex_t); step_plan.out = MALLOC(plan->count, fft_complex_t); step_plan.direction = plan->direction; for (s = 0; s < plan->howMany; s++) { FOURIER_LOG(30, "Calculate column-wise FFT for s = %d", s); for (k = 0; k < plan->count; k++) { step_plan.in[k] = iv(plan, s, k); } // Perform FFT by columns step_plan.count = prime_factor; // Number of samples in column (equals to rows count) step_plan.howMany = mixed_factor; // Number of columns step_plan.idist = step_plan.odist = step_plan.howMany; // Dist. between samples (equals to cols. count) step_plan.istride = step_plan.ostride = 1; // Dist. between columns // For example for 15 sample: // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 // fft_get_factor returns 3 then prime_factor = 3 and mixed_factor = 5 // 0 1 2 // 3 4 5 // 6 7 8 // 9 10 11 // 12 13 14 if (step_plan.count == 1) { fft_singular(&step_plan); } else if (imp_radix_indx != -1) { fft_handlers[imp_radix_indx].handler(&step_plan); // } else if (prime_factor % 4 == 0) { // fft_radix_4(&step_plan, cols_cache); } else if (prime_factor % 2 == 0) { FFT_RADIX2_CACHED(&step_plan, cache, 0); } else { FFT_PRIME_CACHED(&step_plan, cache, 0); } FOURIER_LOG(30, "Calculate columns twiddles multiplications for s = %d", s); // Addition twiddles multiplications unsigned int r = 0, c = 0; // Iterate through columns for (c = 1; c < step_plan.howMany; c++) { // Iterate through rows for (r = 1; r < step_plan.count; r++) { fft_complex_t twiddle = calc_twiddle(r * c, plan, cache); c_mulby(ovp(&step_plan, c, r), twiddle); } } FOURIER_LOG(30, "Calculate row-wise FFT for s = %d", s); // 0 1 2 3 4 // 5 6 7 8 9 // 10 11 12 13 14 // Perform FFT by rows SWAP(fft_complex_t*, step_plan.in, step_plan.out); step_plan.count = mixed_factor; // Number of samples in row (columns count) step_plan.howMany = prime_factor; // Number of rows step_plan.idist = 1; // Dist. between samples (no shift, samples near) step_plan.odist = step_plan.howMany; step_plan.istride = step_plan.count; // Dist. between rows = columns count step_plan.ostride = 1; fft_twiddles_cache_t* rows_cache = fft_cache_alloc_child(cache, &step_plan, 1); fft_mixed_radix(&step_plan, rows_cache); for (k = 0; k < plan->count; k++) { *ovp(plan, s, k) = step_plan.out[k]; } } FOURIER_LOG(5, "Free temporary step plan output buffer"); // free memory of the temporary buffers wfree(step_plan.in); wfree(step_plan.out); DECREASE_RECURSION_DEPTH(); } /* * count - Number of samples * in - Input two-dimensional array. This routine calculate one frequency sample * for different input signal. For first frequency in[n] will be used, for * the second frequency in[count + n], etc. So result spectrum calculated * using in[k*count+n], where k - frequency number, n - input signal sample. * Note: for this routine number of different signal must be equal to the * result frequency number. * out - Result signal spectrum * direction - FFT_LITHO_FORWARD - forward transform and FFT_LITHO_BACKWARD - backward transform. */ void fft_mixed_radix(struct fft_plan_t* plan, fft_twiddles_cache_t* cache) { // N = 30 -> 2 * 3 * 5 // 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 // 0 1 2 3 4 // 0 00 01 02 03 04 // 1 05 06 07 08 09 // 2 10 11 12 13 14 // 3 15 16 17 18 19 // 4 20 21 22 23 24 // 5 25 26 27 28 29 FOURIER_ALGORITHM_STD_ASSERTS(FOURIER_ECHO_DEBUG, plan, 1); fft_handler_t implemented_fft; // In this case we check if plan->count is equal one of implemented FFT radix if (plan->count == 1) { fft_singular(plan); } else if (check_implemented_fft(plan->count, &implemented_fft) != -1) { implemented_fft(plan); // } else if (is_power4(plan->count)) { // fft_radix_4(plan, cache); } else if (is_power2(plan->count)) { fft_radix_2(plan, cache); } else if (is_prime(plan->count)) { fft_prime(plan, cache); } else { fft_split_radix(plan, cache); } } struct fft_plan_t* fft_plan_create_many_1d( unsigned int count, unsigned int howMany, fft_complex_t* in, fft_complex_t* out, int direction, unsigned int flags) { fft_initialize_radix_2(); FOURIER_LOG(50, "Create %d one dimension FFT plans for %d samples in=%p out=%p dir=%d", howMany, count, in, out, direction); FOURIER_ASSERT(in != NULL, FOURIER_ECHO_CRITICAL, "Input buffer can't be NULL\n"); FOURIER_ASSERT(out != NULL, FOURIER_ECHO_CRITICAL, "Output buffer can't be NULL\n"); struct fft_plan_t *plan = MALLOC(1, struct fft_plan_t); plan->rank = 1; plan->total = count; plan->dims = MALLOC(1, unsigned int); plan->dims[0] = count; plan->in = in; plan->out = out; if (plan->in == plan->out) { FOURIER_LOG(50, "Initialize pseudo in place FFT one dimension plan"); plan->tmpbuf = MALLOC(count * howMany, fft_complex_t); plan->out = plan->tmpbuf; } else { FOURIER_LOG(50, "Initialize out of place FFT one dimension plan"); plan->tmpbuf = NULL; } plan->count = count; plan->howMany = howMany; plan->idist = plan->odist = 1; plan->istride = plan->ostride = plan->count; plan->direction = direction; plan->flags = flags; fft_cache_init(plan); return plan; } struct fft_plan_t* fft_plan_create_1d(unsigned int count, fft_complex_t* in, fft_complex_t* out, int direction, unsigned int flags) { FOURIER_LOG(50, "Create one dimension FFT plan for %d samples in=%p out=%p dir=%d", count, in, out, direction); return fft_plan_create_many_1d(count, 1, in, out, direction, flags); } struct fft_plan_t* fft_plan_create_nd(unsigned int rank, unsigned int* dims, fft_complex_t *in, fft_complex_t *out, int direction, unsigned int flags) { fft_initialize_radix_2(); FOURIER_LOG(50, "Create %d-dimensions FFT plan: in=%p out=%p dir=%d", rank, in, out, direction); FOURIER_ASSERT(in != NULL, FOURIER_ECHO_CRITICAL, "Input buffer can't be NULL\n"); FOURIER_ASSERT(out != NULL, FOURIER_ECHO_CRITICAL, "Output buffer can't be NULL\n"); unsigned int k = 0; struct fft_plan_t *plan = MALLOC(1, struct fft_plan_t); plan->rank = rank; plan->dims = MALLOC(plan->rank, unsigned int); for (k = 0, plan->total = 1; k < plan->rank; k++) { plan->total *= dims[k]; plan->dims[k] = dims[k]; } if (in != out) { FOURIER_LOG(50, "Initialize out of place FFT multidimension plan"); plan->tmpbuf = MALLOC(plan->total, fft_complex_t); MEMCPY(plan->tmpbuf, in, plan->total, fft_complex_t); plan->in = plan->tmpbuf; plan->out = out; } else { FOURIER_LOG(50, "Initialize in place FFT multidimension plan"); plan->tmpbuf = MALLOC(plan->total, fft_complex_t); plan->in = in; plan->out = plan->tmpbuf; } plan->direction = direction; plan->flags = flags; fft_cache_init(plan); return plan; } struct fft_plan_t* fft_plan_create_2d( unsigned int n_rows, unsigned int n_cols, fft_complex_t *in, fft_complex_t *out, int direction, unsigned int flags) { FOURIER_LOG(50, "Create two dimensions FFT plan %dx%d: in=%p out=%p dir=%d", n_rows, n_cols, in, out, direction); unsigned int dims[2] = {n_rows, n_cols}; return fft_plan_create_nd(2, dims, in, out, direction, flags); } void fft_plan_destroy(struct fft_plan_t* plan) { fft_cache_destroy(plan); FREE(plan->tmpbuf); FREE(plan->dims); FREE(plan); } void fft_execute_1d(struct fft_plan_t* plan) { fft_mixed_radix(plan, plan->cache[0]); if (plan->tmpbuf) { MEMCPY(plan->in, plan->tmpbuf, plan->count * plan->howMany, fft_complex_t); } } void fft_execute_2d(struct fft_plan_t* plan) { unsigned int k = 0; // Column-wise FFT plan->count = plan->dims[0]; plan->howMany = plan->total / plan->dims[0]; plan->istride = plan->ostride = plan->dims[0]; plan->idist = plan->odist = 1; FOURIER_LOG(60, "Column-wise FFT: rank = %d count = %d howMany = %d stride = %d dist = %d", plan->rank, plan->count, plan->howMany, plan->istride, plan->idist); fft_mixed_radix(plan, plan->cache[0]); SWAP(fft_complex_t*, plan->in, plan->out); // Row-wise FFT fft_complex_t* backup_in = plan->in; fft_complex_t* backup_out = plan->out; plan->howMany = plan->dims[0]; plan->count = plan->dims[1]; plan->idist = plan->odist = plan->dims[0]; plan->istride = plan->ostride = 1; unsigned int total2d = plan->count * plan->howMany; unsigned int howMany2d = plan->total / total2d; FOURIER_LOG(60, "total2d = %d howMany2d = %d", total2d, howMany2d); for (k = 0; k < howMany2d; k++) { FOURIER_LOG(60, "Row-wise FFT #%2d: rank = %d count = %d howMany = %d stride = %d dist = %d", k, plan->rank, plan->count, plan->howMany, plan->istride, plan->idist); fft_mixed_radix(plan, plan->cache[1]); plan->in += total2d; plan->out += total2d; } plan->in = backup_in; plan->out = backup_out; // Copy if data from temporary buffer to the input buffer if out of place transformation perform if (plan->in != plan->tmpbuf) { MEMCPY(plan->in, plan->tmpbuf, plan->count, fft_complex_t); } } // TODO: not tested void fft_execute_nd(struct fft_plan_t* plan) { unsigned int k = 0; fft_execute_2d(plan); for (k = 2; k < plan->rank; k++) { unsigned int dist = plan->total / plan->dims[k]; plan->count = plan->dims[k]; plan->howMany = dist; plan->istride = plan->ostride = 1; plan->idist = plan->odist = dist; FOURIER_LOG(60, "fft_execute_1d #%02d: rank = %d count = %d howMany = %d stride = %d odist = %d", k, plan->rank, plan->count, plan->howMany, plan->istride, plan->idist); fft_mixed_radix(plan, plan->cache[k]); SWAP(fft_complex_t*, plan->in, plan->out); } // Copy if data from temporary buffer to the input buffer if out of place transformation perform if (plan->in != plan->tmpbuf) { MEMCPY(plan->in, plan->tmpbuf, plan->count, fft_complex_t); } } void fft_execute(struct fft_plan_t* plan) { INIT_CALCULATED_TWIDDLES(plan); if (plan->rank == 1) { fft_execute_1d(plan); } else if (plan->rank == 2) { fft_execute_2d(plan); } else { fft_execute_nd(plan); } PRINT_CALCULATED_TWIDDLES(plan); } ================================================ FILE: OptolithiumC/libs/fourier/src/primes.c ================================================ /* * Fourier Transform library for Optolithium lithography modelling software * * Copyright (C) 2015 Alexei Gladkikh * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that * the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the names of the copyright holders nor the names of any * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, ORCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #include "primes.h" void fft_litho_c2(struct fft_plan_t *plan) { FFT_IMPLEMENTATION_BEGIN(plan, 2); *ovp(plan, s, 0) = c_add(X(0), X(1)); *ovp(plan, s, 1) = c_sub(X(0), X(1)); FFT_IMPLEMENTATION_END(plan); } const static fft_complex_t TWIDDLE_ARRAY_R3[2][3] = { { { .r = 1.0000000000000000, .i = 0.0000000000000000}, { .r = -0.4999999999999998, .i = -0.8660254037844388}, { .r = -0.5000000000000004, .i = 0.8660254037844384}, }, { { .r = 1.0000000000000000, .i = 0.0000000000000000}, { .r = -0.4999999999999998, .i = 0.8660254037844388}, { .r = -0.5000000000000004, .i = -0.8660254037844384}, } }; FORCE_INLINE fft_complex_t c_add3(const fft_complex_t a, const fft_complex_t b, const fft_complex_t c) { fft_complex_t result = { .r = a.r + b.r + c.r, .i = a.i + b.i + c.i }; return result; } #define CALC_S3(k1, k2) c_add3(X(0), c_mul(w[k1], X(1)), c_mul(w[k2], X(2))) void fft_litho_c3(struct fft_plan_t *plan) { FFT_IMPLEMENTATION_BEGIN(plan, 3); const fft_complex_t *w = TWIDDLE_ARRAY_R3[plan->direction == FFT_LITHO_BACKWARD]; *ovp(plan, s, 0) = c_add3(X(0), X(1), X(2)); *ovp(plan, s, 1) = CALC_S3(1, 2); *ovp(plan, s, 2) = CALC_S3(2, 1); FFT_IMPLEMENTATION_END(plan); } FORCE_INLINE fft_complex_t c_add4(const fft_complex_t a, const fft_complex_t b, const fft_complex_t c, const fft_complex_t d) { fft_complex_t result = { .r = a.r + b.r + c.r + d.r, .i = a.i + b.i + c.i + d.i }; return result; } void fft_litho_c4(struct fft_plan_t *plan) { FFT_IMPLEMENTATION_BEGIN(plan, 4); const int d = plan->direction; *ovp(plan, s, 0) = c_add4(X(0), X(1), X(2), X(3)); *ovp(plan, s, 1) = c_add4(X(0), c_mulj(X(1), -d), c_neg(X(2)), c_mulj(X(3), d)); *ovp(plan, s, 2) = c_add4(X(0), c_neg(X(1)), X(2), c_neg(X(3))); *ovp(plan, s, 3) = c_add4(X(0), c_mulj(X(1), d), c_neg(X(2)), c_mulj(X(3), -d)); FFT_IMPLEMENTATION_END(plan); } const static fft_complex_t TWIDDLE_ARRAY_R5[2][5] = { { { .r = 1.0000000000000000, .i = 0.0000000000000000}, { .r = 0.3090169943749475, .i = -0.9510565162951535}, { .r = -0.8090169943749473, .i = -0.5877852522924732}, { .r = -0.8090169943749475, .i = 0.5877852522924730}, { .r = 0.3090169943749472, .i = 0.9510565162951536}, }, { { .r = 1.0000000000000000, .i = 0.0000000000000000}, { .r = 0.3090169943749475, .i = 0.9510565162951535}, { .r = -0.8090169943749473, .i = 0.5877852522924732}, { .r = -0.8090169943749475, .i = -0.5877852522924730}, { .r = 0.3090169943749472, .i = -0.9510565162951536}, } }; FORCE_INLINE fft_complex_t c_add5( const fft_complex_t x0, const fft_complex_t x1, const fft_complex_t x2, const fft_complex_t x3, const fft_complex_t x4) { fft_complex_t result = { .r = x0.r + x1.r + x2.r + x3.r + x4.r, .i = x0.i + x1.i + x2.i + x3.i + x4.i }; return result; } #define CALC_S5(k1, k2, k3, k4) \ c_add5(X(0), \ c_mul(w[k1], X(1)), c_mul(w[k2], X(2)), c_mul(w[k3], X(3)), c_mul(w[k4], X(4))) void fft_litho_c5(struct fft_plan_t *plan) { FFT_IMPLEMENTATION_BEGIN(plan, 5); const fft_complex_t *w = TWIDDLE_ARRAY_R5[plan->direction == FFT_LITHO_BACKWARD]; *ovp(plan, s, 0) = c_add5(X(0), X(1), X(2), X(3), X(4)); *ovp(plan, s, 1) = CALC_S5(1, 2, 3, 4); *ovp(plan, s, 2) = CALC_S5(2, 4, 1, 3); *ovp(plan, s, 3) = CALC_S5(3, 1, 4, 2); *ovp(plan, s, 4) = CALC_S5(4, 3, 2, 1); FFT_IMPLEMENTATION_END(plan); } const static fft_complex_t TWIDDLE_ARRAY_R6[2][6] = { { { .r = 1.0000000000000000, .i = 0.0000000000000000}, { .r = 0.5000000000000001, .i = -0.8660254037844386}, { .r = -0.4999999999999998, .i = -0.8660254037844388}, { .r = -1.0000000000000000, .i = -0.0000000000000001}, { .r = -0.5000000000000004, .i = 0.8660254037844384}, { .r = 0.4999999999999993, .i = 0.8660254037844390}, }, { { .r = 1.0000000000000000, .i = 0.0000000000000000}, { .r = 0.5000000000000001, .i = 0.8660254037844386}, { .r = -0.4999999999999998, .i = 0.8660254037844388}, { .r = -1.0000000000000000, .i = 0.0000000000000001}, { .r = -0.5000000000000004, .i = -0.8660254037844384}, { .r = 0.4999999999999993, .i = -0.8660254037844390}, } }; void fft_litho_c6(struct fft_plan_t *plan) { FFT_IMPLEMENTATION_BEGIN(plan, 6); const fft_complex_t *w3 = TWIDDLE_ARRAY_R3[plan->direction == FFT_LITHO_BACKWARD]; const fft_complex_t *w6 = TWIDDLE_ARRAY_R6[plan->direction == FFT_LITHO_BACKWARD]; const fft_complex_t e[3] = { c_add3(X(0), X(2), X(4)), c_add3(X(0), c_mul(w3[1], X(2)), c_mul(w3[2], X(4))), c_add3(X(0), c_mul(w3[2], X(2)), c_mul(w3[1], X(4))), }; const fft_complex_t o[3] = { c_add3(X(1), X(3), X(5)), c_mul(w6[1], c_add3(X(1), c_mul(w3[1], X(3)), c_mul(w3[2], X(5)))), c_mul(w6[2], c_add3(X(1), c_mul(w3[2], X(3)), c_mul(w3[1], X(5)))), }; *ovp(plan, s, 0) = c_add(e[0], o[0]); *ovp(plan, s, 1) = c_add(e[1], o[1]); *ovp(plan, s, 2) = c_add(e[2], o[2]); *ovp(plan, s, 3) = c_sub(e[0], o[0]); *ovp(plan, s, 4) = c_sub(e[1], o[1]); *ovp(plan, s, 5) = c_sub(e[2], o[2]); FFT_IMPLEMENTATION_END(plan); } const static fft_complex_t TWIDDLE_ARRAY_R7[2][7] __attribute__ ((aligned (16))) = { { { .r = 1.0000000000000000, .i = 0.0000000000000000}, { .r = 0.6234898018587336, .i = -0.7818314824680297}, { .r = -0.2225209339563143, .i = -0.9749279121818236}, { .r = -0.9009688679024190, .i = -0.4338837391175582}, { .r = -0.9009688679024191, .i = 0.4338837391175580}, { .r = -0.2225209339563146, .i = 0.9749279121818235}, { .r = 0.6234898018587334, .i = 0.7818314824680299}, }, { { .r = 1.0000000000000000, .i = 0.0000000000000000}, { .r = 0.6234898018587336, .i = 0.7818314824680297}, { .r = -0.2225209339563143, .i = 0.9749279121818236}, { .r = -0.9009688679024190, .i = 0.4338837391175582}, { .r = -0.9009688679024191, .i = -0.4338837391175580}, { .r = -0.2225209339563146, .i = -0.9749279121818235}, { .r = 0.6234898018587334, .i = -0.7818314824680299}, } }; FORCE_INLINE fft_complex_t c_add7( const fft_complex_t x0, const fft_complex_t x1, const fft_complex_t x2, const fft_complex_t x3, const fft_complex_t x4, const fft_complex_t x5, const fft_complex_t x6) { fft_complex_t result = { .r = x0.r + x1.r + x2.r + x3.r + x4.r + x5.r + x6.r, .i = x0.i + x1.i + x2.i + x3.i + x4.i + x5.i + x6.i }; return result; } #define CALC_S7(k1, k2, k3, k4, k5, k6) \ c_add7(X(0), \ c_mul(w[k1], X(1)), c_mul(w[k2], X(2)), c_mul(w[k3], X(3)), \ c_mul(w[k4], X(4)), c_mul(w[k5], X(5)), c_mul(w[k6], X(6))) void fft_litho_c7(struct fft_plan_t *plan) { FFT_IMPLEMENTATION_BEGIN(plan, 7); const fft_complex_t *w = TWIDDLE_ARRAY_R7[plan->direction == FFT_LITHO_BACKWARD]; *ovp(plan, s, 0) = c_add7(X(0), X(1), X(2), X(3), X(4), X(5), X(6)); *ovp(plan, s, 1) = CALC_S7(1, 2, 3, 4, 5, 6); *ovp(plan, s, 2) = CALC_S7(2, 4, 6, 1, 3, 5); *ovp(plan, s, 3) = CALC_S7(3, 6, 2, 5, 1, 4); *ovp(plan, s, 4) = CALC_S7(4, 1, 5, 2, 6, 3); *ovp(plan, s, 5) = CALC_S7(5, 3, 1, 6, 4, 2); *ovp(plan, s, 6) = CALC_S7(6, 5, 4, 3, 2, 1); FFT_IMPLEMENTATION_END(plan); } const static fft_complex_t TWIDDLE_ARRAY_R11[2][11] = { { {.r = 1.0000000000000000, .i = 0.0000000000000000 }, {.r = 0.8412535328311812, .i = -0.5406408174555976 }, {.r = 0.4154150130018864, .i = -0.9096319953545183 }, {.r = -0.1423148382732852, .i = -0.9898214418809327 }, {.r = -0.6548607339452850, .i = -0.7557495743542584 }, {.r = -0.9594929736144974, .i = -0.2817325568414296 }, {.r = -0.9594929736144974, .i = 0.2817325568414298 }, {.r = -0.6548607339452852, .i = 0.7557495743542582 }, {.r = -0.1423148382732853, .i = 0.9898214418809327 }, {.r = 0.4154150130018860, .i = 0.9096319953545186 }, {.r = 0.8412535328311812, .i = 0.5406408174555974 }, }, { {.r = 1.0000000000000000, .i = 0.0000000000000000 }, {.r = 0.8412535328311812, .i = 0.5406408174555976 }, {.r = 0.4154150130018864, .i = 0.9096319953545183 }, {.r = -0.1423148382732852, .i = 0.9898214418809327 }, {.r = -0.6548607339452850, .i = 0.7557495743542584 }, {.r = -0.9594929736144974, .i = 0.2817325568414296 }, {.r = -0.9594929736144974, .i = -0.2817325568414298 }, {.r = -0.6548607339452852, .i = -0.7557495743542582 }, {.r = -0.1423148382732853, .i = -0.9898214418809327 }, {.r = 0.4154150130018860, .i = -0.9096319953545186 }, {.r = 0.8412535328311812, .i = -0.5406408174555974 }, } }; FORCE_INLINE fft_complex_t c_add11( const fft_complex_t x0, const fft_complex_t x1, const fft_complex_t x2, const fft_complex_t x3, const fft_complex_t x4, const fft_complex_t x5, const fft_complex_t x6, const fft_complex_t x7, const fft_complex_t x8, const fft_complex_t x9, const fft_complex_t x10) { fft_complex_t result = { .r = x0.r + x1.r + x2.r + x3.r + x4.r + x5.r + x6.r + x7.r + x8.r + x9.r + x10.r, .i = x0.i + x1.i + x2.i + x3.i + x4.i + x5.i + x6.i + x7.i + x8.i + x9.i + x10.i }; return result; } #define CALC_S11(k1, k2, k3, k4, k5, k6, k7, k8, k9, k10) \ c_add11(X(0), \ c_mul(w[k1], X(1)), c_mul(w[k2], X(2)), c_mul(w[k3], X(3)), c_mul(w[k4], X(4)), c_mul(w[k5], X(5)), \ c_mul(w[k6], X(6)), c_mul(w[k7], X(7)), c_mul(w[k8], X(8)), c_mul(w[k9], X(9)), c_mul(w[k10], X(10))); void fft_litho_c11(struct fft_plan_t *plan) { FFT_IMPLEMENTATION_BEGIN(plan, 11); const fft_complex_t *w = TWIDDLE_ARRAY_R11[plan->direction == FFT_LITHO_BACKWARD]; *ovp(plan, s, 0) = c_add11(X(0), X(1), X(2), X(3), X(4), X(5), X(6), X(7), X(8), X(9), X(10)); *ovp(plan, s, 1) = CALC_S11( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); *ovp(plan, s, 2) = CALC_S11( 2, 4, 6, 8, 10, 1, 3, 5, 7, 9); *ovp(plan, s, 3) = CALC_S11( 3, 6, 9, 1, 4, 7, 10, 2, 5, 8); *ovp(plan, s, 4) = CALC_S11( 4, 8, 1, 5, 9, 2, 6, 10, 3, 7); *ovp(plan, s, 5) = CALC_S11( 5, 10, 4, 9, 3, 8, 2, 7, 1, 6); *ovp(plan, s, 6) = CALC_S11( 6, 1, 7, 2, 8, 3, 9, 4, 10, 5); *ovp(plan, s, 7) = CALC_S11( 7, 3, 10, 6, 2, 9, 5, 1, 8, 4); *ovp(plan, s, 8) = CALC_S11( 8, 5, 2, 10, 7, 4, 1, 9, 6, 3); *ovp(plan, s, 9) = CALC_S11( 9, 7, 5, 3, 1, 10, 8, 6, 4, 2); *ovp(plan, s, 10) = CALC_S11(10, 9, 8, 7, 6, 5, 4, 3, 2, 1); FFT_IMPLEMENTATION_END(plan); } const static fft_complex_t TWIDDLE_ARRAY_R13[2][13] = { { { .r = 1.0000000000000000, .i = 0.0000000000000000}, { .r = 0.8854560256532099, .i = -0.4647231720437686}, { .r = 0.5680647467311558, .i = -0.8229838658936564}, { .r = 0.1205366802553230, .i = -0.9927088740980540}, { .r = -0.3546048870425357, .i = -0.9350162426854148}, { .r = -0.7485107481711012, .i = -0.6631226582407952}, { .r = -0.9709418174260520, .i = -0.2393156642875577}, { .r = -0.9709418174260520, .i = 0.2393156642875579}, { .r = -0.7485107481711011, .i = 0.6631226582407953}, { .r = -0.3546048870425359, .i = 0.9350162426854147}, { .r = 0.1205366802553232, .i = 0.9927088740980540}, { .r = 0.5680647467311556, .i = 0.8229838658936566}, { .r = 0.8854560256532100, .i = 0.4647231720437683}, }, { { .r = 1.0000000000000000, .i = 0.0000000000000000}, { .r = 0.8854560256532099, .i = 0.4647231720437686}, { .r = 0.5680647467311558, .i = 0.8229838658936564}, { .r = 0.1205366802553230, .i = 0.9927088740980540}, { .r = -0.3546048870425357, .i = 0.9350162426854148}, { .r = -0.7485107481711012, .i = 0.6631226582407952}, { .r = -0.9709418174260520, .i = 0.2393156642875577}, { .r = -0.9709418174260520, .i = -0.2393156642875579}, { .r = -0.7485107481711011, .i = -0.6631226582407953}, { .r = -0.3546048870425359, .i = -0.9350162426854147}, { .r = 0.1205366802553232, .i = -0.9927088740980540}, { .r = 0.5680647467311556, .i = -0.8229838658936566}, { .r = 0.8854560256532100, .i = -0.4647231720437683}, } }; FORCE_INLINE fft_complex_t c_add13( const fft_complex_t x0, const fft_complex_t x1, const fft_complex_t x2, const fft_complex_t x3, const fft_complex_t x4, const fft_complex_t x5, const fft_complex_t x6, const fft_complex_t x7, const fft_complex_t x8, const fft_complex_t x9, const fft_complex_t x10, const fft_complex_t x11, const fft_complex_t x12) { fft_complex_t result = { .r = x0.r + x1.r + x2.r + x3.r + x4.r + x5.r + x6.r + x7.r + x8.r + x9.r + x10.r + x11.r + x12.r, .i = x0.i + x1.i + x2.i + x3.i + x4.i + x5.i + x6.i + x7.i + x8.i + x9.i + x10.i + x11.i + x12.i }; return result; } #define CALC_S13(k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12) \ c_add13(X(0), \ c_mul(w[k1], X(1)), c_mul(w[k2], X(2)), c_mul(w[k3], X(3)), c_mul(w[k4], X(4)), c_mul(w[k5], X(5)), \ c_mul(w[k6], X(6)), c_mul(w[k7], X(7)), c_mul(w[k8], X(8)), c_mul(w[k9], X(9)), c_mul(w[k10], X(10)), \ c_mul(w[k11], X(11)), c_mul(w[k12], X(12))) void fft_litho_c13(struct fft_plan_t *plan) { FFT_IMPLEMENTATION_BEGIN(plan, 13); const fft_complex_t *w = TWIDDLE_ARRAY_R13[plan->direction == FFT_LITHO_BACKWARD]; *ovp(plan, s, 0) = c_add13(X(0), X(1), X(2), X(3), X(4), X(5), X(6), X(7), X(8), X(9), X(10), X(11), X(12)); *ovp(plan, s, 1) = CALC_S13( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); *ovp(plan, s, 2) = CALC_S13( 2, 4, 6, 8, 10, 12, 1, 3, 5, 7, 9, 11); *ovp(plan, s, 3) = CALC_S13( 3, 6, 9, 12, 2, 5, 8, 11, 1, 4, 7, 10); *ovp(plan, s, 4) = CALC_S13( 4, 8, 12, 3, 7, 11, 2, 6, 10, 1, 5, 9); *ovp(plan, s, 5) = CALC_S13( 5, 10, 2, 7, 12, 4, 9, 1, 6, 11, 3, 8); *ovp(plan, s, 6) = CALC_S13( 6, 12, 5, 11, 4, 10, 3, 9, 2, 8, 1, 7); *ovp(plan, s, 7) = CALC_S13( 7, 1, 8, 2, 9, 3, 10, 4, 11, 5, 12, 6); *ovp(plan, s, 8) = CALC_S13( 8, 3, 11, 6, 1, 9, 4, 12, 7, 2, 10, 5); *ovp(plan, s, 9) = CALC_S13( 9, 5, 1, 10, 6, 2, 11, 7, 3, 12, 8, 4); *ovp(plan, s, 10) = CALC_S13(10, 7, 4, 1, 11, 8, 5, 2, 12, 9, 6, 3); *ovp(plan, s, 11) = CALC_S13(11, 9, 7, 5, 3, 1, 12, 10, 8, 6, 4, 2); *ovp(plan, s, 12) = CALC_S13(12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1); FFT_IMPLEMENTATION_END(plan); } const static fft_complex_t TWIDDLE_ARRAY_R17[2][17] = { { { .r = 1.0000000000000000, .i = 0.0000000000000000}, { .r = 0.9324722294043558, .i = -0.3612416661871529}, { .r = 0.7390089172206591, .i = -0.6736956436465572}, { .r = 0.4457383557765383, .i = -0.8951632913550623}, { .r = 0.0922683594633020, .i = -0.9957341762950345}, { .r = -0.2736629900720827, .i = -0.9618256431728192}, { .r = -0.6026346363792563, .i = -0.7980172272802396}, { .r = -0.8502171357296140, .i = -0.5264321628773561}, { .r = -0.9829730996839018, .i = -0.1837495178165704}, { .r = -0.9829730996839018, .i = 0.1837495178165701}, { .r = -0.8502171357296143, .i = 0.5264321628773555}, { .r = -0.6026346363792572, .i = 0.7980172272802388}, { .r = -0.2736629900720831, .i = 0.9618256431728190}, { .r = 0.0922683594633024, .i = 0.9957341762950345}, { .r = 0.4457383557765378, .i = 0.8951632913550626}, { .r = 0.7390089172206586, .i = 0.6736956436465578}, { .r = 0.9324722294043558, .i = 0.3612416661871530}, }, { { .r = 1.0000000000000000, .i = 0.0000000000000000}, { .r = 0.9324722294043558, .i = 0.3612416661871529}, { .r = 0.7390089172206591, .i = 0.6736956436465572}, { .r = 0.4457383557765383, .i = 0.8951632913550623}, { .r = 0.0922683594633020, .i = 0.9957341762950345}, { .r = -0.2736629900720827, .i = 0.9618256431728192}, { .r = -0.6026346363792563, .i = 0.7980172272802396}, { .r = -0.8502171357296140, .i = 0.5264321628773561}, { .r = -0.9829730996839018, .i = 0.1837495178165704}, { .r = -0.9829730996839018, .i = -0.1837495178165701}, { .r = -0.8502171357296143, .i = -0.5264321628773555}, { .r = -0.6026346363792572, .i = -0.7980172272802388}, { .r = -0.2736629900720831, .i = -0.9618256431728190}, { .r = 0.0922683594633024, .i = -0.9957341762950345}, { .r = 0.4457383557765378, .i = -0.8951632913550626}, { .r = 0.7390089172206586, .i = -0.6736956436465578}, { .r = 0.9324722294043558, .i = -0.3612416661871530}, } }; FORCE_INLINE fft_complex_t c_add17( const fft_complex_t x0, const fft_complex_t x1, const fft_complex_t x2, const fft_complex_t x3, const fft_complex_t x4, const fft_complex_t x5, const fft_complex_t x6, const fft_complex_t x7, const fft_complex_t x8, const fft_complex_t x9, const fft_complex_t x10, const fft_complex_t x11, const fft_complex_t x12, const fft_complex_t x13, const fft_complex_t x14, const fft_complex_t x15, const fft_complex_t x16) { fft_complex_t result = { .r = x0.r + x1.r + x2.r + x3.r + x4.r + x5.r + x6.r + x7.r + x8.r + x9.r + x10.r + x11.r + x12.r + x13.r + x14.r + x15.r + x16.r, .i = x0.i + x1.i + x2.i + x3.i + x4.i + x5.i + x6.i + x7.i + x8.i + x9.i + x10.i + x11.i + x12.i + x13.i + x14.i + x15.i + x16.i }; return result; } #define CALC_S17(k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12, k13, k14, k15, k16) \ c_add17(X(0), \ c_mul(w[k1], X(1)), c_mul(w[k2], X(2)), c_mul(w[k3], X(3)), c_mul(w[k4], X(4)), c_mul(w[k5], X(5)), \ c_mul(w[k6], X(6)), c_mul(w[k7], X(7)), c_mul(w[k8], X(8)), c_mul(w[k9], X(9)), c_mul(w[k10], X(10)), \ c_mul(w[k11], X(11)), c_mul(w[k12], X(12)), c_mul(w[k13], X(13)), c_mul(w[k14], X(14)), \ c_mul(w[k15], X(15)), c_mul(w[k16], X(16))) void fft_litho_c17(struct fft_plan_t *plan) { FFT_IMPLEMENTATION_BEGIN(plan, 17); const fft_complex_t *w = TWIDDLE_ARRAY_R17[plan->direction == FFT_LITHO_BACKWARD]; *ovp(plan, s, 0) = c_add17( X(0), X(1), X(2), X(3), X(4), X(5), X(6), X(7), X(8), X(9), X(10), X(11), X(12), X(13), X(14), X(15), X(16)); *ovp(plan, s, 1) = CALC_S17( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); *ovp(plan, s, 2) = CALC_S17( 2, 4, 6, 8, 10, 12, 14, 16, 1, 3, 5, 7, 9, 11, 13, 15); *ovp(plan, s, 3) = CALC_S17( 3, 6, 9, 12, 15, 1, 4, 7, 10, 13, 16, 2, 5, 8, 11, 14); *ovp(plan, s, 4) = CALC_S17( 4, 8, 12, 16, 3, 7, 11, 15, 2, 6, 10, 14, 1, 5, 9, 13); *ovp(plan, s, 5) = CALC_S17( 5, 10, 15, 3, 8, 13, 1, 6, 11, 16, 4, 9, 14, 2, 7, 12); *ovp(plan, s, 6) = CALC_S17( 6, 12, 1, 7, 13, 2, 8, 14, 3, 9, 15, 4, 10, 16, 5, 11); *ovp(plan, s, 7) = CALC_S17( 7, 14, 4, 11, 1, 8, 15, 5, 12, 2, 9, 16, 6, 13, 3, 10); *ovp(plan, s, 8) = CALC_S17( 8, 16, 7, 15, 6, 14, 5, 13, 4, 12, 3, 11, 2, 10, 1, 9); *ovp(plan, s, 9) = CALC_S17( 9, 1, 10, 2, 11, 3, 12, 4, 13, 5, 14, 6, 15, 7, 16, 8); *ovp(plan, s, 10) = CALC_S17(10, 3, 13, 6, 16, 9, 2, 12, 5, 15, 8, 1, 11, 4, 14, 7); *ovp(plan, s, 11) = CALC_S17(11, 5, 16, 10, 4, 15, 9, 3, 14, 8, 2, 13, 7, 1, 12, 6); *ovp(plan, s, 12) = CALC_S17(12, 7, 2, 14, 9, 4, 16, 11, 6, 1, 13, 8, 3, 15, 10, 5); *ovp(plan, s, 13) = CALC_S17(13, 9, 5, 1, 14, 10, 6, 2, 15, 11, 7, 3, 16, 12, 8, 4); *ovp(plan, s, 14) = CALC_S17(14, 11, 8, 5, 2, 16, 13, 10, 7, 4, 1, 15, 12, 9, 6, 3); *ovp(plan, s, 15) = CALC_S17(15, 13, 11, 9, 7, 5, 3, 1, 16, 14, 12, 10, 8, 6, 4, 2); *ovp(plan, s, 16) = CALC_S17(16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1); FFT_IMPLEMENTATION_END(plan); } const static fft_complex_t TWIDDLE_ARRAY_R19[2][19] = { { { .r = 1.0000000000000000, .i = 0.0000000000000000}, { .r = 0.9458172417006346, .i = -0.3246994692046835}, { .r = 0.7891405093963937, .i = -0.6142127126896678}, { .r = 0.5469481581224270, .i = -0.8371664782625285}, { .r = 0.2454854871407992, .i = -0.9694002659393304}, { .r = -0.0825793454723323, .i = -0.9965844930066698}, { .r = -0.4016954246529693, .i = -0.9157733266550575}, { .r = -0.6772815716257409, .i = -0.7357239106731317}, { .r = -0.8794737512064890, .i = -0.4759473930370737}, { .r = -0.9863613034027223, .i = -0.1645945902807340}, { .r = -0.9863613034027224, .i = 0.1645945902807338}, { .r = -0.8794737512064893, .i = 0.4759473930370731}, { .r = -0.6772815716257414, .i = 0.7357239106731313}, { .r = -0.4016954246529699, .i = 0.9157733266550573}, { .r = -0.0825793454723327, .i = 0.9965844930066698}, { .r = 0.2454854871407979, .i = 0.9694002659393307}, { .r = 0.5469481581224266, .i = 0.8371664782625288}, { .r = 0.7891405093963935, .i = 0.6142127126896680}, { .r = 0.9458172417006346, .i = 0.3246994692046837}, }, { { .r = 1.0000000000000000, .i = 0.0000000000000000}, { .r = 0.9458172417006346, .i = 0.3246994692046835}, { .r = 0.7891405093963937, .i = 0.6142127126896678}, { .r = 0.5469481581224270, .i = 0.8371664782625285}, { .r = 0.2454854871407992, .i = 0.9694002659393304}, { .r = -0.0825793454723323, .i = 0.9965844930066698}, { .r = -0.4016954246529693, .i = 0.9157733266550575}, { .r = -0.6772815716257409, .i = 0.7357239106731317}, { .r = -0.8794737512064890, .i = 0.4759473930370737}, { .r = -0.9863613034027223, .i = 0.1645945902807340}, { .r = -0.9863613034027224, .i = -0.1645945902807338}, { .r = -0.8794737512064893, .i = -0.4759473930370731}, { .r = -0.6772815716257414, .i = -0.7357239106731313}, { .r = -0.4016954246529699, .i = -0.9157733266550573}, { .r = -0.0825793454723327, .i = -0.9965844930066698}, { .r = 0.2454854871407979, .i = -0.9694002659393307}, { .r = 0.5469481581224266, .i = -0.8371664782625288}, { .r = 0.7891405093963935, .i = -0.6142127126896680}, { .r = 0.9458172417006346, .i = -0.3246994692046837}, } }; FORCE_INLINE fft_complex_t c_add19(const fft_complex_t x0, const fft_complex_t x1, const fft_complex_t x2, const fft_complex_t x3, const fft_complex_t x4, const fft_complex_t x5, const fft_complex_t x6, const fft_complex_t x7, const fft_complex_t x8, const fft_complex_t x9, const fft_complex_t x10, const fft_complex_t x11, const fft_complex_t x12, const fft_complex_t x13, const fft_complex_t x14, const fft_complex_t x15, const fft_complex_t x16, const fft_complex_t x17, const fft_complex_t x18) { fft_complex_t result = { .r = x0.r + x1.r + x2.r + x3.r + x4.r + x5.r + x6.r + x7.r + x8.r + x9.r + x10.r + x11.r + x12.r + x13.r + x14.r + x15.r + x16.r + x17.r + x18.r, .i = x0.i + x1.i + x2.i + x3.i + x4.i + x5.i + x6.i + x7.i + x8.i + x9.i + x10.i + x11.i + x12.i + x13.i + x14.i + x15.i + x16.i + x17.i + x18.i }; return result; } #define CALC_S19(k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12, k13, k14, k15, k16, k17, k18) \ c_add19(X(0), c_mul(w[k1], X(1)), c_mul(w[k2], X(2)), c_mul(w[k3], X(3)), c_mul(w[k4], X(4)), c_mul(w[k5], X(5)), c_mul(w[k6], X(6)), c_mul(w[k7], X(7)), c_mul(w[k8], X(8)), c_mul(w[k9], X(9)), c_mul(w[k10], X(10)), c_mul(w[k11], X(11)), c_mul(w[k12], X(12)), c_mul(w[k13], X(13)), c_mul(w[k14], X(14)), c_mul(w[k15], X(15)), c_mul(w[k16], X(16)), c_mul(w[k17], X(17)), c_mul(w[k18], X(18))) void fft_litho_c19(struct fft_plan_t *plan) { FFT_IMPLEMENTATION_BEGIN(plan, 19) ; const fft_complex_t *w = TWIDDLE_ARRAY_R19[plan->direction == FFT_LITHO_BACKWARD]; *ovp(plan, s, 0) = c_add19(X(0), X(1), X(2), X(3), X(4), X(5), X(6), X(7), X(8), X(9), X(10), X(11), X(12), X(13), X(14), X(15), X(16), X(17), X(18)); *ovp(plan, s, 0) = CALC_S19(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); *ovp(plan, s, 1) = CALC_S19(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18); *ovp(plan, s, 2) = CALC_S19(2, 4, 6, 8, 10, 12, 14, 16, 18, 1, 3, 5, 7, 9, 11, 13, 15, 17); *ovp(plan, s, 3) = CALC_S19(3, 6, 9, 12, 15, 18, 2, 5, 8, 11, 14, 17, 1, 4, 7, 10, 13, 16); *ovp(plan, s, 4) = CALC_S19(4, 8, 12, 16, 1, 5, 9, 13, 17, 2, 6, 10, 14, 18, 3, 7, 11, 15); *ovp(plan, s, 5) = CALC_S19(5, 10, 15, 1, 6, 11, 16, 2, 7, 12, 17, 3, 8, 13, 18, 4, 9, 14); *ovp(plan, s, 6) = CALC_S19(6, 12, 18, 5, 11, 17, 4, 10, 16, 3, 9, 15, 2, 8, 14, 1, 7, 13); *ovp(plan, s, 7) = CALC_S19(7, 14, 2, 9, 16, 4, 11, 18, 6, 13, 1, 8, 15, 3, 10, 17, 5, 12); *ovp(plan, s, 8) = CALC_S19(8, 16, 5, 13, 2, 10, 18, 7, 15, 4, 12, 1, 9, 17, 6, 14, 3, 11); *ovp(plan, s, 9) = CALC_S19(9, 18, 8, 17, 7, 16, 6, 15, 5, 14, 4, 13, 3, 12, 2, 11, 1, 10); *ovp(plan, s, 10) = CALC_S19(10, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 18, 9); *ovp(plan, s, 11) = CALC_S19(11, 3, 14, 6, 17, 9, 1, 12, 4, 15, 7, 18, 10, 2, 13, 5, 16, 8); *ovp(plan, s, 12) = CALC_S19(12, 5, 17, 10, 3, 15, 8, 1, 13, 6, 18, 11, 4, 16, 9, 2, 14, 7); *ovp(plan, s, 13) = CALC_S19(13, 7, 1, 14, 8, 2, 15, 9, 3, 16, 10, 4, 17, 11, 5, 18, 12, 6); *ovp(plan, s, 14) = CALC_S19(14, 9, 4, 18, 13, 8, 3, 17, 12, 7, 2, 16, 11, 6, 1, 15, 10, 5); *ovp(plan, s, 15) = CALC_S19(15, 11, 7, 3, 18, 14, 10, 6, 2, 17, 13, 9, 5, 1, 16, 12, 8, 4); *ovp(plan, s, 16) = CALC_S19(16, 13, 10, 7, 4, 1, 17, 14, 11, 8, 5, 2, 18, 15, 12, 9, 6, 3); *ovp(plan, s, 17) = CALC_S19(17, 15, 13, 11, 9, 7, 5, 3, 1, 18, 16, 14, 12, 10, 8, 6, 4, 2); *ovp(plan, s, 18) = CALC_S19(18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1); FFT_IMPLEMENTATION_END(plan); } const static fft_complex_t TWIDDLE_ARRAY_R47[2][47] = { { { .r = 1.0000000000000000, .i = 0.0000000000000000}, { .r = 0.9910774881547801, .i = -0.1332869553737788}, { .r = 0.9644691750543766, .i = -0.2641954018712860}, { .r = 0.9206498866764288, .i = -0.3903892751634948}, { .r = 0.8604015792601394, .i = -0.5096166425919174}, { .r = 0.7847993852786610, .i = -0.6197498889602449}, { .r = 0.6951924276746423, .i = -0.7188236838779293}, { .r = 0.5931797447293553, .i = -0.8050700531275629}, { .r = 0.4805817551866838, .i = -0.8769499282066715}, { .r = 0.3594077728375128, .i = -0.9331806110416025}, { .r = 0.2318201502675284, .i = -0.9727586637650372}, { .r = 0.1000956916240987, .i = -0.9949778150885040}, { .r = -0.0334149770076745, .i = -0.9994415637302546}, { .r = -0.1663293545831300, .i = -0.9860702539900286}, { .r = -0.2962755808856338, .i = -0.9551024972069124}, { .r = -0.4209347624283349, .i = -0.9070909137343408}, { .r = -0.5380823531633726, .i = -0.8428922714167971}, { .r = -0.6456278515588023, .i = -0.7636521965473321}, { .r = -0.7416521056479576, .i = -0.6707847301392235}, { .r = -0.8244415603417601, .i = -0.5659470943305954}, { .r = -0.8925188358598811, .i = -0.4510101192161021}, { .r = -0.9446690916079189, .i = -0.3280248578395689}, { .r = -0.9799617050365866, .i = -0.1991859851038367}, { .r = -0.9977668786231532, .i = -0.0667926337451217}, { .r = -0.9977668786231532, .i = 0.0667926337451215}, { .r = -0.9799617050365869, .i = 0.1991859851038361}, { .r = -0.9446690916079188, .i = 0.3280248578395691}, { .r = -0.8925188358598815, .i = 0.4510101192161015}, { .r = -0.8244415603417605, .i = 0.5659470943305949}, { .r = -0.7416521056479577, .i = 0.6707847301392232}, { .r = -0.6456278515588026, .i = 0.7636521965473319}, { .r = -0.5380823531633728, .i = 0.8428922714167969}, { .r = -0.4209347624283351, .i = 0.9070909137343407}, { .r = -0.2962755808856340, .i = 0.9551024972069124}, { .r = -0.1663293545831301, .i = 0.9860702539900286}, { .r = -0.0334149770076754, .i = 0.9994415637302546}, { .r = 0.1000956916240984, .i = 0.9949778150885040}, { .r = 0.2318201502675284, .i = 0.9727586637650372}, { .r = 0.3594077728375122, .i = 0.9331806110416028}, { .r = 0.4805817551866832, .i = 0.8769499282066718}, { .r = 0.5931797447293546, .i = 0.8050700531275633}, { .r = 0.6951924276746418, .i = 0.7188236838779297}, { .r = 0.7847993852786612, .i = 0.6197498889602445}, { .r = 0.8604015792601392, .i = 0.5096166425919177}, { .r = 0.9206498866764283, .i = 0.3903892751634960}, { .r = 0.9644691750543765, .i = 0.2641954018712863}, { .r = 0.9910774881547800, .i = 0.1332869553737791}, }, { { .r = 1.0000000000000000, .i = 0.0000000000000000}, { .r = 0.9910774881547801, .i = 0.1332869553737788}, { .r = 0.9644691750543766, .i = 0.2641954018712860}, { .r = 0.9206498866764288, .i = 0.3903892751634948}, { .r = 0.8604015792601394, .i = 0.5096166425919174}, { .r = 0.7847993852786610, .i = 0.6197498889602449}, { .r = 0.6951924276746423, .i = 0.7188236838779293}, { .r = 0.5931797447293553, .i = 0.8050700531275629}, { .r = 0.4805817551866838, .i = 0.8769499282066715}, { .r = 0.3594077728375128, .i = 0.9331806110416025}, { .r = 0.2318201502675284, .i = 0.9727586637650372}, { .r = 0.1000956916240987, .i = 0.9949778150885040}, { .r = -0.0334149770076745, .i = 0.9994415637302546}, { .r = -0.1663293545831300, .i = 0.9860702539900286}, { .r = -0.2962755808856338, .i = 0.9551024972069124}, { .r = -0.4209347624283349, .i = 0.9070909137343408}, { .r = -0.5380823531633726, .i = 0.8428922714167971}, { .r = -0.6456278515588023, .i = 0.7636521965473321}, { .r = -0.7416521056479576, .i = 0.6707847301392235}, { .r = -0.8244415603417601, .i = 0.5659470943305954}, { .r = -0.8925188358598811, .i = 0.4510101192161021}, { .r = -0.9446690916079189, .i = 0.3280248578395689}, { .r = -0.9799617050365866, .i = 0.1991859851038367}, { .r = -0.9977668786231532, .i = 0.0667926337451217}, { .r = -0.9977668786231532, .i = -0.0667926337451215}, { .r = -0.9799617050365869, .i = -0.1991859851038361}, { .r = -0.9446690916079188, .i = -0.3280248578395691}, { .r = -0.8925188358598815, .i = -0.4510101192161015}, { .r = -0.8244415603417605, .i = -0.5659470943305949}, { .r = -0.7416521056479577, .i = -0.6707847301392232}, { .r = -0.6456278515588026, .i = -0.7636521965473319}, { .r = -0.5380823531633728, .i = -0.8428922714167969}, { .r = -0.4209347624283351, .i = -0.9070909137343407}, { .r = -0.2962755808856340, .i = -0.9551024972069124}, { .r = -0.1663293545831301, .i = -0.9860702539900286}, { .r = -0.0334149770076754, .i = -0.9994415637302546}, { .r = 0.1000956916240984, .i = -0.9949778150885040}, { .r = 0.2318201502675284, .i = -0.9727586637650372}, { .r = 0.3594077728375122, .i = -0.9331806110416028}, { .r = 0.4805817551866832, .i = -0.8769499282066718}, { .r = 0.5931797447293546, .i = -0.8050700531275633}, { .r = 0.6951924276746418, .i = -0.7188236838779297}, { .r = 0.7847993852786612, .i = -0.6197498889602445}, { .r = 0.8604015792601392, .i = -0.5096166425919177}, { .r = 0.9206498866764283, .i = -0.3903892751634960}, { .r = 0.9644691750543765, .i = -0.2641954018712863}, { .r = 0.9910774881547800, .i = -0.1332869553737791}, } }; FORCE_INLINE fft_complex_t c_add47(const fft_complex_t x0, const fft_complex_t x1, const fft_complex_t x2, const fft_complex_t x3, const fft_complex_t x4, const fft_complex_t x5, const fft_complex_t x6, const fft_complex_t x7, const fft_complex_t x8, const fft_complex_t x9, const fft_complex_t x10, const fft_complex_t x11, const fft_complex_t x12, const fft_complex_t x13, const fft_complex_t x14, const fft_complex_t x15, const fft_complex_t x16, const fft_complex_t x17, const fft_complex_t x18, const fft_complex_t x19, const fft_complex_t x20, const fft_complex_t x21, const fft_complex_t x22, const fft_complex_t x23, const fft_complex_t x24, const fft_complex_t x25, const fft_complex_t x26, const fft_complex_t x27, const fft_complex_t x28, const fft_complex_t x29, const fft_complex_t x30, const fft_complex_t x31, const fft_complex_t x32, const fft_complex_t x33, const fft_complex_t x34, const fft_complex_t x35, const fft_complex_t x36, const fft_complex_t x37, const fft_complex_t x38, const fft_complex_t x39, const fft_complex_t x40, const fft_complex_t x41, const fft_complex_t x42, const fft_complex_t x43, const fft_complex_t x44, const fft_complex_t x45, const fft_complex_t x46) { fft_complex_t result = { .r = x0.r + x1.r + x2.r + x3.r + x4.r + x5.r + x6.r + x7.r + x8.r + x9.r + x10.r + x11.r + x12.r + x13.r + x14.r + x15.r + x16.r + x17.r + x18.r + x19.r + x20.r + x21.r + x22.r + x23.r + x24.r + x25.r + x26.r + x27.r + x28.r + x29.r + x30.r + x31.r + x32.r + x33.r + x34.r + x35.r + x36.r + x37.r + x38.r + x39.r + x40.r + x41.r + x42.r + x43.r + x44.r + x45.r + x46.r, .i = x0.i + x1.i + x2.i + x3.i + x4.i + x5.i + x6.i + x7.i + x8.i + x9.i + x10.i + x11.i + x12.i + x13.i + x14.i + x15.i + x16.i + x17.i + x18.i + x19.i + x20.i + x21.i + x22.i + x23.i + x24.i + x25.i + x26.i + x27.i + x28.i + x29.i + x30.i + x31.i + x32.i + x33.i + x34.i + x35.i + x36.i + x37.i + x38.i + x39.i + x40.i + x41.i + x42.i + x43.i + x44.i + x45.i + x46.i }; return result; } #define CALC_S47(k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46) \ c_add47(X(0), c_mul(w[k1], X(1)), c_mul(w[k2], X(2)), c_mul(w[k3], X(3)), c_mul(w[k4], X(4)), c_mul(w[k5], X(5)), c_mul(w[k6], X(6)), c_mul(w[k7], X(7)), c_mul(w[k8], X(8)), c_mul(w[k9], X(9)), c_mul(w[k10], X(10)), c_mul(w[k11], X(11)), c_mul(w[k12], X(12)), c_mul(w[k13], X(13)), c_mul(w[k14], X(14)), c_mul(w[k15], X(15)), c_mul(w[k16], X(16)), c_mul(w[k17], X(17)), c_mul(w[k18], X(18)), c_mul(w[k19], X(19)), c_mul(w[k20], X(20)), c_mul(w[k21], X(21)), c_mul(w[k22], X(22)), c_mul(w[k23], X(23)), c_mul(w[k24], X(24)), c_mul(w[k25], X(25)), c_mul(w[k26], X(26)), c_mul(w[k27], X(27)), c_mul(w[k28], X(28)), c_mul(w[k29], X(29)), c_mul(w[k30], X(30)), c_mul(w[k31], X(31)), c_mul(w[k32], X(32)), c_mul(w[k33], X(33)), c_mul(w[k34], X(34)), c_mul(w[k35], X(35)), c_mul(w[k36], X(36)), c_mul(w[k37], X(37)), c_mul(w[k38], X(38)), c_mul(w[k39], X(39)), c_mul(w[k40], X(40)), c_mul(w[k41], X(41)), c_mul(w[k42], X(42)), c_mul(w[k43], X(43)), c_mul(w[k44], X(44)), c_mul(w[k45], X(45)), c_mul(w[k46], X(46))) void fft_litho_c47(struct fft_plan_t *plan) { FFT_IMPLEMENTATION_BEGIN(plan, 47); const fft_complex_t *w = TWIDDLE_ARRAY_R47[plan->direction == FFT_LITHO_BACKWARD]; *ovp(plan, s, 0) = c_add47(X(0), X(1), X(2), X(3), X(4), X(5), X(6), X(7), X(8), X(9), X(10), X(11), X(12), X(13), X(14), X(15), X(16), X(17), X(18), X(19), X(20), X(21), X(22), X(23), X(24), X(25), X(26), X(27), X(28), X(29), X(30), X(31), X(32), X(33), X(34), X(35), X(36), X(37), X(38), X(39), X(40), X(41), X(42), X(43), X(44), X(45), X(46)); *ovp(plan, s, 0) = CALC_S47( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); *ovp(plan, s, 1) = CALC_S47( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46); *ovp(plan, s, 2) = CALC_S47( 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45); *ovp(plan, s, 3) = CALC_S47( 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44); *ovp(plan, s, 4) = CALC_S47( 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43); *ovp(plan, s, 5) = CALC_S47( 5, 10, 15, 20, 25, 30, 35, 40, 45, 3, 8, 13, 18, 23, 28, 33, 38, 43, 1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 4, 9, 14, 19, 24, 29, 34, 39, 44, 2, 7, 12, 17, 22, 27, 32, 37, 42); *ovp(plan, s, 6) = CALC_S47( 6, 12, 18, 24, 30, 36, 42, 1, 7, 13, 19, 25, 31, 37, 43, 2, 8, 14, 20, 26, 32, 38, 44, 3, 9, 15, 21, 27, 33, 39, 45, 4, 10, 16, 22, 28, 34, 40, 46, 5, 11, 17, 23, 29, 35, 41); *ovp(plan, s, 7) = CALC_S47( 7, 14, 21, 28, 35, 42, 2, 9, 16, 23, 30, 37, 44, 4, 11, 18, 25, 32, 39, 46, 6, 13, 20, 27, 34, 41, 1, 8, 15, 22, 29, 36, 43, 3, 10, 17, 24, 31, 38, 45, 5, 12, 19, 26, 33, 40); *ovp(plan, s, 8) = CALC_S47( 8, 16, 24, 32, 40, 1, 9, 17, 25, 33, 41, 2, 10, 18, 26, 34, 42, 3, 11, 19, 27, 35, 43, 4, 12, 20, 28, 36, 44, 5, 13, 21, 29, 37, 45, 6, 14, 22, 30, 38, 46, 7, 15, 23, 31, 39); *ovp(plan, s, 9) = CALC_S47( 9, 18, 27, 36, 45, 7, 16, 25, 34, 43, 5, 14, 23, 32, 41, 3, 12, 21, 30, 39, 1, 10, 19, 28, 37, 46, 8, 17, 26, 35, 44, 6, 15, 24, 33, 42, 4, 13, 22, 31, 40, 2, 11, 20, 29, 38); *ovp(plan, s, 10) = CALC_S47(10, 20, 30, 40, 3, 13, 23, 33, 43, 6, 16, 26, 36, 46, 9, 19, 29, 39, 2, 12, 22, 32, 42, 5, 15, 25, 35, 45, 8, 18, 28, 38, 1, 11, 21, 31, 41, 4, 14, 24, 34, 44, 7, 17, 27, 37); *ovp(plan, s, 11) = CALC_S47(11, 22, 33, 44, 8, 19, 30, 41, 5, 16, 27, 38, 2, 13, 24, 35, 46, 10, 21, 32, 43, 7, 18, 29, 40, 4, 15, 26, 37, 1, 12, 23, 34, 45, 9, 20, 31, 42, 6, 17, 28, 39, 3, 14, 25, 36); *ovp(plan, s, 12) = CALC_S47(12, 24, 36, 1, 13, 25, 37, 2, 14, 26, 38, 3, 15, 27, 39, 4, 16, 28, 40, 5, 17, 29, 41, 6, 18, 30, 42, 7, 19, 31, 43, 8, 20, 32, 44, 9, 21, 33, 45, 10, 22, 34, 46, 11, 23, 35); *ovp(plan, s, 13) = CALC_S47(13, 26, 39, 5, 18, 31, 44, 10, 23, 36, 2, 15, 28, 41, 7, 20, 33, 46, 12, 25, 38, 4, 17, 30, 43, 9, 22, 35, 1, 14, 27, 40, 6, 19, 32, 45, 11, 24, 37, 3, 16, 29, 42, 8, 21, 34); *ovp(plan, s, 14) = CALC_S47(14, 28, 42, 9, 23, 37, 4, 18, 32, 46, 13, 27, 41, 8, 22, 36, 3, 17, 31, 45, 12, 26, 40, 7, 21, 35, 2, 16, 30, 44, 11, 25, 39, 6, 20, 34, 1, 15, 29, 43, 10, 24, 38, 5, 19, 33); *ovp(plan, s, 15) = CALC_S47(15, 30, 45, 13, 28, 43, 11, 26, 41, 9, 24, 39, 7, 22, 37, 5, 20, 35, 3, 18, 33, 1, 16, 31, 46, 14, 29, 44, 12, 27, 42, 10, 25, 40, 8, 23, 38, 6, 21, 36, 4, 19, 34, 2, 17, 32); *ovp(plan, s, 16) = CALC_S47(16, 32, 1, 17, 33, 2, 18, 34, 3, 19, 35, 4, 20, 36, 5, 21, 37, 6, 22, 38, 7, 23, 39, 8, 24, 40, 9, 25, 41, 10, 26, 42, 11, 27, 43, 12, 28, 44, 13, 29, 45, 14, 30, 46, 15, 31); *ovp(plan, s, 17) = CALC_S47(17, 34, 4, 21, 38, 8, 25, 42, 12, 29, 46, 16, 33, 3, 20, 37, 7, 24, 41, 11, 28, 45, 15, 32, 2, 19, 36, 6, 23, 40, 10, 27, 44, 14, 31, 1, 18, 35, 5, 22, 39, 9, 26, 43, 13, 30); *ovp(plan, s, 18) = CALC_S47(18, 36, 7, 25, 43, 14, 32, 3, 21, 39, 10, 28, 46, 17, 35, 6, 24, 42, 13, 31, 2, 20, 38, 9, 27, 45, 16, 34, 5, 23, 41, 12, 30, 1, 19, 37, 8, 26, 44, 15, 33, 4, 22, 40, 11, 29); *ovp(plan, s, 19) = CALC_S47(19, 38, 10, 29, 1, 20, 39, 11, 30, 2, 21, 40, 12, 31, 3, 22, 41, 13, 32, 4, 23, 42, 14, 33, 5, 24, 43, 15, 34, 6, 25, 44, 16, 35, 7, 26, 45, 17, 36, 8, 27, 46, 18, 37, 9, 28); *ovp(plan, s, 20) = CALC_S47(20, 40, 13, 33, 6, 26, 46, 19, 39, 12, 32, 5, 25, 45, 18, 38, 11, 31, 4, 24, 44, 17, 37, 10, 30, 3, 23, 43, 16, 36, 9, 29, 2, 22, 42, 15, 35, 8, 28, 1, 21, 41, 14, 34, 7, 27); *ovp(plan, s, 21) = CALC_S47(21, 42, 16, 37, 11, 32, 6, 27, 1, 22, 43, 17, 38, 12, 33, 7, 28, 2, 23, 44, 18, 39, 13, 34, 8, 29, 3, 24, 45, 19, 40, 14, 35, 9, 30, 4, 25, 46, 20, 41, 15, 36, 10, 31, 5, 26); *ovp(plan, s, 22) = CALC_S47(22, 44, 19, 41, 16, 38, 13, 35, 10, 32, 7, 29, 4, 26, 1, 23, 45, 20, 42, 17, 39, 14, 36, 11, 33, 8, 30, 5, 27, 2, 24, 46, 21, 43, 18, 40, 15, 37, 12, 34, 9, 31, 6, 28, 3, 25); *ovp(plan, s, 23) = CALC_S47(23, 46, 22, 45, 21, 44, 20, 43, 19, 42, 18, 41, 17, 40, 16, 39, 15, 38, 14, 37, 13, 36, 12, 35, 11, 34, 10, 33, 9, 32, 8, 31, 7, 30, 6, 29, 5, 28, 4, 27, 3, 26, 2, 25, 1, 24); *ovp(plan, s, 24) = CALC_S47(24, 1, 25, 2, 26, 3, 27, 4, 28, 5, 29, 6, 30, 7, 31, 8, 32, 9, 33, 10, 34, 11, 35, 12, 36, 13, 37, 14, 38, 15, 39, 16, 40, 17, 41, 18, 42, 19, 43, 20, 44, 21, 45, 22, 46, 23); *ovp(plan, s, 25) = CALC_S47(25, 3, 28, 6, 31, 9, 34, 12, 37, 15, 40, 18, 43, 21, 46, 24, 2, 27, 5, 30, 8, 33, 11, 36, 14, 39, 17, 42, 20, 45, 23, 1, 26, 4, 29, 7, 32, 10, 35, 13, 38, 16, 41, 19, 44, 22); *ovp(plan, s, 26) = CALC_S47(26, 5, 31, 10, 36, 15, 41, 20, 46, 25, 4, 30, 9, 35, 14, 40, 19, 45, 24, 3, 29, 8, 34, 13, 39, 18, 44, 23, 2, 28, 7, 33, 12, 38, 17, 43, 22, 1, 27, 6, 32, 11, 37, 16, 42, 21); *ovp(plan, s, 27) = CALC_S47(27, 7, 34, 14, 41, 21, 1, 28, 8, 35, 15, 42, 22, 2, 29, 9, 36, 16, 43, 23, 3, 30, 10, 37, 17, 44, 24, 4, 31, 11, 38, 18, 45, 25, 5, 32, 12, 39, 19, 46, 26, 6, 33, 13, 40, 20); *ovp(plan, s, 28) = CALC_S47(28, 9, 37, 18, 46, 27, 8, 36, 17, 45, 26, 7, 35, 16, 44, 25, 6, 34, 15, 43, 24, 5, 33, 14, 42, 23, 4, 32, 13, 41, 22, 3, 31, 12, 40, 21, 2, 30, 11, 39, 20, 1, 29, 10, 38, 19); *ovp(plan, s, 29) = CALC_S47(29, 11, 40, 22, 4, 33, 15, 44, 26, 8, 37, 19, 1, 30, 12, 41, 23, 5, 34, 16, 45, 27, 9, 38, 20, 2, 31, 13, 42, 24, 6, 35, 17, 46, 28, 10, 39, 21, 3, 32, 14, 43, 25, 7, 36, 18); *ovp(plan, s, 30) = CALC_S47(30, 13, 43, 26, 9, 39, 22, 5, 35, 18, 1, 31, 14, 44, 27, 10, 40, 23, 6, 36, 19, 2, 32, 15, 45, 28, 11, 41, 24, 7, 37, 20, 3, 33, 16, 46, 29, 12, 42, 25, 8, 38, 21, 4, 34, 17); *ovp(plan, s, 31) = CALC_S47(31, 15, 46, 30, 14, 45, 29, 13, 44, 28, 12, 43, 27, 11, 42, 26, 10, 41, 25, 9, 40, 24, 8, 39, 23, 7, 38, 22, 6, 37, 21, 5, 36, 20, 4, 35, 19, 3, 34, 18, 2, 33, 17, 1, 32, 16); *ovp(plan, s, 32) = CALC_S47(32, 17, 2, 34, 19, 4, 36, 21, 6, 38, 23, 8, 40, 25, 10, 42, 27, 12, 44, 29, 14, 46, 31, 16, 1, 33, 18, 3, 35, 20, 5, 37, 22, 7, 39, 24, 9, 41, 26, 11, 43, 28, 13, 45, 30, 15); *ovp(plan, s, 33) = CALC_S47(33, 19, 5, 38, 24, 10, 43, 29, 15, 1, 34, 20, 6, 39, 25, 11, 44, 30, 16, 2, 35, 21, 7, 40, 26, 12, 45, 31, 17, 3, 36, 22, 8, 41, 27, 13, 46, 32, 18, 4, 37, 23, 9, 42, 28, 14); *ovp(plan, s, 34) = CALC_S47(34, 21, 8, 42, 29, 16, 3, 37, 24, 11, 45, 32, 19, 6, 40, 27, 14, 1, 35, 22, 9, 43, 30, 17, 4, 38, 25, 12, 46, 33, 20, 7, 41, 28, 15, 2, 36, 23, 10, 44, 31, 18, 5, 39, 26, 13); *ovp(plan, s, 35) = CALC_S47(35, 23, 11, 46, 34, 22, 10, 45, 33, 21, 9, 44, 32, 20, 8, 43, 31, 19, 7, 42, 30, 18, 6, 41, 29, 17, 5, 40, 28, 16, 4, 39, 27, 15, 3, 38, 26, 14, 2, 37, 25, 13, 1, 36, 24, 12); *ovp(plan, s, 36) = CALC_S47(36, 25, 14, 3, 39, 28, 17, 6, 42, 31, 20, 9, 45, 34, 23, 12, 1, 37, 26, 15, 4, 40, 29, 18, 7, 43, 32, 21, 10, 46, 35, 24, 13, 2, 38, 27, 16, 5, 41, 30, 19, 8, 44, 33, 22, 11); *ovp(plan, s, 37) = CALC_S47(37, 27, 17, 7, 44, 34, 24, 14, 4, 41, 31, 21, 11, 1, 38, 28, 18, 8, 45, 35, 25, 15, 5, 42, 32, 22, 12, 2, 39, 29, 19, 9, 46, 36, 26, 16, 6, 43, 33, 23, 13, 3, 40, 30, 20, 10); *ovp(plan, s, 38) = CALC_S47(38, 29, 20, 11, 2, 40, 31, 22, 13, 4, 42, 33, 24, 15, 6, 44, 35, 26, 17, 8, 46, 37, 28, 19, 10, 1, 39, 30, 21, 12, 3, 41, 32, 23, 14, 5, 43, 34, 25, 16, 7, 45, 36, 27, 18, 9); *ovp(plan, s, 39) = CALC_S47(39, 31, 23, 15, 7, 46, 38, 30, 22, 14, 6, 45, 37, 29, 21, 13, 5, 44, 36, 28, 20, 12, 4, 43, 35, 27, 19, 11, 3, 42, 34, 26, 18, 10, 2, 41, 33, 25, 17, 9, 1, 40, 32, 24, 16, 8); *ovp(plan, s, 40) = CALC_S47(40, 33, 26, 19, 12, 5, 45, 38, 31, 24, 17, 10, 3, 43, 36, 29, 22, 15, 8, 1, 41, 34, 27, 20, 13, 6, 46, 39, 32, 25, 18, 11, 4, 44, 37, 30, 23, 16, 9, 2, 42, 35, 28, 21, 14, 7); *ovp(plan, s, 41) = CALC_S47(41, 35, 29, 23, 17, 11, 5, 46, 40, 34, 28, 22, 16, 10, 4, 45, 39, 33, 27, 21, 15, 9, 3, 44, 38, 32, 26, 20, 14, 8, 2, 43, 37, 31, 25, 19, 13, 7, 1, 42, 36, 30, 24, 18, 12, 6); *ovp(plan, s, 42) = CALC_S47(42, 37, 32, 27, 22, 17, 12, 7, 2, 44, 39, 34, 29, 24, 19, 14, 9, 4, 46, 41, 36, 31, 26, 21, 16, 11, 6, 1, 43, 38, 33, 28, 23, 18, 13, 8, 3, 45, 40, 35, 30, 25, 20, 15, 10, 5); *ovp(plan, s, 43) = CALC_S47(43, 39, 35, 31, 27, 23, 19, 15, 11, 7, 3, 46, 42, 38, 34, 30, 26, 22, 18, 14, 10, 6, 2, 45, 41, 37, 33, 29, 25, 21, 17, 13, 9, 5, 1, 44, 40, 36, 32, 28, 24, 20, 16, 12, 8, 4); *ovp(plan, s, 44) = CALC_S47(44, 41, 38, 35, 32, 29, 26, 23, 20, 17, 14, 11, 8, 5, 2, 46, 43, 40, 37, 34, 31, 28, 25, 22, 19, 16, 13, 10, 7, 4, 1, 45, 42, 39, 36, 33, 30, 27, 24, 21, 18, 15, 12, 9, 6, 3); *ovp(plan, s, 45) = CALC_S47(45, 43, 41, 39, 37, 35, 33, 31, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1, 46, 44, 42, 40, 38, 36, 34, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2); *ovp(plan, s, 46) = CALC_S47(46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1); FFT_IMPLEMENTATION_END(plan); } const fft_handler_desc_t fft_handlers[] = { { 2, fft_litho_c2}, { 3, fft_litho_c3}, { 4, fft_litho_c4}, { 5, fft_litho_c5}, { 6, fft_litho_c6}, { 7, fft_litho_c7}, { 11, fft_litho_c11}, { 13, fft_litho_c13}, { 17, fft_litho_c17}, { 19, fft_litho_c19}, { 47, fft_litho_c47}, }; const unsigned int FFT_IMPLEMENTED_RADIX_COUNT = sizeof(fft_handlers)/sizeof(fft_handler_desc_t); ================================================ FILE: OptolithiumC/libs/fourier/tools/generate_twiddles.m ================================================ twiddle_count = 2^14; line_count = 8; test_indx = 0; test_size = 8; x = (0:twiddle_count-1) * (2*pi) / twiddle_count; y = sin(x); imag_indx = length(y)/test_size*test_indx + 1; real_indx = mod(imag_indx + length(y)/4, length(y)); real_part = y(real_indx); imag_part = y(imag_indx); fprintf('Twiddle count = %d\n', twiddle_count); fprintf('%2d/%2d = %.4f %.4f\n', test_indx, test_size, real_part, imag_part); return; out = fopen('twiddle_array.h', 'w'); fprintf(out, '#ifndef TWIDDLE_ARRAY_H_\n'); fprintf(out, '#define TWIDDLE_ARRAY_H_\n'); fprintf(out, '#include \n'); fprintf(out, '#define TWIDDLE_ARRAY_SIZE %d\n', twiddle_count); fprintf(out, 'static double TWIDDLE_ARRAY[TWIDDLE_ARRAY_SIZE] = {\n'); for k = 1:line_count:length(y), fprintf(out, '%.16ff, ', y(k:k+line_count-1)); fprintf(out, '\n'); end; fprintf(out, '};\n'); fprintf(out, '#endif /* TWIDDLE_ARRAY_H_ */\n'); fclose(out); ================================================ FILE: OptolithiumC/libs/kissfft/CMakeLists.txt ================================================ CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0) PROJECT(polyclipping) SET(CMAKE_USE_RELATIVE_PATHS ON) SET(CMAKE_SKIP_RPATH TRUE) SET(CMAKE_BUILD_TYPE "Release") INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/include") ADD_LIBRARY(kissfft STATIC "src/kiss_fft.c" "src/kiss_fftnd.c" ) # CONFIGURE_FILE (polyclipping.pc.cmakein "${PCFILE}" @ONLY) # INSTALL (FILES clipper.hpp DESTINATION "${CMAKE_INSTALL_INCDIR}") # INSTALL (TARGETS polyclipping LIBRARY DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/lib") # INSTALL (FILES "${PCFILE}" DESTINATION "${CMAKE_INSTALL_PKGCONFIGDIR}") # SET_TARGET_PROPERTIES(polyclipping PROPERTIES VERSION 19.0.0 SOVERSION 19 ) ================================================ FILE: OptolithiumC/libs/kissfft/include/_kiss_fft_guts.h ================================================ /* Copyright (c) 2003-2010, Mark Borgerding All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* kiss_fft.h defines kiss_fft_scalar as either short or a float type and defines typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; }kiss_fft_cpx; */ #include "kiss_fft.h" #include #define MAXFACTORS 32 /* e.g. an fft of length 128 has 4 factors as far as kissfft is concerned 4*4*4*2 */ struct kiss_fft_state{ int nfft; int inverse; int factors[2*MAXFACTORS]; kiss_fft_cpx twiddles[1]; }; /* Explanation of macros dealing with complex math: C_MUL(m,a,b) : m = a*b C_FIXDIV( c , div ) : if a fixed point impl., c /= div. noop otherwise C_SUB( res, a,b) : res = a - b C_SUBFROM( res , a) : res -= a C_ADDTO( res , a) : res += a * */ #ifdef FIXED_POINT #if (FIXED_POINT==32) # define FRACBITS 31 # define SAMPPROD int64_t #define SAMP_MAX 2147483647 #else # define FRACBITS 15 # define SAMPPROD int32_t #define SAMP_MAX 32767 #endif #define SAMP_MIN -SAMP_MAX #if defined(CHECK_OVERFLOW) # define CHECK_OVERFLOW_OP(a,op,b) \ if ( (SAMPPROD)(a) op (SAMPPROD)(b) > SAMP_MAX || (SAMPPROD)(a) op (SAMPPROD)(b) < SAMP_MIN ) { \ fprintf(stderr,"WARNING:overflow @ " __FILE__ "(%d): (%d " #op" %d) = %ld\n",__LINE__,(a),(b),(SAMPPROD)(a) op (SAMPPROD)(b) ); } #endif # define smul(a,b) ( (SAMPPROD)(a)*(b) ) # define sround( x ) (kiss_fft_scalar)( ( (x) + (1<<(FRACBITS-1)) ) >> FRACBITS ) # define S_MUL(a,b) sround( smul(a,b) ) # define C_MUL(m,a,b) \ do{ (m).r = sround( smul((a).r,(b).r) - smul((a).i,(b).i) ); \ (m).i = sround( smul((a).r,(b).i) + smul((a).i,(b).r) ); }while(0) # define DIVSCALAR(x,k) \ (x) = sround( smul( x, SAMP_MAX/k ) ) # define C_FIXDIV(c,div) \ do { DIVSCALAR( (c).r , div); \ DIVSCALAR( (c).i , div); }while (0) # define C_MULBYSCALAR( c, s ) \ do{ (c).r = sround( smul( (c).r , s ) ) ;\ (c).i = sround( smul( (c).i , s ) ) ; }while(0) #else /* not FIXED_POINT*/ # define S_MUL(a,b) ( (a)*(b) ) #define C_MUL(m,a,b) \ do{ (m).r = (a).r*(b).r - (a).i*(b).i;\ (m).i = (a).r*(b).i + (a).i*(b).r; }while(0) # define C_FIXDIV(c,div) /* NOOP */ # define C_MULBYSCALAR( c, s ) \ do{ (c).r *= (s);\ (c).i *= (s); }while(0) #endif #ifndef CHECK_OVERFLOW_OP # define CHECK_OVERFLOW_OP(a,op,b) /* noop */ #endif #define C_ADD( res, a,b)\ do { \ CHECK_OVERFLOW_OP((a).r,+,(b).r)\ CHECK_OVERFLOW_OP((a).i,+,(b).i)\ (res).r=(a).r+(b).r; (res).i=(a).i+(b).i; \ }while(0) #define C_SUB( res, a,b)\ do { \ CHECK_OVERFLOW_OP((a).r,-,(b).r)\ CHECK_OVERFLOW_OP((a).i,-,(b).i)\ (res).r=(a).r-(b).r; (res).i=(a).i-(b).i; \ }while(0) #define C_ADDTO( res , a)\ do { \ CHECK_OVERFLOW_OP((res).r,+,(a).r)\ CHECK_OVERFLOW_OP((res).i,+,(a).i)\ (res).r += (a).r; (res).i += (a).i;\ }while(0) #define C_SUBFROM( res , a)\ do {\ CHECK_OVERFLOW_OP((res).r,-,(a).r)\ CHECK_OVERFLOW_OP((res).i,-,(a).i)\ (res).r -= (a).r; (res).i -= (a).i; \ }while(0) #ifdef FIXED_POINT # define KISS_FFT_COS(phase) floor(.5+SAMP_MAX * cos (phase)) # define KISS_FFT_SIN(phase) floor(.5+SAMP_MAX * sin (phase)) # define HALF_OF(x) ((x)>>1) #elif defined(USE_SIMD) # define KISS_FFT_COS(phase) _mm_set1_ps( cos(phase) ) # define KISS_FFT_SIN(phase) _mm_set1_ps( sin(phase) ) # define HALF_OF(x) ((x)*_mm_set1_ps(.5)) #else # define KISS_FFT_COS(phase) (kiss_fft_scalar) cos(phase) # define KISS_FFT_SIN(phase) (kiss_fft_scalar) sin(phase) # define HALF_OF(x) ((x)*.5) #endif #define kf_cexp(x,phase) \ do{ \ (x)->r = KISS_FFT_COS(phase);\ (x)->i = KISS_FFT_SIN(phase);\ }while(0) /* a debugging function */ #define pcpx(c)\ fprintf(stderr,"%g + %gi\n",(double)((c)->r),(double)((c)->i) ) #ifdef KISS_FFT_USE_ALLOCA // define this to allow use of alloca instead of malloc for temporary buffers // Temporary buffers are used in two case: // 1. FFT sizes that have "bad" factors. i.e. not 2,3 and 5 // 2. "in-place" FFTs. Notice the quotes, since kissfft does not really do an in-place transform. #include #define KISS_FFT_TMP_ALLOC(nbytes) alloca(nbytes) #define KISS_FFT_TMP_FREE(ptr) #else #define KISS_FFT_TMP_ALLOC(nbytes) KISS_FFT_MALLOC(nbytes) #define KISS_FFT_TMP_FREE(ptr) KISS_FFT_FREE(ptr) #endif ================================================ FILE: OptolithiumC/libs/kissfft/include/kiss_fft.h ================================================ #ifndef KISS_FFT_H #define KISS_FFT_H #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* ATTENTION! If you would like a : -- a utility that will handle the caching of fft objects -- real-only (no imaginary time component ) FFT -- a multi-dimensional FFT -- a command-line utility to perform ffts -- a command-line utility to perform fast-convolution filtering Then see kfc.h kiss_fftr.h kiss_fftnd.h fftutil.c kiss_fastfir.c in the tools/ directory. */ #ifdef USE_SIMD # include # define kiss_fft_scalar __m128 #define KISS_FFT_MALLOC(nbytes) _mm_malloc(nbytes,16) #define KISS_FFT_FREE _mm_free #else #define KISS_FFT_MALLOC malloc #define KISS_FFT_FREE free #endif #ifdef FIXED_POINT #include # if (FIXED_POINT == 32) # define kiss_fft_scalar int32_t # else # define kiss_fft_scalar int16_t # endif #else # ifndef kiss_fft_scalar /* default is float */ # define kiss_fft_scalar double # endif #endif typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; } kiss_fft_cpx; typedef struct kiss_fft_state* kiss_fft_cfg; /* * kiss_fft_alloc * * Initialize a FFT (or IFFT) algorithm's cfg/state buffer. * * typical usage: kiss_fft_cfg mycfg=kiss_fft_alloc(1024,0,NULL,NULL); * * The return value from fft_alloc is a cfg buffer used internally * by the fft routine or NULL. * * If lenmem is NULL, then kiss_fft_alloc will allocate a cfg buffer using malloc. * The returned value should be free()d when done to avoid memory leaks. * * The state can be placed in a user supplied buffer 'mem': * If lenmem is not NULL and mem is not NULL and *lenmem is large enough, * then the function places the cfg in mem and the size used in *lenmem * and returns mem. * * If lenmem is not NULL and ( mem is NULL or *lenmem is not large enough), * then the function returns NULL and places the minimum cfg * buffer size in *lenmem. * */ kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem); /* * kiss_fft(cfg,in_out_buf) * * Perform an FFT on a complex input buffer. * for a forward FFT, * fin should be f[0] , f[1] , ... ,f[nfft-1] * fout will be F[0] , F[1] , ... ,F[nfft-1] * Note that each element is complex and can be accessed like f[k].r and f[k].i * */ void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout); /* A more generic version of the above function. It reads its input from every Nth sample. * */ void kiss_fft_stride(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int fin_stride); /* If kiss_fft_alloc allocated a buffer, it is one contiguous buffer and can be simply free()d when no longer needed*/ #define kiss_fft_free free /* Cleans up some memory that gets managed internally. Not necessary to call, but it might clean up your compiler output to call this before you exit. */ void kiss_fft_cleanup(void); /* * Returns the smallest integer k, such that k>=n and k has only "fast" factors (2,3,5) */ int kiss_fft_next_fast_size(int n); /* for real ffts, we need an even size */ #define kiss_fftr_next_fast_size_real(n) \ (kiss_fft_next_fast_size( ((n)+1)>>1)<<1) #ifdef __cplusplus } #endif #endif ================================================ FILE: OptolithiumC/libs/kissfft/include/kiss_fftnd.h ================================================ #ifndef KISS_FFTND_H #define KISS_FFTND_H #include "kiss_fft.h" #ifdef __cplusplus extern "C" { #endif typedef struct kiss_fftnd_state * kiss_fftnd_cfg; kiss_fftnd_cfg kiss_fftnd_alloc(const int *dims,int ndims,int inverse_fft,void*mem,size_t*lenmem); void kiss_fftnd(kiss_fftnd_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout); #ifdef __cplusplus } #endif #endif ================================================ FILE: OptolithiumC/libs/kissfft/src/kiss_fft.c ================================================ /* Copyright (c) 2003-2010, Mark Borgerding All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "_kiss_fft_guts.h" /* The guts header contains all the multiplication and addition macros that are defined for fixed or floating point complex numbers. It also delares the kf_ internal functions. */ static void kf_bfly2( kiss_fft_cpx * Fout, const size_t fstride, const kiss_fft_cfg st, int m ) { kiss_fft_cpx * Fout2; kiss_fft_cpx * tw1 = st->twiddles; kiss_fft_cpx t; Fout2 = Fout + m; do{ C_FIXDIV(*Fout,2); C_FIXDIV(*Fout2,2); C_MUL (t, *Fout2 , *tw1); tw1 += fstride; C_SUB( *Fout2 , *Fout , t ); C_ADDTO( *Fout , t ); ++Fout2; ++Fout; }while (--m); } static void kf_bfly4( kiss_fft_cpx * Fout, const size_t fstride, const kiss_fft_cfg st, const size_t m ) { kiss_fft_cpx *tw1,*tw2,*tw3; kiss_fft_cpx scratch[6]; size_t k=m; const size_t m2=2*m; const size_t m3=3*m; tw3 = tw2 = tw1 = st->twiddles; do { C_FIXDIV(*Fout,4); C_FIXDIV(Fout[m],4); C_FIXDIV(Fout[m2],4); C_FIXDIV(Fout[m3],4); C_MUL(scratch[0],Fout[m] , *tw1 ); C_MUL(scratch[1],Fout[m2] , *tw2 ); C_MUL(scratch[2],Fout[m3] , *tw3 ); C_SUB( scratch[5] , *Fout, scratch[1] ); C_ADDTO(*Fout, scratch[1]); C_ADD( scratch[3] , scratch[0] , scratch[2] ); C_SUB( scratch[4] , scratch[0] , scratch[2] ); C_SUB( Fout[m2], *Fout, scratch[3] ); tw1 += fstride; tw2 += fstride*2; tw3 += fstride*3; C_ADDTO( *Fout , scratch[3] ); if(st->inverse) { Fout[m].r = scratch[5].r - scratch[4].i; Fout[m].i = scratch[5].i + scratch[4].r; Fout[m3].r = scratch[5].r + scratch[4].i; Fout[m3].i = scratch[5].i - scratch[4].r; }else{ Fout[m].r = scratch[5].r + scratch[4].i; Fout[m].i = scratch[5].i - scratch[4].r; Fout[m3].r = scratch[5].r - scratch[4].i; Fout[m3].i = scratch[5].i + scratch[4].r; } ++Fout; }while(--k); } static void kf_bfly3( kiss_fft_cpx * Fout, const size_t fstride, const kiss_fft_cfg st, size_t m ) { size_t k=m; const size_t m2 = 2*m; kiss_fft_cpx *tw1,*tw2; kiss_fft_cpx scratch[5]; kiss_fft_cpx epi3; epi3 = st->twiddles[fstride*m]; tw1=tw2=st->twiddles; do{ C_FIXDIV(*Fout,3); C_FIXDIV(Fout[m],3); C_FIXDIV(Fout[m2],3); C_MUL(scratch[1],Fout[m] , *tw1); C_MUL(scratch[2],Fout[m2] , *tw2); C_ADD(scratch[3],scratch[1],scratch[2]); C_SUB(scratch[0],scratch[1],scratch[2]); tw1 += fstride; tw2 += fstride*2; Fout[m].r = Fout->r - HALF_OF(scratch[3].r); Fout[m].i = Fout->i - HALF_OF(scratch[3].i); C_MULBYSCALAR( scratch[0] , epi3.i ); C_ADDTO(*Fout,scratch[3]); Fout[m2].r = Fout[m].r + scratch[0].i; Fout[m2].i = Fout[m].i - scratch[0].r; Fout[m].r -= scratch[0].i; Fout[m].i += scratch[0].r; ++Fout; }while(--k); } static void kf_bfly5( kiss_fft_cpx * Fout, const size_t fstride, const kiss_fft_cfg st, int m ) { kiss_fft_cpx *Fout0,*Fout1,*Fout2,*Fout3,*Fout4; int u; kiss_fft_cpx scratch[13]; kiss_fft_cpx * twiddles = st->twiddles; kiss_fft_cpx *tw; kiss_fft_cpx ya,yb; ya = twiddles[fstride*m]; yb = twiddles[fstride*2*m]; Fout0=Fout; Fout1=Fout0+m; Fout2=Fout0+2*m; Fout3=Fout0+3*m; Fout4=Fout0+4*m; tw=st->twiddles; for ( u=0; ur += scratch[7].r + scratch[8].r; Fout0->i += scratch[7].i + scratch[8].i; scratch[5].r = scratch[0].r + S_MUL(scratch[7].r,ya.r) + S_MUL(scratch[8].r,yb.r); scratch[5].i = scratch[0].i + S_MUL(scratch[7].i,ya.r) + S_MUL(scratch[8].i,yb.r); scratch[6].r = S_MUL(scratch[10].i,ya.i) + S_MUL(scratch[9].i,yb.i); scratch[6].i = -S_MUL(scratch[10].r,ya.i) - S_MUL(scratch[9].r,yb.i); C_SUB(*Fout1,scratch[5],scratch[6]); C_ADD(*Fout4,scratch[5],scratch[6]); scratch[11].r = scratch[0].r + S_MUL(scratch[7].r,yb.r) + S_MUL(scratch[8].r,ya.r); scratch[11].i = scratch[0].i + S_MUL(scratch[7].i,yb.r) + S_MUL(scratch[8].i,ya.r); scratch[12].r = - S_MUL(scratch[10].i,yb.i) + S_MUL(scratch[9].i,ya.i); scratch[12].i = S_MUL(scratch[10].r,yb.i) - S_MUL(scratch[9].r,ya.i); C_ADD(*Fout2,scratch[11],scratch[12]); C_SUB(*Fout3,scratch[11],scratch[12]); ++Fout0;++Fout1;++Fout2;++Fout3;++Fout4; } } /* perform the butterfly for one stage of a mixed radix FFT */ static void kf_bfly_generic( kiss_fft_cpx * Fout, const size_t fstride, const kiss_fft_cfg st, int m, int p ) { int u,k,q1,q; kiss_fft_cpx * twiddles = st->twiddles; kiss_fft_cpx t; int Norig = st->nfft; kiss_fft_cpx * scratch = (kiss_fft_cpx*)KISS_FFT_TMP_ALLOC(sizeof(kiss_fft_cpx)*p); for ( u=0; u=Norig) twidx-=Norig; C_MUL(t,scratch[q] , twiddles[twidx] ); C_ADDTO( Fout[ k ] ,t); } k += m; } } KISS_FFT_TMP_FREE(scratch); } static void kf_work( kiss_fft_cpx * Fout, const kiss_fft_cpx * f, const size_t fstride, int in_stride, int * factors, const kiss_fft_cfg st ) { kiss_fft_cpx * Fout_beg=Fout; const int p=*factors++; /* the radix */ const int m=*factors++; /* stage's fft length/p */ const kiss_fft_cpx * Fout_end = Fout + p*m; #ifdef _OPENMP // use openmp extensions at the // top-level (not recursive) if (fstride==1 && p<=5) { int k; // execute the p different work units in different threads # pragma omp parallel for for (k=0;k floor_sqrt) p = n; /* no more factors, skip to end */ } n /= p; *facbuf++ = p; *facbuf++ = n; } while (n > 1); } /* * * User-callable function to allocate all necessary storage space for the fft. * * The return value is a contiguous block of memory, allocated with malloc. As such, * It can be freed with free(), rather than a kiss_fft-specific function. * */ kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem ) { kiss_fft_cfg st=NULL; size_t memneeded = sizeof(struct kiss_fft_state) + sizeof(kiss_fft_cpx)*(nfft-1); /* twiddle factors*/ if ( lenmem==NULL ) { st = ( kiss_fft_cfg)KISS_FFT_MALLOC( memneeded ); }else{ if (mem != NULL && *lenmem >= memneeded) st = (kiss_fft_cfg)mem; *lenmem = memneeded; } if (st) { int i; st->nfft=nfft; st->inverse = inverse_fft; for (i=0;iinverse) phase *= -1; kf_cexp(st->twiddles+i, phase ); } kf_factor(nfft,st->factors); } return st; } void kiss_fft_stride(kiss_fft_cfg st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int in_stride) { if (fin == fout) { //NOTE: this is not really an in-place FFT algorithm. //It just performs an out-of-place FFT into a temp buffer kiss_fft_cpx * tmpbuf = (kiss_fft_cpx*)KISS_FFT_TMP_ALLOC( sizeof(kiss_fft_cpx)*st->nfft); kf_work(tmpbuf,fin,1,in_stride, st->factors,st); memcpy(fout,tmpbuf,sizeof(kiss_fft_cpx)*st->nfft); KISS_FFT_TMP_FREE(tmpbuf); }else{ kf_work( fout, fin, 1,in_stride, st->factors,st ); } } void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout) { kiss_fft_stride(cfg,fin,fout,1); } void kiss_fft_cleanup(void) { // nothing needed any more } int kiss_fft_next_fast_size(int n) { while(1) { int m=n; while ( (m%2) == 0 ) m/=2; while ( (m%3) == 0 ) m/=3; while ( (m%5) == 0 ) m/=5; if (m<=1) break; /* n is completely factorable by twos, threes, and fives */ n++; } return n; } ================================================ FILE: OptolithiumC/libs/kissfft/src/kiss_fftnd.c ================================================ /* Copyright (c) 2003-2004, Mark Borgerding All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "kiss_fftnd.h" #include "_kiss_fft_guts.h" struct kiss_fftnd_state{ int dimprod; /* dimsum would be mighty tasty right now */ int ndims; int *dims; kiss_fft_cfg *states; /* cfg states for each dimension */ kiss_fft_cpx * tmpbuf; /*buffer capable of hold the entire input */ }; kiss_fftnd_cfg kiss_fftnd_alloc(const int *dims,int ndims,int inverse_fft,void*mem,size_t*lenmem) { kiss_fftnd_cfg st = NULL; int i; int dimprod=1; size_t memneeded = sizeof(struct kiss_fftnd_state); char * ptr; for (i=0;istates[i] */ dimprod *= dims[i]; } memneeded += sizeof(int) * ndims;/* st->dims */ memneeded += sizeof(void*) * ndims;/* st->states */ memneeded += sizeof(kiss_fft_cpx) * dimprod; /* st->tmpbuf */ if (lenmem == NULL) {/* allocate for the caller*/ st = (kiss_fftnd_cfg) malloc (memneeded); } else { /* initialize supplied buffer if big enough */ if (*lenmem >= memneeded) st = (kiss_fftnd_cfg) mem; *lenmem = memneeded; /*tell caller how big struct is (or would be) */ } if (!st) return NULL; /*malloc failed or buffer too small */ st->dimprod = dimprod; st->ndims = ndims; ptr=(char*)(st+1); st->states = (kiss_fft_cfg *)ptr; ptr += sizeof(void*) * ndims; st->dims = (int*)ptr; ptr += sizeof(int) * ndims; st->tmpbuf = (kiss_fft_cpx*)ptr; ptr += sizeof(kiss_fft_cpx) * dimprod; for (i=0;idims[i] = dims[i]; kiss_fft_alloc (st->dims[i], inverse_fft, NULL, &len); st->states[i] = kiss_fft_alloc (st->dims[i], inverse_fft, ptr,&len); ptr += len; } /* Hi there! If you're looking at this particular code, it probably means you've got a brain-dead bounds checker that thinks the above code overwrites the end of the array. It doesn't. -- Mark P.S. The below code might give you some warm fuzzies and help convince you. */ if ( ptr - (char*)st != (int)memneeded ) { fprintf(stderr, "################################################################################\n" "Internal error! Memory allocation miscalculation\n" "################################################################################\n" ); } return st; } /* This works by tackling one dimension at a time. In effect, Each stage starts out by reshaping the matrix into a DixSi 2d matrix. A Di-sized fft is taken of each column, transposing the matrix as it goes. Here's a 3-d example: Take a 2x3x4 matrix, laid out in memory as a contiguous buffer [ [ [ a b c d ] [ e f g h ] [ i j k l ] ] [ [ m n o p ] [ q r s t ] [ u v w x ] ] ] Stage 0 ( D=2): treat the buffer as a 2x12 matrix [ [a b ... k l] [m n ... w x] ] FFT each column with size 2. Transpose the matrix at the same time using kiss_fft_stride. [ [ a+m a-m ] [ b+n b-n] ... [ k+w k-w ] [ l+x l-x ] ] Note fft([x y]) == [x+y x-y] Stage 1 ( D=3) treats the buffer (the output of stage D=2) as an 3x8 matrix, [ [ a+m a-m b+n b-n c+o c-o d+p d-p ] [ e+q e-q f+r f-r g+s g-s h+t h-t ] [ i+u i-u j+v j-v k+w k-w l+x l-x ] ] And perform FFTs (size=3) on each of the columns as above, transposing the matrix as it goes. The output of stage 1 is (Legend: ap = [ a+m e+q i+u ] am = [ a-m e-q i-u ] ) [ [ sum(ap) fft(ap)[0] fft(ap)[1] ] [ sum(am) fft(am)[0] fft(am)[1] ] [ sum(bp) fft(bp)[0] fft(bp)[1] ] [ sum(bm) fft(bm)[0] fft(bm)[1] ] [ sum(cp) fft(cp)[0] fft(cp)[1] ] [ sum(cm) fft(cm)[0] fft(cm)[1] ] [ sum(dp) fft(dp)[0] fft(dp)[1] ] [ sum(dm) fft(dm)[0] fft(dm)[1] ] ] Stage 2 ( D=4) treats this buffer as a 4*6 matrix, [ [ sum(ap) fft(ap)[0] fft(ap)[1] sum(am) fft(am)[0] fft(am)[1] ] [ sum(bp) fft(bp)[0] fft(bp)[1] sum(bm) fft(bm)[0] fft(bm)[1] ] [ sum(cp) fft(cp)[0] fft(cp)[1] sum(cm) fft(cm)[0] fft(cm)[1] ] [ sum(dp) fft(dp)[0] fft(dp)[1] sum(dm) fft(dm)[0] fft(dm)[1] ] ] Then FFTs each column, transposing as it goes. The resulting matrix is the 3d FFT of the 2x3x4 input matrix. Note as a sanity check that the first element of the final stage's output (DC term) is sum( [ sum(ap) sum(bp) sum(cp) sum(dp) ] ) , i.e. the summation of all 24 input elements. */ void kiss_fftnd(kiss_fftnd_cfg st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout) { int i,k; const kiss_fft_cpx * bufin=fin; kiss_fft_cpx * bufout; /*arrange it so the last bufout == fout*/ if ( st->ndims & 1 ) { bufout = fout; if (fin==fout) { memcpy( st->tmpbuf, fin, sizeof(kiss_fft_cpx) * st->dimprod ); bufin = st->tmpbuf; } }else bufout = st->tmpbuf; for ( k=0; k < st->ndims; ++k) { int curdim = st->dims[k]; int stride = st->dimprod / curdim; for ( i=0 ; istates[k], bufin+i , bufout+i*curdim, stride ); /*toggle back and forth between the two buffers*/ if (bufout == st->tmpbuf){ bufout = fout; bufin = st->tmpbuf; }else{ bufout = st->tmpbuf; bufin = fout; } } } ================================================ FILE: OptolithiumC/optolithiumc.i ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ %module optolithiumc %{ #define SWIG_FILE_WITH_INIT /* Includes the header in the wrapper code */ #include "opl_contours.h" #include "opl_geometry.h" #include "opl_iter.h" #include "opl_capi.h" #include "opl_sim.h" static PyObject* ctypes_module; static PyObject* ctypes_module_cast; static PyObject* ctypes_module_c_void_p; int load_ctypes_module(void) { ctypes_module = PyImport_ImportModule("ctypes"); if (!ctypes_module) { PyErr_SetString(PyExc_RuntimeError, "Can't load ctypes module!"); return -1; } ctypes_module_cast = PyObject_GetAttrString(ctypes_module, "cast"); if (!ctypes_module_cast) { PyErr_SetString(PyExc_RuntimeError, "ctypes.cast function not found in ctypes module!"); return -1; } ctypes_module_c_void_p = PyObject_GetAttrString(ctypes_module, "c_void_p"); if (!ctypes_module_c_void_p) { PyErr_SetString(PyExc_RuntimeError, "ctypes.c_void_p class not found in ctypes module!"); return -1; } return 0; } %} %init { if (load_ctypes_module() == -1) { # if PY_VERSION_HEX >= 0x03000000 return NULL; # else return; # endif } } /* ---------------------------------------------------------------------------- */ %define %ctypes_callback(typename) %typemap(in) typename { PyObject* args = Py_BuildValue("(OO)", $input, ctypes_module_c_void_p); if (!args) { SWIG_exception_fail(SWIG_ERROR, "Py_BuildValue: can't create input args tuple!"); } PyObject* pointer = PyObject_CallObject(ctypes_module_cast, args); if (!pointer) { SWIG_exception_fail(SWIG_ERROR, "PyObject_CallObject: convert function to c_void_p failed!"); } PyObject* address = PyObject_GetAttrString(pointer, "value"); if (!address) { SWIG_exception_fail(SWIG_ERROR, "PyObject_GetAttrString: get address from c_void_p failed!"); } uint64_t address_value = PyInt_AsUnsignedLongLongMask(address); //printf("Address is %016llX\n", address_value); //PyObject_Print(address,stdout,Py_PRINT_RAW); if (address_value == (uint64_t)-1) { if (PyErr_Occurred()) { PyObject *errtype, *errvalue, *traceback; PyErr_Fetch(&errtype, &errvalue, &traceback); if (errvalue != nullptr) { PyObject *str = PyObject_Str(errvalue); std::string header_string("PyLong_AsUnsignedLongLong: "); std::string message_string(PyString_AsString(str)); SWIG_exception_fail(SWIG_ERROR, (header_string + message_string).c_str()); Py_DECREF(str); } Py_XDECREF(errvalue); Py_XDECREF(errtype); Py_XDECREF(traceback); } } $1 = reinterpret_cast(address_value); } %enddef /* ---------------------------------------------------------------------------- */ %include %include %include %include %include %include %include /* ---------------------------------------------------------------------------- */ %ctypes_callback(source_shape_expr_t) %ctypes_callback(rate_model_expr_t) %ctypes_callback(pupil_filter_expr_t) /* ---------------------------------------------------------------------------- */ %shared_ptr(geometry::Point2d) %shared_ptr(geometry::Edge2d) %shared_ptr(geometry::Point3d) %shared_ptr(geometry::Edge3d) %shared_ptr(geometry::Triangle3d) %shared_ptr(geometry::Surface3d) %shared_ptr(geometry::AbstractGeometry) %shared_ptr(geometry::PolygonGeometry) %shared_ptr(geometry::RectangleGeometry) %shared_ptr(oplc::AbstractMaskGeometry) %shared_ptr(oplc::Region) %shared_ptr(oplc::Box) %shared_ptr(oplc::AbstractResistRateModel) %shared_ptr(oplc::ResistRateModelExpression) %shared_ptr(oplc::ResistRateModelSheet) %shared_ptr(oplc::ResistRateModelDepthSheet) %shared_ptr(oplc::AbstractSourceShapeModel) %shared_ptr(oplc::SourceShapeModelPlugin) %shared_ptr(oplc::SourceShapeModelSheet) %shared_ptr(oplc::AbstractPupilFilterModel) %shared_ptr(oplc::PupilFilterModelPlugin) %shared_ptr(oplc::PupilFilterModelSheet) %shared_ptr(oplc::PupilFilterModelEmpty) %shared_ptr(oplc::ExposureResistModel) %shared_ptr(oplc::PebResistModel) %shared_ptr(oplc::AbstractWaferLayer) %shared_ptr(oplc::StandardWaferLayer) %shared_ptr(oplc::ResistWaferLayer) %shared_ptr(oplc::ConstantWaferLayer) %shared_ptr(oplc::WaferStack) %shared_ptr(oplc::Mask) %shared_ptr(oplc::ImagingTool) %shared_ptr(oplc::Diffraction) %shared_ptr(oplc::SourceShape) %shared_ptr(oplc::Exposure) %shared_ptr(oplc::PostExposureBake) %shared_ptr(oplc::Development) %shared_ptr(oplc::OpticalTransferFunction) %shared_ptr(oplc::AbstractResistSimulations) %shared_ptr(oplc::ResistVolume) %shared_ptr(oplc::ResistProfile) /* ---------------------------------------------------------------------------- */ %template(Triangle3dArray) std::vector >; %template(PolygonsArray) std::vector >; %template(Points2dArray) std::vector >; %template(Points3dArray) std::vector >; %template(RegionsArray) std::vector >; %template(DoubleArray) std::vector; /* ---------------------------------------------------------------------------- */ %exception { try { $action } catch (std::length_error error) { PyErr_SetString(PyExc_IndexError, error.what()); SWIG_fail; } catch (std::out_of_range error) { PyErr_SetString(PyExc_IndexError, error.what()); SWIG_fail; } catch (std::invalid_argument error) { PyErr_SetString(PyExc_ValueError, error.what()); SWIG_fail; } catch (std::range_error error) { PyErr_SetString(PyExc_IndexError, error.what()); SWIG_fail; } catch (std::runtime_error error) { PyErr_SetString(PyExc_RuntimeError, error.what()); SWIG_fail; } catch (std::exception error) { PyErr_SetString(PyExc_Exception, error.what()); SWIG_fail; } } /* ---------------------------------------------------------------------------- */ namespace geometry { %extend Point2d { %rename(__getitem__) operator[]; %rename(__len__) length; %rename(__repr__) str; %pythoncode %{ def round(self, ndigits): return self.__class__(round(self.x, ndigits), round(self.y, ndigits)) def __hash__(self): return hash((self.x, self.y)) %} } %ignore operator *; %ignore operator /; %extend Edge2d { %rename(__str__) str; } %extend Point3d { %rename(__getitem__) operator[]; %rename(__len__) length; %rename(__repr__) str; } %extend Edge3d { %rename(__str__) str; } %extend Triangle3d { %rename(__getitem__) operator[]; %rename(__len__) length; %rename(__repr__) str; %rename(_get_a) a() const; %rename(_get_b) b() const; %rename(_get_c) c() const; %pythoncode %{ __swig_getmethods__["a"] = _get_a __swig_getmethods__["b"] = _get_b __swig_getmethods__["c"] = _get_c if _newclass: a = property(_get_a) b = property(_get_b) c = property(_get_c) %} } %extend Surface3d { %rename(_get_points) points() const; %rename(_get_triangles) triangles() const; %rename(_get_x) x() const; %rename(_get_y) y() const; %rename(_get_z) z() const; %pythoncode %{ __swig_getmethods__["points"] = _get_points __swig_getmethods__["triangles"] = _get_triangles __swig_getmethods__["x"] = _get_x __swig_getmethods__["y"] = _get_y __swig_getmethods__["z"] = _get_z if _newclass: points = property(_get_points) triangles = property(_get_triangles) x = property(_get_x) y = property(_get_y) z = property(_get_z) %} } // ArrayOfSharedPoints2d %extend std::vector > { std::string __str__() { std::ostringstream result; for (auto item : *$self) { result << " " << item->str() << ", " << std::endl; } return result.str(); } } // ArrayOfSharedPoints3d %extend std::vector > { std::string __str__() { std::ostringstream result; for (auto item : *$self) { result << " " << item->str() << ", " << std::endl; } return result.str(); } } %extend AbstractGeometry { %rename(__getitem__) at; %rename(__len__) length; %rename(__str__) str; %pythoncode %{ def __iter__(self): for k in xrange(len(self)): yield self[k] %} } // ArrayOfSharedPolygons %extend std::vector > { std::string __str__() { std::ostringstream result; for (auto item : *$self) { result << " " << item->str() << ", " << std::endl; } return result.str(); } } } // namespace geometry namespace interp { %extend LinearInterpolation1d { LinearInterpolation1d(const arma::vec& x, const arma::vec& y, double fill=0.0) { return new interp::LinearInterpolation1d( std::make_shared(x), std::make_shared(y), fill); } } %extend LinearInterpolation2d { LinearInterpolation2d(const arma::vec& x, const arma::vec& y, const arma::mat& values, double fill=0.0) { return new interp::LinearInterpolation2d( std::make_shared(x), std::make_shared(y), std::make_shared(values), fill); } } } // namespace interp namespace oplc { %extend Diffraction { %ignore c(uint32_t) const; %ignore k(uint32_t) const; %ignore frq(uint32_t) const; %ignore value(uint32_t, uint32_t) const; %ignore cx(uint32_t) const; %ignore cy(uint32_t) const; %ignore kx(uint32_t) const; %ignore ky(uint32_t) const; %rename(_get_values) values() const; %rename(_get_cxy) cxy() const; %rename(_get_cx) cx() const; %rename(_get_cy) cy() const; %rename(_get_frqx) frqx() const; %rename(_get_frqy) frqy() const; %rename(_get_kx) kx() const; %rename(_get_ky) ky() const; %pythoncode %{ __swig_getmethods__["values"] = _get_values __swig_getmethods__["cxy"] = _get_cxy __swig_getmethods__["cx"] = _get_cx __swig_getmethods__["cy"] = _get_cy __swig_getmethods__["frqx"] = _get_frqx __swig_getmethods__["frqy"] = _get_frqy __swig_getmethods__["kx"] = _get_kx __swig_getmethods__["ky"] = _get_ky if _newclass: values = property(_get_values) cxy = property(_get_cxy) cx = property(_get_cx) cy = property(_get_cy) frqx = property(_get_frqx) frqy = property(_get_frqy) kx = property(_get_kx) ky = property(_get_ky) %} } %extend AbstractResistSimulations { %ignore x(uint32_t) const; %ignore y(uint32_t) const; %ignore z(uint32_t) const; %rename(_get_type) type() const; %rename(_get_x) x() const; %rename(_get_y) y() const; %rename(_get_z) z() const; %rename(_has_x) has_x() const; %rename(_has_y) has_y() const; %rename(_has_z) has_z() const; %rename(_axes) axes() const; %pythoncode %{ __swig_getmethods__["type"] = _get_type __swig_getmethods__["x"] = _get_x __swig_getmethods__["y"] = _get_y __swig_getmethods__["z"] = _get_z __swig_getmethods__["has_x"] = _has_x __swig_getmethods__["has_y"] = _has_y __swig_getmethods__["has_z"] = _has_z __swig_getmethods__["axes"] = _axes; if _newclass: type = property(_get_type) x = property(_get_x) y = property(_get_y) z = property(_get_z) has_x = property(_has_x) has_y = property(_has_y) has_z = property(_has_z) axes = property(_axes) %} } %extend ResistVolume { %ignore value(uint32_t, uint32_t, uint32_t) const; %rename(_get_values) values() const; %pythoncode %{ __swig_getmethods__["values"] = _get_values if _newclass: values = property(_get_values) %} } %extend ResistProfile { %rename(_get_polygons) polygons() const; %pythoncode %{ __swig_getmethods__["values"] = _get_polygons if _newclass: polygons = property(_get_polygons) %} } %extend Mask { %rename(__getitem__) at; %rename(__len__) length; }; %extend AbstractWaferLayer { %rename(__str__) str; }; %extend ResistWaferLayer { static std::shared_ptr cast(std::shared_ptr base) { return std::dynamic_pointer_cast(base); } } %extend WaferStack { %rename(__getitem__) operator[]; }; } // namespace oplc %ignore _ContourBuilderIterator; %ignore _ContourEngine; /* Parse the header file to generate wrappers */ %include "opl_physc.h" %include "opl_interp.h" %include "opl_geometry.h" %include "opl_contours.h" %include "opl_capi.h" %include "opl_sim.h" %include "opl_log.h" ================================================ FILE: OptolithiumC/plugins/CMakeLists.txt ================================================ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) CMAKE_POLICY(SET CMP0015 NEW) IF (WIN32) CMAKE_POLICY(SET CMP0054 OLD) ENDIF() SET(CMAKE_BUILD_TYPE "Release") SET(BUILD_DIR "build") SET(CMAKE_USE_RELATIVE_PATHS ON) SET(CMAKE_SKIP_RPATH TRUE) SET(OPTOLITHIUMGUI_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../OptolithiumGui") SET(src "${CMAKE_CURRENT_SOURCE_DIR}/src") INCLUDE_DIRECTORIES("../include") MACRO(SUBDIRLIST result curdir) FILE(GLOB children ABSOLUTE ${curdir} ${curdir}/*) SET(dirlist "") FOREACH(child_path ${children}) GET_FILENAME_COMPONENT(child "${child_path}" NAME) IF((IS_DIRECTORY "${curdir}/${child}") AND NOT (${curdir} EQUAL "${child}")) LIST(APPEND dirlist ${child}) ENDIF() ENDFOREACH() SET(${result} ${dirlist}) ENDMACRO() SUBDIRLIST(subdirs "${src}") FOREACH(plugins_type ${subdirs}) # MESSAGE(STATUS "Plugin Type = ${plugins_type}") FILE(GLOB plugins_files ABSOLUTE "${src}/${plugins_type}" "${src}/${plugins_type}/*.c") FOREACH (plugin_path ${plugins_files}) GET_FILENAME_COMPONENT(plugin_name "${plugin_path}" NAME_WE) SET(input_src "${src}/${plugins_type}/${plugin_name}.c") IF (EXISTS "${input_src}") MESSAGE(STATUS "${plugins_type}: ${plugin_name}") ADD_LIBRARY(${plugin_name} SHARED "${input_src}") SET_TARGET_PROPERTIES(${plugin_name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${BUILD_DIR}/${plugins_type}/") INSTALL( TARGETS ${plugin_name} LIBRARY DESTINATION "${OPTOLITHIUMGUI_DIR}/plugins/${plugins_type}/" RUNTIME DESTINATION "${OPTOLITHIUMGUI_DIR}/plugins/${plugins_type}/" ) ENDIF() ENDFOREACH() ENDFOREACH() ================================================ FILE: OptolithiumC/plugins/src/dev_models/enhanced.c ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include #ifdef __cplusplus extern "C" { #endif typedef struct { double Rmax; double Rmin; double Rresin; double n; double l; } args_t; static double enhanced_model_expr(double pac, double depth, const void *args) { const args_t *dev = (const args_t*) args; double ki = dev->Rresin/dev->Rmin - 1; double ke = dev->Rmax/dev->Rresin - 1; double rate = dev->Rresin * (1 + ke * pow(1 - pac, dev->n)) / (1 + ki * pow(pac, dev->l)); return rate; }; static const dev_model_arg_t args[] = { {.name = "Development Rmax (nm/s)", .min = DBL(0.0), .max = NULL, .defv = 100.0}, {.name = "Development Rmin (nm/s)", .min = DBL(0.0), .max = NULL, .defv = 0.5}, {.name = "Development Rresin (nm/s)", .min = DBL(0.0), .max = NULL, .defv = 10.0}, {.name = "Development n", .min = DBL(1.0), .max = NULL, .defv = 4.0}, {.name = "Development l", .min = DBL(0.0), .max = NULL, .defv = 20.0}, }; static const dev_model_t development_model = { .prolith_id = INT(2), .name = "Enhanced Model", .desc = "Resist developing simulates using enhanced Mack's model", .expression = enhanced_model_expr, .args_count = 5, .args = &args, }; DLL_PUBLIC plugin_descriptor_t PluginDescriptor = { .plugin_type = PLUGIN_DEVELOPMENT_MODEL, .plugin_entry = &development_model }; #ifdef __cplusplus } #endif ================================================ FILE: OptolithiumC/plugins/src/dev_models/enhanced_notch.c ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include #ifdef __cplusplus extern "C" { #endif typedef struct { double Rmax; double Rmin; double n; double Mth_notch; double n_notch; double S; } args_t; static double enhanced_notch_model_expr(double pac, double depth, const void *args) { const args_t *dev = (const args_t*) args; double c = (dev->n_notch + 1)/( dev->n_notch-1)*pow(1 - dev->Mth_notch, dev->n_notch); double p = pow(1 - pac, dev->n_notch); double k = p*(c + 1)/(c + p); double v = (1 - k) * (1 - k); double rate = dev->Rmax*pow(1 - pac, dev->n)*k + dev->Rmin*pow(dev->S*1E9, 1 - pac)*v; return rate; }; static const dev_model_arg_t args[] = { {.name = "Development Rmax (nm/s)", .min = DBL(0.0), .max = NULL, .defv = 100.0}, {.name = "Development Rmin (nm/s)", .min = DBL(0.0), .max = NULL, .defv = 0.5}, {.name = "Development n", .min = DBL(1.0), .max = NULL, .defv = 1.5}, {.name = "Development Notch Mth", .min = NULL, .max = DBL(1.0), .defv = 0.5}, {.name = "Development Notch n", .min = DBL(1.0), .max = NULL, .defv = 10.0}, {.name = "Development Se-9", .min = NULL, .max = NULL, .defv = 0.15}, }; static const dev_model_t development_model = { .prolith_id = NULL, .name = "Enhanced Notch Model", .desc = "Resist developing simulates using the enhanced most sophisticated model", .expression = enhanced_notch_model_expr, .args_count = 6, .args = &args, }; DLL_PUBLIC plugin_descriptor_t PluginDescriptor = { .plugin_type = PLUGIN_DEVELOPMENT_MODEL, .plugin_entry = &development_model }; #ifdef __cplusplus } #endif ================================================ FILE: OptolithiumC/plugins/src/dev_models/mack.c ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include #ifdef __cplusplus extern "C" { #endif typedef struct { double Rmax; double Rmin; double Mth; double n; } args_t; static double mack_model_expr(double pac, double depth, const void *args) { const args_t *dev = (const args_t*) args; double a = (dev->n + 1)/(dev->n - 1) * pow(1 - dev->Mth, dev->n); double p = pow(1 - pac, dev->n); double rate = dev->Rmax * (a + 1) * p / (a + p) + dev->Rmin; return rate; }; static const dev_model_arg_t args[] = { {.name = "Development Rmax (nm/s)", .min = DBL(0.0), .max = NULL, .defv = 100.0}, {.name = "Development Rmin (nm/s)", .min = DBL(0.0), .max = NULL, .defv = 0.5}, {.name = "Development Mth", .min = NULL, .max = DBL(1.0), .defv = 0.5}, {.name = "Development n", .min = DBL(1.0), .max = NULL, .defv = 2.0}, }; static const dev_model_t development_model = { .prolith_id = INT(1), .name = "Mack Model", .desc = "Resist developing simulates using original Mack's model", .expression = mack_model_expr, .args_count = 4, .args = &args, }; DLL_PUBLIC plugin_descriptor_t PluginDescriptor = { .plugin_type = PLUGIN_DEVELOPMENT_MODEL, .plugin_entry = &development_model }; #ifdef __cplusplus } #endif ================================================ FILE: OptolithiumC/plugins/src/dev_models/notch.c ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include #ifdef __cplusplus extern "C" { #endif typedef struct { double Rmax; double Rmin; double n; double Mth_notch; double n_notch; } args_t; static double notch_model_expr(double pac, double depth, const void *args) { const args_t *dev = (const args_t*) args; double c = (dev->n_notch + 1)/( dev->n_notch-1)*pow(1 - dev->Mth_notch, dev->n_notch); double p = pow(1 - pac, dev->n_notch); double k = p*(c + 1)/(c + p); double rate = dev->Rmax*pow(1 - pac, dev->n)*k + dev->Rmin; return rate; }; static const dev_model_arg_t args[] = { {.name = "Development Rmax (nm/s)", .min = DBL(0.0), .max = NULL, .defv = 100.0}, {.name = "Development Rmin (nm/s)", .min = DBL(0.0), .max = NULL, .defv = 0.5}, {.name = "Development n", .min = DBL(1.0), .max = NULL, .defv = 1.5}, {.name = "Development Notch Mth", .min = NULL, .max = DBL(1.0), .defv = 0.5}, {.name = "Development Notch n", .min = DBL(1.0), .max = NULL, .defv = 10.0}, }; static const dev_model_t development_model = { .prolith_id = INT(3), .name = "Notch Model", .desc = "Resist developing simulates using the most sophisticated model", .expression = notch_model_expr, .args_count = 5, .args = &args, }; DLL_PUBLIC plugin_descriptor_t PluginDescriptor = { .plugin_type = PLUGIN_DEVELOPMENT_MODEL, .plugin_entry = &development_model }; #ifdef __cplusplus } #endif ================================================ FILE: OptolithiumC/plugins/src/dev_models/notch_depth.c ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include #ifdef __cplusplus extern "C" { #endif typedef struct { double Rmax; double Rmin; double n; double Mth_notch; double n_notch; double dep_inh; } args_t; static double notch_model_expr(double pac, double depth, const void *args) { const args_t *dev = (const args_t*) args; double c = (dev->n_notch + 1)/( dev->n_notch-1)*pow(1 - dev->Mth_notch, dev->n_notch); double p = pow(1 - pac, dev->n_notch); double k = p*(c + 1)/(c + p); double rate = dev->Rmax*pow(1 - pac, dev->n)*k + dev->Rmin; return rate * exp(-dev->dep_inh*depth); }; static const dev_model_arg_t args[] = { {.name = "Development Rmax (nm/s)", .min = DBL(0.0), .max = NULL, .defv = 100.0}, {.name = "Development Rmin (nm/s)", .min = DBL(0.0), .max = NULL, .defv = 0.5}, {.name = "Development n", .min = DBL(1.0), .max = NULL, .defv = 1.5}, {.name = "Development Notch Mth", .min = NULL, .max = DBL(1.0), .defv = 0.5}, {.name = "Development Notch n", .min = DBL(1.0), .max = NULL, .defv = 10.0}, {.name = "Depth inhibition", .min = DBL(0.0), .max = DBL(1.0), .defv = 0.5}, }; static const dev_model_t development_model = { .prolith_id = NULL, .name = "Notch Model with Depth Dependence", .desc = "Resist developing simulates using the most sophisticated model", .expression = notch_model_expr, .args_count = 6, .args = &args, }; DLL_PUBLIC plugin_descriptor_t PluginDescriptor = { .plugin_type = PLUGIN_DEVELOPMENT_MODEL, .plugin_entry = &development_model }; #ifdef __cplusplus } #endif ================================================ FILE: OptolithiumC/plugins/src/masks/fiveBarLine.c ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include #ifdef __cplusplus extern "C" { #endif typedef struct { double feature_width; double feature_space; double pitch_x; double pitch_y; } prms_t; #define REGION_COUNT 5 #define POINTS_COUNT 4 #define X_OFFSET 100.0 #define Y_OFFSET 500.0 void allocate_memory(mask_t *mask, const prms_t *prms) { int k = 0; if (mask->regions_count == 0) { mask->regions_count = REGION_COUNT; mask->regions = calloc(mask->regions_count, sizeof(mask_region_t)); for (k = 0; k < REGION_COUNT; k++) { mask->regions[k].length = POINTS_COUNT; mask->regions[k].points = calloc(mask->regions[k].length, sizeof(mask_point_t)); } } if (mask->boundary.length == 0) { mask->boundary.length = 4; mask->boundary.points = calloc(4, sizeof(mask_point_t)); mask->boundary.transmittance = 1.0; mask->boundary.phase = 0.0; } } void create_rectangle(mask_point_t *points, double x, double y, double width, double height) { points[0].x = x; points[0].y = y; points[1].x = x; points[1].y = y + height; points[2].x = x + width; points[2].y = y + height; points[3].x = x + width; points[3].y = y; } void create_centered_rectangle(mask_point_t *points, double cx, double cy, double width, double height) { create_rectangle(points, cx - width/2, cy - height/2, width, height); } void set_pitch(mask_t *mask, prms_t *prms) { double total_x = REGION_COUNT * (prms->feature_width + prms->feature_space) + X_OFFSET; if (prms->pitch_x < total_x) prms->pitch_x = total_x; create_centered_rectangle(mask->boundary.points, 0.0, 0.0, prms->pitch_x, prms->pitch_y); } void create_primary_line(mask_region_t *region, const prms_t *prms) { double y0 = Y_OFFSET - prms->pitch_y/2; double y1 = prms->pitch_y/2 - Y_OFFSET; double height = y1 - y0; create_rectangle(region->points, -prms->feature_width/2, y0, prms->feature_width, height); } void create_secondary_lines(mask_region_t *regions, const prms_t *prms) { int k = 0; double y0 = Y_OFFSET - prms->pitch_y/2; double y1 = 0.0; double height = y1 - y0; double dx = prms->feature_width/2 + prms->feature_space; for (k = 0; k < (REGION_COUNT - 1)/2; k++) { double x0 = dx + k * (prms->feature_width + prms->feature_space); create_rectangle(regions[2*k].points, x0, y0, prms->feature_width, height); create_rectangle(regions[2*k+1].points, -x0 - prms->feature_width, y0, prms->feature_width, height); } } static int create_mask(mask_t *mask, void *parameters) { prms_t *prms = (prms_t*) parameters; allocate_memory(mask, prms); set_pitch(mask, prms); create_primary_line(&mask->regions[0], prms); create_secondary_lines(&mask->regions[1], prms); return 0; }; static const mask_parameter_t parameters[] = { {.name = "Feature Width (nm)", .min = DBL(0.0), .max = NULL, .defv = 250.0}, {.name = "Feature Space (nm)", .min = DBL(0.0), .max = NULL, .defv = 500.0}, {.name = "Pitch X (nm)", .min = DBL(0.0), .max = NULL, .defv = 2000.0}, {.name = "Pitch Y (nm)", .min = DBL(0.0), .max = NULL, .defv = 8000.0}, }; static const mask_plugin_t mask_plugin = { .name = "2D Five Bar Lines", .desc = "Two dimensions five bar lines features", .type = MASK_TYPE_2D, .create = create_mask, .parameters_count = 4, .parameters = ¶meters, }; DLL_PUBLIC plugin_descriptor_t PluginDescriptor = { .plugin_type = PLUGIN_MASK, .plugin_entry = &mask_plugin }; #ifdef __cplusplus } #endif ================================================ FILE: OptolithiumC/plugins/src/masks/line1D.c ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include #ifdef __cplusplus extern "C" { #endif typedef struct { double feature_width; double pitch; } prms_t; int set_mask_parameters(mask_t *mask, const void *parameters) { const prms_t *prms = (const prms_t*) parameters; // Boundary half pitch in each direction mask->boundary.points[0].x = -prms->pitch/2; mask->boundary.points[1].x = prms->pitch/2; // Feature half width in each direction mask->regions[0].points[0].x = -prms->feature_width/2; mask->regions[0].points[1].x = prms->feature_width/2; // Black line mask->regions[0].transmittance = 0.0; mask->regions[0].phase = 0.0; return 0; } static int create_mask_line_1d(mask_t *mask, void *parameters) { if (mask->regions_count == 0) { mask->regions_count = 1; mask->regions = calloc(mask->regions_count, sizeof(mask_region_t)); mask->regions[0].length = 2; mask->regions[0].points = calloc(2, sizeof(mask_point_t)); } if (mask->boundary.length == 0) { mask->boundary.length = 2; mask->boundary.points = calloc(2, sizeof(mask_point_t)); mask->boundary.transmittance = 1.0; mask->boundary.phase = 0.0; } return set_mask_parameters(mask, parameters); }; static const mask_parameter_t parameters[] = { {.name = "Feature Width (nm)", .min = DBL(0.0), .max = NULL, .defv = 250.0}, {.name = "Pitch (nm)", .min = DBL(0.0), .max = NULL, .defv = 800.0} }; static const mask_plugin_t mask = { .name = "1D Binary - Line", .desc = "One dimensional binary line feature", .type = MASK_TYPE_1D, .create = create_mask_line_1d, .parameters_count = 2, .parameters = ¶meters, }; DLL_PUBLIC plugin_descriptor_t PluginDescriptor = { .plugin_type = PLUGIN_MASK, .plugin_entry = &mask }; #ifdef __cplusplus } #endif ================================================ FILE: OptolithiumC/plugins/src/masks/line1D_SRAF.c ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include #ifdef __cplusplus extern "C" { #endif typedef struct { double feature_width; double pitch; double number_of_srafs; double sraf_size; double sraf_space2main; double sraf_space2sraf; } prms_t; int get_number_of_regions(int number_of_srafs) { int srafs_regions = (number_of_srafs % 2 == 0) ? number_of_srafs : (number_of_srafs + 1); return srafs_regions + 1; } void allocate_memory(mask_t* mask, const prms_t* prms) { int k = 0; int number_of_srafs = (int)prms->number_of_srafs; for (k = 0; k < mask->regions_count; k++) free(mask->regions[k].points); free(mask->regions); mask->regions_count = get_number_of_regions(number_of_srafs); mask->regions = calloc(mask->regions_count, sizeof(mask_region_t)); for (k = 0; k < mask->regions_count; k++) { mask->regions[k].length = 2; mask->regions[k].points = calloc(2, sizeof(mask_point_t)); } if (mask->boundary.length == 0) { mask->boundary.length = 2; mask->boundary.points = calloc(2, sizeof(mask_point_t)); mask->boundary.transmittance = 1.0; mask->boundary.phase = 0.0; } } void set_pitch(mask_t *mask, const prms_t *prms) { // Boundary half pitch in each direction mask->boundary.points[0].x = -prms->pitch/2; mask->boundary.points[1].x = prms->pitch/2; } void create_primary_line(mask_region_t *region, const prms_t *prms) { // Feature half width in each direction region->points[0].x = -prms->feature_width/2; region->points[1].x = prms->feature_width/2; // Black line region->transmittance = 0.0; region->phase = 0.0; } void create_odd_srafs(mask_region_t *left, mask_region_t *right, const prms_t *prms) { left->points[0].x = -prms->pitch/2; left->points[1].x = -prms->pitch/2 + prms->sraf_size/2; right->points[0].x = prms->pitch/2 - prms->sraf_size/2; right->points[1].x = prms->pitch/2; } void create_srafs(mask_region_t *regions, const prms_t *prms, int count) { int k = 0; for (k = 0; k < count/2; k++) { double x0 = prms->feature_width/2 + prms->sraf_space2main + k * (prms->sraf_size + prms->sraf_space2sraf); regions[2*k].points[0].x = x0; regions[2*k].points[1].x = x0 + prms->sraf_size; regions[2*k+1].points[0].x = -x0; regions[2*k+1].points[1].x = -(x0 + prms->sraf_size); } } static int create_mask_line_1d_sraf(mask_t *mask, void *parameters) { int k = 0; prms_t *prms = (prms_t*) parameters; allocate_memory(mask, prms); create_primary_line(&mask->regions[0], prms); int number_of_srafs = (int) prms->number_of_srafs; double total_sraf_size = number_of_srafs * prms->sraf_size; double total_sraf_space = (number_of_srafs - 1) * prms->sraf_space2sraf + 2 * prms->sraf_space2main; if (number_of_srafs % 2 != 0) { prms->pitch = prms->feature_width + total_sraf_size + total_sraf_space; create_odd_srafs(&mask->regions[1], &mask->regions[2], prms); create_srafs(&mask->regions[3], prms, number_of_srafs - 1); } else { //double total_sraf_space = number_of_srafs * prms->sraf_space2sraf + 2 * prms->sraf_space2main; double required_pitch = prms->feature_width + total_sraf_space + total_sraf_size; if (prms->pitch < required_pitch) prms->pitch = required_pitch; create_srafs(&mask->regions[1], prms, number_of_srafs); } set_pitch(mask, prms); return 0; }; static const mask_parameter_t parameters[] = { {.name = "Feature Width (nm)", .min = DBL(0.0), .max = NULL, .defv = 250.0}, {.name = "Pitch (nm)", .min = DBL(0.0), .max = NULL, .defv = 800.0}, {.name = "Number Of SRAFs", .min = DBL(1), .max = DBL(6), .defv = 2.0}, {.name = "SRAF Size (nm)", .min = DBL(1.0), .max = NULL, .defv = 80.0}, {.name = "SRAF Space to Primary (nm)", .min = DBL(1.0), .max = NULL, .defv = 300.0}, {.name = "Space between SRAF's (nm)", .min = DBL(1.0), .max = NULL, .defv = 100.0} }; static const mask_plugin_t mask = { .name = "1D Binary SRAF - Line", .desc = "One dimensional binary line feature with subresolution features", .type = MASK_TYPE_1D, .create = create_mask_line_1d_sraf, .parameters_count = 6, .parameters = ¶meters, }; DLL_PUBLIC plugin_descriptor_t PluginDescriptor = { .plugin_type = PLUGIN_MASK, .plugin_entry = &mask }; #ifdef __cplusplus } #endif ================================================ FILE: OptolithiumC/plugins/src/masks/space1D.c ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include #ifdef __cplusplus extern "C" { #endif typedef struct { double feature_width; double pitch; } prms_t; int set_mask_parameters(mask_t *mask, const void *parameters) { const prms_t *prms = (const prms_t*) parameters; // Boundary half pitch in each direction mask->boundary.points[0].x = -prms->pitch/2; mask->boundary.points[1].x = prms->pitch/2; // Feature half width in each direction mask->regions[0].points[0].x = -prms->feature_width/2; mask->regions[0].points[1].x = prms->feature_width/2; // Space line mask->regions[0].transmittance = 1.0; mask->regions[0].phase = 0.0; return 0; } static int create_mask_space_1d(mask_t *mask, void *parameters) { if (mask->regions_count == 0) { mask->regions_count = 1; mask->regions = calloc(mask->regions_count, sizeof(mask_region_t)); mask->regions[0].length = 2; mask->regions[0].points = calloc(2, sizeof(mask_point_t)); } if (mask->boundary.length == 0) { mask->boundary.length = 2; mask->boundary.points = calloc(2, sizeof(mask_point_t)); mask->boundary.transmittance = 0.0; mask->boundary.phase = 0.0; } return set_mask_parameters(mask, parameters); }; static const mask_parameter_t parameters[] = { {.name = "Feature Width (nm)", .min = DBL(0.0), .max = NULL, .defv = 250.0}, {.name = "Pitch (nm)", .min = DBL(0.0), .max = NULL, .defv = 800.0}, {.name = "Transmittance", .min = DBL(0.0), .max = DBL(1.0), .defv = 1.0}, {.name = "Phase (deg.)", .min = DBL(-180.0), .max = DBL(180.0), .defv = 0.0}, }; static const mask_plugin_t mask = { .name = "1D Binary - Space", .desc = "One dimensional binary space feature", .type = MASK_TYPE_1D, .create = create_mask_space_1d, .parameters_count = 2, .parameters = ¶meters, }; DLL_PUBLIC plugin_descriptor_t PluginDescriptor = { .plugin_type = PLUGIN_MASK, .plugin_entry = &mask }; #ifdef __cplusplus } #endif ================================================ FILE: OptolithiumC/plugins/src/pupil_filters/central_obscuration.c ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include #ifdef __cplusplus extern "C" { #endif typedef struct { double radius; } args_t; #define PRECISION 0.001 inline double round_to(double value, double precision) { return round(value / precision) * precision; }; inline double squared_distance(double x, double y) { return round_to(x, PRECISION) * round_to(x, PRECISION) + round_to(y, PRECISION) * round_to(y, PRECISION); } static double _Complex central_obscuration_pupil(double sx, double sy, const void *args) { const args_t *prms = (const args_t*) args; double sxy = squared_distance(sx, sy); double squared_radius = prms->radius * prms->radius; return (double _Complex)(sxy > squared_radius); if (sxy > squared_radius) { return 1.0; } else { return 0.0; } }; static const source_shape_arg_t args[] = { {.name = "Radius", .min = DBL(0.0), .max = DBL(1.0), .defv = 0.1}, }; static const pupil_filter_plugin_t pupil_filter_plugin = { .name = "Central Obscuration", .desc = "Ideal central pupil zone obscuration", .expression = central_obscuration_pupil, .args_count = 1, .args = &args, }; DLL_PUBLIC plugin_descriptor_t PluginDescriptor = { .plugin_type = PLUGIN_PUPIL_FILTER, .plugin_entry = &pupil_filter_plugin }; #ifdef __cplusplus } #endif ================================================ FILE: OptolithiumC/plugins/src/source_shapes/annular.c ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include #ifdef __cplusplus extern "C" { #endif typedef struct { double sigma_in; double sigma_out; } args_t; #define PRECISION 0.001 inline double round_to(double value, double precision) { return round(value / precision) * precision; }; inline double squared_distance(double x, double y) { return round_to(x, PRECISION) * round_to(x, PRECISION) + round_to(y, PRECISION) * round_to(y, PRECISION); } static double annular_source_shape(double sx, double sy, const void *args) { const args_t *prms = (const args_t*) args; double sxy = squared_distance(sx, sy); double squared_inner = prms->sigma_in * prms->sigma_in; double squared_outer = prms->sigma_out * prms->sigma_out; return (double)(sxy >= squared_inner && sxy <= squared_outer); }; static const source_shape_arg_t args[] = { {.name = "Sigma Inner", .min = DBL(0.0), .max = DBL(1.0), .defv = 0.3}, {.name = "Sigma Outer", .min = DBL(0.0), .max = DBL(1.0), .defv = 0.8}, }; static const source_shape_plugin_t source_shape_plugin = { .name = "Annular", .desc = "Ideal annular source shape", .expression = annular_source_shape, .args_count = 2, .args = &args, }; DLL_PUBLIC plugin_descriptor_t PluginDescriptor = { .plugin_type = PLUGIN_SOURCE_SHAPE, .plugin_entry = &source_shape_plugin }; #ifdef __cplusplus } #endif ================================================ FILE: OptolithiumC/plugins/src/source_shapes/coherent.c ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include #ifdef __cplusplus extern "C" { #endif typedef struct { double tilt_x; double tilt_y; } args_t; #define PRECISION 0.001 inline double round_to(double value, double precision) { return round(value / precision) * precision; }; static double coherent_source_shape(double sx, double sy, const void *args) { const args_t *prms = (const args_t*) args; return (double)( round_to(sx, 0.001) == round_to(prms->tilt_x, 0.001) && round_to(sy, 0.001) == round_to(prms->tilt_y, 0.001) ); }; static const source_shape_arg_t args[] = { {.name = "Tilt X", .min = DBL(-1.0), .max = DBL(1.0), .defv = 0.0}, {.name = "Tilt Y", .min = DBL(-1.0), .max = DBL(1.0), .defv = 0.0}, }; static const source_shape_plugin_t source_shape_plugin = { .name = "Coherent", .desc = "Ideal model of fully spatial coherent source shape", .expression = coherent_source_shape, .args_count = 2, .args = &args, }; DLL_PUBLIC plugin_descriptor_t PluginDescriptor = { .plugin_type = PLUGIN_SOURCE_SHAPE, .plugin_entry = &source_shape_plugin }; #ifdef __cplusplus } #endif ================================================ FILE: OptolithiumC/plugins/src/source_shapes/convenient.c ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include #ifdef __cplusplus extern "C" { #endif typedef struct { double sigma; } args_t; #define PRECISION 0.001 inline double round_to(double value, double precision) { return round(value / precision) * precision; }; inline double squared_distance(double x, double y) { return round_to(x, PRECISION) * round_to(x, PRECISION) + round_to(y, PRECISION) * round_to(y, PRECISION); } static double convenient_source_shape(double sx, double sy, const void *args) { const args_t *prms = (const args_t*) args; double sxy = squared_distance(sx, sy); double squared_sigma = prms->sigma * prms->sigma; return (double)(sxy <= squared_sigma); }; static const source_shape_arg_t args[] = { {.name = "Sigma", .min = DBL(0.0), .max = DBL(1.0), .defv = 0.5}, }; static const source_shape_plugin_t source_shape_plugin = { .name = "Convenient", .desc = "Ideal convenient source shape", .expression = convenient_source_shape, .args_count = 1, .args = &args, }; DLL_PUBLIC plugin_descriptor_t PluginDescriptor = { .plugin_type = PLUGIN_SOURCE_SHAPE, .plugin_entry = &source_shape_plugin }; #ifdef __cplusplus } #endif ================================================ FILE: OptolithiumC/src/opl_capi.cpp ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include "opl_capi.h" namespace oplc { // ========================================= AbstractResistSimulations ========================================== // std::shared_ptr AbstractResistSimulations::x(void) const { return this->_x; } std::shared_ptr AbstractResistSimulations::y(void) const { return this->_y; } std::shared_ptr AbstractResistSimulations::z(void) const { return this->_z; } double AbstractResistSimulations::x(uint32_t k) const { return (*this->_x)(k); } double AbstractResistSimulations::y(uint32_t k) const { return (*this->_y)(k); } double AbstractResistSimulations::z(uint32_t k) const { return (*this->_z)(k); } bool AbstractResistSimulations::has_x(void) const { return this->_x->n_elem > 1; } bool AbstractResistSimulations::has_y(void) const { return this->_y->n_elem > 1; } bool AbstractResistSimulations::has_z(void) const { return this->_z->n_elem > 1; } double AbstractResistSimulations::stepx(void) const { return this->_stepx; } double AbstractResistSimulations::stepy(void) const { return this->_stepy; } double AbstractResistSimulations::stepz(void) const { return this->_stepz; } resist_volume_type_t AbstractResistSimulations::axes(void) const { uint8_t has_z = static_cast(this->has_z()) << 2; uint8_t has_y = static_cast(this->has_y()) << 1; uint8_t has_x = static_cast(this->has_x()); return static_cast(has_z | has_y | has_x); } // ================================================ ResistVolume ================================================ // // Initialization for 2D/3D cases (e.g. Image in Resist, Latent Image, PAC, Development Rates) ResistVolume::ResistVolume( const RectangleGeometry& boundary, double thickness, double desired_stepxy, double desired_stepz) : boundary(boundary), thickness(thickness), desired_stepxy(desired_stepxy), desired_stepz(desired_stepz) { Sizes sizes = this->boundary.sizes(); this->_stepx = ResistVolume::_calc_lateral_step(sizes.x, desired_stepxy); this->_stepy = ResistVolume::_calc_lateral_step(sizes.y, desired_stepxy); this->_stepz = ResistVolume::_calc_normal_step(thickness, desired_stepz); // VLOG(4) << "Step X = " << this->_stepx << " Step Y = " << this->_stepy << " Step Z = " << this->_stepz; uint32_t row = ResistVolume::_get_count(sizes.y, this->_stepy, 1); uint32_t col = ResistVolume::_get_count(sizes.x, this->_stepx, 1); uint32_t slices = ResistVolume::_get_count(thickness, this->_stepz); if (slices != 1) { slices++; } // VLOG(4) << "row = " << row << " col = " << col << " slices = " << slices; this->_values = std::make_shared(row, col, slices); this->_x = std::make_shared(col); this->_y = std::make_shared(row); this->_z = std::make_shared(slices); const Point2d& left_bottom = this->boundary.left_bottom(); ResistVolume::_init_vector(*this->_x, left_bottom.x, this->_stepx); ResistVolume::_init_vector(*this->_y, left_bottom.y, this->_stepy); ResistVolume::_init_vector(*this->_z, thickness, -this->_stepz); } // Initialization for 1D/2D cases (e.g. for AerialImage) ResistVolume::ResistVolume(const RectangleGeometry& boundary, double desired_step) : ResistVolume(boundary, 0.0, desired_step, 0.0) { } ResistVolume::ResistVolume(const ResistVolume& other, bool copydata) : boundary(other.boundary), thickness(other.thickness), desired_stepxy(other.desired_stepxy), desired_stepz(other.desired_stepz) { this->_stepx = other._stepx; this->_stepy = other._stepy; this->_stepz = other._stepz; this->_x = std::make_shared(*other._x); this->_y = std::make_shared(*other._y); this->_z = std::make_shared(*other._z); if (copydata) { this->_values = std::make_shared( other._values->n_rows, other._values->n_cols, other._values->n_slices); } else { this->_values = std::make_shared(*other._values); } } std::shared_ptr ResistVolume::values(void) const { return this->_values; } double& ResistVolume::value(uint32_t u, uint32_t v, uint32_t k) const { return (*this->_values)(u, v, k); } resist_simulations_t ResistVolume::type(void) const { return RESIST_VOLUME; } // ================================================ ResistProfile =============================================== // ResistProfile::ResistProfile(SharedResistVolume volume, double level) { this->_stepx = volume->stepx(); this->_stepy = volume->stepy(); this->_stepz = volume->stepz(); this->_x = std::make_shared(*volume->x()); this->_y = std::make_shared(*volume->y()); this->_z = std::make_shared(*volume->z()); if (this->has_x() && this->has_y()) { throw std::invalid_argument("Can't create resist profile from 3D resist volume data"); } else if (this->has_x()) { const arma::mat& values = volume->values()->tube(arma::span(0, 0), arma::span::all); this->_polygons = contours::contours(*this->_x, *this->_z, misc::rot90(values), level, true); } else if (this->has_y()) { const arma::mat& values = volume->values()->tube(arma::span::all, arma::span(0, 0)); this->_polygons = contours::contours(*this->_y, *this->_z, misc::rot90(values), level, true); } else { throw std::invalid_argument("Can't create resist profile from empty resist volume data"); } } ArrayOfSharedPolygons ResistProfile::polygons(void) const { return this->_polygons; } resist_simulations_t ResistProfile::type(void) const { return RESIST_PROFILE; } // ============================================== AbstractGeometry ============================================== // double AbstractMaskGeometry::transmittance(void) const { return this->_transmittance; } double AbstractMaskGeometry::phase(void) const { return this->_phase; } bool AbstractMaskGeometry::is_mask(void) const { return true; } // Effective transmittance of the region arma::cx_double AbstractMaskGeometry::etransmit(void) { return _etransmit(this->_transmittance, this->_phase); } bool AbstractMaskGeometry::operator==(const AbstractGeometry& other) const { if (!other.is_mask()) { return false; } else { const AbstractMaskGeometry* p = dynamic_cast(&other); return this->_transmittance == p->_transmittance && this->_phase == p->_phase; } } // ==================================================== Mask ==================================================== // // Correct mask region according to diffraction calculation requirements SharedRegion Mask::_make_region(ConstSharedRegion region, const Point2d& center_offset) { auto result = std::make_shared(*region); result->set_bypass(CW); for (auto edge : *result) { edge->org -= center_offset; edge->dst -= center_offset; } return result; } Mask::Mask(const ArrayOfSharedRegions& regions, SharedBox boundary) { const Point2d center_offset = boundary->left_bottom() + (boundary->right_top() - boundary->left_bottom()) / 2.0; for (auto region : regions) { this->_regions.push_back(Mask::_make_region(region, center_offset)); } auto lb = boundary->left_bottom() - center_offset; auto rt = boundary->right_top() - center_offset; this->_boundary = std::make_shared(lb, rt, boundary->transmittance(), boundary->phase()); this->_sizes = this->_boundary->sizes(); } Mask::Mask(const Mask& other) { for (auto region : other) { this->_regions.push_back(std::make_shared(*region)); } this->_boundary = std::make_shared(*other._boundary); this->_sizes = this->_boundary->sizes(); } SharedBox Mask::boundary(void) const { return this->_boundary; } Sizes Mask::pitch(void) const { return this->_sizes; } bool Mask::is_opaque(void) const { return this->_boundary->transmittance() == 0.0; } bool Mask::is_clear(void) const { return !this->is_opaque(); } bool Mask::is_bad(void) const { return this->_sizes.x == 0.0 && this->_sizes.y == 0.0; } bool Mask::is_1d(void) const { return this->_sizes.x == 0.0 || this->_sizes.y == 0.0; } bool Mask::operator==(const Mask& other) const { return *this->_boundary == *other._boundary && misc::safe_vector_equal(this->_regions, other._regions); } SharedRegion Mask::at(uint32_t index) const { return this->_regions.at(index); } uint32_t Mask::length(void) const { return static_cast(this->_regions.size()); } // =========================================== SourceShapeModelPlugin =========================================== // SourceShapeModelPlugin::SourceShapeModelPlugin(source_shape_expr_t expression, std::vector args) : AbstractSourceShapeModel(PLUGIN_MODEL_TYPE), _expression(expression), _args(args), _pargs(static_cast(this->_args.data())) { VLOG(6) << "Plugin source shape model core object created"; }; double SourceShapeModelPlugin::calculate(double sx, double sy) const { return this->_expression(sx, sy, this->_pargs); } bool SourceShapeModelPlugin::operator==(const AbstractSourceShapeModel& other) const { if (this->type != other.type) { return false; } else { const SourceShapeModelPlugin *p = dynamic_cast(&other); return this->_args == p->_args && this->_expression == p->_expression; } } // ============================================ SourceShapeModelSheet =========================================== // // armanpy not support pass arrays by shared_ptr SourceShapeModelSheet::SourceShapeModelSheet(const arma::vec& sx, const arma::vec& sy, const arma::mat& intensity) : AbstractSourceShapeModel(SHEET_MODEL_TYPE), _interp(interp::LinearInterpolation2d( std::make_shared(sx), std::make_shared(sy), std::make_shared(intensity))) { VLOG(6) << "Sheet source shape model core object created"; }; double SourceShapeModelSheet::calculate(double sx, double sy) const { return this->_interp.interpolate(sx, sy); } bool SourceShapeModelSheet::operator==(const AbstractSourceShapeModel& other) const { if (this->type != other.type) { return false; } else { const SourceShapeModelSheet *p = dynamic_cast(&other); return this->_interp == p->_interp; } } // ========================================== ResistRateModelExpression ========================================= // ResistRateModelExpression::ResistRateModelExpression(rate_model_expr_t expression, std::vector args) : AbstractResistRateModel(PLUGIN_MODEL_TYPE), _expression(expression), _args(args), _pargs(static_cast(this->_args.data())) { VLOG(6) << "Plugin resist development rate model core object created"; }; double ResistRateModelExpression::calculate(double pac, double depth) const { return this->_expression(pac, depth, this->_pargs); } bool ResistRateModelExpression::operator==(const AbstractResistRateModel& other) const { if (this->type != other.type) { return false; } else { const ResistRateModelExpression *p = dynamic_cast(&other); return this->_args == p->_args && this->_expression == p->_expression; } } // ========================================== ResistRateModelDepthSheet ========================================= // // armanpy not support pass arrays by shared_ptr ResistRateModelDepthSheet::ResistRateModelDepthSheet( const arma::vec& pac, const arma::vec& depth, const arma::mat& rate) : AbstractResistRateModel(SHEET_MODEL_TYPE), _interp(interp::LinearInterpolation2d( std::make_shared(pac), std::make_shared(depth), std::make_shared(rate))) { VLOG(6) << "Sheet with depth dependence resist development rate model core object created"; } double ResistRateModelDepthSheet::calculate(double pac, double depth) const { return this->_interp.interpolate(pac, depth); } bool ResistRateModelDepthSheet::operator==(const AbstractResistRateModel& other) const { if (this->type != other.type) { return false; } else { const ResistRateModelDepthSheet *p = dynamic_cast(&other); return this->_interp == p->_interp; } } // ============================================ ResistRateModelSheet =========================================== // // armanpy not support pass arrays by shared_ptr ResistRateModelSheet::ResistRateModelSheet(const arma::vec& pac, const arma::vec& rate) : AbstractResistRateModel(SHEET_MODEL_TYPE), _interp(interp::LinearInterpolation1d( std::make_shared(pac), std::make_shared(rate))) { VLOG(6) << "Sheet resist development rate model core object created"; } double ResistRateModelSheet::calculate(double pac, double depth) const { return this->_interp.interpolate(pac); } bool ResistRateModelSheet::operator==(const AbstractResistRateModel& other) const { if (this->type != other.type) { return false; } else { const ResistRateModelSheet *p = dynamic_cast(&other); return this->_interp == p->_interp; } } // ============================================ PupilFilterModelPlugin ========================================== // PupilFilterModelPlugin::PupilFilterModelPlugin(pupil_filter_expr_t expression, std::vector args) : AbstractPupilFilterModel(PLUGIN_MODEL_TYPE), _expression(expression), _args(args), _pargs(static_cast(this->_args.data())) { VLOG(6) << "Plugin pupil filter model core object created"; }; arma::cx_double PupilFilterModelPlugin::calculate(double sx, double sy) const { return static_cast(this->_expression(sx, sy, this->_pargs)); } bool PupilFilterModelPlugin::operator==(const AbstractPupilFilterModel& other) const { if (this->type != other.type) { return false; } else { const PupilFilterModelPlugin *p = dynamic_cast(&other); return this->_args == p->_args && this->_expression == p->_expression; } } // ============================================= PupilFilterModelSheet ========================================== // // armanpy not support pass arrays by shared_ptr PupilFilterModelSheet::PupilFilterModelSheet(const arma::vec& sx, const arma::vec& sy, const arma::cx_mat& coef) : AbstractPupilFilterModel(SHEET_MODEL_TYPE) { auto reals = std::make_shared(coef.n_rows, coef.n_cols); auto imags = std::make_shared(coef.n_rows, coef.n_cols); for (uint32_t r = 0; r < coef.n_rows; r++) { for (uint32_t c = 0; c < coef.n_cols; c++) { (*reals)(r, c) = coef(r, c).real(); (*imags)(r, c) = coef(r, c).imag(); } } std::shared_ptr p_sx = std::make_shared(sx); std::shared_ptr p_sy = std::make_shared(sy); this->_interp_real = interp::LinearInterpolation2d(p_sx, p_sy, reals); this->_interp_imag = interp::LinearInterpolation2d(p_sx, p_sy, imags); VLOG(6) << "Sheet pupil filter model core object created"; } arma::cx_double PupilFilterModelSheet::calculate(double sx, double sy) const { double real = this->_interp_real.interpolate(sx, sy); double imag = this->_interp_imag.interpolate(sx, sy); return arma::cx_double(real, imag); } bool PupilFilterModelSheet::operator==(const AbstractPupilFilterModel& other) const { if (this->type != other.type) { return false; } else { const PupilFilterModelSheet *p = dynamic_cast(&other); return this->_interp_real == p->_interp_real && this->_interp_imag == this->_interp_imag; } } // ============================================= PupilFilterModelEmpty ========================================== // PupilFilterModelEmpty::PupilFilterModelEmpty(void) : AbstractPupilFilterModel(EMPTY_MODEL_TYPE) { VLOG(6) << "Empty pupil filter model core object created"; } arma::cx_double PupilFilterModelEmpty::calculate(double sx, double sy) const { return arma::cx_double(1.0, 0.0); } bool PupilFilterModelEmpty::operator==(const AbstractPupilFilterModel& other) const { return this->type == other.type; } // ================================================= SourceShape ================================================ // void SourceShape::_init_vectors(std::shared_ptr &k, std::shared_ptr &dcos, double step) { // Cut value above 1.0 because max direction cosine in source shape grid must be lower 1.0 double count = static_cast(2*SourceShape::_clim/step+1); k = std::make_shared(count); dcos = std::make_shared(count); uint32_t median = static_cast(floor(static_cast(count)/2.0)); for (uint32_t i = 0; i < count; i++) { (*k)(i) = i - median; (*dcos)(i) = (*k)(i) * step; } } std::shared_ptr SourceShape::_init_values(const arma::vec &cx, const arma::vec &cy, SharedAbstractSourceShapeModel model) { std::shared_ptr result = std::make_shared(cy.n_elem, cx.n_elem); for (uint32_t c = 0; c < cx.n_elem; c++) { for (uint32_t r = 0; r < cy.n_elem; r++) { (*result)(r, c) = model->calculate(cx(c), cy(r)); } } return result; } std::shared_ptr SourceShape::_get_non_zeros_indexes(const arma::mat &values) { arma::uvec indexes = arma::find(values != 0.0); auto result = std::make_shared(indexes.n_elem, 2); for (int32_t k = 0; k < static_cast(indexes.n_elem); k++) { (*result)(k, 0) = indexes(k) % values.n_rows; // row index (*result)(k, 1) = indexes(k) / values.n_rows; // column index } return result; } void SourceShape::_get_limits(double &sx_min, double &sx_max, double &sy_min, double &sy_max, std::shared_ptr non_zeros, std::shared_ptr cx, std::shared_ptr cy) { auto rows_indx = non_zeros->col(0); uint32_t r_min = arma::min(rows_indx); uint32_t r_max = arma::max(rows_indx); auto cols_indx = non_zeros->col(1); uint32_t c_min = arma::min(cols_indx); uint32_t c_max = arma::max(cols_indx); sx_min = (*cx)(c_min); sx_max = (*cx)(c_max); sy_min = (*cy)(r_min); sy_max = (*cy)(r_max); } SourceShape::SourceShape(SharedAbstractSourceShapeModel model, double stepx, double stepy) { this->_model = model; this->_stepx = stepx; this->_stepy = stepy; SourceShape::_init_vectors(this->_kx, this->_cx, stepx); SourceShape::_init_vectors(this->_ky, this->_cy, stepy); // VLOG(4) << "Calculate source shape values in simulation grid"; this->_values = SourceShape::_init_values(*this->_cx, *this->_cy, this->_model); // VLOG(4) << "Get indexes of the non-zeros items"; this->_non_zeros = SourceShape::_get_non_zeros_indexes(*this->_values); // VLOG(4) << "Get source shape direction cosine limits"; this->_get_limits(this->_sx_min, this->_sx_max, this->_sy_min, this->_sy_max, this->_non_zeros, this->_cx, this->_cy); // VLOG(4) << "SX = " << this->_sx_min << " " << this->_sx_max << // " SY = " << this->_sy_min << " " << this->_sy_max; } std::shared_ptr SourceShape::values(void) const { return this->_values; } double SourceShape::value(uint32_t r, uint32_t c) const { return (*this->_values)(r, c); } std::shared_ptr SourceShape::cx(void) const { return this->_cx; } double SourceShape::cx(uint32_t i) const { return (*this->_cx)(i); } std::shared_ptr SourceShape::cy(void) const { return this->_cy; } double SourceShape::cy(uint32_t i) const { return (*this->_cy)(i); } std::shared_ptr SourceShape::non_zeros(void) const { return this->_non_zeros; } double SourceShape::sx_min(void) const { return this->_sx_min; } double SourceShape::sx_max(void) const { return this->_sx_max; } double SourceShape::sy_min(void) const { return this->_sy_min; } double SourceShape::sy_max(void) const { return this->_sy_max; } bool SourceShape::operator==(const SourceShape& other) const { return *this->_model == *other._model && this->_stepx == other._stepx && this->_stepy == other._stepy; } // ================================================= ImagingTool ================================================ // ImagingTool::ImagingTool(SharedSourceShape source_shape, SharedAbstractPupilFilterModel pupil_filter_model, double wavelength, double numeric_aperture, double reduction_ratio, double flare, double immersion) : wavelength(wavelength), numeric_aperture(numeric_aperture) { this->_source_shape = source_shape; this->_pupil_filter_model = pupil_filter_model; this->_reduction_ratio = reduction_ratio; this->_squared_reduction_ratio = reduction_ratio * reduction_ratio; this->_flare = flare; this->_immersion = immersion; } SharedSourceShape ImagingTool::source_shape(void) const { return this->_source_shape; } arma::cx_double ImagingTool::filter(double cx, double cy) const { return this->_pupil_filter_model->calculate(cx, cy); } double ImagingTool::reduction(double cx, double cy, arma::cx_double environment_refraction) const { // TODO: Added immersion calculation double cxy2 = cx * cx + cy * cy; double n_env2 = std::abs(environment_refraction) * std::abs(environment_refraction); // LOG(INFO) << "Environment refractive index = " << std::abs(environment_refraction); return std::pow((1 - cxy2/this->_squared_reduction_ratio) / (1 - cxy2/n_env2), 0.25); } void ImagingTool::flare(SharedResistVolume intensity) const { if (this->_flare != 0.0) { arma::cube& values = *intensity->values(); for (arma::cube::iterator it = values.begin(); it != values.end(); it++) { *it = this->_flare + (1 - this->_flare) * (*it); } } } bool ImagingTool::operator==(const ImagingTool& other) const { return *this->_source_shape == *other._source_shape && *this->_pupil_filter_model == *other._pupil_filter_model && this->wavelength == other.wavelength && this->numeric_aperture == other.numeric_aperture && this->_reduction_ratio == other._reduction_ratio && this->_flare == other._flare && this->_immersion == other._immersion; } // ================================================== Exposure ================================================== // Exposure::Exposure(double focus, double nominal_dose, double correctable) : focus(focus), nominal_dose(nominal_dose), correctable(correctable) { } arma::cx_double Exposure::defocus(double cx, double cy, double wvl) const { if (this->focus != 0.0) { double cxy2 = cx * cx + cy * cy; double opd = this->focus*(1 - sqrt(1 - cxy2)); return std::exp(2*M_PI*j*opd/wvl); } else { return arma::cx_double(1.0, 0.0); } } double Exposure::dose(void) const { return this->nominal_dose * this->correctable; } bool Exposure::operator==(const Exposure& other) const { return this->focus == other.focus && this->nominal_dose == other.nominal_dose && this->correctable == other.correctable; } // ================================================= Diffraction ================================================ // void Diffraction::_add_1d_region(SharedAbstractMaskGeometry region, arma::cx_double factor) { // Corrected during mask converting // region->set_bypass(CW); // In one-dimensional mask only one region exist SharedEdge2d r = region->front(); // Simplifier access to required member fields uint32_t axis = region->axis(); double dst = r->dst[axis]; double org = r->org[axis]; arma::cx_mat& values = *this->_values; arma::s32_vec& k = *this->k(axis); arma::vec& frq = *this->frq(axis); arma::cx_double value; for (uint32_t i = 0; i < k.n_elem; i++) { if (k(i) == 0) { value = (dst - org); // VLOG(4) << "i = " << i << " k = " << i << "/" << k.n_elem << " v = " << value; } else { arma::cx_double w = 2*M_PI*j*frq(i); value = -(std::exp(-w*dst) - std::exp(-w*org)) / w; // VLOG(4) << "i = " << i << " k = " << i << "/" << k.n_elem << " f = " << frq(i) // << " w = " << w << " e^w1 = " << exp(-w*dst) << " e^w2 = " << exp(-w*org) // << " v = " << value; } values(i) += factor*value; } } arma::cx_double Diffraction::_calc_2d_region(SharedAbstractMaskGeometry region, int32_t kx, int32_t ky, double frqx, double frqy) { arma::cx_double result = 0.0; for (auto e : *region) { arma::cx_double value; const double dx = e->dx(); if (dx == 0.0) { value = 0.0; } else { const double dy = e->dy(); const double s = e->slope(); const double b = e->dst.y - s*e->dst.x; if (kx == 0 && ky == 0) { // diffraction for zero order value = e->area(); } else if (kx == 0 && ky != 0) { // diffraction for orders if FX = 0 const arma::cx_double wy = 2*M_PI*j*frqy; if (dy == 0) { value = dx/wy*(1.0 - std::exp(-wy*b)); } else { //dX && dY != 0 value = dx/wy + (std::exp(-wy*b)/s/wy/wy)*(std::exp(-s*wy*e->dst.x) - std::exp(-s*wy*e->org.x)); } } else if (kx != 0 && ky == 0) { // diffraction for orders if FY = 0 const arma::cx_double wx = 2*M_PI*j*frqx; if (dy == 0) { value = b/wx*(std::exp(-wx*e->org.x) - std::exp(-wx*e->dst.x)); } else { //dX && dY != 0 const arma::cx_double ex0 = std::exp(-wx * e->org.x); const arma::cx_double ex1 = std::exp(-wx * e->dst.x); value = (s+wx*b)*(ex0-ex1)/wx/wx + s*(ex0*e->org.x - ex1*e->dst.x)/wx; } } else { // other cases const arma::cx_double wx = 2*M_PI*j*frqx; const arma::cx_double wy = 2*M_PI*j*frqy; if (dy == 0) { value = (1.0 - std::exp(-wy*b))*(std::exp(-wx*e->org.x)-std::exp(-wx*e->dst.x))/wx/wy; } else if (wx + s*wy == 0.0) { value = (std::exp(-wx*e->org.x)-std::exp(-wx*e->dst.x))/wx/wy - dx*std::exp(-wy*b)/wy; } else { const arma::cx_double coef = wx + s*wy; const arma::cx_double dexp = std::exp(-wx*e->org.x) - std::exp(-wx*e->dst.x); value = dexp/wx/wy + std::exp(-wy*b)/wy*(std::exp(-coef*e->dst.x)-std::exp(-coef*e->org.x))/coef; } } } result += value; } return result; } void Diffraction::_add_2d_region(SharedAbstractMaskGeometry region, arma::cx_double factor) { arma::cx_mat& values = *this->values(); arma::mat& cxy = *this->cxy(); // Corrected during mask converting // We should make positive area of polygon // region->set_bypass(CW); double na = this->numeric_aperture; // Flag that diffraction term at kx, ky has been calculated auto calculated = arma::uchar_mat(values.n_rows, values.n_cols, arma::fill::zeros); for (uint32_t k = 0; k < this->source_shape->non_zeros()->n_rows; k++) { auto rc = this->source_shape->non_zeros()->row(k); double scx = na * this->source_shape->cx(rc(1)); double scy = na * this->source_shape->cy(rc(0)); for (uint32_t c = 0; c < this->_kx->n_elem; c++) { int32_t kx = (*this->_kx)(c); double cx = (*this->_cx)(c); double frqx = (*this->_frqx)(c); for (uint32_t r = 0; r < this->_ky->n_elem; r++) { int32_t ky = (*this->_ky)(r); double cy = (*this->_cy)(r); double frqy = (*this->_frqy)(r); // Diffraction term not being calculated if it has already been calculated and // it in aperture or in aperture + offset from source // Additional check cxy <= na required for the reason diffraction orders should // not been removed for central order especially for displaying. if (!calculated(r, c) && (cxy(r, c) <= na || within_circle(cx, cy, scx, scy, na))) { values(r, c) += factor*Diffraction::_calc_2d_region(region, kx, ky, frqx, frqy); calculated(r, c) = true; } } // end ky for-loop } // end kx for-loop } // end source shape for-loop } Diffraction::Diffraction(SharedMask mask, SharedImagingTool imaging_tool) : source_shape(imaging_tool->source_shape()), pitch(mask->pitch()), boundary(*mask->boundary()), numeric_aperture(imaging_tool->numeric_aperture), wavelength(imaging_tool->wavelength) { const double na = this->numeric_aperture; const double wvl = this->wavelength; const double scx_min = this->source_shape->sx_min(); const double scx_max = this->source_shape->sx_max(); const double scy_min = this->source_shape->sy_min(); const double scy_max = this->source_shape->sy_max(); // Attention: rows is y-axis and cols is x-axis auto lim_cols = Diffraction::_calc_size(na, wvl, this->pitch.x, scx_min, scx_max); auto lim_rows = Diffraction::_calc_size(na, wvl, this->pitch.y, scy_min, scy_max); uint32_t cols = lim_cols.second - lim_cols.first + 1; uint32_t rows = lim_rows.second - lim_rows.first + 1; // VLOG(4) << "Cols = " << cols << " Rows = " << rows; // VLOG(4) << "Allocate memory for arrays and vectors"; this->_values = std::make_shared(rows, cols, arma::fill::zeros); this->_frqx = std::make_shared(cols, arma::fill::zeros); this->_frqy = std::make_shared(rows, arma::fill::zeros); this->_cx = std::make_shared(cols, arma::fill::zeros); this->_cy = std::make_shared(rows, arma::fill::zeros); this->_kx = std::make_shared(cols, arma::fill::zeros); this->_ky = std::make_shared(rows, arma::fill::zeros); // VLOG(4) << "Initialize diffraction cosine and terms vectors"; Diffraction::_init_vectors(*this->_kx, *this->_frqx, *this->_cx, this->pitch.x, this->wavelength, lim_cols); Diffraction::_init_vectors(*this->_ky, *this->_frqy, *this->_cy, this->pitch.y, this->wavelength, lim_rows); this->_cxy = std::make_shared(rows, cols, arma::fill::zeros); Diffraction::_init_cosines(*this->_cxy, *this->_cx, *this->_cy); } // Return direction cosines for given axis std::shared_ptr Diffraction::c(uint32_t axis) const { return Diffraction::_select_axis(axis, this->_cx, this->_cy); } // Return diffraction terms order number for given axis std::shared_ptr Diffraction::k(uint32_t axis) const { return Diffraction::_select_axis(axis, this->_kx, this->_ky); } // Return spatial frequencies for given axis std::shared_ptr Diffraction::frq(uint32_t axis) const { return Diffraction::_select_axis(axis, this->_frqx, this->_frqy); } // Return plane waves of diffraction pattern values std::shared_ptr Diffraction::values(void) const { return this->_values; } arma::cx_double Diffraction::value(uint32_t r, uint32_t c) const { return (*this->_values)(r, c); } // Return absolute value of direction cosines std::shared_ptr Diffraction::cxy(void) const { return this->_cxy; } // Return direction cosine belong to x-axis std::shared_ptr Diffraction::cx(void) const { return this->_cx; } double Diffraction::cx(uint32_t i) const { return (*this->_cx)(i); } // Return direction cosine belong to y-axis std::shared_ptr Diffraction::cy(void) const { return this->_cy; } double Diffraction::cy(uint32_t i) const { return (*this->_cy)(i); } // Return spatial frequencies belong to x-axis std::shared_ptr Diffraction::frqx(void) const { return this->_frqx; } // Return spatial frequencies belong to y-axis std::shared_ptr Diffraction::frqy(void) const { return this->_frqy; } // Return diffraction terms order numbers belong x-axis std::shared_ptr Diffraction::kx(void) const { return this->_kx; } int32_t Diffraction::kx(uint32_t i) const { return (*this->_kx)(i); } // Return diffraction terms order numbers belong y-axis std::shared_ptr Diffraction::ky(void) const { return this->_ky; } int32_t Diffraction::ky(uint32_t i) const { return (*this->_ky)(i); } void Diffraction::add_region(SharedAbstractMaskGeometry region, arma::cx_double factor) { if (region->axis() == DIM_1D_X || region->axis() == DIM_1D_Y) { this->_add_1d_region(region, factor/this->pitch[region->axis()]); } else if (region->axis() == DIM_2D) { this->_add_2d_region(region, factor/this->pitch.x/this->pitch.y); } else { throw std::invalid_argument("Can't process region while diffraction calculate: region type is unknown"); } } // ============================================= AbstractWaferLayer ============================================= // bool AbstractWaferLayer::is_environment(void) const { return this->type == ENVIRONMENT_LAYER; } bool AbstractWaferLayer::is_resist(void) const { return this->type == RESIST_LAYER; } bool AbstractWaferLayer::is_material(void) const { return this->type == MATERIAL_LAYER; } bool AbstractWaferLayer::is_substrate(void) const { return this->type == SUBSTRATE_LAYER; } arma::cx_double AbstractWaferLayer::effective_refraction(arma::cx_double incident_angle, double wavelength) const { return std::cos(incident_angle) * this->refraction(wavelength); } // Attention: valid only for zero order arma::cx_double AbstractWaferLayer::internal_transmit(double wavelength, double power) const { return std::exp(2.0*M_PI*j*this->refraction(wavelength)*this->thickness/wavelength*power); } arma::cx_double AbstractWaferLayer::internal_transmit( arma::cx_double incident_angle, double dz, double wavelength) const { return std::exp(2.0*M_PI*j*this->effective_refraction(incident_angle, wavelength)*dz/wavelength); } std::string AbstractWaferLayer::str(void) const { std::ostringstream result; result << "WaferLayer: "; if (this->is_environment()) { result << "environment"; } else if (this->is_resist()) { result << "resist"; } else if (this->is_material()) { result << "material"; } else if (this->is_substrate()) { result << "substrate"; } else { result << "unknown type"; } result << "; thickness: " << this->thickness; return result.str(); } // ============================================= StandardWaferLayer ============================================= // StandardWaferLayer::StandardWaferLayer(layer_type_t layer_type, double thickness, const arma::vec& wavelength, const arma::vec& refraction_real, const arma::vec& refraction_imag) : AbstractWaferLayer(layer_type, thickness) { auto wvl = std::make_shared(wavelength); auto real = std::make_shared(refraction_real); auto imag = std::make_shared(refraction_imag); this->_refraction_real = interp::LinearInterpolation1d(wvl, real, NAN); this->_refraction_imag = interp::LinearInterpolation1d(wvl, imag, NAN); } arma::cx_double StandardWaferLayer::refraction(double wavelength, double m) const { double real = this->_refraction_real.interpolate(wavelength); double imag = this->_refraction_imag.interpolate(wavelength); // LOG(INFO) << "REFRACTION(" << wavelength << ") = " << real << " " << imag; return arma::cx_double(real, imag); } bool StandardWaferLayer::operator==(const AbstractWaferLayer& other) const { if (this->type != other.type) { return false; } else { const StandardWaferLayer *p = dynamic_cast(&other); return this->_refraction_real == p->_refraction_real && this->_refraction_imag == p->_refraction_imag; } } // ============================================= ConstantWaferLayer ============================================= // ConstantWaferLayer::ConstantWaferLayer(layer_type_t layer_type, double thickness, double real, double imag) : AbstractWaferLayer(layer_type, thickness) { this->_refraction = arma::cx_double(real, imag); } arma::cx_double ConstantWaferLayer::refraction(double wavelength, double m) const { // LOG(INFO) << "CONST REFRACTION: " << this->_refraction.real() << " " << this->_refraction.imag(); return this->_refraction; } bool ConstantWaferLayer::operator==(const AbstractWaferLayer& other) const { if (this->type != other.type) { return false; } else { const ConstantWaferLayer *p = dynamic_cast(&other); return this->_refraction == p->_refraction; } } // ============================================ ExposureResistModel ============================================= // arma::cx_double ExposureResistModel::refraction(double m) const { double im = this->wavelength / 4.0 / M_PI * (this->a * m + this->b) * 1e-3; return arma::cx_double(this->n, im); } bool ExposureResistModel::operator==(const ExposureResistModel& other) const { return this->wavelength == other.wavelength && this->a == other.a && this->b == other.b && this->c == other.c && this->n == other.n; } // ============================================== PebResistModel ================================================ // double PebResistModel::diffusivity(double temp) const { double tempk = temp - physc::T0; return std::exp(this->ln_ar - this->ea/(physc::R*tempk)); } double PebResistModel::diffusion_length(double temp, double time) const { return std::sqrt(2.0 * this->diffusivity(temp) * time); } arma::vec PebResistModel::kernel(SharedPostExposureBake peb, double step) const { if (step != 0.0) { double sigma = this->diffusion_length(peb->temp, peb->time); // LOG(INFO) << "Create PEB kernel for temp = " << peb->temp << // " time = " << peb->time << " with Sigma = " << sigma; // Convert result sigma value to input grid value double sigma_on_grid = std::ceil(3.0*sigma) - std::fmod(std::ceil(3.0*sigma), step) + step; uint32_t count = (uint32_t) (2*sigma_on_grid/step) + 1; // LOG(INFO) << "Kernel size = " << count << " SigmaGrid = " << sigma_on_grid; arma::vec kernel = arma::vec(count); for (uint32_t k = 0; k < count; k++) { double x = k*step - sigma_on_grid; kernel[k] = step/sigma/std::sqrt(2*M_PI)*std::exp(-x*x/2/sigma/sigma); } // Convolution kernel must be normalized because three sigma interval is not equal to full intergral value // of the kernel. So this can result in PAC after PEB will exceed max possible value 1.0. In turn development // rates will be calculated with NaN values return kernel / arma::accu(kernel); } else { // LOG(INFO) << "Create empty PEB kernel (step = 0.0)"; return arma::vec(1, arma::fill::ones); } } bool PebResistModel::operator==(const PebResistModel& other) const { return this->ea == other.ea && this->ln_ar == other.ln_ar; } // ============================================= ResistWaferLayer =============================================== // arma::cx_double ResistWaferLayer::refraction(double wavelength, double m) const { return this->exposure->refraction(m); } bool ResistWaferLayer::operator==(const AbstractWaferLayer& other) const { if (this->type != other.type) { return false; } else { const ResistWaferLayer *p = dynamic_cast(&other); return this->exposure == p->exposure && this->peb == p->peb && this->rate == p->rate; } } // ================================================ WaferStack ================================================== // // Calculate refractive indexes between layers (for all layers in the stack) arma::cx_vec WaferStack::_calc_refractive_indexes(double cxy, double wavelength) { arma::cx_vec refractive_indexes = arma::cx_vec(this->_layers.size()); arma::cx_double angle = std::asin(cxy); refractive_indexes(0) = this->_layers[0]->effective_refraction(angle, wavelength); for (uint32_t k = 1; k < this->_layers.size(); k++) { arma::cx_double rtop = this->_layers[k-1]->refraction(wavelength); arma::cx_double rbot = this->_layers[k]->refraction(wavelength); angle = WaferStack::_angle(angle, rtop, rbot); refractive_indexes(k) = this->_layers[k]->effective_refraction(angle, wavelength); } return refractive_indexes; } // Calculate effective reflection for all stack from top to bottom // (reflection with taking account of all top layers) std::shared_ptr WaferStack::_calc_effective_top_reflections(double cxy, double wavelength) { arma::cx_vec refractive_indexes = this->_calc_refractive_indexes(cxy, wavelength); std::shared_ptr result = std::make_shared(this->_layers.size()); arma::cx_vec& reflections = *result; reflections(0) = WaferStack::_reflection(refractive_indexes(0), refractive_indexes(1)); for (uint32_t k = 1; k < this->_layers.size()-1; k++) { arma::cx_double v = reflections(k-1) * this->_layers[k]->internal_transmit(wavelength, 2.0); arma::cx_double y = (1.0 + v) / (1.0 - v); reflections(k) = (refractive_indexes(k)*y - refractive_indexes(k+1)) / (refractive_indexes(k)*y + refractive_indexes(k+1)); } return result; } // Return cached value or calculate std::shared_ptr WaferStack::effective_top_reflection(double cx, double cy, double wavelength) { if (this->_cached_wavelength != wavelength) { this->_cached_top_reflections.clear(); this->_cached_wavelength = wavelength; } auto cx_cy = std::make_pair(cx, cy); auto cached = this->_cached_top_reflections.find(cx_cy); if (cached != this->_cached_top_reflections.end()) { return cached->second; } else { double cxy = sqrt(cx*cx + cy*cy); std::shared_ptr reflections = this->_calc_effective_top_reflections(cxy, wavelength); this->_cached_top_reflections[cx_cy] = reflections; return reflections; } } // Calculate effective reflection for all stack from bottom to top // (reflection with taking account of all bottom layers) std::shared_ptr WaferStack::_calc_effective_bottom_reflections(double cxy, double wavelength) { arma::cx_vec refractive_indexes = this->_calc_refractive_indexes(cxy, wavelength); std::shared_ptr result = std::make_shared(this->_layers.size()); arma::cx_vec& reflections = *result; uint32_t bottom = this->_layers.size() - 1; reflections(bottom-1) = WaferStack::_reflection(refractive_indexes(bottom-1), refractive_indexes(bottom)); for (uint32_t k = bottom-2; k >= 1; k--) { arma::cx_double v = reflections(k+1) * this->_layers[k+1]->internal_transmit(wavelength, 2.0); arma::cx_double x = (1.0 - v) / (1.0 + v); reflections(k) = (refractive_indexes(k) - x*refractive_indexes(k+1)) / (refractive_indexes(k) + x*refractive_indexes(k+1)); } reflections(0) = WaferStack::_reflection(refractive_indexes(0), refractive_indexes(1)); return result; } // Return cached value or calculate std::shared_ptr WaferStack::effective_bottom_reflection(double cx, double cy, double wavelength) { if (this->_cached_wavelength != wavelength) { this->_cached_bottom_reflections.clear(); this->_cached_wavelength = wavelength; } auto cx_cy = std::make_pair(cx, cy); auto cached = this->_cached_bottom_reflections.find(cx_cy); if (cached != this->_cached_bottom_reflections.end()) { return cached->second; } else { double cxy = sqrt(cx*cx + cy*cy); std::shared_ptr reflections = this->_calc_effective_bottom_reflections(cxy, wavelength); this->_cached_bottom_reflections[cx_cy] = reflections; return reflections; } } WaferStack::WaferStack(void) { this->_resist = nullptr; this->_substrate = nullptr; this->_environment = nullptr; this->_cached_wavelength = -1.0; } WaferStack::WaferStack(ArrayOfSharedAbstractWaferLayers layers) : WaferStack() { for (auto layer : layers) { this->push(layer); } } void WaferStack::push(SharedAbstractWaferLayer layer) { if (this->_environment) { throw std::invalid_argument("Layer of any type can't be added after the environment layer set"); } if (this->_resist) { if (layer->is_resist()) { throw std::invalid_argument("Can't push the second resist layer into the wafer stack"); } else if (!layer->is_environment()) { throw std::invalid_argument("Material layer on the resist layer not allowed"); } } if (this->_layers.empty() && !layer->is_substrate()) { throw std::invalid_argument("First layer must be substrate layer"); } if (layer->is_environment()) { this->_environment = layer; } else if (layer->is_resist()) { this->_resist = layer; } else if (layer->is_substrate()) { this->_substrate = layer; } this->_layers.insert(this->_layers.begin(), layer); } bool WaferStack::is_ok(void) { return this->_environment && this->_resist && this->_substrate; } SharedAbstractWaferLayer WaferStack::operator[](int32_t i) const { // Make available circular indexing and negative indexing, e.g. -1 => last item return this->_layers[(this->_layers.size() + i) % this->_layers.size()]; } SharedAbstractWaferLayer WaferStack::environment(void) const { return this->_environment; } SharedAbstractWaferLayer WaferStack::resist(void) const { return this->_resist; } SharedAbstractWaferLayer WaferStack::substrate(void) const { return this->_substrate; } uint32_t WaferStack::index_of(SharedAbstractWaferLayer layer) const { return std::find(this->_layers.begin(), this->_layers.end(), layer) - this->_layers.begin(); } std::complex WaferStack::reflectivity(uint32_t indx, double wavelength) { if (indx == 0 || indx > this->_layers.size()-1) { throw std::out_of_range("Can't calculate reflectivity for " "environment layer or layer that isn't in list"); } arma::cx_double ro12 = WaferStack::_reflection( this->_layers[indx-1]->effective_refraction(0.0, wavelength), this->_layers[indx]->effective_refraction(0.0, wavelength)); arma::cx_vec bottom_reflections = *this->effective_bottom_reflection(0.0, 0.0, wavelength); arma::cx_double ro23e = bottom_reflections(indx); arma::cx_double tau2d = this->_layers[indx]->internal_transmit(wavelength, 2.0); arma::cx_double v = (ro12 + ro23e * tau2d) / (1.0 + ro12*ro23e * tau2d); // LOG(INFO) << "indx = " << indx << "ro12 = " << ro12 << " ro23e = " // << ro23e << " tau2d = " << tau2d << " v = " << v; return v; } // This routine only suitable for the stack where resist is the SECOND layer! std::complex WaferStack::standing_waves(double cx, double cy, double dz, double wavelength) { arma::cx_vec reflections = *this->effective_bottom_reflection(cx, cy, wavelength); double cxy = sqrt(cx*cx + cy*cy); arma::cx_double env_angle = std::asin(cxy); arma::cx_double resist_angle = WaferStack::_angle(env_angle, this->environment()->refraction(wavelength), this->resist()->refraction(wavelength)); arma::cx_double reffenv = this->environment()->effective_refraction(env_angle, wavelength); arma::cx_double reffres = this->resist()->effective_refraction(resist_angle, wavelength); arma::cx_double tau12 = WaferStack::_transmittance(reffenv, reffres); arma::cx_double ro12 = reflections(0); arma::cx_double ro23e = reflections(1); arma::cx_double dtau = this->resist()->internal_transmit(resist_angle, this->resist()->thickness, wavelength); arma::cx_double tau2d = dtau * dtau; arma::cx_double ztau = this->resist()->internal_transmit(resist_angle, dz, wavelength); arma::cx_double num = tau12 * (ztau + ro23e*tau2d/ztau); arma::cx_double den = 1.0 + ro12*ro23e*tau2d; arma::cx_double standing_wave = num / den; // LOG(INFO) << "cx = " << cx << " cy = " << cy << " dz = " << dz << " wvl = " << wavelength << std::endl // << " angle env = " << env_angle << " angl res = " << resist_angle << std::endl // << " reffenv = " << reffenv << " reffres = " << reffres << " tau12 = " << tau12 << std::endl // << " coef = " << ztau << " ro12 = " << reflections(0) << " ro23e = " << reflections(1) << std::endl // << " standing wave = " << standing_wave; return standing_wave; } bool WaferStack::operator==(const WaferStack& other) const { return this->_layers == other._layers; } // =========================================== OpticalTransferFunction ========================================== // // Calculate optical transfer function value for given direction cosines values cx, cy // and given offset from the resist top dz. arma::cx_double OpticalTransferFunction::calc(double cx, double cy, double dz) { arma::cx_double otf = 1.0; if (within_circle(cx, cy, this->_numeric_aperture)) { otf *= this->_imaging_tool->filter(cx, cy); otf *= this->_imaging_tool->reduction(cx, cy); if (this->_exposure) { otf *= this->_exposure->defocus(cx, cy, this->_wavelength); } if (this->_wafer_stack) { otf *= this->_wafer_stack->standing_waves(cx, cy, dz, this->_wavelength); } } else { otf = 0.0; } return otf; } ConstSharedImagingTool OpticalTransferFunction::imaging_tool(void) const { return this->_imaging_tool; } ConstSharedExposure OpticalTransferFunction::exposure(void) const { return this->_exposure; } ConstSharedWaferStack OpticalTransferFunction::wafer_stack(void) const { return this->_wafer_stack; } } // namespace oplc ================================================ FILE: OptolithiumC/src/opl_contours.cpp ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include "opl_contours.h" namespace contours { using namespace geometry; /* ==================================== ContourEngine ==================================== */ inline double _get_level(int32_t r, int32_t c, const arma::mat& values, double level, int32_t sign) { int32_t n_rows = static_cast(values.n_rows); int32_t n_cols = static_cast(values.n_cols); if (r >= 0 && c >= 0 && r < n_rows && c < n_cols) { return values(r, c) - level; } else { return static_cast(sign); } } inline void _calc_level_array(double *f, int32_t r, int32_t c, const arma::mat& values, double level, int32_t sign) { f[0] = _get_level(r-1, c-1, values, level, sign); f[1] = _get_level(r-1, c, values, level, sign); f[3] = _get_level(r, c-1, values, level, sign); f[2] = _get_level(r, c, values, level, sign); for (uint32_t k = 0; k < 4; k++) { if (std::abs(f[k]) < std::numeric_limits::epsilon()) { f[k] = std::numeric_limits::epsilon(); } } } void _ContourEngine::_mark_facets(double lvl, int32_t sign) { const arma::mat& values = *this->_values; CharMat& marks = this->_marks; double f[4]; for (int32_t c = 0; c < static_cast(marks.n_cols); c++) { for (int32_t r = 0; r < static_cast(marks.n_rows); r++) { _calc_level_array(f, r, c, values, lvl, sign); if (f[1] * f[2] < 0) { marks(r, c) += 2; } if (f[0] * f[3] < 0) { marks(r, c) += 8; } } } for (int32_t r = 0; r < static_cast(marks.n_rows); r++) { for (int32_t c = 0; c < static_cast(marks.n_cols); c++) { _calc_level_array(f, r, c, values, lvl, sign); if (f[0] * f[1] < 0) { marks(r, c) += 1; } if (f[2] * f[3] < 0) { marks(r, c) += 4; } } } } void _ContourEngine::_drawcn(double lvl, int32_t r, int32_t c, Point2d ct, uint8_t start_edge, bool first) { double px[4], py[4], pz[4], tmp; uint32_t stop_edge, pt[2]; const arma::vec& x = *this->_x; const arma::vec& y = *this->_y; const arma::mat& values = *this->_values; CharMat& marks = this->_marks; // Continue while next facet is not done yet. while (r >= 0 && c >= 0 && r < static_cast(marks.n_rows) && c < static_cast(marks.n_cols) && marks(r, c) > 0) { //get x, y, and z - lvl for current facet px[0] = px[3] = (c-1 < 0) ? x(c) : x(c-1); px[1] = px[2] = (c == static_cast(x.n_elem)) ? x(c-1) : x(c); py[0] = py[1] = (r-1 < 0) ? y(r) : y(r-1); py[2] = py[3] = (r == static_cast(y.n_elem)) ? y(r-1) : y(r); _calc_level_array(pz, r, c, values, lvl, -1.0); // Get mark value of current facet. char id = marks(r, c); // Check startedge s. if (start_edge == 255) { // Find start edge. for (uint32_t k = 0; k < 4; k++) { if (static_cast(1 << k) & id) { start_edge = k; } } } if (start_edge != 255) { // Decrease mark value of current facet for start edge. marks(r, c) -= static_cast(1 << start_edge); // Next point (clockwise). pt[0] = start_edge; pt[1] = (pt[0] + 1) % 4; SharedArrayOfSharedPoints contour = nullptr; // Calculate contour segment start if first of contour. if (first) { tmp = std::abs(pz[pt[1]]) / std::abs(pz[pt[0]]); if (std::isnan(tmp)) { ct.x = ct.y = 0.5; } else { ct.x = px[pt[0]] + (px[pt[1]] - px[pt[0]])/(1 + tmp); ct.y = py[pt[0]] + (py[pt[1]] - py[pt[0]])/(1 + tmp); // VLOG(9) << "Set as first ct to " << ct.str(); } contour = std::make_shared(); SharedPoint2d point = std::make_shared(ct); contour->push_back(point); this->_contours_list.push_back(contour); first = false; } else { contour = this->_contours_list.back(); } // Find stop edge. for (uint32_t k = 1; k <= 4; k++) { if (start_edge == 0 || start_edge == 2) { stop_edge = (start_edge + k) % 4; } else { stop_edge = (start_edge - k) % 4; } if (static_cast(1 << stop_edge) & id) { break; } } pt[0] = stop_edge; pt[1] = (pt[0] + 1) % 4; tmp = std::abs(pz[pt[1]]) / std::abs(pz[pt[0]]); if (std::isnan(tmp)) { ct.x = ct.y = 0.5; } else { // VLOG(9) << "Set ct to " << ct.str(); ct.x = px[pt[0]] + (px[pt[1]] - px[pt[0]])/(1 + tmp); ct.y = py[pt[0]] + (py[pt[1]] - py[pt[0]])/(1 + tmp); } // Add point to contour. SharedPoint2d point = std::make_shared(ct); contour->push_back(point); // Decrease id value of current facet for start edge. marks(r, c) -= static_cast(1 << stop_edge); if (stop_edge == 0) { r--; } else if (stop_edge == 1) { c++; } else if (stop_edge == 2) { r++; } else if (stop_edge == 3) { c--; } start_edge = (stop_edge + 2) % 4; } } } void _ContourEngine::_calculate_level_lines(double level) { const arma::mat& values = *this->_values; CharMat& marks = this->_marks; for (int32_t c = 0; c < static_cast(this->_values->n_cols); c++) { if (marks(0, c) & 1) { this->_drawcn(level, 0, c, Point2d(), 0, true); } if (marks(static_cast(values.n_rows)-2, c) & 4) { this->_drawcn(level, static_cast(values.n_rows)-2, c, Point2d(), 2, true); } } for (int32_t r = 0; r < static_cast(values.n_rows); r++) { if (marks(r, 0) & 8) { this->_drawcn(level, r, 0, Point2d(), 3, true); } if (marks(r, static_cast(values.n_cols)-2) & 2) { this->_drawcn(level, r, static_cast(values.n_cols)-2, Point2d(), 1, true); } } for (int32_t r = 0; r < static_cast(values.n_rows); r++) { for (int32_t c = 0; c < static_cast(values.n_cols); c++) { if (marks(r, c) > 0) { this->_drawcn(level, r, c, Point2d(), 255, true); } } } // for (auto contour : this->_contours_list) { // VLOG(9) << "------------ Found contour ------------"; // for (auto point : *contour) { // VLOG(9) << point->str(); // } // } this->_marks.clear(); } void _ContourEngine::_erase_contour(SharedArrayOfSharedPoints contour) { for (auto it = this->_contours_list.begin(); it != this->_contours_list.end(); it++) { if (*it == contour) { this->_contours_list.erase(it); break; } } } void _ContourEngine::_extract_polygons(void) { for (auto contour : this->_contours_list) { SharedPolygon polygon = std::make_shared(*contour); polygon->clean(); this->_polygons.push_back(polygon); } this->_contours_list.clear(); } _ContourEngine::_ContourEngine(const arma::vec& x, const arma::vec& y, const arma::mat& values, double level, bool negative) : _x(std::make_shared(x)), _y(std::make_shared(y)), _values(std::make_shared(values)) { if (y.n_elem != values.n_rows || x.n_elem != values.n_cols) { throw std::invalid_argument("Values cols must be equal to X size and rows must be equal to Y size"); } const int32_t sign = negative ? -1 : 1; this->_marks = CharMat(values.n_rows+1, values.n_cols+1, arma::fill::zeros); VLOG(8) << "Make facets at " << level << " with sign " << sign; this->_mark_facets(level, sign); // for (uint32_t r = 0; r < this->_marks.n_rows; r++) { // for (uint32_t c = 0; c < this->_marks.n_cols; c++) { // if (this->_marks(r, c) == 0) { // printf(" "); // } else { // printf("%02d ", this->_marks(r, c)); // } // } // printf("\n"); // } VLOG(8) << "Calculate level lines at " << level; this->_calculate_level_lines(level); VLOG(8) << "Extract polygons"; this->_extract_polygons(); VLOG(8) << "Contours done"; } ArrayOfSharedPolygons _ContourEngine::polygons(void) const { return this->_polygons; } /* ==================================== _SurfaceEngine ==================================== */ const uint32_t _SurfaceEngine::edgeTable[256] = { 0x0 , 0x109, 0x203, 0x30a, 0x406, 0x50f, 0x605, 0x70c, 0x80c, 0x905, 0xa0f, 0xb06, 0xc0a, 0xd03, 0xe09, 0xf00, 0x190, 0x99 , 0x393, 0x29a, 0x596, 0x49f, 0x795, 0x69c, 0x99c, 0x895, 0xb9f, 0xa96, 0xd9a, 0xc93, 0xf99, 0xe90, 0x230, 0x339, 0x33 , 0x13a, 0x636, 0x73f, 0x435, 0x53c, 0xa3c, 0xb35, 0x83f, 0x936, 0xe3a, 0xf33, 0xc39, 0xd30, 0x3a0, 0x2a9, 0x1a3, 0xaa , 0x7a6, 0x6af, 0x5a5, 0x4ac, 0xbac, 0xaa5, 0x9af, 0x8a6, 0xfaa, 0xea3, 0xda9, 0xca0, 0x460, 0x569, 0x663, 0x76a, 0x66 , 0x16f, 0x265, 0x36c, 0xc6c, 0xd65, 0xe6f, 0xf66, 0x86a, 0x963, 0xa69, 0xb60, 0x5f0, 0x4f9, 0x7f3, 0x6fa, 0x1f6, 0xff , 0x3f5, 0x2fc, 0xdfc, 0xcf5, 0xfff, 0xef6, 0x9fa, 0x8f3, 0xbf9, 0xaf0, 0x650, 0x759, 0x453, 0x55a, 0x256, 0x35f, 0x55 , 0x15c, 0xe5c, 0xf55, 0xc5f, 0xd56, 0xa5a, 0xb53, 0x859, 0x950, 0x7c0, 0x6c9, 0x5c3, 0x4ca, 0x3c6, 0x2cf, 0x1c5, 0xcc , 0xfcc, 0xec5, 0xdcf, 0xcc6, 0xbca, 0xac3, 0x9c9, 0x8c0, 0x8c0, 0x9c9, 0xac3, 0xbca, 0xcc6, 0xdcf, 0xec5, 0xfcc, 0xcc , 0x1c5, 0x2cf, 0x3c6, 0x4ca, 0x5c3, 0x6c9, 0x7c0, 0x950, 0x859, 0xb53, 0xa5a, 0xd56, 0xc5f, 0xf55, 0xe5c, 0x15c, 0x55 , 0x35f, 0x256, 0x55a, 0x453, 0x759, 0x650, 0xaf0, 0xbf9, 0x8f3, 0x9fa, 0xef6, 0xfff, 0xcf5, 0xdfc, 0x2fc, 0x3f5, 0xff , 0x1f6, 0x6fa, 0x7f3, 0x4f9, 0x5f0, 0xb60, 0xa69, 0x963, 0x86a, 0xf66, 0xe6f, 0xd65, 0xc6c, 0x36c, 0x265, 0x16f, 0x66 , 0x76a, 0x663, 0x569, 0x460, 0xca0, 0xda9, 0xea3, 0xfaa, 0x8a6, 0x9af, 0xaa5, 0xbac, 0x4ac, 0x5a5, 0x6af, 0x7a6, 0xaa , 0x1a3, 0x2a9, 0x3a0, 0xd30, 0xc39, 0xf33, 0xe3a, 0x936, 0x83f, 0xb35, 0xa3c, 0x53c, 0x435, 0x73f, 0x636, 0x13a, 0x33 , 0x339, 0x230, 0xe90, 0xf99, 0xc93, 0xd9a, 0xa96, 0xb9f, 0x895, 0x99c, 0x69c, 0x795, 0x49f, 0x596, 0x29a, 0x393, 0x99 , 0x190, 0xf00, 0xe09, 0xd03, 0xc0a, 0xb06, 0xa0f, 0x905, 0x80c, 0x70c, 0x605, 0x50f, 0x406, 0x30a, 0x203, 0x109, 0x0 }; const int32_t _SurfaceEngine::triTable[256][16] = { {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 8, 3, 9, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 2, 10, 0, 2, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 8, 3, 2, 10, 8, 10, 9, 8, -1, -1, -1, -1, -1, -1, -1}, {3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 11, 2, 8, 11, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 9, 0, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 11, 2, 1, 9, 11, 9, 8, 11, -1, -1, -1, -1, -1, -1, -1}, {3, 10, 1, 11, 10, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 10, 1, 0, 8, 10, 8, 11, 10, -1, -1, -1, -1, -1, -1, -1}, {3, 9, 0, 3, 11, 9, 11, 10, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 3, 0, 7, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 1, 9, 4, 7, 1, 7, 3, 1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 4, 7, 3, 0, 4, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1}, {9, 2, 10, 9, 0, 2, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1}, {2, 10, 9, 2, 9, 7, 2, 7, 3, 7, 9, 4, -1, -1, -1, -1}, {8, 4, 7, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 4, 7, 11, 2, 4, 2, 0, 4, -1, -1, -1, -1, -1, -1, -1}, {9, 0, 1, 8, 4, 7, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1}, {4, 7, 11, 9, 4, 11, 9, 11, 2, 9, 2, 1, -1, -1, -1, -1}, {3, 10, 1, 3, 11, 10, 7, 8, 4, -1, -1, -1, -1, -1, -1, -1}, {1, 11, 10, 1, 4, 11, 1, 0, 4, 7, 11, 4, -1, -1, -1, -1}, {4, 7, 8, 9, 0, 11, 9, 11, 10, 11, 0, 3, -1, -1, -1, -1}, {4, 7, 11, 4, 11, 9, 9, 11, 10, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 4, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 5, 4, 1, 5, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 5, 4, 8, 3, 5, 3, 1, 5, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 1, 2, 10, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1}, {5, 2, 10, 5, 4, 2, 4, 0, 2, -1, -1, -1, -1, -1, -1, -1}, {2, 10, 5, 3, 2, 5, 3, 5, 4, 3, 4, 8, -1, -1, -1, -1}, {9, 5, 4, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 11, 2, 0, 8, 11, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1}, {0, 5, 4, 0, 1, 5, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1}, {2, 1, 5, 2, 5, 8, 2, 8, 11, 4, 8, 5, -1, -1, -1, -1}, {10, 3, 11, 10, 1, 3, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 5, 0, 8, 1, 8, 10, 1, 8, 11, 10, -1, -1, -1, -1}, {5, 4, 0, 5, 0, 11, 5, 11, 10, 11, 0, 3, -1, -1, -1, -1}, {5, 4, 8, 5, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1}, {9, 7, 8, 5, 7, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 3, 0, 9, 5, 3, 5, 7, 3, -1, -1, -1, -1, -1, -1, -1}, {0, 7, 8, 0, 1, 7, 1, 5, 7, -1, -1, -1, -1, -1, -1, -1}, {1, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 7, 8, 9, 5, 7, 10, 1, 2, -1, -1, -1, -1, -1, -1, -1}, {10, 1, 2, 9, 5, 0, 5, 3, 0, 5, 7, 3, -1, -1, -1, -1}, {8, 0, 2, 8, 2, 5, 8, 5, 7, 10, 5, 2, -1, -1, -1, -1}, {2, 10, 5, 2, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1}, {7, 9, 5, 7, 8, 9, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 7, 9, 7, 2, 9, 2, 0, 2, 7, 11, -1, -1, -1, -1}, {2, 3, 11, 0, 1, 8, 1, 7, 8, 1, 5, 7, -1, -1, -1, -1}, {11, 2, 1, 11, 1, 7, 7, 1, 5, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 8, 8, 5, 7, 10, 1, 3, 10, 3, 11, -1, -1, -1, -1}, {5, 7, 0, 5, 0, 9, 7, 11, 0, 1, 0, 10, 11, 10, 0, -1}, {11, 10, 0, 11, 0, 3, 10, 5, 0, 8, 0, 7, 5, 7, 0, -1}, {11, 10, 5, 7, 11, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 0, 1, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 8, 3, 1, 9, 8, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1}, {1, 6, 5, 2, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 6, 5, 1, 2, 6, 3, 0, 8, -1, -1, -1, -1, -1, -1, -1}, {9, 6, 5, 9, 0, 6, 0, 2, 6, -1, -1, -1, -1, -1, -1, -1}, {5, 9, 8, 5, 8, 2, 5, 2, 6, 3, 2, 8, -1, -1, -1, -1}, {2, 3, 11, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 0, 8, 11, 2, 0, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1}, {5, 10, 6, 1, 9, 2, 9, 11, 2, 9, 8, 11, -1, -1, -1, -1}, {6, 3, 11, 6, 5, 3, 5, 1, 3, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 11, 0, 11, 5, 0, 5, 1, 5, 11, 6, -1, -1, -1, -1}, {3, 11, 6, 0, 3, 6, 0, 6, 5, 0, 5, 9, -1, -1, -1, -1}, {6, 5, 9, 6, 9, 11, 11, 9, 8, -1, -1, -1, -1, -1, -1, -1}, {5, 10, 6, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 3, 0, 4, 7, 3, 6, 5, 10, -1, -1, -1, -1, -1, -1, -1}, {1, 9, 0, 5, 10, 6, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1}, {10, 6, 5, 1, 9, 7, 1, 7, 3, 7, 9, 4, -1, -1, -1, -1}, {6, 1, 2, 6, 5, 1, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 5, 5, 2, 6, 3, 0, 4, 3, 4, 7, -1, -1, -1, -1}, {8, 4, 7, 9, 0, 5, 0, 6, 5, 0, 2, 6, -1, -1, -1, -1}, {7, 3, 9, 7, 9, 4, 3, 2, 9, 5, 9, 6, 2, 6, 9, -1}, {3, 11, 2, 7, 8, 4, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1}, {5, 10, 6, 4, 7, 2, 4, 2, 0, 2, 7, 11, -1, -1, -1, -1}, {0, 1, 9, 4, 7, 8, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1}, {9, 2, 1, 9, 11, 2, 9, 4, 11, 7, 11, 4, 5, 10, 6, -1}, {8, 4, 7, 3, 11, 5, 3, 5, 1, 5, 11, 6, -1, -1, -1, -1}, {5, 1, 11, 5, 11, 6, 1, 0, 11, 7, 11, 4, 0, 4, 11, -1}, {0, 5, 9, 0, 6, 5, 0, 3, 6, 11, 6, 3, 8, 4, 7, -1}, {6, 5, 9, 6, 9, 11, 4, 7, 9, 7, 11, 9, -1, -1, -1, -1}, {10, 4, 9, 6, 4, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 10, 6, 4, 9, 10, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1}, {10, 0, 1, 10, 6, 0, 6, 4, 0, -1, -1, -1, -1, -1, -1, -1}, {8, 3, 1, 8, 1, 6, 8, 6, 4, 6, 1, 10, -1, -1, -1, -1}, {1, 4, 9, 1, 2, 4, 2, 6, 4, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 1, 2, 9, 2, 4, 9, 2, 6, 4, -1, -1, -1, -1}, {0, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 3, 2, 8, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1}, {10, 4, 9, 10, 6, 4, 11, 2, 3, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 2, 2, 8, 11, 4, 9, 10, 4, 10, 6, -1, -1, -1, -1}, {3, 11, 2, 0, 1, 6, 0, 6, 4, 6, 1, 10, -1, -1, -1, -1}, {6, 4, 1, 6, 1, 10, 4, 8, 1, 2, 1, 11, 8, 11, 1, -1}, {9, 6, 4, 9, 3, 6, 9, 1, 3, 11, 6, 3, -1, -1, -1, -1}, {8, 11, 1, 8, 1, 0, 11, 6, 1, 9, 1, 4, 6, 4, 1, -1}, {3, 11, 6, 3, 6, 0, 0, 6, 4, -1, -1, -1, -1, -1, -1, -1}, {6, 4, 8, 11, 6, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 10, 6, 7, 8, 10, 8, 9, 10, -1, -1, -1, -1, -1, -1, -1}, {0, 7, 3, 0, 10, 7, 0, 9, 10, 6, 7, 10, -1, -1, -1, -1}, {10, 6, 7, 1, 10, 7, 1, 7, 8, 1, 8, 0, -1, -1, -1, -1}, {10, 6, 7, 10, 7, 1, 1, 7, 3, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 6, 1, 6, 8, 1, 8, 9, 8, 6, 7, -1, -1, -1, -1}, {2, 6, 9, 2, 9, 1, 6, 7, 9, 0, 9, 3, 7, 3, 9, -1}, {7, 8, 0, 7, 0, 6, 6, 0, 2, -1, -1, -1, -1, -1, -1, -1}, {7, 3, 2, 6, 7, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 3, 11, 10, 6, 8, 10, 8, 9, 8, 6, 7, -1, -1, -1, -1}, {2, 0, 7, 2, 7, 11, 0, 9, 7, 6, 7, 10, 9, 10, 7, -1}, {1, 8, 0, 1, 7, 8, 1, 10, 7, 6, 7, 10, 2, 3, 11, -1}, {11, 2, 1, 11, 1, 7, 10, 6, 1, 6, 7, 1, -1, -1, -1, -1}, {8, 9, 6, 8, 6, 7, 9, 1, 6, 11, 6, 3, 1, 3, 6, -1}, {0, 9, 1, 11, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 8, 0, 7, 0, 6, 3, 11, 0, 11, 6, 0, -1, -1, -1, -1}, {7, 11, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 8, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 9, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 1, 9, 8, 3, 1, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1}, {10, 1, 2, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 3, 0, 8, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1}, {2, 9, 0, 2, 10, 9, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1}, {6, 11, 7, 2, 10, 3, 10, 8, 3, 10, 9, 8, -1, -1, -1, -1}, {7, 2, 3, 6, 2, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {7, 0, 8, 7, 6, 0, 6, 2, 0, -1, -1, -1, -1, -1, -1, -1}, {2, 7, 6, 2, 3, 7, 0, 1, 9, -1, -1, -1, -1, -1, -1, -1}, {1, 6, 2, 1, 8, 6, 1, 9, 8, 8, 7, 6, -1, -1, -1, -1}, {10, 7, 6, 10, 1, 7, 1, 3, 7, -1, -1, -1, -1, -1, -1, -1}, {10, 7, 6, 1, 7, 10, 1, 8, 7, 1, 0, 8, -1, -1, -1, -1}, {0, 3, 7, 0, 7, 10, 0, 10, 9, 6, 10, 7, -1, -1, -1, -1}, {7, 6, 10, 7, 10, 8, 8, 10, 9, -1, -1, -1, -1, -1, -1, -1}, {6, 8, 4, 11, 8, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 6, 11, 3, 0, 6, 0, 4, 6, -1, -1, -1, -1, -1, -1, -1}, {8, 6, 11, 8, 4, 6, 9, 0, 1, -1, -1, -1, -1, -1, -1, -1}, {9, 4, 6, 9, 6, 3, 9, 3, 1, 11, 3, 6, -1, -1, -1, -1}, {6, 8, 4, 6, 11, 8, 2, 10, 1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 3, 0, 11, 0, 6, 11, 0, 4, 6, -1, -1, -1, -1}, {4, 11, 8, 4, 6, 11, 0, 2, 9, 2, 10, 9, -1, -1, -1, -1}, {10, 9, 3, 10, 3, 2, 9, 4, 3, 11, 3, 6, 4, 6, 3, -1}, {8, 2, 3, 8, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1}, {0, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 9, 0, 2, 3, 4, 2, 4, 6, 4, 3, 8, -1, -1, -1, -1}, {1, 9, 4, 1, 4, 2, 2, 4, 6, -1, -1, -1, -1, -1, -1, -1}, {8, 1, 3, 8, 6, 1, 8, 4, 6, 6, 10, 1, -1, -1, -1, -1}, {10, 1, 0, 10, 0, 6, 6, 0, 4, -1, -1, -1, -1, -1, -1, -1}, {4, 6, 3, 4, 3, 8, 6, 10, 3, 0, 3, 9, 10, 9, 3, -1}, {10, 9, 4, 6, 10, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 5, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 4, 9, 5, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1}, {5, 0, 1, 5, 4, 0, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1}, {11, 7, 6, 8, 3, 4, 3, 5, 4, 3, 1, 5, -1, -1, -1, -1}, {9, 5, 4, 10, 1, 2, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1}, {6, 11, 7, 1, 2, 10, 0, 8, 3, 4, 9, 5, -1, -1, -1, -1}, {7, 6, 11, 5, 4, 10, 4, 2, 10, 4, 0, 2, -1, -1, -1, -1}, {3, 4, 8, 3, 5, 4, 3, 2, 5, 10, 5, 2, 11, 7, 6, -1}, {7, 2, 3, 7, 6, 2, 5, 4, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 5, 4, 0, 8, 6, 0, 6, 2, 6, 8, 7, -1, -1, -1, -1}, {3, 6, 2, 3, 7, 6, 1, 5, 0, 5, 4, 0, -1, -1, -1, -1}, {6, 2, 8, 6, 8, 7, 2, 1, 8, 4, 8, 5, 1, 5, 8, -1}, {9, 5, 4, 10, 1, 6, 1, 7, 6, 1, 3, 7, -1, -1, -1, -1}, {1, 6, 10, 1, 7, 6, 1, 0, 7, 8, 7, 0, 9, 5, 4, -1}, {4, 0, 10, 4, 10, 5, 0, 3, 10, 6, 10, 7, 3, 7, 10, -1}, {7, 6, 10, 7, 10, 8, 5, 4, 10, 4, 8, 10, -1, -1, -1, -1}, {6, 9, 5, 6, 11, 9, 11, 8, 9, -1, -1, -1, -1, -1, -1, -1}, {3, 6, 11, 0, 6, 3, 0, 5, 6, 0, 9, 5, -1, -1, -1, -1}, {0, 11, 8, 0, 5, 11, 0, 1, 5, 5, 6, 11, -1, -1, -1, -1}, {6, 11, 3, 6, 3, 5, 5, 3, 1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 10, 9, 5, 11, 9, 11, 8, 11, 5, 6, -1, -1, -1, -1}, {0, 11, 3, 0, 6, 11, 0, 9, 6, 5, 6, 9, 1, 2, 10, -1}, {11, 8, 5, 11, 5, 6, 8, 0, 5, 10, 5, 2, 0, 2, 5, -1}, {6, 11, 3, 6, 3, 5, 2, 10, 3, 10, 5, 3, -1, -1, -1, -1}, {5, 8, 9, 5, 2, 8, 5, 6, 2, 3, 8, 2, -1, -1, -1, -1}, {9, 5, 6, 9, 6, 0, 0, 6, 2, -1, -1, -1, -1, -1, -1, -1}, {1, 5, 8, 1, 8, 0, 5, 6, 8, 3, 8, 2, 6, 2, 8, -1}, {1, 5, 6, 2, 1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 3, 6, 1, 6, 10, 3, 8, 6, 5, 6, 9, 8, 9, 6, -1}, {10, 1, 0, 10, 0, 6, 9, 5, 0, 5, 6, 0, -1, -1, -1, -1}, {0, 3, 8, 5, 6, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {10, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 5, 10, 7, 5, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {11, 5, 10, 11, 7, 5, 8, 3, 0, -1, -1, -1, -1, -1, -1, -1}, {5, 11, 7, 5, 10, 11, 1, 9, 0, -1, -1, -1, -1, -1, -1, -1}, {10, 7, 5, 10, 11, 7, 9, 8, 1, 8, 3, 1, -1, -1, -1, -1}, {11, 1, 2, 11, 7, 1, 7, 5, 1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 1, 2, 7, 1, 7, 5, 7, 2, 11, -1, -1, -1, -1}, {9, 7, 5, 9, 2, 7, 9, 0, 2, 2, 11, 7, -1, -1, -1, -1}, {7, 5, 2, 7, 2, 11, 5, 9, 2, 3, 2, 8, 9, 8, 2, -1}, {2, 5, 10, 2, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1}, {8, 2, 0, 8, 5, 2, 8, 7, 5, 10, 2, 5, -1, -1, -1, -1}, {9, 0, 1, 5, 10, 3, 5, 3, 7, 3, 10, 2, -1, -1, -1, -1}, {9, 8, 2, 9, 2, 1, 8, 7, 2, 10, 2, 5, 7, 5, 2, -1}, {1, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 7, 0, 7, 1, 1, 7, 5, -1, -1, -1, -1, -1, -1, -1}, {9, 0, 3, 9, 3, 5, 5, 3, 7, -1, -1, -1, -1, -1, -1, -1}, {9, 8, 7, 5, 9, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {5, 8, 4, 5, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1}, {5, 0, 4, 5, 11, 0, 5, 10, 11, 11, 3, 0, -1, -1, -1, -1}, {0, 1, 9, 8, 4, 10, 8, 10, 11, 10, 4, 5, -1, -1, -1, -1}, {10, 11, 4, 10, 4, 5, 11, 3, 4, 9, 4, 1, 3, 1, 4, -1}, {2, 5, 1, 2, 8, 5, 2, 11, 8, 4, 5, 8, -1, -1, -1, -1}, {0, 4, 11, 0, 11, 3, 4, 5, 11, 2, 11, 1, 5, 1, 11, -1}, {0, 2, 5, 0, 5, 9, 2, 11, 5, 4, 5, 8, 11, 8, 5, -1}, {9, 4, 5, 2, 11, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 5, 10, 3, 5, 2, 3, 4, 5, 3, 8, 4, -1, -1, -1, -1}, {5, 10, 2, 5, 2, 4, 4, 2, 0, -1, -1, -1, -1, -1, -1, -1}, {3, 10, 2, 3, 5, 10, 3, 8, 5, 4, 5, 8, 0, 1, 9, -1}, {5, 10, 2, 5, 2, 4, 1, 9, 2, 9, 4, 2, -1, -1, -1, -1}, {8, 4, 5, 8, 5, 3, 3, 5, 1, -1, -1, -1, -1, -1, -1, -1}, {0, 4, 5, 1, 0, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {8, 4, 5, 8, 5, 3, 9, 0, 5, 0, 3, 5, -1, -1, -1, -1}, {9, 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 11, 7, 4, 9, 11, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1}, {0, 8, 3, 4, 9, 7, 9, 11, 7, 9, 10, 11, -1, -1, -1, -1}, {1, 10, 11, 1, 11, 4, 1, 4, 0, 7, 4, 11, -1, -1, -1, -1}, {3, 1, 4, 3, 4, 8, 1, 10, 4, 7, 4, 11, 10, 11, 4, -1}, {4, 11, 7, 9, 11, 4, 9, 2, 11, 9, 1, 2, -1, -1, -1, -1}, {9, 7, 4, 9, 11, 7, 9, 1, 11, 2, 11, 1, 0, 8, 3, -1}, {11, 7, 4, 11, 4, 2, 2, 4, 0, -1, -1, -1, -1, -1, -1, -1}, {11, 7, 4, 11, 4, 2, 8, 3, 4, 3, 2, 4, -1, -1, -1, -1}, {2, 9, 10, 2, 7, 9, 2, 3, 7, 7, 4, 9, -1, -1, -1, -1}, {9, 10, 7, 9, 7, 4, 10, 2, 7, 8, 7, 0, 2, 0, 7, -1}, {3, 7, 10, 3, 10, 2, 7, 4, 10, 1, 10, 0, 4, 0, 10, -1}, {1, 10, 2, 8, 7, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 1, 4, 1, 7, 7, 1, 3, -1, -1, -1, -1, -1, -1, -1}, {4, 9, 1, 4, 1, 7, 0, 8, 1, 8, 7, 1, -1, -1, -1, -1}, {4, 0, 3, 7, 4, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {4, 8, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 9, 3, 9, 11, 11, 9, 10, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 10, 0, 10, 8, 8, 10, 11, -1, -1, -1, -1, -1, -1, -1}, {3, 1, 10, 11, 3, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 2, 11, 1, 11, 9, 9, 11, 8, -1, -1, -1, -1, -1, -1, -1}, {3, 0, 9, 3, 9, 11, 1, 2, 9, 2, 11, 9, -1, -1, -1, -1}, {0, 2, 11, 8, 0, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {3, 2, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 3, 8, 2, 8, 10, 10, 8, 9, -1, -1, -1, -1, -1, -1, -1}, {9, 10, 2, 0, 9, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {2, 3, 8, 2, 8, 10, 0, 1, 8, 1, 10, 8, -1, -1, -1, -1}, {1, 10, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {1, 3, 8, 9, 1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 9, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 3, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1} }; const uint32_t _SurfaceEngine::indexes_p[12] = {0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3}; const uint32_t _SurfaceEngine::indexes_q[12] = {1, 2, 3, 0, 5, 6, 7, 4, 4, 5, 6, 7}; uint32_t _SurfaceEngine::_calculate_table_index(const _SurfaceCell& cell, double level, int32_t negative) { uint32_t table_index = 0; for (uint32_t k = 0; k < 8; k++) { if (negative*(level - cell.values[k]) > 0) { table_index |= (1 << k); } } // if (negative*cell.values[7] < negative*level) table_index |= 0x80; // Vertex 7 return table_index; } ArrayOfSharedPoints3d _SurfaceEngine::_calculate_vertices(const _SurfaceCell& cell, uint32_t edge_code, double level) { ArrayOfSharedPoints3d verteces; verteces.resize(12); if (edge_code == 0) { return verteces; } /* Find the vertices where the surface intersects the cube */ for (uint32_t k = 0; k < 12; k++) { if (edge_code & (1 << k)) { double v1 = cell.values[_SurfaceEngine::indexes_p[k]]; double v2 = cell.values[_SurfaceEngine::indexes_q[k]]; const Point3d& p = cell.points[_SurfaceEngine::indexes_p[k]]; const Point3d& q = cell.points[_SurfaceEngine::indexes_q[k]]; verteces[k] = std::make_shared(_SurfaceEngine::_linear_interp3d(level, p, q, v1, v2)); } } return verteces; } void _SurfaceEngine::_process_verteces(ArrayOfSharedPoints3d verteces, const int32_t tri_codes[]) { for (uint32_t k = 0; tri_codes[k] != -1; k += 3) { SharedPoint3d a = verteces[tri_codes[k ]]; SharedPoint3d b = verteces[tri_codes[k+1]]; SharedPoint3d c = verteces[tri_codes[k+2]]; if (!a || !b || !c) { throw std::runtime_error("One of triangle vertex is null: " "something wrong with Marching Cubes algorithm"); } SharedTriangle3d triangle = std::make_shared(a, b, c); this->_triangles.push_back(triangle); } for (auto vertex : verteces) { if (vertex) { this->_verteces.push_back(vertex); } } } _SurfaceEngine::_SurfaceEngine(const arma::vec& x, const arma::vec& y, const arma::vec& z, const arma::cube& values, const double level, const int32_t negative) : _x(x), _y(y), _z(z), _values(values), _level(level), _negative(negative) { for (uint32_t r = 0; r < y.n_elem; r++) { for (uint32_t c = 0; c < x.n_elem; c++) { for (uint32_t s = 0; s < z.n_elem; s++) { _SurfaceCell cell(this, r, c, s); //std::cout << cell.str() << std::endl; uint32_t table_index = _SurfaceEngine::_calculate_table_index(cell, this->_level, this->_negative); uint32_t edge_code = _SurfaceEngine::edgeTable[table_index]; const int32_t* tri_codes = _SurfaceEngine::triTable[table_index]; ArrayOfSharedPoints3d verteces = _SurfaceEngine::_calculate_vertices(cell, edge_code, this->_level); this->_process_verteces(verteces, tri_codes); } // end for-s } // end for-c } // end for r } SharedSurface3d _SurfaceEngine::surface(void) const { return std::make_shared(this->_verteces, this->_triangles); } /* ==================================== Routines ==================================== */ ArrayOfSharedPolygons contours(const arma::vec& x, const arma::vec& y, const arma::mat& values, double level, bool negative) { _ContourEngine ce = _ContourEngine(x, y, values, level, negative); return ce.polygons(); } SharedSurface3d isosurface(const arma::vec& x, const arma::vec& y, const arma::vec& z, const arma::cube& values, double level, bool negative) { _SurfaceEngine se = _SurfaceEngine(x, y, z, values, level, negative); return se.surface(); } } ================================================ FILE: OptolithiumC/src/opl_geometry.cpp ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include "opl_geometry.h" #include "opl_misc.h" namespace geometry { /* ==================================== Point ==================================== */ Point2d Point2d::operator+(const Point2d& p) const { return Point2d(this->x + p.x, this->y + p.y); } Point2d Point2d::operator+(double s) const { return Point2d(this->x + s, this->y + s); } Point2d Point2d::operator-(const Point2d& p) const { return Point2d(this->x - p.x, this->y - p.y); } Point2d Point2d::operator-(double s) const { return Point2d(this->x - s, this->y - s); } Point2d operator* (double s, const Point2d& p) { return Point2d(s * p.x, s * p.y); } Point2d operator/ (const Point2d& p, double s) { return Point2d(p.x/s, p.y/s); } double dot(const Point2d& p, const Point2d& q) { return p.x*q.x + p.y*q.y; } double& Point2d::operator[](uint32_t i) { return (i == 0) ? this->x : this->y; } double Point2d::operator[](uint32_t i) const { return (i == 0) ? this->x : this->y; } bool Point2d::operator==(const Point2d& p) const { return (this->x == p.x) && (this->y == p.y); } bool Point2d::operator!=(const Point2d& p) const { return (this->x != p.x) || (this->y != p.y); } bool Point2d::operator<(const Point2d& p) const { return ((this->x < p.x) || ((this->x == p.x) && (this->y < p.y))); } bool Point2d::operator>(const Point2d& p) const { return ((this->x > p.x) || ((this->x == p.x) && (this->y > p.y))); } Point2d& Point2d::operator+=(const Point2d& rhs) { this->x += rhs.x; this->y += rhs.y; return *this; } Point2d& Point2d::operator-=(const Point2d& rhs) { this->x -= rhs.x; this->y -= rhs.y; return *this; } Point2d& Point2d::abs(void) { this->x = (this->x >= 0) ? this->x : -this->x; this->y = (this->y >= 0) ? this->y : -this->y; return *this; } classify_type_t Point2d::classify(const Point2d& p0, const Point2d& p1, double precision) const { Point2d p2 = *this; Point2d a = p1 - p0; Point2d b = p2 - p0; double sa = a.x*b.y - b.x*a.y; if (sa > precision) { return LEFT; } else if (sa < -precision) { return RIGHT; } else if (a.x*b.x < 0 || a.y*b.y < 0) { return BEHIND; } else if (a.length() < b.length()) { return BEYOND; } else if (p0 == p2) { return ORIGIN; } else if (p1 == p2) { return DESTINATION; } else { return BETWEEN; } } classify_type_t Point2d::classify(const Edge2d& e, double precision) const { return this->classify(e.org, e.dst, precision); } double Point2d::polar_angle(void) const { if (this->x == 0 && this->y == 0) { return -1; } else if (this->x == 0) { return ((this->y > 0.0) ? 90.0 : 270.0); } double theta = atan(this->y/this->x); theta *= 360/(2*M_PI); if (x > 0) return ((y >= 0) ? theta : 360.0 + theta); else return 180.0 + theta; } double Point2d::length(void) const { return sqrt(this->x*this->x + this->y*this->y); } Point2d Point2d::normal_intersect(const Edge2d& e) const { Edge2d ab = e; ab.rot(CCW); Point2d n(ab.dst - ab.org); Edge2d normal(*this, *this + n); return e.point(normal); } double Point2d::distance(const Edge2d& e) const { Point2d s = this->normal_intersect(e); return Edge2d(*this, s).length(); } void Point2d::transform(int32_t sign, double mag, double angle) { double xp = this->x, yp = this->y; double cos_ang = cos(angle), sin_ang = sin(angle); this->x = mag * (xp * cos_ang - sign * yp * sin_ang); this->y = mag * (xp * sin_ang + sign * yp * cos_ang); } std::string Point2d::str(void) const { std::ostringstream result; result << "(" << this->x << ", " << this->y << ")"; return result.str(); } /* ==================================== Edge ==================================== */ Edge2d& Edge2d::rot(rotation_type_t dir) { int32_t sign = (dir == CW) ? -1 : 1; Point2d m = 0.5 * (this->org + this->dst); Point2d v = this->dst - this->org; Point2d n(v.y, -v.x); this->org = m + sign * 0.5 * n; this->dst = m - sign * 0.5 * n; return *this; } Edge2d& Edge2d::flip(void) { misc::swap(this->dst.x, this->org.x); misc::swap(this->dst.y, this->org.y); return *this; } cross_type_t Edge2d::intersect(const Edge2d& e, double &t) const { Point2d a = this->org; Point2d b = this->dst; Point2d c = e.org; Point2d d = e.dst; Point2d n = Point2d((d - c).y, (c - d).x); double denom = dot(n, b-a); if (denom == 0) { if (this->org.classify(e) == LEFT || this->org.classify(e) == RIGHT) { return PARALLEL; } else { return COLLINEAR; } } double num = dot(n, a-c); t = -num/denom; return SKEW; } // Return intersection point between 'this' edge and edge represented as 't' value (line direction) Point2d Edge2d::point(double t) const { return Point2d(this->org + t*(this->dst - this->org)); } // Return intersection point between 'this' edge and given edge 'e' Point2d Edge2d::point(const Edge2d& e) const { double t = 0.0; this->intersect(e, t); return this->point(t); } cross_type_t Edge2d::cross_type(const Edge2d& e) const { double s = 0.0, t = 0.0; cross_type_t cross = e.intersect(*this, s); if (cross == COLLINEAR || cross == PARALLEL) return cross; if (s < 0.0 || s > 1.0) return SKEW_NO_CROSS; // Calculate t-value this->intersect(e, t); if (0.0 <= t || t <= 1.0) { return SKEW_CROSS; } else { return SKEW_NO_CROSS; } } bool Edge2d::is_vertical(void) const { return this->org.x == this->dst.x; } bool Edge2d::is_horizontal(void) const { return this->org.y == this->dst.y; } double Edge2d::dx(void) const { return this->dst.x - this->org.x; } double Edge2d::dy(void) const { return this->dst.y - this->org.y; } Sizes Edge2d::sizes(void) const { return this->dst - this->org; } double Edge2d::length(void) const { return this->sizes().length(); } double Edge2d::slope(void) const { if (this->dx() != 0.0) { return this->dy()/this->dx(); } else { // Infinity slope return this->dy() * INFINITY; } } double Edge2d::y(double x) const { return this->slope()*(x - this->org.x) + this->org.y; } // Calculate the area of trapezoid between this edge, y-axis and two horizontal lines. double Edge2d::area(void) const { return this->dx() * (this->dst.y + this->org.y) / 2.0; } std::string Edge2d::str(void) const { std::ostringstream result; result << "[" << this->org.str() << " -> " << this->dst.str() << "]"; return result.str(); } bool Edge2d::operator==(const Edge2d& other) const { return this->org == other.org && this->dst == other.dst; } /* ==================================== AbstractGeometry ==================================== */ SharedEdge2d AbstractGeometry::at(uint32_t index) const { return this->_edges.at(index); } uint32_t AbstractGeometry::length(void) const { return static_cast(this->_edges.size()); } double AbstractGeometry::signed_area(void) const { double result = 0.0; if (this->_axis == DIM_2D) { for (auto edge : this->_edges) { result += edge->area(); } } else { SharedEdge2d e = this->front(); uint32_t axis = this->_axis; result = e->dst[axis] - e->org[axis]; } return result; } bool AbstractGeometry::set_bypass(rotation_type_t direction) { bool corrected = false; double area = this->signed_area(); if (direction*area < 0) { corrected = true; std::reverse(this->_edges.begin(), this->_edges.end()); for (auto edge : this->_edges) { edge->flip(); } } return corrected; } dimension_t AbstractGeometry::axis(void) const { return this->_axis; } /* ==================================== PolygonGeometry ==================================== */ geometry_t PolygonGeometry::type(void) const { return GEOMETRY_POLYGON; } // Check whether input points represent one dimensional polygon bool PolygonGeometry::is_1d_possible(const ArrayOfSharedPoints2d &points) { if (points.size() == 2) { const Edge2d edge = Edge2d(*points[0], *points[1]); if (edge.is_vertical() || edge.is_horizontal()) { return true; } } return false; } bool PolygonGeometry::is_2d_possible(const ArrayOfSharedPoints2d &points) { return points.size() >= 3; } PolygonGeometry::PolygonGeometry(const ArrayOfSharedPoints2d &points) { if (PolygonGeometry::is_1d_possible(points)) { SharedEdge2d edge = std::make_shared(*points.back(), *points.front()); this->_edges.push_back(edge); this->_axis = edge->is_horizontal() ? DIM_1D_X : DIM_1D_Y; } else if (PolygonGeometry::is_2d_possible(points)) { auto start = points.begin(); SharedPoint2d previous_point = *start; for (auto it = ++start; it != points.end(); ++it) { SharedPoint2d current_point = *it; this->_edges.push_back(std::make_shared(*previous_point, *current_point)); previous_point = current_point; } this->_edges.push_back(std::make_shared(*points.back(), *points.front())); this->_axis = DIM_2D; } else { throw std::invalid_argument("Can't create region from passed points sequence!"); } } PolygonGeometry::PolygonGeometry(const PolygonGeometry& other) { this->_axis = other._axis; for (auto edge : other) { this->_edges.push_back(std::make_shared(*edge)); } } bool PolygonGeometry::clean(void) { if (this->_axis == DIM_2D) { // LOG(INFO) << "Clean polygon with " << this->length() << " edges"; bool deleted = false; auto it = this->begin(); while (this->length() && it != this->end()) { // SharedEdge prev_edge = *it.prev(); // bool is_end = !(it.prev() != this->end()); // LOG(INFO) << "[" << is_end << "] Prev Edge[" << it.prev().pos() << "/" // << this->length() << "] = " << prev_edge->str(); SharedEdge2d cur_edge = *it; // is_end = !(it != this->end()); // LOG(INFO) << "[" << is_end << "] Cur Edge[" << it.pos() << "/" // << this->length() << "] = " << cur_edge->str(); SharedEdge2d next_edge = *it.next(); // is_end = !(it.next() != this->end()); // LOG(INFO) << "[" << is_end << "] Next Edge[" << it.next().pos() << "/" // << this->length() << "] = " << next_edge->str(); bool remove_required = false; if (cur_edge->length() == 0.0) { remove_required = true; } else { double tmp = 0.0; if (cur_edge->intersect(*next_edge, tmp) == COLLINEAR) { remove_required = true; } } if (remove_required) { // LOG(INFO) << "---> Erase edge: " << (*it)->str(); this->_edges.erase(this->_edges.begin() + it.pos()); (*it)->org = (*it.prev())->dst; deleted = true; } else { ++it; } } this->_edges.shrink_to_fit(); // LOG(INFO) << "Cleaned polygon[" << deleted << "] " << this->str(); return deleted; } else { return false; } } std::string PolygonGeometry::str(void) const { std::ostringstream result; result << "PolygonGeometry {"; for (auto edge : this->_edges) { result << std::endl << "\t" << edge->str(); } result << "};"; return result.str(); } bool PolygonGeometry::operator==(const AbstractGeometry& other) const { return this->type() == other.type() && misc::safe_vector_equal(this->_edges, dynamic_cast(&other)->_edges); } /* ==================================== RectangleGeometry ==================================== */ geometry_t RectangleGeometry::type(void) const { return GEOMETRY_BOX; } RectangleGeometry::RectangleGeometry(const Point2d& lb, const Point2d& rt) : _diag(Edge2d(lb, rt)) { this->_sizes = this->_diag.sizes(); if (this->_sizes.x != 0.0 && this->_sizes.y != 0.0) { this->_axis = DIM_2D; this->_edges = { std::make_shared(lb.x, lb.y, rt.x, lb.y), std::make_shared(rt.x, lb.y, rt.x, rt.y), std::make_shared(rt.x, rt.y, lb.x, rt.y), std::make_shared(lb.x, rt.y, lb.x, lb.y) }; } else if (this->_sizes.x != 0.0) { this->_axis = DIM_1D_X; this->_edges = { std::make_shared(this->_diag) }; } else { this->_axis = DIM_1D_Y; this->_edges = { std::make_shared(this->_diag) }; } } RectangleGeometry::RectangleGeometry(ArrayOfSharedPoints2d points) : RectangleGeometry(*points[0], *points[1]) { } RectangleGeometry::RectangleGeometry(const RectangleGeometry& other) : RectangleGeometry(other.left_bottom(), other.right_top()) { } Point2d RectangleGeometry::left_bottom(void) const { return this->_diag.org; } Point2d RectangleGeometry::right_top(void) const { return this->_diag.dst; } Edge2d RectangleGeometry::diag(void) const { return this->_diag; } Sizes RectangleGeometry::sizes(void) const { return this->_sizes; } bool RectangleGeometry::set_bypass(rotation_type_t direction) { bool corrected = false; if (AbstractGeometry::set_bypass(direction)) { this->_diag.flip(); corrected = true; } return corrected; } bool RectangleGeometry::operator==(const AbstractGeometry& other) const { return this->type() == other.type() && this->_diag == dynamic_cast(&other)->_diag; } std::string RectangleGeometry::str(void) const { std::ostringstream result; result << "RectangleGeometry {"; result << std::endl << "\t" << this->_diag.org.str(); result << std::endl << "\t" << this->_diag.dst.str(); result << "};"; return result.str(); } /* ==================================== Point 3d ==================================== */ Point3d Point3d::operator+(const Point3d& p) const { return Point3d(this->x + p.x, this->y + p.y, p.z + this->z); } Point3d Point3d::operator+(double s) const { return Point3d(this->x + s, this->y + s, this->z + s); } Point3d Point3d::operator-(const Point3d& p) const { return Point3d(this->x - p.x, this->y - p.y, this->z - p.z); } Point3d Point3d::operator-(double s) const { return Point3d(this->x - s, this->y - s, this->z - s); } Point3d operator* (double s, const Point3d& p) { return Point3d(s * p.x, s * p.y, s * p.z); } Point3d operator/ (const Point3d& p, double s) { return Point3d(p.x/s, p.y/s, p.z/s); } double dot(const Point3d& p, const Point3d& q) { return p.x*q.x + p.y*q.y + p.z*q.z; } double& Point3d::operator[](uint32_t i) { if (i == 0) { return this->x; } else if (i == 1) { return this->y; } else if (i == 2) { return this->z; } else { throw std::out_of_range("The index of dimensions is out of range"); } } double Point3d::operator[](uint32_t i) const { if (i == 0) { return this->x; } else if (i == 1) { return this->y; } else if (i == 2) { return this->z; } else { throw std::out_of_range("The index of dimensions is out of range"); } } bool Point3d::operator==(const Point3d& p) const { return (this->x == p.x) && (this->y == p.y); } bool Point3d::operator!=(const Point3d& p) const { return (this->x != p.x) || (this->y != p.y); } bool Point3d::operator<(const Point3d& p) const { if (this->x < p.x) { return true; } else if (this->x == p.x) { if (this->y < p.y) { return true; } else if (this->y == p.y) { return this->z < p.z; } else { return false; } } else { return false; } } bool Point3d::operator>(const Point3d& p) const { if (this->x > p.x) { return true; } else if (this->x == p.x) { if (this->y > p.y) { return true; } else if (this->y == p.y) { return this->z > p.z; } else { return false; } } else { return false; } } Point3d& Point3d::operator+=(const Point3d& rhs) { this->x += rhs.x; this->y += rhs.y; this->z += rhs.z; return *this; } Point3d& Point3d::operator-=(const Point3d& rhs) { this->x -= rhs.x; this->y -= rhs.y; this->z -= rhs.z; return *this; } Point3d& Point3d::abs(void) { this->x = fabs(this->x); this->y = fabs(this->y); this->z = fabs(this->z); return *this; } double Point3d::length(void) const { return sqrt(this->x*this->x + this->y*this->y + this->z*this->z); } std::string Point3d::str(void) const { std::ostringstream result; result << "(" << this->x << ", " << this->y << ", " << this->z << ")"; return result.str(); } /* ==================================== Edge 3d ==================================== */ double Edge3d::length(void) const { Point3d v = (this->dst - this->org); return sqrt(dot(v, v)); } std::string Edge3d::str(void) const { std::ostringstream result; result << "[" << this->org.str() << " -> " << this->dst.str() << "]"; return result.str(); } bool Edge3d::operator==(const Edge3d& other) const { return this->org == other.org && this->dst == other.dst; } double dot(const Edge3d& p, const Edge3d& q) { return dot(p.dst - p.org, q.dst - q.org); } Point3d cross(const Edge3d& p, const Edge3d& q) { Point3d a = p.dst - p.org; Point3d b = q.dst - q.org; return Point3d( a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.z); } /* ==================================== Triangle 3d ==================================== */ Triangle3d::Triangle3d(const Point3d& a, const Point3d& b, const Point3d& c) { // TODO: Check that points can create triangle this->_a = std::make_shared(a); this->_b = std::make_shared(b); this->_c = std::make_shared(c); } bool Triangle3d::operator==(const Triangle3d &other) const { return *this->_a == other[0] && *this->_b == other[1] && *this->_c == other[2]; } std::string Triangle3d::str(void) const { std::ostringstream result; result << "{" << this->_a->str() << ", " << this->_b->str() << ", " << this->_c->str() << "}"; return result.str(); } SharedPoint3d Triangle3d::at(uint32_t index) const { if (index == 0) { return this->_a; } else if (index == 1) { return this->_b; } else if (index == 2) { return this->_c; } else { throw std::out_of_range("The index of dimensions is out of range"); } } Point3d& Triangle3d::operator[](uint32_t i){ if (i == 0) { return *this->_a; } else if (i == 1) { return *this->_b; } else if (i == 2) { return *this->_c; } else { throw std::out_of_range("The index of dimensions is out of range"); } } Point3d Triangle3d::operator[](uint32_t i) const { if (i == 0) { return *this->_a; } else if (i == 1) { return *this->_b; } else if (i == 2) { return *this->_c; } else { throw std::out_of_range("The index of dimensions is out of range"); } } SharedPoint3d Triangle3d::normal(void) const { Point3d n = cross(Edge3d(*this->_a, *this->_b), Edge3d(*this->_b, *this->_c)); return std::make_shared(n/n.length()); } /* ==================================== Surface 3d ==================================== */ Surface3d::Surface3d(ArrayOfSharedPoints3d points, ArrayOfSharedTriangles3d triangles) : Surface3d() { this->_points = points; this->_triangles = triangles; this->generate_xyz(); } void Surface3d::generate_xyz(void) { if (!this->_is_finalized) { uint32_t length = this->_points.size(); this->_x = std::make_shared(length); this->_y = std::make_shared(length); this->_z = std::make_shared(length); for (uint32_t k = 0; k < this->_points.size(); k++) { (*this->_x)(k) = this->_points[k]->x; (*this->_y)(k) = this->_points[k]->y; (*this->_z)(k) = this->_points[k]->z; } this->_is_finalized = true; } } ArrayOfSharedPoints3d Surface3d::points(void) const { return this->_points; } ArrayOfSharedTriangles3d Surface3d::triangles(void) const { return this->_triangles; } std::shared_ptr Surface3d::x(void) const { return this->_x; } std::shared_ptr Surface3d::y(void) const { return this->_y; } std::shared_ptr Surface3d::z(void) const { return this->_z; } } ================================================ FILE: OptolithiumC/src/opl_interp.cpp ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include #include #include "opl_interp.h" #include "opl_log.h" namespace interp { uint32_t _get_base_index(const arma::vec& x, double xi) { uint32_t result = 0; // if (xi < x(0) || xi > x(x.n_elem-1)) { // std::ostringstream result; // result << "Wrong base index interval during interpolation: " // << "xi = " << xi << " x(0) = " << x(0) << " x(-1) = " << x(x.n_elem-1); // throw std::range_error(result.str()); // } const int32_t sdx = (x(x.n_elem-1) - x(0)) > 0 ? 1 : -1; for (uint32_t k = 0; k < x.n_elem-1; k++) { if (sdx*xi >= sdx*x(k) && sdx*xi <= sdx*x(k+1)) { result = k; break; } } return result; } inline double _interp1(double xi, double x0, double x1, double v0, double v1) { return ((x1 - xi)*v0 + (xi - x0)*v1)/(x1 - x0); } LinearInterpolation1d::LinearInterpolation1d(ConstVector px, ConstVector py, double fill) : _px(px), _py(py) { this->_fill = fill; const arma::vec &x = *this->_px, &y = *this->_py; this->_s = std::make_shared(x.n_elem); this->_b = std::make_shared(x.n_elem); arma::vec& s = *this->_s; arma::vec& b = *this->_b; // LOG(INFO) << "size(y) = " << y.n_elem << " size(x) = " << x.n_elem; for (uint32_t k = 0; k < x.n_elem-1; k++) { // LOG(INFO) << "k = " << k << " y(k) = " << y(k) << " x(k) = " << x(k); s(k) = (y(k+1) - y(k)) / (x(k+1) - x(k)); b(k) = (x(k+1)*y(k) - x(k)*y(k+1)) / (x(k+1) - x(k)); } } double LinearInterpolation1d::interpolate(double xi) const { const arma::vec &x = *this->_px, &y = *this->_py; // LOG(INFO) << "xi = " << xi << " x(0) = " << x(0) << " x(-1) = " << x(x.n_elem-1); const int32_t sdx = (x(x.n_elem-1) - x(0)) > 0 ? 1 : -1; if (sdx*xi < sdx*x(0) || sdx*xi > sdx*x(x.n_elem-1)) { return this->_fill; } else if (xi == x(0)) { // LOG(INFO) << "return y(0) = " << y(0); return y(0); } else if (xi == x(x.n_elem-1)) { // LOG(INFO) << "return y(-1) = " << y(y.n_elem-1); return y(y.n_elem-1); } else { const uint32_t k = _get_base_index(x, xi); const arma::vec &s = *this->_s, &b = *this->_b; const double result = s(k)*xi + b(k); // LOG(INFO) << "interpolate 1d s = " << s(k) << " b = " << b(k) << " v = " << result; return result; } } std::shared_ptr LinearInterpolation1d::interpolate(const arma::vec& xi) const { std::shared_ptr result = std::make_shared(xi.n_elem); for (uint32_t k = 0; k < xi.n_elem; k++) { (*result)(k) = this->interpolate(xi(k)); } return result; } bool LinearInterpolation1d::operator==(const LinearInterpolation1d& other) const { return arma::as_scalar(*this->_px == *other._px) && arma::as_scalar(*this->_py == *other._py) && this->_fill == other._fill; } LinearInterpolation2d::LinearInterpolation2d(ConstVector px, ConstVector py, ConstMatrix values, double fill) { this->_px = px; this->_py = py; this->_values = values; this->_fill = fill; // LOG(INFO) << "px.n_elem = " << px->n_elem << " py.n_elem = " << py->n_elem; // LOG(INFO) << "INPUT MATRIX: r = " << values->n_rows << " c = " << values->n_cols; this->_yinterp1.resize(py->n_elem); for (uint32_t r = 0; r < py->n_elem; r++) { ConstVector row = std::make_shared(arma::trans(values->row(r))); this->_yinterp1[r] = std::make_shared(px, row); } ConstVector last_col = std::make_shared(values->col(px->n_elem-1)); this->_xlastinterp1 = std::make_shared(py, last_col); } double LinearInterpolation2d::interpolate(double xi, double yi) const { const arma::mat &f = *this->_values; const arma::vec &x = *this->_px, &y = *this->_py; const int32_t sdx = (x(x.n_elem-1) - x(0)) > 0 ? 1 : -1; const int32_t sdy = (y(y.n_elem-1) - y(0)) > 0 ? 1 : -1; // LOG(INFO) << "xi = " << xi << " x(0) = " << x(0) << " x(-1) = " << x(x.n_elem-1) << " sdx = " << sdx // << " yi = " << yi << " y(0) = " << y(0) << " y(-1) = " << y(y.n_elem-1) << " sdy = " << sdy; if (sdx*xi < sdx*x(0) || sdx*xi > sdx*x(x.n_elem-1) || sdy*yi < sdy*y(0) || sdy*yi > sdy*y(y.n_elem-1)) { // LOG(INFO) << "return filler " << (sdx*xi < sdx*x(0)) << " " << (sdx*xi > sdx*x(x.n_elem-1)) << " " // << (sdy*yi < sdy*y(0)) << " " << (sdy*yi > sdy*y(y.n_elem-1)); return this->_fill; } else if (xi == x(x.n_elem-1) && yi == y(y.n_elem-1)) { // LOG(INFO) << "return f(-1, -1)"; return f(y.n_elem-1, x.n_elem-1); } else if (yi == y(y.n_elem-1)) { // LOG(INFO) << "interpolate last row"; return this->_yinterp1[y.n_elem-1]->interpolate(xi); } else if (xi == x(x.n_elem-1)) { // LOG(INFO) << "interpolate last col"; return this->_xlastinterp1->interpolate(yi); } else { // LOG(INFO) << "interpolate 2d"; const uint32_t r = _get_base_index(y, yi); // LOG(INFO) << "BASE INDEX = " << r << "/" << this->_yinterp1.size(); double v0 = this->_yinterp1[r]->interpolate(xi); double v1 = this->_yinterp1[r+1]->interpolate(xi); return _interp1(yi, y(r), y(r+1), v0, v1); } } std::shared_ptr LinearInterpolation2d::interpolate(const arma::vec& xi, const arma::vec& yi) const { std::shared_ptr result = std::make_shared(yi.n_elem, xi.n_elem); for (uint32_t r = 0; r < yi.n_elem; r++) { for (uint32_t c = 0; c < xi.n_elem; c++) { (*result)(r, c) = this->interpolate(xi(c), yi(r)); } } return result; } bool LinearInterpolation2d::operator==(const LinearInterpolation2d& other) const { return arma::as_scalar(*this->_px == *other._px) && arma::as_scalar(*this->_py == *other._py) && arma::as_scalar(*this->_values == *other._values) && this->_fill == other._fill; } } ================================================ FILE: OptolithiumC/src/opl_log.cpp ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include "opl_log.h" _INITIALIZE_EASYLOGGINGPP OptolithiumCoreLog::OptolithiumCoreLog(void) { el::Loggers::reconfigureAllLoggers(el::ConfigurationType::Format, "%level %datetime{%H:%m:%s} [%file:%line]: %msg"); el::Loggers::reconfigureAllLoggers(el::ConfigurationType::ToStandardOutput, "true"); el::Loggers::addFlag(el::LoggingFlag::ColoredTerminalOutput); LOG(INFO) << "Initialize Optolithium Core logging system"; }; OptolithiumCoreLog::~OptolithiumCoreLog(void) { LOG(INFO) << "Finalize Optolithium Core logging system"; }; void OptolithiumCoreLog::set_verbose_level(int level) { int argc = 2; std::ostringstream verbosity; verbosity << "--v=" << level; const char *argv[2] = { "Optolithium", verbosity.str().c_str() }; el::Helpers::setArgs(argc, argv); }; void OptolithiumCoreLog::log(const std::string &message) { LOG(INFO) << message; }; void OptolithiumCoreLog::vlog(const std::string &message, int level) { VLOG(level) << message; } ================================================ FILE: OptolithiumC/src/opl_sim.cpp ================================================ /* * * This file is part of Optolithium lithography modelling software. * * Copyright (C) 2015 Alexei Gladkikh * * This software is dual-licensed: 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 2 of the License, or * (at your option) any later version only for NON-COMMERCIAL usage. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * If you are interested in other licensing models, including a commercial- * license, please contact the author at gladkikhalexei@gmail.com * */ #include "opl_sim.h" #include "opl_physc.h" #include "opl_conv.h" #include "opl_eikonal.h" #include "opl_contours.h" #include "opl_fft.h" SharedDiffraction diffraction(SharedImagingTool imaging_tool, SharedMask mask) { LOG(INFO) << "Optolithium Core: Calculate diffraction pattern for given mask, pitch = " << mask->pitch().str(); TIMED_FUNC(diffraction_timer); if (mask->is_bad()) { throw std::invalid_argument("Wrong mask bounding box size! " "Diffraction 1D can only be calculation for one-dimensional mask."); } SharedDiffraction diffraction = std::make_shared(mask, imaging_tool); for (auto region : *mask) { arma::cx_double factor = region->etransmit() - mask->boundary()->etransmit(); diffraction->add_region(region, factor); } if (!mask->is_opaque()) { arma::cx_double factor = mask->boundary()->etransmit(); diffraction->values()->elem(arma::find(*diffraction->cxy() == 0.0)) += factor; } return diffraction; } void _calc_aerial_image(SharedResistVolume result, SharedDiffraction diffraction, SharedOpticalTransferFunction otf, double refractive_index, double stepxy, double stepz=0.0) { TIMED_FUNC(aerial_image_timer); const uint32_t n_rows = result->values()->n_rows != 1 ? result->values()->n_rows - 1 : result->values()->n_rows; const uint32_t n_cols = result->values()->n_cols != 1 ? result->values()->n_cols - 1 : result->values()->n_cols; const uint32_t n_slices = result->values()->n_slices; const uint32_t midcol = static_cast(static_cast(n_cols)/2.0); const uint32_t midrow = static_cast(static_cast(n_rows)/2.0); const uint32_t n_source_points = diffraction->source_shape->non_zeros()->n_rows; const double na = diffraction->numeric_aperture; if (n_rows != 1 && n_rows % 2 != 0) { throw std::invalid_argument("The result rows count must be even"); } else if (n_cols != 1 && n_cols % 2 != 0) { throw std::invalid_argument("The result columns count must be even"); } arma::cx_mat efield = arma::cx_mat(n_rows, n_cols); fft::FFT2d fft(efield, fft::FFT_BACKWARD, n_source_points*n_slices); for (uint32_t s = 0; s < n_slices; s++) { const double thickness = result->z(s); arma::mat intensity = arma::mat(n_rows, n_cols, arma::fill::zeros); for (uint32_t k = 0; k < diffraction->source_shape->non_zeros()->n_rows; k++) { // Get non-zeros intensity source shape point indexes auto src_row_col = diffraction->source_shape->non_zeros()->row(k); const double source_irradiance = diffraction->source_shape->value(src_row_col(0), src_row_col(1)); const double scx = na * diffraction->source_shape->cx(src_row_col(1)); const double scy = na * diffraction->source_shape->cy(src_row_col(0)); // Clear temporary array of current source shape electric field efield.zeros(); {TIMED_SCOPE(aerial_image_diffraction, "Diffraction pattern generation done"); // Get non-zeros elements (according to current source shape point) and // copy it to Fourier backward transform temporary matrix for (uint32_t r = 0; r < diffraction->values()->n_rows; r++) { for (uint32_t c = 0; c < diffraction->values()->n_cols; c++) { double dcy = diffraction->cy(r); double dcx = diffraction->cx(c); uint32_t e_row = (n_rows + diffraction->ky(r) - 1) % n_rows; uint32_t e_col = (n_cols + diffraction->kx(c) - 1) % n_cols; efield(e_row, e_col) = otf->calc(dcx - scx, dcy - scy, thickness) * diffraction->value(r, c); } } } fft.execute(); {TIMED_SCOPE(aerial_image_timer_intensity, "Intensity for given source shape point done"); // Calculate intensity for given source point and sum if with previous result intensity += source_irradiance * arma::real(efield % arma::conj(efield)); } } intensity *= (refractive_index / arma::accu(*diffraction->source_shape->values())); // Save results to the output array and make fftshift and copy last point (Prolith symmetry) arma::mat& layer = result->values()->slice(s); if (n_cols != 1 && n_rows == 1) { for (uint32_t c = 0; c < midcol; c++) { layer(0, c + midcol) = intensity(0, c); layer(0, c) = intensity(0, c + midcol); } layer(0, n_cols) = layer(0, 0); } else if (n_rows != 1 && n_cols == 1) { for (uint32_t r = 0; r < midrow; r++) { layer(r + midrow, 0) = intensity(r, 0); layer(r, 0) = intensity(r + midrow, 0); } layer(n_rows, 0) = layer(0, 0); } else if (n_rows != 1 && n_cols != 1) { for (uint32_t r = 0; r < midrow; r++) { for (uint32_t c = 0; c < midcol; c++) { layer(r + midrow, c + midcol) = intensity(r, c); layer(r, c) = intensity(r + midrow, c + midcol); layer(r, c + midcol) = intensity(r + midrow, c); layer(r + midrow, c) = intensity(r, c + midcol); layer(n_rows, c) = layer(0, c); layer(n_rows, c + midcol) = layer(0, c + midcol); } layer(r, n_cols) = layer(r, 0); layer(r + midrow, n_cols) = layer(r + midrow, 0); } layer(n_rows, n_cols) = layer(0, 0); } } } SharedResistVolume aerial_image(SharedDiffraction diffraction, SharedOpticalTransferFunction otf, double stepxy) { LOG(INFO) << "Optolithium Core: Calculate aerial image"; double refractive_index = physc::air_nk.real(); if (otf->wafer_stack()) { if (!otf->wafer_stack()->environment()) { throw std::invalid_argument("Environment was not specified"); } double wavelength = diffraction->wavelength; refractive_index = otf->wafer_stack()->environment()->refraction(wavelength).real(); } SharedResistVolume result = std::make_shared(diffraction->boundary, stepxy); _calc_aerial_image(result, diffraction, otf, refractive_index, stepxy); otf->imaging_tool()->flare(result); return result; } SharedResistVolume image_in_resist(SharedDiffraction diffraction, SharedOpticalTransferFunction otf, double stepxy, double stepz) { LOG(INFO) << "Optolithium Core: Calculate image in resist"; double wavelength = diffraction->wavelength; if (!otf->wafer_stack()) { throw std::invalid_argument("Wafer stack was not specified"); } if (!otf->wafer_stack()->resist()) { throw std::invalid_argument("Resist was not specified"); } double refractive_index = otf->wafer_stack()->resist()->refraction(wavelength).real(); double thickness = otf->wafer_stack()->resist()->thickness; SharedResistVolume result = std::make_shared(diffraction->boundary, thickness, stepxy, stepz); _calc_aerial_image(result, diffraction, otf, refractive_index, stepxy, stepz); otf->imaging_tool()->flare(result); return result; } SharedResistVolume latent_image(SharedResistVolume image_in_resist, SharedResistWaferLayer resist, SharedExposure exposure) { LOG(INFO) << "Optolithium Core: Calculate exposed latent image"; const arma::cube& values = *image_in_resist->values(); // Create new resist volume object without coping data from it. SharedResistVolume result = std::make_shared(*image_in_resist, false); // LOG(INFO) << "Dose = " << exposure->dose() << " C = " << resist->exposure->c; *result->values() = arma::exp(-values*exposure->dose()*resist->exposure->c); return result; } SharedResistVolume peb_latent_image(SharedResistVolume latent_image, SharedResistWaferLayer resist, SharedPostExposureBake peb) { LOG(INFO) << "Optolithium Core: Calculate PEB latent image"; SharedResistVolume result = std::make_shared(*latent_image, false); arma::vec kernelx = resist->peb->kernel(peb, latent_image->stepx()); arma::vec kernely = resist->peb->kernel(peb, latent_image->stepy()); arma::vec kernelz = resist->peb->kernel(peb, latent_image->stepz()); // Perform separable convolution const arma::cube& input = *latent_image->values(); arma::cube& output = *result->values(); for (uint32_t s = 0; s < input.n_slices; s++) { const arma::mat& input_slice = input.slice(s); arma::mat output_slice = arma::mat(input_slice.n_rows, input_slice.n_cols); // LOG(INFO) << "Slice #" << s << " kernelx = " << kernelx.n_elem << " kernely = " << kernely.n_elem; // Because when slice the cube matrix is transpose then y->cols and x->rows for (uint32_t r = 0; r < input.n_rows; r++) { const arma::rowvec& row = input_slice.row(r); output_slice.row(r) = conv::conv1d(row, kernelx, conv::CIRCULAR); } for (uint32_t c = 0; c < input.n_cols; c++) { const arma::colvec& col = output_slice.col(c); arma::vec tmp = conv::conv1d(col, kernely, conv::CIRCULAR); output_slice.col(c) = tmp; } output.slice(s) = output_slice; } for (uint32_t r = 0; r < input.n_rows; r++) { for (uint32_t c = 0; c < input.n_cols; c++) { const arma::cube& tube = output.tube(r, c); auto tmp = conv::conv1d(tube, kernelz, conv::SYMMETRIC); output.tube(r, c) = tmp; } } return result; } //#define ENABLE_DEBUG_RATES SharedResistVolume develop_time_contours(SharedResistVolume peb_latent_image, SharedResistWaferLayer resist) { LOG(INFO) << "Optolithium Core: Calculate develop time contours"; SharedResistVolume result = std::make_shared(*peb_latent_image, false); const arma::cube& values = *peb_latent_image->values(); arma::cube rates = arma::cube(values.n_rows, values.n_cols, values.n_slices); // LOG(INFO) << "Calculate development rates"; for (uint32_t s = 0; s < rates.n_slices; s++) { double depth = peb_latent_image->z(s); // LOG(INFO) << "s = " << s << " depth = " << depth; for (uint32_t r = 0; r < rates.n_rows; r++) { for (uint32_t c = 0; c < rates.n_cols; c++) { double pac = values(r, c, s); rates(r, c, s) = resist->rate->calculate(pac, depth); } } } #ifndef ENABLE_DEBUG_RATES arma::cube& develop = *result->values(); // LOG(INFO) << "Create initial resist profile contour"; develop.fill(-1.0); develop.slice(develop.n_slices-1).fill(arma::fill::zeros); // LOG(INFO) << "Calculate resist profile development"; eikonal::solve3d(develop, rates, result->stepy(), result->stepx(), result->stepz()); #else *result->values() = rates; #endif return result; } SharedResistProfile resist_profile(SharedResistVolume develop_times, SharedDevelopment development) { return std::make_shared(develop_times, development->time); } ================================================ FILE: OptolithiumGui/auxmath.py ================================================ # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import numpy __author__ = 'Alexei Gladkikh' def cartesian(*arrays): """ Generate a cartesian product of input arrays. :param tuple of ndarray arrays: 1-D arrays to form the cartesian product of. :return: 2-D array of shape (M, len(arrays)) containing cartesian products formed of input arrays. :rtype: ndarray Examples -------- >>> cartesian([1, 2, 3], [4, 5], [6, 7]) array([[1, 4, 6], [1, 4, 7], [1, 5, 6], [1, 5, 7], [2, 4, 6], [2, 4, 7], [2, 5, 6], [2, 5, 7], [3, 4, 6], [3, 4, 7], [3, 5, 6], [3, 5, 7]]) """ def _cartesian(_arrays, _out): _n = numpy.prod([_x.size for _x in _arrays]) m = _n / _arrays[0].size _out[:, 0] = numpy.repeat(_arrays[0], m) if _arrays[1:]: _cartesian(_arrays[1:], _out=_out[0:m, 1:]) for j in xrange(1, _arrays[0].size): _out[j*m:(j+1)*m, 1:] = _out[0:m, 1:] return _out arrays = [numpy.asarray(x) for x in arrays] n = numpy.prod([x.size for x in arrays]) out = numpy.zeros([n, len(arrays)], dtype=arrays[0].dtype) _cartesian(arrays, out) return out def middle(vec): """ Calculate zero index of frequency vector :param ndarray or list vec: Input numpy array :rtype: int Examples -------- >>> middle(numpy.array([1.0, 2.0, 3.0, 4.0, 5.0])) 2 >>> middle([5.0]) 0 """ return int(numpy.floor(len(vec) / 2.0)) def point_line_distance(point, line): """ Calculate the minimum distance between point and line specified by two points :type point: list[float | int] :type line: list[list[float | int]] Examples -------- >>> round(point_line_distance([-1, 3], [[0, 1.5], [10, -6]]), 1) 0.6 """ a = -float(line[1][1] - line[0][1]) b = float(line[1][0] - line[0][0]) c = line[0][0] * line[1][1] - line[1][0] * line[0][1] return abs(a*point[0] + b*point[1] + c) / numpy.sqrt(a**2 + b**2) def point_inside_polygon(point, polygon): """ Check whether point belongs to the polygon :rtype: bool Examples -------- >>> class Point(object): ... def __init__(self, x, y): ... self.x = x ... self.y = y >>> class Polygon(object): ... def __init__(self, points): ... self.points = points >>> polygon = Polygon([ ... Point(35.0, 120.5), Point(37.9, 129.1), ... Point(46.9, 129.1), Point(39.7, 134.5), ... Point(42.3, 143.1), Point(35.0, 139.0), ... Point(27.7, 143.1), Point(30.3, 134.5), ... Point(23.1, 129.1), Point(32.1, 129.1)]) >>> point_inside_polygon(Point(35.0, 134.5), polygon) True >>> point_inside_polygon(Point(100.0, 100.5), polygon) False >>> polygon = Polygon([Point(10.0, 0.0), Point(15.0, 0.0)]) >>> point_inside_polygon(Point(12.0, 0.0), polygon) True >>> point_inside_polygon(Point(54.0, 0.0), polygon) False >>> polygon = Polygon([Point(0.0, 21.0), Point(0.0, 30.5)]) >>> point_inside_polygon(Point(0.0, 22.0), polygon) True >>> point_inside_polygon(Point(0.0, -1.0), polygon) False """ n = len(polygon.points) if n == 2: return polygon.points[0].x <= point.x <= polygon.points[1].x and \ polygon.points[0].y <= point.y <= polygon.points[1].y else: inside = False p1x, p1y = polygon.points[0].x, polygon.points[0].y for k in range(n + 1): p2x, p2y = polygon.points[k % n].x, polygon.points[k % n].y if min(p1y, p2y) < point.y <= max(p1y, p2y) and point.x <= max(p1x, p2x): if (p1y != p2y and point.x < (point.y-p1y)*(p2x-p1x)/(p2y-p1y)+p1x) or p1x == p2x: inside = not inside p1x, p1y = p2x, p2y return inside if __name__ == "__main__": import doctest doctest.testmod() ================================================ FILE: OptolithiumGui/config.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import os import psutil import json import logging as module_logging import sys import helpers import ctypes __author__ = 'Alexei Gladkikh' logging = module_logging.getLogger(__name__) logging.setLevel(module_logging.INFO) helpers.logStreamEnable(logging) darwin = "darwin" nt = "win32" posix = "linux2" _shared_ext = { darwin: ".dylib", nt: ".dll", posix: ".so" } shared_ext = _shared_ext[sys.platform] _plot_bottom_adjust = { darwin: 0.15, nt: 0.15, posix: 0.15 } plot_bottom_adjust = _plot_bottom_adjust[sys.platform] _application_styles = { darwin: u"Plastique", nt: u"Windows", posix: u"Windows" } application_style = _application_styles[sys.platform] RESIST_FILL_COLOR = "purple" RESIST_LINES_COLOR = "black" RESIST_CONTOUR_COLOR = "grey" COMMON_LINES_COLOR = "crimson" KILOBYTE = 1024 MEGABYTE = KILOBYTE * KILOBYTE GIGABYTE = KILOBYTE * MEGABYTE STATUS_BAR_MESSAGE_DURATION = 2000 MAXIMUM_DIALOG_BUTTON_WIDTH = 100 DEFAULT_EDIT_WIDTH = 60 APPLICATION_NAME = "Optolithium" APPLICATION_WEBSITE = "https://bitbucket.org/gladkikhalexei/lithography" LOG_DATABASE_QUERIES = False RESOURCES = ["icons"] DATETIME_FORMAT = "%d.%m.%Y %H:%M:%S" DEFAULT_DECIMAL_COUNT = 3 DEFAULT_LAYER_THICKNESS = 100.0 DEFAULT_LAYER_REAL_INDEX = 1.0 DEFAULT_LAYER_IMAG_INDEX = 0.0 PEB_TEMP_GRAPH_RANGE = 20 DEV_RATE_PAC_STEP = 0.01 DEFAULT_RESIST_NAME = "ResistDefault" DEFAULT_SUBSTRATE_MATERIAL_NAME = "SubstrateMaterial" DEFAULT_DEV_RATE_NAME = "DevRateDefault" DEFAULT_SOURCE_SHAPE_NAME = "Coherent" DEFAULT_AIR_VACUUM_NAME = "Air-Vacuum" DEFAULT_OPTIONS_NAME = "Untitled.opl" OPTIONS_EXTENSION = "Optolithium options (*.opl)" KLAYOUT_PATH = "klayout" if sys.platform == nt: buf = ctypes.create_unicode_buffer(1024) ctypes.windll.kernel32.GetEnvironmentVariableW(u"USERPROFILE", buf, 1024) HOME_PATH = buf.value else: HOME_PATH = os.path.expanduser("~") APPLICATION_DIRECTORY = "." + APPLICATION_NAME CONFIG_NAME = "config.json" CONFIG_PATH = os.path.join(HOME_PATH, APPLICATION_DIRECTORY, CONFIG_NAME) DEFAULT_DATABASE_NAME = "OptolithiumDatabase.db" DEFAULT_MAP_FILE_NAME = "map.json" DEFAULT_MEMORY_USAGE_UPDATE = 1000 # ms DEFAULT_GRAPH_DPI = 60 DEFAULT_MAX_GDSII_FILE_SIZE = 5 * MEGABYTE SOURCE_SHAPE_STEP_MAP = [0.007, 0.010, 0.020, 0.032, 0.040, 0.050, 0.059, 0.067, 0.083, 0.125, 0.250] class LayerMapConfig(object): BOUNDARY_LAYER_VALUE = "boundary" BACKGROUND_LAYER_KEY = "background" TRANSMITTANCE_MAP_KEY = "transmittance" PHASE_MAP_KEY = "phase" __instance__ = None class ParseError(Exception): pass @staticmethod def _default_data(): return { "8.0": {"transmittance": 0.0, "phase": 0.0}, "63.0": "boundary", "background": {"transmittance": 1.0, "phase": 0.0} } def _verify(self): if LayerMapConfig.BACKGROUND_LAYER_KEY not in self.__data: raise LayerMapConfig.ParseError("Background parameters not found") if LayerMapConfig.BOUNDARY_LAYER_VALUE not in self.__data.values(): raise LayerMapConfig.ParseError("Boundary layer not found") for key, value in self.__data.items(): if key != LayerMapConfig.BACKGROUND_LAYER_KEY: num_type = key.split(".") if len(num_type) != 2: raise LayerMapConfig.ParseError("Wrong layer number: %s" % key) number, datatype = num_type try: int(number) int(datatype) except ValueError: LayerMapConfig.ParseError("Wrong layer number or datatype: %s" % key) if value != LayerMapConfig.BOUNDARY_LAYER_VALUE: try: float(value[LayerMapConfig.TRANSMITTANCE_MAP_KEY]) except ValueError or KeyError: raise LayerMapConfig.ParseError("Wrong map record %s: %s" % (key, value)) def save(self, path): map_dir = os.path.dirname(os.path.abspath(path)) if not os.path.exists(map_dir): os.makedirs(map_dir) with open(path, "w") as map_file: map_file.write(json.dumps(self.__data, indent=4)) def __init__(self, path): if LayerMapConfig.__instance__ is not None: raise RuntimeError("Layers map configuration has been already initialized!") self.__data = dict() try: with open(path) as map_file: self.__data.update(json.loads(map_file.read())) except IOError as error: if error.errno == 2: logging.error("GDS map file was not found using default") self.__data = LayerMapConfig._default_data() self.save(path) else: raise else: self._verify() self.__path = path LayerMapConfig.__instance__ = self @property def path(self): return self.__path def boundary_layer(self): """:rtype: (int, int)""" return [map(int, k.split(".")) for k, v in self.__data.iteritems() if v == LayerMapConfig.BOUNDARY_LAYER_VALUE][0] def __getitem__(self, item): return self.__data[item] def get_layer(self, transmittance, phase): """:rtype: (int, int)""" layers = [k for k, v in self.__data.iteritems() if isinstance(v, dict) and v[LayerMapConfig.TRANSMITTANCE_MAP_KEY] == transmittance and v[LayerMapConfig.PHASE_MAP_KEY] == phase] if not layers: raise KeyError if layers[0] == LayerMapConfig.BACKGROUND_LAYER_KEY: raise ValueError return map(int, layers[0].split(".")) GdsLayerMapping = None """:type: LayerMapConfig""" # noinspection PyPep8Naming def openLayerMapConfig(path): global GdsLayerMapping GdsLayerMapping = LayerMapConfig(path) class _Configuration(object): SYSTEM_PLUGINS_PATH = "plugins" PLUGIN_PATHS_SEPARATOR = ";" __ERROR_CONFIG_NOT_INIT_MSG__ = "Configuration was not initialized" __instance__ = None def __init__(self, **kwargs): """ :param str map_path: Path to gds map file :param str db_path: Application Database path :param str plugin_paths: User plugin directory :param str __memory_update: :param int dpi: Dots-per-Inch for all graphs :param int gds_size: Maximum Gds size in megabytes :param int thread_count: Count of the threads """ if _Configuration.__instance__ is not None: raise RuntimeError("Global application configuration settings has been already initialized!") self.__data = dict() try: self.__data["map_path"] = kwargs["map_path"] except KeyError: self.__data["map_path"] = os.path.join(HOME_PATH, APPLICATION_DIRECTORY, DEFAULT_MAP_FILE_NAME) logging.warning("GDSII map file path was not set using default path: %s" % self.layer_map_path) try: self.__data["db_path"] = kwargs["db_path"] except KeyError: self.__data["db_path"] = os.path.join(HOME_PATH, APPLICATION_DIRECTORY, DEFAULT_DATABASE_NAME) logging.warning("Database file path was not set using default path: %s" % self.db_path) try: if kwargs["plugin_paths"]: self.__data["plugin_paths"] = \ kwargs["plugin_paths"].split(_Configuration.PLUGIN_PATHS_SEPARATOR) + \ [_Configuration.SYSTEM_PLUGINS_PATH] else: self.__data["plugin_paths"] = [_Configuration.SYSTEM_PLUGINS_PATH] except KeyError: self.__data["plugin_paths"] = [_Configuration.SYSTEM_PLUGINS_PATH] logging.warning("Additional plugin directories was not set using system path only: %s" % self.plugin_paths) try: self.__data["memory_update"] = int(kwargs["memory_update"]) except KeyError or ValueError: self.__data["memory_update"] = DEFAULT_MEMORY_USAGE_UPDATE logging.warning("Memory usage update interval was not set " "to properly value using default: %s" % self.memory_update_interval) try: self.__data["dpi"] = int(kwargs["dpi"]) except KeyError or ValueError: self.__data["dpi"] = DEFAULT_GRAPH_DPI logging.warning("Graphs DPI was not set to properly value using default: %s" % self.dpi) try: self.__data["gds_size"] = int(kwargs["gds_size"]) except KeyError or ValueError: self.__data["gds_size"] = DEFAULT_MAX_GDSII_FILE_SIZE logging.warning("Max GDSII file size was not set " "to properly value using default: %s" % self.maximum_gds_size) try: self.__data["thread_count"] = int(kwargs["thread_count"]) except KeyError or ValueError: self.__data["thread_count"] = psutil.cpu_count() logging.warning("Max threads count was not set " "to properly value using CPU cores count: %s" % self.thread_count) self.path = None _Configuration.__instance__ = self def serialize(self): result = self.__data filtered = filter(lambda v: v != _Configuration.SYSTEM_PLUGINS_PATH, self.__data["plugin_paths"]) logging.info("%s" % filtered) result["plugin_paths"] = _Configuration.PLUGIN_PATHS_SEPARATOR.join(filtered) return result def _get_data(self, key): try: return self.__data[key] except KeyError: raise RuntimeError(_Configuration.__ERROR_CONFIG_NOT_INIT_MSG__) @property def layer_map_path(self): return self._get_data("map_path") @layer_map_path.setter def layer_map_path(self, value): self.__data["map_path"] = value @property def db_path(self): return self._get_data("db_path") @db_path.setter def db_path(self, value): self.__data["db_path"] = value @property def plugin_paths(self): return self._get_data("plugin_paths") @plugin_paths.setter def plugin_paths(self, value): self.__data["plugin_paths"] = value.split(_Configuration.PLUGIN_PATHS_SEPARATOR) @property def memory_update_interval(self): return self._get_data("memory_update") @memory_update_interval.setter def memory_update_interval(self, value): interval = int(value) if interval < 100: interval = 100 self.__data["memory_update"] = interval @property def dpi(self): return self._get_data("dpi") @dpi.setter def dpi(self, value): dpi = int(value) if dpi < 40: dpi = 40 elif dpi > 100: dpi = 100 self.__data["dpi"] = dpi @property def maximum_gds_size(self): return self._get_data("gds_size") @maximum_gds_size.setter def maximum_gds_size(self, value): size = int(value) if size < MEGABYTE: size = MEGABYTE self.__data["gds_size"] = size @property def thread_count(self): return self._get_data("thread_count") @thread_count.setter def thread_count(self, value): thread_count = int(value) if thread_count > psutil.cpu_count(): thread_count = psutil.cpu_count() elif thread_count < 1: thread_count = 1 self.__data["thread_count"] = thread_count @classmethod def open(cls, path=CONFIG_PATH): save_required = False try: with open(path, "r") as config_file: kwargs = json.loads(config_file.read()) except IOError as error: if error.errno == 2: logging.error("Can't open configuration file using default values") save_required = True kwargs = {} else: raise except ValueError: logging.error("Can't parse configuration file using default values") save_required = True kwargs = {} config = cls(**kwargs) config.path = path if save_required: config.save(path) return config def save(self, path=CONFIG_PATH): config_dir = os.path.dirname(os.path.abspath(path)) if not os.path.exists(config_dir): os.makedirs(config_dir) with open(path, "w") as config_file: config_file.write(json.dumps(self.serialize(), indent=4)) Configuration = _Configuration.open() """:type: _Configuration""" ================================================ FILE: OptolithiumGui/core.py ================================================ # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import optolithiumc as oplc import logging as module_logging import helpers from numpy import angle from qt import QtCore, Signal, connect, Slot from metrics import IMAGE_NEGATIVE, IMAGE_POSITIVE, \ CONTOUR_METRICS, IMAGE_METRICS, PROFILE_METRICS, STANDING_WAVES_METRICS __author__ = 'Alexei Gladkikh' logging = module_logging.getLogger(__name__) logging.setLevel(module_logging.INFO) helpers.logStreamEnable(logging) core_logging = oplc.OptolithiumCoreLog() core_logging.set_verbose_level(4) LOG_VERBOSE_0 = 0 # set_printoptions(linewidth=nan, precision=3, threshold=nan) class CoreSimulationOptions(object): def __init__(self, options): """:type options: options.structures.Options""" self.__options = options self.__mask = None self.__imaging_tool = None self.__wafer_stack = None self.__exposure = None self.__peb = None self.__development = None @property def options(self): return self.__options def numerics(self, changed=None): if changed is not None: changed.append(not self.__options.numerics.is_simulated) self.__options.numerics.simulated() return self.__options.numerics def mask(self, changed=None): if not self.__options.mask.is_simulated or self.__mask is None: if changed is not None: changed.append(True) self.__mask = self.__options.mask.convert2core() self.__options.mask.simulated() elif changed is not None: changed.append(False) return self.__mask def imaging_tool(self, changed=None): if not self.__options.imaging_tool.is_simulated or self.__imaging_tool is None: if changed is not None: changed.append(True) self.__imaging_tool = self.__options.imaging_tool.convert2core() self.__options.imaging_tool.simulated() elif changed is not None: changed.append(False) return self.__imaging_tool def wafer_stack(self, changed=None): if not self.__options.wafer_process.is_simulated or self.__wafer_stack is None: if changed is not None: changed.append(True) self.__wafer_stack = self.__options.wafer_process.convert2core() self.__options.wafer_process.simulated() elif changed is not None: changed.append(False) return self.__wafer_stack def exposure(self, changed=None): if not self.__options.exposure_focus.is_simulated or self.__exposure is None: if changed is not None: changed.append(True) self.__exposure = self.__options.exposure_focus.convert2core() self.__options.exposure_focus.simulated() elif changed is not None: changed.append(False) return self.__exposure def post_exposure_bake(self, changed=None): if not self.__options.peb.is_simulated or self.__peb is None: if changed is not None: changed.append(True) self.__peb = self.__options.peb.convert2core() self.__options.peb.simulated() elif changed is not None: changed.append(False) return self.__peb def development(self, changed=None): if not self.__options.development.is_simulated or self.__development is None: if changed is not None: changed.append(True) self.__development = self.__options.development.convert2core() self.__options.development.simulated() elif changed is not None: changed.append(False) return self.__development class AbstractStage(QtCore.QObject): invalidated = Signal() def __init__(self, core_options, metrics, pre_stage=None): """ :type core_options: CoreSimulationOptions :type pre_stage: AbstractStage or None """ super(AbstractStage, self).__init__() self.__core_options = core_options self.__pre_stage = pre_stage """:type: AbstractStage or None""" if self.__pre_stage is not None: self.__pre_stage.add_post_stage(self) self.__post_stages = [] """:type: list of AbstractStage""" self.__result = None self.__metrics = [metric_class(self) for metric_class in metrics] @property def name(self): """:rtype: str""" raise NotImplementedError @property def pre_stage(self): return self.__pre_stage def add_post_stage(self, stage): """:type: AbstractStage""" self.__post_stages.append(stage) @property def has_result(self): return self.__result is not None @Slot() def invalidate(self): # logging.info("Invalidate: %s" % self.__class__.__name__) self.__result = None for stage in self.__post_stages: # if stage.has_result: stage.invalidate() self.invalidated.emit() @property def core_options(self): return self.__core_options @property def options(self): return self.core_options.options def _payload(self): """:rtype: optolithiumc.Diffraction or optolithiumc.ResistVolume""" raise NotImplementedError @property def metrics_kwargs(self): """:rtype: dict from str""" return dict() @property def metrics(self): """:rtype: list of metrology.MetrologyInterface""" return self.__metrics def calculate(self): logging.debug("Calculate %s" % self.__class__.__name__) if not self.has_result: self.__result = self._payload() else: logging.debug("%s not changed" % self.__class__.__name__) return self.__result class DiffractionStage(AbstractStage): def __init__(self, core_options): super(DiffractionStage, self).__init__(core_options, []) @property def name(self): return "Diffraction" def _payload(self, *args): mask = self.core_options.mask() imaging_tool = self.core_options.imaging_tool() diffraction = oplc.diffraction(imaging_tool, mask) logging.log( LOG_VERBOSE_0, "Calculated diffraction pattern data:\n" "Diffraction terms numbers belong X-Axis:\n%s\n" "Diffraction terms numbers belong Y-Axis:\n%s\n" "Diffraction direction cosines belong X-Axis:\n%s\n" "Diffraction direction cosines belong Y-Axis:\n%s\n" "Diffraction terms direction cosines in polar view:\n%s\n" "Diffraction terms values:\n%s\n" % ( diffraction.kx, diffraction.ky, diffraction.cx, diffraction.cy, diffraction.cxy, diffraction.values ) ) return diffraction class AerialImageStage(AbstractStage): def __init__(self, core_options, pre_stage): super(AerialImageStage, self).__init__(core_options, metrics=IMAGE_METRICS, pre_stage=pre_stage) @property def name(self): return "Aerial Image" def _payload(self): diffraction = self.pre_stage.calculate() numerics = self.core_options.numerics() imaging_tool = self.core_options.imaging_tool() exposure_focus = self.core_options.exposure() otf = oplc.OpticalTransferFunction(imaging_tool, exposure_focus) aerial_image = oplc.aerial_image(diffraction, otf, numerics.grid_xy.value) logging.log( LOG_VERBOSE_0, "Calculated aerial image data [%s]:\n" "Aerial image X-Axis data:\n%s\n" "Aerial image Y-Axis data:\n%s\n" "Aerial image values:\n%s\n" % ( aerial_image.values.shape, aerial_image.x, aerial_image.y, aerial_image.values ) ) return aerial_image @property def metrics_kwargs(self): return { "level": self.options.metrology.aerial_image_level.value } def _magnitude(v): return (v * v.conjugate()).real def _phase(v): return angle(v, deg=True) class StandingWavesStage(AbstractStage): def __init__(self, core_options): super(StandingWavesStage, self).__init__(core_options, metrics=STANDING_WAVES_METRICS) @property def name(self): return "Standing Waves" def _payload(self): wafer_stack = self.core_options.wafer_stack() wavelength = self.core_options.imaging_tool().wavelength resist_indx = wafer_stack.index_of(wafer_stack.resist()) resist_reflectivity = wafer_stack.reflectivity(resist_indx, wavelength) substrate_reflectivity = wafer_stack.reflectivity(resist_indx+1, wavelength) return { "resist_reflectivity": _magnitude(resist_reflectivity), "resist_phase": _phase(resist_reflectivity), "substrate_reflectivity": _magnitude(substrate_reflectivity), "substrate_phase": _phase(substrate_reflectivity) } class ImageInResistStage(AbstractStage): def __init__(self, core_options, pre_stage): super(ImageInResistStage, self).__init__(core_options, metrics=IMAGE_METRICS, pre_stage=pre_stage) @property def name(self): return "Image in Resist" def _payload(self): diffraction = self.pre_stage.calculate() numerics = self.core_options.numerics() wafer_stack = self.core_options.wafer_stack() imaging_tool = self.core_options.imaging_tool() exposure = self.core_options.exposure() otf = oplc.OpticalTransferFunction(imaging_tool, exposure, wafer_stack) image_in_resist = oplc.image_in_resist(diffraction, otf, numerics.grid_xy.value, numerics.grid_z.value) logging.log( LOG_VERBOSE_0, "Calculated image in resist data [%s]:\n" "Image in resist X-Axis data:\n%s\n" "Image in resist Y-Axis data:\n%s\n" "Image in resist Z-Axis data:\n%s\n" "Image in resist values:\n%s\n" % ( image_in_resist.values.shape, image_in_resist.x, image_in_resist.y, image_in_resist.z, image_in_resist.values ) ) return image_in_resist @property def metrics_kwargs(self): return { "title": "Relative Intensity", "level": self.options.metrology.image_in_resist_level.value, "image_tonality": IMAGE_NEGATIVE, "tonality": self.options.metrology.mask_tonality.value, "height": self.options.metrology.measurement_height.value, } class LatentImageStage(AbstractStage): def __init__(self, core_options, pre_stage): super(LatentImageStage, self).__init__(core_options, metrics=IMAGE_METRICS, pre_stage=pre_stage) @property def name(self): return "Exposed Latent Image in Resist" def _payload(self): image_in_resist = self.pre_stage.calculate() resist = oplc.ResistWaferLayer.cast(self.core_options.wafer_stack().resist()) exposure = self.core_options.exposure() latent_image = oplc.latent_image(image_in_resist, resist, exposure) logging.log( LOG_VERBOSE_0, "Calculated image in resist data [%s]:\n" "Exposed Latent Image in resist X-Axis data:\n%s\n" "Exposed Latent Image in resist Y-Axis data:\n%s\n" "Exposed Latent Image in resist Z-Axis data:\n%s\n" "Exposed Latent Image in resist values:\n%s\n" % ( latent_image.values.shape, latent_image.x, latent_image.y, latent_image.z, latent_image.values ) ) return latent_image @property def metrics_kwargs(self): return { "title": "Relative PAC Concentration", "level": self.options.metrology.latent_image_level.value, "image_tonality": IMAGE_POSITIVE, "tonality": self.options.metrology.mask_tonality.value, "height": self.options.metrology.measurement_height.value, } class PebLatentImageStage(AbstractStage): def __init__(self, core_options, pre_stage): super(PebLatentImageStage, self).__init__(core_options, metrics=IMAGE_METRICS, pre_stage=pre_stage) @property def name(self): return "Latent Image in Resist after PEB" def _payload(self): latent_image = self.pre_stage.calculate() resist = oplc.ResistWaferLayer.cast(self.core_options.wafer_stack().resist()) peb = self.core_options.post_exposure_bake() peb_latent_image = oplc.peb_latent_image(latent_image, resist, peb) logging.log( LOG_VERBOSE_0, "Calculated image in resist data [%s]:\n" "PEB Latent Image in resist X-Axis data:\n%s\n" "PEB Latent Image in resist Y-Axis data:\n%s\n" "PEB Latent Image in resist Z-Axis data:\n%s\n" "PEB Latent Image in resist values:\n%s\n" % ( peb_latent_image.values.shape, peb_latent_image.x, peb_latent_image.y, peb_latent_image.z, peb_latent_image.values ) ) return peb_latent_image @property def metrics_kwargs(self): return { "title": "Relative PAC Concentration", "level": self.options.metrology.peb_latent_image_level.value, "image_tonality": IMAGE_POSITIVE, "tonality": self.options.metrology.mask_tonality.value, "height": self.options.metrology.measurement_height.value, } class DevelopContoursStage(AbstractStage): def __init__(self, core_options, pre_stage): super(DevelopContoursStage, self).__init__(core_options, metrics=CONTOUR_METRICS, pre_stage=pre_stage) @property def name(self): return "Develop Time Contours" def _payload(self): peb_latent_image = self.pre_stage.calculate() resist = oplc.ResistWaferLayer.cast(self.core_options.wafer_stack().resist()) develop_contours = oplc.develop_time_contours(peb_latent_image, resist) logging.log( LOG_VERBOSE_0, "Calculated develop time contours data [%s]:\n" "Develop time contours X-Axis data:\n%s\n" "Develop time contours Y-Axis data:\n%s\n" "Develop time contours Z-Axis data:\n%s\n" "Develop time contours values:\n%s\n" % ( develop_contours.values.shape, develop_contours.x, develop_contours.y, develop_contours.z, develop_contours.values ) ) return develop_contours @property def metrics_kwargs(self): return { "level": self.options.development.develop_time.value, "image_tonality": IMAGE_POSITIVE, "tonality": self.options.metrology.mask_tonality.value, "height": self.options.metrology.measurement_height.value, "variate_height": self.options.metrology.variate_meas_height.value, } class ResistProfileStage(AbstractStage): def __init__(self, core_options, pre_stage): super(ResistProfileStage, self).__init__(core_options, metrics=PROFILE_METRICS, pre_stage=pre_stage) @property def name(self): return "Resist Profile" def _payload(self): develop_contours = self.pre_stage.calculate() develop_time = self.core_options.development() resist_profile = oplc.resist_profile(develop_contours, develop_time) return resist_profile @property def metrics_kwargs(self): return { "tonality": self.options.metrology.mask_tonality.value, "height": self.options.metrology.measurement_height.value, "variate_height": self.options.metrology.variate_meas_height.value, } class Core(QtCore.QObject): def __init__(self, options, *args, **kwargs): """:type options: options.structures.Options""" super(Core, self).__init__(*args, **kwargs) self.__options = options core_options = CoreSimulationOptions(options) self.__standing_waves_stage = StandingWavesStage(core_options) self.__diffraction_stage = DiffractionStage(core_options) self.__aerial_image_stage = AerialImageStage(core_options, self.__diffraction_stage) self.__image_in_resist_stage = ImageInResistStage(core_options, self.__diffraction_stage) self.__latent_image_stage = LatentImageStage(core_options, self.__image_in_resist_stage) self.__peb_latent_image_stage = PebLatentImageStage(core_options, self.__latent_image_stage) self.__develop_contours_stage = DevelopContoursStage(core_options, self.__peb_latent_image_stage) self.__resist_profile_stage = ResistProfileStage(core_options, self.__develop_contours_stage) self.__stages = [ self.standing_waves, self.diffraction, self.aerial_image, self.image_in_resist, self.latent_image, self.peb_latent_image, self.develop_contours, self.resist_profile ] logging.info("Connect numerics signals to core") connect( self.__options.numerics.changed, self.__standing_waves_stage.invalidate, self.__aerial_image_stage.invalidate, self.__image_in_resist_stage.invalidate ) logging.info("Connect wafer process signals to core") connect( self.__options.wafer_process.changed, self.__standing_waves_stage.invalidate, self.__image_in_resist_stage.invalidate, ) logging.info("Connect resist signals to core") connect( self.__options.wafer_process.resist.changed, self.__standing_waves_stage.invalidate, self.__develop_contours_stage.invalidate, ) logging.info("Connect mask signals to core") connect( self.__options.mask.changed, self.__diffraction_stage.invalidate ) logging.info("Connect imaging tool signals to core") connect( self.__options.imaging_tool.changed, self.__standing_waves_stage.invalidate, self.__diffraction_stage.invalidate, ) logging.info("Connect exposure focus signals to core") connect( self.__options.exposure_focus.changed, self.__aerial_image_stage.invalidate, self.__image_in_resist_stage.invalidate ) logging.info("Connect peb signals to core") connect( self.__options.peb.changed, self.__peb_latent_image_stage.invalidate ) logging.info("Connect development signals to core") connect( self.__options.development.changed, self.__resist_profile_stage.invalidate ) @property def options(self): return self.__options def __iter__(self): return self.__stages.__iter__() standing_waves = property(lambda self: self.__standing_waves_stage) diffraction = property(lambda self: self.__diffraction_stage) aerial_image = property(lambda self: self.__aerial_image_stage) image_in_resist = property(lambda self: self.__image_in_resist_stage) latent_image = property(lambda self: self.__latent_image_stage) peb_latent_image = property(lambda self: self.__peb_latent_image_stage) develop_contours = property(lambda self: self.__develop_contours_stage) resist_profile = property(lambda self: self.__resist_profile_stage) ================================================ FILE: OptolithiumGui/database/Enum.py ================================================ # -*- coding: utf-8 -*- # The Enum Recipe by zzzeek # http://techspot.zzzeek.org/2011/01/14/the-enum-recipe/ import re from sqlalchemy.types import SchemaType, TypeDecorator from database.base import Enum class EnumSymbol(object): """Define a fixed symbol tied to a parent class.""" def __init__(self, cls_, name, value, description): self.cls_ = cls_ """:type: type""" self.name = name """:type: str""" self.value = value """:type: str""" self.description = description """:type: str""" def __reduce__(self): """Allow unpickling to return the symbol linked to the DeclarativeEnum class.""" return getattr, (self.cls_, self.name) def __iter__(self): return iter([self.value, self.description]) def __repr__(self): return "%s" % self.name class EnumMeta(type): """Generate new DeclarativeEnum classes.""" def __init__(cls, classname, bases, dict_): cls._reg = reg = cls._reg.copy() for k, v in dict_.items(): if isinstance(v, tuple): sym = reg[v[0]] = EnumSymbol(cls, k, *v) setattr(cls, k, sym) # noinspection PyReturnFromInit return type.__init__(cls, classname, bases, dict_) def __iter__(cls): # noinspection PyUnresolvedReferences return iter(cls._reg.values()) class DeclarativeEnum(object): """Declarative enumeration.""" __metaclass__ = EnumMeta _reg = {} @classmethod def from_string(cls, value): try: return cls._reg[value] except KeyError: raise ValueError("Invalid value for %r: %r" % (cls.__name__, value)) @classmethod def values(cls): return cls._reg.keys() @classmethod def db_type(cls): return DeclarativeEnumType(cls) class DeclarativeEnumType(SchemaType, TypeDecorator): # noinspection PyMissingConstructor def __init__(self, enum): self.enum = enum sub = re.sub('([A-Z])', lambda m: "_" + m.group(1).lower(), enum.__name__) self.impl = Enum(*enum.values(), name="ck%s" % sub) def _set_table(self, table, column): # noinspection PyProtectedMember self.impl._set_table(table, column) def copy(self): return DeclarativeEnumType(self.enum) def process_bind_param(self, value, dialect): if value is None: return None return value.value def process_result_value(self, value, dialect): if value is None: return None return self.enum.from_string(value.strip()) ================================================ FILE: OptolithiumGui/database/__init__.py ================================================ # -*- coding: utf-8 -*- # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com __author__ = 'Alexei Gladkikh' ================================================ FILE: OptolithiumGui/database/base.py ================================================ # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import sqlalchemy from sqlalchemy.orm import RelationshipProperty from sqlalchemy.ext.declarative import DeclarativeMeta import logging as module_logging import settings import helpers Integer = sqlalchemy.Integer String = sqlalchemy.String Float = sqlalchemy.Float Boolean = sqlalchemy.Boolean DateTime = sqlalchemy.DateTime Enum = sqlalchemy.Enum __author__ = 'Alexei Gladkikh' logging = module_logging.getLogger(__name__) logging.setLevel(module_logging.INFO) helpers.logStreamEnable(logging) class Column(sqlalchemy.Column): def __init__(self, *args, **kwargs): self.precision = kwargs.pop("precision", None) super(Column, self).__init__(*args, **kwargs) class SignalsMeta(DeclarativeMeta): ID_NAME = "id" SIGNAL_CLASS_SUFFIX = "SignalsClass" GuiObjectClass = settings.get_gui_provider_object() GuiSignalClass = settings.get_gui_provider_signal() ClassAttributes = dict() # noinspection PyPep8Naming @staticmethod def SignalsAttrName(arg): classname = arg if isinstance(arg, basestring) else arg.__class__.__name__ return "%s.%s" % (classname, SignalsMeta.SIGNAL_CLASS_SUFFIX) class AbstractSignalsClass(GuiObjectClass): def __init__(self, container): SignalsMeta.GuiObjectClass.__init__(self) # logging.info("%s: %s" % (self.__class__.__name__, container)) self.__container = container def __getitem__(self, column): """ :type column: Column | RelationshipProperty | options.structures.AttributedProperty | options.structures.Abstract :rtype: GuiSignalClass """ return getattr(self, column.key) # def __iter__(self): # for field in self.__container.__dict__.values(): # # if isinstance(field, (Column, RelationshipProperty, AttributedProperty, Abstract)): # # FIXME: This is wrench and very danger # logging.info("Self: %s (%s)" % (field, field.__class__.__name__)) # if isinstance(field, (Column, RelationshipProperty)) or \ # field.__class__.__name__ == "AttributedProperty" or \ # field.__class__.__name__ == "Abstract": # yield self[field] def container(self): return self.__container # noinspection PyPep8Naming @staticmethod def CreateSignalsClass(class_name, items, db_columns=False): """ :type class_name: str :type items: list of str or list of Column :type db_columns: bool """ signal_class_name = SignalsMeta.SignalsAttrName(class_name) if db_columns: signal_class_dict = dict() for item in items: # logging.info("Item: %s [%s]" % (item, type(item))) # "key" property used here because "name" property has only Column # object but RelationshipProperty hasn't. While "key" is equal to "name" # and both objects have this property. if isinstance(item, (Column, RelationshipProperty)) and \ item.key not in signal_class_dict and \ item.key != SignalsMeta.ID_NAME: # logging.info("Add signal: %s.%s" % (class_name, item.key)) signal_class_dict[item.key] = SignalsMeta.GuiSignalClass(name=item.key) else: signal_class_dict = {item: SignalsMeta.GuiSignalClass(name=item) for item in items} return type(signal_class_name, (SignalsMeta.AbstractSignalsClass, ), signal_class_dict) def __init__(cls, class_name, bases, dict_): # logging.info("Current class: %s" % cls.__name__) super(SignalsMeta, cls).__init__(class_name, bases, dict_) check_attrs = [] for parent in cls.mro(): check_attrs.extend(SignalsMeta.ClassAttributes.get(parent, [])) check_attrs.extend(dict_.values()) SignalsMeta.ClassAttributes[cls] = dict_.values() signal_class = SignalsMeta.CreateSignalsClass(class_name, check_attrs, db_columns=True) setattr(cls, signal_class.__name__, signal_class) ================================================ FILE: OptolithiumGui/database/common.py ================================================ # -*- coding: utf-8 -*- # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import os import logging as module_logging from database import dbparser import orm import config import helpers __author__ = 'Alexei Gladkikh' logging = module_logging.getLogger(__name__) logging.setLevel(module_logging.DEBUG) helpers.logStreamEnable(logging) DB_VERSION = 6 DB_SCHEME = "sqlite" # noinspection PyPep8Naming def appdbCloseIfError(function): def wrapped(inst, *args, **kwargs): try: return function(inst, *args, **kwargs) except: inst.close() raise return wrapped class ApplicationDatabase(object): standard_tables = orm.standard_tables plugin_tables = orm.plugin_tables # ------------------------------------------------------------------------------------------------------------------ class OperationError(Exception): def __init__(self, *args, **kwargs): super(ApplicationDatabase.OperationError, self).__init__(*args, **kwargs) class SqlError(OperationError): def __init__(self, *args, **kwargs): super(ApplicationDatabase.SqlError, self).__init__(*args, **kwargs) class ObjectExisted(OperationError): def __init__(self, p_object): super(ApplicationDatabase.ObjectExisted, self).__init__() self.object = p_object class ImportError(OperationError): def __init__(self, *args, **kwargs): super(ApplicationDatabase.ImportError, self).__init__(*args, **kwargs) class VersionError(OperationError): def __init__(self, version, *args): super(ApplicationDatabase.VersionError, self).__init__(*args) self.__version = version @property def version(self): return self.__version class DefaultObjectsError(OperationError): def __init__(self, database, create_callbacks, *args): """ :param ApplicationDatabase database: Database :param list create_callbacks: List of callbacks to create default objects """ super(ApplicationDatabase.DefaultObjectsError, self).__init__(*args) self.__create_callbacks = create_callbacks self.__database = database def fix(self): for callback in self.__create_callbacks: callback(self.__database, commit=True) return self.__database # ------------------------------------------------------------------------------------------------------------------ def __init__(self, path): self.__path = path """:type: str""" self.__connection = orm.Connection("%s:///%s" % (DB_SCHEME, path), echo=config.LOG_DATABASE_QUERIES) self.__session = orm.Session(bind=self.__connection) self.__is_closed = False self.__parser = None """:type: database.dbparser.GenericParser or None""" @property def parser(self): return self.__parser @parser.setter def parser(self, value): """:type value: database.dbparser.GenericParser or None""" if self.__parser and self.__parser.selector is not None: logging.warning("Parser has already tethered to the database and will be rewritten!") self.__parser.selector = None self.__parser = value self.__parser.selector = self.__session.query def _create_db_scheme(self): orm.Base.metadata.create_all(self.__connection) self.__session.add(orm.Info(DB_VERSION)) self.__session.commit() @classmethod def create(cls, path, rewrite=False): """ Create new database file and initialize it (required for template.db generation) :param str path: Path to database file (may be empty string then db created in the memory) :param bool rewrite: If True and DB already existed then it will be rewritten :raises: ApplicationDatabase.SqlError """ if os.path.isfile(path): if rewrite: os.remove(path) else: raise ApplicationDatabase.OperationError("Configuration database already existed!") appdb = cls(path) appdb._create_db_scheme() return appdb @staticmethod def _check_sqlite_db(path): """ Check that database file existed and file has format of the SQLite database :param str path: Database file path :raises: ApplicationDatabase.OperationError """ # SQLite database file header is 100 bytes if os.path.getsize(path) < 100: raise ApplicationDatabase.OperationError("Wrong SQLite file size! (Most possible file is not SQLite)") with open(path, "rb") as db_file: header = db_file.read(100) if header[0:16] != "SQLite format 3\x00": raise ApplicationDatabase.OperationError("Wrong SQLite header! (Most possible file is not SQLite database)") @staticmethod def _check_tables(inspector): orm_table_names = orm.tables.keys() db_tables_names = inspector.get_table_names() orm_set = set(orm_table_names) db_set = set(db_tables_names) if orm_set != db_set: diff = orm_set.symmetric_difference(db_set) raise ApplicationDatabase.SqlError("Wrong database scheme:\n*Not equal tables %s" % (" ".join(diff))) @staticmethod def _check_columns(inspector): for table_name, orm_table in orm.tables.iteritems(): orm_columns = ["%s" % column for column in orm_table.columns] db_columns = ["%s.%s" % (table_name, d["name"]) for d in inspector.get_columns(table_name)] orm_set = set(orm_columns) db_set = set(db_columns) if orm_set != db_set: diff = orm_set.symmetric_difference(db_set) raise ApplicationDatabase.SqlError( "Wrong database table %s columns:\n*Not equal columns %s" % (table_name, " ".join([str(c) for c in diff]))) @appdbCloseIfError def _check_db_scheme(self, check_compat): """ Check database scheme and version :param bool check_compat: Check compatibility of the database with supported scheme :raises: ApplicationDatabase.SqlError """ logging.info("Check database scheme") try: info = self.__session.query(orm.Info).one() except orm.NoResultFound: raise ApplicationDatabase.SqlError("Version record in application database not found!") except orm.MultipleResultsFound: raise ApplicationDatabase.SqlError("Info table in application database not found!") if check_compat: if info.version != DB_VERSION: raise ApplicationDatabase.VersionError(info.version, "Database version not supported!") inspector = orm.Inspector.from_engine(self.__connection) self._check_tables(inspector) self._check_columns(inspector) @classmethod def open(cls, path, create=False, check_compat=True): """ Open existed database and check it :param str path: Path to database file :param bool create: Create the database if not existed :param bool check_compat: Check the version of the database scheme also :raises: ApplicationDatabase.OperationError, ApplicationDatabase.SqlError """ logging.info("Open application database: %s" % path) if not os.path.isfile(path): if create: appdb = cls(path) appdb._create_db_scheme() else: raise ApplicationDatabase.OperationError("Application database file not found!") else: cls._check_sqlite_db(path) appdb = cls(path) appdb._check_db_scheme(check_compat) return appdb def close(self): self.__session.close() self.__is_closed = True @property def closed(self): return self.__is_closed def _existed(self, p_object): """ :type p_object: orm.Generic :rtype: bool """ return self.__session.query(orm.Generic).filter(orm.Generic.name == p_object.name).first() is not None def commit(self): try: self.__session.commit() except (orm.IntegrityError, orm.OperationalError) as error: self.__session.rollback() signature = "CHECK constraint failed: " if signature in error.orig.message: message = "While added %s: %s" % (error.params, error.orig.message.split(signature)[-1]) else: message = error.message raise ApplicationDatabase.SqlError(message) except: self.__session.rollback() raise def add(self, p_object, commit=True): """ Add object to the database store :param orm.Generic p_object: ORM Object to be added to the database :param bool commit: Commit changes after modification :raises: ApplicationDatabase.ObjectExisted :rtype: list of orm.Generic """ if self._existed(p_object): raise ApplicationDatabase.ObjectExisted(p_object) self.__session.add(p_object) new_objects = [obj for obj in self.__session.new if isinstance(obj, orm.Generic)] if commit: self.commit() return new_objects def remove(self, name=None, p_object=None, commit=True): """ Remove object from the database using an object or using name of the object :param string name: Removing object name :param orm.Generic p_object: Removing object :param bool commit: Commit changes after modification :rtype: list of orm.Generic """ if name is not None: try: this = self.__session.query(orm.Generic).filter(orm.Generic.name == name).one() except orm.NoResultFound: pass else: logging.debug("Remove object: %s" % this) self.__session.delete(this) elif p_object is not None: self.__session.delete(p_object) else: raise ValueError("Name of the object or deleted object must be set!") deleted = [obj for obj in self.__session.deleted if isinstance(obj, orm.Generic)] if commit: self.commit() return deleted def replace(self, p_object, commit=True): """ Replace object in the database store. Exception will be raised if object was not found in DB. :param orm.Generic p_object: ORM Object to be added to the database :param commit: Commit changes after modification """ # Commit required because it can be composed objects that also must be deleted # So after_flush (see orm module) must executed self.remove(name=p_object.name, commit=True) self.add(p_object, commit) def import_object(self, path): """:rtype: list of orm.Generic""" filename = helpers.GetFilename(path) try: p_object = self.__parser.parse(path) new_objects = self.add(p_object) except dbparser.GenericParserError as error: logging.info("Parsing error: %s" % path) raise ApplicationDatabase.ImportError("Parsing error: %s\n\n%s!" % (filename, error.message)) except ApplicationDatabase.SqlError as error: logging.info("Insert error: %s" % path) raise ApplicationDatabase.ImportError("Inserting into database error: %s\n\n%s" % (filename, error.message)) else: return new_objects @property def path(self): return self.__path @appdbCloseIfError def __getitem__(self, item): """:rtype: sqlalchemy.orm.Query""" return self.__session.query(item) ================================================ FILE: OptolithiumGui/database/dbparser.py ================================================ # -*- coding: utf-8 -*- # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import abc import os import re import StringIO import numpy import logging as module_logging import config import clipper import gdsii.library import gdsii.elements import orm import helpers __author__ = 'Alexei Gladkikh' logging = module_logging.getLogger(__name__) logging.setLevel(module_logging.INFO) helpers.logStreamEnable(logging) def unique_rows(array): ncols = array.shape[1] dtype = array.dtype.descr * ncols struct = array.view(dtype) unique = numpy.unique(struct) return unique.view(array.dtype).reshape(-1, ncols) def txt2array(text, ndmin=1): """ :type text: str :rtype: numpy.ndarray """ # noinspection PyTypeChecker return numpy.loadtxt(StringIO.StringIO(text), ndmin=ndmin) class GenericParserError(Exception): pass class UnableParseError(GenericParserError): pass class WrongParserError(GenericParserError): pass class ParserInterface(object): __meta_class__ = abc.ABCMeta def __init__(self, extension_map=None): self.extension_map = extension_map if extension_map is not None else dict() @abc.abstractmethod def name(self): """:rtype: str""" pass @abc.abstractmethod def parse(self, path): """ :param str path: Path to the file object :rtype: orm.GenericObject """ pass def __getitem__(self, item): """ :param str item: Path to Prolith file being parsed """ _, ext = os.path.splitext(item) try: return self.extension_map[ext.lower()] except KeyError: raise UnableParseError("Unknown file extension %s" % ext) class Version(object): class ParseError(UnableParseError): pass @staticmethod def _normalize(v): return [int(x) for x in re.sub(r'(\.0+)*$', '', v).split(".")] def __init__(self, value): """:type value: str""" self.__value = value try: self.__version = self._normalize(value) except (KeyError, ValueError): raise Version.ParseError("Version number can't be parsed") def __cmp__(self, other): return cmp(self.__version, other.__version) def __str__(self): return self.__value class ProlithFormat(object): PUPIL_FILTER_TYPE_RADIUS = 0 PUPIL_FILTER_TYPE_GRID = 1 DEV_RATE_TYPE_PAC = 0 DEV_RATE_TYPE_EXPOSURE = 1 RESIST_NEGATIVE = 0 RESIST_POSITIVE = 1 RESIST_CONVENTIONAL = 0 RESIST_CHEMICAL_AMPLIFIED = 1 RESIST_EXPOSURE_MODEL_TYPE = 1 RESIST_PEB_DIFFUSION_MODEL = 1 RESIST_PEB_RXD_MODEL = 2 class ProlithParser(ParserInterface): COMMENT_CHAR = ";" SUPPORTED_VERSIONS = [Version("1.2.3.4")] JUNK_PATTERN = re.compile(r"""^\s*$|\s*;.*$""", re.MULTILINE) # It's a witchcraft be carefully... I was near to tear it into shreds... SECTIONS_PATTERN = re.compile(r"""\[Version](?:\r\n?|\n)(?P[^\[]*) \[Parameters](?:\r\n?|\n)(?P[^\[]*) (?:\[(?i)Data](?:\r\n?|\n)(?P[^\[]*))? (?:\[Comments](?:\r\n?|\n)(?P[^\[]*))? (?:\[Develop\sParameters](?:\r\n?|\n)(?P[^\[]*))? (?:\[PAB\sParameters](?:\r\n?|\n)(?P[^\[]*))? (?:\[PEB\sParameters](?:\r\n?|\n)(?P[^\[]*))? (?:\[Exposure\sParameters](?:\r\n?|\n)(?P[^\[]*))?""", re.DOTALL | re.VERBOSE) # This regex return list of dictionary with next keys: # transmittance, phase, group, points POLYGON_PATTERN = re.compile(r"""Polygon\( (?P[-+]?[0-9]*\.?[0-9]+),\ * (?P[-+]?[0-9]*\.?[0-9]+),\ * (?P[-+]?[0-9]*\.?[0-9]+)\ *\) (?:\r\n?|\n)\{(?:\r\n?|\n) (?P(?:\ *[-+]?[0-9]*\.?[0-9]+,\ [-+]?[0-9]*\.?[0-9]+(?:\r\n?|\n))+) }""", re.VERBOSE) # ------------------------------------------------------------------------------------------------------------------ @staticmethod def dictify(separated, names): """ Created dictionary from list of values and names for keys and also clean all comment started with ProlithParser.COMMENT_CHAR if any occurred. Moreover control if next value is not empty or not equal to the new Prolith format section. :param list of str separated: Separated values to generate dictionary :param list of str names: Name for result dictionary :rtype: dict from str to str """ results = dict.fromkeys(names, None) for line, name in zip(separated, names): value = line.split(ProlithParser.COMMENT_CHAR)[0].strip() """:type: str""" if not value or value.startswith('[') and value.endswith(']'): break results[name] = value return results @staticmethod def get_parameters(sections, names, directory="Parameters"): """ :param dict from str to str sections: Input data :param list of str names: Name for result dictionary :param str directory: Determine from which directory parameter will be extracted :rtype: dict from str to str """ return ProlithParser.dictify(sections[directory].splitlines(), names) # ------------------------------------------------------------------------------------------------------------------ @staticmethod def load_data_array(model, sections): """ :type model: type :type sections: dict from str to str :rtype: list of orm.Generic """ array = txt2array(sections["Data"].strip(), ndmin=2) return [model(*args) for args in unique_rows(array)] def load_generic_object(self, object_model, data_model, sections): """ :type object_model: type :type data_model: type :type sections: dict from str to str :rtype: orm.Generic """ name = self.get_parameters(sections, ["name"])["name"] array = self.load_data_array(data_model, sections) return object_model(name, array) # ------------------------------------------------------------------------------------------------------------------ def load_material(self, sections): """:rtype: orm.Material, list of orm.Generic""" logging.debug("Load material data") return self.load_generic_object(orm.Material, orm.MaterialData, sections) def load_source_shape(self, sections): """:rtype: orm.SourceShape, list of orm.Generic""" logging.debug("Load source shape data") return self.load_generic_object(orm.SourceShape, orm.SourceShapeData, sections) def load_pupil_filter(self, sections): """ :type sections: dict from str to str :rtype: orm.PupilFilter """ logging.debug("Load pupil filter data") prms = self.get_parameters(sections, ["name", "type", "step"]) if int(prms["type"]) != ProlithFormat.PUPIL_FILTER_TYPE_RADIUS: raise UnableParseError("Only radius format data supported") array = self.load_data_array(orm.PupilFilterData, sections) """:type: list of PupilFilterData""" return orm.PupilFilter(prms["name"], array) def load_development_rate(self, sections): """ :type sections: dict from str to str :rtype: orm.DeveloperSheet """ logging.debug("Load developer rate data") prms = self.get_parameters(sections, ["name", "type", "is_depth", "steps"]) if int(prms["type"]) != ProlithFormat.DEV_RATE_TYPE_PAC: raise UnableParseError("Only R(m) developer rate dependence supported") is_depth = int(prms["is_depth"]) if is_depth: steps = int(prms["steps"]) data_section = sections["Data"].splitlines() depth_array = txt2array(data_section[0]) data_array = txt2array("\n".join(data_section[1:])) if len(depth_array) != steps or data_array.shape[1] != steps+1: raise UnableParseError("Number of columns %s not equals to number of steps %s" % (data_array.shape[1], steps)) data = list() for k, depth in enumerate(depth_array): for s, rate in enumerate(data_array[:, k+1]): pac = data_array[s, 0] data.append(orm.DeveloperSheetData(pac, rate, depth)) else: data = self.load_data_array(orm.DeveloperSheetData, sections) return orm.DeveloperSheet(prms["name"], bool(is_depth), data) # noinspection PyMethodMayBeStatic def load_illumination(self, sections): """:rtype: orm.Illumination, list of orm.Generic""" logging.debug("Load illumination data") return self.load_generic_object(orm.Illumination, orm.IlluminationData, sections) def load_polarization(self, sections): """:rtype: orm.Polarization, list of orm.Generic""" logging.debug("Load polarization data") return self.load_generic_object(orm.Polarization, orm.PolarizationData, sections) def load_temperature_profile(self, sections): """:rtype: orm.TemperatureProfile, list of orm.Generic""" logging.debug("Load temperature profile data") return self.load_generic_object(orm.TemperatureProfile, orm.TemperatureProfileData, sections) @staticmethod def parse_mask_region(data): """ Generate new regions using string of floating-point values array specified in the next format: x1,y1 x2,y2 : xn,yn :param data: Geometry data of region specified as string contained points array """ region = orm.Region(float(data["transmittance"]), float(data["phase"]), orm.GeometryShape.Polygon) for line in data["points"].strip().splitlines(): p = line.strip().split(",") region.add(orm.Point(float(p[0]), float(p[1]))) return region @staticmethod def str2bbox(value): """ Convert string of four floating-point value represent bounding box to polygon :param str value: Prolith bounding box string representation :rtype: orm.Geometry """ return orm.Geometry.rectangle(*reversed([float(v) for v in value.split(",")])) # noinspection PyMethodMayBeStatic def load_mask(self, sections): """ :type sections: dict from str to str :rtype: orm.Mask """ logging.debug("Load mask 2D data") # Section parameters contain fixed data. Values saved with the next order. prms = self.get_parameters(sections, ["name", "boundary", "sim_region", "background", "phase", "critical_shape_step", "generate_cse", "clean"]) # Create mask base object mask = orm.Mask( name=prms["name"], background=float(prms["background"]), phase=float(prms["phase"]), boundary=ProlithParser.str2bbox(prms["boundary"]), sim_region=ProlithParser.str2bbox(prms["sim_region"])) # Parsing polygons data sections for match in self.POLYGON_PATTERN.finditer(sections["Data"]): region = ProlithParser.parse_mask_region(match.groupdict()) # TODO: Consider about polygon clipping by dimensions mask.add_region(region) return mask def _parse_developer(self, sections, resist_name): header = ["number_of_developers", "model", "developer_used"] prms = self.get_parameters(sections, header, directory="Develop") if int(prms["number_of_developers"]) != 1: raise UnableParseError("Only one developer supported") # Development rate in sheet data (Prolith not store which of rate are used) if prms["developer_used"] == "0": return None # If User Defined then used parameters otherwise bad format if prms["developer_used"] != "User Defined": raise UnableParseError("Bad developer used") try: model = (self.select(orm.DevelopmentModel). filter(orm.DevelopmentModel.prolith_id == int(prms["model"])).one()) """:type: orm.DevelopmentModel""" except orm.NoResultFound: raise UnableParseError("Not supported Prolith resist development model") header.extend([arg.name for arg in model.args]) header.extend(["Surface Rate", "Inhibition"]) prms = self.get_parameters(sections, header, directory="Develop") values = [float(prms[arg.name]) for arg in model.args] return orm.DeveloperExpr(name="Dev%s" % resist_name, model=model, values=values, surface_rate=float(prms["Surface Rate"]), inhibition_depth=float(prms["Inhibition"]), desc="Development model expression for %s resist" % resist_name, temporary=True) def _parse_exposure(self, sections): prms = self.get_parameters(sections, ["model_type", "values"], directory="Exposure") if int(prms["model_type"]) != ProlithFormat.RESIST_EXPOSURE_MODEL_TYPE: raise UnableParseError("Unsupported Prolith exposure model type") prms = self.dictify(prms["values"].split(), ["wavelength", "A", "B", "C", "n_unexposed", "n_exposed"]) if float(prms["n_unexposed"]) != float(prms["n_exposed"]): raise UnableParseError("Real part of the refractive index changing during exposure process unsupported") return orm.ExposureParameters(float(prms["wavelength"]), float(prms["A"]), float(prms["B"]), float(prms["C"]), float(prms["n_unexposed"])) def _parse_peb(self, sections): prms = self.get_parameters(sections, ["model_type", "Ea", "LnAr"], directory="PEB") if int(prms["model_type"]) != ProlithFormat.RESIST_PEB_DIFFUSION_MODEL: raise UnableParseError("Only Diffusion PEB model supported") return orm.PebParameters(float(prms["Ea"]), float(prms["LnAr"])) # noinspection PyMethodMayBeStatic def load_resist(self, sections): """ :type sections: dict from str to str :rtype: orm.Resist """ logging.debug("Load resist") prms = self.get_parameters(sections, ["name", "vendor", "read_only", "tone", "type"]) if int(prms["tone"]) != ProlithFormat.RESIST_POSITIVE: raise UnableParseError("Only positive resist tone is supported") if int(prms["type"]) != ProlithFormat.RESIST_CONVENTIONAL: raise UnableParseError("Only conventional resist types are supported") exposure_prms = self._parse_exposure(sections) peb_prms = self._parse_peb(sections) develop_prms = self._parse_developer(sections, prms["name"]) resist = orm.Resist(prms["name"], sections["Comments"], exposure_prms, peb_prms, develop_prms) return resist # ------------------------------------------------------------------------------------------------------------------ @staticmethod def _parse_sections(data): """:type data: str""" # Clean all the comments data = ProlithParser.JUNK_PATTERN.sub('', data) + "\n" try: # noinspection PyTypeChecker sections = next(ProlithParser.SECTIONS_PATTERN.finditer(data)).groupdict() except StopIteration: raise WrongParserError for key, value in sections.iteritems(): if value is not None: sections[key] = value.strip() return sections def __init__(self): super(ProlithParser, self).__init__( extension_map={ ".mat": self.load_material, ".src": self.load_source_shape, ".fil": self.load_pupil_filter, ".dev": self.load_development_rate, ".ill": self.load_illumination, ".pol": self.load_polarization, ".tpr": self.load_temperature_profile, ".msk": self.load_mask, ".res": self.load_resist}) self.select = None """:type: (sqlalchemy.orm.session.Session, tuple, dict) -> sqlalchemy.orm.Query or None""" def parse(self, path): """ :param str path: Path to the file object :rtype: orm.Generic """ with open(path) as datafile: data = datafile.read() sections = self._parse_sections(data) version = Version(sections["Version"]) # if version not in ProlithParser.SUPPORTED_VERSIONS: # raise UnableParseError("Unsupported format version %s" % version) try: return self[path](sections) except ValueError as error: raise UnableParseError("Prolith parsing error:\nStandardError: %s" % error.message) def name(self): return "Prolith" class LayoutParser(ParserInterface): @staticmethod def merge(polygons): paths = clipper.Paths() for polygon in polygons: xy = polygon.xy if polygon.xy[0] != polygon.xy[-1] else polygon.xy[:-1] path = clipper.Path([clipper.IntPoint(*p) for p in xy]) paths.append(path) clipper.SimplifyPolygons(paths, clipper.pftNonZero | clipper.pftEvenOdd | clipper.pftPositive) paths = clipper.CutHoles(clipper.Paths(paths)) # print paths return paths @staticmethod def load_gds(path): with open(path, "r") as gds_stream: gds_lib = gdsii.library.Library.load(gds_stream) # Coordinates factor to set all coordinates in nanometers factor = gds_lib.physical_unit / 1.0E-9 if len(gds_lib) != 1: raise UnableParseError("GDSII file should contains one cell only") cell = gds_lib[0] """:type: gdsii.elements.Cell""" polygons = filter(lambda item: isinstance(item, gdsii.elements.Boundary), cell) """:type: list[gdsii.elements.Boundary]""" # Get boundary polygon bnd_num, bnd_dt = config.GdsLayerMapping.boundary_layer() boundary_polygons = filter(lambda item: item.layer == bnd_num and item.data_type == bnd_dt, polygons) if len(boundary_polygons) != 1: raise UnableParseError("Boundary layer should contains only one polygon") if boundary_polygons[0].xy[0] == boundary_polygons[0].xy[-1]: boundary_xy = boundary_polygons[0].xy[:-1] else: boundary_xy = boundary_polygons[0].xy # GDSII format first and last point of the polygon must be matched. # So run over all point except the last boundary = orm.Geometry( shape=orm.GeometryShape.Polygon, points=[orm.Point(*p)*factor for p in boundary_xy]).convert2rect() if boundary is None: raise UnableParseError("Boundary polygon is not rectangle: %s" % boundary_xy) # Parse polygons not_mapped = dict() mapped_polygons = dict() regions = [] for polygon in polygons: if polygon == boundary_polygons[0]: continue layer_number = "%s.%s" % (polygon.layer, polygon.data_type) try: config.GdsLayerMapping[layer_number] except KeyError: if layer_number not in not_mapped: not_mapped[layer_number] = 1 else: not_mapped[layer_number] += 1 else: if layer_number not in mapped_polygons: mapped_polygons[layer_number] = list() mapped_polygons[layer_number].append(polygon) for layer_number in not_mapped: logging.warning("Loaded %s object from GDS layer %s not mapped!" % (not_mapped[layer_number], layer_number)) offset = boundary[0] + (boundary[1] - boundary[0]) / 2.0 for layer_number, polygons_list in mapped_polygons.items(): polygons = LayoutParser.merge(polygons_list) for polygon in polygons: layer_property = config.GdsLayerMapping[layer_number] # Move origin of layout to boundary left-bottom point, and polygon now is numpy array # noinspection PyTypeChecker regions.append(orm.Region( transmittance=layer_property["transmittance"], phase=layer_property["phase"], shape=orm.GeometryShape.Polygon, points=[(orm.Point(p.X, p.Y)*factor - offset) for p in polygon])) # Move boundary to origin boundary -= offset return orm.Mask( name=cell.name, background=float(config.GdsLayerMapping["background"]["transmittance"]), phase=float(config.GdsLayerMapping["background"]["phase"]), boundary=boundary, sim_region=boundary.clone(), regions=regions) def __init__(self): super(LayoutParser, self).__init__( extension_map={ ".gdsii": LayoutParser.load_gds, ".gds2": LayoutParser.load_gds, ".gds": LayoutParser.load_gds}) self.select = None """:type: (sqlalchemy.orm.session.Session, tuple, dict) -> sqlalchemy.orm.Query or None""" def parse(self, path): """ :param str path: Path to the file object :rtype: orm.Generic """ if os.path.getsize(path) > config.Configuration.maximum_gds_size: raise UnableParseError("Layout file is too large!") return self[path](path) def name(self): return "LayoutParser" class GenericParser(ParserInterface): __available_drivers__ = [ProlithParser, LayoutParser] """:type: list of type""" def __init__(self): super(GenericParser, self).__init__() self.__drivers = [cls() for cls in GenericParser.__available_drivers__] """:type: list of ParserInterface""" self.__select = None """:type: (sqlalchemy.orm.session.Session, tuple, dict) -> sqlalchemy.orm.Query or None""" @property def selector(self): """:rtype: (sqlalchemy.orm.session.Session, tuple, dict) -> sqlalchemy.orm.Query or None""" return self.__select @selector.setter def selector(self, value): """:type value: (sqlalchemy.orm.session.Session, tuple, dict) -> sqlalchemy.orm.Query or None""" self.__select = value for driver in self.__drivers: driver.select = self.__select def parse(self, path): """ :param str path: Path to the file object :rtype: orm.Generic """ if not os.path.isfile(path): raise GenericParserError("File can't be opened") for driver in self.__drivers: try: return driver.parse(path) except UnableParseError as error: error.message = "%s: %s" % (driver.name(), error.message) raise error except WrongParserError: continue raise GenericParserError("File format was not understood, no appropriate driver found") def name(self): return "Generic" ================================================ FILE: OptolithiumGui/database/orm.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import ctypes import datetime import logging as module_logging import gdsii.library import gdsii.structure import gdsii.elements import sqlalchemy import sqlalchemy.exc import sqlalchemy.orm.query import sqlalchemy.orm.exc import sqlalchemy.orm.session import sqlalchemy.engine.reflection import sqlalchemy.sql.schema from sqlalchemy import and_ from sqlalchemy import ForeignKey, event from sqlalchemy.orm import relationship, backref, RelationshipProperty, ColumnProperty from sqlalchemy.schema import CheckConstraint, UniqueConstraint, DDL from sqlalchemy.ext.declarative import declared_attr, declarative_base from sqlalchemy.ext.associationproxy import association_proxy from sqlalchemy.ext.hybrid import hybrid_property from database.base import Column, SignalsMeta, Integer, Float, String, DateTime, Boolean import numpy as np from scipy.interpolate import interp1d, griddata from collections import OrderedDict from config import DATETIME_FORMAT from options.common import Variable, Numeric, AttributedProperty from auxmath import cartesian, point_inside_polygon import optolithiumc as oplc import config import Enum import helpers import pcpi import physc __author__ = 'Alexei Gladkikh' Connection = sqlalchemy.create_engine Inspector = sqlalchemy.engine.reflection.Inspector Table = sqlalchemy.sql.schema.Table Query = sqlalchemy.orm.query.Query NoResultFound = sqlalchemy.orm.exc.NoResultFound MultipleResultsFound = sqlalchemy.orm.exc.MultipleResultsFound IntegrityError = sqlalchemy.exc.IntegrityError OperationalError = sqlalchemy.exc.OperationalError logging = module_logging.getLogger(__name__) logging.setLevel(module_logging.INFO) helpers.logStreamEnable(logging) APPLICATION_NAME = "Optolithium" METHOD_NONE_IMPLEMENTED = "This method must be redefined in the inherited class" class Precision(object): refractive_index = 3 wavelength = 3 dill = 3 class DeleteHook(object): def on_delete(self, session): """ :type: Session :return: Query of the objects to being delete :rtype: Query """ pass class UnknownObjectTypeError(Exception): def __init__(self, typename): super(UnknownObjectTypeError, self).__init__("Unknown object type: %s" % typename) class GenericType(Enum.DeclarativeEnum): # Standard object's types Material = "Ma", "Materials" """:type: str""" SourceShape = "So", "Source Shapes" """:type: str""" PupilFilter = "Pf", "Pupil Filters" """:type: str""" Illumination = "Il", "Illuminations" """:type: str""" Polarization = "Po", "Polarizations" """:type: str""" TemperatureProfile = "Tp", "Temperature Profiles" """:type: str""" Mask = "Mk", "Database Masks" """:type: str""" DeveloperSheet = "DSh", "Development Rates" """:type: str""" DeveloperExpr = "DEx", "Development Rates" """:type: str""" Resist = "Re", "Resists" """:type: str""" # Plugin object's types DevelopmentModel = "DmD", "Development Models" """:type: str""" AbstractPluginMask = "MkP", "Mask's Plugins" """:type: str""" AbstractPluginSourceShape = "SoP", "Source Shape's Plugins" """:type: str""" AbstractPluginPupilFilter = "PfP", "Pupil Filter's Plugins" """:type: str""" class GeometryShape(Enum.DeclarativeEnum): Rectangle = "R", "Rectangle" """:type: str""" Polygon = "P", "Polygon" """:type: str""" class GeometryObjectType(Enum.DeclarativeEnum): Geometry = "Ge", "Geometry" """:type: str""" Region = "Re", "Region" """:type: str""" class BaseTemplate(object): id = Column(Integer, primary_key=True) __tablename__ = declared_attr(lambda cls: cls.__name__) identifier = hybrid_property(lambda cls: cls.__tablename__) # CAUTION: Using lazy initialization because "@reconstructor" decorator not working under Cython @property def dirty(self): if not hasattr(self, "_dirty"): # noinspection PyAttributeOutsideInit self._dirty = False return self._dirty @property def signals(self): """:rtype: AbstractSignalsClass""" if not hasattr(self, "_signals"): # logging.info("Create signals for %s of %s" % (self, self.__class__.__name__)) signal_class = getattr(self.__class__, SignalsMeta.SignalsAttrName(self)) # noinspection PyAttributeOutsideInit self._signals = signal_class(self) return self._signals Base = declarative_base(cls=BaseTemplate, name=BaseTemplate.__name__, metaclass=SignalsMeta, constructor=None) # noinspection PyUnusedLocal @event.listens_for(Base, 'attribute_instrument') def configure_listener(class_, key, inst): """This event is called whenever an attribute on a class is instrumented""" # logging.info("Configure listener for: %s, %s, %s" % (inst, hasattr(inst.property, 'columns'), type(inst))) if isinstance(inst.property, ColumnProperty): # noinspection PyUnusedLocal @event.listens_for(inst, "set", retval=True) def set_column(instance, value, oldvalue, initiator): """This event is called whenever a "set" occurs on that instrumented attribute""" column = inst.property.columns[0] if column.key == SignalsMeta.ID_NAME: return value round_value = round(value, column.precision) if column.precision is not None else value # logging.info("%s: %s -> %s (%s) [%s]" % (column.key, oldvalue, value, round_value, column.precision)) if column.key not in instance.__dict__ or instance.__dict__[column.key] != round_value: # Oh... it's a black magic change value before some ORM action's how it affect on db instance.__dict__[column.key] = round_value # Workaround of SQLAlchemy strange behaviour, it set attribute # before call constructor or reconstructor for parametric material if hasattr(instance, "signals"): instance.signals[column].emit() instance._dirty = True return round_value elif isinstance(inst.property, RelationshipProperty): # noinspection PyUnusedLocal @event.listens_for(inst, "set", retval=True) def set_relationship(instance, value, oldvalue, initiator): """This event is called whenever a "set" occurs on that instrumented attribute""" # logging.info("%s: %s -> %s" % (inst.property.key, oldvalue, value)) if inst.property.key not in instance.__dict__ or instance.__dict__[inst.property.key] != value: instance.__dict__[inst.property.key] = value if hasattr(instance, "signals"): instance.signals[inst.property].emit() instance._dirty = True return value class Generic(Base): @staticmethod def const_polymorphic(): query = """ CREATE TRIGGER ConstantGenericInheritance UPDATE OF type ON Generic BEGIN SELECT RAISE (ABORT, 'Changing of objects polymorphic type is forbidden!'); END;""" return DDL(query) @staticmethod def inheritance_trigger(child_class): """:type child_class: type""" symbol = getattr(GenericType, child_class.__name__) query = """ CREATE TRIGGER Check%(child_name)sInheritance BEFORE INSERT ON %(child_name)s WHEN EXISTS ( SELECT NULL FROM Generic WHERE Generic.id == new.id AND Generic.type != "%(type_name)s" ) BEGIN SELECT RAISE (ABORT, 'Inheritance violated on Generic->%(child_name)s'); END;""" % {'child_name': symbol.name, 'type_name': symbol.value} return DDL(query) # noinspection PyPropertyDefinition,PyMethodParameters @hybrid_property def icon(cls): raise NotImplementedError(METHOD_NONE_IMPLEMENTED) # noinspection PyPropertyDefinition,PyMethodParameters @hybrid_property def title(cls): # This hack is required because cls can be as a instance and object # Class always must has __name__ attribute that determine its name name = getattr(cls, "__name__", cls.__class__.__name__) enum_symbol = getattr(GenericType, name) """:type: Enum.EnumSymbol""" return enum_symbol.description id = Column(Integer, primary_key=True) name = Column(String, nullable=False, unique=True) desc = Column(String, nullable=False) created = Column(DateTime, nullable=False) type = Column(GenericType.db_type(), nullable=False) __mapper_args__ = { "polymorphic_identity": None, "polymorphic_on": type } def __init__(self, name, desc): super(Generic, self).__init__() self.name = name self.desc = desc if desc is not None else str() self.created = datetime.datetime.now() def assign(self, other): """:type other: Generic""" if self.type != other.type: raise RuntimeError("Assign of Generics objects (%s, %s) with different types (%s, %s)" % (self.name, other.name, self.type, other.type)) self.name = other.name self.desc = other.desc self.created = other.created self.type = other.type def clone(self, name=None): """ :type name: str or None :rtype: Generic """ return Generic(self.name if name is None else name, self.desc) def __str__(self): return "%s \"%s\"" % (self.__tablename__, self.name) def export(self): """:rtype: dict""" return { Generic.name.key: self.name, Generic.desc.key: self.desc, Generic.created.key: self.created.strftime(DATETIME_FORMAT), Generic.type.key: str(self.type) } @classmethod def load(cls, p_object): """:type p_object: dict""" raise NotImplementedError(METHOD_NONE_IMPLEMENTED) def parse(self, p_object): """:type p_object: dict""" raise NotImplementedError(METHOD_NONE_IMPLEMENTED) event.listen(Generic.__table__, "after_create", Generic.const_polymorphic()) class Session(sqlalchemy.orm.session.Session): def delete(self, instance): logging.debug("Session.delete(%s)" % instance) deleted = [instance] if isinstance(instance, Generic) and isinstance(instance, DeleteHook): deleted.extend(instance.on_delete(self)) self.autoflush = False for p_object in deleted: super(Session, self).delete(p_object) self.autoflush = True class StandardObject(object): pass class PluginObject(object): cpi = None """ :param: C plugin interface structure :type: pcpi.CPluginInterface """ class AbstractPluginParameter(object): def __init__(self, name, order, defv, vmin=None, vmax=None): """ :type name: str :type order: int :type defv: float :type vmin: float :type vmax: float """ super(AbstractPluginParameter, self).__init__() self.name = name self.ord = order self.defv = defv self.min = vmin self.max = vmax @property def default(self): return self.defv def clone(self): """:rtype: AbstractPluginParameter""" return self.__class__(self.name, self.ord, self.defv, self.min, self.max) def _create_backref(name, order_by="id", suffix="Data"): """:type name: str""" data_table = name + suffix return backref(data_table, order_by="%s.%s" % (data_table, order_by)) def _create_relationship(name, order_by="id", suffix="Data", cascade="all, delete, delete-orphan"): """:type name: str""" data_table = name + suffix return relationship(data_table, order_by="%s.%s" % (data_table, order_by), cascade=cascade) class Material(Generic, StandardObject): icon = hybrid_property(lambda cls: "icons/Material") id = Column(Integer, ForeignKey(Generic.id), primary_key=True) data = _create_relationship("Material") __mapper_args__ = {"polymorphic_identity": GenericType.Material} def __init__(self, name, data, desc=None): """:type data: list of MaterialData""" super(Material, self).__init__(name, desc) self.data = data def assign(self, other): """:type other: Material""" super(Material, self).assign(other) self.data = [v.clone() for v in other.data] def clone(self, name=None): """ :type name: str or None :rtype: Material """ data = [v.clone() for v in self.data] return Material(self.name if name is None else name, data, self.desc) def export(self): """:rtype: dict""" result = super(Material, self).export() result.update({Material.data.key: [data.export() for data in self.data]}) return result @classmethod def load(cls, p_object): """:type p_object: dict""" data = [MaterialData.load(data) for data in p_object[Material.data.key]] return cls( name=str(p_object[Material.name.key]), desc=str(p_object[Material.desc.key]), data=data) def parse(self, p_object): """:type p_object: dict""" self.assign(Material.load(p_object)) event.listen(Material.__table__, "after_create", Generic.inheritance_trigger(Material)) class MaterialData(Base): wavelength = Column(Float, nullable=False, precision=Precision.wavelength) real = Column(Float, nullable=False, precision=Precision.refractive_index) imag = Column(Float, nullable=False, precision=Precision.refractive_index) material_id = Column(Integer, ForeignKey(Material.id), nullable=False) material = relationship(Material, backref=_create_backref("Material")) __table_args__ = ( UniqueConstraint(wavelength, material_id, name="duplicate wavelength values"), # ------------------------------------------------- CheckConstraint(wavelength > 0.0, name="wavelength must be > 0.0"), # ------------------------------------------------- CheckConstraint(real >= 0.0, name="real part must be >= 0.0"), CheckConstraint(imag >= 0.0, name="imag part must be >= 0.0") ) def __init__(self, wavelength, real, imag): """ :type wavelength: float :type real: float :type imag: float """ super(MaterialData, self).__init__() self.wavelength = wavelength self.real = real self.imag = imag def clone(self): """:rtype: MaterialData""" return MaterialData(self.wavelength, self.real, self.imag) def __iter__(self): return (v for v in [self.real, self.imag]) def export(self): return { MaterialData.wavelength.key: self.wavelength, MaterialData.real.key: self.real, MaterialData.imag.key: self.imag } def assign(self, other): """:type other: MaterialData""" self.wavelength = other.wavelength self.real = other.real self.imag = other.imag @classmethod def load(cls, p_object): """:type p_object: dict""" return cls( wavelength=float(p_object[MaterialData.wavelength.key]), real=float(p_object[MaterialData.real.key]), imag=float(p_object[MaterialData.imag.key])) def parse(self, p_object): """:type p_object: dict""" self.assign(MaterialData.load(p_object)) class SourceShape(Generic, StandardObject): icon = hybrid_property(lambda cls: "icons/SourceShape") id = Column(Integer, ForeignKey(Generic.id), primary_key=True) data = _create_relationship("SourceShape") __mapper_args__ = {"polymorphic_identity": GenericType.SourceShape} def __init__(self, name, data, desc=None): """:type data: list of SourceShapeData""" super(SourceShape, self).__init__(name, desc) self.data = data def assign(self, other): """:type other: SourceShape""" super(SourceShape, self).assign(other) self.data = [v.clone() for v in other.data] def clone(self, name=None): """ :type name: str or None :rtype: SourceShape """ data = [v.clone() for v in self.data] return SourceShape(self.name if name is None else name, data, self.desc) @classmethod def load(cls, p_object): """:type p_object: dict""" data = [SourceShapeData.load(data) for data in p_object[SourceShape.data.key]] return cls( name=str(p_object[SourceShape.name.key]), desc=str(p_object[SourceShape.desc.key]), data=data) def export(self): result = super(SourceShape, self).export() result.update({SourceShape.data.key: [data.export() for data in self.data]}) return result def parse(self, p_object): """:type p_object: dict""" self.assign(SourceShape.load(p_object)) def intensity(self, x=None, y=None): """ Return intensity of the source shape. If x or y is None then native coordinates (as in input data) are used. :param list of float x or None: x-coordinates at which intensity must be calculated :param list of float y or None: y-coordinates at which intensity must be calculated :return: Native x, y if x or y is None and intensity else only intensity :rtype: (np.array, np.array, np.array) or np.array """ def find_nearest(value, array): return (np.abs(array - value)).argmin() native_xy = False if x is None or y is None: native_xy = True vx, vy, vz = [], [], [] for item in self.data: vx.append(item.x) vy.append(item.y) vz.append(item.intensity) x = np.unique(np.array(vx)) y = np.unique(np.array(vy)) if len(self.data) == 1: result = np.ndarray([len(y), len(x)]) r = find_nearest(self.data[0].y, y) c = find_nearest(self.data[0].x, x) result[r, c] = self.data[0].intensity else: vx, vy, vz = [], [], [] for item in self.data: vx.append(item.x) vy.append(item.y) vz.append(item.intensity) vx = np.array(vx) vy = np.array(vy) vz = np.array(vz) # This shit: y[:, None] - is transpose result = griddata((vy, vx), vz, (y[None, :], x[:, None]), method='linear', fill_value=0.0) if native_xy: return x, y, result return result # Compatibility with ConcretePluginSourceShape @property def variables(self): return [] def convert2core(self): x, y, values = self.intensity() return oplc.SourceShapeModelSheet(x, y, np.asfortranarray(values)) event.listen(SourceShape.__table__, "after_create", Generic.inheritance_trigger(SourceShape)) class SourceShapeData(Base): x = Column(Float, nullable=False) y = Column(Float, nullable=False) intensity = Column(Float, nullable=False) source_shape_id = Column(Integer, ForeignKey(SourceShape.id), nullable=False) source_shape = relationship(SourceShape, backref=_create_backref("SourceShape")) __table_args__ = ( UniqueConstraint(x, y, source_shape_id, name="duplicate x, y values"), # ------------------------------------------------- CheckConstraint(intensity >= 0.0, name="intensity must >= 0.0"), CheckConstraint(intensity <= 1.0, name="intensity must <= 1.0"), # ------------------------------------------------- CheckConstraint(x >= -1.0, name="x must be >= -1.0"), CheckConstraint(x <= 1.0, name="x must be <= 1.0"), # ------------------------------------------------- CheckConstraint(y >= -1.0, name="y must be >= -1.0"), CheckConstraint(y <= 1.0, name="y must be <= 1.0") ) def __init__(self, x, y, intensity): """ :type x: float :type y: float :type intensity: float """ super(SourceShapeData, self).__init__() self.x = x self.y = y self.intensity = intensity def clone(self): """:rtype: SourceShapeData""" return SourceShapeData(self.x, self.y, self.intensity) def assign(self, other): """:type other: SourceShapeData""" self.x = other.x self.y = other.y self.intensity = other.intensity @classmethod def load(cls, p_object): """:type p_object: dict""" return cls( x=p_object[SourceShapeData.x.key], y=p_object[SourceShapeData.y.key], intensity=p_object[SourceShapeData.intensity.key]) def export(self): return { SourceShapeData.x.key: self.x, SourceShapeData.y.key: self.y, SourceShapeData.intensity.key: self.intensity } def parse(self, p_object): """:type p_object: dict""" self.assign(SourceShapeData.load(p_object)) class ConcretePluginCommon(object): SignalsClass = None def __init__(self, abstract, values): self.__abstract = abstract self.__signals = self.__class__.SignalsClass(self) self.__vars_dict = OrderedDict() values = [parameter.default for parameter in self._base.prms] if values is None else values for parameter, value in zip(self._base.prms, values): variable = Variable( ftype=Numeric(vmin=parameter.min, vmax=parameter.max, dtype=float), value=value, name=parameter.name) self.__vars_dict[variable.name] = variable signals = property(lambda self: self.__signals) name = property(lambda self: self.__abstract.name) desc = property(lambda self: self.__abstract.desc) variables = property(lambda self: self.__vars_dict.values()) values = property(lambda self: [variable.value for variable in self.__vars_dict.values()]) _base = property(lambda self: self.__abstract) def export(self): return {variable.name: variable.value for variable in self.variables} @classmethod def load(cls, p_object, abstract): values = [float(p_object[parameter.name]) for parameter in abstract.prms] return cls(abstract, values) def clone(self): return self.__class__(self._base, self.values) class ConcretePluginSourceShape(ConcretePluginCommon): SignalsClass = SignalsMeta.CreateSignalsClass("ConcretePluginSourceShape", [], db_columns=False) def __init__(self, abstract, values=None): """ :type abstract: orm.AbstractPluginSourceShape :type values: list of float """ super(ConcretePluginSourceShape, self).__init__(abstract, values) self.__source_shape_struct = pcpi.source_shape_plugin_t() def intensity(self, x, y): """ Return intensity of the source shape. If x or y is None then native coordinates (as in input data) are used. :param list of float x: x-coordinates at which intensity must be calculated :param list of float y: y-coordinates at which intensity must be calculated :return: intensity on x-y grid :rtype: np.array """ result = np.ndarray([len(y), len(x)], dtype=float) xy = cartesian(y, x) rows = range(len(y)) cols = range(len(x)) rc = cartesian(rows, cols) for (r, c), (y, x) in zip(rc, xy): result[r, c] = self._base.calculate(x, y, *self.values) return result expr = property(lambda self: self._base.entry.expr) def export(self): result = self._base.export() result.update(super(ConcretePluginSourceShape, self).export()) return result @classmethod def load(cls, p_object, abstract=None): """:type p_object: dict""" abstract_base = AbstractPluginSourceShape.load(p_object) return super(ConcretePluginSourceShape, cls).load(p_object, abstract_base) def convert2core(self): return oplc.SourceShapeModelPlugin(self.expr, self.values) class AbstractPluginSourceShape(Generic, PluginObject): icon = hybrid_property(lambda cls: "icons/Numerics") cpi = pcpi.source_shape_plugin_t id = Column(Integer, ForeignKey(Generic.id), primary_key=True) prms = relationship( "AbstractPluginSourceShapePrm", order_by="AbstractPluginSourceShapePrm.ord", cascade="all, delete, delete-orphan") __mapper_args__ = {"polymorphic_identity": GenericType.AbstractPluginSourceShape} def __init__(self, name, prms, desc=None): """ :param str name: Source Shape plugin name :param list of AbstractPluginSourceShapePrm prms: Parameters descriptors of the source shape plugin :param str or None desc: Description of the plugin """ super(AbstractPluginSourceShape, self).__init__(name, desc) self.prms = prms self._source_shape_entry = None """:type: pcpi.source_shape_plugin_t""" def produce(self, values=None): """ :type values: list of float :rtype: ConcretePluginSourceShape """ return ConcretePluginSourceShape(self, values) @property def entry(self): """:rtype: pcpi.source_shape_plugin_t""" if not hasattr(self, "_source_shape_entry") or self._source_shape_entry is None: self._source_shape_entry = pcpi.PLUGIN_REGISTRY.get_by_id(self.id).entry return self._source_shape_entry def calculate(self, cx, cy, *values): array = ctypes.c_double * len(self.prms) # noinspection PyCallingNonCallable return self.entry.expr(cx, cy, array(*values)) def assign(self, other): raise NotImplementedError(METHOD_NONE_IMPLEMENTED) def clone(self, name=None): """ :type name: str or None :rtype: AbstractPluginSourceShape """ if name is not None: raise NotImplementedError(METHOD_NONE_IMPLEMENTED) prms = [v.clone() for v in self.prms] return AbstractPluginSourceShape(self.name, prms, self.desc) @classmethod def load(cls, p_object): return pcpi.PLUGIN_REGISTRY.get_by_name(p_object[Generic.name.key]).record class AbstractPluginSourceShapePrm(AbstractPluginParameter, Base): name = Column(String, nullable=False) ord = Column(Integer, nullable=False) defv = Column(Float) max = Column(Float) min = Column(Float) plugin_source_shape_id = Column(Integer, ForeignKey(AbstractPluginSourceShape.id, ondelete="CASCADE")) __table_args__ = ( UniqueConstraint(ord, plugin_source_shape_id, name="duplicate order arguments number"), # ------------------------------------------------- # TODO: Check parameters # CheckConstraint(defv > min, "default value must greater than min values"), # CheckConstraint(defv < max, "default value must lower than max values"), # CheckConstraint(max > min, name="max must be > min argument value"), ) class PupilFilter(Generic, StandardObject): icon = hybrid_property(lambda cls: "icons/PupilFilter") id = Column(Integer, ForeignKey(Generic.id), primary_key=True) data = _create_relationship("PupilFilter") __mapper_args__ = {"polymorphic_identity": GenericType.PupilFilter} def __init__(self, name, data, desc=None): """:type data: list of PupilFilterData""" super(PupilFilter, self).__init__(name, desc) self.data = data def assign(self, other): """:type other: PupilFilter""" super(PupilFilter, self).assign(other) self.data = [v.clone() for v in other.data] def clone(self, name=None): """ :type name: str or None :rtype: PupilFilter """ data = [v.clone() for v in self.data] return PupilFilter(self.name if name is None else name, data, self.desc) def export(self): result = super(PupilFilter, self).export() result.update({PupilFilter.data.key: [data.export() for data in self.data]}) return result @classmethod def load(cls, p_object): """:type p_object: dict""" data = [PupilFilterData.load(data) for data in p_object[PupilFilter.data.key]] return cls( name=str(p_object[PupilFilter.name.key]), desc=str(p_object[PupilFilter.desc.key]), data=data) def parse(self, p_object): """:type p_object: dict""" self.assign(PupilFilter.load(p_object)) def coefficients(self, xdata=None, ydata=None): native_xy = False if xdata is None or ydata is None: step_rad = 1.0/float(len(self.data)) xdata = np.arange(-1.0, 1.0 + step_rad, step_rad) ydata = np.arange(-1.0, 1.0 + step_rad, step_rad) native_xy = True rows = len(ydata) cols = len(xdata) result = np.ndarray([rows, cols], dtype=complex) xp = [] fp_real = [] fp_imag = [] for item in self.data: xp.append(item.radius) rad = np.deg2rad(item.phase) fp_real.append(item.amplitude * np.cos(rad)) fp_imag.append(item.amplitude * np.sin(rad)) real = interp1d(xp, fp_real, bounds_error=False, fill_value=0.0) imag = interp1d(xp, fp_imag, bounds_error=False, fill_value=0.0) rc = cartesian(range(rows), range(cols)) xy = cartesian(xdata, ydata) for (r, c), (x, y) in zip(rc, xy): radius = np.sqrt(x**2 + y**2) result[r, c] = complex(real(radius), imag(radius)) if native_xy: return xdata, ydata, result return result # Compatibility with ConcretePluginPupilFilter @property def variables(self): return [] def convert2core(self): x, y, values = self.coefficients() return oplc.PupilFilterModelSheet(x, y, np.asfortranarray(values)) event.listen(PupilFilter.__table__, "after_create", Generic.inheritance_trigger(PupilFilter)) class PupilFilterData(Base): radius = Column(Float, nullable=False) phase = Column(Float, nullable=False) # in degrees amplitude = Column(Float, nullable=False) pupil_filter_id = Column(Integer, ForeignKey(PupilFilter.id), nullable=False) pupil_filter = relationship(PupilFilter, backref=_create_backref("PupilFilter")) __table_args__ = ( UniqueConstraint(radius, pupil_filter_id, name="duplicate radius values"), # ------------------------------------------------- CheckConstraint(phase >= -180.0, name="phase must be >= -180.0"), CheckConstraint(phase <= 180.0, name="phase must be <= 180.0"), # ------------------------------------------------- CheckConstraint(amplitude >= 0.0, name="amplitude >= 0.0"), CheckConstraint(amplitude <= 1.0, name="amplitude <= 1.0") ) def __init__(self, radius, phase, amplitude): """ :type radius: float :type phase: float :type amplitude: float """ super(PupilFilterData, self).__init__() self.radius = radius self.phase = phase self.amplitude = amplitude def clone(self): """:rtype: PupilFilterData""" return PupilFilterData(self.radius, self.phase, self.amplitude) def assign(self, other): """:type other: PupilFilterData""" self.radius = other.radius self.phase = other.phase self.amplitude = other.amplitude def export(self): return { PupilFilterData.radius.key: self.radius, PupilFilterData.phase.key: self.phase, PupilFilterData.amplitude.key: self.amplitude } @classmethod def load(cls, p_object): """:type p_object: dict""" return cls( radius=p_object[PupilFilterData.radius.key], phase=p_object[PupilFilterData.phase.key], amplitude=p_object[PupilFilterData.amplitude.key]) def parse(self, p_object): """:type p_object: dict""" self.assign(PupilFilterData.load(p_object)) class ConcretePluginPupilFilter(ConcretePluginCommon): SignalsClass = SignalsMeta.CreateSignalsClass("ConcretePluginPupilFilter", [], db_columns=False) def __init__(self, abstract, values=None): """ :type abstract: orm.AbstractPluginPupilFilter :type values: list of float """ super(ConcretePluginPupilFilter, self).__init__(abstract, values) self.__pupil_filter_struct = pcpi.pupil_filter_plugin_t() def coefficients(self, x, y): """ Return coefficients of the pupil filter. If x or y is None then native coordinates (as in input data) are used. :param list of float x: x-coordinates at which intensity must be calculated :param list of float y: y-coordinates at which intensity must be calculated :return: intensity on x-y grid :rtype: np.array """ result = np.ndarray([len(y), len(x)], dtype=complex) xy = cartesian(y, x) rows = range(len(y)) cols = range(len(x)) rc = cartesian(rows, cols) for (r, c), (y, x) in zip(rc, xy): result[r, c] = self._base.calculate(x, y, *self.values) return result expr = property(lambda self: self._base.entry.expr) def export(self): result = self._base.export() result.update(super(ConcretePluginPupilFilter, self).export()) return result @classmethod def load(cls, p_object, abstract=None): """:type p_object: dict""" abstract_base = AbstractPluginPupilFilter.load(p_object) return super(ConcretePluginPupilFilter, cls).load(p_object, abstract_base) def convert2core(self): return oplc.PupilFilterModelPlugin(self.expr, self.values) class AbstractPluginPupilFilter(Generic, PluginObject): icon = hybrid_property(lambda cls: "icons/Numerics") cpi = pcpi.pupil_filter_plugin_t id = Column(Integer, ForeignKey(Generic.id), primary_key=True) prms = relationship( "AbstractPluginPupilFilterPrm", order_by="AbstractPluginPupilFilterPrm.ord", cascade="all, delete, delete-orphan") __mapper_args__ = {"polymorphic_identity": GenericType.AbstractPluginPupilFilter} def __init__(self, name, prms, desc=None): """ :param str name: Pupil filter plugin name :param list of AbstractPluginPupilFilterPrm prms: Parameters descriptors of the pupil filter plugin :param str or None desc: Description of the plugin """ super(AbstractPluginPupilFilter, self).__init__(name, desc) self.prms = prms self._pupil_filter_entry = None """:type: pcpi.pupil_filter_plugin_t""" def produce(self, values=None): """ :type values: list of float :rtype: ConcretePluginPupilFilter """ return ConcretePluginPupilFilter(self, values) @property def entry(self): """:rtype: pcpi.pupil_filter_plugin_t""" if not hasattr(self, "_pupil_filter_entry") or self._pupil_filter_entry is None: self._pupil_filter_entry = pcpi.PLUGIN_REGISTRY.get_by_id(self.id).entry return self._pupil_filter_entry def calculate(self, cx, cy, *values): array = ctypes.c_double * len(self.prms) # noinspection PyCallingNonCallable value = self.entry.expr(cx, cy, array(*values)) return complex(value.real, value.imag) def assign(self, other): raise NotImplementedError(METHOD_NONE_IMPLEMENTED) def clone(self, name=None): """ :type name: str or None :rtype: AbstractPluginPupilFilter """ if name is not None: raise NotImplementedError(METHOD_NONE_IMPLEMENTED) prms = [v.clone() for v in self.prms] return AbstractPluginPupilFilter(self.name, prms, self.desc) @classmethod def load(cls, p_object): return pcpi.PLUGIN_REGISTRY.get_by_name(p_object[Generic.name.key]).record class AbstractPluginPupilFilterPrm(AbstractPluginParameter, Base): name = Column(String, nullable=False) ord = Column(Integer, nullable=False) defv = Column(Float) max = Column(Float) min = Column(Float) plugin_pupil_filter_id = Column(Integer, ForeignKey(AbstractPluginPupilFilter.id, ondelete="CASCADE")) __table_args__ = ( UniqueConstraint(ord, plugin_pupil_filter_id, name="duplicate order arguments number"), # ------------------------------------------------- # TODO: Check parameters # CheckConstraint(defv > min, "default value must greater than min values"), # CheckConstraint(defv < max, "default value must lower than max values"), # CheckConstraint(max > min, name="max must be > min argument value"), ) class Illumination(Generic, StandardObject): icon = hybrid_property(lambda cls: "icons/Material") id = Column(Integer, ForeignKey(Generic.id), primary_key=True) data = _create_relationship("Illumination") __mapper_args__ = {"polymorphic_identity": GenericType.Illumination} def __init__(self, name, data, desc=None): """:type data: list of IlluminationData""" super(Illumination, self).__init__(name, desc) self.data = data def assign(self, other): """:type other: Illumination""" super(Illumination, self).assign(other) self.data = [v.clone() for v in other.data] def clone(self, name=None): """ :type name: str or None :rtype: Illumination """ data = [v.clone() for v in self.data] return Illumination(self.name if name is None else name, data, self.desc) @classmethod def load(cls, p_object): """:type p_object: dict""" data = [IlluminationData.load(data) for data in p_object[Illumination.data.key]] return cls(p_object[Illumination.name.key, data, p_object[Illumination.desc.key]]) def parse(self, p_object): """:type p_object: dict""" self.assign(Illumination.load(p_object)) event.listen(Illumination.__table__, "after_create", Generic.inheritance_trigger(Illumination)) class IlluminationData(Base): wavelength = Column(Float, nullable=False, precision=Precision.wavelength) intensity = Column(Float, nullable=False) illumination_id = Column(Integer, ForeignKey(Illumination.id), nullable=False) illumination = relationship(Illumination, backref=_create_backref("Illumination")) __table_args__ = ( UniqueConstraint(wavelength, illumination_id, name="duplicate wavelength values"), # ------------------------------------------------- CheckConstraint(intensity >= 0.0, name="intensity >= 0.0"), CheckConstraint(intensity <= 1.0, name="intensity <= 1.0") ) def __init__(self, wavelength, intensity): """ :type wavelength: float :type intensity: float """ super(IlluminationData, self).__init__() self.wavelength = wavelength self.intensity = intensity def clone(self): """:rtype: IlluminationData""" return IlluminationData(self.wavelength, self.intensity) def assign(self, other): """:type other: IlluminationData""" self.wavelength = other.wavelength self.intensity = other.intensity @classmethod def load(cls, p_object): """:type p_object: dict""" return cls( wavelength=p_object[IlluminationData.wavelength.key], intensity=p_object[IlluminationData.intensity.key]) def parse(self, p_object): """:type p_object: dict""" self.assign(IlluminationData.load(p_object)) class Polarization(Generic, StandardObject): icon = hybrid_property(lambda cls: "icons/Material") id = Column(Integer, ForeignKey(Generic.id), primary_key=True) data = _create_relationship("Polarization") __mapper_args__ = {"polymorphic_identity": GenericType.Polarization} def __init__(self, name, data, desc=None): """:type data: list of PolarizationData""" super(Polarization, self).__init__(name, desc) self.data = data def assign(self, other): """:type other: Polarization""" super(Polarization, self).assign(other) self.data = [v.clone() for v in other.data] def clone(self, name=None): """ :type name: str or None :rtype: Polarization """ data = [v.clone() for v in self.data] return Polarization(self.name if name is None else name, data, self.desc) @classmethod def load(cls, p_object): """:type p_object: dict""" data = [PolarizationData.load(data) for data in p_object[Polarization.data.key]] return cls(p_object[Polarization.name.key, data, p_object[Polarization.desc.key]]) def parse(self, p_object): """:type p_object: dict""" self.assign(Polarization.load(p_object)) event.listen(Polarization.__table__, "after_create", Generic.inheritance_trigger(Polarization)) class PolarizationData(Base): x = Column(Float, nullable=False) y = Column(Float, nullable=False) degree = Column(Float, nullable=False) angle = Column(Float, nullable=False) ellipticity = Column(Float, nullable=False) polarization_id = Column(Integer, ForeignKey(Polarization.id), nullable=False) polarization = relationship(Polarization, backref=_create_backref("Polarization")) __table_args__ = ( UniqueConstraint(x, y, polarization_id, name="duplicate x, y values"), # ------------------------------------------------- CheckConstraint(x >= -1.0, name="x must be >= -1.0"), CheckConstraint(x <= 1.0, name="x must be <= 1.0"), # ------------------------------------------------- CheckConstraint(y >= -1.0, name="y must be >= -1.0"), CheckConstraint(y <= 1.0, name="y must be <= 1.0"), # ------------------------------------------------- CheckConstraint(degree >= 0.0, name="degree must be >= -1.0"), CheckConstraint(degree <= 1.0, name="degree must be <= 1.0"), # ------------------------------------------------- CheckConstraint(angle >= -180.0, name="angle must be >= -180.0"), CheckConstraint(angle <= 180.0, name="angle must be <= 180.0"), # ------------------------------------------------- CheckConstraint(ellipticity >= -1.0, name="ellipticity must be >= -1.0"), CheckConstraint(ellipticity <= 1.0, name="ellipticity must be <= 1.0"), ) def __init__(self, x, y, degree, angle, ellipticity): """ :type x: float :type y: float :type degree: float :type angle: float :type ellipticity: float """ super(PolarizationData, self).__init__() self.x = x self.y = y self.degree = degree self.angle = angle self.ellipticity = ellipticity def clone(self): """:rtype: PolarizationData""" return PolarizationData(self.x, self.y, self.degree, self.angle, self.ellipticity) def assign(self, other): """:type other: PolarizationData""" self.x = other.x self.y = other.y self.degree = other.degree self.angle = other.angle self.ellipticity = other.ellipticity @classmethod def load(cls, p_object): """:type p_object: dict""" return cls( x=p_object[PolarizationData.x.key], y=p_object[PolarizationData.y.key], degree=p_object[PolarizationData.degree.key], angle=p_object[PolarizationData.angle.key], ellipticity=p_object[PolarizationData.ellipticity.key]) def parse(self, p_object): """:type p_object: dict""" self.assign(PolarizationData.load(p_object)) class TemperatureProfile(Generic, StandardObject): icon = hybrid_property(lambda cls: "icons/Material") id = Column(Integer, ForeignKey(Generic.id), primary_key=True) data = _create_relationship("TemperatureProfile") __mapper_args__ = {"polymorphic_identity": GenericType.TemperatureProfile} def __init__(self, name, data, desc=None): """:type data: list of TemperatureProfileData""" super(TemperatureProfile, self).__init__(name, desc) self.data = data def assign(self, other): """:type other: TemperatureProfile""" super(TemperatureProfile, self).assign(other) self.data = [v.clone() for v in other.data] def clone(self, name=None): """ :type name: str or None :rtype: TemperatureProfile """ data = [v.clone() for v in self.data] return TemperatureProfile(self.name if name is None else name, data, self.desc) @classmethod def load(cls, p_object): """:type p_object: dict""" data = [TemperatureProfileData.load(data) for data in p_object[TemperatureProfile.data.key]] return cls(p_object[TemperatureProfile.name.key, data, p_object[TemperatureProfile.desc.key]]) def parse(self, p_object): """:type p_object: dict""" self.assign(TemperatureProfile.load(p_object)) event.listen(TemperatureProfile.__table__, "after_create", Generic.inheritance_trigger(TemperatureProfile)) class TemperatureProfileData(Base): time = Column(Float, nullable=False) temperature = Column(Float, nullable=False) temperature_profile_id = Column(Integer, ForeignKey(TemperatureProfile.id), nullable=False) temperature_profile = relationship(TemperatureProfile, backref=_create_backref("TemperatureProfile")) __table_args__ = ( # UniqueConstraint(time, temperature_profile_id, name="duplicate time values"), CheckConstraint(temperature >= physc.T0, name="temperature must be >= %s C" % physc.T0), ) def __init__(self, time, temperature): """ :type time: float :type temperature: float """ super(TemperatureProfileData, self).__init__() self.time = time self.temperature = temperature def clone(self): """:rtype: TemperatureProfileData""" return TemperatureProfileData(self.time, self.temperature) def assign(self, other): """:type other: TemperatureProfileData""" self.time = other.time self.temperature = other.temperature @classmethod def load(cls, p_object): """:type p_object: dict""" return cls( time=p_object[TemperatureProfileData.time.key], temperature=p_object[TemperatureProfileData.temperature.key]) def parse(self, p_object): """:type p_object: dict""" self.assign(TemperatureProfileData.load(p_object)) class Geometry(Base): shape = Column(GeometryShape.db_type(), nullable=False) type = Column(GeometryObjectType.db_type(), nullable=False) points = relationship("Point", order_by="Point.ord", cascade="all, delete, delete-orphan") __mapper_args__ = { "polymorphic_identity": GeometryObjectType.Geometry, "polymorphic_on": type } def __init__(self, shape, points): """ :type shape: str :type points: list of Point """ super(Geometry, self).__init__() self.shape = shape if points is not None: self.points = points for k, point in enumerate(self.points): point.ord = k def clone(self): """:rtype: Geometry""" return Geometry(shape=self.shape, points=[p.clone() for p in self.points]) def add(self, point): """:type point: Point""" point.ord = len(self.points) self.points.append(point) def __sub__(self, other): if isinstance(other, Point): return Geometry(shape=self.shape, points=[p - other for p in self.points]) return NotImplemented def __len__(self): return len(self.points) def __getitem__(self, item): return self.points[item] def __iter__(self): for point in self.points: yield point def convert2rect(self): """:rtype: Geometry or None""" if self.shape == GeometryShape.Rectangle: return self.clone() point_count = len(self.points) if point_count != 4: return None min_x = min(self.points, key=lambda p: p.x).x max_x = max(self.points, key=lambda p: p.x).x min_y = min(self.points, key=lambda p: p.y).y max_y = max(self.points, key=lambda p: p.y).y try: lb = filter(lambda p: p.x == min_x and p.y == min_y, self.points)[0] rt = filter(lambda p: p.x == max_x and p.y == max_y, self.points)[0] lt = filter(lambda p: p.x == min_x and p.y == max_y, self.points)[0] rb = filter(lambda p: p.x == max_x and p.y == min_y, self.points)[0] except IndexError: return None if lb.x == lt.x and rt.x == rb.x and lb.y == rb.y and lt.y == rt.y: return Geometry(shape=GeometryShape.Rectangle, points=[lb, rt]) return None def convert2poly(self): if self.shape == GeometryShape.Polygon: return self.clone() elif self.shape == GeometryShape.Rectangle: lb = self.points[0] rt = self.points[1] # Check if one dimension region if lb.x == rt.x or lb.y == rt.y: return self.clone() points = [Point(lb.x, lb.y), Point(rt.x, lb.y), Point(rt.x, rt.y), Point(lb.x, rt.y)] return Geometry(shape=GeometryShape.Polygon, points=points) else: raise RuntimeError("Unknown geometry type") def is_rect(self): return self.convert2rect() is not None @classmethod def load(cls, p_object): shape = getattr(GeometryShape, str(p_object[Geometry.shape.key])) points = [Point.load(point_data) for point_data in p_object[Geometry.points.key]] return cls(shape, points) def assign(self, other): """:type other: Geometry""" if self.type != other.type: raise RuntimeError("Assign of Geometry objects with different types (%s, %s)" % (self.type, other.type)) self.shape = other.shape self.points = [point.clone() for point in other.points] def export(self): return { Geometry.shape.key: str(self.shape), Geometry.points.key: [point.export() for point in self.points] } @classmethod def rectangle(cls, left, bottom, right, top): """ :type left: float :type bottom: float :type right: float :type top: float """ return cls(GeometryShape.Rectangle, [Point(left, bottom), Point(right, top)]) @classmethod def polygon(cls, points): """ :type points: list[tuple[float]] """ return cls(GeometryShape.Polygon, [Point(*coords) for k, coords in enumerate(points)]) class Point(Base): x = Column(Integer, nullable=False) y = Column(Integer, nullable=False) ord = Column(Integer, nullable=False) geometry_id = Column(Integer, ForeignKey(Geometry.id), nullable=False) def __init__(self, x, y): """ :type x: float :type y: float """ super(Point, self).__init__() self.x = x self.y = y def __add__(self, other): if isinstance(other, float) or isinstance(other, int): return Point(self.x + other, self.y + other) elif isinstance(other, Point): return Point(self.x + other.x, self.y + other.y) return NotImplemented def __sub__(self, other): if isinstance(other, float) or isinstance(other, int): return Point(self.x - other, self.y - other) elif isinstance(other, Point): return Point(self.x - other.x, self.y - other.y) return NotImplemented def __mul__(self, other): if isinstance(other, float) or isinstance(other, int): return Point(self.x * other, self.y * other) return NotImplemented def __rmul__(self, other): if isinstance(other, float) or isinstance(other, int): return Point(other * self.x, other * self.y) return NotImplemented def __div__(self, other): if isinstance(other, float) or isinstance(other, int): return Point(self.x / other, self.y / other) return NotImplemented def __str__(self): return "Point(%f, %f)" % (self.x, self.y) def __iter__(self): return iter([self.x, self.y]) def inside(self, polygon): if polygon.type == GeometryShape.Polygon: return point_inside_polygon(self, polygon) elif polygon.type == GeometryShape.Rectangle: return polygon.points[0].x <= self.x <= polygon.points[1].x and \ polygon.points[0].y <= self.y <= polygon.points[1].y else: raise RuntimeError("Unknown polygon shape type") @classmethod def load(cls, p_object): return cls(float(p_object[Point.x.key]), float(p_object[Point.y.key])) def export(self): return {Point.x.key: self.x, Point.y.key: self.y} def clone(self): """:rtype: Point""" return Point(self.x, self.y) class Mask(Generic, StandardObject): DB_MASK_DIMENSIONS_COUNT = 2 icon = hybrid_property(lambda cls: "icons/Mask") id = Column(Integer, ForeignKey(Generic.id), primary_key=True) boundary_id = Column(Integer, ForeignKey(Geometry.id), nullable=False, unique=True) boundary = relationship(Geometry, foreign_keys=[boundary_id]) sim_region_id = Column(Integer, ForeignKey(Geometry.id), nullable=False, unique=True) sim_region = relationship(Geometry, foreign_keys=[sim_region_id]) regions = relationship( "Region", order_by="Region.id", cascade="all, delete, delete-orphan", foreign_keys="[Region.mask_id]") background = Column(Float, nullable=False) phase = Column(Float, nullable=False) clean = Column(Boolean, nullable=False) __mapper_args__ = {"polymorphic_identity": GenericType.Mask} __table_args__ = ( CheckConstraint(background >= 0.0, name="background transmittance must be >= 0.0"), CheckConstraint(background <= 1.0, name="background transmittance must be <= 1.0"), # ------------------------------------------------- CheckConstraint(phase >= -180.0, name="phase must be >= -180.0"), CheckConstraint(phase <= 180.0, name="phase must be <= 180.0") ) def __init__(self, name, background, phase, boundary, sim_region, regions=None, clean=True, desc=None): """ :type name: str :type background: float :type phase: float :type boundary: Geometry :type sim_region: Geometry :type regions: list of Region :type clean: bool :type desc: str """ super(Mask, self).__init__(name, desc) self.background = background self.phase = phase self.boundary = boundary self.sim_region = sim_region self.clean = clean if regions is not None: self.regions = regions def add_region(self, region): """:type region: Region""" self.regions.append(region) self.clean = False def clone(self, name=None): """:rtype: MaskDatabase""" return Mask( name=self.name if name is None else name, desc=self.desc, background=self.background, phase=self.phase, boundary=self.boundary.clone(), sim_region=self.sim_region.clone(), regions=[v.clone() for v in self.regions], clean=self.clean) @property def dimensions(self): return Mask.DB_MASK_DIMENSIONS_COUNT # Compatibility with ConcretePluginMask @property def variables(self): return [] def gds(self, stream): gds_lib = gdsii.library.Library(version=600, physical_unit=1.0E-9, logical_unit=0.001, name="DB") top_cell = gdsii.structure.Structure(self.name) for region in self.regions: try: layer, datatype = config.GdsLayerMapping.get_layer(region.transmittance, region.phase) except (KeyError, ValueError): return False points = [np.array([p.x, p.y]) for p in region.points] polygon = gdsii.elements.Boundary(xy=points, layer=layer, data_type=datatype) top_cell.append(polygon) bnd = self.boundary points = [np.array([bnd[0].x, bnd[0].y]), np.array([bnd[0].x, bnd[1].y]), np.array([bnd[1].x, bnd[1].y]), np.array([bnd[1].x, bnd[0].y])] layer, datatype = config.GdsLayerMapping.boundary_layer() boundary = gdsii.elements.Boundary(xy=points, layer=layer, data_type=datatype) top_cell.append(boundary) gds_lib.append(top_cell) gds_lib.save(stream) return True def export(self): """:rtype: dict""" result = super(Mask, self).export() result.update({ Mask.background.key: self.background, Mask.phase.key: self.phase, Mask.boundary.key: self.boundary.export(), Mask.sim_region.key: self.sim_region.export(), Mask.clean.key: self.clean, Mask.regions.key: [region.export() for region in self.regions] }) return result def assign(self, other): """:type other: Mask""" super(Mask, self).assign(other) self.background = other.background self.phase = other.phase self.sim_region.assign(other.sim_region) self.boundary.assign(other.boundary) self.clean = other.clean self.regions = [region.clone() for region in other.regions] @classmethod def load(cls, p_object): """:type p_object: dict""" return cls( name=str(p_object[Mask.name.key]), desc=str(p_object[Mask.desc.key]), background=float(p_object[Mask.background.key]), phase=float(p_object[Mask.phase.key]), boundary=Geometry.load(p_object[Mask.boundary.key]), sim_region=Geometry.load(p_object[Mask.sim_region.key]), clean=bool(p_object[Mask.clean.key]), regions=[Region.load(region_data) for region_data in p_object[Mask.regions.key]], ) def parse(self, p_object): self.assign(Mask.load(p_object)) event.listen(Mask.__table__, "after_create", Generic.inheritance_trigger(Mask)) class Region(Geometry): id = Column(Integer, ForeignKey(Geometry.id), primary_key=True) # Self fields transmittance = Column(Float, nullable=False) phase = Column(Float, nullable=False) __table_args__ = ( CheckConstraint(transmittance >= 0.0), CheckConstraint(transmittance <= 1.0), CheckConstraint(phase >= -180.0), CheckConstraint(phase <= 180.0) ) __mapper_args__ = {"polymorphic_identity": GeometryObjectType.Region} # Reference to the mask data mask_id = Column(Integer, ForeignKey(Mask.id), nullable=False) def __init__(self, transmittance, phase, shape, points=None): """ :type transmittance: float :type phase: float :type shape: str :type points: list of Point or None """ super(Region, self).__init__(shape, points) self.transmittance = transmittance self.phase = phase def export(self): result = super(Region, self).export() result.update({ Region.transmittance.key: self.transmittance, Region.phase.key: self.phase, }) return result @classmethod def load(cls, p_object): transmittance = float(p_object[Region.transmittance.key]) phase = float(p_object[Region.phase.key]) shape = getattr(GeometryShape, str(p_object[Geometry.shape.key])) points = [Point.load(point_data) for point_data in p_object[Geometry.points.key]] return cls(transmittance, phase, shape, points) def clone(self): """:rtype: Region""" points = [v.clone() for v in self.points] return Region(self.transmittance, self.phase, self.shape, points) class ConcretePluginMask(ConcretePluginCommon): SignalsClass = SignalsMeta.CreateSignalsClass("ConcretePluginMask", ["background", "phase"], db_columns=False) def __init__(self, abstract, values=None): """ :type abstract: orm.AbstractPluginMask :type values: list of float """ super(ConcretePluginMask, self).__init__(abstract, values) self.__mask_struct = pcpi.mask_t() self._base.regenerate(self.__mask_struct, *self.values) self.__transmittance = self.__mask_struct.boundary.transmittance self.__phase = self.__mask_struct.boundary.phase dimensions = property(lambda self: self._base.dims) @property def boundary(self): self._base.regenerate(self.__mask_struct, *self.values) self.__mask_struct.boundary.transmittance = self.__transmittance self.__mask_struct.boundary.phase = self.__phase points = self.__mask_struct.boundary.points if self._base.dims == 1: boundary = Geometry.rectangle(points[0].x, points[0].y, points[1].x, points[1].y) else: boundary = Geometry.rectangle(points[0].x, points[0].y, points[2].x, points[2].y) return boundary @property def regions(self): self._base.regenerate(self.__mask_struct, *self.values) self.__mask_struct.boundary.transmittance = self.__transmittance self.__mask_struct.boundary.phase = self.__phase # Returns regions generator for k in xrange(self.__mask_struct.regions_count): r = self.__mask_struct.regions[k] yield Region( transmittance=r.transmittance, phase=r.phase, shape=GeometryShape.Polygon, points=[Point(r.points[k].x, r.points[k].y) for k in xrange(r.length)]) def _get_background(self): return self.__mask_struct.boundary.transmittance def _set_background(self, value): if self.__mask_struct.boundary.transmittance != value: self.__mask_struct.boundary.transmittance = self.__transmittance = value self.signals[ConcretePluginMask.background].emit() def _get_phase(self): return self.__mask_struct.boundary.phase def _set_phase(self, value): if self.__mask_struct.boundary.phase != value: self.__mask_struct.boundary.phase = self.__phase = value self.signals[ConcretePluginMask.phase].emit() background = AttributedProperty(_get_background, _set_background, key="background", dtype=Float) phase = AttributedProperty(_get_phase, _set_phase, key="phase", dtype=Float) def export(self): result = self._base.export() result.update(super(ConcretePluginMask, self).export()) result.update({ ConcretePluginMask.background.key: self.background, ConcretePluginMask.phase.key: self.phase, }) return result @classmethod def load(cls, p_object, abstract=None): """:type p_object: dict""" abstract_base = AbstractPluginMask.load(p_object) result = super(ConcretePluginMask, cls).load(p_object, abstract_base) result.background = p_object[ConcretePluginMask.background.key] result.phase = p_object[ConcretePluginMask.phase.key] return result def clone(self): result = super(ConcretePluginMask, self).clone() result.background = self.background result.phase = self.phase return result class AbstractPluginMask(Generic, PluginObject): icon = hybrid_property(lambda cls: "icons/Numerics") cpi = pcpi.mask_plugin_t id = Column(Integer, ForeignKey(Generic.id), primary_key=True) dims = Column(Integer, nullable=False) prms = relationship( "AbstractPluginMaskPrm", order_by="AbstractPluginMaskPrm.ord", cascade="all, delete, delete-orphan") __mapper_args__ = {"polymorphic_identity": GenericType.AbstractPluginMask} def __init__(self, name, prms, dims, desc=None): """ :param str name: Mask plugin name :param list of AbstractPluginMaskPrm prms: Parameters descriptors of the mask plugin :param int dims: 1 or 2 dimensions mask :param str or None desc: Description of the plugin """ super(AbstractPluginMask, self).__init__(name, desc) self.prms = prms self.dims = dims self._mask_entry = None """:type: mask_plugin_t""" def produce(self, values=None): """ :type values: list of float :rtype: ConcretePluginMask """ return ConcretePluginMask(self, values) @property def entry(self): """:rtype: mask_t""" if not hasattr(self, "_mask_entry") or self._mask_entry is None: self._mask_entry = pcpi.PLUGIN_REGISTRY.get_by_id(self.id).entry return self._mask_entry def regenerate(self, mask_struct, *values): """:type mask_struct: pcpi.mask_t""" array = ctypes.c_double * len(self.prms) # noinspection PyCallingNonCallable if self.entry.create(ctypes.byref(mask_struct), array(*values)): raise RuntimeError("Error during plugin mask regeneration") def assign(self, other): raise NotImplementedError(METHOD_NONE_IMPLEMENTED) def clone(self, name=None): """ :type name: str or None :rtype: AbstractPluginMask """ if name is not None: raise NotImplementedError(METHOD_NONE_IMPLEMENTED) prms = [v.clone() for v in self.prms] return AbstractPluginMask(self.name, prms, self.mask_type, self.desc) @classmethod def load(cls, p_object): return pcpi.PLUGIN_REGISTRY.get_by_name(p_object[Generic.name.key]).record class AbstractPluginMaskPrm(AbstractPluginParameter, Base): name = Column(String, nullable=False) ord = Column(Integer, nullable=False) defv = Column(Float) max = Column(Float) min = Column(Float) plugin_mask_id = Column(Integer, ForeignKey(AbstractPluginMask.id, ondelete="CASCADE")) __table_args__ = ( UniqueConstraint(ord, plugin_mask_id, name="duplicate order arguments number"), # ------------------------------------------------- # TODO: Check parameters # CheckConstraint(defv > min, "default value must greater than min values"), # CheckConstraint(defv < max, "default value must lower than max values"), # CheckConstraint(max > min, name="max must be > min argument value"), ) class DeveloperInterface(Generic): icon = hybrid_property(lambda cls: "icons/Development") __text_type__ = "Abstract" id = Column(Integer, ForeignKey(Generic.id), primary_key=True) __mapper_args__ = {"polymorphic_identity": None} def __init__(self, name, desc): super(DeveloperInterface, self).__init__(name, desc) def rate(self, pac, depth): """ :type pac: numpy.ndarray or list of float :type depth: numpy.ndarray or list of float :rtype: numpy.ndarray """ raise NotImplementedError(METHOD_NONE_IMPLEMENTED) def assign(self, other): """:type other: DeveloperInterface""" if not DeveloperInterface in self.__class__.mro(): raise NotImplementedError(METHOD_NONE_IMPLEMENTED) super(DeveloperInterface, self).assign(other) def clone(self, name=None): """ :type name: str :rtype: DeveloperInterface """ if not DeveloperInterface in self.__class__.mro(): raise NotImplementedError(METHOD_NONE_IMPLEMENTED) return super(DeveloperInterface, self).clone() def __str__(self): return "%s [%s]" % (self.name, self.__text_type__) @classmethod def load(cls, p_object): """:type p_object: dict""" if p_object[DeveloperInterface.type.key] == str(GenericType.DeveloperExpr): return DeveloperExpr.load(p_object) elif p_object[DeveloperInterface.type.key] == str(GenericType.DeveloperSheet): return DeveloperSheet.load(p_object) else: raise UnknownObjectTypeError(p_object[DeveloperInterface.type.key]) def parse(self, p_object): """:type p_object: dict""" self.assign(type(self).load(p_object)) def convert2core(self): raise NotImplementedError(METHOD_NONE_IMPLEMENTED) class Resist(Generic, StandardObject, DeleteHook): icon = hybrid_property(lambda cls: "icons/Resist") id = Column(Integer, ForeignKey(Generic.id), primary_key=True) # Compare with ExposureParameter and PebParameters where foreign keys not in resist table developer must be in # resist table because for one developer several resist may exists. But for Exposure and PEB connection is one-one. # Also it's simpler to delete orphan exposure and peb parameter only using DB level (ON DELETE CASCADE) developer_id = Column(Integer, ForeignKey(DeveloperInterface.id)) developer = relationship(DeveloperInterface, foreign_keys=[developer_id]) """:type: DeveloperInterface""" exposure = relationship("ExposureParameters", cascade="all, delete-orphan", uselist=False) """:type: ExposureParameters""" peb = relationship("PebParameters", cascade="all, delete-orphan", uselist=False) """:type: PebParameters""" __mapper_args__ = {"polymorphic_identity": GenericType.Resist} def __init__(self, name, comment, exposure, peb, developer): """ :type name: str :type comment: str :type exposure: ExposureParameters :type peb: PebParameters :type developer: DeveloperInterface """ super(Resist, self).__init__(name, comment) self.exposure = exposure self.peb = peb self.developer = developer def on_delete(self, session): """ :type session: Session :return: Query of the objects to being delete :rtype: Query """ # Select only deleted and temporary development expression condition = and_(DeveloperExpr.id == self.developer_id, DeveloperExpr.temporary == 1) return session.query(DeveloperExpr).filter(condition) def assign(self, other, developer=None): """ :type other: Resist :type developer: DeveloperInterface """ super(Resist, self).assign(other) self.developer = other.developer if developer is None else developer self.exposure.assign(other.exposure) self.peb.assign(other.peb) def clone(self, name=None, developer=None): """ :type name: str :type developer: DeveloperInterface :rtype: Resist """ exposure = self.exposure.clone() peb = self.peb.clone() if developer is None: if isinstance(self.developer, DeveloperExpr): developer = self.developer.clone() elif isinstance(self.developer, DeveloperSheet): developer = self.developer elif self.developer is None: developer = None else: raise TypeError("Unknown developer %s type: %s" % (self.developer.name, type(self.developer).__name__)) name = self.name if name is None else name return Resist(name, self.desc, exposure, peb, developer) def export(self): result = super(Resist, self).export() result.update({ Resist.exposure.key: self.exposure.export(), Resist.peb.key: self.peb.export(), Resist.developer.key: self.developer.export() }) return result @classmethod def load(cls, p_object): """:type p_object: dict""" return cls( name=p_object[Resist.name.key], comment=p_object[Resist.desc.key], exposure=ExposureParameters.load(p_object[Resist.exposure.key]), peb=PebParameters.load(p_object[Resist.peb.key]), developer=DeveloperInterface.load(p_object[Resist.developer.key])) def parse(self, p_object): """:type p_object: dict""" self.assign(Resist.load(p_object)) event.listen(Resist.__table__, "after_create", Generic.inheritance_trigger(Resist)) class ExposureParameters(Base): name = "Exposure Parameters" resist_id = Column(Integer, ForeignKey(Resist.id, ondelete="CASCADE"), unique=True, nullable=False) wavelength = Column(Float, nullable=False, precision=Precision.wavelength) a = Column(Float, nullable=False, precision=Precision.dill) b = Column(Float, nullable=False, precision=Precision.dill) c = Column(Float, nullable=False, precision=Precision.dill) n = Column(Float, nullable=False, precision=Precision.refractive_index) __table_args__ = ( CheckConstraint(wavelength >= 0.0, name="Wavelength must be >= 0.0"), CheckConstraint(a >= 0.0, name="Dill A must be >= 0.0"), CheckConstraint(b >= 0.0, name="Dill B must be >= 0.0"), CheckConstraint(c >= 0.0, name="Dill C must be >= 0.0"), CheckConstraint(n >= 0.0, name="Unexposed n must be >= 0.0"), ) def __init__(self, wavelength, a, b, c, n): """ :param float wavelength: Wavelength at which resist was calibrated :param float a: Exposure Dill ABC model parameter A :param float b: Exposure Dill ABC model parameter B :param float c: Exposure Dill ABC model parameter C :param float n: Real part of refractive index of unexposed resist """ super(ExposureParameters, self).__init__() self.wavelength = wavelength self.a = a self.b = b self.c = c self.n = n def assign(self, other): """:type other: ExposureParameters""" self.wavelength = other.wavelength self.a = other.a self.b = other.b self.c = other.c self.n = other.n def clone(self): """:rtype: ExposureParameters""" return ExposureParameters(self.wavelength, self.a, self.b, self.c, self.n) def export(self): return { ExposureParameters.wavelength.key: self.wavelength, ExposureParameters.a.key: self.a, ExposureParameters.b.key: self.b, ExposureParameters.c.key: self.c, ExposureParameters.n.key: self.n } @classmethod def load(cls, p_object): """:type p_object: dict""" return cls( wavelength=p_object[ExposureParameters.wavelength.key], a=p_object[ExposureParameters.a.key], b=p_object[ExposureParameters.b.key], c=p_object[ExposureParameters.c.key], n=p_object[ExposureParameters.n.key]) def parse(self, p_object): """:type p_object: dict""" self.assign(ExposureParameters.load(p_object)) def convert2core(self): return oplc.ExposureResistModel(self.wavelength, self.a, self.b, self.c, self.n) class PebParameters(Base): name = "PEB Parameters" resist_id = Column(Integer, ForeignKey(Resist.id, ondelete="CASCADE"), unique=True, nullable=False) ea = Column(Float, nullable=False, precision=3) ln_ar = Column(Float, nullable=False, precision=3) def __init__(self, ea, ln_ar): """ :type ea: float :type ln_ar: float """ super(PebParameters, self).__init__() self.ea = ea self.ln_ar = ln_ar def diffusivity(self, temp): """ Calculate diffusivity for graph display. Note: Real sigma to PEB convolution should be calculated using: sqrt(2*kt*time), where kt is the result of this function. :param float or list of float or numpy.ndarray temp: Temperature in C :rtype: float """ if isinstance(temp, list): temp = np.array(temp, dtype=float) tempk = temp - physc.T0 return np.exp(self.ln_ar - self.ea/(physc.R*tempk)) def diffusion_length(self, temp, time): """ :type temp: float :type time: float """ return np.sqrt(2*self.diffusivity(temp)*time) def assign(self, other): """:type other: PebParameters""" self.ln_ar = other.ln_ar self.ea = other.ea def clone(self): """:rtype: PebParameters""" return PebParameters(self.ea, self.ln_ar) def export(self): return { PebParameters.ea.key: self.ea, PebParameters.ln_ar.key: self.ln_ar } @classmethod def load(cls, p_object): """:type p_object: dict""" return cls( ea=p_object[PebParameters.ea.key], ln_ar=p_object[PebParameters.ln_ar.key]) def parse(self, p_object): """:type p_object: dict""" self.assign(ExposureParameters.load(p_object)) def convert2core(self): return oplc.PebResistModel(self.ea, self.ln_ar) class DeveloperSheet(DeveloperInterface, StandardObject): id = Column(Integer, ForeignKey(DeveloperInterface.id), primary_key=True) is_depth = Column(Boolean, nullable=False) data = relationship("DeveloperSheetData", order_by="DeveloperSheetData.pac", cascade="all, delete-orphan") __text_type__ = "Sheet" __mapper_args__ = {"polymorphic_identity": GenericType.DeveloperSheet} def __init__(self, name, is_depth, data, desc=None): """ :type name: str :type is_depth: bool :type data: list of DeveloperSheetData """ super(DeveloperSheet, self).__init__(name, desc) self.is_depth = is_depth self.data = data def rate(self, pac=None, depth=None): """ :type pac: numpy.ndarray or list of float or None :type depth: numpy.ndarray or list of float or None :rtype: numpy.ndarray """ native_xy = True pacs, depths, rates = [], [], [] for item in self.data: pacs.append(item.pac) depths.append(item.depth if self.is_depth else 0.0) rates.append(item.rate) if pac is None or depth is None: pac = np.unique(np.array(pacs)) depth = np.unique(np.array(depths)) else: native_xy = False if not self.is_depth: if callable(depth) and (depth is max or depth is min): depth = np.zeros([1, 1]) else: depth = np.zeros(len(depth)) else: if callable(depth) and (depth is max or depth is min): depth = np.array(depth(self.data, key=lambda v: v.depth).depth) else: depth = np.array(depth) pac = np.array(pac) if len(depth) > 1: # This shit: y[:, None] - is transpose result = griddata((pacs, depths), rates, (pac[None, :], depth[:, None]), method='linear', fill_value=0.0) else: depth_cond = np.where(np.asarray(depths) == depth[0]) pacs = np.asarray(pacs)[depth_cond] rates = np.asarray(rates)[depth_cond] result = np.ndarray([len(pac), 1]) result[:, 0] = interp1d(pacs, rates)(pac) if native_xy: return pac, depth, result return result def assign(self, other): """:type other: DeveloperSheet""" super(DeveloperSheet, self).assign(other) self.is_depth = other.is_depth self.data = [v.clone() for v in other.data] def clone(self, name=None): """:rtype: DeveloperSheet""" name = self.name if name is None else name data = [v.clone() for v in self.data] return DeveloperSheet(name, self.is_depth, data, self.desc) def export(self): result = super(DeveloperSheet, self).export() result.update({ DeveloperSheet.is_depth.key: self.is_depth, DeveloperSheet.data.key: [data.export() for data in self.data] }) return result @classmethod def load(cls, p_object): """:type p_object: dict""" data = [DeveloperSheetData.load(data) for data in p_object[DeveloperSheet.data.key]] return cls( name=p_object[DeveloperSheet.name.key], desc=p_object[DeveloperSheet.desc.key], is_depth=p_object[DeveloperSheet.is_depth.key], data=data) def convert2core(self): if self.is_depth: pac, depth, values = self.rate() return oplc.ResistRateModelDepthSheet(pac, depth, np.asfortranarray(values)) else: pac, _, values = self.rate() return oplc.ResistRateModelSheet(pac, values[:, 0]) event.listen(DeveloperSheet.__table__, "after_create", Generic.inheritance_trigger(DeveloperSheet)) _dev_rate_depth_dependency = DDL(""" CREATE TRIGGER dev_rate_depth_dependency BEFORE INSERT ON DeveloperSheetData FOR EACH ROW WHEN ( CASE EXISTS ( SELECT NULL FROM DeveloperSheet WHERE DeveloperSheet.id == new.developer_sheet_id AND DeveloperSheet.is_depth == 1 ) WHEN 1 THEN new.depth IS NULL ELSE new.depth IS NOT NULL END ) BEGIN SELECT RAISE( ABORT, 'Development rate depth dependency failed' ); END;""") class DeveloperSheetData(Base): pac = Column(Float, nullable=False) rate = Column(Float, nullable=False) # in nm/s depth = Column(Float) developer_sheet_id = Column(Integer, ForeignKey(DeveloperSheet.id, ondelete="CASCADE"), nullable=False) __table_args__ = ( UniqueConstraint(pac, depth, developer_sheet_id, name="duplicate PAC, depth values"), # ------------------------------------------------- CheckConstraint(pac >= 0.0, name="PAC must be >= 0.0"), CheckConstraint(pac <= 1.0, name="PAC must be <= 1.0"), # ------------------------------------------------- CheckConstraint(rate >= 0.0, name="developer rate must be >= 0.0"), ) def __init__(self, pac, rate, depth=None): super(DeveloperSheetData, self).__init__() self.pac = float(pac) self.rate = float(rate) self.depth = float(depth) if depth is not None else None def clone(self): """:rtype: DeveloperSheetData""" return DeveloperSheetData(self.pac, self.rate, self.depth) def export(self): return { DeveloperSheetData.pac.key: self.pac, DeveloperSheetData.rate.key: self.rate, DeveloperSheetData.depth.key: self.depth } @classmethod def load(cls, p_object): """:type p_object: dict""" return cls( pac=p_object[DeveloperSheetData.pac.key], rate=p_object[DeveloperSheetData.rate.key], depth=p_object[DeveloperSheetData.depth.key]) def parse(self, p_object): """:type p_object: dict""" self.assign(DeveloperSheetData.load(p_object)) # CREATE TRIGGER dev_rate_depth_dependency event.listen(DeveloperSheetData.__table__, "after_create", _dev_rate_depth_dependency) class DevelopmentModel(Generic, PluginObject): icon = hybrid_property(lambda cls: "icons/Numerics") cpi = pcpi.dev_model_t id = Column(Integer, ForeignKey(Generic.id), primary_key=True) prolith_id = Column(Integer, unique=True) args = relationship("DevelopmentModelArg", order_by="DevelopmentModelArg.ord") __mapper_args__ = {"polymorphic_identity": GenericType.DevelopmentModel} def __init__(self, name, args, desc=None, prolith_id=None): """ :param str name: Development model name :param list of DevelopmentModelArg args: Arguments descriptors of the model :param str or None desc: Description of the model :param int or None prolith_id: Prolith development model identifier (to link model with it's standard models) """ super(DevelopmentModel, self).__init__(name, desc) self.args = args self.prolith_id = prolith_id self._rate_entry = None @property def entry(self): if not hasattr(self, "_rate_entry") or self._rate_entry is None: self._rate_entry = pcpi.PLUGIN_REGISTRY.get_by_id(self.id).entry return self._rate_entry def calc(self, pac, depth, *values): array = ctypes.c_double * len(self.args) # noinspection PyTypeChecker,PyCallingNonCallable return self.entry.expr(pac, depth, array(*values)) def assign(self, other): raise NotImplementedError(METHOD_NONE_IMPLEMENTED) def clone(self, name=None): """ :type name: str or None :rtype: DevelopmentModel """ if name is not None: raise NotImplementedError(METHOD_NONE_IMPLEMENTED) args = [v.clone() for v in self.args] return DevelopmentModel(self.name, args, self.desc, self.prolith_id) class DevelopmentModelArg(AbstractPluginParameter, Base): name = Column(String, nullable=False) ord = Column(Integer, nullable=False) defv = Column(Float) max = Column(Float) min = Column(Float) development_model_id = Column(Integer, ForeignKey(DevelopmentModel.id, ondelete="CASCADE")) __table_args__ = ( UniqueConstraint(ord, development_model_id, name="duplicate order arguments number"), # ------------------------------------------------- # TODO: Check parameters # CheckConstraint(defv > min, "default value must greater than min values"), # CheckConstraint(defv < max, "default value must lower than max values"), # CheckConstraint(max > min, name="max must be > min argument value"), ) class DeveloperExpr(DeveloperInterface, StandardObject): id = Column(Integer, ForeignKey(DeveloperInterface.id), primary_key=True) model_id = Column(Integer, ForeignKey(DevelopmentModel.id, ondelete="CASCADE")) __text_type__ = "Expression" model = relationship(DevelopmentModel, foreign_keys=[model_id]) surface_rate = Column(Float, nullable=False) inhibition_depth = Column(Float, nullable=False) #TODO: Create trigger or other controller on this column (see description in __init__) temporary = Column(Boolean, nullable=False) #TODO: order_by object_values = relationship("DeveloperExprArgValue", cascade="all, delete-orphan") """:type: list of DeveloperExprArgValue""" values = association_proxy("object_values", "value") __mapper_args__ = {"polymorphic_identity": GenericType.DeveloperExpr} def __init__(self, name, model, values=None, surface_rate=1.0, inhibition_depth=10.0, desc=None, temporary=False): """ :param str name: Name of the developer model :param DevelopmentModel model: Definition of the model :param list of float values or None: Model argument values (if None then default will be used) :param float surface_rate: Relative surface rate :param float inhibition_depth: Inhibition depth (nm) :param str desc: Description of the model :param bool temporary: If this parameter is True - then Developer will be deleted as soon as according resist removed. Also in this case only one resist can be linked with this Developer """ super(DeveloperExpr, self).__init__(name, desc) self.model = model if values is None: values = [arg.default for arg in model.args] self.values = values self.surface_rate = surface_rate self.inhibition_depth = inhibition_depth self.temporary = temporary def rate(self, pac, depth): """ Return rates of the development model :param numpy.ndarray or list of float pac: Photo-active component concentration :param numpy.ndarray or list of float depth: Depth into resist :return: rate on pac-depth grid :rtype: numpy.ndarray """ result = np.ndarray([len(pac), len(depth)]) pac_depth = cartesian(pac, depth) rows = range(len(pac)) cols = range(len(depth)) rc = cartesian(rows, cols) for (r, c), (pac, depth) in zip(rc, pac_depth): result[r, c] = self.model.calc(pac, depth, *self.values) return result def change_model(self, model): """:type model: DevelopmentModel""" if self.model != model: self.model = model self.values = [arg.default for arg in model.args] logging.info("Set model %s to %s: %s" % (self.model, self.name, self.values)) def assign(self, other): """:type other: DeveloperExpr""" super(DeveloperExpr, self).assign(other) self.model = other.model self.surface_rate = other.surface_rate self.inhibition_depth = other.inhibition_depth self.temporary = other.temporary self.values = [float(v) for v in other.values] def clone(self, name=None): """:rtype: DeveloperExpr""" name = self.name if name is None else name values = [float(v) for v in self.values] return DeveloperExpr(name, self.model, values, self.surface_rate, self.inhibition_depth, self.desc, self.temporary) def export(self): result = super(DeveloperExpr, self).export() # noinspection PyUnresolvedReferences result.update({ DeveloperExpr.model.key: self.model.name, DeveloperExpr.surface_rate.key: self.surface_rate, DeveloperExpr.inhibition_depth.key: self.inhibition_depth, DeveloperExpr.temporary.key: self.temporary, DeveloperExpr.object_values.key: [float(v) for v in self.values] }) return result @classmethod def load(cls, p_object): """:type p_object: dict""" model = pcpi.PLUGIN_REGISTRY.get_by_name(p_object[DeveloperExpr.model.key]).record # noinspection PyUnresolvedReferences return cls( name=p_object[DeveloperExpr.name.key], desc=p_object[DeveloperExpr.desc.key], model=model, temporary=p_object[DeveloperExpr.temporary.key], surface_rate=p_object[DeveloperExpr.surface_rate.key], inhibition_depth=p_object[DeveloperExpr.inhibition_depth.key], values=p_object[DeveloperExpr.object_values.key]) def convert2core(self): return oplc.ResistRateModelExpression(self.model.entry.expr, self.values) event.listen(DeveloperExpr.__table__, "after_create", Generic.inheritance_trigger(DeveloperExpr)) class DeveloperExprArgValue(Base): value = Column(Float, nullable=False) development_model_arg_id = Column(Integer, ForeignKey(DevelopmentModelArg.id, ondelete="CASCADE"), unique=True) developer_expr_id = Column(Integer, ForeignKey(DeveloperExpr.id, ondelete="CASCADE")) __table_args__ = ( UniqueConstraint(development_model_arg_id, developer_expr_id, name="duplicate developer expression arguments"), ) def __init__(self, value): """:type value: float""" super(DeveloperExprArgValue, self).__init__() # TODO: development_model_arg_id is not fill because association_proxy field # (check whether this link is really required) self.value = value def clone(self): """:rtype: DeveloperExprArgValue""" return DeveloperExprArgValue(self.value) def assign(self, other): """:type other: DeveloperExprArgValue""" self.value = other.value @classmethod def load(cls, p_object): """:type p_object: float""" return cls(p_object) def parse(self, p_object): """:type p_object: float""" self.value = p_object class Info(Base): version = Column(Integer, nullable=False) appname = Column(String, nullable=False) created = Column(DateTime, nullable=False) def __init__(self, version): super(Info, self).__init__() self.version = version self.appname = APPLICATION_NAME self.created = datetime.datetime.now() def __str__(self): print self.appname, self.version, self.created return "%s DB v.%d created %s" % (self.appname, self.version, self.created) tables = Base.metadata.tables """:type: dict from str to Table""" def _enum_tables_of(base): """:rtype: __generator[Generic]""" for table_name in tables.keys(): table_class = globals().get(table_name, None) if table_class is not None and issubclass(table_class, base): yield table_class standard_tables = list(_enum_tables_of(StandardObject)) plugin_tables = list(_enum_tables_of(PluginObject)) def get_table_by_plugin(plugin): # noinspection PyUnresolvedReferences _tables = [table for table in plugin_tables if table.cpi.plugin_id == plugin.type] if not _tables: raise KeyError("Plugin table not found") elif len(_tables) > 1: raise RuntimeError("Tables count to one plugin must be == 1") return _tables[0] ================================================ FILE: OptolithiumGui/database/settings.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com __author__ = 'Alexei Gladkikh' class DummyProvider(object): def __init__(self, *args, **kwargs): pass def emit(self, *args, **kwargs): pass def connect(self, *args, **kwargs): pass try: from qt import Signal, QtCore _GUI_PROVIDER_OBJECT = QtCore.QObject _GUI_PROVIDER_SIGNAL = Signal except ImportError: Signal = None QObject = None _GUI_PROVIDER_OBJECT = DummyProvider _GUI_PROVIDER_SIGNAL = DummyProvider def set_gui_provider(object_class, signal_class): global _GUI_PROVIDER_OBJECT, _GUI_PROVIDER_SIGNAL _GUI_PROVIDER_OBJECT = object_class _GUI_PROVIDER_SIGNAL = signal_class def get_gui_provider_object(): return _GUI_PROVIDER_OBJECT def get_gui_provider_signal(): return _GUI_PROVIDER_SIGNAL ================================================ FILE: OptolithiumGui/helpers.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import abc import os import subprocess import threading import traceback import functools from Queue import Queue as StandardQueue from Queue import Empty as QueueEmpty import logging as module_logging import sys import itertools __author__ = 'Alexei Gladkikh' # noinspection PyPep8Naming def enableLoggersForHelperModule(): """ This function will be called after definition of enableStreamLogHandler and enableFileLogHandler. Use it to enable required logger handlers. """ logStreamEnable(logging) # -------------------------------------------------------------------------------------------------- # noinspection PyPep8Naming def GetFilename(path): """ Return file name without extension from input path :type path: str """ basename = os.path.basename(path) return os.path.splitext(basename)[0] logging = module_logging.getLogger(__name__) logging.setLevel(module_logging.INFO) fdevnull = open(os.devnull, 'w') # noinspection PyPep8Naming def Cast(value, type, default=None): """ Cast(value, type[, default]) -> value Try to cast value to specified type. If conversion can't be performed return default value. """ try: return type(value) except ValueError: if default is None: return default return type(default) # noinspection PyPep8Naming def StaticVariable(varname, value): def decorate(func): setattr(func, varname, value) return func return decorate # noinspection PyPep8Naming def Singleton(cls): """ Decorate specified class to make it correspond to singleton pattern. WARNING: In inheritance a class that also decorated by mean of this Singleton decorator you have to use old-style parent constructor, for example threading.Thread.__init__(self), otherwise TypeError exception occurred. :param cls: Decorated as singleton class :type cls: class :return: types.FunctionType """ # Static variable instances = {} def getInstance(*args, **kwargs): if cls not in instances: instances[cls] = cls(*args, **kwargs) return instances[cls] return getInstance # noinspection PyPep8Naming @StaticVariable("handler", None) @StaticVariable("loggers", []) def logStreamEnable(logger): """ Set format and enable stream logging for specified logger. :type logger: logging.Logger """ if logger not in logStreamEnable.loggers: # Lazy handler initialization if logStreamEnable.handler is None: log_hdlr = module_logging.StreamHandler(sys.stdout) formatter = module_logging.Formatter("%(levelname)-8s %(module)-12s" "[%(funcName)-18s:%(lineno)-4d]# %(message)s") log_hdlr.setFormatter(formatter) logStreamEnable.handler = log_hdlr logger.addHandler(logStreamEnable.handler) logStreamEnable.loggers.append(logger) logging.debug("Stream log handler enabled for logger %s" % logger.name) else: logging.warning("Stream log handler already enabled for logger %s" % logger.name) # This function must be defined at the head of helper module # where required logger must be initialized by mean of # enableStreamLogHandler and/or enableFileLogHandler enableLoggersForHelperModule() # noinspection PyPep8Naming class classproperty(property): # noinspection PyMethodOverriding def __get__(self, cls, owner): return classmethod(self.fget).__get__(None, owner)() # -------------------------------------------------------------------------------------------------- def enum(*sequential, **named): """ Create enumeration object with reverse dictionary property. Python 2.7 enumeration support (PEP 435). E = enum("ONE", "TWO") print(E.ONE, E.TWO) -> 0, 1 E.reverse_mapping[0] => "ONE" E.reverse_mapping[1] => "TWO" """ enums = dict(zip(sequential, range(len(sequential))), **named) reverse = dict((value, key) for key, value in enums.iteritems()) enums['reverse_mapping'] = reverse return type('Enum', (), enums) # -------------------------------------------------------------------------------------------------- def pairwise_shift(iterable): """s -> (s0,s1), (s2,s3), (s4, s5), ...""" a = iter(iterable) return itertools.izip(a, a) def pairwise_all(iterable): """s -> (s0,s1), (s1,s2), (s2, s3), ...""" a, b = itertools.tee(iterable) next(b, None) return itertools.izip(a, b) # -------------------------------------------------------------------------------------------------- class DisposableInterface(object): __metaclass__ = abc.ABCMeta def __init__(self, *args, **kwargs): pass @abc.abstractmethod def dispose(self): pass class DisposableList(list, DisposableInterface): # Caution: type(self) for purposes to use it in the IDAPython. When IDA reload context (after script restart) # ID of previous superclass and current superclass is different, but types are equals. # noinspection PyMissingConstructor def __init__(self, *args): super(type(self), self).__init__() for item in args: self.append(item) def append(self, p_object): if not isinstance(p_object, DisposableInterface): raise ValueError("Item must be inherited from DisposableInterface") super(type(self), self).append(p_object) def extend(self, iterable): if not all([isinstance(item, DisposableInterface) for item in iterable]): raise ValueError("All items must be inherited from DisposableInterface") super(type(self), self).extend(iterable) def insert(self, index, p_object): if not isinstance(p_object, DisposableInterface): raise ValueError("Item must be inherited from DisposableInterface") super(type(self), self).insert(index, p_object) def pop(self, index=None): value = super(type(self), self).pop(index) if index is not None else super(type(self), self).pop() value.dispose() return value def remove(self, value): super(type(self), self).remove(value) value.dispose() def dispose(self): while self: self.pop() ================================================ FILE: OptolithiumGui/info.py ================================================ __name__ = "optolithium" __version__ = "0.3.0" ================================================ FILE: OptolithiumGui/main.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import sys import config from qt import QtGui, QtCore from optolithium import MainWindow from info import __version__ from config import application_style __author__ = 'Alexei Gladkikh' def main(): app = QtGui.QApplication(sys.argv) QtCore.QThread.currentThread().setObjectName("MainThread") # QtGui.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps) # noinspection PyCallByClass,PyTypeChecker QtGui.QApplication.setStyle(application_style) QtGui.QApplication.setApplicationName(config.APPLICATION_NAME) QtGui.QApplication.setApplicationVersion(__version__) # noinspection PyUnusedLocal main_window = MainWindow() sys.exit(app.exec_()) if __name__ == "__main__": main() ================================================ FILE: OptolithiumGui/matplotlibrc ================================================ ### MATPLOTLIBRC FORMAT # This is a sample matplotlib configuration file - you can find a copy # of it on your system in # site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it # there, please note that it will be overwritten in your next install. # If you want to keep a permanent local copy that will not be # overwritten, place it in HOME/.matplotlib/matplotlibrc (unix/linux # like systems) and C:\Documents and Settings\yourname\.matplotlib # (win32 systems). # # This file is best viewed in a editor which supports python mode # syntax highlighting. Blank lines, or lines starting with a comment # symbol, are ignored, as are trailing comments. Other lines must # have the format # key : val # optional comment # # Colors: for the color values below, you can either use - a # matplotlib color string, such as r, k, or b - an rgb tuple, such as # (1.0, 0.5, 0.0) - a hex string, such as ff00ff or #ff00ff - a scalar # grayscale intensity such as 0.75 - a legal html color name, eg red, # blue, darkslategray #### CONFIGURATION BEGINS HERE # the default backend; one of GTK GTKAgg GTKCairo CocoaAgg FltkAgg # MacOSX QtAgg Qt4Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG Template # You can also deploy your own backend outside of matplotlib by # referring to the module name (which must be in the PYTHONPATH) as # 'module://my_backend' backend : TkAgg # If you are using the Qt4Agg backend, you can choose here # to use the PyQt4 bindings or the newer PySide bindings to # the underlying Qt4 toolkit. #backend.qt4 : PyQt4 # PyQt4 | PySide # Note that this can be overridden by the environment variable # QT_API used by Enthought Tool Suite (ETS); valid values are # "pyqt" and "pyside". The "pyqt" setting has the side effect of # forcing the use of Version 2 API for QString and QVariant. # if you are running pyplot inside a GUI and your backend choice # conflicts, we will automatically try to find a compatible one for # you if backend_fallback is True #backend_fallback: True #interactive : False #toolbar : toolbar2 # None | classic | toolbar2 #timezone : UTC # a pytz timezone string, eg US/Central or Europe/Paris # Where your matplotlib data lives if you installed to a non-default # location. This is where the matplotlib fonts, bitmaps, etc reside #datapath : /home/jdhunter/mpldata ### LINES # See http://matplotlib.sourceforge.net/api/artist_api.html#module-matplotlib.lines for more # information on line properties. #lines.linewidth : 1.0 # line width in points #lines.linestyle : - # solid line #lines.color : blue #lines.marker : None # the default marker #lines.markeredgewidth : 0.5 # the line width around the marker symbol #lines.markersize : 6 # markersize, in points #lines.dash_joinstyle : miter # miter|round|bevel #lines.dash_capstyle : butt # butt|round|projecting #lines.solid_joinstyle : miter # miter|round|bevel #lines.solid_capstyle : projecting # butt|round|projecting #lines.antialiased : True # render lines in antialised (no jaggies) ### PATCHES # Patches are graphical objects that fill 2D space, like polygons or # circles. See # http://matplotlib.sourceforge.net/api/artist_api.html#module-matplotlib.patches # information on patch properties #patch.linewidth : 1.0 # edge width in points #patch.facecolor : blue #patch.edgecolor : black #patch.antialiased : True # render patches in antialised (no jaggies) ### FONT # # font properties used by text.Text. See # http://matplotlib.sourceforge.net/api/font_manager_api.html for more # information on font properties. The 6 font properties used for font # matching are given below with their default values. # # The font.family property has five values: 'serif' (e.g. Times), # 'sans-serif' (e.g. Helvetica), 'cursive' (e.g. Zapf-Chancery), # 'fantasy' (e.g. Western), and 'monospace' (e.g. Courier). Each of # these font families has a default list of font names in decreasing # order of priority associated with them. # # The font.style property has three values: normal (or roman), italic # or oblique. The oblique style will be used for italic, if it is not # present. # # The font.variant property has two values: normal or small-caps. For # TrueType fonts, which are scalable fonts, small-caps is equivalent # to using a font size of 'smaller', or about 83% of the current font # size. # # The font.weight property has effectively 13 values: normal, bold, # bolder, lighter, 100, 200, 300, ..., 900. Normal is the same as # 400, and bold is 700. bolder and lighter are relative values with # respect to the current weight. # # The font.stretch property has 11 values: ultra-condensed, # extra-condensed, condensed, semi-condensed, normal, semi-expanded, # expanded, extra-expanded, ultra-expanded, wider, and narrower. This # property is not currently implemented. # # The font.size property is the default font size for text, given in pts. # 12pt is the standard value. # #font.family : sans-serif #font.style : normal #font.variant : normal #font.weight : medium #font.stretch : normal # note that font.size controls default text sizes. To configure # special text sizes tick labels, axes, labels, title, etc, see the rc # settings for axes and ticks. Special text sizes can be defined # relative to font.size, using the following values: xx-small, x-small, # small, medium, large, x-large, xx-large, larger, or smaller #font.size : 12.0 #font.serif : Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif #font.sans-serif : Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif #font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, cursive #font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, fantasy #font.monospace : Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace ### TEXT # text properties used by text.Text. See # http://matplotlib.sourceforge.net/api/artist_api.html#module-matplotlib.text for more # information on text properties #text.color : black ### LaTeX customizations. See http://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex #text.usetex : False # use latex for all text handling. The following fonts # are supported through the usual rc parameter settings: # new century schoolbook, bookman, times, palatino, # zapf chancery, charter, serif, sans-serif, helvetica, # avant garde, courier, monospace, computer modern roman, # computer modern sans serif, computer modern typewriter # If another font is desired which can loaded using the # LaTeX \usepackage command, please inquire at the # matplotlib mailing list #text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for handling # unicode strings. #text.latex.preamble : # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES # AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP # IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO. # preamble is a comma separated list of LaTeX statements # that are included in the LaTeX document preamble. # An example: # text.latex.preamble : \usepackage{bm},\usepackage{euler} # The following packages are always loaded with usetex, so # beware of package collisions: color, geometry, graphicx, # type1cm, textcomp. Adobe Postscript (PSSNFS) font packages # may also be loaded, depending on your font settings #text.dvipnghack : None # some versions of dvipng don't handle alpha # channel properly. Use True to correct # and flush ~/.matplotlib/tex.cache # before testing and False to force # correction off. None will try and # guess based on your dvipng version #text.hinting : True # If True, text will be hinted, otherwise not. This only # affects the Agg backend. #text.antialiased : True # If True (default), the text will be antialiased. # This only affects the Agg backend. # The following settings allow you to select the fonts in math mode. # They map from a TeX font name to a fontconfig font pattern. # These settings are only used if mathtext.fontset is 'custom'. # Note that this "custom" mode is unsupported and may go away in the # future. #mathtext.cal : cursive #mathtext.rm : serif #mathtext.tt : monospace #mathtext.it : serif:italic #mathtext.bf : serif:bold #mathtext.sf : sans #mathtext.fontset : cm # Should be 'cm' (Computer Modern), 'stix', # 'stixsans' or 'custom' #mathtext.fallback_to_cm : True # When True, use symbols from the Computer Modern # fonts when a symbol can not be found in one of # the custom math fonts. #mathtext.default : it # The default font to use for math. # Can be any of the LaTeX font names, including # the special name "regular" for the same font # used in regular text. ### AXES # default face and edge color, default tick sizes, # default fontsizes for ticklabels, and so on. See # http://matplotlib.sourceforge.net/api/axes_api.html#module-matplotlib.axes #axes.hold : True # whether to clear the axes by default on #axes.facecolor : white # axes background color #axes.edgecolor : black # axes edge color #axes.linewidth : 1.0 # edge linewidth #axes.grid : False # display grid or not #axes.titlesize : large # fontsize of the axes title #axes.labelsize : medium # fontsize of the x any y labels #axes.labelweight : normal # weight of the x and y labels #axes.labelcolor : black #axes.axisbelow : False # whether axis gridlines and ticks are below # the axes elements (lines, text, etc) #axes.formatter.limits : -7, 7 # use scientific notation if log10 # of the axis range is smaller than the # first or larger than the second #axes.formatter.use_locale : False # When True, format tick labels # according to the user's locale. # For example, use ',' as a decimal # separator in the fr_FR locale. #axes.unicode_minus : True # use unicode for the minus symbol # rather than hyphen. See # http://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes #axes.color_cycle : b, g, r, c, m, y, k # color cycle for plot lines # as list of string colorspecs: # single letter, long name, or # web-style hex #polaraxes.grid : True # display grid on polar axes #axes3d.grid : True # display grid on 3d axes ### TICKS # see http://matplotlib.sourceforge.net/api/axis_api.html#matplotlib.axis.Tick #xtick.major.size : 4 # major tick size in points #xtick.minor.size : 2 # minor tick size in points #xtick.major.width : 0.5 # major tick width in points #xtick.minor.width : 0.5 # minor tick width in points #xtick.major.pad : 4 # distance to major tick label in points #xtick.minor.pad : 4 # distance to the minor tick label in points #xtick.color : k # color of the tick labels #xtick.labelsize : medium # fontsize of the tick labels #xtick.direction : in # direction: in or out #ytick.major.size : 4 # major tick size in points #ytick.minor.size : 2 # minor tick size in points #ytick.major.width : 0.5 # major tick width in points #ytick.minor.width : 0.5 # minor tick width in points #ytick.major.pad : 4 # distance to major tick label in points #ytick.minor.pad : 4 # distance to the minor tick label in points #ytick.color : k # color of the tick labels #ytick.labelsize : medium # fontsize of the tick labels #ytick.direction : in # direction: in or out ### GRIDS #grid.color : black # grid color #grid.linestyle : : # dotted #grid.linewidth : 0.5 # in points ### Legend #legend.fancybox : False # if True, use a rounded box for the # legend, else a rectangle #legend.isaxes : True #legend.numpoints : 2 # the number of points in the legend line #legend.fontsize : large #legend.pad : 0.0 # deprecated; the fractional whitespace inside the legend border #legend.borderpad : 0.5 # border whitespace in fontsize units #legend.markerscale : 1.0 # the relative size of legend markers vs. original # the following dimensions are in axes coords #legend.labelsep : 0.010 # deprecated; the vertical space between the legend entries #legend.labelspacing : 0.5 # the vertical space between the legend entries in fraction of fontsize #legend.handlelen : 0.05 # deprecated; the length of the legend lines #legend.handlelength : 2. # the length of the legend lines in fraction of fontsize #legend.handleheight : 0.7 # the height of the legend handle in fraction of fontsize #legend.handletextsep : 0.02 # deprecated; the space between the legend line and legend text #legend.handletextpad : 0.8 # the space between the legend line and legend text in fraction of fontsize #legend.axespad : 0.02 # deprecated; the border between the axes and legend edge #legend.borderaxespad : 0.5 # the border between the axes and legend edge in fraction of fontsize #legend.columnspacing : 2. # the border between the axes and legend edge in fraction of fontsize #legend.shadow : False #legend.frameon : True # whether or not to draw a frame around legend ### FIGURE # See http://matplotlib.sourceforge.net/api/figure_api.html#matplotlib.figure.Figure #figure.figsize : 8, 6 # figure size in inches #figure.dpi : 80 # figure dots per inch #figure.facecolor : 0.75 # figure facecolor; 0.75 is scalar gray #figure.edgecolor : white # figure edgecolor # The figure subplot parameters. All dimensions are a fraction of the # figure width or height #figure.subplot.left : 0.125 # the left side of the subplots of the figure #figure.subplot.right : 0.9 # the right side of the subplots of the figure #figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure #figure.subplot.top : 0.9 # the top of the subplots of the figure #figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots #figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots ### IMAGES #image.aspect : equal # equal | auto | a number #image.interpolation : bilinear # see help(imshow) for options #image.cmap : jet # gray | jet etc... #image.lut : 256 # the size of the colormap lookup table #image.origin : upper # lower | upper #image.resample : False ### CONTOUR PLOTS #contour.negative_linestyle : dashed # dashed | solid ### Agg rendering ### Warning: experimental, 2008/10/10 #agg.path.chunksize : 0 # 0 to disable; values in the range # 10000 to 100000 can improve speed slightly # and prevent an Agg rendering failure # when plotting very large data sets, # especially if they are very gappy. # It may cause minor artifacts, though. # A value of 20000 is probably a good # starting point. ### SAVING FIGURES #path.simplify : True # When True, simplify paths by removing "invisible" # points to reduce file size and increase rendering # speed #path.simplify_threshold : 0.1 # The threshold of similarity below which # vertices will be removed in the simplification # process #path.snap : True # When True, rectilinear axis-aligned paths will be snapped to # the nearest pixel when certain criteria are met. When False, # paths will never be snapped. # the default savefig params can be different from the display params # Eg, you may want a higher resolution, or to make the figure # background white #savefig.dpi : 100 # figure dots per inch #savefig.facecolor : white # figure facecolor when saving #savefig.edgecolor : white # figure edgecolor when saving #savefig.extension : auto # what extension to use for savefig('foo'), or 'auto' #cairo.format : png # png, ps, pdf, svg # tk backend params #tk.window_focus : False # Maintain shell focus for TkAgg # ps backend params #ps.papersize : letter # auto, letter, legal, ledger, A0-A10, B0-B10 #ps.useafm : False # use of afm fonts, results in small files #ps.usedistiller : False # can be: None, ghostscript or xpdf # Experimental: may produce smaller files. # xpdf intended for production of publication quality files, # but requires ghostscript, xpdf and ps2eps #ps.distiller.res : 6000 # dpi #ps.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType) # pdf backend params #pdf.compression : 6 # integer from 0 to 9 # 0 disables compression (good for debugging) #pdf.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType) # svg backend params #svg.image_inline : True # write raster image data directly into the svg file #svg.image_noscale : False # suppress scaling of raster data embedded in SVG #svg.fonttype : 'path' # How to handle SVG fonts: # 'none': Assume fonts are installed on the machine where the SVG will be viewed. # 'path': Embed characters as paths -- supported by most SVG renderers # 'svgfont': Embed characters as SVG fonts -- supported only by Chrome, # Opera and Safari # docstring params #docstring.hardcopy = False # set this when you want to generate hardcopy docstring # Set the verbose flags. This controls how much information # matplotlib gives you at runtime and where it goes. The verbosity # levels are: silent, helpful, debug, debug-annoying. Any level is # inclusive of all the levels below it. If your setting is "debug", # you'll get all the debug and helpful messages. When submitting # problems to the mailing-list, please set verbose to "helpful" or "debug" # and paste the output into your report. # # The "fileo" gives the destination for any calls to verbose.report. # These objects can a filename, or a filehandle like sys.stdout. # # You can override the rc default verbosity from the command line by # giving the flags --verbose-LEVEL where LEVEL is one of the legal # levels, eg --verbose-helpful. # # You can access the verbose instance in your code # from matplotlib import verbose. #verbose.level : silent # one of silent, helpful, debug, debug-annoying #verbose.fileo : sys.stdout # a log filename, sys.stdout or sys.stderr # Event keys to interact with figures/plots via keyboard. # Customize these settings according to your needs. # Leave the field(s) empty if you don't need a key-map. (i.e., fullscreen : '') #keymap.fullscreen : f # toggling #keymap.home : h, r, home # home or reset mnemonic #keymap.back : left, c, backspace # forward / backward keys to enable #keymap.forward : right, v # left handed quick navigation #keymap.pan : p # pan mnemonic #keymap.zoom : o # zoom mnemonic #keymap.save : s # saving current figure #keymap.grid : g # switching on/off a grid in current axes #keymap.yscale : l # toggle scaling of y-axes ('log'/'linear') #keymap.xscale : L, k # toggle scaling of x-axes ('log'/'linear') #keymap.all_axes : a # enable all axes # Control downloading of example data. Various examples download some # data from the Matplotlib git repository to avoid distributing extra # files, but sometimes you want to avoid that. In that case set # examples.download to False and examples.directory to the directory # where you have a checkout of https://github.com/matplotlib/sample_data # examples.download : False # False to bypass downloading mechanism # examples.directory : '/usr/share/matplotlib/sampledata' # absolute directory to look in if download is false ================================================ FILE: OptolithiumGui/metrics.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import logging as module_logging from numpy import NaN, rot90, mean, abs, interp, asfortranarray, where, squeeze, \ degrees, arctan, sin, cos, array, ones, vstack, dot, diff, average from numpy import max as amax from numpy import min as amin from numpy.linalg import lstsq import optolithiumc as oplc # noinspection PyUnresolvedReferences import helpers import abc __author__ = 'Alexei Gladkikh' # Quirk for forward compatibility try: oplc.Edge2d oplc.Point2d except NameError: oplc.Edge2d = oplc.Edge oplc.Edge2d.cross_type = oplc.Edge.cross oplc.Point2d = oplc.Point logging = module_logging.getLogger(__name__) logging.setLevel(module_logging.DEBUG) helpers.logStreamEnable(logging) MASK_CLEAR = "clear" MASK_OPAQUE = "opaque" IMAGE_NEGATIVE = "negative" IMAGE_POSITIVE = "positive" VARIATE_HEIGHT_TRUE = "Yes" VARIATE_HEIGHT_FALSE = "No" def _get_target_mask(mask): left = right = None for region in mask.container.regions: x_direct, y_direct = [], [] for point in region.points: if point.y == 0: x_direct.append(point.x) if point.x == 0: y_direct.append(point.y) if len(x_direct) == len(region.points): axis_direct = x_direct elif len(y_direct) == len(region.points): axis_direct = y_direct for x in axis_direct: if (left is None and x < 0) or 0 > x > left: left = x if (right is None and x > 0) or 0 < x < right: right = x return left, right def _is_mask_negative(mask): center_transmit, left_transmit, right_transmit = _get_mask_type(mask) side_transmit = mean([left_transmit, right_transmit]) background = mask.container.background if center_transmit >= side_transmit: tonality = MASK_CLEAR else: tonality = MASK_OPAQUE if tonality is None: is_mask_negative = True if background == 0.0 else False else: is_mask_negative = {MASK_CLEAR: True, MASK_OPAQUE: False}[tonality] return is_mask_negative def contour_sign(mask, **kwargs): image_tonality = kwargs.get("image_tonality") is_image_negative = {IMAGE_NEGATIVE: True, IMAGE_POSITIVE: False}[image_tonality] return not is_image_negative def _get_mask_type(mask): left, right = _get_target_mask(mask) center_transmit, left_transmit, right_transmit = -1, -1, -1 for region in mask.container.regions: has_left, has_right = False, False for point in region.points: if point.x == left: has_left = True if point.x == right: has_right = True if has_left and has_right: center_transmit = region.transmittance side_transmit = mask.container.background return center_transmit, side_transmit, side_transmit if has_left and not has_right: center_transmit = mask.container.background left_transmit = region.transmittance if not has_left and has_right: center_transmit = mask.container.background right_transmit = region.transmittance return center_transmit, left_transmit, right_transmit class MetricNotImplementedError(Exception): pass class MetrologyInterface(object): __metaclass__ = abc.ABCMeta def __calculate_1d_wrap(self, sim_data, **kwargs): """:type sim_data: oplc.ResistVolume""" if sim_data.has_x: x, values = sim_data.x, sim_data.values[0, :, 0] else: x, values = sim_data.y, sim_data.values[:, 0, 0] return self._calculate_1d(x, values, **kwargs) def __calculate_2d_wrap(self, sim_data, **kwargs): """:type sim_data: oplc.ResistVolume""" if sim_data.has_x: x, z, values = sim_data.x, sim_data.z, sim_data.values[0, :, :] else: x, z, values = sim_data.y, sim_data.z, sim_data.values[:, 0, :] return self._calculate_2d(x, z, rot90(values), **kwargs) def _calculate_1d(self, x, values, **kwargs): raise MetricNotImplementedError def _calculate_xy(self, sim_data, **kwargs): raise MetricNotImplementedError def _calculate_2d(self, x, z, values, **kwargs): raise MetricNotImplementedError def _calculate_3d(self, sim_data, **kwargs): raise MetricNotImplementedError def _calculate_profile(self, profile, **kwargs): raise MetricNotImplementedError def _calculate_common(self, sim_data, **kwargs): raise MetricNotImplementedError def __init__(self, stage): self.__stage = stage self.__routines = { oplc.X_1D: self.__calculate_1d_wrap, oplc.Y_1D: self.__calculate_1d_wrap, oplc.XY_2D: self._calculate_xy, oplc.XZ_2D: self.__calculate_2d_wrap, oplc.YZ_2D: self.__calculate_2d_wrap, oplc.XYZ_3D: self._calculate_3d } @property def options(self): return self.__stage.options @property def stage(self): return self.__stage @abc.abstractproperty def caption(self): pass @abc.abstractproperty def format(self): pass def __call__(self, sim_data, **kwargs): """:type sim_data: oplc.AbstractResistSimulations""" if isinstance(sim_data, dict): return self._calculate_common(sim_data, **kwargs) elif sim_data.type == oplc.RESIST_VOLUME: callback = self.__routines[sim_data.axes] return callback(sim_data, **kwargs) elif sim_data.type == oplc.RESIST_PROFILE: return self._calculate_profile(sim_data, **kwargs) else: raise RuntimeError("Unknown simulation data type") def _image_values_at_height(x, z, values, **kwargs): height = kwargs.get("height") absolute_height = max(z) * height / 100.0 qx = asfortranarray(x) f = oplc.LinearInterpolation2d(qx, asfortranarray(z), asfortranarray(values)) return squeeze(f.interpolate(qx, asfortranarray(absolute_height))) class Average(MetrologyInterface): caption = property(lambda self: "Average") format = property(lambda self: "%.3f") def _calculate_1d(self, x, values, **kwargs): return mean(values) def _calculate_2d(self, x, z, values, **kwargs): return mean(_image_values_at_height(x, z, values, **kwargs)) def _calculate_lstsq(polygons, is_left=True): s = 1 if is_left else -1 for polygon in polygons: if not(all([edge.org.x > 0 for edge in polygon]) or all([edge.org.x < 0 for edge in polygon])): avg_x = average([min(edge.org.x for edge in polygon), max(edge.org.x for edge in polygon)]) sw_x = [edge.org.y for edge in polygon if s * (edge.org.x - avg_x) < 0] sw_y = [edge.org.x for edge in polygon if s * (edge.org.x - avg_x) < 0] sw_x_matrix = vstack([sw_x, ones(len(sw_x))]).T a, b = lstsq(sw_x_matrix, sw_y)[0] return a, b raise LookupError def _calculate_lstsq_v2(polygons): nxor = lambda a, b: a and b or not a and not b found = False a, b = 0.0, 0.0 for polygon in polygons: _do_lstsq = False if all([edge.org.x < 0 for edge in polygon]): start_point = max([edge.org.x for edge in polygon if edge.org.y == 0]) max_y = 0.9 * max(edge.org.y for edge in polygon) angle_new = 0.0 _to_left = True i = 0 sw_x, sw_y = [], [] for edge in reversed(polygon): if _do_lstsq and edge.org.y != 0 and edge.org.y >= old_edge.org.y: angle_old = angle_new angle_new = (edge.org.x - start_point)/edge.org.y sw_x.append(edge.org.y) sw_y.append(edge.org.x) if nxor(_to_left, angle_new > angle_old): end_sw_x = sw_x[:] end_sw_y = sw_y[:] _to_left = not _to_left i += 1 elif edge.org.y == 0.0 and edge.org.x == start_point: _do_lstsq = True old_edge = edge elif edge.org.y < old_edge.org.y and edge.org.y != 0: end_sw_x = sw_x[:] end_sw_y = sw_y[:] break if i < 3: _do_lstsq = False for edge in reversed(polygon): if _do_lstsq and edge.org.y != 0 and edge.org.y <= max_y: end_sw_x.append(edge.org.y) end_sw_y.append(edge.org.x) elif edge.org.y == 0.0 and edge.org.x == start_point: _do_lstsq = True sw_x_matrix = vstack([end_sw_x, ones(len(end_sw_x))]).T found = True a, b = lstsq(sw_x_matrix, end_sw_y)[0] if not found: raise LookupError return a, b class SidewallAngle(MetrologyInterface): caption = property(lambda self: "Sidewall Angle Avg. (deg.)") format = property(lambda self: "%.1f") @staticmethod def _calculate_sidewall_angle(polygons): a_left, _ = _calculate_lstsq(polygons, is_left=True) a_right, _ = _calculate_lstsq(polygons, is_left=False) sa_left = 90.0 - abs(degrees(arctan(a_left))) sa_right = 90.0 - abs(degrees(arctan(a_right))) return mean([sa_left, sa_right]) @staticmethod def _calculate_sidewall_angle_v2(polygons): a, _ = _calculate_lstsq_v2(polygons) return 90.0 - abs(degrees(arctan(a))) def _calculate_2d(self, x, z, values, **kwargs): level = kwargs.get("level") negative = contour_sign(self.options.mask, **kwargs) polygons = oplc.contours(asfortranarray(x), asfortranarray(z), asfortranarray(values), level, negative) try: if _is_mask_negative(self.options.mask): return SidewallAngle._calculate_sidewall_angle_v2(polygons) else: return SidewallAngle._calculate_sidewall_angle(polygons) except LookupError: return NaN def _calculate_profile(self, profile, **kwargs): try: if _is_mask_negative(self.options.mask): return SidewallAngle._calculate_sidewall_angle_v2(profile.polygons) else: return SidewallAngle._calculate_sidewall_angle(profile.polygons) except LookupError: return NaN class StandingWaveAmpl(MetrologyInterface): caption = property(lambda self: "SW Amplitude Avg. (nm)") format = property(lambda self: "%.3f") @staticmethod def _calculate_swamp(polygons, is_left=True): a, b = _calculate_lstsq(polygons, is_left) s = 1 if is_left else -1 rotate_matrix = array([[cos(arctan(a)), -sin(arctan(a))], [sin(arctan(a)), cos(arctan(a))]]) for polygon in polygons: if not(all([edge.org.x > 0 for edge in polygon]) or all([edge.org.x < 0 for edge in polygon])): sw_points = [] for edge in polygon: if s * edge.org.x < 0: old_point = array([edge.org.y, edge.org.x]) new_point = dot(old_point, rotate_matrix) - [0, b] sw_points.append(new_point[1]) sw_points = array(sw_points) # Getting average of absolute maximum values of resist profile edge (standing wave curve) # by mean of derivative analysis d = diff(sw_points) result = average(abs([sw_points[k+1] for k, (cur, nxt) in enumerate(zip(d, d[1:])) if cur*nxt < 0])) return result raise LookupError @staticmethod def _calculate_swamp_v2(polygons): a, b = _calculate_lstsq_v2(polygons) rotate_matrix = array([[cos(arctan(a)), -sin(arctan(a))], [sin(arctan(a)), cos(arctan(a))]]) for polygon in polygons: _do_lstsq = False if all([edge.org.x < 0 for edge in polygon]): sw_points = [] start_point = max([edge.org.x for edge in polygon if edge.org.y == 0]) for edge in reversed(polygon): if _do_lstsq and edge.org.y != 0 and edge.org.y >= old_edge.org.y: old_point = array([edge.org.y, edge.org.x]) new_point = dot(old_point, rotate_matrix) - [0, b] sw_points.append(new_point[1]) elif edge.org.y == 0.0 and edge.org.x == start_point: _do_lstsq = True old_edge = edge sw_points = array(sw_points) # Getting average of absolute maximum values of resist profile edge (standing wave curve) # by mean of derivative analysis d = diff(sw_points) result = average(abs([sw_points[k+1] for k, (cur, nxt) in enumerate(zip(d, d[1:])) if cur*nxt < 0])) return result raise LookupError def _calculate_2d(self, x, z, values, **kwargs): level = kwargs.get("level") negative = contour_sign(self.options.mask, **kwargs) # center_transmit, left_transmit, right_transmit = _get_mask_type(self.options.mask) polygons = oplc.contours(asfortranarray(x), asfortranarray(z), asfortranarray(values), level, negative) try: if _is_mask_negative(self.options.mask): return StandingWaveAmpl._calculate_swamp_v2(polygons) else: swamp_left = StandingWaveAmpl._calculate_swamp(polygons, is_left=True) swamp_right = StandingWaveAmpl._calculate_swamp(polygons, is_left=False) return mean([swamp_left, swamp_right]) except LookupError: return NaN def _calculate_profile(self, profile, **kwargs): try: if _is_mask_negative(self.options.mask): return StandingWaveAmpl._calculate_swamp_v2(profile.polygons) else: swamp_left = StandingWaveAmpl._calculate_swamp(profile.polygons, is_left=True) swamp_right = StandingWaveAmpl._calculate_swamp(profile.polygons, is_left=False) return mean([swamp_left, swamp_right]) except LookupError: return NaN class Contrast(MetrologyInterface): caption = property(lambda self: "Contrast") format = property(lambda self: "%.3f") @staticmethod def __contrast_expr(values): return (amax(values) - amin(values)) / (amax(values) + amin(values)) def _calculate_1d(self, x, values, **kwargs): return self.__contrast_expr(values) def _calculate_2d(self, x, z, values, **kwargs): return self.__contrast_expr(_image_values_at_height(x, z, values, **kwargs)) def _calculate_xy(self, aerial_image, **kwargs): """:type aerial_image: oplc.ResistVolume""" # TODO: Wrong result compare to Prolith return self.__contrast_expr(aerial_image.values) class ResistMagReflectivity(MetrologyInterface): caption = property(lambda self: "Resist Mag. Reflectivity") format = property(lambda self: "%.3f") def _calculate_common(self, sim_data, **kwargs): return sim_data["resist_reflectivity"] class SubstrateMagReflectivity(MetrologyInterface): caption = property(lambda self: "Substrate Mag. Reflectivity") format = property(lambda self: "%.3f") def _calculate_common(self, sim_data, **kwargs): return sim_data["substrate_reflectivity"] class ResistPhaseReflectivity(MetrologyInterface): caption = property(lambda self: "Resist Phase Reflectivity") format = property(lambda self: "%.3f") def _calculate_common(self, sim_data, **kwargs): return sim_data["resist_phase"] class SubstratePhaseReflectivity(MetrologyInterface): caption = property(lambda self: "Substrate Phase Reflectivity") format = property(lambda self: "%.3f") def _calculate_common(self, sim_data, **kwargs): return sim_data["substrate_phase"] def _calculate_thickness(polygons): if not len(polygons): return NaN return max([max(polygon, key=lambda e: e.org.y).org.y for polygon in polygons]) class ResistLoss(MetrologyInterface): caption = property(lambda self: "Resist lost (nm):") format = property(lambda self: "%.3f") def _calculate_profile(self, profile, **kwargs): """:type profile: oplc.ResistProfile""" return amax(profile.z) - _calculate_thickness(profile.polygons) class CriticalDimension(MetrologyInterface): caption = property(lambda self: "CD (nm)") format = property(lambda self: "%.3f") def _calculate_1d(self, x, values, **kwargs): level = kwargs.get("level") level_edge = oplc.Edge2d(min(x), level, amax(x), level) cross_points = [] for k in xrange(len(values)-1): current_edge = oplc.Edge2d(x[k], values[k], x[k+1], values[k+1]) if level_edge.cross_type(current_edge) == oplc.SKEW_CROSS: cross_points.append(level_edge.point(current_edge)) if len(cross_points) != 2: return NaN return oplc.Edge2d(cross_points[0], cross_points[1]).length() @staticmethod def __calculate_cd(x, z, polygons, **kwargs): height = kwargs.get("height") variate = kwargs.get("variate_height") # tonality = kwargs.get("mask_tonality") if variate == VARIATE_HEIGHT_TRUE: thickness = _calculate_thickness(polygons) elif variate == VARIATE_HEIGHT_FALSE or variate is None: thickness = amax(z) else: raise RuntimeError("Wrong variate height option: %s" % variate) absolute_height = height * thickness / 100.0 x_min, x_max = amin(x), amax(x) level_edge = oplc.Edge2d(oplc.Point2d(x_min, absolute_height), oplc.Point2d(x_max, absolute_height)) # logging.info("Level edge: %s" % level_edge) cross_points = set() for polygon in polygons: for edge in polygon: # logging.info("Edge: %s" % edge) if level_edge.cross_type(edge) == oplc.SKEW_CROSS: point = level_edge.point(edge) # logging.info("=======> Cross point: %s <=======" % point) cross_points.add(point.round(3)) # logging.info("Current: %s" % cross_points) if not cross_points: return NaN # Lookup two points nearest to the center of the given area (because mask feature for 1D mask always centered) xmin1 = min(cross_points, key=lambda p: oplc.Edge2d(p, oplc.Point2d(0.0, p.y)).length()) cross_points.remove(xmin1) xmin2 = min(cross_points, key=lambda p: oplc.Edge2d(p, oplc.Point2d(0.0, p.y)).length()) return oplc.Edge2d(xmin1, xmin2).length() def _calculate_2d(self, x, z, values, **kwargs): level = kwargs.get("level") negative = contour_sign(self.options.mask, **kwargs) polygons = oplc.contours(asfortranarray(x), asfortranarray(z), asfortranarray(values), level, negative) return CriticalDimension.__calculate_cd(x, z, polygons, **kwargs) def _calculate_profile(self, profile, **kwargs): """:type profile: oplc.ResistProfile""" if profile.has_x: x = profile.x elif profile.has_y: x = profile.y else: return NaN return CriticalDimension.__calculate_cd(x, profile.z, profile.polygons, **kwargs) class CriticalDimensionAbsoluteError(CriticalDimension): caption = property(lambda self: "CD Error (nm)") format = property(lambda self: "%.3f") def _calculate_1d(self, x, values, **kwargs): cd = super(CriticalDimensionAbsoluteError, self)._calculate_1d(x, values, **kwargs) left, right = _get_target_mask(self.options.mask) return cd - (right - left) def _calculate_2d(self, x, z, values, **kwargs): cd = super(CriticalDimensionAbsoluteError, self)._calculate_2d(x, z, values, **kwargs) left, right = _get_target_mask(self.options.mask) return cd - (right - left) def _calculate_profile(self, profile, **kwargs): cd = super(CriticalDimensionAbsoluteError, self)._calculate_profile(profile, **kwargs) left, right = _get_target_mask(self.options.mask) return cd - (right - left) class CriticalDimensionRelativeError(CriticalDimension): caption = property(lambda self: "CD Error (%)") format = property(lambda self: "%.3f") def _calculate_1d(self, x, values, **kwargs): cd = super(CriticalDimensionRelativeError, self)._calculate_1d(x, values, **kwargs) left, right = _get_target_mask(self.options.mask) target = right - left return float(cd - target)/float(target)*100.0 def _calculate_2d(self, x, z, values, **kwargs): cd = super(CriticalDimensionRelativeError, self)._calculate_2d(x, z, values, **kwargs) left, right = _get_target_mask(self.options.mask) target = right - left return float(cd - target)/float(target)*100.0 def _calculate_profile(self, profile, **kwargs): cd = super(CriticalDimensionRelativeError, self)._calculate_profile(profile, **kwargs) left, right = _get_target_mask(self.options.mask) target = right - left return float(cd - target)/float(target)*100.0 class TimeToClear(MetrologyInterface): caption = property(lambda self: "Time to Clear (sec)") format = property(lambda self: "%.1f") def _calculate_2d(self, x, z, values, **kwargs): return amin(values[where(z == 0), :]) class Slope(MetrologyInterface): caption = property(lambda self: "Slope Avg. (1/um)") format = property(lambda self: "%.3f") @staticmethod def _calc_dvalue(left, right, dx, x, values): v0 = interp([left-dx, right-dx], x, values) v1 = interp([left+dx, right+dx], x, values) return abs(v1 - v0) def _calc_slope(self, left, right, x, values): dx = float(self.options.numerics.grid_xy.value)/10.0 dv = Slope._calc_dvalue(left, right, dx, x, values) return mean(dv)/2.0/dx*1000.0 def _calculate_1d(self, x, values, **kwargs): left, right = _get_target_mask(self.options.mask) return self._calc_slope(left, right, x, values) def _calculate_2d(self, x, z, values, **kwargs): left, right = _get_target_mask(self.options.mask) return self._calc_slope(left, right, x, _image_values_at_height(x, z, values, **kwargs)) class LogSlope(Slope): caption = property(lambda self: "Log Slope Avg. (1/um)") format = property(lambda self: "%.3f") def _calc_logslope(self, left, right, x, values): s = self._calc_slope(left, right, x, values) v = mean(interp([left, right], x, values)) return s/v def _calculate_1d(self, x, values, **kwargs): left, right = _get_target_mask(self.options.mask) return self._calc_logslope(left, right, x, values) def _calculate_2d(self, x, z, values, **kwargs): left, right = _get_target_mask(self.options.mask) return self._calc_logslope(left, right, x, _image_values_at_height(x, z, values, **kwargs)) class NILS(LogSlope): caption = property(lambda self: "NILS (Avg.)") format = property(lambda self: "%.3f") def _calc_nils(self, left, right, x, values): s = self._calc_slope(left, right, x, values) v = mean(interp([left, right], x, values)) * 1000.0 return s * (right - left) / v def _calculate_1d(self, x, values, **kwargs): left, right = _get_target_mask(self.options.mask) return self._calc_nils(left, right, x, values) def _calculate_2d(self, x, z, values, **kwargs): left, right = _get_target_mask(self.options.mask) return self._calc_nils(left, right, x, _image_values_at_height(x, z, values, **kwargs)) # _calculate_1d, _calculate_2d IMAGE_METRICS = [ Average, Contrast, CriticalDimension, CriticalDimensionAbsoluteError, CriticalDimensionRelativeError, Slope, LogSlope, NILS, StandingWaveAmpl ] # _calculate_common STANDING_WAVES_METRICS = [ ResistMagReflectivity, ResistPhaseReflectivity, SubstrateMagReflectivity, SubstratePhaseReflectivity ] # _calculate_2d CONTOUR_METRICS = [ TimeToClear, CriticalDimension, CriticalDimensionAbsoluteError, CriticalDimensionRelativeError, # SidewallAngle, # StandingWaveAmpl ] # _calculate_profile PROFILE_METRICS = [ CriticalDimension, CriticalDimensionAbsoluteError, CriticalDimensionRelativeError, ResistLoss, SidewallAngle, StandingWaveAmpl ] ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/cmex10.afm ================================================ StartFontMetrics 2.0 Comment Creation Date: Thu Jun 21 22:23:20 1990 Comment UniqueID 5000774 FontName CMEX10 EncodingScheme FontSpecific FullName CMEX10 FamilyName Computer Modern Weight Medium ItalicAngle 0 IsFixedPitch false Version 1.00 Notice Copyright (c) 1997 American Mathematical Society. All Rights Reserved. Comment Computer Modern fonts were designed by Donald E. Knuth FontBBox -24 -2960 1454 772 XHeight 430.556 Comment CapHeight 0 Ascender 750 Comment Descender -1760 Descender -2960 Comment FontID CMEX Comment DesignSize 10 (pts) Comment CharacterCodingScheme TeX math extension Comment Space 0 0 0 Comment ExtraSpace 0 Comment Quad 1000 Comment DefaultRuleThickness 40 Comment BigOpSpacing 111.111 166.667 200 600 100 Comment Ascendible characters (74) % macro - PS charname Comment Ascending 0, 16, 18, 32, 48 % ( - parenleft Comment Ascending 1, 17, 19, 33, 49 % ) - parenright Comment Ascending 2, 104, 20, 34, 50 % [ - bracketleft Comment Ascending 3, 105, 21, 35, 51 % ] - bracketright Comment Ascending 4, 106, 22, 36, 52 % lfloor - floorleft Comment Ascending 5, 107, 23, 37, 53 % rfloor - floorright Comment Ascending 6, 108, 24, 38, 54 % lceil - ceilingleft Comment Ascending 7, 109, 25, 39, 55 % rceil - ceilingright Comment Ascending 8, 110, 26, 40, 56 % { - braceleft Comment Ascending 9, 111, 27, 41, 57 % } - braceright Comment Ascending 10, 68, 28, 42 % < - anglebracketleft Comment Ascending 11, 69, 29, 43 % > - anglebracketright Comment Ascending 14, 46, 30, 44 % / - slash Comment Ascending 15, 47, 31, 45 % \ - backslash Comment Ascending 70, 71 % bigsqcup - unionsq Comment Ascending 72, 73 % oint - contintegral Comment Ascending 74, 75 % bigodot - circledot Comment Ascending 76, 77 % bigoplus - circleplus Comment Ascending 78, 79 % bigotimes - circlemultiply Comment Ascending 80, 88 % sum - summation Comment Ascending 81, 89 % prod - product Comment Ascending 82, 90 % int - integral Comment Ascending 83, 91 % bigcup - union Comment Ascending 84, 92 % bigcap - intersection Comment Ascending 85, 93 % biguplus - unionmulti Comment Ascending 86, 94 % bigwedge - logicaland Comment Ascending 87, 95 % bigvee - logicalor Comment Ascending 96, 97 % coprod - coproduct Comment Ascending 98, 99, 100 % widehat - hatwide Comment Ascending 101, 102, 103 % widetilde - tildewide Comment Ascending 112, 113, 114, 115, 116 % radical - sqrt Comment Extensible characters (28) Comment Extensible 12 top 0 mid 0 bot 0 rep 12 % vert - thin bar Comment Extensible 13 top 0 mid 0 bot 0 rep 13 % Vert - thin double bar Comment Extensible 48 top 48 mid 0 bot 64 rep 66 % ( - parenleft Comment Extensible 49 top 49 mid 0 bot 65 rep 67 % ) - parenright Comment Extensible 50 top 50 mid 0 bot 52 rep 54 % [ - bracketleft Comment Extensible 51 top 51 mid 0 bot 53 rep 55 % ] - bracketright Comment Extensible 52 top 0 mid 0 bot 52 rep 54 % lfloor - floorleft Comment Extensible 53 top 0 mid 0 bot 53 rep 55 % rfloor - floorright Comment Extensible 54 top 50 mid 0 bot 0 rep 54 % lceil - ceilingleft Comment Extensible 55 top 51 mid 0 bot 0 rep 55 % rceil - ceilingright Comment Extensible 56 top 56 mid 60 bot 58 rep 62 % { - braceleft Comment Extensible 57 top 57 mid 61 bot 59 rep 62 % } - braceright Comment Extensible 58 top 56 mid 0 bot 58 rep 62 % lgroup Comment Extensible 59 top 57 mid 0 bot 59 rep 62 % rgroup Comment Extensible 60 top 0 mid 0 bot 0 rep 63 % arrowvert Comment Extensible 61 top 0 mid 0 bot 0 rep 119 % Arrowvert Comment Extensible 62 top 0 mid 0 bot 0 rep 62 % bracevert Comment Extensible 63 top 120 mid 0 bot 121 rep 63 % updownarrow Comment Extensible 64 top 56 mid 0 bot 59 rep 62 % lmoustache Comment Extensible 65 top 57 mid 0 bot 58 rep 62 % rmoustache Comment Extensible 66 top 0 mid 0 bot 0 rep 66 % parenleftexten Comment Extensible 67 top 0 mid 0 bot 0 rep 67 % parenrightexten Comment Extensible 116 top 118 mid 0 bot 116 rep 117 % radical Comment Extensible 119 top 126 mid 0 bot 127 rep 119 % Updownarrow Comment Extensible 120 top 120 mid 0 bot 0 rep 63 % uparrow Comment Extensible 121 top 0 mid 0 bot 121 rep 63 % downarrow Comment Extensible 126 top 126 mid 0 bot 0 rep 119 % Uparrow Comment Extensible 127 top 0 mid 0 bot 127 rep 119 % Downarrow StartCharMetrics 129 C 0 ; WX 458.333 ; N parenleftbig ; B 152 -1159 413 40 ; C 1 ; WX 458.333 ; N parenrightbig ; B 44 -1159 305 40 ; C 2 ; WX 416.667 ; N bracketleftbig ; B 202 -1159 394 40 ; C 3 ; WX 416.667 ; N bracketrightbig ; B 22 -1159 214 40 ; C 4 ; WX 472.222 ; N floorleftbig ; B 202 -1159 449 40 ; C 5 ; WX 472.222 ; N floorrightbig ; B 22 -1159 269 40 ; C 6 ; WX 472.222 ; N ceilingleftbig ; B 202 -1159 449 40 ; C 7 ; WX 472.222 ; N ceilingrightbig ; B 22 -1159 269 40 ; C 8 ; WX 583.333 ; N braceleftbig ; B 113 -1159 469 40 ; C 9 ; WX 583.333 ; N bracerightbig ; B 113 -1159 469 40 ; C 10 ; WX 472.222 ; N angbracketleftbig ; B 98 -1160 393 40 ; C 11 ; WX 472.222 ; N angbracketrightbig ; B 78 -1160 373 40 ; C 12 ; WX 333.333 ; N vextendsingle ; B 145 -621 188 21 ; C 13 ; WX 555.556 ; N vextenddouble ; B 145 -621 410 21 ; C 14 ; WX 577.778 ; N slashbig ; B 56 -1159 521 40 ; C 15 ; WX 577.778 ; N backslashbig ; B 56 -1159 521 40 ; C 16 ; WX 597.222 ; N parenleftBig ; B 180 -1759 560 40 ; C 17 ; WX 597.222 ; N parenrightBig ; B 36 -1759 416 40 ; C 18 ; WX 736.111 ; N parenleftbigg ; B 208 -2359 700 40 ; C 19 ; WX 736.111 ; N parenrightbigg ; B 35 -2359 527 40 ; C 20 ; WX 527.778 ; N bracketleftbigg ; B 250 -2359 513 40 ; C 21 ; WX 527.778 ; N bracketrightbigg ; B 14 -2359 277 40 ; C 22 ; WX 583.333 ; N floorleftbigg ; B 250 -2359 568 40 ; C 23 ; WX 583.333 ; N floorrightbigg ; B 14 -2359 332 40 ; C 24 ; WX 583.333 ; N ceilingleftbigg ; B 250 -2359 568 40 ; C 25 ; WX 583.333 ; N ceilingrightbigg ; B 14 -2359 332 40 ; C 26 ; WX 750 ; N braceleftbigg ; B 131 -2359 618 40 ; C 27 ; WX 750 ; N bracerightbigg ; B 131 -2359 618 40 ; C 28 ; WX 750 ; N angbracketleftbigg ; B 125 -2359 652 40 ; C 29 ; WX 750 ; N angbracketrightbigg ; B 97 -2359 624 40 ; C 30 ; WX 1044.44 ; N slashbigg ; B 56 -2359 987 40 ; C 31 ; WX 1044.44 ; N backslashbigg ; B 56 -2359 987 40 ; C 32 ; WX 791.667 ; N parenleftBigg ; B 236 -2959 757 40 ; C 33 ; WX 791.667 ; N parenrightBigg ; B 34 -2959 555 40 ; C 34 ; WX 583.333 ; N bracketleftBigg ; B 275 -2959 571 40 ; C 35 ; WX 583.333 ; N bracketrightBigg ; B 11 -2959 307 40 ; C 36 ; WX 638.889 ; N floorleftBigg ; B 275 -2959 627 40 ; C 37 ; WX 638.889 ; N floorrightBigg ; B 11 -2959 363 40 ; C 38 ; WX 638.889 ; N ceilingleftBigg ; B 275 -2959 627 40 ; C 39 ; WX 638.889 ; N ceilingrightBigg ; B 11 -2959 363 40 ; C 40 ; WX 805.556 ; N braceleftBigg ; B 144 -2959 661 40 ; C 41 ; WX 805.556 ; N bracerightBigg ; B 144 -2959 661 40 ; C 42 ; WX 805.556 ; N angbracketleftBigg ; B 139 -2960 697 40 ; C 43 ; WX 805.556 ; N angbracketrightBigg ; B 108 -2960 666 40 ; C 44 ; WX 1277.78 ; N slashBigg ; B 56 -2959 1221 40 ; C 45 ; WX 1277.78 ; N backslashBigg ; B 56 -2959 1221 40 ; C 46 ; WX 811.111 ; N slashBig ; B 56 -1759 754 40 ; C 47 ; WX 811.111 ; N backslashBig ; B 56 -1759 754 40 ; C 48 ; WX 875 ; N parenlefttp ; B 291 -1770 842 39 ; C 49 ; WX 875 ; N parenrighttp ; B 32 -1770 583 39 ; C 50 ; WX 666.667 ; N bracketlefttp ; B 326 -1760 659 39 ; C 51 ; WX 666.667 ; N bracketrighttp ; B 7 -1760 340 39 ; C 52 ; WX 666.667 ; N bracketleftbt ; B 326 -1759 659 40 ; C 53 ; WX 666.667 ; N bracketrightbt ; B 7 -1759 340 40 ; C 54 ; WX 666.667 ; N bracketleftex ; B 326 -601 395 1 ; C 55 ; WX 666.667 ; N bracketrightex ; B 271 -601 340 1 ; C 56 ; WX 888.889 ; N bracelefttp ; B 384 -910 718 -1 ; C 57 ; WX 888.889 ; N bracerighttp ; B 170 -910 504 -1 ; C 58 ; WX 888.889 ; N braceleftbt ; B 384 -899 718 10 ; C 59 ; WX 888.889 ; N bracerightbt ; B 170 -899 504 10 ; C 60 ; WX 888.889 ; N braceleftmid ; B 170 -1810 504 10 ; C 61 ; WX 888.889 ; N bracerightmid ; B 384 -1810 718 10 ; C 62 ; WX 888.889 ; N braceex ; B 384 -310 504 10 ; C 63 ; WX 666.667 ; N arrowvertex ; B 312 -601 355 1 ; C 64 ; WX 875 ; N parenleftbt ; B 291 -1759 842 50 ; C 65 ; WX 875 ; N parenrightbt ; B 32 -1759 583 50 ; C 66 ; WX 875 ; N parenleftex ; B 291 -610 402 10 ; C 67 ; WX 875 ; N parenrightex ; B 472 -610 583 10 ; C 68 ; WX 611.111 ; N angbracketleftBig ; B 112 -1759 522 40 ; C 69 ; WX 611.111 ; N angbracketrightBig ; B 88 -1759 498 40 ; C 70 ; WX 833.333 ; N unionsqtext ; B 56 -1000 776 0 ; C 71 ; WX 1111.11 ; N unionsqdisplay ; B 56 -1400 1054 0 ; C 72 ; WX 472.222 ; N contintegraltext ; B 56 -1111 609 0 ; C 73 ; WX 555.556 ; N contintegraldisplay ; B 56 -2222 943 0 ; C 74 ; WX 1111.11 ; N circledottext ; B 56 -1000 1054 0 ; C 75 ; WX 1511.11 ; N circledotdisplay ; B 56 -1400 1454 0 ; C 76 ; WX 1111.11 ; N circleplustext ; B 56 -1000 1054 0 ; C 77 ; WX 1511.11 ; N circleplusdisplay ; B 56 -1400 1454 0 ; C 78 ; WX 1111.11 ; N circlemultiplytext ; B 56 -1000 1054 0 ; C 79 ; WX 1511.11 ; N circlemultiplydisplay ; B 56 -1400 1454 0 ; C 80 ; WX 1055.56 ; N summationtext ; B 56 -1000 999 0 ; C 81 ; WX 944.444 ; N producttext ; B 56 -1000 887 0 ; C 82 ; WX 472.222 ; N integraltext ; B 56 -1111 609 0 ; C 83 ; WX 833.333 ; N uniontext ; B 56 -1000 776 0 ; C 84 ; WX 833.333 ; N intersectiontext ; B 56 -1000 776 0 ; C 85 ; WX 833.333 ; N unionmultitext ; B 56 -1000 776 0 ; C 86 ; WX 833.333 ; N logicalandtext ; B 56 -1000 776 0 ; C 87 ; WX 833.333 ; N logicalortext ; B 56 -1000 776 0 ; C 88 ; WX 1444.44 ; N summationdisplay ; B 56 -1400 1387 0 ; C 89 ; WX 1277.78 ; N productdisplay ; B 56 -1400 1221 0 ; C 90 ; WX 555.556 ; N integraldisplay ; B 56 -2222 943 0 ; C 91 ; WX 1111.11 ; N uniondisplay ; B 56 -1400 1054 0 ; C 92 ; WX 1111.11 ; N intersectiondisplay ; B 56 -1400 1054 0 ; C 93 ; WX 1111.11 ; N unionmultidisplay ; B 56 -1400 1054 0 ; C 94 ; WX 1111.11 ; N logicalanddisplay ; B 56 -1400 1054 0 ; C 95 ; WX 1111.11 ; N logicalordisplay ; B 56 -1400 1054 0 ; C 96 ; WX 944.444 ; N coproducttext ; B 56 -1000 887 0 ; C 97 ; WX 1277.78 ; N coproductdisplay ; B 56 -1400 1221 0 ; C 98 ; WX 555.556 ; N hatwide ; B -5 562 561 744 ; C 99 ; WX 1000 ; N hatwider ; B -4 575 1003 772 ; C 100 ; WX 1444.44 ; N hatwidest ; B -3 575 1446 772 ; C 101 ; WX 555.556 ; N tildewide ; B 0 608 555 722 ; C 102 ; WX 1000 ; N tildewider ; B 0 624 999 750 ; C 103 ; WX 1444.44 ; N tildewidest ; B 0 623 1443 750 ; C 104 ; WX 472.222 ; N bracketleftBig ; B 226 -1759 453 40 ; C 105 ; WX 472.222 ; N bracketrightBig ; B 18 -1759 245 40 ; C 106 ; WX 527.778 ; N floorleftBig ; B 226 -1759 509 40 ; C 107 ; WX 527.778 ; N floorrightBig ; B 18 -1759 301 40 ; C 108 ; WX 527.778 ; N ceilingleftBig ; B 226 -1759 509 40 ; C 109 ; WX 527.778 ; N ceilingrightBig ; B 18 -1759 301 40 ; C 110 ; WX 666.667 ; N braceleftBig ; B 119 -1759 547 40 ; C 111 ; WX 666.667 ; N bracerightBig ; B 119 -1759 547 40 ; C 112 ; WX 1000 ; N radicalbig ; B 110 -1160 1020 40 ; C 113 ; WX 1000 ; N radicalBig ; B 110 -1760 1020 40 ; C 114 ; WX 1000 ; N radicalbigg ; B 111 -2360 1020 40 ; C 115 ; WX 1000 ; N radicalBigg ; B 111 -2960 1020 40 ; C 116 ; WX 1055.56 ; N radicalbt ; B 111 -1800 742 20 ; C 117 ; WX 1055.56 ; N radicalvertex ; B 702 -620 742 20 ; C 118 ; WX 1055.56 ; N radicaltp ; B 702 -580 1076 40 ; C 119 ; WX 777.778 ; N arrowvertexdbl ; B 257 -601 521 1 ; C 120 ; WX 666.667 ; N arrowtp ; B 111 -600 556 0 ; C 121 ; WX 666.667 ; N arrowbt ; B 111 -600 556 0 ; C 122 ; WX 450 ; N bracehtipdownleft ; B -24 -214 460 120 ; C 123 ; WX 450 ; N bracehtipdownright ; B -10 -214 474 120 ; C 124 ; WX 450 ; N bracehtipupleft ; B -24 0 460 334 ; C 125 ; WX 450 ; N bracehtipupright ; B -10 0 474 334 ; C 126 ; WX 777.778 ; N arrowdbltp ; B 56 -600 722 -1 ; C 127 ; WX 777.778 ; N arrowdblbt ; B 56 -599 722 0 ; C -1 ; WX 333.333 ; N space ; B 0 0 0 0 ; EndCharMetrics EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/cmmi10.afm ================================================ StartFontMetrics 2.0 Comment Creation Date: Thu Jun 21 22:23:22 1990 Comment UniqueID 5000785 FontName CMMI10 EncodingScheme FontSpecific FullName CMMI10 FamilyName Computer Modern Weight Medium ItalicAngle -14.04 IsFixedPitch false Version 1.00A Notice Copyright (c) 1997 American Mathematical Society. All Rights Reserved. Comment Computer Modern fonts were designed by Donald E. Knuth FontBBox -32 -250 1048 750 CapHeight 683.333 XHeight 430.556 Ascender 694.444 Descender -194.444 Comment FontID CMMI Comment DesignSize 10 (pts) Comment CharacterCodingScheme TeX math italic Comment Space 0 0 0 Comment Quad 1000 StartCharMetrics 129 C 0 ; WX 615.276 ; N Gamma ; B 39 0 723 680 ; C 1 ; WX 833.333 ; N Delta ; B 49 0 787 716 ; C 2 ; WX 762.774 ; N Theta ; B 50 -22 739 705 ; C 3 ; WX 694.444 ; N Lambda ; B 35 0 666 716 ; C 4 ; WX 742.361 ; N Xi ; B 53 0 777 677 ; C 5 ; WX 831.25 ; N Pi ; B 39 0 880 680 ; C 6 ; WX 779.861 ; N Sigma ; B 59 0 807 683 ; C 7 ; WX 583.333 ; N Upsilon ; B 29 0 700 705 ; C 8 ; WX 666.667 ; N Phi ; B 24 0 642 683 ; C 9 ; WX 612.221 ; N Psi ; B 28 0 692 683 ; C 10 ; WX 772.396 ; N Omega ; B 80 0 785 705 ; C 11 ; WX 639.7 ; N alpha ; B 41 -11 601 442 ; C 12 ; WX 565.625 ; N beta ; B 25 -194 590 705 ; C 13 ; WX 517.73 ; N gamma ; B 18 -215 542 442 ; C 14 ; WX 444.444 ; N delta ; B 41 -12 452 705 ; C 15 ; WX 405.902 ; N epsilon1 ; B 47 -11 376 431 ; C 16 ; WX 437.5 ; N zeta ; B 47 -205 474 697 ; C 17 ; WX 496.53 ; N eta ; B 29 -216 496 442 ; C 18 ; WX 469.442 ; N theta ; B 42 -11 455 705 ; C 19 ; WX 353.935 ; N iota ; B 56 -11 324 442 ; C 20 ; WX 576.159 ; N kappa ; B 55 -11 546 442 ; C 21 ; WX 583.333 ; N lambda ; B 53 -13 547 694 ; C 22 ; WX 602.548 ; N mu ; B 30 -216 572 442 ; C 23 ; WX 493.981 ; N nu ; B 53 0 524 442 ; C 24 ; WX 437.5 ; N xi ; B 24 -205 446 697 ; C 25 ; WX 570.025 ; N pi ; B 27 -11 567 431 ; C 26 ; WX 517.014 ; N rho ; B 30 -216 502 442 ; C 27 ; WX 571.429 ; N sigma ; B 38 -11 567 431 ; C 28 ; WX 437.153 ; N tau ; B 27 -12 511 431 ; C 29 ; WX 540.278 ; N upsilon ; B 29 -11 524 443 ; C 30 ; WX 595.833 ; N phi ; B 49 -205 573 694 ; C 31 ; WX 625.691 ; N chi ; B 32 -205 594 442 ; C 32 ; WX 651.39 ; N psi ; B 29 -205 635 694 ; C 33 ; WX 622.453 ; N omega ; B 13 -11 605 443 ; C 34 ; WX 466.316 ; N epsilon ; B 27 -22 428 453 ; C 35 ; WX 591.438 ; N theta1 ; B 29 -11 561 705 ; C 36 ; WX 828.125 ; N pi1 ; B 27 -11 817 431 ; C 37 ; WX 517.014 ; N rho1 ; B 74 -194 502 442 ; C 38 ; WX 362.846 ; N sigma1 ; B 32 -108 408 442 ; C 39 ; WX 654.165 ; N phi1 ; B 50 -218 619 442 ; C 40 ; WX 1000 ; N arrowlefttophalf ; B 56 230 943 428 ; C 41 ; WX 1000 ; N arrowleftbothalf ; B 56 72 943 270 ; C 42 ; WX 1000 ; N arrowrighttophalf ; B 56 230 943 428 ; C 43 ; WX 1000 ; N arrowrightbothalf ; B 56 72 943 270 ; C 44 ; WX 277.778 ; N arrowhookleft ; B 56 230 221 464 ; C 45 ; WX 277.778 ; N arrowhookright ; B 56 230 221 464 ; C 46 ; WX 500 ; N triangleright ; B 27 -4 472 504 ; C 47 ; WX 500 ; N triangleleft ; B 27 -4 472 504 ; C 48 ; WX 500 ; N zerooldstyle ; B 40 -22 459 453 ; C 49 ; WX 500 ; N oneoldstyle ; B 92 0 418 453 ; C 50 ; WX 500 ; N twooldstyle ; B 44 0 449 453 ; C 51 ; WX 500 ; N threeoldstyle ; B 42 -216 457 453 ; C 52 ; WX 500 ; N fouroldstyle ; B 28 -194 471 464 ; C 53 ; WX 500 ; N fiveoldstyle ; B 50 -216 449 453 ; C 54 ; WX 500 ; N sixoldstyle ; B 42 -22 457 666 ; C 55 ; WX 500 ; N sevenoldstyle ; B 56 -216 485 463 ; C 56 ; WX 500 ; N eightoldstyle ; B 42 -22 457 666 ; C 57 ; WX 500 ; N nineoldstyle ; B 42 -216 457 453 ; C 58 ; WX 277.778 ; N period ; B 86 0 192 106 ; C 59 ; WX 277.778 ; N comma ; B 86 -193 203 106 ; C 60 ; WX 777.778 ; N less ; B 83 -39 694 539 ; C 61 ; WX 500 ; N slash ; B 56 -250 443 750 ; C 62 ; WX 777.778 ; N greater ; B 83 -39 694 539 ; C 63 ; WX 500 ; N star ; B 4 16 496 486 ; C 64 ; WX 530.902 ; N partialdiff ; B 40 -22 566 716 ; C 65 ; WX 750 ; N A ; B 35 0 722 716 ; C 66 ; WX 758.508 ; N B ; B 42 0 756 683 ; C 67 ; WX 714.72 ; N C ; B 51 -22 759 705 ; C 68 ; WX 827.915 ; N D ; B 41 0 803 683 ; C 69 ; WX 738.193 ; N E ; B 39 0 765 680 ; C 70 ; WX 643.055 ; N F ; B 39 0 751 680 ; C 71 ; WX 786.247 ; N G ; B 51 -22 760 705 ; C 72 ; WX 831.25 ; N H ; B 39 0 881 683 ; C 73 ; WX 439.583 ; N I ; B 34 0 498 683 ; C 74 ; WX 554.512 ; N J ; B 73 -22 633 683 ; C 75 ; WX 849.305 ; N K ; B 39 0 889 683 ; C 76 ; WX 680.556 ; N L ; B 39 0 643 683 ; C 77 ; WX 970.138 ; N M ; B 43 0 1044 683 ; C 78 ; WX 803.471 ; N N ; B 39 0 881 683 ; C 79 ; WX 762.774 ; N O ; B 50 -22 739 705 ; C 80 ; WX 642.012 ; N P ; B 41 0 753 683 ; C 81 ; WX 790.553 ; N Q ; B 50 -194 739 705 ; C 82 ; WX 759.288 ; N R ; B 41 -22 755 683 ; C 83 ; WX 613.193 ; N S ; B 53 -22 645 705 ; C 84 ; WX 584.375 ; N T ; B 24 0 704 677 ; C 85 ; WX 682.776 ; N U ; B 68 -22 760 683 ; C 86 ; WX 583.333 ; N V ; B 56 -22 769 683 ; C 87 ; WX 944.444 ; N W ; B 55 -22 1048 683 ; C 88 ; WX 828.472 ; N X ; B 27 0 851 683 ; C 89 ; WX 580.556 ; N Y ; B 34 0 762 683 ; C 90 ; WX 682.638 ; N Z ; B 59 0 722 683 ; C 91 ; WX 388.889 ; N flat ; B 56 -22 332 750 ; C 92 ; WX 388.889 ; N natural ; B 79 -217 309 728 ; C 93 ; WX 388.889 ; N sharp ; B 56 -216 332 716 ; C 94 ; WX 1000 ; N slurbelow ; B 56 133 943 371 ; C 95 ; WX 1000 ; N slurabove ; B 56 130 943 381 ; C 96 ; WX 416.667 ; N lscript ; B 11 -12 398 705 ; C 97 ; WX 528.588 ; N a ; B 40 -11 498 442 ; C 98 ; WX 429.165 ; N b ; B 47 -11 415 694 ; C 99 ; WX 432.755 ; N c ; B 41 -11 430 442 ; C 100 ; WX 520.486 ; N d ; B 40 -11 517 694 ; C 101 ; WX 465.625 ; N e ; B 46 -11 430 442 ; C 102 ; WX 489.583 ; N f ; B 53 -205 552 705 ; C 103 ; WX 476.967 ; N g ; B 16 -205 474 442 ; C 104 ; WX 576.159 ; N h ; B 55 -11 546 694 ; C 105 ; WX 344.511 ; N i ; B 29 -11 293 661 ; C 106 ; WX 411.805 ; N j ; B -13 -205 397 661 ; C 107 ; WX 520.602 ; N k ; B 55 -11 508 694 ; C 108 ; WX 298.378 ; N l ; B 46 -11 260 694 ; C 109 ; WX 878.012 ; N m ; B 29 -11 848 442 ; C 110 ; WX 600.233 ; N n ; B 29 -11 571 442 ; C 111 ; WX 484.721 ; N o ; B 41 -11 469 442 ; C 112 ; WX 503.125 ; N p ; B -32 -194 490 442 ; C 113 ; WX 446.412 ; N q ; B 40 -194 453 442 ; C 114 ; WX 451.158 ; N r ; B 29 -11 436 442 ; C 115 ; WX 468.75 ; N s ; B 52 -11 419 442 ; C 116 ; WX 361.111 ; N t ; B 23 -11 330 626 ; C 117 ; WX 572.456 ; N u ; B 29 -11 543 442 ; C 118 ; WX 484.722 ; N v ; B 29 -11 468 443 ; C 119 ; WX 715.916 ; N w ; B 29 -11 691 443 ; C 120 ; WX 571.527 ; N x ; B 29 -11 527 442 ; C 121 ; WX 490.28 ; N y ; B 29 -205 490 442 ; C 122 ; WX 465.048 ; N z ; B 43 -11 467 442 ; C 123 ; WX 322.454 ; N dotlessi ; B 29 -11 293 442 ; C 124 ; WX 384.028 ; N dotlessj ; B -13 -205 360 442 ; C 125 ; WX 636.457 ; N weierstrass ; B 76 -216 618 453 ; C 126 ; WX 500 ; N vector ; B 182 516 625 714 ; C 127 ; WX 277.778 ; N tie ; B 264 538 651 665 ; C -1 ; WX 333.333 ; N space ; B 0 0 0 0 ; EndCharMetrics Comment The following are bogus kern pairs for TeX positioning of accents StartKernData StartKernPairs 166 KPX Gamma slash -55.556 KPX Gamma comma -111.111 KPX Gamma period -111.111 KPX Gamma tie 83.333 KPX Delta tie 166.667 KPX Theta tie 83.333 KPX Lambda tie 166.667 KPX Xi tie 83.333 KPX Pi slash -55.556 KPX Pi comma -55.556 KPX Pi period -55.556 KPX Pi tie 55.556 KPX Sigma tie 83.333 KPX Upsilon slash -55.556 KPX Upsilon comma -111.111 KPX Upsilon period -111.111 KPX Upsilon tie 55.556 KPX Phi tie 83.333 KPX Psi slash -55.556 KPX Psi comma -55.556 KPX Psi period -55.556 KPX Psi tie 55.556 KPX Omega tie 83.333 KPX alpha tie 27.778 KPX beta tie 83.333 KPX delta comma -55.556 KPX delta period -55.556 KPX delta tie 55.556 KPX epsilon1 tie 55.556 KPX zeta tie 83.333 KPX eta tie 55.556 KPX theta tie 83.333 KPX iota tie 55.556 KPX mu tie 27.778 KPX nu comma -55.556 KPX nu period -55.556 KPX nu tie 27.778 KPX xi tie 111.111 KPX rho tie 83.333 KPX sigma comma -55.556 KPX sigma period -55.556 KPX tau comma -55.556 KPX tau period -55.556 KPX tau tie 27.778 KPX upsilon tie 27.778 KPX phi tie 83.333 KPX chi tie 55.556 KPX psi tie 111.111 KPX epsilon tie 83.333 KPX theta1 tie 83.333 KPX rho1 tie 83.333 KPX sigma1 tie 83.333 KPX phi1 tie 83.333 KPX slash Delta -55.556 KPX slash A -55.556 KPX slash M -55.556 KPX slash N -55.556 KPX slash Y 55.556 KPX slash Z -55.556 KPX partialdiff tie 83.333 KPX A tie 138.889 KPX B tie 83.333 KPX C slash -27.778 KPX C comma -55.556 KPX C period -55.556 KPX C tie 83.333 KPX D tie 55.556 KPX E tie 83.333 KPX F slash -55.556 KPX F comma -111.111 KPX F period -111.111 KPX F tie 83.333 KPX G tie 83.333 KPX H slash -55.556 KPX H comma -55.556 KPX H period -55.556 KPX H tie 55.556 KPX I tie 111.111 KPX J slash -55.556 KPX J comma -111.111 KPX J period -111.111 KPX J tie 166.667 KPX K slash -55.556 KPX K comma -55.556 KPX K period -55.556 KPX K tie 55.556 KPX L tie 27.778 KPX M slash -55.556 KPX M comma -55.556 KPX M period -55.556 KPX M tie 83.333 KPX N slash -83.333 KPX N slash -27.778 KPX N comma -55.556 KPX N period -55.556 KPX N tie 83.333 KPX O tie 83.333 KPX P slash -55.556 KPX P comma -111.111 KPX P period -111.111 KPX P tie 83.333 KPX Q tie 83.333 KPX R tie 83.333 KPX S slash -55.556 KPX S comma -55.556 KPX S period -55.556 KPX S tie 83.333 KPX T slash -27.778 KPX T comma -55.556 KPX T period -55.556 KPX T tie 83.333 KPX U comma -111.111 KPX U period -111.111 KPX U slash -55.556 KPX U tie 27.778 KPX V comma -166.667 KPX V period -166.667 KPX V slash -111.111 KPX W comma -166.667 KPX W period -166.667 KPX W slash -111.111 KPX X slash -83.333 KPX X slash -27.778 KPX X comma -55.556 KPX X period -55.556 KPX X tie 83.333 KPX Y comma -166.667 KPX Y period -166.667 KPX Y slash -111.111 KPX Z slash -55.556 KPX Z comma -55.556 KPX Z period -55.556 KPX Z tie 83.333 KPX lscript tie 111.111 KPX c tie 55.556 KPX d Y 55.556 KPX d Z -55.556 KPX d j -111.111 KPX d f -166.667 KPX d tie 166.667 KPX e tie 55.556 KPX f comma -55.556 KPX f period -55.556 KPX f tie 166.667 KPX g tie 27.778 KPX h tie -27.778 KPX j comma -55.556 KPX j period -55.556 KPX l tie 83.333 KPX o tie 55.556 KPX p tie 83.333 KPX q tie 83.333 KPX r comma -55.556 KPX r period -55.556 KPX r tie 55.556 KPX s tie 55.556 KPX t tie 83.333 KPX u tie 27.778 KPX v tie 27.778 KPX w tie 83.333 KPX x tie 27.778 KPX y tie 55.556 KPX z tie 55.556 KPX dotlessi tie 27.778 KPX dotlessj tie 83.333 KPX weierstrass tie 111.111 EndKernPairs EndKernData EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/cmr10.afm ================================================ StartFontMetrics 2.0 Comment Creation Date: Thu Jun 21 22:23:28 1990 Comment UniqueID 5000793 FontName CMR10 EncodingScheme FontSpecific FullName CMR10 FamilyName Computer Modern Weight Medium ItalicAngle 0.0 IsFixedPitch false Version 1.00B Notice Copyright (c) 1997 American Mathematical Society. All Rights Reserved. Comment Computer Modern fonts were designed by Donald E. Knuth FontBBox -40 -250 1009 969 CapHeight 683.333 XHeight 430.556 Ascender 694.444 Descender -194.444 Comment FontID CMR Comment DesignSize 10 (pts) Comment CharacterCodingScheme TeX text Comment Space 333.333 166.667 111.111 Comment ExtraSpace 111.111 Comment Quad 1000 StartCharMetrics 129 C 0 ; WX 625 ; N Gamma ; B 33 0 582 680 ; C 1 ; WX 833.333 ; N Delta ; B 47 0 785 716 ; C 2 ; WX 777.778 ; N Theta ; B 56 -22 721 705 ; C 3 ; WX 694.444 ; N Lambda ; B 32 0 661 716 ; C 4 ; WX 666.667 ; N Xi ; B 42 0 624 677 ; C 5 ; WX 750 ; N Pi ; B 33 0 716 680 ; C 6 ; WX 722.222 ; N Sigma ; B 56 0 665 683 ; C 7 ; WX 777.778 ; N Upsilon ; B 56 0 721 705 ; C 8 ; WX 722.222 ; N Phi ; B 56 0 665 683 ; C 9 ; WX 777.778 ; N Psi ; B 57 0 720 683 ; C 10 ; WX 722.222 ; N Omega ; B 44 0 677 705 ; C 11 ; WX 583.333 ; N ff ; B 27 0 628 705 ; L i ffi ; L l ffl ; C 12 ; WX 555.556 ; N fi ; B 27 0 527 705 ; C 13 ; WX 555.556 ; N fl ; B 27 0 527 705 ; C 14 ; WX 833.333 ; N ffi ; B 27 0 804 705 ; C 15 ; WX 833.333 ; N ffl ; B 27 0 804 705 ; C 16 ; WX 277.778 ; N dotlessi ; B 33 0 247 442 ; C 17 ; WX 305.556 ; N dotlessj ; B -40 -205 210 442 ; C 18 ; WX 500 ; N grave ; B 107 510 293 698 ; C 19 ; WX 500 ; N acute ; B 206 510 392 698 ; C 20 ; WX 500 ; N caron ; B 118 516 381 638 ; C 21 ; WX 500 ; N breve ; B 100 522 399 694 ; C 22 ; WX 500 ; N macron ; B 69 559 430 590 ; C 23 ; WX 750 ; N ring ; B 279 541 470 716 ; C 24 ; WX 444.444 ; N cedilla ; B 131 -203 367 -22 ; C 25 ; WX 500 ; N germandbls ; B 28 -11 471 705 ; C 26 ; WX 722.222 ; N ae ; B 45 -11 693 448 ; C 27 ; WX 777.778 ; N oe ; B 28 -11 749 448 ; C 28 ; WX 500 ; N oslash ; B 35 -102 464 534 ; C 29 ; WX 902.778 ; N AE ; B 32 0 874 683 ; C 30 ; WX 1013.89 ; N OE ; B 70 -22 985 705 ; C 31 ; WX 777.778 ; N Oslash ; B 56 -56 721 739 ; C 32 ; WX 277.778 ; N suppress ; B 27 280 262 392 ; C 33 ; WX 277.778 ; N exclam ; B 86 0 192 716 ; L quoteleft exclamdown ; C 34 ; WX 500 ; N quotedblright ; B 33 395 347 694 ; C 35 ; WX 833.333 ; N numbersign ; B 56 -194 776 694 ; C 36 ; WX 500 ; N dollar ; B 56 -56 443 750 ; C 37 ; WX 833.333 ; N percent ; B 56 -56 776 750 ; C 38 ; WX 777.778 ; N ampersand ; B 42 -22 727 716 ; C 39 ; WX 277.778 ; N quoteright ; B 86 395 206 694 ; L quoteright quotedblright ; C 40 ; WX 388.889 ; N parenleft ; B 99 -250 331 750 ; C 41 ; WX 388.889 ; N parenright ; B 57 -250 289 750 ; C 42 ; WX 500 ; N asterisk ; B 65 319 434 750 ; C 43 ; WX 777.778 ; N plus ; B 56 -83 721 583 ; C 44 ; WX 277.778 ; N comma ; B 86 -193 203 106 ; C 45 ; WX 333.333 ; N hyphen ; B 11 187 276 245 ; L hyphen endash ; C 46 ; WX 277.778 ; N period ; B 86 0 192 106 ; C 47 ; WX 500 ; N slash ; B 56 -250 443 750 ; C 48 ; WX 500 ; N zero ; B 39 -22 460 666 ; C 49 ; WX 500 ; N one ; B 89 0 419 666 ; C 50 ; WX 500 ; N two ; B 50 0 449 666 ; C 51 ; WX 500 ; N three ; B 42 -22 457 666 ; C 52 ; WX 500 ; N four ; B 28 0 471 677 ; C 53 ; WX 500 ; N five ; B 50 -22 449 666 ; C 54 ; WX 500 ; N six ; B 42 -22 457 666 ; C 55 ; WX 500 ; N seven ; B 56 -22 485 676 ; C 56 ; WX 500 ; N eight ; B 42 -22 457 666 ; C 57 ; WX 500 ; N nine ; B 42 -22 457 666 ; C 58 ; WX 277.778 ; N colon ; B 86 0 192 431 ; C 59 ; WX 277.778 ; N semicolon ; B 86 -193 195 431 ; C 60 ; WX 277.778 ; N exclamdown ; B 86 -216 192 500 ; C 61 ; WX 777.778 ; N equal ; B 56 133 721 367 ; C 62 ; WX 472.222 ; N questiondown ; B 56 -205 415 500 ; C 63 ; WX 472.222 ; N question ; B 56 0 415 705 ; L quoteleft questiondown ; C 64 ; WX 777.778 ; N at ; B 56 -11 721 705 ; C 65 ; WX 750 ; N A ; B 32 0 717 716 ; C 66 ; WX 708.333 ; N B ; B 36 0 651 683 ; C 67 ; WX 722.222 ; N C ; B 56 -22 665 705 ; C 68 ; WX 763.889 ; N D ; B 35 0 707 683 ; C 69 ; WX 680.556 ; N E ; B 33 0 652 680 ; C 70 ; WX 652.778 ; N F ; B 33 0 610 680 ; C 71 ; WX 784.722 ; N G ; B 56 -22 735 705 ; C 72 ; WX 750 ; N H ; B 33 0 716 683 ; C 73 ; WX 361.111 ; N I ; B 28 0 333 683 ; C 74 ; WX 513.889 ; N J ; B 41 -22 465 683 ; C 75 ; WX 777.778 ; N K ; B 33 0 736 683 ; C 76 ; WX 625 ; N L ; B 33 0 582 683 ; C 77 ; WX 916.667 ; N M ; B 37 0 879 683 ; C 78 ; WX 750 ; N N ; B 33 0 716 683 ; C 79 ; WX 777.778 ; N O ; B 56 -22 721 705 ; C 80 ; WX 680.556 ; N P ; B 35 0 624 683 ; C 81 ; WX 777.778 ; N Q ; B 56 -194 727 705 ; C 82 ; WX 736.111 ; N R ; B 35 -22 732 683 ; C 83 ; WX 555.556 ; N S ; B 56 -22 499 705 ; C 84 ; WX 722.222 ; N T ; B 36 0 685 677 ; C 85 ; WX 750 ; N U ; B 33 -22 716 683 ; C 86 ; WX 750 ; N V ; B 19 -22 730 683 ; C 87 ; WX 1027.78 ; N W ; B 18 -22 1009 683 ; C 88 ; WX 750 ; N X ; B 24 0 726 683 ; C 89 ; WX 750 ; N Y ; B 11 0 738 683 ; C 90 ; WX 611.111 ; N Z ; B 56 0 560 683 ; C 91 ; WX 277.778 ; N bracketleft ; B 118 -250 255 750 ; C 92 ; WX 500 ; N quotedblleft ; B 152 394 466 693 ; C 93 ; WX 277.778 ; N bracketright ; B 22 -250 159 750 ; C 94 ; WX 500 ; N circumflex ; B 116 540 383 694 ; C 95 ; WX 277.778 ; N dotaccent ; B 85 563 192 669 ; C 96 ; WX 277.778 ; N quoteleft ; B 72 394 192 693 ; L quoteleft quotedblleft ; C 97 ; WX 500 ; N a ; B 42 -11 493 448 ; C 98 ; WX 555.556 ; N b ; B 28 -11 521 694 ; C 99 ; WX 444.444 ; N c ; B 34 -11 415 448 ; C 100 ; WX 555.556 ; N d ; B 34 -11 527 694 ; C 101 ; WX 444.444 ; N e ; B 28 -11 415 448 ; C 102 ; WX 305.556 ; N f ; B 33 0 357 705 ; L i fi ; L f ff ; L l fl ; C 103 ; WX 500 ; N g ; B 28 -206 485 453 ; C 104 ; WX 555.556 ; N h ; B 32 0 535 694 ; C 105 ; WX 277.778 ; N i ; B 33 0 247 669 ; C 106 ; WX 305.556 ; N j ; B -40 -205 210 669 ; C 107 ; WX 527.778 ; N k ; B 28 0 511 694 ; C 108 ; WX 277.778 ; N l ; B 33 0 255 694 ; C 109 ; WX 833.333 ; N m ; B 32 0 813 442 ; C 110 ; WX 555.556 ; N n ; B 32 0 535 442 ; C 111 ; WX 500 ; N o ; B 28 -11 471 448 ; C 112 ; WX 555.556 ; N p ; B 28 -194 521 442 ; C 113 ; WX 527.778 ; N q ; B 34 -194 527 442 ; C 114 ; WX 391.667 ; N r ; B 28 0 364 442 ; C 115 ; WX 394.444 ; N s ; B 33 -11 360 448 ; C 116 ; WX 388.889 ; N t ; B 19 -11 332 615 ; C 117 ; WX 555.556 ; N u ; B 32 -11 535 442 ; C 118 ; WX 527.778 ; N v ; B 19 -11 508 431 ; C 119 ; WX 722.222 ; N w ; B 18 -11 703 431 ; C 120 ; WX 527.778 ; N x ; B 12 0 516 431 ; C 121 ; WX 527.778 ; N y ; B 19 -205 508 431 ; C 122 ; WX 444.444 ; N z ; B 28 0 401 431 ; C 123 ; WX 500 ; N endash ; B 0 255 499 277 ; L hyphen emdash ; C 124 ; WX 1000 ; N emdash ; B 0 255 999 277 ; C 125 ; WX 500 ; N hungarumlaut ; B 128 513 420 699 ; C 126 ; WX 500 ; N tilde ; B 83 575 416 668 ; C 127 ; WX 500 ; N dieresis ; B 103 569 396 669 ; C -1 ; WX 333.333 ; N space ; B 0 0 0 0 ; EndCharMetrics StartKernData StartKernPairs 183 KPX ff quoteright 77.778 KPX ff question 77.778 KPX ff exclam 77.778 KPX ff parenright 77.778 KPX ff bracketright 77.778 KPX suppress l -277.778 KPX suppress L -319.444 KPX quoteright question 111.111 KPX quoteright exclam 111.111 KPX A t -27.778 KPX A C -27.778 KPX A O -27.778 KPX A G -27.778 KPX A U -27.778 KPX A Q -27.778 KPX A T -83.333 KPX A Y -83.333 KPX A V -111.111 KPX A W -111.111 KPX D X -27.778 KPX D W -27.778 KPX D A -27.778 KPX D V -27.778 KPX D Y -27.778 KPX F o -83.333 KPX F e -83.333 KPX F u -83.333 KPX F r -83.333 KPX F a -83.333 KPX F A -111.111 KPX F O -27.778 KPX F C -27.778 KPX F G -27.778 KPX F Q -27.778 KPX I I 27.778 KPX K O -27.778 KPX K C -27.778 KPX K G -27.778 KPX K Q -27.778 KPX L T -83.333 KPX L Y -83.333 KPX L V -111.111 KPX L W -111.111 KPX O X -27.778 KPX O W -27.778 KPX O A -27.778 KPX O V -27.778 KPX O Y -27.778 KPX P A -83.333 KPX P o -27.778 KPX P e -27.778 KPX P a -27.778 KPX P period -83.333 KPX P comma -83.333 KPX R t -27.778 KPX R C -27.778 KPX R O -27.778 KPX R G -27.778 KPX R U -27.778 KPX R Q -27.778 KPX R T -83.333 KPX R Y -83.333 KPX R V -111.111 KPX R W -111.111 KPX T y -27.778 KPX T e -83.333 KPX T o -83.333 KPX T r -83.333 KPX T a -83.333 KPX T A -83.333 KPX T u -83.333 KPX V o -83.333 KPX V e -83.333 KPX V u -83.333 KPX V r -83.333 KPX V a -83.333 KPX V A -111.111 KPX V O -27.778 KPX V C -27.778 KPX V G -27.778 KPX V Q -27.778 KPX W o -83.333 KPX W e -83.333 KPX W u -83.333 KPX W r -83.333 KPX W a -83.333 KPX W A -111.111 KPX W O -27.778 KPX W C -27.778 KPX W G -27.778 KPX W Q -27.778 KPX X O -27.778 KPX X C -27.778 KPX X G -27.778 KPX X Q -27.778 KPX Y e -83.333 KPX Y o -83.333 KPX Y r -83.333 KPX Y a -83.333 KPX Y A -83.333 KPX Y u -83.333 KPX a v -27.778 KPX a j 55.556 KPX a y -27.778 KPX a w -27.778 KPX b e 27.778 KPX b o 27.778 KPX b x -27.778 KPX b d 27.778 KPX b c 27.778 KPX b q 27.778 KPX b v -27.778 KPX b j 55.556 KPX b y -27.778 KPX b w -27.778 KPX c h -27.778 KPX c k -27.778 KPX f quoteright 77.778 KPX f question 77.778 KPX f exclam 77.778 KPX f parenright 77.778 KPX f bracketright 77.778 KPX g j 27.778 KPX h t -27.778 KPX h u -27.778 KPX h b -27.778 KPX h y -27.778 KPX h v -27.778 KPX h w -27.778 KPX k a -55.556 KPX k e -27.778 KPX k a -27.778 KPX k o -27.778 KPX k c -27.778 KPX m t -27.778 KPX m u -27.778 KPX m b -27.778 KPX m y -27.778 KPX m v -27.778 KPX m w -27.778 KPX n t -27.778 KPX n u -27.778 KPX n b -27.778 KPX n y -27.778 KPX n v -27.778 KPX n w -27.778 KPX o e 27.778 KPX o o 27.778 KPX o x -27.778 KPX o d 27.778 KPX o c 27.778 KPX o q 27.778 KPX o v -27.778 KPX o j 55.556 KPX o y -27.778 KPX o w -27.778 KPX p e 27.778 KPX p o 27.778 KPX p x -27.778 KPX p d 27.778 KPX p c 27.778 KPX p q 27.778 KPX p v -27.778 KPX p j 55.556 KPX p y -27.778 KPX p w -27.778 KPX t y -27.778 KPX t w -27.778 KPX u w -27.778 KPX v a -55.556 KPX v e -27.778 KPX v a -27.778 KPX v o -27.778 KPX v c -27.778 KPX w e -27.778 KPX w a -27.778 KPX w o -27.778 KPX w c -27.778 KPX y o -27.778 KPX y e -27.778 KPX y a -27.778 KPX y period -83.333 KPX y comma -83.333 EndKernPairs EndKernData EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/cmsy10.afm ================================================ StartFontMetrics 2.0 Comment Creation Date: Thu Jun 21 22:23:44 1990 Comment UniqueID 5000820 FontName CMSY10 EncodingScheme FontSpecific FullName CMSY10 FamilyName Computer Modern Weight Medium ItalicAngle -14.035 IsFixedPitch false Version 1.00 Notice Copyright (c) 1997 American Mathematical Society. All Rights Reserved. Comment Computer Modern fonts were designed by Donald E. Knuth FontBBox -29 -960 1116 775 CapHeight 683.333 XHeight 430.556 Ascender 694.444 Descender -960 Comment FontID CMSY Comment DesignSize 10 (pts) Comment CharacterCodingScheme TeX math symbols Comment Space 0 0 0 Comment ExtraSpace 0 Comment Quad 1000 Comment Num 676.508 393.732 443.731 Comment Denom 685.951 344.841 Comment Sup 412.892 362.892 288.889 Comment Sub 150 247.217 Comment Supdrop 386.108 Comment Subdrop 50 Comment Delim 2390 1010 Comment Axisheight 250 StartCharMetrics 129 C 0 ; WX 777.778 ; N minus ; B 83 230 694 270 ; C 1 ; WX 277.778 ; N periodcentered ; B 86 197 192 303 ; C 2 ; WX 777.778 ; N multiply ; B 147 9 630 491 ; C 3 ; WX 500 ; N asteriskmath ; B 65 34 434 465 ; C 4 ; WX 777.778 ; N divide ; B 56 -30 722 530 ; C 5 ; WX 500 ; N diamondmath ; B 11 11 489 489 ; C 6 ; WX 777.778 ; N plusminus ; B 56 0 721 666 ; C 7 ; WX 777.778 ; N minusplus ; B 56 -166 721 500 ; C 8 ; WX 777.778 ; N circleplus ; B 56 -83 721 583 ; C 9 ; WX 777.778 ; N circleminus ; B 56 -83 721 583 ; C 10 ; WX 777.778 ; N circlemultiply ; B 56 -83 721 583 ; C 11 ; WX 777.778 ; N circledivide ; B 56 -83 721 583 ; C 12 ; WX 777.778 ; N circledot ; B 56 -83 721 583 ; C 13 ; WX 1000 ; N circlecopyrt ; B 56 -216 943 716 ; C 14 ; WX 500 ; N openbullet ; B 56 56 443 444 ; C 15 ; WX 500 ; N bullet ; B 56 56 443 444 ; C 16 ; WX 777.778 ; N equivasymptotic ; B 56 16 721 484 ; C 17 ; WX 777.778 ; N equivalence ; B 56 36 721 464 ; C 18 ; WX 777.778 ; N reflexsubset ; B 83 -137 694 636 ; C 19 ; WX 777.778 ; N reflexsuperset ; B 83 -137 694 636 ; C 20 ; WX 777.778 ; N lessequal ; B 83 -137 694 636 ; C 21 ; WX 777.778 ; N greaterequal ; B 83 -137 694 636 ; C 22 ; WX 777.778 ; N precedesequal ; B 83 -137 694 636 ; C 23 ; WX 777.778 ; N followsequal ; B 83 -137 694 636 ; C 24 ; WX 777.778 ; N similar ; B 56 133 721 367 ; C 25 ; WX 777.778 ; N approxequal ; B 56 56 721 483 ; C 26 ; WX 777.778 ; N propersubset ; B 83 -40 694 540 ; C 27 ; WX 777.778 ; N propersuperset ; B 83 -40 694 540 ; C 28 ; WX 1000 ; N lessmuch ; B 56 -66 943 566 ; C 29 ; WX 1000 ; N greatermuch ; B 56 -66 943 566 ; C 30 ; WX 777.778 ; N precedes ; B 83 -40 694 539 ; C 31 ; WX 777.778 ; N follows ; B 83 -40 694 539 ; C 32 ; WX 1000 ; N arrowleft ; B 57 72 943 428 ; C 33 ; WX 1000 ; N arrowright ; B 56 72 942 428 ; C 34 ; WX 500 ; N arrowup ; B 72 -194 428 693 ; C 35 ; WX 500 ; N arrowdown ; B 72 -193 428 694 ; C 36 ; WX 1000 ; N arrowboth ; B 57 72 942 428 ; C 37 ; WX 1000 ; N arrownortheast ; B 56 -193 946 697 ; C 38 ; WX 1000 ; N arrowsoutheast ; B 56 -197 946 693 ; C 39 ; WX 777.778 ; N similarequal ; B 56 36 721 464 ; C 40 ; WX 1000 ; N arrowdblleft ; B 57 -25 943 525 ; C 41 ; WX 1000 ; N arrowdblright ; B 56 -25 942 525 ; C 42 ; WX 611.111 ; N arrowdblup ; B 30 -194 580 694 ; C 43 ; WX 611.111 ; N arrowdbldown ; B 30 -194 580 694 ; C 44 ; WX 1000 ; N arrowdblboth ; B 35 -25 964 525 ; C 45 ; WX 1000 ; N arrownorthwest ; B 53 -193 943 697 ; C 46 ; WX 1000 ; N arrowsouthwest ; B 53 -197 943 693 ; C 47 ; WX 777.778 ; N proportional ; B 56 -11 722 442 ; C 48 ; WX 275 ; N prime ; B 29 45 262 559 ; C 49 ; WX 1000 ; N infinity ; B 56 -11 943 442 ; C 50 ; WX 666.667 ; N element ; B 83 -40 583 540 ; C 51 ; WX 666.667 ; N owner ; B 83 -40 583 540 ; C 52 ; WX 888.889 ; N triangle ; B 59 0 829 716 ; C 53 ; WX 888.889 ; N triangleinv ; B 59 -216 829 500 ; C 54 ; WX 0 ; N negationslash ; B 139 -216 638 716 ; C 55 ; WX 0 ; N mapsto ; B 56 64 124 436 ; C 56 ; WX 555.556 ; N universal ; B 0 -22 556 694 ; C 57 ; WX 555.556 ; N existential ; B 56 0 499 694 ; C 58 ; WX 666.667 ; N logicalnot ; B 56 89 610 356 ; C 59 ; WX 500 ; N emptyset ; B 47 -78 452 772 ; C 60 ; WX 722.222 ; N Rfractur ; B 46 -22 714 716 ; C 61 ; WX 722.222 ; N Ifractur ; B 56 -11 693 705 ; C 62 ; WX 777.778 ; N latticetop ; B 56 0 722 666 ; C 63 ; WX 777.778 ; N perpendicular ; B 56 0 722 666 ; C 64 ; WX 611.111 ; N aleph ; B 56 0 554 693 ; C 65 ; WX 798.469 ; N A ; B 27 -50 798 722 ; C 66 ; WX 656.808 ; N B ; B 30 -22 665 706 ; C 67 ; WX 526.527 ; N C ; B 12 -24 534 705 ; C 68 ; WX 771.391 ; N D ; B 20 0 766 683 ; C 69 ; WX 527.778 ; N E ; B 28 -22 565 705 ; C 70 ; WX 718.75 ; N F ; B 17 -33 829 683 ; C 71 ; WX 594.864 ; N G ; B 44 -119 601 705 ; C 72 ; WX 844.516 ; N H ; B 20 -47 818 683 ; C 73 ; WX 544.513 ; N I ; B -24 0 635 683 ; C 74 ; WX 677.778 ; N J ; B 47 -119 840 683 ; C 75 ; WX 761.949 ; N K ; B 30 -22 733 705 ; C 76 ; WX 689.723 ; N L ; B 31 -22 656 705 ; C 77 ; WX 1200.9 ; N M ; B 27 -50 1116 705 ; C 78 ; WX 820.489 ; N N ; B -29 -50 978 775 ; C 79 ; WX 796.112 ; N O ; B 57 -22 777 705 ; C 80 ; WX 695.558 ; N P ; B 20 -50 733 683 ; C 81 ; WX 816.667 ; N Q ; B 113 -124 788 705 ; C 82 ; WX 847.502 ; N R ; B 20 -22 837 683 ; C 83 ; WX 605.556 ; N S ; B 18 -22 642 705 ; C 84 ; WX 544.643 ; N T ; B 29 0 798 717 ; C 85 ; WX 625.83 ; N U ; B -17 -28 688 683 ; C 86 ; WX 612.781 ; N V ; B 35 -45 660 683 ; C 87 ; WX 987.782 ; N W ; B 35 -45 1036 683 ; C 88 ; WX 713.295 ; N X ; B 50 0 808 683 ; C 89 ; WX 668.335 ; N Y ; B 31 -135 717 683 ; C 90 ; WX 724.724 ; N Z ; B 37 0 767 683 ; C 91 ; WX 666.667 ; N union ; B 56 -22 610 598 ; C 92 ; WX 666.667 ; N intersection ; B 56 -22 610 598 ; C 93 ; WX 666.667 ; N unionmulti ; B 56 -22 610 598 ; C 94 ; WX 666.667 ; N logicaland ; B 56 -22 610 598 ; C 95 ; WX 666.667 ; N logicalor ; B 56 -22 610 598 ; C 96 ; WX 611.111 ; N turnstileleft ; B 56 0 554 694 ; C 97 ; WX 611.111 ; N turnstileright ; B 56 0 554 694 ; C 98 ; WX 444.444 ; N floorleft ; B 174 -250 422 750 ; C 99 ; WX 444.444 ; N floorright ; B 21 -250 269 750 ; C 100 ; WX 444.444 ; N ceilingleft ; B 174 -250 422 750 ; C 101 ; WX 444.444 ; N ceilingright ; B 21 -250 269 750 ; C 102 ; WX 500 ; N braceleft ; B 72 -250 427 750 ; C 103 ; WX 500 ; N braceright ; B 72 -250 427 750 ; C 104 ; WX 388.889 ; N angbracketleft ; B 110 -250 332 750 ; C 105 ; WX 388.889 ; N angbracketright ; B 56 -250 278 750 ; C 106 ; WX 277.778 ; N bar ; B 119 -250 159 750 ; C 107 ; WX 500 ; N bardbl ; B 132 -250 367 750 ; C 108 ; WX 500 ; N arrowbothv ; B 72 -272 428 772 ; C 109 ; WX 611.111 ; N arrowdblbothv ; B 30 -272 580 772 ; C 110 ; WX 500 ; N backslash ; B 56 -250 443 750 ; C 111 ; WX 277.778 ; N wreathproduct ; B 56 -83 221 583 ; C 112 ; WX 833.333 ; N radical ; B 73 -960 853 40 ; C 113 ; WX 750 ; N coproduct ; B 36 0 713 683 ; C 114 ; WX 833.333 ; N nabla ; B 47 -33 785 683 ; C 115 ; WX 416.667 ; N integral ; B 56 -216 471 716 ; C 116 ; WX 666.667 ; N unionsq ; B 61 0 605 598 ; C 117 ; WX 666.667 ; N intersectionsq ; B 61 0 605 598 ; C 118 ; WX 777.778 ; N subsetsqequal ; B 83 -137 714 636 ; C 119 ; WX 777.778 ; N supersetsqequal ; B 63 -137 694 636 ; C 120 ; WX 444.444 ; N section ; B 69 -205 374 705 ; C 121 ; WX 444.444 ; N dagger ; B 56 -216 387 705 ; C 122 ; WX 444.444 ; N daggerdbl ; B 56 -205 387 705 ; C 123 ; WX 611.111 ; N paragraph ; B 56 -194 582 694 ; C 124 ; WX 777.778 ; N club ; B 28 -130 750 727 ; C 125 ; WX 777.778 ; N diamond ; B 56 -163 722 727 ; C 126 ; WX 777.778 ; N heart ; B 56 -33 722 716 ; C 127 ; WX 777.778 ; N spade ; B 56 -130 722 727 ; C -1 ; WX 333.333 ; N space ; B 0 0 0 0 ; EndCharMetrics Comment The following are bogus kern pairs for TeX positioning of accents StartKernData StartKernPairs 26 KPX A prime 194.444 KPX B prime 138.889 KPX C prime 138.889 KPX D prime 83.333 KPX E prime 111.111 KPX F prime 111.111 KPX G prime 111.111 KPX H prime 111.111 KPX I prime 27.778 KPX J prime 166.667 KPX K prime 55.556 KPX L prime 138.889 KPX M prime 138.889 KPX N prime 83.333 KPX O prime 111.111 KPX P prime 83.333 KPX Q prime 111.111 KPX R prime 83.333 KPX S prime 138.889 KPX T prime 27.778 KPX U prime 83.333 KPX V prime 27.778 KPX W prime 83.333 KPX X prime 138.889 KPX Y prime 83.333 KPX Z prime 138.889 EndKernPairs EndKernData EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/cmtt10.afm ================================================ StartFontMetrics 2.0 Comment Creation Date: Thu Jun 21 22:23:51 1990 Comment UniqueID 5000832 FontName CMTT10 EncodingScheme FontSpecific FullName CMTT10 FamilyName Computer Modern Weight Medium ItalicAngle 0.0 IsFixedPitch true Version 1.00B Notice Copyright (c) 1997 American Mathematical Society. All Rights Reserved. Comment Computer Modern fonts were designed by Donald E. Knuth FontBBox -4 -235 731 800 CapHeight 611.111 XHeight 430.556 Ascender 611.111 Descender -222.222 Comment FontID CMTT Comment DesignSize 10 (pts) Comment CharacterCodingScheme TeX typewriter text Comment Space 525 0 0 Comment ExtraSpace 525 Comment Quad 1050 StartCharMetrics 129 C 0 ; WX 525 ; N Gamma ; B 32 0 488 611 ; C 1 ; WX 525 ; N Delta ; B 34 0 490 623 ; C 2 ; WX 525 ; N Theta ; B 56 -11 468 622 ; C 3 ; WX 525 ; N Lambda ; B 29 0 495 623 ; C 4 ; WX 525 ; N Xi ; B 33 0 491 611 ; C 5 ; WX 525 ; N Pi ; B 22 0 502 611 ; C 6 ; WX 525 ; N Sigma ; B 40 0 484 611 ; C 7 ; WX 525 ; N Upsilon ; B 38 0 486 622 ; C 8 ; WX 525 ; N Phi ; B 40 0 484 611 ; C 9 ; WX 525 ; N Psi ; B 38 0 486 611 ; C 10 ; WX 525 ; N Omega ; B 32 0 492 622 ; C 11 ; WX 525 ; N arrowup ; B 59 0 465 611 ; C 12 ; WX 525 ; N arrowdown ; B 59 0 465 611 ; C 13 ; WX 525 ; N quotesingle ; B 217 328 309 622 ; C 14 ; WX 525 ; N exclamdown ; B 212 -233 312 389 ; C 15 ; WX 525 ; N questiondown ; B 62 -228 462 389 ; C 16 ; WX 525 ; N dotlessi ; B 78 0 455 431 ; C 17 ; WX 525 ; N dotlessj ; B 48 -228 368 431 ; C 18 ; WX 525 ; N grave ; B 117 477 329 611 ; C 19 ; WX 525 ; N acute ; B 195 477 407 611 ; C 20 ; WX 525 ; N caron ; B 101 454 423 572 ; C 21 ; WX 525 ; N breve ; B 86 498 438 611 ; C 22 ; WX 525 ; N macron ; B 73 514 451 577 ; C 23 ; WX 525 ; N ring ; B 181 499 343 619 ; C 24 ; WX 525 ; N cedilla ; B 162 -208 428 45 ; C 25 ; WX 525 ; N germandbls ; B 17 -6 495 617 ; C 26 ; WX 525 ; N ae ; B 33 -6 504 440 ; C 27 ; WX 525 ; N oe ; B 19 -6 505 440 ; C 28 ; WX 525 ; N oslash ; B 43 -140 481 571 ; C 29 ; WX 525 ; N AE ; B 23 0 499 611 ; C 30 ; WX 525 ; N OE ; B 29 -11 502 622 ; C 31 ; WX 525 ; N Oslash ; B 56 -85 468 696 ; C 32 ; WX 525 ; N visiblespace ; B 44 -132 480 240 ; C 33 ; WX 525 ; N exclam ; B 212 0 312 622 ; L quoteleft exclamdown ; C 34 ; WX 525 ; N quotedbl ; B 126 328 398 622 ; C 35 ; WX 525 ; N numbersign ; B 35 0 489 611 ; C 36 ; WX 525 ; N dollar ; B 58 -83 466 694 ; C 37 ; WX 525 ; N percent ; B 35 -83 489 694 ; C 38 ; WX 525 ; N ampersand ; B 28 -11 490 622 ; C 39 ; WX 525 ; N quoteright ; B 180 302 341 611 ; C 40 ; WX 525 ; N parenleft ; B 173 -82 437 694 ; C 41 ; WX 525 ; N parenright ; B 88 -82 352 694 ; C 42 ; WX 525 ; N asterisk ; B 68 90 456 521 ; C 43 ; WX 525 ; N plus ; B 38 81 486 531 ; C 44 ; WX 525 ; N comma ; B 180 -139 346 125 ; C 45 ; WX 525 ; N hyphen ; B 56 271 468 341 ; C 46 ; WX 525 ; N period ; B 200 0 325 125 ; C 47 ; WX 525 ; N slash ; B 58 -83 466 694 ; C 48 ; WX 525 ; N zero ; B 50 -11 474 622 ; C 49 ; WX 525 ; N one ; B 105 0 442 622 ; C 50 ; WX 525 ; N two ; B 52 0 472 622 ; C 51 ; WX 525 ; N three ; B 44 -11 480 622 ; C 52 ; WX 525 ; N four ; B 29 0 495 623 ; C 53 ; WX 525 ; N five ; B 52 -11 472 611 ; C 54 ; WX 525 ; N six ; B 53 -11 471 622 ; C 55 ; WX 525 ; N seven ; B 44 -11 480 627 ; C 56 ; WX 525 ; N eight ; B 44 -11 480 622 ; C 57 ; WX 525 ; N nine ; B 53 -11 471 622 ; C 58 ; WX 525 ; N colon ; B 200 0 325 431 ; C 59 ; WX 525 ; N semicolon ; B 180 -139 330 431 ; C 60 ; WX 525 ; N less ; B 56 56 468 556 ; C 61 ; WX 525 ; N equal ; B 38 195 486 417 ; C 62 ; WX 525 ; N greater ; B 56 56 468 556 ; C 63 ; WX 525 ; N question ; B 62 0 462 617 ; L quoteleft questiondown ; C 64 ; WX 525 ; N at ; B 44 -6 480 617 ; C 65 ; WX 525 ; N A ; B 27 0 497 623 ; C 66 ; WX 525 ; N B ; B 23 0 482 611 ; C 67 ; WX 525 ; N C ; B 40 -11 484 622 ; C 68 ; WX 525 ; N D ; B 19 0 485 611 ; C 69 ; WX 525 ; N E ; B 26 0 502 611 ; C 70 ; WX 525 ; N F ; B 28 0 490 611 ; C 71 ; WX 525 ; N G ; B 38 -11 496 622 ; C 72 ; WX 525 ; N H ; B 22 0 502 611 ; C 73 ; WX 525 ; N I ; B 79 0 446 611 ; C 74 ; WX 525 ; N J ; B 71 -11 478 611 ; C 75 ; WX 525 ; N K ; B 26 0 495 611 ; C 76 ; WX 525 ; N L ; B 32 0 488 611 ; C 77 ; WX 525 ; N M ; B 17 0 507 611 ; C 78 ; WX 525 ; N N ; B 28 0 496 611 ; C 79 ; WX 525 ; N O ; B 56 -11 468 622 ; C 80 ; WX 525 ; N P ; B 26 0 480 611 ; C 81 ; WX 525 ; N Q ; B 56 -139 468 622 ; C 82 ; WX 525 ; N R ; B 22 -11 522 611 ; C 83 ; WX 525 ; N S ; B 52 -11 472 622 ; C 84 ; WX 525 ; N T ; B 26 0 498 611 ; C 85 ; WX 525 ; N U ; B 4 -11 520 611 ; C 86 ; WX 525 ; N V ; B 18 -8 506 611 ; C 87 ; WX 525 ; N W ; B 11 -8 513 611 ; C 88 ; WX 525 ; N X ; B 27 0 496 611 ; C 89 ; WX 525 ; N Y ; B 19 0 505 611 ; C 90 ; WX 525 ; N Z ; B 48 0 481 611 ; C 91 ; WX 525 ; N bracketleft ; B 222 -83 483 694 ; C 92 ; WX 525 ; N backslash ; B 58 -83 466 694 ; C 93 ; WX 525 ; N bracketright ; B 41 -83 302 694 ; C 94 ; WX 525 ; N asciicircum ; B 100 471 424 611 ; C 95 ; WX 525 ; N underscore ; B 56 -95 468 -25 ; C 96 ; WX 525 ; N quoteleft ; B 183 372 344 681 ; C 97 ; WX 525 ; N a ; B 55 -6 524 440 ; C 98 ; WX 525 ; N b ; B 12 -6 488 611 ; C 99 ; WX 525 ; N c ; B 73 -6 466 440 ; C 100 ; WX 525 ; N d ; B 36 -6 512 611 ; C 101 ; WX 525 ; N e ; B 55 -6 464 440 ; C 102 ; WX 525 ; N f ; B 42 0 437 617 ; C 103 ; WX 525 ; N g ; B 29 -229 509 442 ; C 104 ; WX 525 ; N h ; B 12 0 512 611 ; C 105 ; WX 525 ; N i ; B 78 0 455 612 ; C 106 ; WX 525 ; N j ; B 48 -228 368 612 ; C 107 ; WX 525 ; N k ; B 21 0 508 611 ; C 108 ; WX 525 ; N l ; B 58 0 467 611 ; C 109 ; WX 525 ; N m ; B -4 0 516 437 ; C 110 ; WX 525 ; N n ; B 12 0 512 437 ; C 111 ; WX 525 ; N o ; B 57 -6 467 440 ; C 112 ; WX 525 ; N p ; B 12 -222 488 437 ; C 113 ; WX 525 ; N q ; B 40 -222 537 437 ; C 114 ; WX 525 ; N r ; B 32 0 487 437 ; C 115 ; WX 525 ; N s ; B 72 -6 459 440 ; C 116 ; WX 525 ; N t ; B 25 -6 449 554 ; C 117 ; WX 525 ; N u ; B 12 -6 512 431 ; C 118 ; WX 525 ; N v ; B 24 -4 500 431 ; C 119 ; WX 525 ; N w ; B 16 -4 508 431 ; C 120 ; WX 525 ; N x ; B 27 0 496 431 ; C 121 ; WX 525 ; N y ; B 26 -228 500 431 ; C 122 ; WX 525 ; N z ; B 33 0 475 431 ; C 123 ; WX 525 ; N braceleft ; B 57 -83 467 694 ; C 124 ; WX 525 ; N bar ; B 227 -83 297 694 ; C 125 ; WX 525 ; N braceright ; B 57 -83 467 694 ; C 126 ; WX 525 ; N asciitilde ; B 87 491 437 611 ; C 127 ; WX 525 ; N dieresis ; B 110 512 414 612 ; C -1 ; WX 525 ; N space ; B 0 0 0 0 ; EndCharMetrics EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pagd8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Mon Mar 4 13:46:34 1991 Comment UniqueID 34370 Comment VMusage 24954 31846 FontName AvantGarde-Demi FullName ITC Avant Garde Gothic Demi FamilyName ITC Avant Garde Gothic Weight Demi ItalicAngle 0 IsFixedPitch false FontBBox -123 -251 1222 1021 UnderlinePosition -100 UnderlineThickness 50 Version 001.007 Notice Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated. All Rights Reserved.ITC Avant Garde Gothic is a registered trademark of International Typeface Corporation. EncodingScheme AdobeStandardEncoding CapHeight 740 XHeight 555 Ascender 740 Descender -185 StartCharMetrics 228 C 32 ; WX 280 ; N space ; B 0 0 0 0 ; C 33 ; WX 280 ; N exclam ; B 73 0 206 740 ; C 34 ; WX 360 ; N quotedbl ; B 19 444 341 740 ; C 35 ; WX 560 ; N numbersign ; B 29 0 525 700 ; C 36 ; WX 560 ; N dollar ; B 58 -86 501 857 ; C 37 ; WX 860 ; N percent ; B 36 -15 822 755 ; C 38 ; WX 680 ; N ampersand ; B 34 -15 665 755 ; C 39 ; WX 280 ; N quoteright ; B 72 466 205 740 ; C 40 ; WX 380 ; N parenleft ; B 74 -157 350 754 ; C 41 ; WX 380 ; N parenright ; B 37 -157 313 754 ; C 42 ; WX 440 ; N asterisk ; B 67 457 374 755 ; C 43 ; WX 600 ; N plus ; B 48 0 552 506 ; C 44 ; WX 280 ; N comma ; B 73 -141 206 133 ; C 45 ; WX 420 ; N hyphen ; B 71 230 349 348 ; C 46 ; WX 280 ; N period ; B 73 0 206 133 ; C 47 ; WX 460 ; N slash ; B 6 -100 454 740 ; C 48 ; WX 560 ; N zero ; B 32 -15 529 755 ; C 49 ; WX 560 ; N one ; B 137 0 363 740 ; C 50 ; WX 560 ; N two ; B 36 0 523 755 ; C 51 ; WX 560 ; N three ; B 28 -15 532 755 ; C 52 ; WX 560 ; N four ; B 15 0 545 740 ; C 53 ; WX 560 ; N five ; B 25 -15 535 740 ; C 54 ; WX 560 ; N six ; B 23 -15 536 739 ; C 55 ; WX 560 ; N seven ; B 62 0 498 740 ; C 56 ; WX 560 ; N eight ; B 33 -15 527 755 ; C 57 ; WX 560 ; N nine ; B 24 0 537 754 ; C 58 ; WX 280 ; N colon ; B 73 0 206 555 ; C 59 ; WX 280 ; N semicolon ; B 73 -141 206 555 ; C 60 ; WX 600 ; N less ; B 46 -8 554 514 ; C 61 ; WX 600 ; N equal ; B 48 81 552 425 ; C 62 ; WX 600 ; N greater ; B 46 -8 554 514 ; C 63 ; WX 560 ; N question ; B 38 0 491 755 ; C 64 ; WX 740 ; N at ; B 50 -12 750 712 ; C 65 ; WX 740 ; N A ; B 7 0 732 740 ; C 66 ; WX 580 ; N B ; B 70 0 551 740 ; C 67 ; WX 780 ; N C ; B 34 -15 766 755 ; C 68 ; WX 700 ; N D ; B 63 0 657 740 ; C 69 ; WX 520 ; N E ; B 61 0 459 740 ; C 70 ; WX 480 ; N F ; B 61 0 438 740 ; C 71 ; WX 840 ; N G ; B 27 -15 817 755 ; C 72 ; WX 680 ; N H ; B 71 0 610 740 ; C 73 ; WX 280 ; N I ; B 72 0 209 740 ; C 74 ; WX 480 ; N J ; B 2 -15 409 740 ; C 75 ; WX 620 ; N K ; B 89 0 620 740 ; C 76 ; WX 440 ; N L ; B 72 0 435 740 ; C 77 ; WX 900 ; N M ; B 63 0 837 740 ; C 78 ; WX 740 ; N N ; B 70 0 671 740 ; C 79 ; WX 840 ; N O ; B 33 -15 807 755 ; C 80 ; WX 560 ; N P ; B 72 0 545 740 ; C 81 ; WX 840 ; N Q ; B 32 -15 824 755 ; C 82 ; WX 580 ; N R ; B 64 0 565 740 ; C 83 ; WX 520 ; N S ; B 12 -15 493 755 ; C 84 ; WX 420 ; N T ; B 6 0 418 740 ; C 85 ; WX 640 ; N U ; B 55 -15 585 740 ; C 86 ; WX 700 ; N V ; B 8 0 695 740 ; C 87 ; WX 900 ; N W ; B 7 0 899 740 ; C 88 ; WX 680 ; N X ; B 4 0 676 740 ; C 89 ; WX 620 ; N Y ; B -2 0 622 740 ; C 90 ; WX 500 ; N Z ; B 19 0 481 740 ; C 91 ; WX 320 ; N bracketleft ; B 66 -157 284 754 ; C 92 ; WX 640 ; N backslash ; B 96 -100 544 740 ; C 93 ; WX 320 ; N bracketright ; B 36 -157 254 754 ; C 94 ; WX 600 ; N asciicircum ; B 73 375 527 740 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 280 ; N quoteleft ; B 72 466 205 740 ; C 97 ; WX 660 ; N a ; B 27 -18 613 574 ; C 98 ; WX 660 ; N b ; B 47 -18 632 740 ; C 99 ; WX 640 ; N c ; B 37 -18 610 574 ; C 100 ; WX 660 ; N d ; B 34 -18 618 740 ; C 101 ; WX 640 ; N e ; B 31 -18 610 577 ; C 102 ; WX 280 ; N f ; B 15 0 280 755 ; L i fi ; L l fl ; C 103 ; WX 660 ; N g ; B 32 -226 623 574 ; C 104 ; WX 600 ; N h ; B 54 0 546 740 ; C 105 ; WX 240 ; N i ; B 53 0 186 740 ; C 106 ; WX 260 ; N j ; B 16 -185 205 740 ; C 107 ; WX 580 ; N k ; B 80 0 571 740 ; C 108 ; WX 240 ; N l ; B 54 0 187 740 ; C 109 ; WX 940 ; N m ; B 54 0 887 574 ; C 110 ; WX 600 ; N n ; B 54 0 547 574 ; C 111 ; WX 640 ; N o ; B 25 -18 615 574 ; C 112 ; WX 660 ; N p ; B 47 -185 629 574 ; C 113 ; WX 660 ; N q ; B 31 -185 613 574 ; C 114 ; WX 320 ; N r ; B 63 0 317 574 ; C 115 ; WX 440 ; N s ; B 19 -18 421 574 ; C 116 ; WX 300 ; N t ; B 21 0 299 740 ; C 117 ; WX 600 ; N u ; B 50 -18 544 555 ; C 118 ; WX 560 ; N v ; B 3 0 556 555 ; C 119 ; WX 800 ; N w ; B 11 0 789 555 ; C 120 ; WX 560 ; N x ; B 3 0 556 555 ; C 121 ; WX 580 ; N y ; B 8 -185 571 555 ; C 122 ; WX 460 ; N z ; B 20 0 442 555 ; C 123 ; WX 340 ; N braceleft ; B -3 -191 317 747 ; C 124 ; WX 600 ; N bar ; B 233 -100 366 740 ; C 125 ; WX 340 ; N braceright ; B 23 -191 343 747 ; C 126 ; WX 600 ; N asciitilde ; B 67 160 533 347 ; C 161 ; WX 280 ; N exclamdown ; B 74 -185 207 555 ; C 162 ; WX 560 ; N cent ; B 43 39 517 715 ; C 163 ; WX 560 ; N sterling ; B -2 0 562 755 ; C 164 ; WX 160 ; N fraction ; B -123 0 282 740 ; C 165 ; WX 560 ; N yen ; B -10 0 570 740 ; C 166 ; WX 560 ; N florin ; B 0 -151 512 824 ; C 167 ; WX 560 ; N section ; B 28 -158 530 755 ; C 168 ; WX 560 ; N currency ; B 27 69 534 577 ; C 169 ; WX 220 ; N quotesingle ; B 44 444 177 740 ; C 170 ; WX 480 ; N quotedblleft ; B 70 466 410 740 ; C 171 ; WX 460 ; N guillemotleft ; B 61 108 400 469 ; C 172 ; WX 240 ; N guilsinglleft ; B 50 108 190 469 ; C 173 ; WX 240 ; N guilsinglright ; B 50 108 190 469 ; C 174 ; WX 520 ; N fi ; B 25 0 461 755 ; C 175 ; WX 520 ; N fl ; B 25 0 461 755 ; C 177 ; WX 500 ; N endash ; B 35 230 465 348 ; C 178 ; WX 560 ; N dagger ; B 51 -142 509 740 ; C 179 ; WX 560 ; N daggerdbl ; B 51 -142 509 740 ; C 180 ; WX 280 ; N periodcentered ; B 73 187 206 320 ; C 182 ; WX 600 ; N paragraph ; B -7 -103 607 740 ; C 183 ; WX 600 ; N bullet ; B 148 222 453 532 ; C 184 ; WX 280 ; N quotesinglbase ; B 72 -141 205 133 ; C 185 ; WX 480 ; N quotedblbase ; B 70 -141 410 133 ; C 186 ; WX 480 ; N quotedblright ; B 70 466 410 740 ; C 187 ; WX 460 ; N guillemotright ; B 61 108 400 469 ; C 188 ; WX 1000 ; N ellipsis ; B 100 0 899 133 ; C 189 ; WX 1280 ; N perthousand ; B 36 -15 1222 755 ; C 191 ; WX 560 ; N questiondown ; B 68 -200 521 555 ; C 193 ; WX 420 ; N grave ; B 50 624 329 851 ; C 194 ; WX 420 ; N acute ; B 91 624 370 849 ; C 195 ; WX 540 ; N circumflex ; B 71 636 470 774 ; C 196 ; WX 480 ; N tilde ; B 44 636 437 767 ; C 197 ; WX 420 ; N macron ; B 72 648 349 759 ; C 198 ; WX 480 ; N breve ; B 42 633 439 770 ; C 199 ; WX 280 ; N dotaccent ; B 74 636 207 769 ; C 200 ; WX 500 ; N dieresis ; B 78 636 422 769 ; C 202 ; WX 360 ; N ring ; B 73 619 288 834 ; C 203 ; WX 340 ; N cedilla ; B 98 -251 298 6 ; C 205 ; WX 700 ; N hungarumlaut ; B 132 610 609 862 ; C 206 ; WX 340 ; N ogonek ; B 79 -195 262 9 ; C 207 ; WX 540 ; N caron ; B 71 636 470 774 ; C 208 ; WX 1000 ; N emdash ; B 35 230 965 348 ; C 225 ; WX 900 ; N AE ; B -5 0 824 740 ; C 227 ; WX 360 ; N ordfeminine ; B 19 438 334 755 ; C 232 ; WX 480 ; N Lslash ; B 26 0 460 740 ; C 233 ; WX 840 ; N Oslash ; B 33 -71 807 814 ; C 234 ; WX 1060 ; N OE ; B 37 -15 1007 755 ; C 235 ; WX 360 ; N ordmasculine ; B 23 438 338 755 ; C 241 ; WX 1080 ; N ae ; B 29 -18 1048 574 ; C 245 ; WX 240 ; N dotlessi ; B 53 0 186 555 ; C 248 ; WX 320 ; N lslash ; B 34 0 305 740 ; C 249 ; WX 660 ; N oslash ; B 35 -50 625 608 ; C 250 ; WX 1080 ; N oe ; B 30 -18 1050 574 ; C 251 ; WX 600 ; N germandbls ; B 51 -18 585 755 ; C -1 ; WX 640 ; N ecircumflex ; B 31 -18 610 774 ; C -1 ; WX 640 ; N edieresis ; B 31 -18 610 769 ; C -1 ; WX 660 ; N aacute ; B 27 -18 613 849 ; C -1 ; WX 740 ; N registered ; B -12 -12 752 752 ; C -1 ; WX 240 ; N icircumflex ; B -79 0 320 774 ; C -1 ; WX 600 ; N udieresis ; B 50 -18 544 769 ; C -1 ; WX 640 ; N ograve ; B 25 -18 615 851 ; C -1 ; WX 600 ; N uacute ; B 50 -18 544 849 ; C -1 ; WX 600 ; N ucircumflex ; B 50 -18 544 774 ; C -1 ; WX 740 ; N Aacute ; B 7 0 732 1019 ; C -1 ; WX 240 ; N igrave ; B -65 0 214 851 ; C -1 ; WX 280 ; N Icircumflex ; B -59 0 340 944 ; C -1 ; WX 640 ; N ccedilla ; B 37 -251 610 574 ; C -1 ; WX 660 ; N adieresis ; B 27 -18 613 769 ; C -1 ; WX 520 ; N Ecircumflex ; B 61 0 460 944 ; C -1 ; WX 440 ; N scaron ; B 19 -18 421 774 ; C -1 ; WX 660 ; N thorn ; B 47 -185 629 740 ; C -1 ; WX 1000 ; N trademark ; B 9 296 821 740 ; C -1 ; WX 640 ; N egrave ; B 31 -18 610 851 ; C -1 ; WX 336 ; N threesuperior ; B 8 287 328 749 ; C -1 ; WX 460 ; N zcaron ; B 20 0 455 774 ; C -1 ; WX 660 ; N atilde ; B 27 -18 613 767 ; C -1 ; WX 660 ; N aring ; B 27 -18 613 834 ; C -1 ; WX 640 ; N ocircumflex ; B 25 -18 615 774 ; C -1 ; WX 520 ; N Edieresis ; B 61 0 459 939 ; C -1 ; WX 840 ; N threequarters ; B 18 0 803 749 ; C -1 ; WX 580 ; N ydieresis ; B 8 -185 571 769 ; C -1 ; WX 580 ; N yacute ; B 8 -185 571 849 ; C -1 ; WX 240 ; N iacute ; B 26 0 305 849 ; C -1 ; WX 740 ; N Acircumflex ; B 7 0 732 944 ; C -1 ; WX 640 ; N Uacute ; B 55 -15 585 1019 ; C -1 ; WX 640 ; N eacute ; B 31 -18 610 849 ; C -1 ; WX 840 ; N Ograve ; B 33 -15 807 1021 ; C -1 ; WX 660 ; N agrave ; B 27 -18 613 851 ; C -1 ; WX 640 ; N Udieresis ; B 55 -15 585 939 ; C -1 ; WX 660 ; N acircumflex ; B 27 -18 613 774 ; C -1 ; WX 280 ; N Igrave ; B -45 0 234 1021 ; C -1 ; WX 336 ; N twosuperior ; B 13 296 322 749 ; C -1 ; WX 640 ; N Ugrave ; B 55 -15 585 1021 ; C -1 ; WX 840 ; N onequarter ; B 92 0 746 740 ; C -1 ; WX 640 ; N Ucircumflex ; B 55 -15 585 944 ; C -1 ; WX 520 ; N Scaron ; B 12 -15 493 944 ; C -1 ; WX 280 ; N Idieresis ; B -32 0 312 939 ; C -1 ; WX 240 ; N idieresis ; B -52 0 292 769 ; C -1 ; WX 520 ; N Egrave ; B 61 0 459 1021 ; C -1 ; WX 840 ; N Oacute ; B 33 -15 807 1019 ; C -1 ; WX 600 ; N divide ; B 48 -20 552 526 ; C -1 ; WX 740 ; N Atilde ; B 7 0 732 937 ; C -1 ; WX 740 ; N Aring ; B 7 0 732 969 ; C -1 ; WX 840 ; N Odieresis ; B 33 -15 807 939 ; C -1 ; WX 740 ; N Adieresis ; B 7 0 732 939 ; C -1 ; WX 740 ; N Ntilde ; B 70 0 671 937 ; C -1 ; WX 500 ; N Zcaron ; B 19 0 481 944 ; C -1 ; WX 560 ; N Thorn ; B 72 0 545 740 ; C -1 ; WX 280 ; N Iacute ; B 46 0 325 1019 ; C -1 ; WX 600 ; N plusminus ; B 48 -62 552 556 ; C -1 ; WX 600 ; N multiply ; B 59 12 541 494 ; C -1 ; WX 520 ; N Eacute ; B 61 0 459 1019 ; C -1 ; WX 620 ; N Ydieresis ; B -2 0 622 939 ; C -1 ; WX 336 ; N onesuperior ; B 72 296 223 740 ; C -1 ; WX 600 ; N ugrave ; B 50 -18 544 851 ; C -1 ; WX 600 ; N logicalnot ; B 48 108 552 425 ; C -1 ; WX 600 ; N ntilde ; B 54 0 547 767 ; C -1 ; WX 840 ; N Otilde ; B 33 -15 807 937 ; C -1 ; WX 640 ; N otilde ; B 25 -18 615 767 ; C -1 ; WX 780 ; N Ccedilla ; B 34 -251 766 755 ; C -1 ; WX 740 ; N Agrave ; B 7 0 732 1021 ; C -1 ; WX 840 ; N onehalf ; B 62 0 771 740 ; C -1 ; WX 742 ; N Eth ; B 25 0 691 740 ; C -1 ; WX 400 ; N degree ; B 57 426 343 712 ; C -1 ; WX 620 ; N Yacute ; B -2 0 622 1019 ; C -1 ; WX 840 ; N Ocircumflex ; B 33 -15 807 944 ; C -1 ; WX 640 ; N oacute ; B 25 -18 615 849 ; C -1 ; WX 576 ; N mu ; B 38 -187 539 555 ; C -1 ; WX 600 ; N minus ; B 48 193 552 313 ; C -1 ; WX 640 ; N eth ; B 27 -18 616 754 ; C -1 ; WX 640 ; N odieresis ; B 25 -18 615 769 ; C -1 ; WX 740 ; N copyright ; B -12 -12 752 752 ; C -1 ; WX 600 ; N brokenbar ; B 233 -100 366 740 ; EndCharMetrics StartKernData StartKernPairs 218 KPX A y -50 KPX A w -65 KPX A v -70 KPX A u -20 KPX A quoteright -90 KPX A Y -80 KPX A W -60 KPX A V -102 KPX A U -40 KPX A T -25 KPX A Q -50 KPX A O -50 KPX A G -40 KPX A C -40 KPX B A -10 KPX C A -40 KPX D period -20 KPX D comma -20 KPX D Y -45 KPX D W -25 KPX D V -50 KPX D A -50 KPX F period -129 KPX F e -20 KPX F comma -162 KPX F a -20 KPX F A -75 KPX G period -20 KPX G comma -20 KPX G Y -15 KPX J period -15 KPX J a -20 KPX J A -30 KPX K y -20 KPX K u -15 KPX K o -45 KPX K e -40 KPX K O -30 KPX L y -23 KPX L quoteright -30 KPX L quotedblright -30 KPX L Y -80 KPX L W -55 KPX L V -85 KPX L T -46 KPX O period -30 KPX O comma -30 KPX O Y -30 KPX O X -30 KPX O W -20 KPX O V -45 KPX O T -15 KPX O A -60 KPX P period -200 KPX P o -20 KPX P e -20 KPX P comma -220 KPX P a -20 KPX P A -100 KPX Q comma 20 KPX R W 25 KPX R V -10 KPX R U 25 KPX R T 40 KPX R O 25 KPX S comma 20 KPX T y -10 KPX T w -55 KPX T u -46 KPX T semicolon -29 KPX T r -30 KPX T period -91 KPX T o -49 KPX T hyphen -75 KPX T e -49 KPX T comma -82 KPX T colon -15 KPX T a -70 KPX T O -15 KPX T A -25 KPX U period -20 KPX U comma -20 KPX U A -40 KPX V u -55 KPX V semicolon -33 KPX V period -145 KPX V o -101 KPX V i -15 KPX V hyphen -75 KPX V e -101 KPX V comma -145 KPX V colon -18 KPX V a -95 KPX V O -45 KPX V G -20 KPX V A -102 KPX W y -15 KPX W u -30 KPX W semicolon -33 KPX W period -106 KPX W o -46 KPX W i -10 KPX W hyphen -35 KPX W e -47 KPX W comma -106 KPX W colon -15 KPX W a -50 KPX W O -20 KPX W A -58 KPX Y u -52 KPX Y semicolon -23 KPX Y period -145 KPX Y o -89 KPX Y hyphen -100 KPX Y e -89 KPX Y comma -145 KPX Y colon -10 KPX Y a -93 KPX Y O -30 KPX Y A -80 KPX a t 5 KPX a p 20 KPX a b 5 KPX b y -20 KPX b v -20 KPX c y -20 KPX c l -15 KPX c k -15 KPX comma space -50 KPX comma quoteright -70 KPX comma quotedblright -70 KPX e y -20 KPX e x -20 KPX e w -20 KPX e v -20 KPX f period -40 KPX f o -20 KPX f l -15 KPX f i -15 KPX f f -20 KPX f dotlessi -15 KPX f comma -40 KPX f a -15 KPX g i 25 KPX g a 15 KPX h y -30 KPX k y -5 KPX k o -30 KPX k e -40 KPX m y -20 KPX m u -20 KPX n y -15 KPX n v -30 KPX o y -20 KPX o x -30 KPX o w -20 KPX o v -30 KPX p y -20 KPX period space -50 KPX period quoteright -70 KPX period quotedblright -70 KPX quotedblleft A -50 KPX quotedblright space -50 KPX quoteleft quoteleft -80 KPX quoteleft A -50 KPX quoteright v -10 KPX quoteright t 10 KPX quoteright space -50 KPX quoteright s -15 KPX quoteright r -20 KPX quoteright quoteright -80 KPX quoteright d -50 KPX r y 40 KPX r v 40 KPX r u 20 KPX r t 20 KPX r s 20 KPX r q -8 KPX r period -73 KPX r p 20 KPX r o -15 KPX r n 21 KPX r m 15 KPX r l 20 KPX r k 5 KPX r i 20 KPX r hyphen -60 KPX r g 1 KPX r e -4 KPX r d -6 KPX r comma -75 KPX r c -7 KPX s period 20 KPX s comma 20 KPX space quoteleft -50 KPX space quotedblleft -50 KPX space Y -60 KPX space W -25 KPX space V -80 KPX space T -25 KPX space A -20 KPX v period -90 KPX v o -20 KPX v e -20 KPX v comma -90 KPX v a -30 KPX w period -90 KPX w o -30 KPX w e -20 KPX w comma -90 KPX w a -30 KPX x e -20 KPX y period -100 KPX y o -30 KPX y e -20 KPX y comma -100 KPX y c -35 KPX y a -30 EndKernPairs EndKernData StartComposites 56 CC Aacute 2 ; PCC A 0 0 ; PCC acute 160 170 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 100 170 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 120 170 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 160 170 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 190 135 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 130 170 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 50 170 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex -10 170 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 10 170 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 50 170 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute -45 170 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -130 170 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -110 170 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave -95 170 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 130 170 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 210 170 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 150 170 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 170 170 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 210 170 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 180 170 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron -10 170 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 145 170 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 50 170 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 70 170 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 75 170 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 135 170 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 60 170 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 5 170 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 120 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 60 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 80 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 120 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 150 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 90 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 110 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 50 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 70 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 110 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -65 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -150 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -130 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -115 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 60 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 110 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 50 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 70 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 110 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 80 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron -50 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 125 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 30 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 50 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 55 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 115 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 40 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron -15 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pagdo8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Mon Mar 4 13:49:44 1991 Comment UniqueID 34373 Comment VMusage 6550 39938 FontName AvantGarde-DemiOblique FullName ITC Avant Garde Gothic Demi Oblique FamilyName ITC Avant Garde Gothic Weight Demi ItalicAngle -10.5 IsFixedPitch false FontBBox -123 -251 1256 1021 UnderlinePosition -100 UnderlineThickness 50 Version 001.007 Notice Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated. All Rights Reserved.ITC Avant Garde Gothic is a registered trademark of International Typeface Corporation. EncodingScheme AdobeStandardEncoding CapHeight 740 XHeight 555 Ascender 740 Descender -185 StartCharMetrics 228 C 32 ; WX 280 ; N space ; B 0 0 0 0 ; C 33 ; WX 280 ; N exclam ; B 73 0 343 740 ; C 34 ; WX 360 ; N quotedbl ; B 127 444 478 740 ; C 35 ; WX 560 ; N numbersign ; B 66 0 618 700 ; C 36 ; WX 560 ; N dollar ; B 99 -86 582 857 ; C 37 ; WX 860 ; N percent ; B 139 -15 856 755 ; C 38 ; WX 680 ; N ampersand ; B 71 -15 742 755 ; C 39 ; WX 280 ; N quoteright ; B 159 466 342 740 ; C 40 ; WX 380 ; N parenleft ; B 120 -157 490 754 ; C 41 ; WX 380 ; N parenright ; B 8 -157 378 754 ; C 42 ; WX 440 ; N asterisk ; B 174 457 492 755 ; C 43 ; WX 600 ; N plus ; B 84 0 610 506 ; C 44 ; WX 280 ; N comma ; B 48 -141 231 133 ; C 45 ; WX 420 ; N hyphen ; B 114 230 413 348 ; C 46 ; WX 280 ; N period ; B 73 0 231 133 ; C 47 ; WX 460 ; N slash ; B -13 -100 591 740 ; C 48 ; WX 560 ; N zero ; B 70 -15 628 755 ; C 49 ; WX 560 ; N one ; B 230 0 500 740 ; C 50 ; WX 560 ; N two ; B 44 0 622 755 ; C 51 ; WX 560 ; N three ; B 67 -15 585 755 ; C 52 ; WX 560 ; N four ; B 36 0 604 740 ; C 53 ; WX 560 ; N five ; B 64 -15 600 740 ; C 54 ; WX 560 ; N six ; B 64 -15 587 739 ; C 55 ; WX 560 ; N seven ; B 83 0 635 740 ; C 56 ; WX 560 ; N eight ; B 71 -15 590 755 ; C 57 ; WX 560 ; N nine ; B 110 0 633 754 ; C 58 ; WX 280 ; N colon ; B 73 0 309 555 ; C 59 ; WX 280 ; N semicolon ; B 48 -141 309 555 ; C 60 ; WX 600 ; N less ; B 84 -8 649 514 ; C 61 ; WX 600 ; N equal ; B 63 81 631 425 ; C 62 ; WX 600 ; N greater ; B 45 -8 610 514 ; C 63 ; WX 560 ; N question ; B 135 0 593 755 ; C 64 ; WX 740 ; N at ; B 109 -12 832 712 ; C 65 ; WX 740 ; N A ; B 7 0 732 740 ; C 66 ; WX 580 ; N B ; B 70 0 610 740 ; C 67 ; WX 780 ; N C ; B 97 -15 864 755 ; C 68 ; WX 700 ; N D ; B 63 0 732 740 ; C 69 ; WX 520 ; N E ; B 61 0 596 740 ; C 70 ; WX 480 ; N F ; B 61 0 575 740 ; C 71 ; WX 840 ; N G ; B 89 -15 887 755 ; C 72 ; WX 680 ; N H ; B 71 0 747 740 ; C 73 ; WX 280 ; N I ; B 72 0 346 740 ; C 74 ; WX 480 ; N J ; B 34 -15 546 740 ; C 75 ; WX 620 ; N K ; B 89 0 757 740 ; C 76 ; WX 440 ; N L ; B 72 0 459 740 ; C 77 ; WX 900 ; N M ; B 63 0 974 740 ; C 78 ; WX 740 ; N N ; B 70 0 808 740 ; C 79 ; WX 840 ; N O ; B 95 -15 882 755 ; C 80 ; WX 560 ; N P ; B 72 0 645 740 ; C 81 ; WX 840 ; N Q ; B 94 -15 882 755 ; C 82 ; WX 580 ; N R ; B 64 0 656 740 ; C 83 ; WX 520 ; N S ; B 49 -15 578 755 ; C 84 ; WX 420 ; N T ; B 119 0 555 740 ; C 85 ; WX 640 ; N U ; B 97 -15 722 740 ; C 86 ; WX 700 ; N V ; B 145 0 832 740 ; C 87 ; WX 900 ; N W ; B 144 0 1036 740 ; C 88 ; WX 680 ; N X ; B 4 0 813 740 ; C 89 ; WX 620 ; N Y ; B 135 0 759 740 ; C 90 ; WX 500 ; N Z ; B 19 0 599 740 ; C 91 ; WX 320 ; N bracketleft ; B 89 -157 424 754 ; C 92 ; WX 640 ; N backslash ; B 233 -100 525 740 ; C 93 ; WX 320 ; N bracketright ; B 7 -157 342 754 ; C 94 ; WX 600 ; N asciicircum ; B 142 375 596 740 ; C 95 ; WX 500 ; N underscore ; B -23 -125 486 -75 ; C 96 ; WX 280 ; N quoteleft ; B 158 466 341 740 ; C 97 ; WX 660 ; N a ; B 73 -18 716 574 ; C 98 ; WX 660 ; N b ; B 47 -18 689 740 ; C 99 ; WX 640 ; N c ; B 84 -18 679 574 ; C 100 ; WX 660 ; N d ; B 80 -18 755 740 ; C 101 ; WX 640 ; N e ; B 77 -18 667 577 ; C 102 ; WX 280 ; N f ; B 62 0 420 755 ; L i fi ; L l fl ; C 103 ; WX 660 ; N g ; B 33 -226 726 574 ; C 104 ; WX 600 ; N h ; B 54 0 614 740 ; C 105 ; WX 240 ; N i ; B 53 0 323 740 ; C 106 ; WX 260 ; N j ; B -18 -185 342 740 ; C 107 ; WX 580 ; N k ; B 80 0 648 740 ; C 108 ; WX 240 ; N l ; B 54 0 324 740 ; C 109 ; WX 940 ; N m ; B 54 0 954 574 ; C 110 ; WX 600 ; N n ; B 54 0 613 574 ; C 111 ; WX 640 ; N o ; B 71 -18 672 574 ; C 112 ; WX 660 ; N p ; B 13 -185 686 574 ; C 113 ; WX 660 ; N q ; B 78 -185 716 574 ; C 114 ; WX 320 ; N r ; B 63 0 423 574 ; C 115 ; WX 440 ; N s ; B 49 -18 483 574 ; C 116 ; WX 300 ; N t ; B 86 0 402 740 ; C 117 ; WX 600 ; N u ; B 87 -18 647 555 ; C 118 ; WX 560 ; N v ; B 106 0 659 555 ; C 119 ; WX 800 ; N w ; B 114 0 892 555 ; C 120 ; WX 560 ; N x ; B 3 0 632 555 ; C 121 ; WX 580 ; N y ; B 75 -185 674 555 ; C 122 ; WX 460 ; N z ; B 20 0 528 555 ; C 123 ; WX 340 ; N braceleft ; B 40 -191 455 747 ; C 124 ; WX 600 ; N bar ; B 214 -100 503 740 ; C 125 ; WX 340 ; N braceright ; B -12 -191 405 747 ; C 126 ; WX 600 ; N asciitilde ; B 114 160 579 347 ; C 161 ; WX 280 ; N exclamdown ; B 40 -185 310 555 ; C 162 ; WX 560 ; N cent ; B 110 39 599 715 ; C 163 ; WX 560 ; N sterling ; B 38 0 615 755 ; C 164 ; WX 160 ; N fraction ; B -123 0 419 740 ; C 165 ; WX 560 ; N yen ; B 83 0 707 740 ; C 166 ; WX 560 ; N florin ; B -27 -151 664 824 ; C 167 ; WX 560 ; N section ; B 65 -158 602 755 ; C 168 ; WX 560 ; N currency ; B 53 69 628 577 ; C 169 ; WX 220 ; N quotesingle ; B 152 444 314 740 ; C 170 ; WX 480 ; N quotedblleft ; B 156 466 546 740 ; C 171 ; WX 460 ; N guillemotleft ; B 105 108 487 469 ; C 172 ; WX 240 ; N guilsinglleft ; B 94 108 277 469 ; C 173 ; WX 240 ; N guilsinglright ; B 70 108 253 469 ; C 174 ; WX 520 ; N fi ; B 72 0 598 755 ; C 175 ; WX 520 ; N fl ; B 72 0 598 755 ; C 177 ; WX 500 ; N endash ; B 78 230 529 348 ; C 178 ; WX 560 ; N dagger ; B 133 -142 612 740 ; C 179 ; WX 560 ; N daggerdbl ; B 63 -142 618 740 ; C 180 ; WX 280 ; N periodcentered ; B 108 187 265 320 ; C 182 ; WX 600 ; N paragraph ; B 90 -103 744 740 ; C 183 ; WX 600 ; N bullet ; B 215 222 526 532 ; C 184 ; WX 280 ; N quotesinglbase ; B 47 -141 230 133 ; C 185 ; WX 480 ; N quotedblbase ; B 45 -141 435 133 ; C 186 ; WX 480 ; N quotedblright ; B 157 466 547 740 ; C 187 ; WX 460 ; N guillemotright ; B 81 108 463 469 ; C 188 ; WX 1000 ; N ellipsis ; B 100 0 924 133 ; C 189 ; WX 1280 ; N perthousand ; B 139 -15 1256 755 ; C 191 ; WX 560 ; N questiondown ; B 69 -200 527 555 ; C 193 ; WX 420 ; N grave ; B 189 624 462 851 ; C 194 ; WX 420 ; N acute ; B 224 624 508 849 ; C 195 ; WX 540 ; N circumflex ; B 189 636 588 774 ; C 196 ; WX 480 ; N tilde ; B 178 636 564 767 ; C 197 ; WX 420 ; N macron ; B 192 648 490 759 ; C 198 ; WX 480 ; N breve ; B 185 633 582 770 ; C 199 ; WX 280 ; N dotaccent ; B 192 636 350 769 ; C 200 ; WX 500 ; N dieresis ; B 196 636 565 769 ; C 202 ; WX 360 ; N ring ; B 206 619 424 834 ; C 203 ; WX 340 ; N cedilla ; B 67 -251 272 6 ; C 205 ; WX 700 ; N hungarumlaut ; B 258 610 754 862 ; C 206 ; WX 340 ; N ogonek ; B 59 -195 243 9 ; C 207 ; WX 540 ; N caron ; B 214 636 613 774 ; C 208 ; WX 1000 ; N emdash ; B 78 230 1029 348 ; C 225 ; WX 900 ; N AE ; B -5 0 961 740 ; C 227 ; WX 360 ; N ordfeminine ; B 127 438 472 755 ; C 232 ; WX 480 ; N Lslash ; B 68 0 484 740 ; C 233 ; WX 840 ; N Oslash ; B 94 -71 891 814 ; C 234 ; WX 1060 ; N OE ; B 98 -15 1144 755 ; C 235 ; WX 360 ; N ordmasculine ; B 131 438 451 755 ; C 241 ; WX 1080 ; N ae ; B 75 -18 1105 574 ; C 245 ; WX 240 ; N dotlessi ; B 53 0 289 555 ; C 248 ; WX 320 ; N lslash ; B 74 0 404 740 ; C 249 ; WX 660 ; N oslash ; B 81 -50 685 608 ; C 250 ; WX 1080 ; N oe ; B 76 -18 1108 574 ; C 251 ; WX 600 ; N germandbls ; B 51 -18 629 755 ; C -1 ; WX 640 ; N ecircumflex ; B 77 -18 667 774 ; C -1 ; WX 640 ; N edieresis ; B 77 -18 667 769 ; C -1 ; WX 660 ; N aacute ; B 73 -18 716 849 ; C -1 ; WX 740 ; N registered ; B 50 -12 827 752 ; C -1 ; WX 240 ; N icircumflex ; B 39 0 438 774 ; C -1 ; WX 600 ; N udieresis ; B 87 -18 647 769 ; C -1 ; WX 640 ; N ograve ; B 71 -18 672 851 ; C -1 ; WX 600 ; N uacute ; B 87 -18 647 849 ; C -1 ; WX 600 ; N ucircumflex ; B 87 -18 647 774 ; C -1 ; WX 740 ; N Aacute ; B 7 0 732 1019 ; C -1 ; WX 240 ; N igrave ; B 53 0 347 851 ; C -1 ; WX 280 ; N Icircumflex ; B 72 0 489 944 ; C -1 ; WX 640 ; N ccedilla ; B 83 -251 679 574 ; C -1 ; WX 660 ; N adieresis ; B 73 -18 716 769 ; C -1 ; WX 520 ; N Ecircumflex ; B 61 0 609 944 ; C -1 ; WX 440 ; N scaron ; B 49 -18 563 774 ; C -1 ; WX 660 ; N thorn ; B 13 -185 686 740 ; C -1 ; WX 1000 ; N trademark ; B 131 296 958 740 ; C -1 ; WX 640 ; N egrave ; B 77 -18 667 851 ; C -1 ; WX 336 ; N threesuperior ; B 87 287 413 749 ; C -1 ; WX 460 ; N zcaron ; B 20 0 598 774 ; C -1 ; WX 660 ; N atilde ; B 73 -18 716 767 ; C -1 ; WX 660 ; N aring ; B 73 -18 716 834 ; C -1 ; WX 640 ; N ocircumflex ; B 71 -18 672 774 ; C -1 ; WX 520 ; N Edieresis ; B 61 0 606 939 ; C -1 ; WX 840 ; N threequarters ; B 97 0 836 749 ; C -1 ; WX 580 ; N ydieresis ; B 75 -185 674 769 ; C -1 ; WX 580 ; N yacute ; B 75 -185 674 849 ; C -1 ; WX 240 ; N iacute ; B 53 0 443 849 ; C -1 ; WX 740 ; N Acircumflex ; B 7 0 732 944 ; C -1 ; WX 640 ; N Uacute ; B 97 -15 722 1019 ; C -1 ; WX 640 ; N eacute ; B 77 -18 667 849 ; C -1 ; WX 840 ; N Ograve ; B 95 -15 882 1021 ; C -1 ; WX 660 ; N agrave ; B 73 -18 716 851 ; C -1 ; WX 640 ; N Udieresis ; B 97 -15 722 939 ; C -1 ; WX 660 ; N acircumflex ; B 73 -18 716 774 ; C -1 ; WX 280 ; N Igrave ; B 72 0 398 1021 ; C -1 ; WX 336 ; N twosuperior ; B 73 296 436 749 ; C -1 ; WX 640 ; N Ugrave ; B 97 -15 722 1021 ; C -1 ; WX 840 ; N onequarter ; B 187 0 779 740 ; C -1 ; WX 640 ; N Ucircumflex ; B 97 -15 722 944 ; C -1 ; WX 520 ; N Scaron ; B 49 -15 635 944 ; C -1 ; WX 280 ; N Idieresis ; B 72 0 486 939 ; C -1 ; WX 240 ; N idieresis ; B 53 0 435 769 ; C -1 ; WX 520 ; N Egrave ; B 61 0 596 1021 ; C -1 ; WX 840 ; N Oacute ; B 95 -15 882 1019 ; C -1 ; WX 600 ; N divide ; B 84 -20 610 526 ; C -1 ; WX 740 ; N Atilde ; B 7 0 732 937 ; C -1 ; WX 740 ; N Aring ; B 7 0 732 969 ; C -1 ; WX 840 ; N Odieresis ; B 95 -15 882 939 ; C -1 ; WX 740 ; N Adieresis ; B 7 0 732 939 ; C -1 ; WX 740 ; N Ntilde ; B 70 0 808 937 ; C -1 ; WX 500 ; N Zcaron ; B 19 0 650 944 ; C -1 ; WX 560 ; N Thorn ; B 72 0 619 740 ; C -1 ; WX 280 ; N Iacute ; B 72 0 494 1019 ; C -1 ; WX 600 ; N plusminus ; B 37 -62 626 556 ; C -1 ; WX 600 ; N multiply ; B 76 12 617 494 ; C -1 ; WX 520 ; N Eacute ; B 61 0 596 1019 ; C -1 ; WX 620 ; N Ydieresis ; B 135 0 759 939 ; C -1 ; WX 336 ; N onesuperior ; B 182 296 360 740 ; C -1 ; WX 600 ; N ugrave ; B 87 -18 647 851 ; C -1 ; WX 600 ; N logicalnot ; B 105 108 631 425 ; C -1 ; WX 600 ; N ntilde ; B 54 0 624 767 ; C -1 ; WX 840 ; N Otilde ; B 95 -15 882 937 ; C -1 ; WX 640 ; N otilde ; B 71 -18 672 767 ; C -1 ; WX 780 ; N Ccedilla ; B 97 -251 864 755 ; C -1 ; WX 740 ; N Agrave ; B 7 0 732 1021 ; C -1 ; WX 840 ; N onehalf ; B 157 0 830 740 ; C -1 ; WX 742 ; N Eth ; B 83 0 766 740 ; C -1 ; WX 400 ; N degree ; B 160 426 451 712 ; C -1 ; WX 620 ; N Yacute ; B 135 0 759 1019 ; C -1 ; WX 840 ; N Ocircumflex ; B 95 -15 882 944 ; C -1 ; WX 640 ; N oacute ; B 71 -18 672 849 ; C -1 ; WX 576 ; N mu ; B 3 -187 642 555 ; C -1 ; WX 600 ; N minus ; B 84 193 610 313 ; C -1 ; WX 640 ; N eth ; B 73 -18 699 754 ; C -1 ; WX 640 ; N odieresis ; B 71 -18 672 769 ; C -1 ; WX 740 ; N copyright ; B 50 -12 827 752 ; C -1 ; WX 600 ; N brokenbar ; B 214 -100 503 740 ; EndCharMetrics StartKernData StartKernPairs 218 KPX A y -50 KPX A w -65 KPX A v -70 KPX A u -20 KPX A quoteright -90 KPX A Y -80 KPX A W -60 KPX A V -102 KPX A U -40 KPX A T -25 KPX A Q -50 KPX A O -50 KPX A G -40 KPX A C -40 KPX B A -10 KPX C A -40 KPX D period -20 KPX D comma -20 KPX D Y -45 KPX D W -25 KPX D V -50 KPX D A -50 KPX F period -129 KPX F e -20 KPX F comma -162 KPX F a -20 KPX F A -75 KPX G period -20 KPX G comma -20 KPX G Y -15 KPX J period -15 KPX J a -20 KPX J A -30 KPX K y -20 KPX K u -15 KPX K o -45 KPX K e -40 KPX K O -30 KPX L y -23 KPX L quoteright -30 KPX L quotedblright -30 KPX L Y -80 KPX L W -55 KPX L V -85 KPX L T -46 KPX O period -30 KPX O comma -30 KPX O Y -30 KPX O X -30 KPX O W -20 KPX O V -45 KPX O T -15 KPX O A -60 KPX P period -200 KPX P o -20 KPX P e -20 KPX P comma -220 KPX P a -20 KPX P A -100 KPX Q comma 20 KPX R W 25 KPX R V -10 KPX R U 25 KPX R T 40 KPX R O 25 KPX S comma 20 KPX T y -10 KPX T w -55 KPX T u -46 KPX T semicolon -29 KPX T r -30 KPX T period -91 KPX T o -49 KPX T hyphen -75 KPX T e -49 KPX T comma -82 KPX T colon -15 KPX T a -70 KPX T O -15 KPX T A -25 KPX U period -20 KPX U comma -20 KPX U A -40 KPX V u -55 KPX V semicolon -33 KPX V period -145 KPX V o -101 KPX V i -15 KPX V hyphen -75 KPX V e -101 KPX V comma -145 KPX V colon -18 KPX V a -95 KPX V O -45 KPX V G -20 KPX V A -102 KPX W y -15 KPX W u -30 KPX W semicolon -33 KPX W period -106 KPX W o -46 KPX W i -10 KPX W hyphen -35 KPX W e -47 KPX W comma -106 KPX W colon -15 KPX W a -50 KPX W O -20 KPX W A -58 KPX Y u -52 KPX Y semicolon -23 KPX Y period -145 KPX Y o -89 KPX Y hyphen -100 KPX Y e -89 KPX Y comma -145 KPX Y colon -10 KPX Y a -93 KPX Y O -30 KPX Y A -80 KPX a t 5 KPX a p 20 KPX a b 5 KPX b y -20 KPX b v -20 KPX c y -20 KPX c l -15 KPX c k -15 KPX comma space -50 KPX comma quoteright -70 KPX comma quotedblright -70 KPX e y -20 KPX e x -20 KPX e w -20 KPX e v -20 KPX f period -40 KPX f o -20 KPX f l -15 KPX f i -15 KPX f f -20 KPX f dotlessi -15 KPX f comma -40 KPX f a -15 KPX g i 25 KPX g a 15 KPX h y -30 KPX k y -5 KPX k o -30 KPX k e -40 KPX m y -20 KPX m u -20 KPX n y -15 KPX n v -30 KPX o y -20 KPX o x -30 KPX o w -20 KPX o v -30 KPX p y -20 KPX period space -50 KPX period quoteright -70 KPX period quotedblright -70 KPX quotedblleft A -50 KPX quotedblright space -50 KPX quoteleft quoteleft -80 KPX quoteleft A -50 KPX quoteright v -10 KPX quoteright t 10 KPX quoteright space -50 KPX quoteright s -15 KPX quoteright r -20 KPX quoteright quoteright -80 KPX quoteright d -50 KPX r y 40 KPX r v 40 KPX r u 20 KPX r t 20 KPX r s 20 KPX r q -8 KPX r period -73 KPX r p 20 KPX r o -15 KPX r n 21 KPX r m 15 KPX r l 20 KPX r k 5 KPX r i 20 KPX r hyphen -60 KPX r g 1 KPX r e -4 KPX r d -6 KPX r comma -75 KPX r c -7 KPX s period 20 KPX s comma 20 KPX space quoteleft -50 KPX space quotedblleft -50 KPX space Y -60 KPX space W -25 KPX space V -80 KPX space T -25 KPX space A -20 KPX v period -90 KPX v o -20 KPX v e -20 KPX v comma -90 KPX v a -30 KPX w period -90 KPX w o -30 KPX w e -20 KPX w comma -90 KPX w a -30 KPX x e -20 KPX y period -100 KPX y o -30 KPX y e -20 KPX y comma -100 KPX y c -35 KPX y a -30 EndKernPairs EndKernData StartComposites 56 CC Aacute 2 ; PCC A 0 0 ; PCC acute 192 170 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 132 170 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 152 170 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 192 170 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 215 135 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 162 170 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 82 170 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 22 170 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 42 170 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 82 170 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute -13 170 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -98 170 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -78 170 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave -63 170 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 162 170 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 242 170 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 182 170 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 202 170 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 242 170 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 212 170 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 22 170 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 177 170 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 82 170 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 102 170 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 107 170 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 167 170 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 92 170 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 37 170 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 120 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 60 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 80 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 120 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 150 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 90 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 110 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 50 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 70 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 110 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -65 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -150 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -130 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -115 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 60 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 110 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 50 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 70 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 110 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 80 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron -50 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 125 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 30 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 50 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 55 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 115 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 40 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron -15 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pagk8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Mon Mar 4 13:37:31 1991 Comment UniqueID 34364 Comment VMusage 24225 31117 FontName AvantGarde-Book FullName ITC Avant Garde Gothic Book FamilyName ITC Avant Garde Gothic Weight Book ItalicAngle 0 IsFixedPitch false FontBBox -113 -222 1148 955 UnderlinePosition -100 UnderlineThickness 50 Version 001.006 Notice Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated. All Rights Reserved.ITC Avant Garde Gothic is a registered trademark of International Typeface Corporation. EncodingScheme AdobeStandardEncoding CapHeight 740 XHeight 547 Ascender 740 Descender -192 StartCharMetrics 228 C 32 ; WX 277 ; N space ; B 0 0 0 0 ; C 33 ; WX 295 ; N exclam ; B 111 0 185 740 ; C 34 ; WX 309 ; N quotedbl ; B 36 444 273 740 ; C 35 ; WX 554 ; N numbersign ; B 33 0 521 740 ; C 36 ; WX 554 ; N dollar ; B 70 -70 485 811 ; C 37 ; WX 775 ; N percent ; B 21 -13 753 751 ; C 38 ; WX 757 ; N ampersand ; B 56 -12 736 753 ; C 39 ; WX 351 ; N quoteright ; B 94 546 256 740 ; C 40 ; WX 369 ; N parenleft ; B 47 -205 355 757 ; C 41 ; WX 369 ; N parenright ; B 14 -205 322 757 ; C 42 ; WX 425 ; N asterisk ; B 58 446 367 740 ; C 43 ; WX 606 ; N plus ; B 51 0 555 506 ; C 44 ; WX 277 ; N comma ; B 14 -67 176 126 ; C 45 ; WX 332 ; N hyphen ; B 30 248 302 315 ; C 46 ; WX 277 ; N period ; B 102 0 176 126 ; C 47 ; WX 437 ; N slash ; B 44 -100 403 740 ; C 48 ; WX 554 ; N zero ; B 29 -13 525 753 ; C 49 ; WX 554 ; N one ; B 135 0 336 740 ; C 50 ; WX 554 ; N two ; B 40 0 514 753 ; C 51 ; WX 554 ; N three ; B 34 -13 506 753 ; C 52 ; WX 554 ; N four ; B 14 0 528 740 ; C 53 ; WX 554 ; N five ; B 26 -13 530 740 ; C 54 ; WX 554 ; N six ; B 24 -13 530 739 ; C 55 ; WX 554 ; N seven ; B 63 0 491 740 ; C 56 ; WX 554 ; N eight ; B 41 -13 513 753 ; C 57 ; WX 554 ; N nine ; B 24 0 530 752 ; C 58 ; WX 277 ; N colon ; B 102 0 176 548 ; C 59 ; WX 277 ; N semicolon ; B 14 -67 176 548 ; C 60 ; WX 606 ; N less ; B 46 -8 554 514 ; C 61 ; WX 606 ; N equal ; B 51 118 555 388 ; C 62 ; WX 606 ; N greater ; B 52 -8 560 514 ; C 63 ; WX 591 ; N question ; B 64 0 526 752 ; C 64 ; WX 867 ; N at ; B 65 -13 803 753 ; C 65 ; WX 740 ; N A ; B 12 0 729 740 ; C 66 ; WX 574 ; N B ; B 74 0 544 740 ; C 67 ; WX 813 ; N C ; B 43 -13 771 752 ; C 68 ; WX 744 ; N D ; B 74 0 699 740 ; C 69 ; WX 536 ; N E ; B 70 0 475 740 ; C 70 ; WX 485 ; N F ; B 70 0 444 740 ; C 71 ; WX 872 ; N G ; B 40 -13 828 753 ; C 72 ; WX 683 ; N H ; B 76 0 607 740 ; C 73 ; WX 226 ; N I ; B 76 0 150 740 ; C 74 ; WX 482 ; N J ; B 6 -13 402 740 ; C 75 ; WX 591 ; N K ; B 81 0 591 740 ; C 76 ; WX 462 ; N L ; B 82 0 462 740 ; C 77 ; WX 919 ; N M ; B 76 0 843 740 ; C 78 ; WX 740 ; N N ; B 75 0 664 740 ; C 79 ; WX 869 ; N O ; B 43 -13 826 753 ; C 80 ; WX 592 ; N P ; B 75 0 564 740 ; C 81 ; WX 871 ; N Q ; B 40 -13 837 753 ; C 82 ; WX 607 ; N R ; B 70 0 572 740 ; C 83 ; WX 498 ; N S ; B 22 -13 473 753 ; C 84 ; WX 426 ; N T ; B 6 0 419 740 ; C 85 ; WX 655 ; N U ; B 75 -13 579 740 ; C 86 ; WX 702 ; N V ; B 8 0 693 740 ; C 87 ; WX 960 ; N W ; B 11 0 950 740 ; C 88 ; WX 609 ; N X ; B 8 0 602 740 ; C 89 ; WX 592 ; N Y ; B 1 0 592 740 ; C 90 ; WX 480 ; N Z ; B 12 0 470 740 ; C 91 ; WX 351 ; N bracketleft ; B 133 -179 337 753 ; C 92 ; WX 605 ; N backslash ; B 118 -100 477 740 ; C 93 ; WX 351 ; N bracketright ; B 14 -179 218 753 ; C 94 ; WX 606 ; N asciicircum ; B 53 307 553 740 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 351 ; N quoteleft ; B 95 546 257 740 ; C 97 ; WX 683 ; N a ; B 42 -13 621 561 ; C 98 ; WX 682 ; N b ; B 68 -13 647 740 ; C 99 ; WX 647 ; N c ; B 41 -13 607 561 ; C 100 ; WX 685 ; N d ; B 39 -13 618 740 ; C 101 ; WX 650 ; N e ; B 38 -13 608 561 ; C 102 ; WX 314 ; N f ; B 19 0 314 753 ; L i fi ; L l fl ; C 103 ; WX 673 ; N g ; B 37 -215 606 561 ; C 104 ; WX 610 ; N h ; B 62 0 543 740 ; C 105 ; WX 200 ; N i ; B 65 0 135 740 ; C 106 ; WX 203 ; N j ; B -44 -192 137 740 ; C 107 ; WX 502 ; N k ; B 70 0 498 740 ; C 108 ; WX 200 ; N l ; B 65 0 135 740 ; C 109 ; WX 938 ; N m ; B 66 0 872 561 ; C 110 ; WX 610 ; N n ; B 65 0 546 561 ; C 111 ; WX 655 ; N o ; B 42 -13 614 561 ; C 112 ; WX 682 ; N p ; B 64 -192 643 561 ; C 113 ; WX 682 ; N q ; B 37 -192 616 561 ; C 114 ; WX 301 ; N r ; B 65 0 291 561 ; C 115 ; WX 388 ; N s ; B 24 -13 364 561 ; C 116 ; WX 339 ; N t ; B 14 0 330 740 ; C 117 ; WX 608 ; N u ; B 62 -13 541 547 ; C 118 ; WX 554 ; N v ; B 7 0 546 547 ; C 119 ; WX 831 ; N w ; B 13 0 820 547 ; C 120 ; WX 480 ; N x ; B 12 0 468 547 ; C 121 ; WX 536 ; N y ; B 15 -192 523 547 ; C 122 ; WX 425 ; N z ; B 10 0 415 547 ; C 123 ; WX 351 ; N braceleft ; B 70 -189 331 740 ; C 124 ; WX 672 ; N bar ; B 299 -100 373 740 ; C 125 ; WX 351 ; N braceright ; B 20 -189 281 740 ; C 126 ; WX 606 ; N asciitilde ; B 72 179 534 319 ; C 161 ; WX 295 ; N exclamdown ; B 110 -192 184 548 ; C 162 ; WX 554 ; N cent ; B 48 62 510 707 ; C 163 ; WX 554 ; N sterling ; B 4 0 552 753 ; C 164 ; WX 166 ; N fraction ; B -113 0 280 740 ; C 165 ; WX 554 ; N yen ; B 4 0 550 740 ; C 166 ; WX 554 ; N florin ; B -12 -153 518 818 ; C 167 ; WX 615 ; N section ; B 85 -141 529 753 ; C 168 ; WX 554 ; N currency ; B 8 42 546 580 ; C 169 ; WX 198 ; N quotesingle ; B 59 444 140 740 ; C 170 ; WX 502 ; N quotedblleft ; B 97 546 406 740 ; C 171 ; WX 425 ; N guillemotleft ; B 40 81 386 481 ; C 172 ; WX 251 ; N guilsinglleft ; B 40 81 212 481 ; C 173 ; WX 251 ; N guilsinglright ; B 39 81 211 481 ; C 174 ; WX 487 ; N fi ; B 19 0 422 753 ; C 175 ; WX 485 ; N fl ; B 19 0 420 753 ; C 177 ; WX 500 ; N endash ; B 35 248 465 315 ; C 178 ; WX 553 ; N dagger ; B 59 -133 493 740 ; C 179 ; WX 553 ; N daggerdbl ; B 59 -133 493 740 ; C 180 ; WX 277 ; N periodcentered ; B 102 190 176 316 ; C 182 ; WX 564 ; N paragraph ; B 22 -110 551 740 ; C 183 ; WX 606 ; N bullet ; B 150 222 455 532 ; C 184 ; WX 354 ; N quotesinglbase ; B 89 -68 251 126 ; C 185 ; WX 502 ; N quotedblbase ; B 89 -68 399 126 ; C 186 ; WX 484 ; N quotedblright ; B 96 546 405 740 ; C 187 ; WX 425 ; N guillemotright ; B 39 81 385 481 ; C 188 ; WX 1000 ; N ellipsis ; B 130 0 870 126 ; C 189 ; WX 1174 ; N perthousand ; B 25 -13 1148 751 ; C 191 ; WX 591 ; N questiondown ; B 65 -205 527 548 ; C 193 ; WX 378 ; N grave ; B 69 619 300 786 ; C 194 ; WX 375 ; N acute ; B 78 619 309 786 ; C 195 ; WX 502 ; N circumflex ; B 74 639 428 764 ; C 196 ; WX 439 ; N tilde ; B 47 651 392 754 ; C 197 ; WX 485 ; N macron ; B 73 669 411 736 ; C 198 ; WX 453 ; N breve ; B 52 651 401 754 ; C 199 ; WX 222 ; N dotaccent ; B 74 639 148 765 ; C 200 ; WX 369 ; N dieresis ; B 73 639 295 765 ; C 202 ; WX 332 ; N ring ; B 62 600 269 807 ; C 203 ; WX 324 ; N cedilla ; B 80 -222 254 0 ; C 205 ; WX 552 ; N hungarumlaut ; B 119 605 453 800 ; C 206 ; WX 302 ; N ogonek ; B 73 -191 228 0 ; C 207 ; WX 502 ; N caron ; B 68 639 423 764 ; C 208 ; WX 1000 ; N emdash ; B 35 248 965 315 ; C 225 ; WX 992 ; N AE ; B -20 0 907 740 ; C 227 ; WX 369 ; N ordfeminine ; B -3 407 356 753 ; C 232 ; WX 517 ; N Lslash ; B 59 0 517 740 ; C 233 ; WX 868 ; N Oslash ; B 43 -83 826 819 ; C 234 ; WX 1194 ; N OE ; B 45 -13 1142 753 ; C 235 ; WX 369 ; N ordmasculine ; B 12 407 356 753 ; C 241 ; WX 1157 ; N ae ; B 34 -13 1113 561 ; C 245 ; WX 200 ; N dotlessi ; B 65 0 135 547 ; C 248 ; WX 300 ; N lslash ; B 43 0 259 740 ; C 249 ; WX 653 ; N oslash ; B 41 -64 613 614 ; C 250 ; WX 1137 ; N oe ; B 34 -13 1104 561 ; C 251 ; WX 554 ; N germandbls ; B 61 -13 525 753 ; C -1 ; WX 650 ; N ecircumflex ; B 38 -13 608 764 ; C -1 ; WX 650 ; N edieresis ; B 38 -13 608 765 ; C -1 ; WX 683 ; N aacute ; B 42 -13 621 786 ; C -1 ; WX 747 ; N registered ; B -9 -12 755 752 ; C -1 ; WX 200 ; N icircumflex ; B -77 0 277 764 ; C -1 ; WX 608 ; N udieresis ; B 62 -13 541 765 ; C -1 ; WX 655 ; N ograve ; B 42 -13 614 786 ; C -1 ; WX 608 ; N uacute ; B 62 -13 541 786 ; C -1 ; WX 608 ; N ucircumflex ; B 62 -13 541 764 ; C -1 ; WX 740 ; N Aacute ; B 12 0 729 949 ; C -1 ; WX 200 ; N igrave ; B -60 0 171 786 ; C -1 ; WX 226 ; N Icircumflex ; B -64 0 290 927 ; C -1 ; WX 647 ; N ccedilla ; B 41 -222 607 561 ; C -1 ; WX 683 ; N adieresis ; B 42 -13 621 765 ; C -1 ; WX 536 ; N Ecircumflex ; B 70 0 475 927 ; C -1 ; WX 388 ; N scaron ; B 11 -13 366 764 ; C -1 ; WX 682 ; N thorn ; B 64 -192 643 740 ; C -1 ; WX 1000 ; N trademark ; B 9 296 816 740 ; C -1 ; WX 650 ; N egrave ; B 38 -13 608 786 ; C -1 ; WX 332 ; N threesuperior ; B 18 289 318 747 ; C -1 ; WX 425 ; N zcaron ; B 10 0 415 764 ; C -1 ; WX 683 ; N atilde ; B 42 -13 621 754 ; C -1 ; WX 683 ; N aring ; B 42 -13 621 807 ; C -1 ; WX 655 ; N ocircumflex ; B 42 -13 614 764 ; C -1 ; WX 536 ; N Edieresis ; B 70 0 475 928 ; C -1 ; WX 831 ; N threequarters ; B 46 0 784 747 ; C -1 ; WX 536 ; N ydieresis ; B 15 -192 523 765 ; C -1 ; WX 536 ; N yacute ; B 15 -192 523 786 ; C -1 ; WX 200 ; N iacute ; B 31 0 262 786 ; C -1 ; WX 740 ; N Acircumflex ; B 12 0 729 927 ; C -1 ; WX 655 ; N Uacute ; B 75 -13 579 949 ; C -1 ; WX 650 ; N eacute ; B 38 -13 608 786 ; C -1 ; WX 869 ; N Ograve ; B 43 -13 826 949 ; C -1 ; WX 683 ; N agrave ; B 42 -13 621 786 ; C -1 ; WX 655 ; N Udieresis ; B 75 -13 579 928 ; C -1 ; WX 683 ; N acircumflex ; B 42 -13 621 764 ; C -1 ; WX 226 ; N Igrave ; B -47 0 184 949 ; C -1 ; WX 332 ; N twosuperior ; B 19 296 318 747 ; C -1 ; WX 655 ; N Ugrave ; B 75 -13 579 949 ; C -1 ; WX 831 ; N onequarter ; B 100 0 729 740 ; C -1 ; WX 655 ; N Ucircumflex ; B 75 -13 579 927 ; C -1 ; WX 498 ; N Scaron ; B 22 -13 473 927 ; C -1 ; WX 226 ; N Idieresis ; B 2 0 224 928 ; C -1 ; WX 200 ; N idieresis ; B -11 0 211 765 ; C -1 ; WX 536 ; N Egrave ; B 70 0 475 949 ; C -1 ; WX 869 ; N Oacute ; B 43 -13 826 949 ; C -1 ; WX 606 ; N divide ; B 51 -13 555 519 ; C -1 ; WX 740 ; N Atilde ; B 12 0 729 917 ; C -1 ; WX 740 ; N Aring ; B 12 0 729 955 ; C -1 ; WX 869 ; N Odieresis ; B 43 -13 826 928 ; C -1 ; WX 740 ; N Adieresis ; B 12 0 729 928 ; C -1 ; WX 740 ; N Ntilde ; B 75 0 664 917 ; C -1 ; WX 480 ; N Zcaron ; B 12 0 470 927 ; C -1 ; WX 592 ; N Thorn ; B 60 0 549 740 ; C -1 ; WX 226 ; N Iacute ; B 44 0 275 949 ; C -1 ; WX 606 ; N plusminus ; B 51 -24 555 518 ; C -1 ; WX 606 ; N multiply ; B 74 24 533 482 ; C -1 ; WX 536 ; N Eacute ; B 70 0 475 949 ; C -1 ; WX 592 ; N Ydieresis ; B 1 0 592 928 ; C -1 ; WX 332 ; N onesuperior ; B 63 296 198 740 ; C -1 ; WX 608 ; N ugrave ; B 62 -13 541 786 ; C -1 ; WX 606 ; N logicalnot ; B 51 109 555 388 ; C -1 ; WX 610 ; N ntilde ; B 65 0 546 754 ; C -1 ; WX 869 ; N Otilde ; B 43 -13 826 917 ; C -1 ; WX 655 ; N otilde ; B 42 -13 614 754 ; C -1 ; WX 813 ; N Ccedilla ; B 43 -222 771 752 ; C -1 ; WX 740 ; N Agrave ; B 12 0 729 949 ; C -1 ; WX 831 ; N onehalf ; B 81 0 750 740 ; C -1 ; WX 790 ; N Eth ; B 40 0 739 740 ; C -1 ; WX 400 ; N degree ; B 56 421 344 709 ; C -1 ; WX 592 ; N Yacute ; B 1 0 592 949 ; C -1 ; WX 869 ; N Ocircumflex ; B 43 -13 826 927 ; C -1 ; WX 655 ; N oacute ; B 42 -13 614 786 ; C -1 ; WX 608 ; N mu ; B 80 -184 527 547 ; C -1 ; WX 606 ; N minus ; B 51 219 555 287 ; C -1 ; WX 655 ; N eth ; B 42 -12 614 753 ; C -1 ; WX 655 ; N odieresis ; B 42 -13 614 765 ; C -1 ; WX 747 ; N copyright ; B -9 -12 755 752 ; C -1 ; WX 672 ; N brokenbar ; B 299 -100 373 740 ; EndCharMetrics StartKernData StartKernPairs 216 KPX A y -62 KPX A w -65 KPX A v -70 KPX A u -20 KPX A quoteright -100 KPX A quotedblright -100 KPX A Y -92 KPX A W -60 KPX A V -102 KPX A U -40 KPX A T -45 KPX A Q -40 KPX A O -50 KPX A G -40 KPX A C -40 KPX B A -10 KPX C A -40 KPX D period -20 KPX D comma -20 KPX D Y -30 KPX D W -10 KPX D V -50 KPX D A -50 KPX F period -160 KPX F e -20 KPX F comma -180 KPX F a -20 KPX F A -75 KPX G period -20 KPX G comma -20 KPX G Y -20 KPX J period -15 KPX J a -20 KPX J A -30 KPX K o -15 KPX K e -20 KPX K O -20 KPX L y -23 KPX L quoteright -130 KPX L quotedblright -130 KPX L Y -91 KPX L W -67 KPX L V -113 KPX L T -46 KPX O period -30 KPX O comma -30 KPX O Y -30 KPX O X -30 KPX O W -20 KPX O V -60 KPX O T -30 KPX O A -60 KPX P period -300 KPX P o -60 KPX P e -20 KPX P comma -280 KPX P a -20 KPX P A -114 KPX Q comma 20 KPX R Y -10 KPX R W 10 KPX R V -10 KPX R T 6 KPX S comma 20 KPX T y -50 KPX T w -55 KPX T u -46 KPX T semicolon -29 KPX T r -30 KPX T period -91 KPX T o -70 KPX T i 10 KPX T hyphen -75 KPX T e -49 KPX T comma -82 KPX T colon -15 KPX T a -90 KPX T O -30 KPX T A -45 KPX U period -20 KPX U comma -20 KPX U A -40 KPX V u -40 KPX V semicolon -33 KPX V period -165 KPX V o -101 KPX V i -5 KPX V hyphen -75 KPX V e -101 KPX V comma -145 KPX V colon -18 KPX V a -104 KPX V O -60 KPX V G -20 KPX V A -102 KPX W y -2 KPX W u -30 KPX W semicolon -33 KPX W period -106 KPX W o -46 KPX W i 6 KPX W hyphen -35 KPX W e -47 KPX W comma -106 KPX W colon -15 KPX W a -50 KPX W O -20 KPX W A -58 KPX Y u -52 KPX Y semicolon -23 KPX Y period -175 KPX Y o -89 KPX Y hyphen -85 KPX Y e -89 KPX Y comma -145 KPX Y colon -10 KPX Y a -93 KPX Y O -30 KPX Y A -92 KPX a p 20 KPX a b 20 KPX b y -20 KPX b v -20 KPX c y -20 KPX c k -15 KPX comma space -110 KPX comma quoteright -120 KPX comma quotedblright -120 KPX e y -20 KPX e w -20 KPX e v -20 KPX f period -50 KPX f o -40 KPX f l -30 KPX f i -34 KPX f f -60 KPX f e -20 KPX f dotlessi -34 KPX f comma -50 KPX f a -40 KPX g a -15 KPX h y -30 KPX k y -5 KPX k e -15 KPX m y -20 KPX m u -20 KPX m a -20 KPX n y -15 KPX n v -20 KPX o y -20 KPX o x -15 KPX o w -20 KPX o v -30 KPX p y -20 KPX period space -110 KPX period quoteright -120 KPX period quotedblright -120 KPX quotedblleft quoteleft -35 KPX quotedblleft A -100 KPX quotedblright space -110 KPX quoteleft quoteleft -203 KPX quoteleft A -100 KPX quoteright v -30 KPX quoteright t 10 KPX quoteright space -110 KPX quoteright s -15 KPX quoteright r -20 KPX quoteright quoteright -203 KPX quoteright quotedblright -35 KPX quoteright d -110 KPX r y 40 KPX r v 40 KPX r u 20 KPX r t 20 KPX r s 20 KPX r q -8 KPX r period -73 KPX r p 20 KPX r o -20 KPX r n 21 KPX r m 28 KPX r l 20 KPX r k 20 KPX r i 20 KPX r hyphen -60 KPX r g -15 KPX r e -4 KPX r d -6 KPX r comma -75 KPX r c -20 KPX r a -20 KPX s period 20 KPX s comma 20 KPX space quoteleft -110 KPX space quotedblleft -110 KPX space Y -60 KPX space W -25 KPX space V -50 KPX space T -25 KPX space A -20 KPX v period -130 KPX v o -30 KPX v e -20 KPX v comma -100 KPX v a -30 KPX w period -100 KPX w o -30 KPX w h 15 KPX w e -20 KPX w comma -90 KPX w a -30 KPX y period -125 KPX y o -30 KPX y e -20 KPX y comma -110 KPX y a -30 EndKernPairs EndKernData StartComposites 56 CC Aacute 2 ; PCC A 0 0 ; PCC acute 183 163 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 119 163 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 186 163 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 181 163 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 204 148 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 151 163 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 81 163 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 17 163 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 84 163 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 79 163 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute -34 163 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -138 163 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -71 163 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave -116 163 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 151 163 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 247 163 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 184 163 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 250 163 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 246 163 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 215 163 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron -2 163 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 160 163 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 77 163 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 143 163 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 119 163 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 129 163 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 112 163 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron -11 163 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 154 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 91 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 157 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 153 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 176 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 122 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 138 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 74 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 141 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 136 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -47 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -151 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -84 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -129 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 86 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 140 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 77 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 143 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 139 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 108 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron -57 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 137 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 53 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 120 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 95 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 101 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron -38 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pagko8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Mon Mar 4 13:41:11 1991 Comment UniqueID 34367 Comment VMusage 6555 39267 FontName AvantGarde-BookOblique FullName ITC Avant Garde Gothic Book Oblique FamilyName ITC Avant Garde Gothic Weight Book ItalicAngle -10.5 IsFixedPitch false FontBBox -113 -222 1279 955 UnderlinePosition -100 UnderlineThickness 50 Version 001.006 Notice Copyright (c) 1985, 1987, 1989, 1990, 1991 Adobe Systems Incorporated. All Rights Reserved.ITC Avant Garde Gothic is a registered trademark of International Typeface Corporation. EncodingScheme AdobeStandardEncoding CapHeight 740 XHeight 547 Ascender 740 Descender -192 StartCharMetrics 228 C 32 ; WX 277 ; N space ; B 0 0 0 0 ; C 33 ; WX 295 ; N exclam ; B 111 0 322 740 ; C 34 ; WX 309 ; N quotedbl ; B 130 444 410 740 ; C 35 ; WX 554 ; N numbersign ; B 71 0 620 740 ; C 36 ; WX 554 ; N dollar ; B 107 -70 581 811 ; C 37 ; WX 775 ; N percent ; B 124 -13 787 751 ; C 38 ; WX 757 ; N ampersand ; B 92 -12 775 753 ; C 39 ; WX 351 ; N quoteright ; B 195 546 393 740 ; C 40 ; WX 369 ; N parenleft ; B 89 -205 495 757 ; C 41 ; WX 369 ; N parenright ; B -24 -205 382 757 ; C 42 ; WX 425 ; N asterisk ; B 170 446 479 740 ; C 43 ; WX 606 ; N plus ; B 92 0 608 506 ; C 44 ; WX 277 ; N comma ; B 2 -67 199 126 ; C 45 ; WX 332 ; N hyphen ; B 76 248 360 315 ; C 46 ; WX 277 ; N period ; B 102 0 199 126 ; C 47 ; WX 437 ; N slash ; B 25 -100 540 740 ; C 48 ; WX 554 ; N zero ; B 71 -13 622 753 ; C 49 ; WX 554 ; N one ; B 260 0 473 740 ; C 50 ; WX 554 ; N two ; B 40 0 615 753 ; C 51 ; WX 554 ; N three ; B 73 -13 565 753 ; C 52 ; WX 554 ; N four ; B 39 0 598 740 ; C 53 ; WX 554 ; N five ; B 69 -13 605 740 ; C 54 ; WX 554 ; N six ; B 65 -13 580 739 ; C 55 ; WX 554 ; N seven ; B 110 0 628 740 ; C 56 ; WX 554 ; N eight ; B 77 -13 580 753 ; C 57 ; WX 554 ; N nine ; B 111 0 626 752 ; C 58 ; WX 277 ; N colon ; B 102 0 278 548 ; C 59 ; WX 277 ; N semicolon ; B 2 -67 278 548 ; C 60 ; WX 606 ; N less ; B 87 -8 649 514 ; C 61 ; WX 606 ; N equal ; B 73 118 627 388 ; C 62 ; WX 606 ; N greater ; B 51 -8 613 514 ; C 63 ; WX 591 ; N question ; B 158 0 628 752 ; C 64 ; WX 867 ; N at ; B 126 -13 888 753 ; C 65 ; WX 740 ; N A ; B 12 0 729 740 ; C 66 ; WX 574 ; N B ; B 74 0 606 740 ; C 67 ; WX 813 ; N C ; B 105 -13 870 752 ; C 68 ; WX 744 ; N D ; B 74 0 773 740 ; C 69 ; WX 536 ; N E ; B 70 0 612 740 ; C 70 ; WX 485 ; N F ; B 70 0 581 740 ; C 71 ; WX 872 ; N G ; B 103 -13 891 753 ; C 72 ; WX 683 ; N H ; B 76 0 744 740 ; C 73 ; WX 226 ; N I ; B 76 0 287 740 ; C 74 ; WX 482 ; N J ; B 37 -13 539 740 ; C 75 ; WX 591 ; N K ; B 81 0 728 740 ; C 76 ; WX 462 ; N L ; B 82 0 474 740 ; C 77 ; WX 919 ; N M ; B 76 0 980 740 ; C 78 ; WX 740 ; N N ; B 75 0 801 740 ; C 79 ; WX 869 ; N O ; B 105 -13 901 753 ; C 80 ; WX 592 ; N P ; B 75 0 664 740 ; C 81 ; WX 871 ; N Q ; B 102 -13 912 753 ; C 82 ; WX 607 ; N R ; B 70 0 669 740 ; C 83 ; WX 498 ; N S ; B 57 -13 561 753 ; C 84 ; WX 426 ; N T ; B 131 0 556 740 ; C 85 ; WX 655 ; N U ; B 118 -13 716 740 ; C 86 ; WX 702 ; N V ; B 145 0 830 740 ; C 87 ; WX 960 ; N W ; B 148 0 1087 740 ; C 88 ; WX 609 ; N X ; B 8 0 724 740 ; C 89 ; WX 592 ; N Y ; B 138 0 729 740 ; C 90 ; WX 480 ; N Z ; B 12 0 596 740 ; C 91 ; WX 351 ; N bracketleft ; B 145 -179 477 753 ; C 92 ; WX 605 ; N backslash ; B 255 -100 458 740 ; C 93 ; WX 351 ; N bracketright ; B -19 -179 312 753 ; C 94 ; WX 606 ; N asciicircum ; B 110 307 610 740 ; C 95 ; WX 500 ; N underscore ; B -23 -125 486 -75 ; C 96 ; WX 351 ; N quoteleft ; B 232 546 358 740 ; C 97 ; WX 683 ; N a ; B 88 -13 722 561 ; C 98 ; WX 682 ; N b ; B 68 -13 703 740 ; C 99 ; WX 647 ; N c ; B 87 -13 678 561 ; C 100 ; WX 685 ; N d ; B 85 -13 755 740 ; C 101 ; WX 650 ; N e ; B 84 -13 664 561 ; C 102 ; WX 314 ; N f ; B 104 0 454 753 ; L i fi ; L l fl ; C 103 ; WX 673 ; N g ; B 56 -215 707 561 ; C 104 ; WX 610 ; N h ; B 62 0 606 740 ; C 105 ; WX 200 ; N i ; B 65 0 272 740 ; C 106 ; WX 203 ; N j ; B -80 -192 274 740 ; C 107 ; WX 502 ; N k ; B 70 0 588 740 ; C 108 ; WX 200 ; N l ; B 65 0 272 740 ; C 109 ; WX 938 ; N m ; B 66 0 938 561 ; C 110 ; WX 610 ; N n ; B 65 0 609 561 ; C 111 ; WX 655 ; N o ; B 88 -13 669 561 ; C 112 ; WX 682 ; N p ; B 28 -192 699 561 ; C 113 ; WX 682 ; N q ; B 83 -192 717 561 ; C 114 ; WX 301 ; N r ; B 65 0 395 561 ; C 115 ; WX 388 ; N s ; B 49 -13 424 561 ; C 116 ; WX 339 ; N t ; B 104 0 431 740 ; C 117 ; WX 608 ; N u ; B 100 -13 642 547 ; C 118 ; WX 554 ; N v ; B 108 0 647 547 ; C 119 ; WX 831 ; N w ; B 114 0 921 547 ; C 120 ; WX 480 ; N x ; B 12 0 569 547 ; C 121 ; WX 536 ; N y ; B 97 -192 624 547 ; C 122 ; WX 425 ; N z ; B 10 0 498 547 ; C 123 ; WX 351 ; N braceleft ; B 115 -189 468 740 ; C 124 ; WX 672 ; N bar ; B 280 -100 510 740 ; C 125 ; WX 351 ; N braceright ; B -15 -189 338 740 ; C 126 ; WX 606 ; N asciitilde ; B 114 179 584 319 ; C 161 ; WX 295 ; N exclamdown ; B 74 -192 286 548 ; C 162 ; WX 554 ; N cent ; B 115 62 596 707 ; C 163 ; WX 554 ; N sterling ; B 29 0 614 753 ; C 164 ; WX 166 ; N fraction ; B -113 0 417 740 ; C 165 ; WX 554 ; N yen ; B 75 0 687 740 ; C 166 ; WX 554 ; N florin ; B -39 -153 669 818 ; C 167 ; WX 615 ; N section ; B 118 -141 597 753 ; C 168 ; WX 554 ; N currency ; B 24 42 645 580 ; C 169 ; WX 198 ; N quotesingle ; B 153 444 277 740 ; C 170 ; WX 502 ; N quotedblleft ; B 234 546 507 740 ; C 171 ; WX 425 ; N guillemotleft ; B 92 81 469 481 ; C 172 ; WX 251 ; N guilsinglleft ; B 92 81 295 481 ; C 173 ; WX 251 ; N guilsinglright ; B 60 81 263 481 ; C 174 ; WX 487 ; N fi ; B 104 0 559 753 ; C 175 ; WX 485 ; N fl ; B 104 0 557 753 ; C 177 ; WX 500 ; N endash ; B 81 248 523 315 ; C 178 ; WX 553 ; N dagger ; B 146 -133 593 740 ; C 179 ; WX 553 ; N daggerdbl ; B 72 -133 593 740 ; C 180 ; WX 277 ; N periodcentered ; B 137 190 235 316 ; C 182 ; WX 564 ; N paragraph ; B 119 -110 688 740 ; C 183 ; WX 606 ; N bullet ; B 217 222 528 532 ; C 184 ; WX 354 ; N quotesinglbase ; B 76 -68 274 126 ; C 185 ; WX 502 ; N quotedblbase ; B 76 -68 422 126 ; C 186 ; WX 484 ; N quotedblright ; B 197 546 542 740 ; C 187 ; WX 425 ; N guillemotright ; B 60 81 437 481 ; C 188 ; WX 1000 ; N ellipsis ; B 130 0 893 126 ; C 189 ; WX 1174 ; N perthousand ; B 128 -13 1182 751 ; C 191 ; WX 591 ; N questiondown ; B 64 -205 534 548 ; C 193 ; WX 378 ; N grave ; B 204 619 425 786 ; C 194 ; WX 375 ; N acute ; B 203 619 444 786 ; C 195 ; WX 502 ; N circumflex ; B 192 639 546 764 ; C 196 ; WX 439 ; N tilde ; B 179 651 520 754 ; C 197 ; WX 485 ; N macron ; B 197 669 547 736 ; C 198 ; WX 453 ; N breve ; B 192 651 541 754 ; C 199 ; WX 222 ; N dotaccent ; B 192 639 290 765 ; C 200 ; WX 369 ; N dieresis ; B 191 639 437 765 ; C 202 ; WX 332 ; N ring ; B 191 600 401 807 ; C 203 ; WX 324 ; N cedilla ; B 52 -222 231 0 ; C 205 ; WX 552 ; N hungarumlaut ; B 239 605 594 800 ; C 206 ; WX 302 ; N ogonek ; B 53 -191 202 0 ; C 207 ; WX 502 ; N caron ; B 210 639 565 764 ; C 208 ; WX 1000 ; N emdash ; B 81 248 1023 315 ; C 225 ; WX 992 ; N AE ; B -20 0 1044 740 ; C 227 ; WX 369 ; N ordfeminine ; B 102 407 494 753 ; C 232 ; WX 517 ; N Lslash ; B 107 0 529 740 ; C 233 ; WX 868 ; N Oslash ; B 76 -83 929 819 ; C 234 ; WX 1194 ; N OE ; B 107 -13 1279 753 ; C 235 ; WX 369 ; N ordmasculine ; B 116 407 466 753 ; C 241 ; WX 1157 ; N ae ; B 80 -13 1169 561 ; C 245 ; WX 200 ; N dotlessi ; B 65 0 236 547 ; C 248 ; WX 300 ; N lslash ; B 95 0 354 740 ; C 249 ; WX 653 ; N oslash ; B 51 -64 703 614 ; C 250 ; WX 1137 ; N oe ; B 80 -13 1160 561 ; C 251 ; WX 554 ; N germandbls ; B 61 -13 578 753 ; C -1 ; WX 650 ; N ecircumflex ; B 84 -13 664 764 ; C -1 ; WX 650 ; N edieresis ; B 84 -13 664 765 ; C -1 ; WX 683 ; N aacute ; B 88 -13 722 786 ; C -1 ; WX 747 ; N registered ; B 53 -12 830 752 ; C -1 ; WX 200 ; N icircumflex ; B 41 0 395 764 ; C -1 ; WX 608 ; N udieresis ; B 100 -13 642 765 ; C -1 ; WX 655 ; N ograve ; B 88 -13 669 786 ; C -1 ; WX 608 ; N uacute ; B 100 -13 642 786 ; C -1 ; WX 608 ; N ucircumflex ; B 100 -13 642 764 ; C -1 ; WX 740 ; N Aacute ; B 12 0 729 949 ; C -1 ; WX 200 ; N igrave ; B 65 0 296 786 ; C -1 ; WX 226 ; N Icircumflex ; B 76 0 439 927 ; C -1 ; WX 647 ; N ccedilla ; B 87 -222 678 561 ; C -1 ; WX 683 ; N adieresis ; B 88 -13 722 765 ; C -1 ; WX 536 ; N Ecircumflex ; B 70 0 612 927 ; C -1 ; WX 388 ; N scaron ; B 49 -13 508 764 ; C -1 ; WX 682 ; N thorn ; B 28 -192 699 740 ; C -1 ; WX 1000 ; N trademark ; B 137 296 953 740 ; C -1 ; WX 650 ; N egrave ; B 84 -13 664 786 ; C -1 ; WX 332 ; N threesuperior ; B 98 289 408 747 ; C -1 ; WX 425 ; N zcaron ; B 10 0 527 764 ; C -1 ; WX 683 ; N atilde ; B 88 -13 722 754 ; C -1 ; WX 683 ; N aring ; B 88 -13 722 807 ; C -1 ; WX 655 ; N ocircumflex ; B 88 -13 669 764 ; C -1 ; WX 536 ; N Edieresis ; B 70 0 612 928 ; C -1 ; WX 831 ; N threequarters ; B 126 0 825 747 ; C -1 ; WX 536 ; N ydieresis ; B 97 -192 624 765 ; C -1 ; WX 536 ; N yacute ; B 97 -192 624 786 ; C -1 ; WX 200 ; N iacute ; B 65 0 397 786 ; C -1 ; WX 740 ; N Acircumflex ; B 12 0 729 927 ; C -1 ; WX 655 ; N Uacute ; B 118 -13 716 949 ; C -1 ; WX 650 ; N eacute ; B 84 -13 664 786 ; C -1 ; WX 869 ; N Ograve ; B 105 -13 901 949 ; C -1 ; WX 683 ; N agrave ; B 88 -13 722 786 ; C -1 ; WX 655 ; N Udieresis ; B 118 -13 716 928 ; C -1 ; WX 683 ; N acircumflex ; B 88 -13 722 764 ; C -1 ; WX 226 ; N Igrave ; B 76 0 340 949 ; C -1 ; WX 332 ; N twosuperior ; B 74 296 433 747 ; C -1 ; WX 655 ; N Ugrave ; B 118 -13 716 949 ; C -1 ; WX 831 ; N onequarter ; B 183 0 770 740 ; C -1 ; WX 655 ; N Ucircumflex ; B 118 -13 716 927 ; C -1 ; WX 498 ; N Scaron ; B 57 -13 593 927 ; C -1 ; WX 226 ; N Idieresis ; B 76 0 396 928 ; C -1 ; WX 200 ; N idieresis ; B 65 0 353 765 ; C -1 ; WX 536 ; N Egrave ; B 70 0 612 949 ; C -1 ; WX 869 ; N Oacute ; B 105 -13 901 949 ; C -1 ; WX 606 ; N divide ; B 92 -13 608 519 ; C -1 ; WX 740 ; N Atilde ; B 12 0 729 917 ; C -1 ; WX 740 ; N Aring ; B 12 0 729 955 ; C -1 ; WX 869 ; N Odieresis ; B 105 -13 901 928 ; C -1 ; WX 740 ; N Adieresis ; B 12 0 729 928 ; C -1 ; WX 740 ; N Ntilde ; B 75 0 801 917 ; C -1 ; WX 480 ; N Zcaron ; B 12 0 596 927 ; C -1 ; WX 592 ; N Thorn ; B 60 0 621 740 ; C -1 ; WX 226 ; N Iacute ; B 76 0 440 949 ; C -1 ; WX 606 ; N plusminus ; B 47 -24 618 518 ; C -1 ; WX 606 ; N multiply ; B 87 24 612 482 ; C -1 ; WX 536 ; N Eacute ; B 70 0 612 949 ; C -1 ; WX 592 ; N Ydieresis ; B 138 0 729 928 ; C -1 ; WX 332 ; N onesuperior ; B 190 296 335 740 ; C -1 ; WX 608 ; N ugrave ; B 100 -13 642 786 ; C -1 ; WX 606 ; N logicalnot ; B 110 109 627 388 ; C -1 ; WX 610 ; N ntilde ; B 65 0 609 754 ; C -1 ; WX 869 ; N Otilde ; B 105 -13 901 917 ; C -1 ; WX 655 ; N otilde ; B 88 -13 669 754 ; C -1 ; WX 813 ; N Ccedilla ; B 105 -222 870 752 ; C -1 ; WX 740 ; N Agrave ; B 12 0 729 949 ; C -1 ; WX 831 ; N onehalf ; B 164 0 810 740 ; C -1 ; WX 790 ; N Eth ; B 104 0 813 740 ; C -1 ; WX 400 ; N degree ; B 158 421 451 709 ; C -1 ; WX 592 ; N Yacute ; B 138 0 729 949 ; C -1 ; WX 869 ; N Ocircumflex ; B 105 -13 901 927 ; C -1 ; WX 655 ; N oacute ; B 88 -13 669 786 ; C -1 ; WX 608 ; N mu ; B 46 -184 628 547 ; C -1 ; WX 606 ; N minus ; B 92 219 608 287 ; C -1 ; WX 655 ; N eth ; B 88 -12 675 753 ; C -1 ; WX 655 ; N odieresis ; B 88 -13 669 765 ; C -1 ; WX 747 ; N copyright ; B 53 -12 830 752 ; C -1 ; WX 672 ; N brokenbar ; B 280 -100 510 740 ; EndCharMetrics StartKernData StartKernPairs 216 KPX A y -62 KPX A w -65 KPX A v -70 KPX A u -20 KPX A quoteright -100 KPX A quotedblright -100 KPX A Y -92 KPX A W -60 KPX A V -102 KPX A U -40 KPX A T -45 KPX A Q -40 KPX A O -50 KPX A G -40 KPX A C -40 KPX B A -10 KPX C A -40 KPX D period -20 KPX D comma -20 KPX D Y -30 KPX D W -10 KPX D V -50 KPX D A -50 KPX F period -160 KPX F e -20 KPX F comma -180 KPX F a -20 KPX F A -75 KPX G period -20 KPX G comma -20 KPX G Y -20 KPX J period -15 KPX J a -20 KPX J A -30 KPX K o -15 KPX K e -20 KPX K O -20 KPX L y -23 KPX L quoteright -130 KPX L quotedblright -130 KPX L Y -91 KPX L W -67 KPX L V -113 KPX L T -46 KPX O period -30 KPX O comma -30 KPX O Y -30 KPX O X -30 KPX O W -20 KPX O V -60 KPX O T -30 KPX O A -60 KPX P period -300 KPX P o -60 KPX P e -20 KPX P comma -280 KPX P a -20 KPX P A -114 KPX Q comma 20 KPX R Y -10 KPX R W 10 KPX R V -10 KPX R T 6 KPX S comma 20 KPX T y -50 KPX T w -55 KPX T u -46 KPX T semicolon -29 KPX T r -30 KPX T period -91 KPX T o -70 KPX T i 10 KPX T hyphen -75 KPX T e -49 KPX T comma -82 KPX T colon -15 KPX T a -90 KPX T O -30 KPX T A -45 KPX U period -20 KPX U comma -20 KPX U A -40 KPX V u -40 KPX V semicolon -33 KPX V period -165 KPX V o -101 KPX V i -5 KPX V hyphen -75 KPX V e -101 KPX V comma -145 KPX V colon -18 KPX V a -104 KPX V O -60 KPX V G -20 KPX V A -102 KPX W y -2 KPX W u -30 KPX W semicolon -33 KPX W period -106 KPX W o -46 KPX W i 6 KPX W hyphen -35 KPX W e -47 KPX W comma -106 KPX W colon -15 KPX W a -50 KPX W O -20 KPX W A -58 KPX Y u -52 KPX Y semicolon -23 KPX Y period -175 KPX Y o -89 KPX Y hyphen -85 KPX Y e -89 KPX Y comma -145 KPX Y colon -10 KPX Y a -93 KPX Y O -30 KPX Y A -92 KPX a p 20 KPX a b 20 KPX b y -20 KPX b v -20 KPX c y -20 KPX c k -15 KPX comma space -110 KPX comma quoteright -120 KPX comma quotedblright -120 KPX e y -20 KPX e w -20 KPX e v -20 KPX f period -50 KPX f o -40 KPX f l -30 KPX f i -34 KPX f f -60 KPX f e -20 KPX f dotlessi -34 KPX f comma -50 KPX f a -40 KPX g a -15 KPX h y -30 KPX k y -5 KPX k e -15 KPX m y -20 KPX m u -20 KPX m a -20 KPX n y -15 KPX n v -20 KPX o y -20 KPX o x -15 KPX o w -20 KPX o v -30 KPX p y -20 KPX period space -110 KPX period quoteright -120 KPX period quotedblright -120 KPX quotedblleft quoteleft -35 KPX quotedblleft A -100 KPX quotedblright space -110 KPX quoteleft quoteleft -203 KPX quoteleft A -100 KPX quoteright v -30 KPX quoteright t 10 KPX quoteright space -110 KPX quoteright s -15 KPX quoteright r -20 KPX quoteright quoteright -203 KPX quoteright quotedblright -35 KPX quoteright d -110 KPX r y 40 KPX r v 40 KPX r u 20 KPX r t 20 KPX r s 20 KPX r q -8 KPX r period -73 KPX r p 20 KPX r o -20 KPX r n 21 KPX r m 28 KPX r l 20 KPX r k 20 KPX r i 20 KPX r hyphen -60 KPX r g -15 KPX r e -4 KPX r d -6 KPX r comma -75 KPX r c -20 KPX r a -20 KPX s period 20 KPX s comma 20 KPX space quoteleft -110 KPX space quotedblleft -110 KPX space Y -60 KPX space W -25 KPX space V -50 KPX space T -25 KPX space A -20 KPX v period -130 KPX v o -30 KPX v e -20 KPX v comma -100 KPX v a -30 KPX w period -100 KPX w o -30 KPX w h 15 KPX w e -20 KPX w comma -90 KPX w a -30 KPX y period -125 KPX y o -30 KPX y e -20 KPX y comma -110 KPX y a -30 EndKernPairs EndKernData StartComposites 56 CC Aacute 2 ; PCC A 0 0 ; PCC acute 213 163 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 149 163 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 216 163 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 211 163 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 231 148 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 181 163 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 111 163 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 47 163 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 114 163 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 109 163 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute -4 163 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -108 163 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -41 163 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave -86 163 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 181 163 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 277 163 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 214 163 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 280 163 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 276 163 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 245 163 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 28 163 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 190 163 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 107 163 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 173 163 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 149 163 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 159 163 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 142 163 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 19 163 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 154 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 91 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 157 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 153 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 176 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 122 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 138 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 74 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 141 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 136 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -47 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -151 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -84 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -129 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 86 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 140 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 77 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 143 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 139 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 108 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron -57 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 137 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 53 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 120 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 95 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 101 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron -38 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pbkd8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1992 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Tue Jan 21 16:13:29 1992 Comment UniqueID 37831 Comment VMusage 31983 38875 FontName Bookman-Demi FullName ITC Bookman Demi FamilyName ITC Bookman Weight Demi ItalicAngle 0 IsFixedPitch false FontBBox -194 -250 1346 934 UnderlinePosition -100 UnderlineThickness 50 Version 001.004 Notice Copyright (c) 1985, 1987, 1989, 1992 Adobe Systems Incorporated. All Rights Reserved.ITC Bookman is a registered trademark of International Typeface Corporation. EncodingScheme AdobeStandardEncoding CapHeight 681 XHeight 502 Ascender 725 Descender -212 StartCharMetrics 228 C 32 ; WX 340 ; N space ; B 0 0 0 0 ; C 33 ; WX 360 ; N exclam ; B 82 -8 282 698 ; C 34 ; WX 420 ; N quotedbl ; B 11 379 369 698 ; C 35 ; WX 660 ; N numbersign ; B 84 0 576 681 ; C 36 ; WX 660 ; N dollar ; B 48 -119 620 805 ; C 37 ; WX 940 ; N percent ; B 12 -8 924 698 ; C 38 ; WX 800 ; N ampersand ; B 21 -17 772 698 ; C 39 ; WX 320 ; N quoteright ; B 82 440 242 698 ; C 40 ; WX 320 ; N parenleft ; B 48 -150 289 749 ; C 41 ; WX 320 ; N parenright ; B 20 -150 262 749 ; C 42 ; WX 460 ; N asterisk ; B 62 317 405 697 ; C 43 ; WX 600 ; N plus ; B 51 9 555 514 ; C 44 ; WX 340 ; N comma ; B 78 -124 257 162 ; C 45 ; WX 360 ; N hyphen ; B 20 210 340 318 ; C 46 ; WX 340 ; N period ; B 76 -8 258 172 ; C 47 ; WX 600 ; N slash ; B 50 -149 555 725 ; C 48 ; WX 660 ; N zero ; B 30 -17 639 698 ; C 49 ; WX 660 ; N one ; B 137 0 568 681 ; C 50 ; WX 660 ; N two ; B 41 0 628 698 ; C 51 ; WX 660 ; N three ; B 37 -17 631 698 ; C 52 ; WX 660 ; N four ; B 19 0 649 681 ; C 53 ; WX 660 ; N five ; B 44 -17 623 723 ; C 54 ; WX 660 ; N six ; B 34 -17 634 698 ; C 55 ; WX 660 ; N seven ; B 36 0 632 681 ; C 56 ; WX 660 ; N eight ; B 36 -17 633 698 ; C 57 ; WX 660 ; N nine ; B 33 -17 636 698 ; C 58 ; WX 340 ; N colon ; B 76 -8 258 515 ; C 59 ; WX 340 ; N semicolon ; B 75 -124 259 515 ; C 60 ; WX 600 ; N less ; B 49 -9 558 542 ; C 61 ; WX 600 ; N equal ; B 51 109 555 421 ; C 62 ; WX 600 ; N greater ; B 48 -9 557 542 ; C 63 ; WX 660 ; N question ; B 61 -8 608 698 ; C 64 ; WX 820 ; N at ; B 60 -17 758 698 ; C 65 ; WX 720 ; N A ; B -34 0 763 681 ; C 66 ; WX 720 ; N B ; B 20 0 693 681 ; C 67 ; WX 740 ; N C ; B 35 -17 724 698 ; C 68 ; WX 780 ; N D ; B 20 0 748 681 ; C 69 ; WX 720 ; N E ; B 20 0 724 681 ; C 70 ; WX 680 ; N F ; B 20 0 686 681 ; C 71 ; WX 780 ; N G ; B 35 -17 773 698 ; C 72 ; WX 820 ; N H ; B 20 0 800 681 ; C 73 ; WX 400 ; N I ; B 20 0 379 681 ; C 74 ; WX 640 ; N J ; B -12 -17 622 681 ; C 75 ; WX 800 ; N K ; B 20 0 796 681 ; C 76 ; WX 640 ; N L ; B 20 0 668 681 ; C 77 ; WX 940 ; N M ; B 20 0 924 681 ; C 78 ; WX 740 ; N N ; B 20 0 724 681 ; C 79 ; WX 800 ; N O ; B 35 -17 769 698 ; C 80 ; WX 660 ; N P ; B 20 0 658 681 ; C 81 ; WX 800 ; N Q ; B 35 -226 775 698 ; C 82 ; WX 780 ; N R ; B 20 0 783 681 ; C 83 ; WX 660 ; N S ; B 21 -17 639 698 ; C 84 ; WX 700 ; N T ; B -4 0 703 681 ; C 85 ; WX 740 ; N U ; B 15 -17 724 681 ; C 86 ; WX 720 ; N V ; B -20 0 730 681 ; C 87 ; WX 940 ; N W ; B -20 0 963 681 ; C 88 ; WX 780 ; N X ; B 1 0 770 681 ; C 89 ; WX 700 ; N Y ; B -20 0 718 681 ; C 90 ; WX 640 ; N Z ; B 6 0 635 681 ; C 91 ; WX 300 ; N bracketleft ; B 75 -138 285 725 ; C 92 ; WX 600 ; N backslash ; B 50 0 555 725 ; C 93 ; WX 300 ; N bracketright ; B 21 -138 231 725 ; C 94 ; WX 600 ; N asciicircum ; B 52 281 554 681 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 320 ; N quoteleft ; B 82 440 242 698 ; C 97 ; WX 580 ; N a ; B 28 -8 588 515 ; C 98 ; WX 600 ; N b ; B -20 -8 568 725 ; C 99 ; WX 580 ; N c ; B 31 -8 550 515 ; C 100 ; WX 640 ; N d ; B 31 -8 622 725 ; C 101 ; WX 580 ; N e ; B 31 -8 548 515 ; C 102 ; WX 380 ; N f ; B 22 0 461 741 ; L i fi ; L l fl ; C 103 ; WX 580 ; N g ; B 9 -243 583 595 ; C 104 ; WX 680 ; N h ; B 22 0 654 725 ; C 105 ; WX 360 ; N i ; B 22 0 335 729 ; C 106 ; WX 340 ; N j ; B -94 -221 278 729 ; C 107 ; WX 660 ; N k ; B 22 0 643 725 ; C 108 ; WX 340 ; N l ; B 9 0 322 725 ; C 109 ; WX 1000 ; N m ; B 22 0 980 515 ; C 110 ; WX 680 ; N n ; B 22 0 652 515 ; C 111 ; WX 620 ; N o ; B 31 -8 585 515 ; C 112 ; WX 640 ; N p ; B 22 -212 611 515 ; C 113 ; WX 620 ; N q ; B 31 -212 633 515 ; C 114 ; WX 460 ; N r ; B 22 0 462 502 ; C 115 ; WX 520 ; N s ; B 22 -8 492 515 ; C 116 ; WX 460 ; N t ; B 22 -8 445 660 ; C 117 ; WX 660 ; N u ; B 22 -8 653 502 ; C 118 ; WX 600 ; N v ; B -6 0 593 502 ; C 119 ; WX 800 ; N w ; B -6 0 810 502 ; C 120 ; WX 600 ; N x ; B 8 0 591 502 ; C 121 ; WX 620 ; N y ; B 6 -221 613 502 ; C 122 ; WX 560 ; N z ; B 22 0 547 502 ; C 123 ; WX 320 ; N braceleft ; B 14 -139 301 726 ; C 124 ; WX 600 ; N bar ; B 243 -250 362 750 ; C 125 ; WX 320 ; N braceright ; B 15 -140 302 725 ; C 126 ; WX 600 ; N asciitilde ; B 51 162 555 368 ; C 161 ; WX 360 ; N exclamdown ; B 84 -191 284 515 ; C 162 ; WX 660 ; N cent ; B 133 17 535 674 ; C 163 ; WX 660 ; N sterling ; B 10 -17 659 698 ; C 164 ; WX 120 ; N fraction ; B -194 0 312 681 ; C 165 ; WX 660 ; N yen ; B -28 0 696 681 ; C 166 ; WX 660 ; N florin ; B -46 -209 674 749 ; C 167 ; WX 600 ; N section ; B 36 -153 560 698 ; C 168 ; WX 660 ; N currency ; B 77 88 584 593 ; C 169 ; WX 240 ; N quotesingle ; B 42 379 178 698 ; C 170 ; WX 540 ; N quotedblleft ; B 82 439 449 698 ; C 171 ; WX 400 ; N guillemotleft ; B 34 101 360 457 ; C 172 ; WX 220 ; N guilsinglleft ; B 34 101 188 457 ; C 173 ; WX 220 ; N guilsinglright ; B 34 101 188 457 ; C 174 ; WX 740 ; N fi ; B 22 0 710 741 ; C 175 ; WX 740 ; N fl ; B 22 0 710 741 ; C 177 ; WX 500 ; N endash ; B -25 212 525 318 ; C 178 ; WX 440 ; N dagger ; B 33 -156 398 698 ; C 179 ; WX 380 ; N daggerdbl ; B 8 -156 380 698 ; C 180 ; WX 340 ; N periodcentered ; B 76 175 258 355 ; C 182 ; WX 800 ; N paragraph ; B 51 0 698 681 ; C 183 ; WX 460 ; N bullet ; B 60 170 404 511 ; C 184 ; WX 320 ; N quotesinglbase ; B 82 -114 242 144 ; C 185 ; WX 540 ; N quotedblbase ; B 82 -114 450 144 ; C 186 ; WX 540 ; N quotedblright ; B 82 440 449 698 ; C 187 ; WX 400 ; N guillemotright ; B 34 101 360 457 ; C 188 ; WX 1000 ; N ellipsis ; B 76 -8 924 172 ; C 189 ; WX 1360 ; N perthousand ; B 12 -8 1346 698 ; C 191 ; WX 660 ; N questiondown ; B 62 -191 609 515 ; C 193 ; WX 400 ; N grave ; B 68 547 327 730 ; C 194 ; WX 400 ; N acute ; B 68 547 327 731 ; C 195 ; WX 500 ; N circumflex ; B 68 555 430 731 ; C 196 ; WX 480 ; N tilde ; B 69 556 421 691 ; C 197 ; WX 460 ; N macron ; B 68 577 383 663 ; C 198 ; WX 500 ; N breve ; B 68 553 429 722 ; C 199 ; WX 320 ; N dotaccent ; B 68 536 259 730 ; C 200 ; WX 500 ; N dieresis ; B 68 560 441 698 ; C 202 ; WX 340 ; N ring ; B 68 552 275 755 ; C 203 ; WX 360 ; N cedilla ; B 68 -213 284 0 ; C 205 ; WX 440 ; N hungarumlaut ; B 68 554 365 741 ; C 206 ; WX 320 ; N ogonek ; B 68 -163 246 0 ; C 207 ; WX 500 ; N caron ; B 68 541 430 717 ; C 208 ; WX 1000 ; N emdash ; B -25 212 1025 318 ; C 225 ; WX 1140 ; N AE ; B -34 0 1149 681 ; C 227 ; WX 400 ; N ordfeminine ; B 27 383 396 698 ; C 232 ; WX 640 ; N Lslash ; B 20 0 668 681 ; C 233 ; WX 800 ; N Oslash ; B 35 -110 771 781 ; C 234 ; WX 1220 ; N OE ; B 35 -17 1219 698 ; C 235 ; WX 400 ; N ordmasculine ; B 17 383 383 698 ; C 241 ; WX 880 ; N ae ; B 28 -8 852 515 ; C 245 ; WX 360 ; N dotlessi ; B 22 0 335 502 ; C 248 ; WX 340 ; N lslash ; B 9 0 322 725 ; C 249 ; WX 620 ; N oslash ; B 31 -40 586 551 ; C 250 ; WX 940 ; N oe ; B 31 -8 908 515 ; C 251 ; WX 660 ; N germandbls ; B -61 -91 644 699 ; C -1 ; WX 580 ; N ecircumflex ; B 31 -8 548 731 ; C -1 ; WX 580 ; N edieresis ; B 31 -8 548 698 ; C -1 ; WX 580 ; N aacute ; B 28 -8 588 731 ; C -1 ; WX 740 ; N registered ; B 23 -17 723 698 ; C -1 ; WX 360 ; N icircumflex ; B -2 0 360 731 ; C -1 ; WX 660 ; N udieresis ; B 22 -8 653 698 ; C -1 ; WX 620 ; N ograve ; B 31 -8 585 730 ; C -1 ; WX 660 ; N uacute ; B 22 -8 653 731 ; C -1 ; WX 660 ; N ucircumflex ; B 22 -8 653 731 ; C -1 ; WX 720 ; N Aacute ; B -34 0 763 910 ; C -1 ; WX 360 ; N igrave ; B 22 0 335 730 ; C -1 ; WX 400 ; N Icircumflex ; B 18 0 380 910 ; C -1 ; WX 580 ; N ccedilla ; B 31 -213 550 515 ; C -1 ; WX 580 ; N adieresis ; B 28 -8 588 698 ; C -1 ; WX 720 ; N Ecircumflex ; B 20 0 724 910 ; C -1 ; WX 520 ; N scaron ; B 22 -8 492 717 ; C -1 ; WX 640 ; N thorn ; B 22 -212 611 725 ; C -1 ; WX 980 ; N trademark ; B 42 277 982 681 ; C -1 ; WX 580 ; N egrave ; B 31 -8 548 730 ; C -1 ; WX 396 ; N threesuperior ; B 5 269 391 698 ; C -1 ; WX 560 ; N zcaron ; B 22 0 547 717 ; C -1 ; WX 580 ; N atilde ; B 28 -8 588 691 ; C -1 ; WX 580 ; N aring ; B 28 -8 588 755 ; C -1 ; WX 620 ; N ocircumflex ; B 31 -8 585 731 ; C -1 ; WX 720 ; N Edieresis ; B 20 0 724 877 ; C -1 ; WX 990 ; N threequarters ; B 15 0 967 692 ; C -1 ; WX 620 ; N ydieresis ; B 6 -221 613 698 ; C -1 ; WX 620 ; N yacute ; B 6 -221 613 731 ; C -1 ; WX 360 ; N iacute ; B 22 0 335 731 ; C -1 ; WX 720 ; N Acircumflex ; B -34 0 763 910 ; C -1 ; WX 740 ; N Uacute ; B 15 -17 724 910 ; C -1 ; WX 580 ; N eacute ; B 31 -8 548 731 ; C -1 ; WX 800 ; N Ograve ; B 35 -17 769 909 ; C -1 ; WX 580 ; N agrave ; B 28 -8 588 730 ; C -1 ; WX 740 ; N Udieresis ; B 15 -17 724 877 ; C -1 ; WX 580 ; N acircumflex ; B 28 -8 588 731 ; C -1 ; WX 400 ; N Igrave ; B 20 0 379 909 ; C -1 ; WX 396 ; N twosuperior ; B 14 279 396 698 ; C -1 ; WX 740 ; N Ugrave ; B 15 -17 724 909 ; C -1 ; WX 990 ; N onequarter ; B 65 0 967 681 ; C -1 ; WX 740 ; N Ucircumflex ; B 15 -17 724 910 ; C -1 ; WX 660 ; N Scaron ; B 21 -17 639 896 ; C -1 ; WX 400 ; N Idieresis ; B 18 0 391 877 ; C -1 ; WX 360 ; N idieresis ; B -2 0 371 698 ; C -1 ; WX 720 ; N Egrave ; B 20 0 724 909 ; C -1 ; WX 800 ; N Oacute ; B 35 -17 769 910 ; C -1 ; WX 600 ; N divide ; B 51 9 555 521 ; C -1 ; WX 720 ; N Atilde ; B -34 0 763 870 ; C -1 ; WX 720 ; N Aring ; B -34 0 763 934 ; C -1 ; WX 800 ; N Odieresis ; B 35 -17 769 877 ; C -1 ; WX 720 ; N Adieresis ; B -34 0 763 877 ; C -1 ; WX 740 ; N Ntilde ; B 20 0 724 870 ; C -1 ; WX 640 ; N Zcaron ; B 6 0 635 896 ; C -1 ; WX 660 ; N Thorn ; B 20 0 658 681 ; C -1 ; WX 400 ; N Iacute ; B 20 0 379 910 ; C -1 ; WX 600 ; N plusminus ; B 51 0 555 514 ; C -1 ; WX 600 ; N multiply ; B 48 10 552 514 ; C -1 ; WX 720 ; N Eacute ; B 20 0 724 910 ; C -1 ; WX 700 ; N Ydieresis ; B -20 0 718 877 ; C -1 ; WX 396 ; N onesuperior ; B 65 279 345 687 ; C -1 ; WX 660 ; N ugrave ; B 22 -8 653 730 ; C -1 ; WX 600 ; N logicalnot ; B 51 129 555 421 ; C -1 ; WX 680 ; N ntilde ; B 22 0 652 691 ; C -1 ; WX 800 ; N Otilde ; B 35 -17 769 870 ; C -1 ; WX 620 ; N otilde ; B 31 -8 585 691 ; C -1 ; WX 740 ; N Ccedilla ; B 35 -213 724 698 ; C -1 ; WX 720 ; N Agrave ; B -34 0 763 909 ; C -1 ; WX 990 ; N onehalf ; B 65 0 980 681 ; C -1 ; WX 780 ; N Eth ; B 20 0 748 681 ; C -1 ; WX 400 ; N degree ; B 50 398 350 698 ; C -1 ; WX 700 ; N Yacute ; B -20 0 718 910 ; C -1 ; WX 800 ; N Ocircumflex ; B 35 -17 769 910 ; C -1 ; WX 620 ; N oacute ; B 31 -8 585 731 ; C -1 ; WX 660 ; N mu ; B 22 -221 653 502 ; C -1 ; WX 600 ; N minus ; B 51 207 555 323 ; C -1 ; WX 620 ; N eth ; B 31 -8 585 741 ; C -1 ; WX 620 ; N odieresis ; B 31 -8 585 698 ; C -1 ; WX 740 ; N copyright ; B 23 -17 723 698 ; C -1 ; WX 600 ; N brokenbar ; B 243 -175 362 675 ; EndCharMetrics StartKernData StartKernPairs 90 KPX A y -1 KPX A w -9 KPX A v -8 KPX A Y -52 KPX A W -20 KPX A V -68 KPX A T -40 KPX F period -132 KPX F comma -130 KPX F A -59 KPX L y 19 KPX L Y -35 KPX L W -41 KPX L V -50 KPX L T -4 KPX P period -128 KPX P comma -129 KPX P A -46 KPX R y -8 KPX R Y -20 KPX R W -24 KPX R V -29 KPX R T -4 KPX T semicolon 5 KPX T s -10 KPX T r 27 KPX T period -122 KPX T o -28 KPX T i 27 KPX T hyphen -10 KPX T e -29 KPX T comma -122 KPX T colon 7 KPX T c -29 KPX T a -24 KPX T A -42 KPX V y 12 KPX V u -11 KPX V semicolon -38 KPX V r -15 KPX V period -105 KPX V o -79 KPX V i 15 KPX V hyphen -10 KPX V e -80 KPX V comma -103 KPX V colon -37 KPX V a -74 KPX V A -88 KPX W y 12 KPX W u -11 KPX W semicolon -38 KPX W r -15 KPX W period -105 KPX W o -78 KPX W i 15 KPX W hyphen -10 KPX W e -79 KPX W comma -103 KPX W colon -37 KPX W a -73 KPX W A -60 KPX Y v 24 KPX Y u -13 KPX Y semicolon -34 KPX Y q -66 KPX Y period -105 KPX Y p -23 KPX Y o -66 KPX Y i 2 KPX Y hyphen -10 KPX Y e -67 KPX Y comma -103 KPX Y colon -32 KPX Y a -60 KPX Y A -56 KPX f f 21 KPX r q -9 KPX r period -102 KPX r o -9 KPX r n 20 KPX r m 20 KPX r hyphen -10 KPX r h -23 KPX r g -9 KPX r f 20 KPX r e -10 KPX r d -10 KPX r comma -101 KPX r c -9 EndKernPairs EndKernData StartComposites 56 CC Aacute 2 ; PCC A 0 0 ; PCC acute 160 179 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 110 179 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 110 179 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 160 179 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 190 179 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 120 179 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 160 179 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 110 179 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 110 179 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 160 179 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 179 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -50 179 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -50 179 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 179 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 130 179 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 200 179 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 150 179 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 150 179 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 200 179 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 160 179 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 80 179 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 170 179 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 120 179 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 120 179 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 170 179 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 150 179 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 100 179 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 70 179 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 90 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 40 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 40 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 90 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 100 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 30 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 90 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 40 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 40 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 90 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -20 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -70 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -70 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -20 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 80 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 110 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 60 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 60 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 110 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 50 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 10 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 130 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 80 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 80 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 130 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 110 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 60 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 30 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pbkdi8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1992 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Tue Jan 21 16:12:43 1992 Comment UniqueID 37832 Comment VMusage 32139 39031 FontName Bookman-DemiItalic FullName ITC Bookman Demi Italic FamilyName ITC Bookman Weight Demi ItalicAngle -10 IsFixedPitch false FontBBox -231 -250 1333 941 UnderlinePosition -100 UnderlineThickness 50 Version 001.004 Notice Copyright (c) 1985, 1987, 1989, 1992 Adobe Systems Incorporated. All Rights Reserved.ITC Bookman is a registered trademark of International Typeface Corporation. EncodingScheme AdobeStandardEncoding CapHeight 681 XHeight 515 Ascender 732 Descender -213 StartCharMetrics 228 C 32 ; WX 340 ; N space ; B 0 0 0 0 ; C 33 ; WX 320 ; N exclam ; B 86 -8 366 698 ; C 34 ; WX 380 ; N quotedbl ; B 140 371 507 697 ; C 35 ; WX 680 ; N numbersign ; B 157 0 649 681 ; C 36 ; WX 680 ; N dollar ; B 45 -164 697 790 ; C 37 ; WX 880 ; N percent ; B 106 -17 899 698 ; C 38 ; WX 980 ; N ampersand ; B 48 -17 1016 698 ; C 39 ; WX 320 ; N quoteright ; B 171 420 349 698 ; C 40 ; WX 260 ; N parenleft ; B 31 -134 388 741 ; C 41 ; WX 260 ; N parenright ; B -35 -134 322 741 ; C 42 ; WX 460 ; N asterisk ; B 126 346 508 698 ; C 43 ; WX 600 ; N plus ; B 91 9 595 514 ; C 44 ; WX 340 ; N comma ; B 100 -124 298 185 ; C 45 ; WX 280 ; N hyphen ; B 59 218 319 313 ; C 46 ; WX 340 ; N period ; B 106 -8 296 177 ; C 47 ; WX 360 ; N slash ; B 9 -106 502 742 ; C 48 ; WX 680 ; N zero ; B 87 -17 703 698 ; C 49 ; WX 680 ; N one ; B 123 0 565 681 ; C 50 ; WX 680 ; N two ; B 67 0 674 698 ; C 51 ; WX 680 ; N three ; B 72 -17 683 698 ; C 52 ; WX 680 ; N four ; B 63 0 708 681 ; C 53 ; WX 680 ; N five ; B 78 -17 669 681 ; C 54 ; WX 680 ; N six ; B 88 -17 704 698 ; C 55 ; WX 680 ; N seven ; B 123 0 739 681 ; C 56 ; WX 680 ; N eight ; B 68 -17 686 698 ; C 57 ; WX 680 ; N nine ; B 71 -17 712 698 ; C 58 ; WX 340 ; N colon ; B 106 -8 356 515 ; C 59 ; WX 340 ; N semicolon ; B 100 -124 352 515 ; C 60 ; WX 620 ; N less ; B 79 -9 588 540 ; C 61 ; WX 600 ; N equal ; B 91 109 595 421 ; C 62 ; WX 620 ; N greater ; B 89 -9 598 540 ; C 63 ; WX 620 ; N question ; B 145 -8 668 698 ; C 64 ; WX 780 ; N at ; B 80 -17 790 698 ; C 65 ; WX 720 ; N A ; B -27 0 769 681 ; C 66 ; WX 720 ; N B ; B 14 0 762 681 ; C 67 ; WX 700 ; N C ; B 78 -17 754 698 ; C 68 ; WX 760 ; N D ; B 14 0 805 681 ; C 69 ; WX 720 ; N E ; B 14 0 777 681 ; C 70 ; WX 660 ; N F ; B 14 0 763 681 ; C 71 ; WX 760 ; N G ; B 77 -17 828 698 ; C 72 ; WX 800 ; N H ; B 14 0 910 681 ; C 73 ; WX 380 ; N I ; B 14 0 485 681 ; C 74 ; WX 620 ; N J ; B 8 -17 721 681 ; C 75 ; WX 780 ; N K ; B 14 0 879 681 ; C 76 ; WX 640 ; N L ; B 14 0 725 681 ; C 77 ; WX 860 ; N M ; B 14 0 970 681 ; C 78 ; WX 740 ; N N ; B 14 0 845 681 ; C 79 ; WX 760 ; N O ; B 78 -17 806 698 ; C 80 ; WX 640 ; N P ; B -6 0 724 681 ; C 81 ; WX 760 ; N Q ; B 37 -213 805 698 ; C 82 ; WX 740 ; N R ; B 14 0 765 681 ; C 83 ; WX 700 ; N S ; B 59 -17 731 698 ; C 84 ; WX 700 ; N T ; B 70 0 802 681 ; C 85 ; WX 740 ; N U ; B 112 -17 855 681 ; C 86 ; WX 660 ; N V ; B 72 0 819 681 ; C 87 ; WX 1000 ; N W ; B 72 0 1090 681 ; C 88 ; WX 740 ; N X ; B -7 0 835 681 ; C 89 ; WX 660 ; N Y ; B 72 0 817 681 ; C 90 ; WX 680 ; N Z ; B 23 0 740 681 ; C 91 ; WX 260 ; N bracketleft ; B 9 -118 374 741 ; C 92 ; WX 580 ; N backslash ; B 73 0 575 741 ; C 93 ; WX 260 ; N bracketright ; B -18 -118 347 741 ; C 94 ; WX 620 ; N asciicircum ; B 92 281 594 681 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 320 ; N quoteleft ; B 155 420 333 698 ; C 97 ; WX 680 ; N a ; B 84 -8 735 515 ; C 98 ; WX 600 ; N b ; B 57 -8 633 732 ; C 99 ; WX 560 ; N c ; B 58 -8 597 515 ; C 100 ; WX 680 ; N d ; B 60 -8 714 732 ; C 101 ; WX 560 ; N e ; B 59 -8 596 515 ; C 102 ; WX 420 ; N f ; B -192 -213 641 741 ; L i fi ; L l fl ; C 103 ; WX 620 ; N g ; B 21 -213 669 515 ; C 104 ; WX 700 ; N h ; B 93 -8 736 732 ; C 105 ; WX 380 ; N i ; B 83 -8 420 755 ; C 106 ; WX 320 ; N j ; B -160 -213 392 755 ; C 107 ; WX 700 ; N k ; B 97 -8 732 732 ; C 108 ; WX 380 ; N l ; B 109 -8 410 732 ; C 109 ; WX 960 ; N m ; B 83 -8 996 515 ; C 110 ; WX 680 ; N n ; B 83 -8 715 515 ; C 111 ; WX 600 ; N o ; B 59 -8 627 515 ; C 112 ; WX 660 ; N p ; B -24 -213 682 515 ; C 113 ; WX 620 ; N q ; B 60 -213 640 515 ; C 114 ; WX 500 ; N r ; B 84 0 582 515 ; C 115 ; WX 540 ; N s ; B 32 -8 573 515 ; C 116 ; WX 440 ; N t ; B 106 -8 488 658 ; C 117 ; WX 680 ; N u ; B 83 -8 720 507 ; C 118 ; WX 540 ; N v ; B 56 -8 572 515 ; C 119 ; WX 860 ; N w ; B 56 -8 891 515 ; C 120 ; WX 620 ; N x ; B 10 -8 654 515 ; C 121 ; WX 600 ; N y ; B 25 -213 642 507 ; C 122 ; WX 560 ; N z ; B 36 -8 586 515 ; C 123 ; WX 300 ; N braceleft ; B 49 -123 413 742 ; C 124 ; WX 620 ; N bar ; B 303 -250 422 750 ; C 125 ; WX 300 ; N braceright ; B -8 -114 356 751 ; C 126 ; WX 620 ; N asciitilde ; B 101 162 605 368 ; C 161 ; WX 320 ; N exclamdown ; B 64 -191 344 515 ; C 162 ; WX 680 ; N cent ; B 161 25 616 718 ; C 163 ; WX 680 ; N sterling ; B 0 -17 787 698 ; C 164 ; WX 120 ; N fraction ; B -144 0 382 681 ; C 165 ; WX 680 ; N yen ; B 92 0 782 681 ; C 166 ; WX 680 ; N florin ; B -28 -199 743 741 ; C 167 ; WX 620 ; N section ; B 46 -137 638 698 ; C 168 ; WX 680 ; N currency ; B 148 85 637 571 ; C 169 ; WX 180 ; N quotesingle ; B 126 370 295 696 ; C 170 ; WX 520 ; N quotedblleft ; B 156 420 545 698 ; C 171 ; WX 380 ; N guillemotleft ; B 62 84 406 503 ; C 172 ; WX 220 ; N guilsinglleft ; B 62 84 249 503 ; C 173 ; WX 220 ; N guilsinglright ; B 62 84 249 503 ; C 174 ; WX 820 ; N fi ; B -191 -213 850 741 ; C 175 ; WX 820 ; N fl ; B -191 -213 850 741 ; C 177 ; WX 500 ; N endash ; B 40 219 573 311 ; C 178 ; WX 420 ; N dagger ; B 89 -137 466 698 ; C 179 ; WX 420 ; N daggerdbl ; B 79 -137 486 698 ; C 180 ; WX 340 ; N periodcentered ; B 126 173 316 358 ; C 182 ; WX 680 ; N paragraph ; B 137 0 715 681 ; C 183 ; WX 360 ; N bullet ; B 60 170 404 511 ; C 184 ; WX 300 ; N quotesinglbase ; B 106 -112 284 166 ; C 185 ; WX 520 ; N quotedblbase ; B 106 -112 495 166 ; C 186 ; WX 520 ; N quotedblright ; B 171 420 560 698 ; C 187 ; WX 380 ; N guillemotright ; B 62 84 406 503 ; C 188 ; WX 1000 ; N ellipsis ; B 86 -8 942 177 ; C 189 ; WX 1360 ; N perthousand ; B 106 -17 1333 698 ; C 191 ; WX 620 ; N questiondown ; B 83 -189 606 515 ; C 193 ; WX 380 ; N grave ; B 193 566 424 771 ; C 194 ; WX 340 ; N acute ; B 176 566 407 771 ; C 195 ; WX 480 ; N circumflex ; B 183 582 523 749 ; C 196 ; WX 480 ; N tilde ; B 178 587 533 709 ; C 197 ; WX 480 ; N macron ; B 177 603 531 691 ; C 198 ; WX 460 ; N breve ; B 177 577 516 707 ; C 199 ; WX 380 ; N dotaccent ; B 180 570 345 734 ; C 200 ; WX 520 ; N dieresis ; B 180 570 569 734 ; C 202 ; WX 360 ; N ring ; B 185 558 406 775 ; C 203 ; WX 360 ; N cedilla ; B 68 -220 289 -8 ; C 205 ; WX 560 ; N hungarumlaut ; B 181 560 616 775 ; C 206 ; WX 320 ; N ogonek ; B 68 -182 253 0 ; C 207 ; WX 480 ; N caron ; B 183 582 523 749 ; C 208 ; WX 1000 ; N emdash ; B 40 219 1073 311 ; C 225 ; WX 1140 ; N AE ; B -27 0 1207 681 ; C 227 ; WX 440 ; N ordfeminine ; B 118 400 495 685 ; C 232 ; WX 640 ; N Lslash ; B 14 0 724 681 ; C 233 ; WX 760 ; N Oslash ; B 21 -29 847 725 ; C 234 ; WX 1180 ; N OE ; B 94 -17 1245 698 ; C 235 ; WX 440 ; N ordmasculine ; B 127 400 455 685 ; C 241 ; WX 880 ; N ae ; B 39 -8 913 515 ; C 245 ; WX 380 ; N dotlessi ; B 83 -8 420 507 ; C 248 ; WX 380 ; N lslash ; B 63 -8 412 732 ; C 249 ; WX 600 ; N oslash ; B 17 -54 661 571 ; C 250 ; WX 920 ; N oe ; B 48 -8 961 515 ; C 251 ; WX 660 ; N germandbls ; B -231 -213 702 741 ; C -1 ; WX 560 ; N ecircumflex ; B 59 -8 596 749 ; C -1 ; WX 560 ; N edieresis ; B 59 -8 596 734 ; C -1 ; WX 680 ; N aacute ; B 84 -8 735 771 ; C -1 ; WX 780 ; N registered ; B 83 -17 783 698 ; C -1 ; WX 380 ; N icircumflex ; B 83 -8 433 749 ; C -1 ; WX 680 ; N udieresis ; B 83 -8 720 734 ; C -1 ; WX 600 ; N ograve ; B 59 -8 627 771 ; C -1 ; WX 680 ; N uacute ; B 83 -8 720 771 ; C -1 ; WX 680 ; N ucircumflex ; B 83 -8 720 749 ; C -1 ; WX 720 ; N Aacute ; B -27 0 769 937 ; C -1 ; WX 380 ; N igrave ; B 83 -8 424 771 ; C -1 ; WX 380 ; N Icircumflex ; B 14 0 493 915 ; C -1 ; WX 560 ; N ccedilla ; B 58 -220 597 515 ; C -1 ; WX 680 ; N adieresis ; B 84 -8 735 734 ; C -1 ; WX 720 ; N Ecircumflex ; B 14 0 777 915 ; C -1 ; WX 540 ; N scaron ; B 32 -8 573 749 ; C -1 ; WX 660 ; N thorn ; B -24 -213 682 732 ; C -1 ; WX 940 ; N trademark ; B 42 277 982 681 ; C -1 ; WX 560 ; N egrave ; B 59 -8 596 771 ; C -1 ; WX 408 ; N threesuperior ; B 86 269 483 698 ; C -1 ; WX 560 ; N zcaron ; B 36 -8 586 749 ; C -1 ; WX 680 ; N atilde ; B 84 -8 735 709 ; C -1 ; WX 680 ; N aring ; B 84 -8 735 775 ; C -1 ; WX 600 ; N ocircumflex ; B 59 -8 627 749 ; C -1 ; WX 720 ; N Edieresis ; B 14 0 777 900 ; C -1 ; WX 1020 ; N threequarters ; B 86 0 1054 691 ; C -1 ; WX 600 ; N ydieresis ; B 25 -213 642 734 ; C -1 ; WX 600 ; N yacute ; B 25 -213 642 771 ; C -1 ; WX 380 ; N iacute ; B 83 -8 420 771 ; C -1 ; WX 720 ; N Acircumflex ; B -27 0 769 915 ; C -1 ; WX 740 ; N Uacute ; B 112 -17 855 937 ; C -1 ; WX 560 ; N eacute ; B 59 -8 596 771 ; C -1 ; WX 760 ; N Ograve ; B 78 -17 806 937 ; C -1 ; WX 680 ; N agrave ; B 84 -8 735 771 ; C -1 ; WX 740 ; N Udieresis ; B 112 -17 855 900 ; C -1 ; WX 680 ; N acircumflex ; B 84 -8 735 749 ; C -1 ; WX 380 ; N Igrave ; B 14 0 485 937 ; C -1 ; WX 408 ; N twosuperior ; B 91 279 485 698 ; C -1 ; WX 740 ; N Ugrave ; B 112 -17 855 937 ; C -1 ; WX 1020 ; N onequarter ; B 118 0 1054 681 ; C -1 ; WX 740 ; N Ucircumflex ; B 112 -17 855 915 ; C -1 ; WX 700 ; N Scaron ; B 59 -17 731 915 ; C -1 ; WX 380 ; N Idieresis ; B 14 0 499 900 ; C -1 ; WX 380 ; N idieresis ; B 83 -8 479 734 ; C -1 ; WX 720 ; N Egrave ; B 14 0 777 937 ; C -1 ; WX 760 ; N Oacute ; B 78 -17 806 937 ; C -1 ; WX 600 ; N divide ; B 91 9 595 521 ; C -1 ; WX 720 ; N Atilde ; B -27 0 769 875 ; C -1 ; WX 720 ; N Aring ; B -27 0 769 941 ; C -1 ; WX 760 ; N Odieresis ; B 78 -17 806 900 ; C -1 ; WX 720 ; N Adieresis ; B -27 0 769 900 ; C -1 ; WX 740 ; N Ntilde ; B 14 0 845 875 ; C -1 ; WX 680 ; N Zcaron ; B 23 0 740 915 ; C -1 ; WX 640 ; N Thorn ; B -6 0 701 681 ; C -1 ; WX 380 ; N Iacute ; B 14 0 485 937 ; C -1 ; WX 600 ; N plusminus ; B 91 0 595 514 ; C -1 ; WX 600 ; N multiply ; B 91 10 595 514 ; C -1 ; WX 720 ; N Eacute ; B 14 0 777 937 ; C -1 ; WX 660 ; N Ydieresis ; B 72 0 817 900 ; C -1 ; WX 408 ; N onesuperior ; B 118 279 406 688 ; C -1 ; WX 680 ; N ugrave ; B 83 -8 720 771 ; C -1 ; WX 620 ; N logicalnot ; B 81 129 585 421 ; C -1 ; WX 680 ; N ntilde ; B 83 -8 715 709 ; C -1 ; WX 760 ; N Otilde ; B 78 -17 806 875 ; C -1 ; WX 600 ; N otilde ; B 59 -8 627 709 ; C -1 ; WX 700 ; N Ccedilla ; B 78 -220 754 698 ; C -1 ; WX 720 ; N Agrave ; B -27 0 769 937 ; C -1 ; WX 1020 ; N onehalf ; B 118 0 1036 681 ; C -1 ; WX 760 ; N Eth ; B 14 0 805 681 ; C -1 ; WX 400 ; N degree ; B 130 398 430 698 ; C -1 ; WX 660 ; N Yacute ; B 72 0 817 937 ; C -1 ; WX 760 ; N Ocircumflex ; B 78 -17 806 915 ; C -1 ; WX 600 ; N oacute ; B 59 -8 627 771 ; C -1 ; WX 680 ; N mu ; B 54 -213 720 507 ; C -1 ; WX 600 ; N minus ; B 91 207 595 323 ; C -1 ; WX 600 ; N eth ; B 59 -8 662 741 ; C -1 ; WX 600 ; N odieresis ; B 59 -8 627 734 ; C -1 ; WX 780 ; N copyright ; B 83 -17 783 698 ; C -1 ; WX 620 ; N brokenbar ; B 303 -175 422 675 ; EndCharMetrics StartKernData StartKernPairs 92 KPX A y 20 KPX A w 20 KPX A v 20 KPX A Y -25 KPX A W -35 KPX A V -40 KPX A T -17 KPX F period -105 KPX F comma -98 KPX F A -35 KPX L y 62 KPX L Y -5 KPX L W -15 KPX L V -19 KPX L T -26 KPX P period -105 KPX P comma -98 KPX P A -31 KPX R y 27 KPX R Y 4 KPX R W -4 KPX R V -8 KPX R T -3 KPX T y 56 KPX T w 69 KPX T u 42 KPX T semicolon 31 KPX T s -1 KPX T r 41 KPX T period -107 KPX T o -5 KPX T i 42 KPX T hyphen -20 KPX T e -10 KPX T comma -100 KPX T colon 26 KPX T c -8 KPX T a -8 KPX T A -42 KPX V y 17 KPX V u -1 KPX V semicolon -22 KPX V r 2 KPX V period -115 KPX V o -50 KPX V i 32 KPX V hyphen -20 KPX V e -50 KPX V comma -137 KPX V colon -28 KPX V a -50 KPX V A -50 KPX W y -51 KPX W u -69 KPX W semicolon -81 KPX W r -66 KPX W period -183 KPX W o -100 KPX W i -36 KPX W hyphen -22 KPX W e -100 KPX W comma -201 KPX W colon -86 KPX W a -100 KPX W A -77 KPX Y v 26 KPX Y u -1 KPX Y semicolon -4 KPX Y q -43 KPX Y period -113 KPX Y o -41 KPX Y i 20 KPX Y hyphen -20 KPX Y e -46 KPX Y comma -106 KPX Y colon -9 KPX Y a -45 KPX Y A -30 KPX f f 10 KPX r q -3 KPX r period -120 KPX r o -1 KPX r n 39 KPX r m 39 KPX r hyphen -20 KPX r h -35 KPX r g -23 KPX r f 42 KPX r e -6 KPX r d -3 KPX r comma -113 KPX r c -5 EndKernPairs EndKernData StartComposites 56 CC Aacute 2 ; PCC A 0 0 ; PCC acute 190 166 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 120 166 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 100 166 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 170 166 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 200 166 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 120 166 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 190 166 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 120 166 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 100 166 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 170 166 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 20 166 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -30 166 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -70 166 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 166 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 130 166 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 210 166 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 140 166 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 140 166 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 190 166 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 140 166 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 110 166 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 200 166 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 130 166 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 130 166 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 180 166 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 160 166 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 70 166 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 100 166 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 170 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 100 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 80 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 150 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 160 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 100 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 110 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 60 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 20 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 90 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -90 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -90 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 60 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 130 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 60 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 40 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 110 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 60 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 30 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 170 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 100 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 80 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 150 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 130 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 40 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 40 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pbkl8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1992 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Tue Jan 21 16:15:53 1992 Comment UniqueID 37833 Comment VMusage 32321 39213 FontName Bookman-Light FullName ITC Bookman Light FamilyName ITC Bookman Weight Light ItalicAngle 0 IsFixedPitch false FontBBox -188 -251 1266 908 UnderlinePosition -100 UnderlineThickness 50 Version 001.004 Notice Copyright (c) 1985, 1987, 1989, 1992 Adobe Systems Incorporated. All Rights Reserved.ITC Bookman is a registered trademark of International Typeface Corporation. EncodingScheme AdobeStandardEncoding CapHeight 681 XHeight 484 Ascender 717 Descender -228 StartCharMetrics 228 C 32 ; WX 320 ; N space ; B 0 0 0 0 ; C 33 ; WX 300 ; N exclam ; B 75 -8 219 698 ; C 34 ; WX 380 ; N quotedbl ; B 56 458 323 698 ; C 35 ; WX 620 ; N numbersign ; B 65 0 556 681 ; C 36 ; WX 620 ; N dollar ; B 34 -109 593 791 ; C 37 ; WX 900 ; N percent ; B 22 -8 873 698 ; C 38 ; WX 800 ; N ampersand ; B 45 -17 787 698 ; C 39 ; WX 220 ; N quoteright ; B 46 480 178 698 ; C 40 ; WX 300 ; N parenleft ; B 76 -145 278 727 ; C 41 ; WX 300 ; N parenright ; B 17 -146 219 727 ; C 42 ; WX 440 ; N asterisk ; B 54 325 391 698 ; C 43 ; WX 600 ; N plus ; B 51 8 555 513 ; C 44 ; WX 320 ; N comma ; B 90 -114 223 114 ; C 45 ; WX 400 ; N hyphen ; B 50 232 350 292 ; C 46 ; WX 320 ; N period ; B 92 -8 220 123 ; C 47 ; WX 600 ; N slash ; B 74 -149 532 717 ; C 48 ; WX 620 ; N zero ; B 40 -17 586 698 ; C 49 ; WX 620 ; N one ; B 160 0 501 681 ; C 50 ; WX 620 ; N two ; B 42 0 576 698 ; C 51 ; WX 620 ; N three ; B 40 -17 576 698 ; C 52 ; WX 620 ; N four ; B 25 0 600 681 ; C 53 ; WX 620 ; N five ; B 60 -17 584 717 ; C 54 ; WX 620 ; N six ; B 45 -17 590 698 ; C 55 ; WX 620 ; N seven ; B 60 0 586 681 ; C 56 ; WX 620 ; N eight ; B 44 -17 583 698 ; C 57 ; WX 620 ; N nine ; B 37 -17 576 698 ; C 58 ; WX 320 ; N colon ; B 92 -8 220 494 ; C 59 ; WX 320 ; N semicolon ; B 90 -114 223 494 ; C 60 ; WX 600 ; N less ; B 49 -2 558 526 ; C 61 ; WX 600 ; N equal ; B 51 126 555 398 ; C 62 ; WX 600 ; N greater ; B 48 -2 557 526 ; C 63 ; WX 540 ; N question ; B 27 -8 514 698 ; C 64 ; WX 820 ; N at ; B 55 -17 755 698 ; C 65 ; WX 680 ; N A ; B -37 0 714 681 ; C 66 ; WX 740 ; N B ; B 31 0 702 681 ; C 67 ; WX 740 ; N C ; B 44 -17 702 698 ; C 68 ; WX 800 ; N D ; B 31 0 752 681 ; C 69 ; WX 720 ; N E ; B 31 0 705 681 ; C 70 ; WX 640 ; N F ; B 31 0 654 681 ; C 71 ; WX 800 ; N G ; B 44 -17 778 698 ; C 72 ; WX 800 ; N H ; B 31 0 769 681 ; C 73 ; WX 340 ; N I ; B 31 0 301 681 ; C 74 ; WX 600 ; N J ; B -23 -17 567 681 ; C 75 ; WX 720 ; N K ; B 31 0 750 681 ; C 76 ; WX 600 ; N L ; B 31 0 629 681 ; C 77 ; WX 920 ; N M ; B 26 0 894 681 ; C 78 ; WX 740 ; N N ; B 26 0 722 681 ; C 79 ; WX 800 ; N O ; B 44 -17 758 698 ; C 80 ; WX 620 ; N P ; B 31 0 613 681 ; C 81 ; WX 820 ; N Q ; B 44 -189 769 698 ; C 82 ; WX 720 ; N R ; B 31 0 757 681 ; C 83 ; WX 660 ; N S ; B 28 -17 634 698 ; C 84 ; WX 620 ; N T ; B -37 0 656 681 ; C 85 ; WX 780 ; N U ; B 25 -17 754 681 ; C 86 ; WX 700 ; N V ; B -30 0 725 681 ; C 87 ; WX 960 ; N W ; B -30 0 984 681 ; C 88 ; WX 720 ; N X ; B -30 0 755 681 ; C 89 ; WX 640 ; N Y ; B -30 0 666 681 ; C 90 ; WX 640 ; N Z ; B 10 0 656 681 ; C 91 ; WX 300 ; N bracketleft ; B 92 -136 258 717 ; C 92 ; WX 600 ; N backslash ; B 74 0 532 717 ; C 93 ; WX 300 ; N bracketright ; B 41 -136 207 717 ; C 94 ; WX 600 ; N asciicircum ; B 52 276 554 681 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 220 ; N quoteleft ; B 46 479 178 698 ; C 97 ; WX 580 ; N a ; B 35 -8 587 494 ; C 98 ; WX 620 ; N b ; B -2 -8 582 717 ; C 99 ; WX 520 ; N c ; B 37 -8 498 494 ; C 100 ; WX 620 ; N d ; B 37 -8 591 717 ; C 101 ; WX 520 ; N e ; B 37 -8 491 494 ; C 102 ; WX 320 ; N f ; B 20 0 414 734 ; L i fi ; L l fl ; C 103 ; WX 540 ; N g ; B 17 -243 542 567 ; C 104 ; WX 660 ; N h ; B 20 0 643 717 ; C 105 ; WX 300 ; N i ; B 20 0 288 654 ; C 106 ; WX 300 ; N j ; B -109 -251 214 654 ; C 107 ; WX 620 ; N k ; B 20 0 628 717 ; C 108 ; WX 300 ; N l ; B 20 0 286 717 ; C 109 ; WX 940 ; N m ; B 17 0 928 494 ; C 110 ; WX 660 ; N n ; B 20 0 649 494 ; C 111 ; WX 560 ; N o ; B 37 -8 526 494 ; C 112 ; WX 620 ; N p ; B 20 -228 583 494 ; C 113 ; WX 580 ; N q ; B 37 -228 589 494 ; C 114 ; WX 440 ; N r ; B 20 0 447 494 ; C 115 ; WX 520 ; N s ; B 40 -8 487 494 ; C 116 ; WX 380 ; N t ; B 20 -8 388 667 ; C 117 ; WX 680 ; N u ; B 20 -8 653 484 ; C 118 ; WX 520 ; N v ; B -23 0 534 484 ; C 119 ; WX 780 ; N w ; B -19 0 804 484 ; C 120 ; WX 560 ; N x ; B -16 0 576 484 ; C 121 ; WX 540 ; N y ; B -23 -236 549 484 ; C 122 ; WX 480 ; N z ; B 7 0 476 484 ; C 123 ; WX 280 ; N braceleft ; B 21 -136 260 717 ; C 124 ; WX 600 ; N bar ; B 264 -250 342 750 ; C 125 ; WX 280 ; N braceright ; B 21 -136 260 717 ; C 126 ; WX 600 ; N asciitilde ; B 52 173 556 352 ; C 161 ; WX 300 ; N exclamdown ; B 75 -214 219 494 ; C 162 ; WX 620 ; N cent ; B 116 20 511 651 ; C 163 ; WX 620 ; N sterling ; B 8 -17 631 698 ; C 164 ; WX 140 ; N fraction ; B -188 0 335 681 ; C 165 ; WX 620 ; N yen ; B -22 0 647 681 ; C 166 ; WX 620 ; N florin ; B -29 -155 633 749 ; C 167 ; WX 520 ; N section ; B 33 -178 486 698 ; C 168 ; WX 620 ; N currency ; B 58 89 563 591 ; C 169 ; WX 220 ; N quotesingle ; B 67 458 153 698 ; C 170 ; WX 400 ; N quotedblleft ; B 46 479 348 698 ; C 171 ; WX 360 ; N guillemotleft ; B 51 89 312 437 ; C 172 ; WX 240 ; N guilsinglleft ; B 51 89 189 437 ; C 173 ; WX 240 ; N guilsinglright ; B 51 89 189 437 ; C 174 ; WX 620 ; N fi ; B 20 0 608 734 ; C 175 ; WX 620 ; N fl ; B 20 0 606 734 ; C 177 ; WX 500 ; N endash ; B -15 232 515 292 ; C 178 ; WX 540 ; N dagger ; B 79 -156 455 698 ; C 179 ; WX 540 ; N daggerdbl ; B 79 -156 455 698 ; C 180 ; WX 320 ; N periodcentered ; B 92 196 220 327 ; C 182 ; WX 600 ; N paragraph ; B 14 0 577 681 ; C 183 ; WX 460 ; N bullet ; B 60 170 404 511 ; C 184 ; WX 220 ; N quotesinglbase ; B 46 -108 178 110 ; C 185 ; WX 400 ; N quotedblbase ; B 46 -108 348 110 ; C 186 ; WX 400 ; N quotedblright ; B 46 480 348 698 ; C 187 ; WX 360 ; N guillemotright ; B 51 89 312 437 ; C 188 ; WX 1000 ; N ellipsis ; B 101 -8 898 123 ; C 189 ; WX 1280 ; N perthousand ; B 22 -8 1266 698 ; C 191 ; WX 540 ; N questiondown ; B 23 -217 510 494 ; C 193 ; WX 340 ; N grave ; B 68 571 274 689 ; C 194 ; WX 340 ; N acute ; B 68 571 274 689 ; C 195 ; WX 420 ; N circumflex ; B 68 567 352 685 ; C 196 ; WX 440 ; N tilde ; B 68 572 375 661 ; C 197 ; WX 440 ; N macron ; B 68 587 364 635 ; C 198 ; WX 460 ; N breve ; B 68 568 396 687 ; C 199 ; WX 260 ; N dotaccent ; B 68 552 186 672 ; C 200 ; WX 420 ; N dieresis ; B 68 552 349 674 ; C 202 ; WX 320 ; N ring ; B 68 546 252 731 ; C 203 ; WX 320 ; N cedilla ; B 68 -200 257 0 ; C 205 ; WX 380 ; N hungarumlaut ; B 68 538 311 698 ; C 206 ; WX 320 ; N ogonek ; B 68 -145 245 0 ; C 207 ; WX 420 ; N caron ; B 68 554 352 672 ; C 208 ; WX 1000 ; N emdash ; B -15 232 1015 292 ; C 225 ; WX 1260 ; N AE ; B -36 0 1250 681 ; C 227 ; WX 420 ; N ordfeminine ; B 49 395 393 698 ; C 232 ; WX 600 ; N Lslash ; B 31 0 629 681 ; C 233 ; WX 800 ; N Oslash ; B 44 -53 758 733 ; C 234 ; WX 1240 ; N OE ; B 44 -17 1214 698 ; C 235 ; WX 420 ; N ordmasculine ; B 56 394 361 698 ; C 241 ; WX 860 ; N ae ; B 35 -8 832 494 ; C 245 ; WX 300 ; N dotlessi ; B 20 0 288 484 ; C 248 ; WX 320 ; N lslash ; B 20 0 291 717 ; C 249 ; WX 560 ; N oslash ; B 37 -40 526 534 ; C 250 ; WX 900 ; N oe ; B 37 -8 876 494 ; C 251 ; WX 660 ; N germandbls ; B -109 -110 614 698 ; C -1 ; WX 520 ; N ecircumflex ; B 37 -8 491 685 ; C -1 ; WX 520 ; N edieresis ; B 37 -8 491 674 ; C -1 ; WX 580 ; N aacute ; B 35 -8 587 689 ; C -1 ; WX 740 ; N registered ; B 23 -17 723 698 ; C -1 ; WX 300 ; N icircumflex ; B 8 0 292 685 ; C -1 ; WX 680 ; N udieresis ; B 20 -8 653 674 ; C -1 ; WX 560 ; N ograve ; B 37 -8 526 689 ; C -1 ; WX 680 ; N uacute ; B 20 -8 653 689 ; C -1 ; WX 680 ; N ucircumflex ; B 20 -8 653 685 ; C -1 ; WX 680 ; N Aacute ; B -37 0 714 866 ; C -1 ; WX 300 ; N igrave ; B 20 0 288 689 ; C -1 ; WX 340 ; N Icircumflex ; B 28 0 312 862 ; C -1 ; WX 520 ; N ccedilla ; B 37 -200 498 494 ; C -1 ; WX 580 ; N adieresis ; B 35 -8 587 674 ; C -1 ; WX 720 ; N Ecircumflex ; B 31 0 705 862 ; C -1 ; WX 520 ; N scaron ; B 40 -8 487 672 ; C -1 ; WX 620 ; N thorn ; B 20 -228 583 717 ; C -1 ; WX 980 ; N trademark ; B 34 277 930 681 ; C -1 ; WX 520 ; N egrave ; B 37 -8 491 689 ; C -1 ; WX 372 ; N threesuperior ; B 12 269 360 698 ; C -1 ; WX 480 ; N zcaron ; B 7 0 476 672 ; C -1 ; WX 580 ; N atilde ; B 35 -8 587 661 ; C -1 ; WX 580 ; N aring ; B 35 -8 587 731 ; C -1 ; WX 560 ; N ocircumflex ; B 37 -8 526 685 ; C -1 ; WX 720 ; N Edieresis ; B 31 0 705 851 ; C -1 ; WX 930 ; N threequarters ; B 52 0 889 691 ; C -1 ; WX 540 ; N ydieresis ; B -23 -236 549 674 ; C -1 ; WX 540 ; N yacute ; B -23 -236 549 689 ; C -1 ; WX 300 ; N iacute ; B 20 0 288 689 ; C -1 ; WX 680 ; N Acircumflex ; B -37 0 714 862 ; C -1 ; WX 780 ; N Uacute ; B 25 -17 754 866 ; C -1 ; WX 520 ; N eacute ; B 37 -8 491 689 ; C -1 ; WX 800 ; N Ograve ; B 44 -17 758 866 ; C -1 ; WX 580 ; N agrave ; B 35 -8 587 689 ; C -1 ; WX 780 ; N Udieresis ; B 25 -17 754 851 ; C -1 ; WX 580 ; N acircumflex ; B 35 -8 587 685 ; C -1 ; WX 340 ; N Igrave ; B 31 0 301 866 ; C -1 ; WX 372 ; N twosuperior ; B 20 279 367 698 ; C -1 ; WX 780 ; N Ugrave ; B 25 -17 754 866 ; C -1 ; WX 930 ; N onequarter ; B 80 0 869 681 ; C -1 ; WX 780 ; N Ucircumflex ; B 25 -17 754 862 ; C -1 ; WX 660 ; N Scaron ; B 28 -17 634 849 ; C -1 ; WX 340 ; N Idieresis ; B 28 0 309 851 ; C -1 ; WX 300 ; N idieresis ; B 8 0 289 674 ; C -1 ; WX 720 ; N Egrave ; B 31 0 705 866 ; C -1 ; WX 800 ; N Oacute ; B 44 -17 758 866 ; C -1 ; WX 600 ; N divide ; B 51 10 555 514 ; C -1 ; WX 680 ; N Atilde ; B -37 0 714 838 ; C -1 ; WX 680 ; N Aring ; B -37 0 714 908 ; C -1 ; WX 800 ; N Odieresis ; B 44 -17 758 851 ; C -1 ; WX 680 ; N Adieresis ; B -37 0 714 851 ; C -1 ; WX 740 ; N Ntilde ; B 26 0 722 838 ; C -1 ; WX 640 ; N Zcaron ; B 10 0 656 849 ; C -1 ; WX 620 ; N Thorn ; B 31 0 613 681 ; C -1 ; WX 340 ; N Iacute ; B 31 0 301 866 ; C -1 ; WX 600 ; N plusminus ; B 51 0 555 513 ; C -1 ; WX 600 ; N multiply ; B 51 9 555 513 ; C -1 ; WX 720 ; N Eacute ; B 31 0 705 866 ; C -1 ; WX 640 ; N Ydieresis ; B -30 0 666 851 ; C -1 ; WX 372 ; N onesuperior ; B 80 279 302 688 ; C -1 ; WX 680 ; N ugrave ; B 20 -8 653 689 ; C -1 ; WX 600 ; N logicalnot ; B 51 128 555 398 ; C -1 ; WX 660 ; N ntilde ; B 20 0 649 661 ; C -1 ; WX 800 ; N Otilde ; B 44 -17 758 838 ; C -1 ; WX 560 ; N otilde ; B 37 -8 526 661 ; C -1 ; WX 740 ; N Ccedilla ; B 44 -200 702 698 ; C -1 ; WX 680 ; N Agrave ; B -37 0 714 866 ; C -1 ; WX 930 ; N onehalf ; B 80 0 885 681 ; C -1 ; WX 800 ; N Eth ; B 31 0 752 681 ; C -1 ; WX 400 ; N degree ; B 50 398 350 698 ; C -1 ; WX 640 ; N Yacute ; B -30 0 666 866 ; C -1 ; WX 800 ; N Ocircumflex ; B 44 -17 758 862 ; C -1 ; WX 560 ; N oacute ; B 37 -8 526 689 ; C -1 ; WX 680 ; N mu ; B 20 -251 653 484 ; C -1 ; WX 600 ; N minus ; B 51 224 555 300 ; C -1 ; WX 560 ; N eth ; B 37 -8 526 734 ; C -1 ; WX 560 ; N odieresis ; B 37 -8 526 674 ; C -1 ; WX 740 ; N copyright ; B 24 -17 724 698 ; C -1 ; WX 600 ; N brokenbar ; B 264 -175 342 675 ; EndCharMetrics StartKernData StartKernPairs 82 KPX A y 32 KPX A w 4 KPX A v 7 KPX A Y -35 KPX A W -40 KPX A V -56 KPX A T 1 KPX F period -46 KPX F comma -41 KPX F A -21 KPX L y 79 KPX L Y 13 KPX L W 1 KPX L V -4 KPX L T 28 KPX P period -60 KPX P comma -55 KPX P A -8 KPX R y 59 KPX R Y 26 KPX R W 13 KPX R V 8 KPX R T 71 KPX T s 16 KPX T r 38 KPX T period -33 KPX T o 15 KPX T i 42 KPX T hyphen 90 KPX T e 13 KPX T comma -28 KPX T c 14 KPX T a 17 KPX T A 1 KPX V y 15 KPX V u -38 KPX V r -41 KPX V period -40 KPX V o -71 KPX V i -20 KPX V hyphen 11 KPX V e -72 KPX V comma -34 KPX V a -69 KPX V A -66 KPX W y 15 KPX W u -38 KPX W r -41 KPX W period -40 KPX W o -68 KPX W i -20 KPX W hyphen 11 KPX W e -69 KPX W comma -34 KPX W a -66 KPX W A -64 KPX Y v 15 KPX Y u -38 KPX Y q -55 KPX Y period -40 KPX Y p -31 KPX Y o -57 KPX Y i -37 KPX Y hyphen 11 KPX Y e -58 KPX Y comma -34 KPX Y a -54 KPX Y A -53 KPX f f 29 KPX r q 9 KPX r period -64 KPX r o 8 KPX r n 31 KPX r m 31 KPX r hyphen 70 KPX r h -21 KPX r g -4 KPX r f 33 KPX r e 7 KPX r d 7 KPX r comma -58 KPX r c 7 EndKernPairs EndKernData StartComposites 56 CC Aacute 2 ; PCC A 0 0 ; PCC acute 200 177 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 130 177 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 130 177 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 140 177 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 180 177 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 120 177 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 220 177 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 150 177 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 150 177 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 160 177 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 20 177 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -40 177 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -40 177 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave -20 177 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 150 177 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 260 177 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 190 177 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 190 177 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 200 177 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 180 177 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 120 177 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 250 177 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 180 177 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 180 177 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 190 177 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 150 177 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 110 177 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 110 177 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 120 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 80 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 80 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 120 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 130 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 70 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 90 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 50 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 50 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 90 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -20 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -60 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -60 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -20 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 110 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 110 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 70 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 70 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 110 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 60 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 50 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 170 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 130 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 130 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 170 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 100 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 60 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 30 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pbkli8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1992 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Tue Jan 21 16:12:06 1992 Comment UniqueID 37830 Comment VMusage 33139 40031 FontName Bookman-LightItalic FullName ITC Bookman Light Italic FamilyName ITC Bookman Weight Light ItalicAngle -10 IsFixedPitch false FontBBox -228 -250 1269 883 UnderlinePosition -100 UnderlineThickness 50 Version 001.004 Notice Copyright (c) 1985, 1987, 1989, 1992 Adobe Systems Incorporated. All Rights Reserved.ITC Bookman is a registered trademark of International Typeface Corporation. EncodingScheme AdobeStandardEncoding CapHeight 681 XHeight 494 Ascender 717 Descender -212 StartCharMetrics 228 C 32 ; WX 300 ; N space ; B 0 0 0 0 ; C 33 ; WX 320 ; N exclam ; B 103 -8 342 698 ; C 34 ; WX 360 ; N quotedbl ; B 107 468 402 698 ; C 35 ; WX 620 ; N numbersign ; B 107 0 598 681 ; C 36 ; WX 620 ; N dollar ; B 78 -85 619 762 ; C 37 ; WX 800 ; N percent ; B 56 -8 811 691 ; C 38 ; WX 820 ; N ampersand ; B 65 -18 848 698 ; C 39 ; WX 280 ; N quoteright ; B 148 470 288 698 ; C 40 ; WX 280 ; N parenleft ; B 96 -146 383 727 ; C 41 ; WX 280 ; N parenright ; B -8 -146 279 727 ; C 42 ; WX 440 ; N asterisk ; B 139 324 505 698 ; C 43 ; WX 600 ; N plus ; B 91 43 595 548 ; C 44 ; WX 300 ; N comma ; B 88 -115 227 112 ; C 45 ; WX 320 ; N hyphen ; B 78 269 336 325 ; C 46 ; WX 300 ; N period ; B 96 -8 231 127 ; C 47 ; WX 600 ; N slash ; B 104 -149 562 717 ; C 48 ; WX 620 ; N zero ; B 86 -17 646 698 ; C 49 ; WX 620 ; N one ; B 154 0 500 681 ; C 50 ; WX 620 ; N two ; B 66 0 636 698 ; C 51 ; WX 620 ; N three ; B 55 -17 622 698 ; C 52 ; WX 620 ; N four ; B 69 0 634 681 ; C 53 ; WX 620 ; N five ; B 70 -17 614 681 ; C 54 ; WX 620 ; N six ; B 89 -17 657 698 ; C 55 ; WX 620 ; N seven ; B 143 0 672 681 ; C 56 ; WX 620 ; N eight ; B 61 -17 655 698 ; C 57 ; WX 620 ; N nine ; B 77 -17 649 698 ; C 58 ; WX 300 ; N colon ; B 96 -8 292 494 ; C 59 ; WX 300 ; N semicolon ; B 88 -114 292 494 ; C 60 ; WX 600 ; N less ; B 79 33 588 561 ; C 61 ; WX 600 ; N equal ; B 91 161 595 433 ; C 62 ; WX 600 ; N greater ; B 93 33 602 561 ; C 63 ; WX 540 ; N question ; B 114 -8 604 698 ; C 64 ; WX 780 ; N at ; B 102 -17 802 698 ; C 65 ; WX 700 ; N A ; B -25 0 720 681 ; C 66 ; WX 720 ; N B ; B 21 0 746 681 ; C 67 ; WX 720 ; N C ; B 88 -17 746 698 ; C 68 ; WX 740 ; N D ; B 21 0 782 681 ; C 69 ; WX 680 ; N E ; B 21 0 736 681 ; C 70 ; WX 620 ; N F ; B 21 0 743 681 ; C 71 ; WX 760 ; N G ; B 88 -17 813 698 ; C 72 ; WX 800 ; N H ; B 21 0 888 681 ; C 73 ; WX 320 ; N I ; B 21 0 412 681 ; C 74 ; WX 560 ; N J ; B -2 -17 666 681 ; C 75 ; WX 720 ; N K ; B 21 0 804 681 ; C 76 ; WX 580 ; N L ; B 21 0 656 681 ; C 77 ; WX 860 ; N M ; B 18 0 956 681 ; C 78 ; WX 720 ; N N ; B 18 0 823 681 ; C 79 ; WX 760 ; N O ; B 88 -17 799 698 ; C 80 ; WX 600 ; N P ; B 21 0 681 681 ; C 81 ; WX 780 ; N Q ; B 61 -191 812 698 ; C 82 ; WX 700 ; N R ; B 21 0 736 681 ; C 83 ; WX 640 ; N S ; B 61 -17 668 698 ; C 84 ; WX 600 ; N T ; B 50 0 725 681 ; C 85 ; WX 720 ; N U ; B 118 -17 842 681 ; C 86 ; WX 680 ; N V ; B 87 0 815 681 ; C 87 ; WX 960 ; N W ; B 87 0 1095 681 ; C 88 ; WX 700 ; N X ; B -25 0 815 681 ; C 89 ; WX 660 ; N Y ; B 87 0 809 681 ; C 90 ; WX 580 ; N Z ; B 8 0 695 681 ; C 91 ; WX 260 ; N bracketleft ; B 56 -136 351 717 ; C 92 ; WX 600 ; N backslash ; B 84 0 542 717 ; C 93 ; WX 260 ; N bracketright ; B 15 -136 309 717 ; C 94 ; WX 600 ; N asciicircum ; B 97 276 599 681 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 280 ; N quoteleft ; B 191 470 330 698 ; C 97 ; WX 620 ; N a ; B 71 -8 686 494 ; C 98 ; WX 600 ; N b ; B 88 -8 621 717 ; C 99 ; WX 480 ; N c ; B 65 -8 522 494 ; C 100 ; WX 640 ; N d ; B 65 -8 695 717 ; C 101 ; WX 540 ; N e ; B 65 -8 575 494 ; C 102 ; WX 340 ; N f ; B -160 -218 557 725 ; L i fi ; L l fl ; C 103 ; WX 560 ; N g ; B 4 -221 581 494 ; C 104 ; WX 620 ; N h ; B 88 -8 689 717 ; C 105 ; WX 280 ; N i ; B 88 -8 351 663 ; C 106 ; WX 280 ; N j ; B -200 -221 308 663 ; C 107 ; WX 600 ; N k ; B 88 -8 657 717 ; C 108 ; WX 280 ; N l ; B 100 -8 342 717 ; C 109 ; WX 880 ; N m ; B 88 -8 952 494 ; C 110 ; WX 620 ; N n ; B 88 -8 673 494 ; C 111 ; WX 540 ; N o ; B 65 -8 572 494 ; C 112 ; WX 600 ; N p ; B -24 -212 620 494 ; C 113 ; WX 560 ; N q ; B 65 -212 584 494 ; C 114 ; WX 400 ; N r ; B 88 0 481 494 ; C 115 ; WX 540 ; N s ; B 65 -8 547 494 ; C 116 ; WX 340 ; N t ; B 88 -8 411 664 ; C 117 ; WX 620 ; N u ; B 88 -8 686 484 ; C 118 ; WX 540 ; N v ; B 88 -8 562 494 ; C 119 ; WX 880 ; N w ; B 88 -8 893 494 ; C 120 ; WX 540 ; N x ; B 9 -8 626 494 ; C 121 ; WX 600 ; N y ; B 60 -221 609 484 ; C 122 ; WX 520 ; N z ; B 38 -8 561 494 ; C 123 ; WX 360 ; N braceleft ; B 122 -191 442 717 ; C 124 ; WX 600 ; N bar ; B 294 -250 372 750 ; C 125 ; WX 380 ; N braceright ; B 13 -191 333 717 ; C 126 ; WX 600 ; N asciitilde ; B 91 207 595 386 ; C 161 ; WX 320 ; N exclamdown ; B 73 -213 301 494 ; C 162 ; WX 620 ; N cent ; B 148 -29 596 715 ; C 163 ; WX 620 ; N sterling ; B 4 -17 702 698 ; C 164 ; WX 20 ; N fraction ; B -228 0 323 681 ; C 165 ; WX 620 ; N yen ; B 71 0 735 681 ; C 166 ; WX 620 ; N florin ; B -26 -218 692 725 ; C 167 ; WX 620 ; N section ; B 38 -178 638 698 ; C 168 ; WX 620 ; N currency ; B 100 89 605 591 ; C 169 ; WX 200 ; N quotesingle ; B 99 473 247 698 ; C 170 ; WX 440 ; N quotedblleft ; B 191 470 493 698 ; C 171 ; WX 300 ; N guillemotleft ; B 70 129 313 434 ; C 172 ; WX 180 ; N guilsinglleft ; B 75 129 208 434 ; C 173 ; WX 180 ; N guilsinglright ; B 70 129 203 434 ; C 174 ; WX 640 ; N fi ; B -159 -222 709 725 ; C 175 ; WX 660 ; N fl ; B -159 -218 713 725 ; C 177 ; WX 500 ; N endash ; B 33 269 561 325 ; C 178 ; WX 620 ; N dagger ; B 192 -130 570 698 ; C 179 ; WX 620 ; N daggerdbl ; B 144 -122 566 698 ; C 180 ; WX 300 ; N periodcentered ; B 137 229 272 364 ; C 182 ; WX 620 ; N paragraph ; B 112 0 718 681 ; C 183 ; WX 460 ; N bullet ; B 100 170 444 511 ; C 184 ; WX 320 ; N quotesinglbase ; B 87 -114 226 113 ; C 185 ; WX 480 ; N quotedblbase ; B 87 -114 390 113 ; C 186 ; WX 440 ; N quotedblright ; B 148 470 451 698 ; C 187 ; WX 300 ; N guillemotright ; B 60 129 303 434 ; C 188 ; WX 1000 ; N ellipsis ; B 99 -8 900 127 ; C 189 ; WX 1180 ; N perthousand ; B 56 -8 1199 691 ; C 191 ; WX 540 ; N questiondown ; B 18 -212 508 494 ; C 193 ; WX 340 ; N grave ; B 182 551 377 706 ; C 194 ; WX 320 ; N acute ; B 178 551 373 706 ; C 195 ; WX 440 ; N circumflex ; B 176 571 479 685 ; C 196 ; WX 440 ; N tilde ; B 180 586 488 671 ; C 197 ; WX 440 ; N macron ; B 178 599 484 658 ; C 198 ; WX 440 ; N breve ; B 191 577 500 680 ; C 199 ; WX 260 ; N dotaccent ; B 169 543 290 664 ; C 200 ; WX 420 ; N dieresis ; B 185 569 467 688 ; C 202 ; WX 300 ; N ring ; B 178 551 334 706 ; C 203 ; WX 320 ; N cedilla ; B 45 -178 240 0 ; C 205 ; WX 340 ; N hungarumlaut ; B 167 547 402 738 ; C 206 ; WX 260 ; N ogonek ; B 51 -173 184 0 ; C 207 ; WX 440 ; N caron ; B 178 571 481 684 ; C 208 ; WX 1000 ; N emdash ; B 33 269 1061 325 ; C 225 ; WX 1220 ; N AE ; B -45 0 1269 681 ; C 227 ; WX 440 ; N ordfeminine ; B 130 396 513 698 ; C 232 ; WX 580 ; N Lslash ; B 21 0 656 681 ; C 233 ; WX 760 ; N Oslash ; B 88 -95 799 777 ; C 234 ; WX 1180 ; N OE ; B 88 -17 1237 698 ; C 235 ; WX 400 ; N ordmasculine ; B 139 396 455 698 ; C 241 ; WX 880 ; N ae ; B 71 -8 918 494 ; C 245 ; WX 280 ; N dotlessi ; B 88 -8 351 484 ; C 248 ; WX 340 ; N lslash ; B 50 -8 398 717 ; C 249 ; WX 540 ; N oslash ; B 65 -49 571 532 ; C 250 ; WX 900 ; N oe ; B 65 -8 948 494 ; C 251 ; WX 620 ; N germandbls ; B -121 -111 653 698 ; C -1 ; WX 540 ; N ecircumflex ; B 65 -8 575 685 ; C -1 ; WX 540 ; N edieresis ; B 65 -8 575 688 ; C -1 ; WX 620 ; N aacute ; B 71 -8 686 706 ; C -1 ; WX 740 ; N registered ; B 84 -17 784 698 ; C -1 ; WX 280 ; N icircumflex ; B 76 -8 379 685 ; C -1 ; WX 620 ; N udieresis ; B 88 -8 686 688 ; C -1 ; WX 540 ; N ograve ; B 65 -8 572 706 ; C -1 ; WX 620 ; N uacute ; B 88 -8 686 706 ; C -1 ; WX 620 ; N ucircumflex ; B 88 -8 686 685 ; C -1 ; WX 700 ; N Aacute ; B -25 0 720 883 ; C -1 ; WX 280 ; N igrave ; B 88 -8 351 706 ; C -1 ; WX 320 ; N Icircumflex ; B 21 0 449 862 ; C -1 ; WX 480 ; N ccedilla ; B 65 -178 522 494 ; C -1 ; WX 620 ; N adieresis ; B 71 -8 686 688 ; C -1 ; WX 680 ; N Ecircumflex ; B 21 0 736 862 ; C -1 ; WX 540 ; N scaron ; B 65 -8 547 684 ; C -1 ; WX 600 ; N thorn ; B -24 -212 620 717 ; C -1 ; WX 980 ; N trademark ; B 69 277 965 681 ; C -1 ; WX 540 ; N egrave ; B 65 -8 575 706 ; C -1 ; WX 372 ; N threesuperior ; B 70 269 439 698 ; C -1 ; WX 520 ; N zcaron ; B 38 -8 561 684 ; C -1 ; WX 620 ; N atilde ; B 71 -8 686 671 ; C -1 ; WX 620 ; N aring ; B 71 -8 686 706 ; C -1 ; WX 540 ; N ocircumflex ; B 65 -8 572 685 ; C -1 ; WX 680 ; N Edieresis ; B 21 0 736 865 ; C -1 ; WX 930 ; N threequarters ; B 99 0 913 691 ; C -1 ; WX 600 ; N ydieresis ; B 60 -221 609 688 ; C -1 ; WX 600 ; N yacute ; B 60 -221 609 706 ; C -1 ; WX 280 ; N iacute ; B 88 -8 351 706 ; C -1 ; WX 700 ; N Acircumflex ; B -25 0 720 862 ; C -1 ; WX 720 ; N Uacute ; B 118 -17 842 883 ; C -1 ; WX 540 ; N eacute ; B 65 -8 575 706 ; C -1 ; WX 760 ; N Ograve ; B 88 -17 799 883 ; C -1 ; WX 620 ; N agrave ; B 71 -8 686 706 ; C -1 ; WX 720 ; N Udieresis ; B 118 -17 842 865 ; C -1 ; WX 620 ; N acircumflex ; B 71 -8 686 685 ; C -1 ; WX 320 ; N Igrave ; B 21 0 412 883 ; C -1 ; WX 372 ; N twosuperior ; B 68 279 439 698 ; C -1 ; WX 720 ; N Ugrave ; B 118 -17 842 883 ; C -1 ; WX 930 ; N onequarter ; B 91 0 913 681 ; C -1 ; WX 720 ; N Ucircumflex ; B 118 -17 842 862 ; C -1 ; WX 640 ; N Scaron ; B 61 -17 668 861 ; C -1 ; WX 320 ; N Idieresis ; B 21 0 447 865 ; C -1 ; WX 280 ; N idieresis ; B 88 -8 377 688 ; C -1 ; WX 680 ; N Egrave ; B 21 0 736 883 ; C -1 ; WX 760 ; N Oacute ; B 88 -17 799 883 ; C -1 ; WX 600 ; N divide ; B 91 46 595 548 ; C -1 ; WX 700 ; N Atilde ; B -25 0 720 848 ; C -1 ; WX 700 ; N Aring ; B -25 0 720 883 ; C -1 ; WX 760 ; N Odieresis ; B 88 -17 799 865 ; C -1 ; WX 700 ; N Adieresis ; B -25 0 720 865 ; C -1 ; WX 720 ; N Ntilde ; B 18 0 823 848 ; C -1 ; WX 580 ; N Zcaron ; B 8 0 695 861 ; C -1 ; WX 600 ; N Thorn ; B 21 0 656 681 ; C -1 ; WX 320 ; N Iacute ; B 21 0 412 883 ; C -1 ; WX 600 ; N plusminus ; B 91 0 595 548 ; C -1 ; WX 600 ; N multiply ; B 91 44 595 548 ; C -1 ; WX 680 ; N Eacute ; B 21 0 736 883 ; C -1 ; WX 660 ; N Ydieresis ; B 87 0 809 865 ; C -1 ; WX 372 ; N onesuperior ; B 114 279 339 688 ; C -1 ; WX 620 ; N ugrave ; B 88 -8 686 706 ; C -1 ; WX 600 ; N logicalnot ; B 91 163 595 433 ; C -1 ; WX 620 ; N ntilde ; B 88 -8 673 671 ; C -1 ; WX 760 ; N Otilde ; B 88 -17 799 848 ; C -1 ; WX 540 ; N otilde ; B 65 -8 572 671 ; C -1 ; WX 720 ; N Ccedilla ; B 88 -178 746 698 ; C -1 ; WX 700 ; N Agrave ; B -25 0 720 883 ; C -1 ; WX 930 ; N onehalf ; B 91 0 925 681 ; C -1 ; WX 740 ; N Eth ; B 21 0 782 681 ; C -1 ; WX 400 ; N degree ; B 120 398 420 698 ; C -1 ; WX 660 ; N Yacute ; B 87 0 809 883 ; C -1 ; WX 760 ; N Ocircumflex ; B 88 -17 799 862 ; C -1 ; WX 540 ; N oacute ; B 65 -8 572 706 ; C -1 ; WX 620 ; N mu ; B 53 -221 686 484 ; C -1 ; WX 600 ; N minus ; B 91 259 595 335 ; C -1 ; WX 540 ; N eth ; B 65 -8 642 725 ; C -1 ; WX 540 ; N odieresis ; B 65 -8 572 688 ; C -1 ; WX 740 ; N copyright ; B 84 -17 784 698 ; C -1 ; WX 600 ; N brokenbar ; B 294 -175 372 675 ; EndCharMetrics StartKernData StartKernPairs 85 KPX A Y -62 KPX A W -73 KPX A V -78 KPX A T -5 KPX F period -97 KPX F comma -98 KPX F A -16 KPX L y 20 KPX L Y 7 KPX L W 9 KPX L V 4 KPX P period -105 KPX P comma -106 KPX P A -30 KPX R Y 11 KPX R W 2 KPX R V 2 KPX R T 65 KPX T semicolon 48 KPX T s -7 KPX T r 67 KPX T period -78 KPX T o 14 KPX T i 71 KPX T hyphen 20 KPX T e 10 KPX T comma -79 KPX T colon 48 KPX T c 16 KPX T a 9 KPX T A -14 KPX V y -14 KPX V u -10 KPX V semicolon -44 KPX V r -20 KPX V period -100 KPX V o -70 KPX V i 3 KPX V hyphen 20 KPX V e -70 KPX V comma -109 KPX V colon -35 KPX V a -70 KPX V A -70 KPX W y -14 KPX W u -20 KPX W semicolon -42 KPX W r -30 KPX W period -100 KPX W o -60 KPX W i 3 KPX W hyphen 20 KPX W e -60 KPX W comma -109 KPX W colon -35 KPX W a -60 KPX W A -60 KPX Y v -19 KPX Y u -31 KPX Y semicolon -40 KPX Y q -72 KPX Y period -100 KPX Y p -37 KPX Y o -75 KPX Y i -11 KPX Y hyphen 20 KPX Y e -78 KPX Y comma -109 KPX Y colon -35 KPX Y a -79 KPX Y A -82 KPX f f -19 KPX r q -14 KPX r period -134 KPX r o -10 KPX r n 38 KPX r m 37 KPX r hyphen 20 KPX r h -20 KPX r g -3 KPX r f -9 KPX r e -15 KPX r d -9 KPX r comma -143 KPX r c -8 EndKernPairs EndKernData StartComposites 56 CC Aacute 2 ; PCC A 0 0 ; PCC acute 200 177 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 130 177 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 140 177 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 160 177 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 220 177 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 130 177 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 210 177 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 140 177 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 150 177 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 150 177 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 30 177 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -30 177 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -20 177 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave -30 177 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 130 177 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 250 177 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 190 177 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 200 177 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 210 177 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 190 177 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 100 177 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 230 177 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 170 177 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 180 177 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 170 177 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 200 177 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 140 177 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 70 177 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 120 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 70 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 80 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 110 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 140 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 60 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 90 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 30 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 40 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 80 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -40 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -100 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -90 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -60 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 60 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 80 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 20 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 40 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 80 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 30 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 30 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 120 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 60 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 70 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 110 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 140 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 70 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 20 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pcrb8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1989, 1990, 1991, Adobe Systems Incorporated. All rights reserved. Comment Creation Date: Tue Sep 17 14:02:41 1991 Comment UniqueID 36384 Comment VMusage 31992 40360 FontName Courier-Bold FullName Courier Bold FamilyName Courier Weight Bold ItalicAngle 0 IsFixedPitch true FontBBox -113 -250 749 801 UnderlinePosition -100 UnderlineThickness 50 Version 002.004 Notice Copyright (c) 1989, 1990, 1991, Adobe Systems Incorporated. All rights reserved. EncodingScheme AdobeStandardEncoding CapHeight 562 XHeight 439 Ascender 626 Descender -142 StartCharMetrics 260 C 32 ; WX 600 ; N space ; B 0 0 0 0 ; C 33 ; WX 600 ; N exclam ; B 202 -15 398 572 ; C 34 ; WX 600 ; N quotedbl ; B 135 277 465 562 ; C 35 ; WX 600 ; N numbersign ; B 56 -45 544 651 ; C 36 ; WX 600 ; N dollar ; B 82 -126 519 666 ; C 37 ; WX 600 ; N percent ; B 5 -15 595 616 ; C 38 ; WX 600 ; N ampersand ; B 36 -15 546 543 ; C 39 ; WX 600 ; N quoteright ; B 171 277 423 562 ; C 40 ; WX 600 ; N parenleft ; B 219 -102 461 616 ; C 41 ; WX 600 ; N parenright ; B 139 -102 381 616 ; C 42 ; WX 600 ; N asterisk ; B 91 219 509 601 ; C 43 ; WX 600 ; N plus ; B 71 39 529 478 ; C 44 ; WX 600 ; N comma ; B 123 -111 393 174 ; C 45 ; WX 600 ; N hyphen ; B 100 203 500 313 ; C 46 ; WX 600 ; N period ; B 192 -15 408 171 ; C 47 ; WX 600 ; N slash ; B 98 -77 502 626 ; C 48 ; WX 600 ; N zero ; B 87 -15 513 616 ; C 49 ; WX 600 ; N one ; B 81 0 539 616 ; C 50 ; WX 600 ; N two ; B 61 0 499 616 ; C 51 ; WX 600 ; N three ; B 63 -15 501 616 ; C 52 ; WX 600 ; N four ; B 53 0 507 616 ; C 53 ; WX 600 ; N five ; B 70 -15 521 601 ; C 54 ; WX 600 ; N six ; B 90 -15 521 616 ; C 55 ; WX 600 ; N seven ; B 55 0 494 601 ; C 56 ; WX 600 ; N eight ; B 83 -15 517 616 ; C 57 ; WX 600 ; N nine ; B 79 -15 510 616 ; C 58 ; WX 600 ; N colon ; B 191 -15 407 425 ; C 59 ; WX 600 ; N semicolon ; B 123 -111 408 425 ; C 60 ; WX 600 ; N less ; B 66 15 523 501 ; C 61 ; WX 600 ; N equal ; B 71 118 529 398 ; C 62 ; WX 600 ; N greater ; B 77 15 534 501 ; C 63 ; WX 600 ; N question ; B 98 -14 501 580 ; C 64 ; WX 600 ; N at ; B 16 -15 584 616 ; C 65 ; WX 600 ; N A ; B -9 0 609 562 ; C 66 ; WX 600 ; N B ; B 30 0 573 562 ; C 67 ; WX 600 ; N C ; B 22 -18 560 580 ; C 68 ; WX 600 ; N D ; B 30 0 594 562 ; C 69 ; WX 600 ; N E ; B 25 0 560 562 ; C 70 ; WX 600 ; N F ; B 39 0 570 562 ; C 71 ; WX 600 ; N G ; B 22 -18 594 580 ; C 72 ; WX 600 ; N H ; B 20 0 580 562 ; C 73 ; WX 600 ; N I ; B 77 0 523 562 ; C 74 ; WX 600 ; N J ; B 37 -18 601 562 ; C 75 ; WX 600 ; N K ; B 21 0 599 562 ; C 76 ; WX 600 ; N L ; B 39 0 578 562 ; C 77 ; WX 600 ; N M ; B -2 0 602 562 ; C 78 ; WX 600 ; N N ; B 8 -12 610 562 ; C 79 ; WX 600 ; N O ; B 22 -18 578 580 ; C 80 ; WX 600 ; N P ; B 48 0 559 562 ; C 81 ; WX 600 ; N Q ; B 32 -138 578 580 ; C 82 ; WX 600 ; N R ; B 24 0 599 562 ; C 83 ; WX 600 ; N S ; B 47 -22 553 582 ; C 84 ; WX 600 ; N T ; B 21 0 579 562 ; C 85 ; WX 600 ; N U ; B 4 -18 596 562 ; C 86 ; WX 600 ; N V ; B -13 0 613 562 ; C 87 ; WX 600 ; N W ; B -18 0 618 562 ; C 88 ; WX 600 ; N X ; B 12 0 588 562 ; C 89 ; WX 600 ; N Y ; B 12 0 589 562 ; C 90 ; WX 600 ; N Z ; B 62 0 539 562 ; C 91 ; WX 600 ; N bracketleft ; B 245 -102 475 616 ; C 92 ; WX 600 ; N backslash ; B 99 -77 503 626 ; C 93 ; WX 600 ; N bracketright ; B 125 -102 355 616 ; C 94 ; WX 600 ; N asciicircum ; B 108 250 492 616 ; C 95 ; WX 600 ; N underscore ; B 0 -125 600 -75 ; C 96 ; WX 600 ; N quoteleft ; B 178 277 428 562 ; C 97 ; WX 600 ; N a ; B 35 -15 570 454 ; C 98 ; WX 600 ; N b ; B 0 -15 584 626 ; C 99 ; WX 600 ; N c ; B 40 -15 545 459 ; C 100 ; WX 600 ; N d ; B 20 -15 591 626 ; C 101 ; WX 600 ; N e ; B 40 -15 563 454 ; C 102 ; WX 600 ; N f ; B 83 0 547 626 ; L i fi ; L l fl ; C 103 ; WX 600 ; N g ; B 30 -146 580 454 ; C 104 ; WX 600 ; N h ; B 5 0 592 626 ; C 105 ; WX 600 ; N i ; B 77 0 523 658 ; C 106 ; WX 600 ; N j ; B 63 -146 440 658 ; C 107 ; WX 600 ; N k ; B 20 0 585 626 ; C 108 ; WX 600 ; N l ; B 77 0 523 626 ; C 109 ; WX 600 ; N m ; B -22 0 626 454 ; C 110 ; WX 600 ; N n ; B 18 0 592 454 ; C 111 ; WX 600 ; N o ; B 30 -15 570 454 ; C 112 ; WX 600 ; N p ; B -1 -142 570 454 ; C 113 ; WX 600 ; N q ; B 20 -142 591 454 ; C 114 ; WX 600 ; N r ; B 47 0 580 454 ; C 115 ; WX 600 ; N s ; B 68 -17 535 459 ; C 116 ; WX 600 ; N t ; B 47 -15 532 562 ; C 117 ; WX 600 ; N u ; B -1 -15 569 439 ; C 118 ; WX 600 ; N v ; B -1 0 601 439 ; C 119 ; WX 600 ; N w ; B -18 0 618 439 ; C 120 ; WX 600 ; N x ; B 6 0 594 439 ; C 121 ; WX 600 ; N y ; B -4 -142 601 439 ; C 122 ; WX 600 ; N z ; B 81 0 520 439 ; C 123 ; WX 600 ; N braceleft ; B 160 -102 464 616 ; C 124 ; WX 600 ; N bar ; B 255 -250 345 750 ; C 125 ; WX 600 ; N braceright ; B 136 -102 440 616 ; C 126 ; WX 600 ; N asciitilde ; B 71 153 530 356 ; C 161 ; WX 600 ; N exclamdown ; B 202 -146 398 449 ; C 162 ; WX 600 ; N cent ; B 66 -49 518 614 ; C 163 ; WX 600 ; N sterling ; B 72 -28 558 611 ; C 164 ; WX 600 ; N fraction ; B 25 -60 576 661 ; C 165 ; WX 600 ; N yen ; B 10 0 590 562 ; C 166 ; WX 600 ; N florin ; B -30 -131 572 616 ; C 167 ; WX 600 ; N section ; B 83 -70 517 580 ; C 168 ; WX 600 ; N currency ; B 54 49 546 517 ; C 169 ; WX 600 ; N quotesingle ; B 227 277 373 562 ; C 170 ; WX 600 ; N quotedblleft ; B 71 277 535 562 ; C 171 ; WX 600 ; N guillemotleft ; B 8 70 553 446 ; C 172 ; WX 600 ; N guilsinglleft ; B 141 70 459 446 ; C 173 ; WX 600 ; N guilsinglright ; B 141 70 459 446 ; C 174 ; WX 600 ; N fi ; B 12 0 593 626 ; C 175 ; WX 600 ; N fl ; B 12 0 593 626 ; C 177 ; WX 600 ; N endash ; B 65 203 535 313 ; C 178 ; WX 600 ; N dagger ; B 106 -70 494 580 ; C 179 ; WX 600 ; N daggerdbl ; B 106 -70 494 580 ; C 180 ; WX 600 ; N periodcentered ; B 196 165 404 351 ; C 182 ; WX 600 ; N paragraph ; B 6 -70 576 580 ; C 183 ; WX 600 ; N bullet ; B 140 132 460 430 ; C 184 ; WX 600 ; N quotesinglbase ; B 175 -142 427 143 ; C 185 ; WX 600 ; N quotedblbase ; B 65 -142 529 143 ; C 186 ; WX 600 ; N quotedblright ; B 61 277 525 562 ; C 187 ; WX 600 ; N guillemotright ; B 47 70 592 446 ; C 188 ; WX 600 ; N ellipsis ; B 26 -15 574 116 ; C 189 ; WX 600 ; N perthousand ; B -113 -15 713 616 ; C 191 ; WX 600 ; N questiondown ; B 99 -146 502 449 ; C 193 ; WX 600 ; N grave ; B 132 508 395 661 ; C 194 ; WX 600 ; N acute ; B 205 508 468 661 ; C 195 ; WX 600 ; N circumflex ; B 103 483 497 657 ; C 196 ; WX 600 ; N tilde ; B 89 493 512 636 ; C 197 ; WX 600 ; N macron ; B 88 505 512 585 ; C 198 ; WX 600 ; N breve ; B 83 468 517 631 ; C 199 ; WX 600 ; N dotaccent ; B 230 485 370 625 ; C 200 ; WX 600 ; N dieresis ; B 128 485 472 625 ; C 202 ; WX 600 ; N ring ; B 198 481 402 678 ; C 203 ; WX 600 ; N cedilla ; B 205 -206 387 0 ; C 205 ; WX 600 ; N hungarumlaut ; B 68 488 588 661 ; C 206 ; WX 600 ; N ogonek ; B 169 -199 367 0 ; C 207 ; WX 600 ; N caron ; B 103 493 497 667 ; C 208 ; WX 600 ; N emdash ; B -10 203 610 313 ; C 225 ; WX 600 ; N AE ; B -29 0 602 562 ; C 227 ; WX 600 ; N ordfeminine ; B 147 196 453 580 ; C 232 ; WX 600 ; N Lslash ; B 39 0 578 562 ; C 233 ; WX 600 ; N Oslash ; B 22 -22 578 584 ; C 234 ; WX 600 ; N OE ; B -25 0 595 562 ; C 235 ; WX 600 ; N ordmasculine ; B 147 196 453 580 ; C 241 ; WX 600 ; N ae ; B -4 -15 601 454 ; C 245 ; WX 600 ; N dotlessi ; B 77 0 523 439 ; C 248 ; WX 600 ; N lslash ; B 77 0 523 626 ; C 249 ; WX 600 ; N oslash ; B 30 -24 570 463 ; C 250 ; WX 600 ; N oe ; B -18 -15 611 454 ; C 251 ; WX 600 ; N germandbls ; B 22 -15 596 626 ; C -1 ; WX 600 ; N Odieresis ; B 22 -18 578 748 ; C -1 ; WX 600 ; N logicalnot ; B 71 103 529 413 ; C -1 ; WX 600 ; N minus ; B 71 203 529 313 ; C -1 ; WX 600 ; N merge ; B 137 -15 464 487 ; C -1 ; WX 600 ; N degree ; B 86 243 474 616 ; C -1 ; WX 600 ; N dectab ; B 8 0 592 320 ; C -1 ; WX 600 ; N ll ; B -12 0 600 626 ; C -1 ; WX 600 ; N IJ ; B -8 -18 622 562 ; C -1 ; WX 600 ; N Eacute ; B 25 0 560 784 ; C -1 ; WX 600 ; N Ocircumflex ; B 22 -18 578 780 ; C -1 ; WX 600 ; N ucircumflex ; B -1 -15 569 657 ; C -1 ; WX 600 ; N left ; B 65 44 535 371 ; C -1 ; WX 600 ; N threesuperior ; B 138 222 433 616 ; C -1 ; WX 600 ; N up ; B 136 0 463 447 ; C -1 ; WX 600 ; N multiply ; B 81 39 520 478 ; C -1 ; WX 600 ; N Scaron ; B 47 -22 553 790 ; C -1 ; WX 600 ; N tab ; B 19 0 581 562 ; C -1 ; WX 600 ; N Ucircumflex ; B 4 -18 596 780 ; C -1 ; WX 600 ; N divide ; B 71 16 529 500 ; C -1 ; WX 600 ; N Acircumflex ; B -9 0 609 780 ; C -1 ; WX 600 ; N eacute ; B 40 -15 563 661 ; C -1 ; WX 600 ; N uacute ; B -1 -15 569 661 ; C -1 ; WX 600 ; N Aacute ; B -9 0 609 784 ; C -1 ; WX 600 ; N copyright ; B 0 -18 600 580 ; C -1 ; WX 600 ; N twosuperior ; B 143 230 436 616 ; C -1 ; WX 600 ; N Ecircumflex ; B 25 0 560 780 ; C -1 ; WX 600 ; N ntilde ; B 18 0 592 636 ; C -1 ; WX 600 ; N down ; B 137 -15 464 439 ; C -1 ; WX 600 ; N center ; B 40 14 560 580 ; C -1 ; WX 600 ; N onesuperior ; B 153 230 447 616 ; C -1 ; WX 600 ; N ij ; B 6 -146 574 658 ; C -1 ; WX 600 ; N edieresis ; B 40 -15 563 625 ; C -1 ; WX 600 ; N graybox ; B 76 0 525 599 ; C -1 ; WX 600 ; N odieresis ; B 30 -15 570 625 ; C -1 ; WX 600 ; N Ograve ; B 22 -18 578 784 ; C -1 ; WX 600 ; N threequarters ; B -47 -60 648 661 ; C -1 ; WX 600 ; N plusminus ; B 71 24 529 515 ; C -1 ; WX 600 ; N prescription ; B 24 -15 599 562 ; C -1 ; WX 600 ; N eth ; B 58 -27 543 626 ; C -1 ; WX 600 ; N largebullet ; B 248 229 352 333 ; C -1 ; WX 600 ; N egrave ; B 40 -15 563 661 ; C -1 ; WX 600 ; N ccedilla ; B 40 -206 545 459 ; C -1 ; WX 600 ; N notegraphic ; B 77 -15 523 572 ; C -1 ; WX 600 ; N Udieresis ; B 4 -18 596 748 ; C -1 ; WX 600 ; N Gcaron ; B 22 -18 594 790 ; C -1 ; WX 600 ; N arrowdown ; B 144 -15 456 608 ; C -1 ; WX 600 ; N format ; B 5 -146 115 601 ; C -1 ; WX 600 ; N Otilde ; B 22 -18 578 759 ; C -1 ; WX 600 ; N Idieresis ; B 77 0 523 748 ; C -1 ; WX 600 ; N adieresis ; B 35 -15 570 625 ; C -1 ; WX 600 ; N ecircumflex ; B 40 -15 563 657 ; C -1 ; WX 600 ; N Eth ; B 30 0 594 562 ; C -1 ; WX 600 ; N onequarter ; B -56 -60 656 661 ; C -1 ; WX 600 ; N LL ; B -45 0 645 562 ; C -1 ; WX 600 ; N agrave ; B 35 -15 570 661 ; C -1 ; WX 600 ; N Zcaron ; B 62 0 539 790 ; C -1 ; WX 600 ; N Scedilla ; B 47 -206 553 582 ; C -1 ; WX 600 ; N Idot ; B 77 0 523 748 ; C -1 ; WX 600 ; N Iacute ; B 77 0 523 784 ; C -1 ; WX 600 ; N indent ; B 65 45 535 372 ; C -1 ; WX 600 ; N Ugrave ; B 4 -18 596 784 ; C -1 ; WX 600 ; N scaron ; B 68 -17 535 667 ; C -1 ; WX 600 ; N overscore ; B 0 579 600 629 ; C -1 ; WX 600 ; N Aring ; B -9 0 609 801 ; C -1 ; WX 600 ; N Ccedilla ; B 22 -206 560 580 ; C -1 ; WX 600 ; N Igrave ; B 77 0 523 784 ; C -1 ; WX 600 ; N brokenbar ; B 255 -175 345 675 ; C -1 ; WX 600 ; N Oacute ; B 22 -18 578 784 ; C -1 ; WX 600 ; N otilde ; B 30 -15 570 636 ; C -1 ; WX 600 ; N Yacute ; B 12 0 589 784 ; C -1 ; WX 600 ; N lira ; B 72 -28 558 611 ; C -1 ; WX 600 ; N Icircumflex ; B 77 0 523 780 ; C -1 ; WX 600 ; N Atilde ; B -9 0 609 759 ; C -1 ; WX 600 ; N Uacute ; B 4 -18 596 784 ; C -1 ; WX 600 ; N Ydieresis ; B 12 0 589 748 ; C -1 ; WX 600 ; N ydieresis ; B -4 -142 601 625 ; C -1 ; WX 600 ; N idieresis ; B 77 0 523 625 ; C -1 ; WX 600 ; N Adieresis ; B -9 0 609 748 ; C -1 ; WX 600 ; N mu ; B -1 -142 569 439 ; C -1 ; WX 600 ; N trademark ; B -9 230 749 562 ; C -1 ; WX 600 ; N oacute ; B 30 -15 570 661 ; C -1 ; WX 600 ; N acircumflex ; B 35 -15 570 657 ; C -1 ; WX 600 ; N Agrave ; B -9 0 609 784 ; C -1 ; WX 600 ; N return ; B 19 0 581 562 ; C -1 ; WX 600 ; N atilde ; B 35 -15 570 636 ; C -1 ; WX 600 ; N square ; B 19 0 581 562 ; C -1 ; WX 600 ; N registered ; B 0 -18 600 580 ; C -1 ; WX 600 ; N stop ; B 19 0 581 562 ; C -1 ; WX 600 ; N udieresis ; B -1 -15 569 625 ; C -1 ; WX 600 ; N arrowup ; B 144 3 456 626 ; C -1 ; WX 600 ; N igrave ; B 77 0 523 661 ; C -1 ; WX 600 ; N Edieresis ; B 25 0 560 748 ; C -1 ; WX 600 ; N zcaron ; B 81 0 520 667 ; C -1 ; WX 600 ; N arrowboth ; B -24 143 624 455 ; C -1 ; WX 600 ; N gcaron ; B 30 -146 580 667 ; C -1 ; WX 600 ; N arrowleft ; B -24 143 634 455 ; C -1 ; WX 600 ; N aacute ; B 35 -15 570 661 ; C -1 ; WX 600 ; N ocircumflex ; B 30 -15 570 657 ; C -1 ; WX 600 ; N scedilla ; B 68 -206 535 459 ; C -1 ; WX 600 ; N ograve ; B 30 -15 570 661 ; C -1 ; WX 600 ; N onehalf ; B -47 -60 648 661 ; C -1 ; WX 600 ; N ugrave ; B -1 -15 569 661 ; C -1 ; WX 600 ; N Ntilde ; B 8 -12 610 759 ; C -1 ; WX 600 ; N iacute ; B 77 0 523 661 ; C -1 ; WX 600 ; N arrowright ; B -34 143 624 455 ; C -1 ; WX 600 ; N Thorn ; B 48 0 557 562 ; C -1 ; WX 600 ; N Egrave ; B 25 0 560 784 ; C -1 ; WX 600 ; N thorn ; B -14 -142 570 626 ; C -1 ; WX 600 ; N aring ; B 35 -15 570 678 ; C -1 ; WX 600 ; N yacute ; B -4 -142 601 661 ; C -1 ; WX 600 ; N icircumflex ; B 63 0 523 657 ; EndCharMetrics StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 30 123 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex -30 123 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis -20 123 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave -50 123 ; CC Aring 2 ; PCC A 0 0 ; PCC ring -10 123 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde -30 123 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 30 123 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 0 123 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 0 123 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 0 123 ; CC Gcaron 2 ; PCC G 0 0 ; PCC caron 10 123 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 123 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 123 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 123 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 123 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 0 123 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 0 123 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 0 123 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 0 123 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 0 123 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 0 123 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 0 123 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 30 123 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 0 123 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 0 123 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave -30 123 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 30 123 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 0 123 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 0 123 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex -20 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis -10 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave -30 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ; CC gcaron 2 ; PCC g 0 0 ; PCC caron -40 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -40 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -40 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 0 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex -20 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis -20 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave -30 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 30 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 10 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 0 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pcrbo8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1989, 1990, 1991, Adobe Systems Incorporated. All rights reserved. Comment Creation Date: Tue Sep 17 14:13:24 1991 Comment UniqueID 36389 Comment VMusage 10055 54684 FontName Courier-BoldOblique FullName Courier Bold Oblique FamilyName Courier Weight Bold ItalicAngle -12 IsFixedPitch true FontBBox -56 -250 868 801 UnderlinePosition -100 UnderlineThickness 50 Version 002.004 Notice Copyright (c) 1989, 1990, 1991, Adobe Systems Incorporated. All rights reserved. EncodingScheme AdobeStandardEncoding CapHeight 562 XHeight 439 Ascender 626 Descender -142 StartCharMetrics 260 C 32 ; WX 600 ; N space ; B 0 0 0 0 ; C 33 ; WX 600 ; N exclam ; B 216 -15 495 572 ; C 34 ; WX 600 ; N quotedbl ; B 212 277 584 562 ; C 35 ; WX 600 ; N numbersign ; B 88 -45 640 651 ; C 36 ; WX 600 ; N dollar ; B 87 -126 629 666 ; C 37 ; WX 600 ; N percent ; B 102 -15 624 616 ; C 38 ; WX 600 ; N ampersand ; B 62 -15 594 543 ; C 39 ; WX 600 ; N quoteright ; B 230 277 542 562 ; C 40 ; WX 600 ; N parenleft ; B 266 -102 592 616 ; C 41 ; WX 600 ; N parenright ; B 117 -102 444 616 ; C 42 ; WX 600 ; N asterisk ; B 179 219 597 601 ; C 43 ; WX 600 ; N plus ; B 114 39 596 478 ; C 44 ; WX 600 ; N comma ; B 99 -111 430 174 ; C 45 ; WX 600 ; N hyphen ; B 143 203 567 313 ; C 46 ; WX 600 ; N period ; B 207 -15 426 171 ; C 47 ; WX 600 ; N slash ; B 91 -77 626 626 ; C 48 ; WX 600 ; N zero ; B 136 -15 592 616 ; C 49 ; WX 600 ; N one ; B 93 0 561 616 ; C 50 ; WX 600 ; N two ; B 61 0 593 616 ; C 51 ; WX 600 ; N three ; B 72 -15 571 616 ; C 52 ; WX 600 ; N four ; B 82 0 558 616 ; C 53 ; WX 600 ; N five ; B 77 -15 621 601 ; C 54 ; WX 600 ; N six ; B 136 -15 652 616 ; C 55 ; WX 600 ; N seven ; B 147 0 622 601 ; C 56 ; WX 600 ; N eight ; B 115 -15 604 616 ; C 57 ; WX 600 ; N nine ; B 76 -15 592 616 ; C 58 ; WX 600 ; N colon ; B 206 -15 479 425 ; C 59 ; WX 600 ; N semicolon ; B 99 -111 480 425 ; C 60 ; WX 600 ; N less ; B 121 15 612 501 ; C 61 ; WX 600 ; N equal ; B 96 118 614 398 ; C 62 ; WX 600 ; N greater ; B 97 15 589 501 ; C 63 ; WX 600 ; N question ; B 183 -14 591 580 ; C 64 ; WX 600 ; N at ; B 66 -15 641 616 ; C 65 ; WX 600 ; N A ; B -9 0 631 562 ; C 66 ; WX 600 ; N B ; B 30 0 629 562 ; C 67 ; WX 600 ; N C ; B 75 -18 674 580 ; C 68 ; WX 600 ; N D ; B 30 0 664 562 ; C 69 ; WX 600 ; N E ; B 25 0 669 562 ; C 70 ; WX 600 ; N F ; B 39 0 683 562 ; C 71 ; WX 600 ; N G ; B 75 -18 674 580 ; C 72 ; WX 600 ; N H ; B 20 0 699 562 ; C 73 ; WX 600 ; N I ; B 77 0 642 562 ; C 74 ; WX 600 ; N J ; B 59 -18 720 562 ; C 75 ; WX 600 ; N K ; B 21 0 691 562 ; C 76 ; WX 600 ; N L ; B 39 0 635 562 ; C 77 ; WX 600 ; N M ; B -2 0 721 562 ; C 78 ; WX 600 ; N N ; B 8 -12 729 562 ; C 79 ; WX 600 ; N O ; B 74 -18 645 580 ; C 80 ; WX 600 ; N P ; B 48 0 642 562 ; C 81 ; WX 600 ; N Q ; B 84 -138 636 580 ; C 82 ; WX 600 ; N R ; B 24 0 617 562 ; C 83 ; WX 600 ; N S ; B 54 -22 672 582 ; C 84 ; WX 600 ; N T ; B 86 0 678 562 ; C 85 ; WX 600 ; N U ; B 101 -18 715 562 ; C 86 ; WX 600 ; N V ; B 84 0 732 562 ; C 87 ; WX 600 ; N W ; B 84 0 737 562 ; C 88 ; WX 600 ; N X ; B 12 0 689 562 ; C 89 ; WX 600 ; N Y ; B 109 0 708 562 ; C 90 ; WX 600 ; N Z ; B 62 0 636 562 ; C 91 ; WX 600 ; N bracketleft ; B 223 -102 606 616 ; C 92 ; WX 600 ; N backslash ; B 223 -77 496 626 ; C 93 ; WX 600 ; N bracketright ; B 103 -102 486 616 ; C 94 ; WX 600 ; N asciicircum ; B 171 250 555 616 ; C 95 ; WX 600 ; N underscore ; B -27 -125 584 -75 ; C 96 ; WX 600 ; N quoteleft ; B 297 277 487 562 ; C 97 ; WX 600 ; N a ; B 62 -15 592 454 ; C 98 ; WX 600 ; N b ; B 13 -15 636 626 ; C 99 ; WX 600 ; N c ; B 81 -15 631 459 ; C 100 ; WX 600 ; N d ; B 61 -15 644 626 ; C 101 ; WX 600 ; N e ; B 81 -15 604 454 ; C 102 ; WX 600 ; N f ; B 83 0 677 626 ; L i fi ; L l fl ; C 103 ; WX 600 ; N g ; B 41 -146 673 454 ; C 104 ; WX 600 ; N h ; B 18 0 614 626 ; C 105 ; WX 600 ; N i ; B 77 0 545 658 ; C 106 ; WX 600 ; N j ; B 37 -146 580 658 ; C 107 ; WX 600 ; N k ; B 33 0 642 626 ; C 108 ; WX 600 ; N l ; B 77 0 545 626 ; C 109 ; WX 600 ; N m ; B -22 0 648 454 ; C 110 ; WX 600 ; N n ; B 18 0 614 454 ; C 111 ; WX 600 ; N o ; B 71 -15 622 454 ; C 112 ; WX 600 ; N p ; B -31 -142 622 454 ; C 113 ; WX 600 ; N q ; B 61 -142 684 454 ; C 114 ; WX 600 ; N r ; B 47 0 654 454 ; C 115 ; WX 600 ; N s ; B 67 -17 607 459 ; C 116 ; WX 600 ; N t ; B 118 -15 566 562 ; C 117 ; WX 600 ; N u ; B 70 -15 591 439 ; C 118 ; WX 600 ; N v ; B 70 0 694 439 ; C 119 ; WX 600 ; N w ; B 53 0 711 439 ; C 120 ; WX 600 ; N x ; B 6 0 670 439 ; C 121 ; WX 600 ; N y ; B -20 -142 694 439 ; C 122 ; WX 600 ; N z ; B 81 0 613 439 ; C 123 ; WX 600 ; N braceleft ; B 204 -102 595 616 ; C 124 ; WX 600 ; N bar ; B 202 -250 504 750 ; C 125 ; WX 600 ; N braceright ; B 114 -102 506 616 ; C 126 ; WX 600 ; N asciitilde ; B 120 153 589 356 ; C 161 ; WX 600 ; N exclamdown ; B 197 -146 477 449 ; C 162 ; WX 600 ; N cent ; B 121 -49 604 614 ; C 163 ; WX 600 ; N sterling ; B 107 -28 650 611 ; C 164 ; WX 600 ; N fraction ; B 22 -60 707 661 ; C 165 ; WX 600 ; N yen ; B 98 0 709 562 ; C 166 ; WX 600 ; N florin ; B -56 -131 701 616 ; C 167 ; WX 600 ; N section ; B 74 -70 619 580 ; C 168 ; WX 600 ; N currency ; B 77 49 643 517 ; C 169 ; WX 600 ; N quotesingle ; B 304 277 492 562 ; C 170 ; WX 600 ; N quotedblleft ; B 190 277 594 562 ; C 171 ; WX 600 ; N guillemotleft ; B 63 70 638 446 ; C 172 ; WX 600 ; N guilsinglleft ; B 196 70 544 446 ; C 173 ; WX 600 ; N guilsinglright ; B 166 70 514 446 ; C 174 ; WX 600 ; N fi ; B 12 0 643 626 ; C 175 ; WX 600 ; N fl ; B 12 0 643 626 ; C 177 ; WX 600 ; N endash ; B 108 203 602 313 ; C 178 ; WX 600 ; N dagger ; B 176 -70 586 580 ; C 179 ; WX 600 ; N daggerdbl ; B 122 -70 586 580 ; C 180 ; WX 600 ; N periodcentered ; B 249 165 461 351 ; C 182 ; WX 600 ; N paragraph ; B 61 -70 699 580 ; C 183 ; WX 600 ; N bullet ; B 197 132 523 430 ; C 184 ; WX 600 ; N quotesinglbase ; B 145 -142 457 143 ; C 185 ; WX 600 ; N quotedblbase ; B 35 -142 559 143 ; C 186 ; WX 600 ; N quotedblright ; B 120 277 644 562 ; C 187 ; WX 600 ; N guillemotright ; B 72 70 647 446 ; C 188 ; WX 600 ; N ellipsis ; B 35 -15 586 116 ; C 189 ; WX 600 ; N perthousand ; B -44 -15 742 616 ; C 191 ; WX 600 ; N questiondown ; B 101 -146 509 449 ; C 193 ; WX 600 ; N grave ; B 272 508 503 661 ; C 194 ; WX 600 ; N acute ; B 313 508 608 661 ; C 195 ; WX 600 ; N circumflex ; B 212 483 606 657 ; C 196 ; WX 600 ; N tilde ; B 200 493 642 636 ; C 197 ; WX 600 ; N macron ; B 195 505 636 585 ; C 198 ; WX 600 ; N breve ; B 217 468 651 631 ; C 199 ; WX 600 ; N dotaccent ; B 346 485 490 625 ; C 200 ; WX 600 ; N dieresis ; B 244 485 592 625 ; C 202 ; WX 600 ; N ring ; B 319 481 528 678 ; C 203 ; WX 600 ; N cedilla ; B 169 -206 367 0 ; C 205 ; WX 600 ; N hungarumlaut ; B 172 488 728 661 ; C 206 ; WX 600 ; N ogonek ; B 144 -199 350 0 ; C 207 ; WX 600 ; N caron ; B 238 493 632 667 ; C 208 ; WX 600 ; N emdash ; B 33 203 677 313 ; C 225 ; WX 600 ; N AE ; B -29 0 707 562 ; C 227 ; WX 600 ; N ordfeminine ; B 189 196 526 580 ; C 232 ; WX 600 ; N Lslash ; B 39 0 635 562 ; C 233 ; WX 600 ; N Oslash ; B 48 -22 672 584 ; C 234 ; WX 600 ; N OE ; B 26 0 700 562 ; C 235 ; WX 600 ; N ordmasculine ; B 189 196 542 580 ; C 241 ; WX 600 ; N ae ; B 21 -15 651 454 ; C 245 ; WX 600 ; N dotlessi ; B 77 0 545 439 ; C 248 ; WX 600 ; N lslash ; B 77 0 578 626 ; C 249 ; WX 600 ; N oslash ; B 55 -24 637 463 ; C 250 ; WX 600 ; N oe ; B 19 -15 661 454 ; C 251 ; WX 600 ; N germandbls ; B 22 -15 628 626 ; C -1 ; WX 600 ; N Odieresis ; B 74 -18 645 748 ; C -1 ; WX 600 ; N logicalnot ; B 135 103 617 413 ; C -1 ; WX 600 ; N minus ; B 114 203 596 313 ; C -1 ; WX 600 ; N merge ; B 168 -15 533 487 ; C -1 ; WX 600 ; N degree ; B 173 243 569 616 ; C -1 ; WX 600 ; N dectab ; B 8 0 615 320 ; C -1 ; WX 600 ; N ll ; B 1 0 653 626 ; C -1 ; WX 600 ; N IJ ; B -8 -18 741 562 ; C -1 ; WX 600 ; N Eacute ; B 25 0 669 784 ; C -1 ; WX 600 ; N Ocircumflex ; B 74 -18 645 780 ; C -1 ; WX 600 ; N ucircumflex ; B 70 -15 591 657 ; C -1 ; WX 600 ; N left ; B 109 44 589 371 ; C -1 ; WX 600 ; N threesuperior ; B 193 222 525 616 ; C -1 ; WX 600 ; N up ; B 196 0 523 447 ; C -1 ; WX 600 ; N multiply ; B 105 39 606 478 ; C -1 ; WX 600 ; N Scaron ; B 54 -22 672 790 ; C -1 ; WX 600 ; N tab ; B 19 0 641 562 ; C -1 ; WX 600 ; N Ucircumflex ; B 101 -18 715 780 ; C -1 ; WX 600 ; N divide ; B 114 16 596 500 ; C -1 ; WX 600 ; N Acircumflex ; B -9 0 631 780 ; C -1 ; WX 600 ; N eacute ; B 81 -15 608 661 ; C -1 ; WX 600 ; N uacute ; B 70 -15 608 661 ; C -1 ; WX 600 ; N Aacute ; B -9 0 665 784 ; C -1 ; WX 600 ; N copyright ; B 53 -18 667 580 ; C -1 ; WX 600 ; N twosuperior ; B 192 230 541 616 ; C -1 ; WX 600 ; N Ecircumflex ; B 25 0 669 780 ; C -1 ; WX 600 ; N ntilde ; B 18 0 642 636 ; C -1 ; WX 600 ; N down ; B 168 -15 496 439 ; C -1 ; WX 600 ; N center ; B 103 14 623 580 ; C -1 ; WX 600 ; N onesuperior ; B 213 230 514 616 ; C -1 ; WX 600 ; N ij ; B 6 -146 714 658 ; C -1 ; WX 600 ; N edieresis ; B 81 -15 604 625 ; C -1 ; WX 600 ; N graybox ; B 76 0 652 599 ; C -1 ; WX 600 ; N odieresis ; B 71 -15 622 625 ; C -1 ; WX 600 ; N Ograve ; B 74 -18 645 784 ; C -1 ; WX 600 ; N threequarters ; B 8 -60 698 661 ; C -1 ; WX 600 ; N plusminus ; B 76 24 614 515 ; C -1 ; WX 600 ; N prescription ; B 24 -15 632 562 ; C -1 ; WX 600 ; N eth ; B 93 -27 661 626 ; C -1 ; WX 600 ; N largebullet ; B 307 229 413 333 ; C -1 ; WX 600 ; N egrave ; B 81 -15 604 661 ; C -1 ; WX 600 ; N ccedilla ; B 81 -206 631 459 ; C -1 ; WX 600 ; N notegraphic ; B 91 -15 619 572 ; C -1 ; WX 600 ; N Udieresis ; B 101 -18 715 748 ; C -1 ; WX 600 ; N Gcaron ; B 75 -18 674 790 ; C -1 ; WX 600 ; N arrowdown ; B 174 -15 486 608 ; C -1 ; WX 600 ; N format ; B -26 -146 243 601 ; C -1 ; WX 600 ; N Otilde ; B 74 -18 668 759 ; C -1 ; WX 600 ; N Idieresis ; B 77 0 642 748 ; C -1 ; WX 600 ; N adieresis ; B 62 -15 592 625 ; C -1 ; WX 600 ; N ecircumflex ; B 81 -15 606 657 ; C -1 ; WX 600 ; N Eth ; B 30 0 664 562 ; C -1 ; WX 600 ; N onequarter ; B 14 -60 706 661 ; C -1 ; WX 600 ; N LL ; B -45 0 694 562 ; C -1 ; WX 600 ; N agrave ; B 62 -15 592 661 ; C -1 ; WX 600 ; N Zcaron ; B 62 0 659 790 ; C -1 ; WX 600 ; N Scedilla ; B 54 -206 672 582 ; C -1 ; WX 600 ; N Idot ; B 77 0 642 748 ; C -1 ; WX 600 ; N Iacute ; B 77 0 642 784 ; C -1 ; WX 600 ; N indent ; B 99 45 579 372 ; C -1 ; WX 600 ; N Ugrave ; B 101 -18 715 784 ; C -1 ; WX 600 ; N scaron ; B 67 -17 632 667 ; C -1 ; WX 600 ; N overscore ; B 123 579 734 629 ; C -1 ; WX 600 ; N Aring ; B -9 0 631 801 ; C -1 ; WX 600 ; N Ccedilla ; B 74 -206 674 580 ; C -1 ; WX 600 ; N Igrave ; B 77 0 642 784 ; C -1 ; WX 600 ; N brokenbar ; B 218 -175 488 675 ; C -1 ; WX 600 ; N Oacute ; B 74 -18 645 784 ; C -1 ; WX 600 ; N otilde ; B 71 -15 642 636 ; C -1 ; WX 600 ; N Yacute ; B 109 0 708 784 ; C -1 ; WX 600 ; N lira ; B 107 -28 650 611 ; C -1 ; WX 600 ; N Icircumflex ; B 77 0 642 780 ; C -1 ; WX 600 ; N Atilde ; B -9 0 638 759 ; C -1 ; WX 600 ; N Uacute ; B 101 -18 715 784 ; C -1 ; WX 600 ; N Ydieresis ; B 109 0 708 748 ; C -1 ; WX 600 ; N ydieresis ; B -20 -142 694 625 ; C -1 ; WX 600 ; N idieresis ; B 77 0 552 625 ; C -1 ; WX 600 ; N Adieresis ; B -9 0 631 748 ; C -1 ; WX 600 ; N mu ; B 50 -142 591 439 ; C -1 ; WX 600 ; N trademark ; B 86 230 868 562 ; C -1 ; WX 600 ; N oacute ; B 71 -15 622 661 ; C -1 ; WX 600 ; N acircumflex ; B 62 -15 592 657 ; C -1 ; WX 600 ; N Agrave ; B -9 0 631 784 ; C -1 ; WX 600 ; N return ; B 79 0 700 562 ; C -1 ; WX 600 ; N atilde ; B 62 -15 642 636 ; C -1 ; WX 600 ; N square ; B 19 0 700 562 ; C -1 ; WX 600 ; N registered ; B 53 -18 667 580 ; C -1 ; WX 600 ; N stop ; B 19 0 700 562 ; C -1 ; WX 600 ; N udieresis ; B 70 -15 591 625 ; C -1 ; WX 600 ; N arrowup ; B 244 3 556 626 ; C -1 ; WX 600 ; N igrave ; B 77 0 545 661 ; C -1 ; WX 600 ; N Edieresis ; B 25 0 669 748 ; C -1 ; WX 600 ; N zcaron ; B 81 0 632 667 ; C -1 ; WX 600 ; N arrowboth ; B 40 143 688 455 ; C -1 ; WX 600 ; N gcaron ; B 41 -146 673 667 ; C -1 ; WX 600 ; N arrowleft ; B 40 143 708 455 ; C -1 ; WX 600 ; N aacute ; B 62 -15 608 661 ; C -1 ; WX 600 ; N ocircumflex ; B 71 -15 622 657 ; C -1 ; WX 600 ; N scedilla ; B 67 -206 607 459 ; C -1 ; WX 600 ; N ograve ; B 71 -15 622 661 ; C -1 ; WX 600 ; N onehalf ; B 23 -60 715 661 ; C -1 ; WX 600 ; N ugrave ; B 70 -15 591 661 ; C -1 ; WX 600 ; N Ntilde ; B 8 -12 729 759 ; C -1 ; WX 600 ; N iacute ; B 77 0 608 661 ; C -1 ; WX 600 ; N arrowright ; B 20 143 688 455 ; C -1 ; WX 600 ; N Thorn ; B 48 0 619 562 ; C -1 ; WX 600 ; N Egrave ; B 25 0 669 784 ; C -1 ; WX 600 ; N thorn ; B -31 -142 622 626 ; C -1 ; WX 600 ; N aring ; B 62 -15 592 678 ; C -1 ; WX 600 ; N yacute ; B -20 -142 694 661 ; C -1 ; WX 600 ; N icircumflex ; B 77 0 566 657 ; EndCharMetrics StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 56 123 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex -4 123 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 6 123 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave -24 123 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 16 123 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde -4 123 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 56 123 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 26 123 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 26 123 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 26 123 ; CC Gcaron 2 ; PCC G 0 0 ; PCC caron 36 123 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 26 123 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 26 123 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 26 123 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 26 123 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 26 123 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 26 123 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 26 123 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 26 123 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 26 123 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 26 123 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 26 123 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 56 123 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 26 123 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 26 123 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave -4 123 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 56 123 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 26 123 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 26 123 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex -20 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis -10 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave -30 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ; CC gcaron 2 ; PCC g 0 0 ; PCC caron -40 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -40 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -40 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 0 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex -20 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis -20 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave -30 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 30 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 10 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 0 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pcrr8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1989, 1990, 1991 Adobe Systems Incorporated. All rights reserved. Comment Creation Date: Tue Sep 17 07:47:21 1991 Comment UniqueID 36347 Comment VMusage 31037 39405 FontName Courier FullName Courier FamilyName Courier Weight Medium ItalicAngle 0 IsFixedPitch true FontBBox -28 -250 628 805 UnderlinePosition -100 UnderlineThickness 50 Version 002.004 Notice Copyright (c) 1989, 1990, 1991 Adobe Systems Incorporated. All rights reserved. EncodingScheme AdobeStandardEncoding CapHeight 562 XHeight 426 Ascender 629 Descender -157 StartCharMetrics 260 C 32 ; WX 600 ; N space ; B 0 0 0 0 ; C 33 ; WX 600 ; N exclam ; B 236 -15 364 572 ; C 34 ; WX 600 ; N quotedbl ; B 187 328 413 562 ; C 35 ; WX 600 ; N numbersign ; B 93 -32 507 639 ; C 36 ; WX 600 ; N dollar ; B 105 -126 496 662 ; C 37 ; WX 600 ; N percent ; B 81 -15 518 622 ; C 38 ; WX 600 ; N ampersand ; B 63 -15 538 543 ; C 39 ; WX 600 ; N quoteright ; B 213 328 376 562 ; C 40 ; WX 600 ; N parenleft ; B 269 -108 440 622 ; C 41 ; WX 600 ; N parenright ; B 160 -108 331 622 ; C 42 ; WX 600 ; N asterisk ; B 116 257 484 607 ; C 43 ; WX 600 ; N plus ; B 80 44 520 470 ; C 44 ; WX 600 ; N comma ; B 181 -112 344 122 ; C 45 ; WX 600 ; N hyphen ; B 103 231 497 285 ; C 46 ; WX 600 ; N period ; B 229 -15 371 109 ; C 47 ; WX 600 ; N slash ; B 125 -80 475 629 ; C 48 ; WX 600 ; N zero ; B 106 -15 494 622 ; C 49 ; WX 600 ; N one ; B 96 0 505 622 ; C 50 ; WX 600 ; N two ; B 70 0 471 622 ; C 51 ; WX 600 ; N three ; B 75 -15 466 622 ; C 52 ; WX 600 ; N four ; B 78 0 500 622 ; C 53 ; WX 600 ; N five ; B 92 -15 497 607 ; C 54 ; WX 600 ; N six ; B 111 -15 497 622 ; C 55 ; WX 600 ; N seven ; B 82 0 483 607 ; C 56 ; WX 600 ; N eight ; B 102 -15 498 622 ; C 57 ; WX 600 ; N nine ; B 96 -15 489 622 ; C 58 ; WX 600 ; N colon ; B 229 -15 371 385 ; C 59 ; WX 600 ; N semicolon ; B 181 -112 371 385 ; C 60 ; WX 600 ; N less ; B 41 42 519 472 ; C 61 ; WX 600 ; N equal ; B 80 138 520 376 ; C 62 ; WX 600 ; N greater ; B 66 42 544 472 ; C 63 ; WX 600 ; N question ; B 129 -15 492 572 ; C 64 ; WX 600 ; N at ; B 77 -15 533 622 ; C 65 ; WX 600 ; N A ; B 3 0 597 562 ; C 66 ; WX 600 ; N B ; B 43 0 559 562 ; C 67 ; WX 600 ; N C ; B 41 -18 540 580 ; C 68 ; WX 600 ; N D ; B 43 0 574 562 ; C 69 ; WX 600 ; N E ; B 53 0 550 562 ; C 70 ; WX 600 ; N F ; B 53 0 545 562 ; C 71 ; WX 600 ; N G ; B 31 -18 575 580 ; C 72 ; WX 600 ; N H ; B 32 0 568 562 ; C 73 ; WX 600 ; N I ; B 96 0 504 562 ; C 74 ; WX 600 ; N J ; B 34 -18 566 562 ; C 75 ; WX 600 ; N K ; B 38 0 582 562 ; C 76 ; WX 600 ; N L ; B 47 0 554 562 ; C 77 ; WX 600 ; N M ; B 4 0 596 562 ; C 78 ; WX 600 ; N N ; B 7 -13 593 562 ; C 79 ; WX 600 ; N O ; B 43 -18 557 580 ; C 80 ; WX 600 ; N P ; B 79 0 558 562 ; C 81 ; WX 600 ; N Q ; B 43 -138 557 580 ; C 82 ; WX 600 ; N R ; B 38 0 588 562 ; C 83 ; WX 600 ; N S ; B 72 -20 529 580 ; C 84 ; WX 600 ; N T ; B 38 0 563 562 ; C 85 ; WX 600 ; N U ; B 17 -18 583 562 ; C 86 ; WX 600 ; N V ; B -4 -13 604 562 ; C 87 ; WX 600 ; N W ; B -3 -13 603 562 ; C 88 ; WX 600 ; N X ; B 23 0 577 562 ; C 89 ; WX 600 ; N Y ; B 24 0 576 562 ; C 90 ; WX 600 ; N Z ; B 86 0 514 562 ; C 91 ; WX 600 ; N bracketleft ; B 269 -108 442 622 ; C 92 ; WX 600 ; N backslash ; B 118 -80 482 629 ; C 93 ; WX 600 ; N bracketright ; B 158 -108 331 622 ; C 94 ; WX 600 ; N asciicircum ; B 94 354 506 622 ; C 95 ; WX 600 ; N underscore ; B 0 -125 600 -75 ; C 96 ; WX 600 ; N quoteleft ; B 224 328 387 562 ; C 97 ; WX 600 ; N a ; B 53 -15 559 441 ; C 98 ; WX 600 ; N b ; B 14 -15 575 629 ; C 99 ; WX 600 ; N c ; B 66 -15 529 441 ; C 100 ; WX 600 ; N d ; B 45 -15 591 629 ; C 101 ; WX 600 ; N e ; B 66 -15 548 441 ; C 102 ; WX 600 ; N f ; B 114 0 531 629 ; L i fi ; L l fl ; C 103 ; WX 600 ; N g ; B 45 -157 566 441 ; C 104 ; WX 600 ; N h ; B 18 0 582 629 ; C 105 ; WX 600 ; N i ; B 95 0 505 657 ; C 106 ; WX 600 ; N j ; B 82 -157 410 657 ; C 107 ; WX 600 ; N k ; B 43 0 580 629 ; C 108 ; WX 600 ; N l ; B 95 0 505 629 ; C 109 ; WX 600 ; N m ; B -5 0 605 441 ; C 110 ; WX 600 ; N n ; B 26 0 575 441 ; C 111 ; WX 600 ; N o ; B 62 -15 538 441 ; C 112 ; WX 600 ; N p ; B 9 -157 555 441 ; C 113 ; WX 600 ; N q ; B 45 -157 591 441 ; C 114 ; WX 600 ; N r ; B 60 0 559 441 ; C 115 ; WX 600 ; N s ; B 80 -15 513 441 ; C 116 ; WX 600 ; N t ; B 87 -15 530 561 ; C 117 ; WX 600 ; N u ; B 21 -15 562 426 ; C 118 ; WX 600 ; N v ; B 10 -10 590 426 ; C 119 ; WX 600 ; N w ; B -4 -10 604 426 ; C 120 ; WX 600 ; N x ; B 20 0 580 426 ; C 121 ; WX 600 ; N y ; B 7 -157 592 426 ; C 122 ; WX 600 ; N z ; B 99 0 502 426 ; C 123 ; WX 600 ; N braceleft ; B 182 -108 437 622 ; C 124 ; WX 600 ; N bar ; B 275 -250 326 750 ; C 125 ; WX 600 ; N braceright ; B 163 -108 418 622 ; C 126 ; WX 600 ; N asciitilde ; B 63 197 540 320 ; C 161 ; WX 600 ; N exclamdown ; B 236 -157 364 430 ; C 162 ; WX 600 ; N cent ; B 96 -49 500 614 ; C 163 ; WX 600 ; N sterling ; B 84 -21 521 611 ; C 164 ; WX 600 ; N fraction ; B 92 -57 509 665 ; C 165 ; WX 600 ; N yen ; B 26 0 574 562 ; C 166 ; WX 600 ; N florin ; B 4 -143 539 622 ; C 167 ; WX 600 ; N section ; B 113 -78 488 580 ; C 168 ; WX 600 ; N currency ; B 73 58 527 506 ; C 169 ; WX 600 ; N quotesingle ; B 259 328 341 562 ; C 170 ; WX 600 ; N quotedblleft ; B 143 328 471 562 ; C 171 ; WX 600 ; N guillemotleft ; B 37 70 563 446 ; C 172 ; WX 600 ; N guilsinglleft ; B 149 70 451 446 ; C 173 ; WX 600 ; N guilsinglright ; B 149 70 451 446 ; C 174 ; WX 600 ; N fi ; B 3 0 597 629 ; C 175 ; WX 600 ; N fl ; B 3 0 597 629 ; C 177 ; WX 600 ; N endash ; B 75 231 525 285 ; C 178 ; WX 600 ; N dagger ; B 141 -78 459 580 ; C 179 ; WX 600 ; N daggerdbl ; B 141 -78 459 580 ; C 180 ; WX 600 ; N periodcentered ; B 222 189 378 327 ; C 182 ; WX 600 ; N paragraph ; B 50 -78 511 562 ; C 183 ; WX 600 ; N bullet ; B 172 130 428 383 ; C 184 ; WX 600 ; N quotesinglbase ; B 213 -134 376 100 ; C 185 ; WX 600 ; N quotedblbase ; B 143 -134 457 100 ; C 186 ; WX 600 ; N quotedblright ; B 143 328 457 562 ; C 187 ; WX 600 ; N guillemotright ; B 37 70 563 446 ; C 188 ; WX 600 ; N ellipsis ; B 37 -15 563 111 ; C 189 ; WX 600 ; N perthousand ; B 3 -15 600 622 ; C 191 ; WX 600 ; N questiondown ; B 108 -157 471 430 ; C 193 ; WX 600 ; N grave ; B 151 497 378 672 ; C 194 ; WX 600 ; N acute ; B 242 497 469 672 ; C 195 ; WX 600 ; N circumflex ; B 124 477 476 654 ; C 196 ; WX 600 ; N tilde ; B 105 489 503 606 ; C 197 ; WX 600 ; N macron ; B 120 525 480 565 ; C 198 ; WX 600 ; N breve ; B 153 501 447 609 ; C 199 ; WX 600 ; N dotaccent ; B 249 477 352 580 ; C 200 ; WX 600 ; N dieresis ; B 148 492 453 595 ; C 202 ; WX 600 ; N ring ; B 218 463 382 627 ; C 203 ; WX 600 ; N cedilla ; B 224 -151 362 10 ; C 205 ; WX 600 ; N hungarumlaut ; B 133 497 540 672 ; C 206 ; WX 600 ; N ogonek ; B 227 -151 370 0 ; C 207 ; WX 600 ; N caron ; B 124 492 476 669 ; C 208 ; WX 600 ; N emdash ; B 0 231 600 285 ; C 225 ; WX 600 ; N AE ; B 3 0 550 562 ; C 227 ; WX 600 ; N ordfeminine ; B 156 249 442 580 ; C 232 ; WX 600 ; N Lslash ; B 47 0 554 562 ; C 233 ; WX 600 ; N Oslash ; B 43 -80 557 629 ; C 234 ; WX 600 ; N OE ; B 7 0 567 562 ; C 235 ; WX 600 ; N ordmasculine ; B 157 249 443 580 ; C 241 ; WX 600 ; N ae ; B 19 -15 570 441 ; C 245 ; WX 600 ; N dotlessi ; B 95 0 505 426 ; C 248 ; WX 600 ; N lslash ; B 95 0 505 629 ; C 249 ; WX 600 ; N oslash ; B 62 -80 538 506 ; C 250 ; WX 600 ; N oe ; B 19 -15 559 441 ; C 251 ; WX 600 ; N germandbls ; B 48 -15 588 629 ; C -1 ; WX 600 ; N Odieresis ; B 43 -18 557 731 ; C -1 ; WX 600 ; N logicalnot ; B 87 108 513 369 ; C -1 ; WX 600 ; N minus ; B 80 232 520 283 ; C -1 ; WX 600 ; N merge ; B 160 -15 440 436 ; C -1 ; WX 600 ; N degree ; B 123 269 477 622 ; C -1 ; WX 600 ; N dectab ; B 18 0 582 227 ; C -1 ; WX 600 ; N ll ; B 18 0 567 629 ; C -1 ; WX 600 ; N IJ ; B 32 -18 583 562 ; C -1 ; WX 600 ; N Eacute ; B 53 0 550 793 ; C -1 ; WX 600 ; N Ocircumflex ; B 43 -18 557 775 ; C -1 ; WX 600 ; N ucircumflex ; B 21 -15 562 654 ; C -1 ; WX 600 ; N left ; B 70 68 530 348 ; C -1 ; WX 600 ; N threesuperior ; B 155 240 406 622 ; C -1 ; WX 600 ; N up ; B 160 0 440 437 ; C -1 ; WX 600 ; N multiply ; B 87 43 515 470 ; C -1 ; WX 600 ; N Scaron ; B 72 -20 529 805 ; C -1 ; WX 600 ; N tab ; B 19 0 581 562 ; C -1 ; WX 600 ; N Ucircumflex ; B 17 -18 583 775 ; C -1 ; WX 600 ; N divide ; B 87 48 513 467 ; C -1 ; WX 600 ; N Acircumflex ; B 3 0 597 775 ; C -1 ; WX 600 ; N eacute ; B 66 -15 548 672 ; C -1 ; WX 600 ; N uacute ; B 21 -15 562 672 ; C -1 ; WX 600 ; N Aacute ; B 3 0 597 793 ; C -1 ; WX 600 ; N copyright ; B 0 -18 600 580 ; C -1 ; WX 600 ; N twosuperior ; B 177 249 424 622 ; C -1 ; WX 600 ; N Ecircumflex ; B 53 0 550 775 ; C -1 ; WX 600 ; N ntilde ; B 26 0 575 606 ; C -1 ; WX 600 ; N down ; B 160 -15 440 426 ; C -1 ; WX 600 ; N center ; B 40 14 560 580 ; C -1 ; WX 600 ; N onesuperior ; B 172 249 428 622 ; C -1 ; WX 600 ; N ij ; B 37 -157 490 657 ; C -1 ; WX 600 ; N edieresis ; B 66 -15 548 595 ; C -1 ; WX 600 ; N graybox ; B 76 0 525 599 ; C -1 ; WX 600 ; N odieresis ; B 62 -15 538 595 ; C -1 ; WX 600 ; N Ograve ; B 43 -18 557 793 ; C -1 ; WX 600 ; N threequarters ; B 8 -56 593 666 ; C -1 ; WX 600 ; N plusminus ; B 87 44 513 558 ; C -1 ; WX 600 ; N prescription ; B 27 -15 577 562 ; C -1 ; WX 600 ; N eth ; B 62 -15 538 629 ; C -1 ; WX 600 ; N largebullet ; B 261 220 339 297 ; C -1 ; WX 600 ; N egrave ; B 66 -15 548 672 ; C -1 ; WX 600 ; N ccedilla ; B 66 -151 529 441 ; C -1 ; WX 600 ; N notegraphic ; B 136 -15 464 572 ; C -1 ; WX 600 ; N Udieresis ; B 17 -18 583 731 ; C -1 ; WX 600 ; N Gcaron ; B 31 -18 575 805 ; C -1 ; WX 600 ; N arrowdown ; B 116 -15 484 608 ; C -1 ; WX 600 ; N format ; B 5 -157 56 607 ; C -1 ; WX 600 ; N Otilde ; B 43 -18 557 732 ; C -1 ; WX 600 ; N Idieresis ; B 96 0 504 731 ; C -1 ; WX 600 ; N adieresis ; B 53 -15 559 595 ; C -1 ; WX 600 ; N ecircumflex ; B 66 -15 548 654 ; C -1 ; WX 600 ; N Eth ; B 30 0 574 562 ; C -1 ; WX 600 ; N onequarter ; B 0 -57 600 665 ; C -1 ; WX 600 ; N LL ; B 8 0 592 562 ; C -1 ; WX 600 ; N agrave ; B 53 -15 559 672 ; C -1 ; WX 600 ; N Zcaron ; B 86 0 514 805 ; C -1 ; WX 600 ; N Scedilla ; B 72 -151 529 580 ; C -1 ; WX 600 ; N Idot ; B 96 0 504 716 ; C -1 ; WX 600 ; N Iacute ; B 96 0 504 793 ; C -1 ; WX 600 ; N indent ; B 70 68 530 348 ; C -1 ; WX 600 ; N Ugrave ; B 17 -18 583 793 ; C -1 ; WX 600 ; N scaron ; B 80 -15 513 669 ; C -1 ; WX 600 ; N overscore ; B 0 579 600 629 ; C -1 ; WX 600 ; N Aring ; B 3 0 597 753 ; C -1 ; WX 600 ; N Ccedilla ; B 41 -151 540 580 ; C -1 ; WX 600 ; N Igrave ; B 96 0 504 793 ; C -1 ; WX 600 ; N brokenbar ; B 275 -175 326 675 ; C -1 ; WX 600 ; N Oacute ; B 43 -18 557 793 ; C -1 ; WX 600 ; N otilde ; B 62 -15 538 606 ; C -1 ; WX 600 ; N Yacute ; B 24 0 576 793 ; C -1 ; WX 600 ; N lira ; B 73 -21 521 611 ; C -1 ; WX 600 ; N Icircumflex ; B 96 0 504 775 ; C -1 ; WX 600 ; N Atilde ; B 3 0 597 732 ; C -1 ; WX 600 ; N Uacute ; B 17 -18 583 793 ; C -1 ; WX 600 ; N Ydieresis ; B 24 0 576 731 ; C -1 ; WX 600 ; N ydieresis ; B 7 -157 592 595 ; C -1 ; WX 600 ; N idieresis ; B 95 0 505 595 ; C -1 ; WX 600 ; N Adieresis ; B 3 0 597 731 ; C -1 ; WX 600 ; N mu ; B 21 -157 562 426 ; C -1 ; WX 600 ; N trademark ; B -23 263 623 562 ; C -1 ; WX 600 ; N oacute ; B 62 -15 538 672 ; C -1 ; WX 600 ; N acircumflex ; B 53 -15 559 654 ; C -1 ; WX 600 ; N Agrave ; B 3 0 597 793 ; C -1 ; WX 600 ; N return ; B 19 0 581 562 ; C -1 ; WX 600 ; N atilde ; B 53 -15 559 606 ; C -1 ; WX 600 ; N square ; B 19 0 581 562 ; C -1 ; WX 600 ; N registered ; B 0 -18 600 580 ; C -1 ; WX 600 ; N stop ; B 19 0 581 562 ; C -1 ; WX 600 ; N udieresis ; B 21 -15 562 595 ; C -1 ; WX 600 ; N arrowup ; B 116 0 484 623 ; C -1 ; WX 600 ; N igrave ; B 95 0 505 672 ; C -1 ; WX 600 ; N Edieresis ; B 53 0 550 731 ; C -1 ; WX 600 ; N zcaron ; B 99 0 502 669 ; C -1 ; WX 600 ; N arrowboth ; B -28 115 628 483 ; C -1 ; WX 600 ; N gcaron ; B 45 -157 566 669 ; C -1 ; WX 600 ; N arrowleft ; B -24 115 624 483 ; C -1 ; WX 600 ; N aacute ; B 53 -15 559 672 ; C -1 ; WX 600 ; N ocircumflex ; B 62 -15 538 654 ; C -1 ; WX 600 ; N scedilla ; B 80 -151 513 441 ; C -1 ; WX 600 ; N ograve ; B 62 -15 538 672 ; C -1 ; WX 600 ; N onehalf ; B 0 -57 611 665 ; C -1 ; WX 600 ; N ugrave ; B 21 -15 562 672 ; C -1 ; WX 600 ; N Ntilde ; B 7 -13 593 732 ; C -1 ; WX 600 ; N iacute ; B 95 0 505 672 ; C -1 ; WX 600 ; N arrowright ; B -24 115 624 483 ; C -1 ; WX 600 ; N Thorn ; B 79 0 538 562 ; C -1 ; WX 600 ; N Egrave ; B 53 0 550 793 ; C -1 ; WX 600 ; N thorn ; B -6 -157 555 629 ; C -1 ; WX 600 ; N aring ; B 53 -15 559 627 ; C -1 ; WX 600 ; N yacute ; B 7 -157 592 672 ; C -1 ; WX 600 ; N icircumflex ; B 94 0 505 654 ; EndCharMetrics StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 20 121 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex -30 121 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis -30 136 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave -30 121 ; CC Aring 2 ; PCC A 0 0 ; PCC ring -15 126 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 0 126 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 30 121 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 0 121 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 0 136 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 0 121 ; CC Gcaron 2 ; PCC G 0 0 ; PCC caron 0 136 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 121 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 121 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 136 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 121 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 0 126 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 0 121 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 0 121 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 0 136 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 0 121 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 0 126 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 30 136 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 30 121 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 0 121 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 0 136 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave -30 121 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 30 121 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 0 136 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 0 136 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 0 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 0 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 0 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ; CC gcaron 2 ; PCC g 0 0 ; PCC caron -30 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -30 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -30 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -30 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute -10 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex -10 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 0 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave -30 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute -20 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis -10 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 10 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pcrro8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1989, 1990, 1991 Adobe Systems Incorporated. All rights reserved. Comment Creation Date: Tue Sep 17 09:42:19 1991 Comment UniqueID 36350 Comment VMusage 9174 52297 FontName Courier-Oblique FullName Courier Oblique FamilyName Courier Weight Medium ItalicAngle -12 IsFixedPitch true FontBBox -28 -250 742 805 UnderlinePosition -100 UnderlineThickness 50 Version 002.004 Notice Copyright (c) 1989, 1990, 1991 Adobe Systems Incorporated. All rights reserved. EncodingScheme AdobeStandardEncoding CapHeight 562 XHeight 426 Ascender 629 Descender -157 StartCharMetrics 260 C 32 ; WX 600 ; N space ; B 0 0 0 0 ; C 33 ; WX 600 ; N exclam ; B 243 -15 464 572 ; C 34 ; WX 600 ; N quotedbl ; B 273 328 532 562 ; C 35 ; WX 600 ; N numbersign ; B 133 -32 596 639 ; C 36 ; WX 600 ; N dollar ; B 108 -126 596 662 ; C 37 ; WX 600 ; N percent ; B 134 -15 599 622 ; C 38 ; WX 600 ; N ampersand ; B 87 -15 580 543 ; C 39 ; WX 600 ; N quoteright ; B 283 328 495 562 ; C 40 ; WX 600 ; N parenleft ; B 313 -108 572 622 ; C 41 ; WX 600 ; N parenright ; B 137 -108 396 622 ; C 42 ; WX 600 ; N asterisk ; B 212 257 580 607 ; C 43 ; WX 600 ; N plus ; B 129 44 580 470 ; C 44 ; WX 600 ; N comma ; B 157 -112 370 122 ; C 45 ; WX 600 ; N hyphen ; B 152 231 558 285 ; C 46 ; WX 600 ; N period ; B 238 -15 382 109 ; C 47 ; WX 600 ; N slash ; B 112 -80 604 629 ; C 48 ; WX 600 ; N zero ; B 154 -15 575 622 ; C 49 ; WX 600 ; N one ; B 98 0 515 622 ; C 50 ; WX 600 ; N two ; B 70 0 568 622 ; C 51 ; WX 600 ; N three ; B 82 -15 538 622 ; C 52 ; WX 600 ; N four ; B 108 0 541 622 ; C 53 ; WX 600 ; N five ; B 99 -15 589 607 ; C 54 ; WX 600 ; N six ; B 155 -15 629 622 ; C 55 ; WX 600 ; N seven ; B 182 0 612 607 ; C 56 ; WX 600 ; N eight ; B 132 -15 588 622 ; C 57 ; WX 600 ; N nine ; B 93 -15 574 622 ; C 58 ; WX 600 ; N colon ; B 238 -15 441 385 ; C 59 ; WX 600 ; N semicolon ; B 157 -112 441 385 ; C 60 ; WX 600 ; N less ; B 96 42 610 472 ; C 61 ; WX 600 ; N equal ; B 109 138 600 376 ; C 62 ; WX 600 ; N greater ; B 85 42 599 472 ; C 63 ; WX 600 ; N question ; B 222 -15 583 572 ; C 64 ; WX 600 ; N at ; B 127 -15 582 622 ; C 65 ; WX 600 ; N A ; B 3 0 607 562 ; C 66 ; WX 600 ; N B ; B 43 0 616 562 ; C 67 ; WX 600 ; N C ; B 93 -18 655 580 ; C 68 ; WX 600 ; N D ; B 43 0 645 562 ; C 69 ; WX 600 ; N E ; B 53 0 660 562 ; C 70 ; WX 600 ; N F ; B 53 0 660 562 ; C 71 ; WX 600 ; N G ; B 83 -18 645 580 ; C 72 ; WX 600 ; N H ; B 32 0 687 562 ; C 73 ; WX 600 ; N I ; B 96 0 623 562 ; C 74 ; WX 600 ; N J ; B 52 -18 685 562 ; C 75 ; WX 600 ; N K ; B 38 0 671 562 ; C 76 ; WX 600 ; N L ; B 47 0 607 562 ; C 77 ; WX 600 ; N M ; B 4 0 715 562 ; C 78 ; WX 600 ; N N ; B 7 -13 712 562 ; C 79 ; WX 600 ; N O ; B 94 -18 625 580 ; C 80 ; WX 600 ; N P ; B 79 0 644 562 ; C 81 ; WX 600 ; N Q ; B 95 -138 625 580 ; C 82 ; WX 600 ; N R ; B 38 0 598 562 ; C 83 ; WX 600 ; N S ; B 76 -20 650 580 ; C 84 ; WX 600 ; N T ; B 108 0 665 562 ; C 85 ; WX 600 ; N U ; B 125 -18 702 562 ; C 86 ; WX 600 ; N V ; B 105 -13 723 562 ; C 87 ; WX 600 ; N W ; B 106 -13 722 562 ; C 88 ; WX 600 ; N X ; B 23 0 675 562 ; C 89 ; WX 600 ; N Y ; B 133 0 695 562 ; C 90 ; WX 600 ; N Z ; B 86 0 610 562 ; C 91 ; WX 600 ; N bracketleft ; B 246 -108 574 622 ; C 92 ; WX 600 ; N backslash ; B 249 -80 468 629 ; C 93 ; WX 600 ; N bracketright ; B 135 -108 463 622 ; C 94 ; WX 600 ; N asciicircum ; B 175 354 587 622 ; C 95 ; WX 600 ; N underscore ; B -27 -125 584 -75 ; C 96 ; WX 600 ; N quoteleft ; B 343 328 457 562 ; C 97 ; WX 600 ; N a ; B 76 -15 569 441 ; C 98 ; WX 600 ; N b ; B 29 -15 625 629 ; C 99 ; WX 600 ; N c ; B 106 -15 608 441 ; C 100 ; WX 600 ; N d ; B 85 -15 640 629 ; C 101 ; WX 600 ; N e ; B 106 -15 598 441 ; C 102 ; WX 600 ; N f ; B 114 0 662 629 ; L i fi ; L l fl ; C 103 ; WX 600 ; N g ; B 61 -157 657 441 ; C 104 ; WX 600 ; N h ; B 33 0 592 629 ; C 105 ; WX 600 ; N i ; B 95 0 515 657 ; C 106 ; WX 600 ; N j ; B 52 -157 550 657 ; C 107 ; WX 600 ; N k ; B 58 0 633 629 ; C 108 ; WX 600 ; N l ; B 95 0 515 629 ; C 109 ; WX 600 ; N m ; B -5 0 615 441 ; C 110 ; WX 600 ; N n ; B 26 0 585 441 ; C 111 ; WX 600 ; N o ; B 102 -15 588 441 ; C 112 ; WX 600 ; N p ; B -24 -157 605 441 ; C 113 ; WX 600 ; N q ; B 85 -157 682 441 ; C 114 ; WX 600 ; N r ; B 60 0 636 441 ; C 115 ; WX 600 ; N s ; B 78 -15 584 441 ; C 116 ; WX 600 ; N t ; B 167 -15 561 561 ; C 117 ; WX 600 ; N u ; B 101 -15 572 426 ; C 118 ; WX 600 ; N v ; B 90 -10 681 426 ; C 119 ; WX 600 ; N w ; B 76 -10 695 426 ; C 120 ; WX 600 ; N x ; B 20 0 655 426 ; C 121 ; WX 600 ; N y ; B -4 -157 683 426 ; C 122 ; WX 600 ; N z ; B 99 0 593 426 ; C 123 ; WX 600 ; N braceleft ; B 233 -108 569 622 ; C 124 ; WX 600 ; N bar ; B 222 -250 485 750 ; C 125 ; WX 600 ; N braceright ; B 140 -108 477 622 ; C 126 ; WX 600 ; N asciitilde ; B 116 197 600 320 ; C 161 ; WX 600 ; N exclamdown ; B 225 -157 445 430 ; C 162 ; WX 600 ; N cent ; B 151 -49 588 614 ; C 163 ; WX 600 ; N sterling ; B 124 -21 621 611 ; C 164 ; WX 600 ; N fraction ; B 84 -57 646 665 ; C 165 ; WX 600 ; N yen ; B 120 0 693 562 ; C 166 ; WX 600 ; N florin ; B -26 -143 671 622 ; C 167 ; WX 600 ; N section ; B 104 -78 590 580 ; C 168 ; WX 600 ; N currency ; B 94 58 628 506 ; C 169 ; WX 600 ; N quotesingle ; B 345 328 460 562 ; C 170 ; WX 600 ; N quotedblleft ; B 262 328 541 562 ; C 171 ; WX 600 ; N guillemotleft ; B 92 70 652 446 ; C 172 ; WX 600 ; N guilsinglleft ; B 204 70 540 446 ; C 173 ; WX 600 ; N guilsinglright ; B 170 70 506 446 ; C 174 ; WX 600 ; N fi ; B 3 0 619 629 ; C 175 ; WX 600 ; N fl ; B 3 0 619 629 ; C 177 ; WX 600 ; N endash ; B 124 231 586 285 ; C 178 ; WX 600 ; N dagger ; B 217 -78 546 580 ; C 179 ; WX 600 ; N daggerdbl ; B 163 -78 546 580 ; C 180 ; WX 600 ; N periodcentered ; B 275 189 434 327 ; C 182 ; WX 600 ; N paragraph ; B 100 -78 630 562 ; C 183 ; WX 600 ; N bullet ; B 224 130 485 383 ; C 184 ; WX 600 ; N quotesinglbase ; B 185 -134 397 100 ; C 185 ; WX 600 ; N quotedblbase ; B 115 -134 478 100 ; C 186 ; WX 600 ; N quotedblright ; B 213 328 576 562 ; C 187 ; WX 600 ; N guillemotright ; B 58 70 618 446 ; C 188 ; WX 600 ; N ellipsis ; B 46 -15 575 111 ; C 189 ; WX 600 ; N perthousand ; B 59 -15 627 622 ; C 191 ; WX 600 ; N questiondown ; B 105 -157 466 430 ; C 193 ; WX 600 ; N grave ; B 294 497 484 672 ; C 194 ; WX 600 ; N acute ; B 348 497 612 672 ; C 195 ; WX 600 ; N circumflex ; B 229 477 581 654 ; C 196 ; WX 600 ; N tilde ; B 212 489 629 606 ; C 197 ; WX 600 ; N macron ; B 232 525 600 565 ; C 198 ; WX 600 ; N breve ; B 279 501 576 609 ; C 199 ; WX 600 ; N dotaccent ; B 360 477 466 580 ; C 200 ; WX 600 ; N dieresis ; B 262 492 570 595 ; C 202 ; WX 600 ; N ring ; B 332 463 500 627 ; C 203 ; WX 600 ; N cedilla ; B 197 -151 344 10 ; C 205 ; WX 600 ; N hungarumlaut ; B 239 497 683 672 ; C 206 ; WX 600 ; N ogonek ; B 207 -151 348 0 ; C 207 ; WX 600 ; N caron ; B 262 492 614 669 ; C 208 ; WX 600 ; N emdash ; B 49 231 661 285 ; C 225 ; WX 600 ; N AE ; B 3 0 655 562 ; C 227 ; WX 600 ; N ordfeminine ; B 209 249 512 580 ; C 232 ; WX 600 ; N Lslash ; B 47 0 607 562 ; C 233 ; WX 600 ; N Oslash ; B 94 -80 625 629 ; C 234 ; WX 600 ; N OE ; B 59 0 672 562 ; C 235 ; WX 600 ; N ordmasculine ; B 210 249 535 580 ; C 241 ; WX 600 ; N ae ; B 41 -15 626 441 ; C 245 ; WX 600 ; N dotlessi ; B 95 0 515 426 ; C 248 ; WX 600 ; N lslash ; B 95 0 583 629 ; C 249 ; WX 600 ; N oslash ; B 102 -80 588 506 ; C 250 ; WX 600 ; N oe ; B 54 -15 615 441 ; C 251 ; WX 600 ; N germandbls ; B 48 -15 617 629 ; C -1 ; WX 600 ; N Odieresis ; B 94 -18 625 731 ; C -1 ; WX 600 ; N logicalnot ; B 155 108 591 369 ; C -1 ; WX 600 ; N minus ; B 129 232 580 283 ; C -1 ; WX 600 ; N merge ; B 187 -15 503 436 ; C -1 ; WX 600 ; N degree ; B 214 269 576 622 ; C -1 ; WX 600 ; N dectab ; B 18 0 593 227 ; C -1 ; WX 600 ; N ll ; B 33 0 616 629 ; C -1 ; WX 600 ; N IJ ; B 32 -18 702 562 ; C -1 ; WX 600 ; N Eacute ; B 53 0 668 793 ; C -1 ; WX 600 ; N Ocircumflex ; B 94 -18 625 775 ; C -1 ; WX 600 ; N ucircumflex ; B 101 -15 572 654 ; C -1 ; WX 600 ; N left ; B 114 68 580 348 ; C -1 ; WX 600 ; N threesuperior ; B 213 240 501 622 ; C -1 ; WX 600 ; N up ; B 223 0 503 437 ; C -1 ; WX 600 ; N multiply ; B 103 43 607 470 ; C -1 ; WX 600 ; N Scaron ; B 76 -20 673 805 ; C -1 ; WX 600 ; N tab ; B 19 0 641 562 ; C -1 ; WX 600 ; N Ucircumflex ; B 125 -18 702 775 ; C -1 ; WX 600 ; N divide ; B 136 48 573 467 ; C -1 ; WX 600 ; N Acircumflex ; B 3 0 607 775 ; C -1 ; WX 600 ; N eacute ; B 106 -15 612 672 ; C -1 ; WX 600 ; N uacute ; B 101 -15 602 672 ; C -1 ; WX 600 ; N Aacute ; B 3 0 658 793 ; C -1 ; WX 600 ; N copyright ; B 53 -18 667 580 ; C -1 ; WX 600 ; N twosuperior ; B 230 249 535 622 ; C -1 ; WX 600 ; N Ecircumflex ; B 53 0 660 775 ; C -1 ; WX 600 ; N ntilde ; B 26 0 629 606 ; C -1 ; WX 600 ; N down ; B 187 -15 467 426 ; C -1 ; WX 600 ; N center ; B 103 14 623 580 ; C -1 ; WX 600 ; N onesuperior ; B 231 249 491 622 ; C -1 ; WX 600 ; N ij ; B 37 -157 630 657 ; C -1 ; WX 600 ; N edieresis ; B 106 -15 598 595 ; C -1 ; WX 600 ; N graybox ; B 76 0 652 599 ; C -1 ; WX 600 ; N odieresis ; B 102 -15 588 595 ; C -1 ; WX 600 ; N Ograve ; B 94 -18 625 793 ; C -1 ; WX 600 ; N threequarters ; B 73 -56 659 666 ; C -1 ; WX 600 ; N plusminus ; B 96 44 594 558 ; C -1 ; WX 600 ; N prescription ; B 27 -15 617 562 ; C -1 ; WX 600 ; N eth ; B 102 -15 639 629 ; C -1 ; WX 600 ; N largebullet ; B 315 220 395 297 ; C -1 ; WX 600 ; N egrave ; B 106 -15 598 672 ; C -1 ; WX 600 ; N ccedilla ; B 106 -151 614 441 ; C -1 ; WX 600 ; N notegraphic ; B 143 -15 564 572 ; C -1 ; WX 600 ; N Udieresis ; B 125 -18 702 731 ; C -1 ; WX 600 ; N Gcaron ; B 83 -18 645 805 ; C -1 ; WX 600 ; N arrowdown ; B 152 -15 520 608 ; C -1 ; WX 600 ; N format ; B -28 -157 185 607 ; C -1 ; WX 600 ; N Otilde ; B 94 -18 656 732 ; C -1 ; WX 600 ; N Idieresis ; B 96 0 623 731 ; C -1 ; WX 600 ; N adieresis ; B 76 -15 570 595 ; C -1 ; WX 600 ; N ecircumflex ; B 106 -15 598 654 ; C -1 ; WX 600 ; N Eth ; B 43 0 645 562 ; C -1 ; WX 600 ; N onequarter ; B 65 -57 674 665 ; C -1 ; WX 600 ; N LL ; B 8 0 647 562 ; C -1 ; WX 600 ; N agrave ; B 76 -15 569 672 ; C -1 ; WX 600 ; N Zcaron ; B 86 0 643 805 ; C -1 ; WX 600 ; N Scedilla ; B 76 -151 650 580 ; C -1 ; WX 600 ; N Idot ; B 96 0 623 716 ; C -1 ; WX 600 ; N Iacute ; B 96 0 638 793 ; C -1 ; WX 600 ; N indent ; B 108 68 574 348 ; C -1 ; WX 600 ; N Ugrave ; B 125 -18 702 793 ; C -1 ; WX 600 ; N scaron ; B 78 -15 614 669 ; C -1 ; WX 600 ; N overscore ; B 123 579 734 629 ; C -1 ; WX 600 ; N Aring ; B 3 0 607 753 ; C -1 ; WX 600 ; N Ccedilla ; B 93 -151 658 580 ; C -1 ; WX 600 ; N Igrave ; B 96 0 623 793 ; C -1 ; WX 600 ; N brokenbar ; B 238 -175 469 675 ; C -1 ; WX 600 ; N Oacute ; B 94 -18 638 793 ; C -1 ; WX 600 ; N otilde ; B 102 -15 629 606 ; C -1 ; WX 600 ; N Yacute ; B 133 0 695 793 ; C -1 ; WX 600 ; N lira ; B 118 -21 621 611 ; C -1 ; WX 600 ; N Icircumflex ; B 96 0 623 775 ; C -1 ; WX 600 ; N Atilde ; B 3 0 656 732 ; C -1 ; WX 600 ; N Uacute ; B 125 -18 702 793 ; C -1 ; WX 600 ; N Ydieresis ; B 133 0 695 731 ; C -1 ; WX 600 ; N ydieresis ; B -4 -157 683 595 ; C -1 ; WX 600 ; N idieresis ; B 95 0 540 595 ; C -1 ; WX 600 ; N Adieresis ; B 3 0 607 731 ; C -1 ; WX 600 ; N mu ; B 72 -157 572 426 ; C -1 ; WX 600 ; N trademark ; B 75 263 742 562 ; C -1 ; WX 600 ; N oacute ; B 102 -15 612 672 ; C -1 ; WX 600 ; N acircumflex ; B 76 -15 581 654 ; C -1 ; WX 600 ; N Agrave ; B 3 0 607 793 ; C -1 ; WX 600 ; N return ; B 79 0 700 562 ; C -1 ; WX 600 ; N atilde ; B 76 -15 629 606 ; C -1 ; WX 600 ; N square ; B 19 0 700 562 ; C -1 ; WX 600 ; N registered ; B 53 -18 667 580 ; C -1 ; WX 600 ; N stop ; B 19 0 700 562 ; C -1 ; WX 600 ; N udieresis ; B 101 -15 572 595 ; C -1 ; WX 600 ; N arrowup ; B 209 0 577 623 ; C -1 ; WX 600 ; N igrave ; B 95 0 515 672 ; C -1 ; WX 600 ; N Edieresis ; B 53 0 660 731 ; C -1 ; WX 600 ; N zcaron ; B 99 0 624 669 ; C -1 ; WX 600 ; N arrowboth ; B 36 115 692 483 ; C -1 ; WX 600 ; N gcaron ; B 61 -157 657 669 ; C -1 ; WX 600 ; N arrowleft ; B 40 115 693 483 ; C -1 ; WX 600 ; N aacute ; B 76 -15 612 672 ; C -1 ; WX 600 ; N ocircumflex ; B 102 -15 588 654 ; C -1 ; WX 600 ; N scedilla ; B 78 -151 584 441 ; C -1 ; WX 600 ; N ograve ; B 102 -15 588 672 ; C -1 ; WX 600 ; N onehalf ; B 65 -57 669 665 ; C -1 ; WX 600 ; N ugrave ; B 101 -15 572 672 ; C -1 ; WX 600 ; N Ntilde ; B 7 -13 712 732 ; C -1 ; WX 600 ; N iacute ; B 95 0 612 672 ; C -1 ; WX 600 ; N arrowright ; B 34 115 688 483 ; C -1 ; WX 600 ; N Thorn ; B 79 0 606 562 ; C -1 ; WX 600 ; N Egrave ; B 53 0 660 793 ; C -1 ; WX 600 ; N thorn ; B -24 -157 605 629 ; C -1 ; WX 600 ; N aring ; B 76 -15 569 627 ; C -1 ; WX 600 ; N yacute ; B -4 -157 683 672 ; C -1 ; WX 600 ; N icircumflex ; B 95 0 551 654 ; EndCharMetrics StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 46 121 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex -4 121 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis -1 136 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave -4 121 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 12 126 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 27 126 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 56 121 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 26 121 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 29 136 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 26 121 ; CC Gcaron 2 ; PCC G 0 0 ; PCC caron 29 136 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 26 121 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 26 121 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 29 136 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 26 121 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 27 126 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 26 121 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 26 121 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 29 136 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 26 121 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 27 126 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 59 136 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 56 121 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 26 121 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 29 136 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave -4 121 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 56 121 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 29 136 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 29 136 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 0 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 0 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 0 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 0 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 0 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 0 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 0 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 0 0 ; CC gcaron 2 ; PCC g 0 0 ; PCC caron -30 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -30 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -30 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -30 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 0 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 0 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 0 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 0 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 0 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 0 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 0 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute -10 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex -10 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 0 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave -30 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute -20 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis -10 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 10 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/phvb8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Thu Mar 15 09:43:00 1990 Comment UniqueID 28357 Comment VMusage 26878 33770 FontName Helvetica-Bold FullName Helvetica Bold FamilyName Helvetica Weight Bold ItalicAngle 0 IsFixedPitch false FontBBox -170 -228 1003 962 UnderlinePosition -100 UnderlineThickness 50 Version 001.007 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 718 XHeight 532 Ascender 718 Descender -207 StartCharMetrics 228 C 32 ; WX 278 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 90 0 244 718 ; C 34 ; WX 474 ; N quotedbl ; B 98 447 376 718 ; C 35 ; WX 556 ; N numbersign ; B 18 0 538 698 ; C 36 ; WX 556 ; N dollar ; B 30 -115 523 775 ; C 37 ; WX 889 ; N percent ; B 28 -19 861 710 ; C 38 ; WX 722 ; N ampersand ; B 54 -19 701 718 ; C 39 ; WX 278 ; N quoteright ; B 69 445 209 718 ; C 40 ; WX 333 ; N parenleft ; B 35 -208 314 734 ; C 41 ; WX 333 ; N parenright ; B 19 -208 298 734 ; C 42 ; WX 389 ; N asterisk ; B 27 387 362 718 ; C 43 ; WX 584 ; N plus ; B 40 0 544 506 ; C 44 ; WX 278 ; N comma ; B 64 -168 214 146 ; C 45 ; WX 333 ; N hyphen ; B 27 215 306 345 ; C 46 ; WX 278 ; N period ; B 64 0 214 146 ; C 47 ; WX 278 ; N slash ; B -33 -19 311 737 ; C 48 ; WX 556 ; N zero ; B 32 -19 524 710 ; C 49 ; WX 556 ; N one ; B 69 0 378 710 ; C 50 ; WX 556 ; N two ; B 26 0 511 710 ; C 51 ; WX 556 ; N three ; B 27 -19 516 710 ; C 52 ; WX 556 ; N four ; B 27 0 526 710 ; C 53 ; WX 556 ; N five ; B 27 -19 516 698 ; C 54 ; WX 556 ; N six ; B 31 -19 520 710 ; C 55 ; WX 556 ; N seven ; B 25 0 528 698 ; C 56 ; WX 556 ; N eight ; B 32 -19 524 710 ; C 57 ; WX 556 ; N nine ; B 30 -19 522 710 ; C 58 ; WX 333 ; N colon ; B 92 0 242 512 ; C 59 ; WX 333 ; N semicolon ; B 92 -168 242 512 ; C 60 ; WX 584 ; N less ; B 38 -8 546 514 ; C 61 ; WX 584 ; N equal ; B 40 87 544 419 ; C 62 ; WX 584 ; N greater ; B 38 -8 546 514 ; C 63 ; WX 611 ; N question ; B 60 0 556 727 ; C 64 ; WX 975 ; N at ; B 118 -19 856 737 ; C 65 ; WX 722 ; N A ; B 20 0 702 718 ; C 66 ; WX 722 ; N B ; B 76 0 669 718 ; C 67 ; WX 722 ; N C ; B 44 -19 684 737 ; C 68 ; WX 722 ; N D ; B 76 0 685 718 ; C 69 ; WX 667 ; N E ; B 76 0 621 718 ; C 70 ; WX 611 ; N F ; B 76 0 587 718 ; C 71 ; WX 778 ; N G ; B 44 -19 713 737 ; C 72 ; WX 722 ; N H ; B 71 0 651 718 ; C 73 ; WX 278 ; N I ; B 64 0 214 718 ; C 74 ; WX 556 ; N J ; B 22 -18 484 718 ; C 75 ; WX 722 ; N K ; B 87 0 722 718 ; C 76 ; WX 611 ; N L ; B 76 0 583 718 ; C 77 ; WX 833 ; N M ; B 69 0 765 718 ; C 78 ; WX 722 ; N N ; B 69 0 654 718 ; C 79 ; WX 778 ; N O ; B 44 -19 734 737 ; C 80 ; WX 667 ; N P ; B 76 0 627 718 ; C 81 ; WX 778 ; N Q ; B 44 -52 737 737 ; C 82 ; WX 722 ; N R ; B 76 0 677 718 ; C 83 ; WX 667 ; N S ; B 39 -19 629 737 ; C 84 ; WX 611 ; N T ; B 14 0 598 718 ; C 85 ; WX 722 ; N U ; B 72 -19 651 718 ; C 86 ; WX 667 ; N V ; B 19 0 648 718 ; C 87 ; WX 944 ; N W ; B 16 0 929 718 ; C 88 ; WX 667 ; N X ; B 14 0 653 718 ; C 89 ; WX 667 ; N Y ; B 15 0 653 718 ; C 90 ; WX 611 ; N Z ; B 25 0 586 718 ; C 91 ; WX 333 ; N bracketleft ; B 63 -196 309 722 ; C 92 ; WX 278 ; N backslash ; B -33 -19 311 737 ; C 93 ; WX 333 ; N bracketright ; B 24 -196 270 722 ; C 94 ; WX 584 ; N asciicircum ; B 62 323 522 698 ; C 95 ; WX 556 ; N underscore ; B 0 -125 556 -75 ; C 96 ; WX 278 ; N quoteleft ; B 69 454 209 727 ; C 97 ; WX 556 ; N a ; B 29 -14 527 546 ; C 98 ; WX 611 ; N b ; B 61 -14 578 718 ; C 99 ; WX 556 ; N c ; B 34 -14 524 546 ; C 100 ; WX 611 ; N d ; B 34 -14 551 718 ; C 101 ; WX 556 ; N e ; B 23 -14 528 546 ; C 102 ; WX 333 ; N f ; B 10 0 318 727 ; L i fi ; L l fl ; C 103 ; WX 611 ; N g ; B 40 -217 553 546 ; C 104 ; WX 611 ; N h ; B 65 0 546 718 ; C 105 ; WX 278 ; N i ; B 69 0 209 725 ; C 106 ; WX 278 ; N j ; B 3 -214 209 725 ; C 107 ; WX 556 ; N k ; B 69 0 562 718 ; C 108 ; WX 278 ; N l ; B 69 0 209 718 ; C 109 ; WX 889 ; N m ; B 64 0 826 546 ; C 110 ; WX 611 ; N n ; B 65 0 546 546 ; C 111 ; WX 611 ; N o ; B 34 -14 578 546 ; C 112 ; WX 611 ; N p ; B 62 -207 578 546 ; C 113 ; WX 611 ; N q ; B 34 -207 552 546 ; C 114 ; WX 389 ; N r ; B 64 0 373 546 ; C 115 ; WX 556 ; N s ; B 30 -14 519 546 ; C 116 ; WX 333 ; N t ; B 10 -6 309 676 ; C 117 ; WX 611 ; N u ; B 66 -14 545 532 ; C 118 ; WX 556 ; N v ; B 13 0 543 532 ; C 119 ; WX 778 ; N w ; B 10 0 769 532 ; C 120 ; WX 556 ; N x ; B 15 0 541 532 ; C 121 ; WX 556 ; N y ; B 10 -214 539 532 ; C 122 ; WX 500 ; N z ; B 20 0 480 532 ; C 123 ; WX 389 ; N braceleft ; B 48 -196 365 722 ; C 124 ; WX 280 ; N bar ; B 84 -19 196 737 ; C 125 ; WX 389 ; N braceright ; B 24 -196 341 722 ; C 126 ; WX 584 ; N asciitilde ; B 61 163 523 343 ; C 161 ; WX 333 ; N exclamdown ; B 90 -186 244 532 ; C 162 ; WX 556 ; N cent ; B 34 -118 524 628 ; C 163 ; WX 556 ; N sterling ; B 28 -16 541 718 ; C 164 ; WX 167 ; N fraction ; B -170 -19 336 710 ; C 165 ; WX 556 ; N yen ; B -9 0 565 698 ; C 166 ; WX 556 ; N florin ; B -10 -210 516 737 ; C 167 ; WX 556 ; N section ; B 34 -184 522 727 ; C 168 ; WX 556 ; N currency ; B -3 76 559 636 ; C 169 ; WX 238 ; N quotesingle ; B 70 447 168 718 ; C 170 ; WX 500 ; N quotedblleft ; B 64 454 436 727 ; C 171 ; WX 556 ; N guillemotleft ; B 88 76 468 484 ; C 172 ; WX 333 ; N guilsinglleft ; B 83 76 250 484 ; C 173 ; WX 333 ; N guilsinglright ; B 83 76 250 484 ; C 174 ; WX 611 ; N fi ; B 10 0 542 727 ; C 175 ; WX 611 ; N fl ; B 10 0 542 727 ; C 177 ; WX 556 ; N endash ; B 0 227 556 333 ; C 178 ; WX 556 ; N dagger ; B 36 -171 520 718 ; C 179 ; WX 556 ; N daggerdbl ; B 36 -171 520 718 ; C 180 ; WX 278 ; N periodcentered ; B 58 172 220 334 ; C 182 ; WX 556 ; N paragraph ; B -8 -191 539 700 ; C 183 ; WX 350 ; N bullet ; B 10 194 340 524 ; C 184 ; WX 278 ; N quotesinglbase ; B 69 -146 209 127 ; C 185 ; WX 500 ; N quotedblbase ; B 64 -146 436 127 ; C 186 ; WX 500 ; N quotedblright ; B 64 445 436 718 ; C 187 ; WX 556 ; N guillemotright ; B 88 76 468 484 ; C 188 ; WX 1000 ; N ellipsis ; B 92 0 908 146 ; C 189 ; WX 1000 ; N perthousand ; B -3 -19 1003 710 ; C 191 ; WX 611 ; N questiondown ; B 55 -195 551 532 ; C 193 ; WX 333 ; N grave ; B -23 604 225 750 ; C 194 ; WX 333 ; N acute ; B 108 604 356 750 ; C 195 ; WX 333 ; N circumflex ; B -10 604 343 750 ; C 196 ; WX 333 ; N tilde ; B -17 610 350 737 ; C 197 ; WX 333 ; N macron ; B -6 604 339 678 ; C 198 ; WX 333 ; N breve ; B -2 604 335 750 ; C 199 ; WX 333 ; N dotaccent ; B 104 614 230 729 ; C 200 ; WX 333 ; N dieresis ; B 6 614 327 729 ; C 202 ; WX 333 ; N ring ; B 59 568 275 776 ; C 203 ; WX 333 ; N cedilla ; B 6 -228 245 0 ; C 205 ; WX 333 ; N hungarumlaut ; B 9 604 486 750 ; C 206 ; WX 333 ; N ogonek ; B 71 -228 304 0 ; C 207 ; WX 333 ; N caron ; B -10 604 343 750 ; C 208 ; WX 1000 ; N emdash ; B 0 227 1000 333 ; C 225 ; WX 1000 ; N AE ; B 5 0 954 718 ; C 227 ; WX 370 ; N ordfeminine ; B 22 276 347 737 ; C 232 ; WX 611 ; N Lslash ; B -20 0 583 718 ; C 233 ; WX 778 ; N Oslash ; B 33 -27 744 745 ; C 234 ; WX 1000 ; N OE ; B 37 -19 961 737 ; C 235 ; WX 365 ; N ordmasculine ; B 6 276 360 737 ; C 241 ; WX 889 ; N ae ; B 29 -14 858 546 ; C 245 ; WX 278 ; N dotlessi ; B 69 0 209 532 ; C 248 ; WX 278 ; N lslash ; B -18 0 296 718 ; C 249 ; WX 611 ; N oslash ; B 22 -29 589 560 ; C 250 ; WX 944 ; N oe ; B 34 -14 912 546 ; C 251 ; WX 611 ; N germandbls ; B 69 -14 579 731 ; C -1 ; WX 611 ; N Zcaron ; B 25 0 586 936 ; C -1 ; WX 556 ; N ccedilla ; B 34 -228 524 546 ; C -1 ; WX 556 ; N ydieresis ; B 10 -214 539 729 ; C -1 ; WX 556 ; N atilde ; B 29 -14 527 737 ; C -1 ; WX 278 ; N icircumflex ; B -37 0 316 750 ; C -1 ; WX 333 ; N threesuperior ; B 8 271 326 710 ; C -1 ; WX 556 ; N ecircumflex ; B 23 -14 528 750 ; C -1 ; WX 611 ; N thorn ; B 62 -208 578 718 ; C -1 ; WX 556 ; N egrave ; B 23 -14 528 750 ; C -1 ; WX 333 ; N twosuperior ; B 9 283 324 710 ; C -1 ; WX 556 ; N eacute ; B 23 -14 528 750 ; C -1 ; WX 611 ; N otilde ; B 34 -14 578 737 ; C -1 ; WX 722 ; N Aacute ; B 20 0 702 936 ; C -1 ; WX 611 ; N ocircumflex ; B 34 -14 578 750 ; C -1 ; WX 556 ; N yacute ; B 10 -214 539 750 ; C -1 ; WX 611 ; N udieresis ; B 66 -14 545 729 ; C -1 ; WX 834 ; N threequarters ; B 16 -19 799 710 ; C -1 ; WX 556 ; N acircumflex ; B 29 -14 527 750 ; C -1 ; WX 722 ; N Eth ; B -5 0 685 718 ; C -1 ; WX 556 ; N edieresis ; B 23 -14 528 729 ; C -1 ; WX 611 ; N ugrave ; B 66 -14 545 750 ; C -1 ; WX 1000 ; N trademark ; B 44 306 956 718 ; C -1 ; WX 611 ; N ograve ; B 34 -14 578 750 ; C -1 ; WX 556 ; N scaron ; B 30 -14 519 750 ; C -1 ; WX 278 ; N Idieresis ; B -21 0 300 915 ; C -1 ; WX 611 ; N uacute ; B 66 -14 545 750 ; C -1 ; WX 556 ; N agrave ; B 29 -14 527 750 ; C -1 ; WX 611 ; N ntilde ; B 65 0 546 737 ; C -1 ; WX 556 ; N aring ; B 29 -14 527 776 ; C -1 ; WX 500 ; N zcaron ; B 20 0 480 750 ; C -1 ; WX 278 ; N Icircumflex ; B -37 0 316 936 ; C -1 ; WX 722 ; N Ntilde ; B 69 0 654 923 ; C -1 ; WX 611 ; N ucircumflex ; B 66 -14 545 750 ; C -1 ; WX 667 ; N Ecircumflex ; B 76 0 621 936 ; C -1 ; WX 278 ; N Iacute ; B 64 0 329 936 ; C -1 ; WX 722 ; N Ccedilla ; B 44 -228 684 737 ; C -1 ; WX 778 ; N Odieresis ; B 44 -19 734 915 ; C -1 ; WX 667 ; N Scaron ; B 39 -19 629 936 ; C -1 ; WX 667 ; N Edieresis ; B 76 0 621 915 ; C -1 ; WX 278 ; N Igrave ; B -50 0 214 936 ; C -1 ; WX 556 ; N adieresis ; B 29 -14 527 729 ; C -1 ; WX 778 ; N Ograve ; B 44 -19 734 936 ; C -1 ; WX 667 ; N Egrave ; B 76 0 621 936 ; C -1 ; WX 667 ; N Ydieresis ; B 15 0 653 915 ; C -1 ; WX 737 ; N registered ; B -11 -19 748 737 ; C -1 ; WX 778 ; N Otilde ; B 44 -19 734 923 ; C -1 ; WX 834 ; N onequarter ; B 26 -19 766 710 ; C -1 ; WX 722 ; N Ugrave ; B 72 -19 651 936 ; C -1 ; WX 722 ; N Ucircumflex ; B 72 -19 651 936 ; C -1 ; WX 667 ; N Thorn ; B 76 0 627 718 ; C -1 ; WX 584 ; N divide ; B 40 -42 544 548 ; C -1 ; WX 722 ; N Atilde ; B 20 0 702 923 ; C -1 ; WX 722 ; N Uacute ; B 72 -19 651 936 ; C -1 ; WX 778 ; N Ocircumflex ; B 44 -19 734 936 ; C -1 ; WX 584 ; N logicalnot ; B 40 108 544 419 ; C -1 ; WX 722 ; N Aring ; B 20 0 702 962 ; C -1 ; WX 278 ; N idieresis ; B -21 0 300 729 ; C -1 ; WX 278 ; N iacute ; B 69 0 329 750 ; C -1 ; WX 556 ; N aacute ; B 29 -14 527 750 ; C -1 ; WX 584 ; N plusminus ; B 40 0 544 506 ; C -1 ; WX 584 ; N multiply ; B 40 1 545 505 ; C -1 ; WX 722 ; N Udieresis ; B 72 -19 651 915 ; C -1 ; WX 584 ; N minus ; B 40 197 544 309 ; C -1 ; WX 333 ; N onesuperior ; B 26 283 237 710 ; C -1 ; WX 667 ; N Eacute ; B 76 0 621 936 ; C -1 ; WX 722 ; N Acircumflex ; B 20 0 702 936 ; C -1 ; WX 737 ; N copyright ; B -11 -19 749 737 ; C -1 ; WX 722 ; N Agrave ; B 20 0 702 936 ; C -1 ; WX 611 ; N odieresis ; B 34 -14 578 729 ; C -1 ; WX 611 ; N oacute ; B 34 -14 578 750 ; C -1 ; WX 400 ; N degree ; B 57 426 343 712 ; C -1 ; WX 278 ; N igrave ; B -50 0 209 750 ; C -1 ; WX 611 ; N mu ; B 66 -207 545 532 ; C -1 ; WX 778 ; N Oacute ; B 44 -19 734 936 ; C -1 ; WX 611 ; N eth ; B 34 -14 578 737 ; C -1 ; WX 722 ; N Adieresis ; B 20 0 702 915 ; C -1 ; WX 667 ; N Yacute ; B 15 0 653 936 ; C -1 ; WX 280 ; N brokenbar ; B 84 -19 196 737 ; C -1 ; WX 834 ; N onehalf ; B 26 -19 794 710 ; EndCharMetrics StartKernData StartKernPairs 209 KPX A y -30 KPX A w -30 KPX A v -40 KPX A u -30 KPX A Y -110 KPX A W -60 KPX A V -80 KPX A U -50 KPX A T -90 KPX A Q -40 KPX A O -40 KPX A G -50 KPX A C -40 KPX B U -10 KPX B A -30 KPX D period -30 KPX D comma -30 KPX D Y -70 KPX D W -40 KPX D V -40 KPX D A -40 KPX F period -100 KPX F comma -100 KPX F a -20 KPX F A -80 KPX J u -20 KPX J period -20 KPX J comma -20 KPX J A -20 KPX K y -40 KPX K u -30 KPX K o -35 KPX K e -15 KPX K O -30 KPX L y -30 KPX L quoteright -140 KPX L quotedblright -140 KPX L Y -120 KPX L W -80 KPX L V -110 KPX L T -90 KPX O period -40 KPX O comma -40 KPX O Y -70 KPX O X -50 KPX O W -50 KPX O V -50 KPX O T -40 KPX O A -50 KPX P period -120 KPX P o -40 KPX P e -30 KPX P comma -120 KPX P a -30 KPX P A -100 KPX Q period 20 KPX Q comma 20 KPX Q U -10 KPX R Y -50 KPX R W -40 KPX R V -50 KPX R U -20 KPX R T -20 KPX R O -20 KPX T y -60 KPX T w -60 KPX T u -90 KPX T semicolon -40 KPX T r -80 KPX T period -80 KPX T o -80 KPX T hyphen -120 KPX T e -60 KPX T comma -80 KPX T colon -40 KPX T a -80 KPX T O -40 KPX T A -90 KPX U period -30 KPX U comma -30 KPX U A -50 KPX V u -60 KPX V semicolon -40 KPX V period -120 KPX V o -90 KPX V hyphen -80 KPX V e -50 KPX V comma -120 KPX V colon -40 KPX V a -60 KPX V O -50 KPX V G -50 KPX V A -80 KPX W y -20 KPX W u -45 KPX W semicolon -10 KPX W period -80 KPX W o -60 KPX W hyphen -40 KPX W e -35 KPX W comma -80 KPX W colon -10 KPX W a -40 KPX W O -20 KPX W A -60 KPX Y u -100 KPX Y semicolon -50 KPX Y period -100 KPX Y o -100 KPX Y e -80 KPX Y comma -100 KPX Y colon -50 KPX Y a -90 KPX Y O -70 KPX Y A -110 KPX a y -20 KPX a w -15 KPX a v -15 KPX a g -10 KPX b y -20 KPX b v -20 KPX b u -20 KPX b l -10 KPX c y -10 KPX c l -20 KPX c k -20 KPX c h -10 KPX colon space -40 KPX comma space -40 KPX comma quoteright -120 KPX comma quotedblright -120 KPX d y -15 KPX d w -15 KPX d v -15 KPX d d -10 KPX e y -15 KPX e x -15 KPX e w -15 KPX e v -15 KPX e period 20 KPX e comma 10 KPX f quoteright 30 KPX f quotedblright 30 KPX f period -10 KPX f o -20 KPX f e -10 KPX f comma -10 KPX g g -10 KPX g e 10 KPX h y -20 KPX k o -15 KPX l y -15 KPX l w -15 KPX m y -30 KPX m u -20 KPX n y -20 KPX n v -40 KPX n u -10 KPX o y -20 KPX o x -30 KPX o w -15 KPX o v -20 KPX p y -15 KPX period space -40 KPX period quoteright -120 KPX period quotedblright -120 KPX quotedblright space -80 KPX quoteleft quoteleft -46 KPX quoteright v -20 KPX quoteright space -80 KPX quoteright s -60 KPX quoteright r -40 KPX quoteright quoteright -46 KPX quoteright l -20 KPX quoteright d -80 KPX r y 10 KPX r v 10 KPX r t 20 KPX r s -15 KPX r q -20 KPX r period -60 KPX r o -20 KPX r hyphen -20 KPX r g -15 KPX r d -20 KPX r comma -60 KPX r c -20 KPX s w -15 KPX semicolon space -40 KPX space quoteleft -60 KPX space quotedblleft -80 KPX space Y -120 KPX space W -80 KPX space V -80 KPX space T -100 KPX v period -80 KPX v o -30 KPX v comma -80 KPX v a -20 KPX w period -40 KPX w o -20 KPX w comma -40 KPX x e -10 KPX y period -80 KPX y o -25 KPX y e -10 KPX y comma -80 KPX y a -30 KPX z e 10 EndKernPairs EndKernData StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 195 186 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 195 186 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 195 186 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 195 186 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 195 186 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 195 186 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 215 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 167 186 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 167 186 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 167 186 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 167 186 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute -27 186 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -27 186 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -27 186 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave -27 186 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 195 186 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 223 186 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 223 186 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 223 186 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 223 186 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 223 186 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 167 186 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 195 186 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 195 186 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 195 186 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 195 186 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 167 186 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 167 186 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 186 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 112 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 112 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 112 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 112 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 112 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 112 0 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 132 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 112 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 112 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 112 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 112 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 139 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 139 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 139 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 139 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 139 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 139 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 112 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 139 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 139 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 139 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 139 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 112 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 112 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 84 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/phvb8an.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Thu Mar 15 11:47:27 1990 Comment UniqueID 28398 Comment VMusage 7614 43068 FontName Helvetica-Narrow-Bold FullName Helvetica Narrow Bold FamilyName Helvetica Weight Bold ItalicAngle 0 IsFixedPitch false FontBBox -139 -228 822 962 UnderlinePosition -100 UnderlineThickness 50 Version 001.007 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 718 XHeight 532 Ascender 718 Descender -207 StartCharMetrics 228 C 32 ; WX 228 ; N space ; B 0 0 0 0 ; C 33 ; WX 273 ; N exclam ; B 74 0 200 718 ; C 34 ; WX 389 ; N quotedbl ; B 80 447 308 718 ; C 35 ; WX 456 ; N numbersign ; B 15 0 441 698 ; C 36 ; WX 456 ; N dollar ; B 25 -115 429 775 ; C 37 ; WX 729 ; N percent ; B 23 -19 706 710 ; C 38 ; WX 592 ; N ampersand ; B 44 -19 575 718 ; C 39 ; WX 228 ; N quoteright ; B 57 445 171 718 ; C 40 ; WX 273 ; N parenleft ; B 29 -208 257 734 ; C 41 ; WX 273 ; N parenright ; B 16 -208 244 734 ; C 42 ; WX 319 ; N asterisk ; B 22 387 297 718 ; C 43 ; WX 479 ; N plus ; B 33 0 446 506 ; C 44 ; WX 228 ; N comma ; B 52 -168 175 146 ; C 45 ; WX 273 ; N hyphen ; B 22 215 251 345 ; C 46 ; WX 228 ; N period ; B 52 0 175 146 ; C 47 ; WX 228 ; N slash ; B -27 -19 255 737 ; C 48 ; WX 456 ; N zero ; B 26 -19 430 710 ; C 49 ; WX 456 ; N one ; B 57 0 310 710 ; C 50 ; WX 456 ; N two ; B 21 0 419 710 ; C 51 ; WX 456 ; N three ; B 22 -19 423 710 ; C 52 ; WX 456 ; N four ; B 22 0 431 710 ; C 53 ; WX 456 ; N five ; B 22 -19 423 698 ; C 54 ; WX 456 ; N six ; B 25 -19 426 710 ; C 55 ; WX 456 ; N seven ; B 20 0 433 698 ; C 56 ; WX 456 ; N eight ; B 26 -19 430 710 ; C 57 ; WX 456 ; N nine ; B 25 -19 428 710 ; C 58 ; WX 273 ; N colon ; B 75 0 198 512 ; C 59 ; WX 273 ; N semicolon ; B 75 -168 198 512 ; C 60 ; WX 479 ; N less ; B 31 -8 448 514 ; C 61 ; WX 479 ; N equal ; B 33 87 446 419 ; C 62 ; WX 479 ; N greater ; B 31 -8 448 514 ; C 63 ; WX 501 ; N question ; B 49 0 456 727 ; C 64 ; WX 800 ; N at ; B 97 -19 702 737 ; C 65 ; WX 592 ; N A ; B 16 0 576 718 ; C 66 ; WX 592 ; N B ; B 62 0 549 718 ; C 67 ; WX 592 ; N C ; B 36 -19 561 737 ; C 68 ; WX 592 ; N D ; B 62 0 562 718 ; C 69 ; WX 547 ; N E ; B 62 0 509 718 ; C 70 ; WX 501 ; N F ; B 62 0 481 718 ; C 71 ; WX 638 ; N G ; B 36 -19 585 737 ; C 72 ; WX 592 ; N H ; B 58 0 534 718 ; C 73 ; WX 228 ; N I ; B 52 0 175 718 ; C 74 ; WX 456 ; N J ; B 18 -18 397 718 ; C 75 ; WX 592 ; N K ; B 71 0 592 718 ; C 76 ; WX 501 ; N L ; B 62 0 478 718 ; C 77 ; WX 683 ; N M ; B 57 0 627 718 ; C 78 ; WX 592 ; N N ; B 57 0 536 718 ; C 79 ; WX 638 ; N O ; B 36 -19 602 737 ; C 80 ; WX 547 ; N P ; B 62 0 514 718 ; C 81 ; WX 638 ; N Q ; B 36 -52 604 737 ; C 82 ; WX 592 ; N R ; B 62 0 555 718 ; C 83 ; WX 547 ; N S ; B 32 -19 516 737 ; C 84 ; WX 501 ; N T ; B 11 0 490 718 ; C 85 ; WX 592 ; N U ; B 59 -19 534 718 ; C 86 ; WX 547 ; N V ; B 16 0 531 718 ; C 87 ; WX 774 ; N W ; B 13 0 762 718 ; C 88 ; WX 547 ; N X ; B 11 0 535 718 ; C 89 ; WX 547 ; N Y ; B 12 0 535 718 ; C 90 ; WX 501 ; N Z ; B 20 0 481 718 ; C 91 ; WX 273 ; N bracketleft ; B 52 -196 253 722 ; C 92 ; WX 228 ; N backslash ; B -27 -19 255 737 ; C 93 ; WX 273 ; N bracketright ; B 20 -196 221 722 ; C 94 ; WX 479 ; N asciicircum ; B 51 323 428 698 ; C 95 ; WX 456 ; N underscore ; B 0 -125 456 -75 ; C 96 ; WX 228 ; N quoteleft ; B 57 454 171 727 ; C 97 ; WX 456 ; N a ; B 24 -14 432 546 ; C 98 ; WX 501 ; N b ; B 50 -14 474 718 ; C 99 ; WX 456 ; N c ; B 28 -14 430 546 ; C 100 ; WX 501 ; N d ; B 28 -14 452 718 ; C 101 ; WX 456 ; N e ; B 19 -14 433 546 ; C 102 ; WX 273 ; N f ; B 8 0 261 727 ; L i fi ; L l fl ; C 103 ; WX 501 ; N g ; B 33 -217 453 546 ; C 104 ; WX 501 ; N h ; B 53 0 448 718 ; C 105 ; WX 228 ; N i ; B 57 0 171 725 ; C 106 ; WX 228 ; N j ; B 2 -214 171 725 ; C 107 ; WX 456 ; N k ; B 57 0 461 718 ; C 108 ; WX 228 ; N l ; B 57 0 171 718 ; C 109 ; WX 729 ; N m ; B 52 0 677 546 ; C 110 ; WX 501 ; N n ; B 53 0 448 546 ; C 111 ; WX 501 ; N o ; B 28 -14 474 546 ; C 112 ; WX 501 ; N p ; B 51 -207 474 546 ; C 113 ; WX 501 ; N q ; B 28 -207 453 546 ; C 114 ; WX 319 ; N r ; B 52 0 306 546 ; C 115 ; WX 456 ; N s ; B 25 -14 426 546 ; C 116 ; WX 273 ; N t ; B 8 -6 253 676 ; C 117 ; WX 501 ; N u ; B 54 -14 447 532 ; C 118 ; WX 456 ; N v ; B 11 0 445 532 ; C 119 ; WX 638 ; N w ; B 8 0 631 532 ; C 120 ; WX 456 ; N x ; B 12 0 444 532 ; C 121 ; WX 456 ; N y ; B 8 -214 442 532 ; C 122 ; WX 410 ; N z ; B 16 0 394 532 ; C 123 ; WX 319 ; N braceleft ; B 39 -196 299 722 ; C 124 ; WX 230 ; N bar ; B 69 -19 161 737 ; C 125 ; WX 319 ; N braceright ; B 20 -196 280 722 ; C 126 ; WX 479 ; N asciitilde ; B 50 163 429 343 ; C 161 ; WX 273 ; N exclamdown ; B 74 -186 200 532 ; C 162 ; WX 456 ; N cent ; B 28 -118 430 628 ; C 163 ; WX 456 ; N sterling ; B 23 -16 444 718 ; C 164 ; WX 137 ; N fraction ; B -139 -19 276 710 ; C 165 ; WX 456 ; N yen ; B -7 0 463 698 ; C 166 ; WX 456 ; N florin ; B -8 -210 423 737 ; C 167 ; WX 456 ; N section ; B 28 -184 428 727 ; C 168 ; WX 456 ; N currency ; B -2 76 458 636 ; C 169 ; WX 195 ; N quotesingle ; B 57 447 138 718 ; C 170 ; WX 410 ; N quotedblleft ; B 52 454 358 727 ; C 171 ; WX 456 ; N guillemotleft ; B 72 76 384 484 ; C 172 ; WX 273 ; N guilsinglleft ; B 68 76 205 484 ; C 173 ; WX 273 ; N guilsinglright ; B 68 76 205 484 ; C 174 ; WX 501 ; N fi ; B 8 0 444 727 ; C 175 ; WX 501 ; N fl ; B 8 0 444 727 ; C 177 ; WX 456 ; N endash ; B 0 227 456 333 ; C 178 ; WX 456 ; N dagger ; B 30 -171 426 718 ; C 179 ; WX 456 ; N daggerdbl ; B 30 -171 426 718 ; C 180 ; WX 228 ; N periodcentered ; B 48 172 180 334 ; C 182 ; WX 456 ; N paragraph ; B -7 -191 442 700 ; C 183 ; WX 287 ; N bullet ; B 8 194 279 524 ; C 184 ; WX 228 ; N quotesinglbase ; B 57 -146 171 127 ; C 185 ; WX 410 ; N quotedblbase ; B 52 -146 358 127 ; C 186 ; WX 410 ; N quotedblright ; B 52 445 358 718 ; C 187 ; WX 456 ; N guillemotright ; B 72 76 384 484 ; C 188 ; WX 820 ; N ellipsis ; B 75 0 745 146 ; C 189 ; WX 820 ; N perthousand ; B -2 -19 822 710 ; C 191 ; WX 501 ; N questiondown ; B 45 -195 452 532 ; C 193 ; WX 273 ; N grave ; B -19 604 184 750 ; C 194 ; WX 273 ; N acute ; B 89 604 292 750 ; C 195 ; WX 273 ; N circumflex ; B -8 604 281 750 ; C 196 ; WX 273 ; N tilde ; B -14 610 287 737 ; C 197 ; WX 273 ; N macron ; B -5 604 278 678 ; C 198 ; WX 273 ; N breve ; B -2 604 275 750 ; C 199 ; WX 273 ; N dotaccent ; B 85 614 189 729 ; C 200 ; WX 273 ; N dieresis ; B 5 614 268 729 ; C 202 ; WX 273 ; N ring ; B 48 568 225 776 ; C 203 ; WX 273 ; N cedilla ; B 5 -228 201 0 ; C 205 ; WX 273 ; N hungarumlaut ; B 7 604 399 750 ; C 206 ; WX 273 ; N ogonek ; B 58 -228 249 0 ; C 207 ; WX 273 ; N caron ; B -8 604 281 750 ; C 208 ; WX 820 ; N emdash ; B 0 227 820 333 ; C 225 ; WX 820 ; N AE ; B 4 0 782 718 ; C 227 ; WX 303 ; N ordfeminine ; B 18 276 285 737 ; C 232 ; WX 501 ; N Lslash ; B -16 0 478 718 ; C 233 ; WX 638 ; N Oslash ; B 27 -27 610 745 ; C 234 ; WX 820 ; N OE ; B 30 -19 788 737 ; C 235 ; WX 299 ; N ordmasculine ; B 5 276 295 737 ; C 241 ; WX 729 ; N ae ; B 24 -14 704 546 ; C 245 ; WX 228 ; N dotlessi ; B 57 0 171 532 ; C 248 ; WX 228 ; N lslash ; B -15 0 243 718 ; C 249 ; WX 501 ; N oslash ; B 18 -29 483 560 ; C 250 ; WX 774 ; N oe ; B 28 -14 748 546 ; C 251 ; WX 501 ; N germandbls ; B 57 -14 475 731 ; C -1 ; WX 501 ; N Zcaron ; B 20 0 481 936 ; C -1 ; WX 456 ; N ccedilla ; B 28 -228 430 546 ; C -1 ; WX 456 ; N ydieresis ; B 8 -214 442 729 ; C -1 ; WX 456 ; N atilde ; B 24 -14 432 737 ; C -1 ; WX 228 ; N icircumflex ; B -30 0 259 750 ; C -1 ; WX 273 ; N threesuperior ; B 7 271 267 710 ; C -1 ; WX 456 ; N ecircumflex ; B 19 -14 433 750 ; C -1 ; WX 501 ; N thorn ; B 51 -208 474 718 ; C -1 ; WX 456 ; N egrave ; B 19 -14 433 750 ; C -1 ; WX 273 ; N twosuperior ; B 7 283 266 710 ; C -1 ; WX 456 ; N eacute ; B 19 -14 433 750 ; C -1 ; WX 501 ; N otilde ; B 28 -14 474 737 ; C -1 ; WX 592 ; N Aacute ; B 16 0 576 936 ; C -1 ; WX 501 ; N ocircumflex ; B 28 -14 474 750 ; C -1 ; WX 456 ; N yacute ; B 8 -214 442 750 ; C -1 ; WX 501 ; N udieresis ; B 54 -14 447 729 ; C -1 ; WX 684 ; N threequarters ; B 13 -19 655 710 ; C -1 ; WX 456 ; N acircumflex ; B 24 -14 432 750 ; C -1 ; WX 592 ; N Eth ; B -4 0 562 718 ; C -1 ; WX 456 ; N edieresis ; B 19 -14 433 729 ; C -1 ; WX 501 ; N ugrave ; B 54 -14 447 750 ; C -1 ; WX 820 ; N trademark ; B 36 306 784 718 ; C -1 ; WX 501 ; N ograve ; B 28 -14 474 750 ; C -1 ; WX 456 ; N scaron ; B 25 -14 426 750 ; C -1 ; WX 228 ; N Idieresis ; B -17 0 246 915 ; C -1 ; WX 501 ; N uacute ; B 54 -14 447 750 ; C -1 ; WX 456 ; N agrave ; B 24 -14 432 750 ; C -1 ; WX 501 ; N ntilde ; B 53 0 448 737 ; C -1 ; WX 456 ; N aring ; B 24 -14 432 776 ; C -1 ; WX 410 ; N zcaron ; B 16 0 394 750 ; C -1 ; WX 228 ; N Icircumflex ; B -30 0 259 936 ; C -1 ; WX 592 ; N Ntilde ; B 57 0 536 923 ; C -1 ; WX 501 ; N ucircumflex ; B 54 -14 447 750 ; C -1 ; WX 547 ; N Ecircumflex ; B 62 0 509 936 ; C -1 ; WX 228 ; N Iacute ; B 52 0 270 936 ; C -1 ; WX 592 ; N Ccedilla ; B 36 -228 561 737 ; C -1 ; WX 638 ; N Odieresis ; B 36 -19 602 915 ; C -1 ; WX 547 ; N Scaron ; B 32 -19 516 936 ; C -1 ; WX 547 ; N Edieresis ; B 62 0 509 915 ; C -1 ; WX 228 ; N Igrave ; B -41 0 175 936 ; C -1 ; WX 456 ; N adieresis ; B 24 -14 432 729 ; C -1 ; WX 638 ; N Ograve ; B 36 -19 602 936 ; C -1 ; WX 547 ; N Egrave ; B 62 0 509 936 ; C -1 ; WX 547 ; N Ydieresis ; B 12 0 535 915 ; C -1 ; WX 604 ; N registered ; B -9 -19 613 737 ; C -1 ; WX 638 ; N Otilde ; B 36 -19 602 923 ; C -1 ; WX 684 ; N onequarter ; B 21 -19 628 710 ; C -1 ; WX 592 ; N Ugrave ; B 59 -19 534 936 ; C -1 ; WX 592 ; N Ucircumflex ; B 59 -19 534 936 ; C -1 ; WX 547 ; N Thorn ; B 62 0 514 718 ; C -1 ; WX 479 ; N divide ; B 33 -42 446 548 ; C -1 ; WX 592 ; N Atilde ; B 16 0 576 923 ; C -1 ; WX 592 ; N Uacute ; B 59 -19 534 936 ; C -1 ; WX 638 ; N Ocircumflex ; B 36 -19 602 936 ; C -1 ; WX 479 ; N logicalnot ; B 33 108 446 419 ; C -1 ; WX 592 ; N Aring ; B 16 0 576 962 ; C -1 ; WX 228 ; N idieresis ; B -17 0 246 729 ; C -1 ; WX 228 ; N iacute ; B 57 0 270 750 ; C -1 ; WX 456 ; N aacute ; B 24 -14 432 750 ; C -1 ; WX 479 ; N plusminus ; B 33 0 446 506 ; C -1 ; WX 479 ; N multiply ; B 33 1 447 505 ; C -1 ; WX 592 ; N Udieresis ; B 59 -19 534 915 ; C -1 ; WX 479 ; N minus ; B 33 197 446 309 ; C -1 ; WX 273 ; N onesuperior ; B 21 283 194 710 ; C -1 ; WX 547 ; N Eacute ; B 62 0 509 936 ; C -1 ; WX 592 ; N Acircumflex ; B 16 0 576 936 ; C -1 ; WX 604 ; N copyright ; B -9 -19 614 737 ; C -1 ; WX 592 ; N Agrave ; B 16 0 576 936 ; C -1 ; WX 501 ; N odieresis ; B 28 -14 474 729 ; C -1 ; WX 501 ; N oacute ; B 28 -14 474 750 ; C -1 ; WX 328 ; N degree ; B 47 426 281 712 ; C -1 ; WX 228 ; N igrave ; B -41 0 171 750 ; C -1 ; WX 501 ; N mu ; B 54 -207 447 532 ; C -1 ; WX 638 ; N Oacute ; B 36 -19 602 936 ; C -1 ; WX 501 ; N eth ; B 28 -14 474 737 ; C -1 ; WX 592 ; N Adieresis ; B 16 0 576 915 ; C -1 ; WX 547 ; N Yacute ; B 12 0 535 936 ; C -1 ; WX 230 ; N brokenbar ; B 69 -19 161 737 ; C -1 ; WX 684 ; N onehalf ; B 21 -19 651 710 ; EndCharMetrics StartKernData StartKernPairs 209 KPX A y -24 KPX A w -24 KPX A v -32 KPX A u -24 KPX A Y -89 KPX A W -48 KPX A V -65 KPX A U -40 KPX A T -73 KPX A Q -32 KPX A O -32 KPX A G -40 KPX A C -32 KPX B U -7 KPX B A -24 KPX D period -24 KPX D comma -24 KPX D Y -56 KPX D W -32 KPX D V -32 KPX D A -32 KPX F period -81 KPX F comma -81 KPX F a -15 KPX F A -65 KPX J u -15 KPX J period -15 KPX J comma -15 KPX J A -15 KPX K y -32 KPX K u -24 KPX K o -28 KPX K e -11 KPX K O -24 KPX L y -24 KPX L quoteright -114 KPX L quotedblright -114 KPX L Y -97 KPX L W -65 KPX L V -89 KPX L T -73 KPX O period -32 KPX O comma -32 KPX O Y -56 KPX O X -40 KPX O W -40 KPX O V -40 KPX O T -32 KPX O A -40 KPX P period -97 KPX P o -32 KPX P e -24 KPX P comma -97 KPX P a -24 KPX P A -81 KPX Q period 16 KPX Q comma 16 KPX Q U -7 KPX R Y -40 KPX R W -32 KPX R V -40 KPX R U -15 KPX R T -15 KPX R O -15 KPX T y -48 KPX T w -48 KPX T u -73 KPX T semicolon -32 KPX T r -65 KPX T period -65 KPX T o -65 KPX T hyphen -97 KPX T e -48 KPX T comma -65 KPX T colon -32 KPX T a -65 KPX T O -32 KPX T A -73 KPX U period -24 KPX U comma -24 KPX U A -40 KPX V u -48 KPX V semicolon -32 KPX V period -97 KPX V o -73 KPX V hyphen -65 KPX V e -40 KPX V comma -97 KPX V colon -32 KPX V a -48 KPX V O -40 KPX V G -40 KPX V A -65 KPX W y -15 KPX W u -36 KPX W semicolon -7 KPX W period -65 KPX W o -48 KPX W hyphen -32 KPX W e -28 KPX W comma -65 KPX W colon -7 KPX W a -32 KPX W O -15 KPX W A -48 KPX Y u -81 KPX Y semicolon -40 KPX Y period -81 KPX Y o -81 KPX Y e -65 KPX Y comma -81 KPX Y colon -40 KPX Y a -73 KPX Y O -56 KPX Y A -89 KPX a y -15 KPX a w -11 KPX a v -11 KPX a g -7 KPX b y -15 KPX b v -15 KPX b u -15 KPX b l -7 KPX c y -7 KPX c l -15 KPX c k -15 KPX c h -7 KPX colon space -32 KPX comma space -32 KPX comma quoteright -97 KPX comma quotedblright -97 KPX d y -11 KPX d w -11 KPX d v -11 KPX d d -7 KPX e y -11 KPX e x -11 KPX e w -11 KPX e v -11 KPX e period 16 KPX e comma 8 KPX f quoteright 25 KPX f quotedblright 25 KPX f period -7 KPX f o -15 KPX f e -7 KPX f comma -7 KPX g g -7 KPX g e 8 KPX h y -15 KPX k o -11 KPX l y -11 KPX l w -11 KPX m y -24 KPX m u -15 KPX n y -15 KPX n v -32 KPX n u -7 KPX o y -15 KPX o x -24 KPX o w -11 KPX o v -15 KPX p y -11 KPX period space -32 KPX period quoteright -97 KPX period quotedblright -97 KPX quotedblright space -65 KPX quoteleft quoteleft -37 KPX quoteright v -15 KPX quoteright space -65 KPX quoteright s -48 KPX quoteright r -32 KPX quoteright quoteright -37 KPX quoteright l -15 KPX quoteright d -65 KPX r y 8 KPX r v 8 KPX r t 16 KPX r s -11 KPX r q -15 KPX r period -48 KPX r o -15 KPX r hyphen -15 KPX r g -11 KPX r d -15 KPX r comma -48 KPX r c -15 KPX s w -11 KPX semicolon space -32 KPX space quoteleft -48 KPX space quotedblleft -65 KPX space Y -97 KPX space W -65 KPX space V -65 KPX space T -81 KPX v period -65 KPX v o -24 KPX v comma -65 KPX v a -15 KPX w period -32 KPX w o -15 KPX w comma -32 KPX x e -7 KPX y period -65 KPX y o -20 KPX y e -7 KPX y comma -65 KPX y a -24 KPX z e 8 EndKernPairs EndKernData StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 160 186 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 160 186 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 160 186 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 160 186 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 160 186 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 160 186 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 176 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 137 186 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 137 186 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 137 186 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 137 186 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute -22 186 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -22 186 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -22 186 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave -22 186 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 160 186 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 183 186 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 183 186 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 183 186 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 183 186 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 183 186 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 137 186 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 160 186 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 160 186 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 160 186 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 160 186 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 137 186 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 137 186 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 114 186 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 92 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 92 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 92 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 92 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 92 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 92 0 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 108 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 92 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 92 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 92 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 92 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -22 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -22 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -22 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -22 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 114 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 114 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 114 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 114 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 114 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 114 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 92 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 114 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 114 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 114 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 114 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 92 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 92 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 69 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/phvbo8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Thu Mar 15 10:44:33 1990 Comment UniqueID 28371 Comment VMusage 7614 43068 FontName Helvetica-BoldOblique FullName Helvetica Bold Oblique FamilyName Helvetica Weight Bold ItalicAngle -12 IsFixedPitch false FontBBox -174 -228 1114 962 UnderlinePosition -100 UnderlineThickness 50 Version 001.007 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 718 XHeight 532 Ascender 718 Descender -207 StartCharMetrics 228 C 32 ; WX 278 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 94 0 397 718 ; C 34 ; WX 474 ; N quotedbl ; B 193 447 529 718 ; C 35 ; WX 556 ; N numbersign ; B 60 0 644 698 ; C 36 ; WX 556 ; N dollar ; B 67 -115 622 775 ; C 37 ; WX 889 ; N percent ; B 136 -19 901 710 ; C 38 ; WX 722 ; N ampersand ; B 89 -19 732 718 ; C 39 ; WX 278 ; N quoteright ; B 167 445 362 718 ; C 40 ; WX 333 ; N parenleft ; B 76 -208 470 734 ; C 41 ; WX 333 ; N parenright ; B -25 -208 369 734 ; C 42 ; WX 389 ; N asterisk ; B 146 387 481 718 ; C 43 ; WX 584 ; N plus ; B 82 0 610 506 ; C 44 ; WX 278 ; N comma ; B 28 -168 245 146 ; C 45 ; WX 333 ; N hyphen ; B 73 215 379 345 ; C 46 ; WX 278 ; N period ; B 64 0 245 146 ; C 47 ; WX 278 ; N slash ; B -37 -19 468 737 ; C 48 ; WX 556 ; N zero ; B 86 -19 617 710 ; C 49 ; WX 556 ; N one ; B 173 0 529 710 ; C 50 ; WX 556 ; N two ; B 26 0 619 710 ; C 51 ; WX 556 ; N three ; B 65 -19 608 710 ; C 52 ; WX 556 ; N four ; B 60 0 598 710 ; C 53 ; WX 556 ; N five ; B 64 -19 636 698 ; C 54 ; WX 556 ; N six ; B 85 -19 619 710 ; C 55 ; WX 556 ; N seven ; B 125 0 676 698 ; C 56 ; WX 556 ; N eight ; B 69 -19 616 710 ; C 57 ; WX 556 ; N nine ; B 78 -19 615 710 ; C 58 ; WX 333 ; N colon ; B 92 0 351 512 ; C 59 ; WX 333 ; N semicolon ; B 56 -168 351 512 ; C 60 ; WX 584 ; N less ; B 82 -8 655 514 ; C 61 ; WX 584 ; N equal ; B 58 87 633 419 ; C 62 ; WX 584 ; N greater ; B 36 -8 609 514 ; C 63 ; WX 611 ; N question ; B 165 0 671 727 ; C 64 ; WX 975 ; N at ; B 186 -19 954 737 ; C 65 ; WX 722 ; N A ; B 20 0 702 718 ; C 66 ; WX 722 ; N B ; B 76 0 764 718 ; C 67 ; WX 722 ; N C ; B 107 -19 789 737 ; C 68 ; WX 722 ; N D ; B 76 0 777 718 ; C 69 ; WX 667 ; N E ; B 76 0 757 718 ; C 70 ; WX 611 ; N F ; B 76 0 740 718 ; C 71 ; WX 778 ; N G ; B 108 -19 817 737 ; C 72 ; WX 722 ; N H ; B 71 0 804 718 ; C 73 ; WX 278 ; N I ; B 64 0 367 718 ; C 74 ; WX 556 ; N J ; B 60 -18 637 718 ; C 75 ; WX 722 ; N K ; B 87 0 858 718 ; C 76 ; WX 611 ; N L ; B 76 0 611 718 ; C 77 ; WX 833 ; N M ; B 69 0 918 718 ; C 78 ; WX 722 ; N N ; B 69 0 807 718 ; C 79 ; WX 778 ; N O ; B 107 -19 823 737 ; C 80 ; WX 667 ; N P ; B 76 0 738 718 ; C 81 ; WX 778 ; N Q ; B 107 -52 823 737 ; C 82 ; WX 722 ; N R ; B 76 0 778 718 ; C 83 ; WX 667 ; N S ; B 81 -19 718 737 ; C 84 ; WX 611 ; N T ; B 140 0 751 718 ; C 85 ; WX 722 ; N U ; B 116 -19 804 718 ; C 86 ; WX 667 ; N V ; B 172 0 801 718 ; C 87 ; WX 944 ; N W ; B 169 0 1082 718 ; C 88 ; WX 667 ; N X ; B 14 0 791 718 ; C 89 ; WX 667 ; N Y ; B 168 0 806 718 ; C 90 ; WX 611 ; N Z ; B 25 0 737 718 ; C 91 ; WX 333 ; N bracketleft ; B 21 -196 462 722 ; C 92 ; WX 278 ; N backslash ; B 124 -19 307 737 ; C 93 ; WX 333 ; N bracketright ; B -18 -196 423 722 ; C 94 ; WX 584 ; N asciicircum ; B 131 323 591 698 ; C 95 ; WX 556 ; N underscore ; B -27 -125 540 -75 ; C 96 ; WX 278 ; N quoteleft ; B 165 454 361 727 ; C 97 ; WX 556 ; N a ; B 55 -14 583 546 ; C 98 ; WX 611 ; N b ; B 61 -14 645 718 ; C 99 ; WX 556 ; N c ; B 79 -14 599 546 ; C 100 ; WX 611 ; N d ; B 82 -14 704 718 ; C 101 ; WX 556 ; N e ; B 70 -14 593 546 ; C 102 ; WX 333 ; N f ; B 87 0 469 727 ; L i fi ; L l fl ; C 103 ; WX 611 ; N g ; B 38 -217 666 546 ; C 104 ; WX 611 ; N h ; B 65 0 629 718 ; C 105 ; WX 278 ; N i ; B 69 0 363 725 ; C 106 ; WX 278 ; N j ; B -42 -214 363 725 ; C 107 ; WX 556 ; N k ; B 69 0 670 718 ; C 108 ; WX 278 ; N l ; B 69 0 362 718 ; C 109 ; WX 889 ; N m ; B 64 0 909 546 ; C 110 ; WX 611 ; N n ; B 65 0 629 546 ; C 111 ; WX 611 ; N o ; B 82 -14 643 546 ; C 112 ; WX 611 ; N p ; B 18 -207 645 546 ; C 113 ; WX 611 ; N q ; B 80 -207 665 546 ; C 114 ; WX 389 ; N r ; B 64 0 489 546 ; C 115 ; WX 556 ; N s ; B 63 -14 584 546 ; C 116 ; WX 333 ; N t ; B 100 -6 422 676 ; C 117 ; WX 611 ; N u ; B 98 -14 658 532 ; C 118 ; WX 556 ; N v ; B 126 0 656 532 ; C 119 ; WX 778 ; N w ; B 123 0 882 532 ; C 120 ; WX 556 ; N x ; B 15 0 648 532 ; C 121 ; WX 556 ; N y ; B 42 -214 652 532 ; C 122 ; WX 500 ; N z ; B 20 0 583 532 ; C 123 ; WX 389 ; N braceleft ; B 94 -196 518 722 ; C 124 ; WX 280 ; N bar ; B 80 -19 353 737 ; C 125 ; WX 389 ; N braceright ; B -18 -196 407 722 ; C 126 ; WX 584 ; N asciitilde ; B 115 163 577 343 ; C 161 ; WX 333 ; N exclamdown ; B 50 -186 353 532 ; C 162 ; WX 556 ; N cent ; B 79 -118 599 628 ; C 163 ; WX 556 ; N sterling ; B 50 -16 635 718 ; C 164 ; WX 167 ; N fraction ; B -174 -19 487 710 ; C 165 ; WX 556 ; N yen ; B 60 0 713 698 ; C 166 ; WX 556 ; N florin ; B -50 -210 669 737 ; C 167 ; WX 556 ; N section ; B 61 -184 598 727 ; C 168 ; WX 556 ; N currency ; B 27 76 680 636 ; C 169 ; WX 238 ; N quotesingle ; B 165 447 321 718 ; C 170 ; WX 500 ; N quotedblleft ; B 160 454 588 727 ; C 171 ; WX 556 ; N guillemotleft ; B 135 76 571 484 ; C 172 ; WX 333 ; N guilsinglleft ; B 130 76 353 484 ; C 173 ; WX 333 ; N guilsinglright ; B 99 76 322 484 ; C 174 ; WX 611 ; N fi ; B 87 0 696 727 ; C 175 ; WX 611 ; N fl ; B 87 0 695 727 ; C 177 ; WX 556 ; N endash ; B 48 227 627 333 ; C 178 ; WX 556 ; N dagger ; B 118 -171 626 718 ; C 179 ; WX 556 ; N daggerdbl ; B 46 -171 628 718 ; C 180 ; WX 278 ; N periodcentered ; B 110 172 276 334 ; C 182 ; WX 556 ; N paragraph ; B 98 -191 688 700 ; C 183 ; WX 350 ; N bullet ; B 83 194 420 524 ; C 184 ; WX 278 ; N quotesinglbase ; B 41 -146 236 127 ; C 185 ; WX 500 ; N quotedblbase ; B 36 -146 463 127 ; C 186 ; WX 500 ; N quotedblright ; B 162 445 589 718 ; C 187 ; WX 556 ; N guillemotright ; B 104 76 540 484 ; C 188 ; WX 1000 ; N ellipsis ; B 92 0 939 146 ; C 189 ; WX 1000 ; N perthousand ; B 76 -19 1038 710 ; C 191 ; WX 611 ; N questiondown ; B 53 -195 559 532 ; C 193 ; WX 333 ; N grave ; B 136 604 353 750 ; C 194 ; WX 333 ; N acute ; B 236 604 515 750 ; C 195 ; WX 333 ; N circumflex ; B 118 604 471 750 ; C 196 ; WX 333 ; N tilde ; B 113 610 507 737 ; C 197 ; WX 333 ; N macron ; B 122 604 483 678 ; C 198 ; WX 333 ; N breve ; B 156 604 494 750 ; C 199 ; WX 333 ; N dotaccent ; B 235 614 385 729 ; C 200 ; WX 333 ; N dieresis ; B 137 614 482 729 ; C 202 ; WX 333 ; N ring ; B 200 568 420 776 ; C 203 ; WX 333 ; N cedilla ; B -37 -228 220 0 ; C 205 ; WX 333 ; N hungarumlaut ; B 137 604 645 750 ; C 206 ; WX 333 ; N ogonek ; B 41 -228 264 0 ; C 207 ; WX 333 ; N caron ; B 149 604 502 750 ; C 208 ; WX 1000 ; N emdash ; B 48 227 1071 333 ; C 225 ; WX 1000 ; N AE ; B 5 0 1100 718 ; C 227 ; WX 370 ; N ordfeminine ; B 92 276 465 737 ; C 232 ; WX 611 ; N Lslash ; B 34 0 611 718 ; C 233 ; WX 778 ; N Oslash ; B 35 -27 894 745 ; C 234 ; WX 1000 ; N OE ; B 99 -19 1114 737 ; C 235 ; WX 365 ; N ordmasculine ; B 92 276 485 737 ; C 241 ; WX 889 ; N ae ; B 56 -14 923 546 ; C 245 ; WX 278 ; N dotlessi ; B 69 0 322 532 ; C 248 ; WX 278 ; N lslash ; B 40 0 407 718 ; C 249 ; WX 611 ; N oslash ; B 22 -29 701 560 ; C 250 ; WX 944 ; N oe ; B 82 -14 977 546 ; C 251 ; WX 611 ; N germandbls ; B 69 -14 657 731 ; C -1 ; WX 611 ; N Zcaron ; B 25 0 737 936 ; C -1 ; WX 556 ; N ccedilla ; B 79 -228 599 546 ; C -1 ; WX 556 ; N ydieresis ; B 42 -214 652 729 ; C -1 ; WX 556 ; N atilde ; B 55 -14 619 737 ; C -1 ; WX 278 ; N icircumflex ; B 69 0 444 750 ; C -1 ; WX 333 ; N threesuperior ; B 91 271 441 710 ; C -1 ; WX 556 ; N ecircumflex ; B 70 -14 593 750 ; C -1 ; WX 611 ; N thorn ; B 18 -208 645 718 ; C -1 ; WX 556 ; N egrave ; B 70 -14 593 750 ; C -1 ; WX 333 ; N twosuperior ; B 69 283 449 710 ; C -1 ; WX 556 ; N eacute ; B 70 -14 627 750 ; C -1 ; WX 611 ; N otilde ; B 82 -14 646 737 ; C -1 ; WX 722 ; N Aacute ; B 20 0 750 936 ; C -1 ; WX 611 ; N ocircumflex ; B 82 -14 643 750 ; C -1 ; WX 556 ; N yacute ; B 42 -214 652 750 ; C -1 ; WX 611 ; N udieresis ; B 98 -14 658 729 ; C -1 ; WX 834 ; N threequarters ; B 99 -19 839 710 ; C -1 ; WX 556 ; N acircumflex ; B 55 -14 583 750 ; C -1 ; WX 722 ; N Eth ; B 62 0 777 718 ; C -1 ; WX 556 ; N edieresis ; B 70 -14 594 729 ; C -1 ; WX 611 ; N ugrave ; B 98 -14 658 750 ; C -1 ; WX 1000 ; N trademark ; B 179 306 1109 718 ; C -1 ; WX 611 ; N ograve ; B 82 -14 643 750 ; C -1 ; WX 556 ; N scaron ; B 63 -14 614 750 ; C -1 ; WX 278 ; N Idieresis ; B 64 0 494 915 ; C -1 ; WX 611 ; N uacute ; B 98 -14 658 750 ; C -1 ; WX 556 ; N agrave ; B 55 -14 583 750 ; C -1 ; WX 611 ; N ntilde ; B 65 0 646 737 ; C -1 ; WX 556 ; N aring ; B 55 -14 583 776 ; C -1 ; WX 500 ; N zcaron ; B 20 0 586 750 ; C -1 ; WX 278 ; N Icircumflex ; B 64 0 484 936 ; C -1 ; WX 722 ; N Ntilde ; B 69 0 807 923 ; C -1 ; WX 611 ; N ucircumflex ; B 98 -14 658 750 ; C -1 ; WX 667 ; N Ecircumflex ; B 76 0 757 936 ; C -1 ; WX 278 ; N Iacute ; B 64 0 528 936 ; C -1 ; WX 722 ; N Ccedilla ; B 107 -228 789 737 ; C -1 ; WX 778 ; N Odieresis ; B 107 -19 823 915 ; C -1 ; WX 667 ; N Scaron ; B 81 -19 718 936 ; C -1 ; WX 667 ; N Edieresis ; B 76 0 757 915 ; C -1 ; WX 278 ; N Igrave ; B 64 0 367 936 ; C -1 ; WX 556 ; N adieresis ; B 55 -14 594 729 ; C -1 ; WX 778 ; N Ograve ; B 107 -19 823 936 ; C -1 ; WX 667 ; N Egrave ; B 76 0 757 936 ; C -1 ; WX 667 ; N Ydieresis ; B 168 0 806 915 ; C -1 ; WX 737 ; N registered ; B 55 -19 834 737 ; C -1 ; WX 778 ; N Otilde ; B 107 -19 823 923 ; C -1 ; WX 834 ; N onequarter ; B 132 -19 806 710 ; C -1 ; WX 722 ; N Ugrave ; B 116 -19 804 936 ; C -1 ; WX 722 ; N Ucircumflex ; B 116 -19 804 936 ; C -1 ; WX 667 ; N Thorn ; B 76 0 716 718 ; C -1 ; WX 584 ; N divide ; B 82 -42 610 548 ; C -1 ; WX 722 ; N Atilde ; B 20 0 741 923 ; C -1 ; WX 722 ; N Uacute ; B 116 -19 804 936 ; C -1 ; WX 778 ; N Ocircumflex ; B 107 -19 823 936 ; C -1 ; WX 584 ; N logicalnot ; B 105 108 633 419 ; C -1 ; WX 722 ; N Aring ; B 20 0 702 962 ; C -1 ; WX 278 ; N idieresis ; B 69 0 455 729 ; C -1 ; WX 278 ; N iacute ; B 69 0 488 750 ; C -1 ; WX 556 ; N aacute ; B 55 -14 627 750 ; C -1 ; WX 584 ; N plusminus ; B 40 0 625 506 ; C -1 ; WX 584 ; N multiply ; B 57 1 635 505 ; C -1 ; WX 722 ; N Udieresis ; B 116 -19 804 915 ; C -1 ; WX 584 ; N minus ; B 82 197 610 309 ; C -1 ; WX 333 ; N onesuperior ; B 148 283 388 710 ; C -1 ; WX 667 ; N Eacute ; B 76 0 757 936 ; C -1 ; WX 722 ; N Acircumflex ; B 20 0 706 936 ; C -1 ; WX 737 ; N copyright ; B 56 -19 835 737 ; C -1 ; WX 722 ; N Agrave ; B 20 0 702 936 ; C -1 ; WX 611 ; N odieresis ; B 82 -14 643 729 ; C -1 ; WX 611 ; N oacute ; B 82 -14 654 750 ; C -1 ; WX 400 ; N degree ; B 175 426 467 712 ; C -1 ; WX 278 ; N igrave ; B 69 0 326 750 ; C -1 ; WX 611 ; N mu ; B 22 -207 658 532 ; C -1 ; WX 778 ; N Oacute ; B 107 -19 823 936 ; C -1 ; WX 611 ; N eth ; B 82 -14 670 737 ; C -1 ; WX 722 ; N Adieresis ; B 20 0 716 915 ; C -1 ; WX 667 ; N Yacute ; B 168 0 806 936 ; C -1 ; WX 280 ; N brokenbar ; B 80 -19 353 737 ; C -1 ; WX 834 ; N onehalf ; B 132 -19 858 710 ; EndCharMetrics StartKernData StartKernPairs 209 KPX A y -30 KPX A w -30 KPX A v -40 KPX A u -30 KPX A Y -110 KPX A W -60 KPX A V -80 KPX A U -50 KPX A T -90 KPX A Q -40 KPX A O -40 KPX A G -50 KPX A C -40 KPX B U -10 KPX B A -30 KPX D period -30 KPX D comma -30 KPX D Y -70 KPX D W -40 KPX D V -40 KPX D A -40 KPX F period -100 KPX F comma -100 KPX F a -20 KPX F A -80 KPX J u -20 KPX J period -20 KPX J comma -20 KPX J A -20 KPX K y -40 KPX K u -30 KPX K o -35 KPX K e -15 KPX K O -30 KPX L y -30 KPX L quoteright -140 KPX L quotedblright -140 KPX L Y -120 KPX L W -80 KPX L V -110 KPX L T -90 KPX O period -40 KPX O comma -40 KPX O Y -70 KPX O X -50 KPX O W -50 KPX O V -50 KPX O T -40 KPX O A -50 KPX P period -120 KPX P o -40 KPX P e -30 KPX P comma -120 KPX P a -30 KPX P A -100 KPX Q period 20 KPX Q comma 20 KPX Q U -10 KPX R Y -50 KPX R W -40 KPX R V -50 KPX R U -20 KPX R T -20 KPX R O -20 KPX T y -60 KPX T w -60 KPX T u -90 KPX T semicolon -40 KPX T r -80 KPX T period -80 KPX T o -80 KPX T hyphen -120 KPX T e -60 KPX T comma -80 KPX T colon -40 KPX T a -80 KPX T O -40 KPX T A -90 KPX U period -30 KPX U comma -30 KPX U A -50 KPX V u -60 KPX V semicolon -40 KPX V period -120 KPX V o -90 KPX V hyphen -80 KPX V e -50 KPX V comma -120 KPX V colon -40 KPX V a -60 KPX V O -50 KPX V G -50 KPX V A -80 KPX W y -20 KPX W u -45 KPX W semicolon -10 KPX W period -80 KPX W o -60 KPX W hyphen -40 KPX W e -35 KPX W comma -80 KPX W colon -10 KPX W a -40 KPX W O -20 KPX W A -60 KPX Y u -100 KPX Y semicolon -50 KPX Y period -100 KPX Y o -100 KPX Y e -80 KPX Y comma -100 KPX Y colon -50 KPX Y a -90 KPX Y O -70 KPX Y A -110 KPX a y -20 KPX a w -15 KPX a v -15 KPX a g -10 KPX b y -20 KPX b v -20 KPX b u -20 KPX b l -10 KPX c y -10 KPX c l -20 KPX c k -20 KPX c h -10 KPX colon space -40 KPX comma space -40 KPX comma quoteright -120 KPX comma quotedblright -120 KPX d y -15 KPX d w -15 KPX d v -15 KPX d d -10 KPX e y -15 KPX e x -15 KPX e w -15 KPX e v -15 KPX e period 20 KPX e comma 10 KPX f quoteright 30 KPX f quotedblright 30 KPX f period -10 KPX f o -20 KPX f e -10 KPX f comma -10 KPX g g -10 KPX g e 10 KPX h y -20 KPX k o -15 KPX l y -15 KPX l w -15 KPX m y -30 KPX m u -20 KPX n y -20 KPX n v -40 KPX n u -10 KPX o y -20 KPX o x -30 KPX o w -15 KPX o v -20 KPX p y -15 KPX period space -40 KPX period quoteright -120 KPX period quotedblright -120 KPX quotedblright space -80 KPX quoteleft quoteleft -46 KPX quoteright v -20 KPX quoteright space -80 KPX quoteright s -60 KPX quoteright r -40 KPX quoteright quoteright -46 KPX quoteright l -20 KPX quoteright d -80 KPX r y 10 KPX r v 10 KPX r t 20 KPX r s -15 KPX r q -20 KPX r period -60 KPX r o -20 KPX r hyphen -20 KPX r g -15 KPX r d -20 KPX r comma -60 KPX r c -20 KPX s w -15 KPX semicolon space -40 KPX space quoteleft -60 KPX space quotedblleft -80 KPX space Y -120 KPX space W -80 KPX space V -80 KPX space T -100 KPX v period -80 KPX v o -30 KPX v comma -80 KPX v a -20 KPX w period -40 KPX w o -20 KPX w comma -40 KPX x e -10 KPX y period -80 KPX y o -25 KPX y e -10 KPX y comma -80 KPX y a -30 KPX z e 10 EndKernPairs EndKernData StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 235 186 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 235 186 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 235 186 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 235 186 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 235 186 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 235 186 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 215 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 207 186 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 207 186 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 207 186 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 207 186 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 13 186 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 13 186 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 13 186 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 13 186 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 235 186 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 263 186 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 263 186 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 263 186 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 263 186 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 263 186 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 207 186 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 235 186 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 235 186 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 235 186 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 235 186 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 207 186 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 207 186 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 179 186 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 112 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 112 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 112 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 112 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 112 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 112 0 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 132 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 112 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 112 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 112 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 112 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 139 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 139 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 139 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 139 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 139 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 139 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 112 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 139 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 139 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 139 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 139 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 112 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 112 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 84 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/phvbo8an.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Thu Mar 15 12:08:57 1990 Comment UniqueID 28407 Comment VMusage 7614 43068 FontName Helvetica-Narrow-BoldOblique FullName Helvetica Narrow Bold Oblique FamilyName Helvetica Weight Bold ItalicAngle -12 IsFixedPitch false FontBBox -143 -228 913 962 UnderlinePosition -100 UnderlineThickness 50 Version 001.007 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 718 XHeight 532 Ascender 718 Descender -207 StartCharMetrics 228 C 32 ; WX 228 ; N space ; B 0 0 0 0 ; C 33 ; WX 273 ; N exclam ; B 77 0 325 718 ; C 34 ; WX 389 ; N quotedbl ; B 158 447 433 718 ; C 35 ; WX 456 ; N numbersign ; B 49 0 528 698 ; C 36 ; WX 456 ; N dollar ; B 55 -115 510 775 ; C 37 ; WX 729 ; N percent ; B 112 -19 739 710 ; C 38 ; WX 592 ; N ampersand ; B 73 -19 600 718 ; C 39 ; WX 228 ; N quoteright ; B 137 445 297 718 ; C 40 ; WX 273 ; N parenleft ; B 62 -208 385 734 ; C 41 ; WX 273 ; N parenright ; B -21 -208 302 734 ; C 42 ; WX 319 ; N asterisk ; B 120 387 394 718 ; C 43 ; WX 479 ; N plus ; B 67 0 500 506 ; C 44 ; WX 228 ; N comma ; B 23 -168 201 146 ; C 45 ; WX 273 ; N hyphen ; B 60 215 311 345 ; C 46 ; WX 228 ; N period ; B 52 0 201 146 ; C 47 ; WX 228 ; N slash ; B -30 -19 383 737 ; C 48 ; WX 456 ; N zero ; B 71 -19 506 710 ; C 49 ; WX 456 ; N one ; B 142 0 434 710 ; C 50 ; WX 456 ; N two ; B 21 0 508 710 ; C 51 ; WX 456 ; N three ; B 54 -19 499 710 ; C 52 ; WX 456 ; N four ; B 50 0 490 710 ; C 53 ; WX 456 ; N five ; B 53 -19 522 698 ; C 54 ; WX 456 ; N six ; B 70 -19 507 710 ; C 55 ; WX 456 ; N seven ; B 102 0 555 698 ; C 56 ; WX 456 ; N eight ; B 57 -19 505 710 ; C 57 ; WX 456 ; N nine ; B 64 -19 504 710 ; C 58 ; WX 273 ; N colon ; B 75 0 288 512 ; C 59 ; WX 273 ; N semicolon ; B 46 -168 288 512 ; C 60 ; WX 479 ; N less ; B 67 -8 537 514 ; C 61 ; WX 479 ; N equal ; B 48 87 519 419 ; C 62 ; WX 479 ; N greater ; B 30 -8 500 514 ; C 63 ; WX 501 ; N question ; B 135 0 550 727 ; C 64 ; WX 800 ; N at ; B 152 -19 782 737 ; C 65 ; WX 592 ; N A ; B 16 0 576 718 ; C 66 ; WX 592 ; N B ; B 62 0 626 718 ; C 67 ; WX 592 ; N C ; B 88 -19 647 737 ; C 68 ; WX 592 ; N D ; B 62 0 637 718 ; C 69 ; WX 547 ; N E ; B 62 0 620 718 ; C 70 ; WX 501 ; N F ; B 62 0 606 718 ; C 71 ; WX 638 ; N G ; B 89 -19 670 737 ; C 72 ; WX 592 ; N H ; B 58 0 659 718 ; C 73 ; WX 228 ; N I ; B 52 0 301 718 ; C 74 ; WX 456 ; N J ; B 49 -18 522 718 ; C 75 ; WX 592 ; N K ; B 71 0 703 718 ; C 76 ; WX 501 ; N L ; B 62 0 501 718 ; C 77 ; WX 683 ; N M ; B 57 0 752 718 ; C 78 ; WX 592 ; N N ; B 57 0 661 718 ; C 79 ; WX 638 ; N O ; B 88 -19 675 737 ; C 80 ; WX 547 ; N P ; B 62 0 605 718 ; C 81 ; WX 638 ; N Q ; B 88 -52 675 737 ; C 82 ; WX 592 ; N R ; B 62 0 638 718 ; C 83 ; WX 547 ; N S ; B 66 -19 588 737 ; C 84 ; WX 501 ; N T ; B 114 0 615 718 ; C 85 ; WX 592 ; N U ; B 96 -19 659 718 ; C 86 ; WX 547 ; N V ; B 141 0 656 718 ; C 87 ; WX 774 ; N W ; B 138 0 887 718 ; C 88 ; WX 547 ; N X ; B 11 0 648 718 ; C 89 ; WX 547 ; N Y ; B 137 0 661 718 ; C 90 ; WX 501 ; N Z ; B 20 0 604 718 ; C 91 ; WX 273 ; N bracketleft ; B 17 -196 379 722 ; C 92 ; WX 228 ; N backslash ; B 101 -19 252 737 ; C 93 ; WX 273 ; N bracketright ; B -14 -196 347 722 ; C 94 ; WX 479 ; N asciicircum ; B 107 323 484 698 ; C 95 ; WX 456 ; N underscore ; B -22 -125 443 -75 ; C 96 ; WX 228 ; N quoteleft ; B 136 454 296 727 ; C 97 ; WX 456 ; N a ; B 45 -14 478 546 ; C 98 ; WX 501 ; N b ; B 50 -14 529 718 ; C 99 ; WX 456 ; N c ; B 65 -14 491 546 ; C 100 ; WX 501 ; N d ; B 67 -14 577 718 ; C 101 ; WX 456 ; N e ; B 58 -14 486 546 ; C 102 ; WX 273 ; N f ; B 71 0 385 727 ; L i fi ; L l fl ; C 103 ; WX 501 ; N g ; B 31 -217 546 546 ; C 104 ; WX 501 ; N h ; B 53 0 516 718 ; C 105 ; WX 228 ; N i ; B 57 0 298 725 ; C 106 ; WX 228 ; N j ; B -35 -214 298 725 ; C 107 ; WX 456 ; N k ; B 57 0 549 718 ; C 108 ; WX 228 ; N l ; B 57 0 297 718 ; C 109 ; WX 729 ; N m ; B 52 0 746 546 ; C 110 ; WX 501 ; N n ; B 53 0 516 546 ; C 111 ; WX 501 ; N o ; B 67 -14 527 546 ; C 112 ; WX 501 ; N p ; B 15 -207 529 546 ; C 113 ; WX 501 ; N q ; B 66 -207 545 546 ; C 114 ; WX 319 ; N r ; B 52 0 401 546 ; C 115 ; WX 456 ; N s ; B 52 -14 479 546 ; C 116 ; WX 273 ; N t ; B 82 -6 346 676 ; C 117 ; WX 501 ; N u ; B 80 -14 540 532 ; C 118 ; WX 456 ; N v ; B 103 0 538 532 ; C 119 ; WX 638 ; N w ; B 101 0 723 532 ; C 120 ; WX 456 ; N x ; B 12 0 531 532 ; C 121 ; WX 456 ; N y ; B 34 -214 535 532 ; C 122 ; WX 410 ; N z ; B 16 0 478 532 ; C 123 ; WX 319 ; N braceleft ; B 77 -196 425 722 ; C 124 ; WX 230 ; N bar ; B 66 -19 289 737 ; C 125 ; WX 319 ; N braceright ; B -14 -196 333 722 ; C 126 ; WX 479 ; N asciitilde ; B 94 163 473 343 ; C 161 ; WX 273 ; N exclamdown ; B 41 -186 290 532 ; C 162 ; WX 456 ; N cent ; B 65 -118 491 628 ; C 163 ; WX 456 ; N sterling ; B 41 -16 520 718 ; C 164 ; WX 137 ; N fraction ; B -143 -19 399 710 ; C 165 ; WX 456 ; N yen ; B 49 0 585 698 ; C 166 ; WX 456 ; N florin ; B -41 -210 548 737 ; C 167 ; WX 456 ; N section ; B 50 -184 491 727 ; C 168 ; WX 456 ; N currency ; B 22 76 558 636 ; C 169 ; WX 195 ; N quotesingle ; B 135 447 263 718 ; C 170 ; WX 410 ; N quotedblleft ; B 132 454 482 727 ; C 171 ; WX 456 ; N guillemotleft ; B 111 76 468 484 ; C 172 ; WX 273 ; N guilsinglleft ; B 106 76 289 484 ; C 173 ; WX 273 ; N guilsinglright ; B 81 76 264 484 ; C 174 ; WX 501 ; N fi ; B 71 0 571 727 ; C 175 ; WX 501 ; N fl ; B 71 0 570 727 ; C 177 ; WX 456 ; N endash ; B 40 227 514 333 ; C 178 ; WX 456 ; N dagger ; B 97 -171 513 718 ; C 179 ; WX 456 ; N daggerdbl ; B 38 -171 515 718 ; C 180 ; WX 228 ; N periodcentered ; B 90 172 226 334 ; C 182 ; WX 456 ; N paragraph ; B 80 -191 564 700 ; C 183 ; WX 287 ; N bullet ; B 68 194 345 524 ; C 184 ; WX 228 ; N quotesinglbase ; B 34 -146 194 127 ; C 185 ; WX 410 ; N quotedblbase ; B 29 -146 380 127 ; C 186 ; WX 410 ; N quotedblright ; B 132 445 483 718 ; C 187 ; WX 456 ; N guillemotright ; B 85 76 443 484 ; C 188 ; WX 820 ; N ellipsis ; B 75 0 770 146 ; C 189 ; WX 820 ; N perthousand ; B 62 -19 851 710 ; C 191 ; WX 501 ; N questiondown ; B 44 -195 459 532 ; C 193 ; WX 273 ; N grave ; B 112 604 290 750 ; C 194 ; WX 273 ; N acute ; B 194 604 423 750 ; C 195 ; WX 273 ; N circumflex ; B 97 604 387 750 ; C 196 ; WX 273 ; N tilde ; B 92 610 415 737 ; C 197 ; WX 273 ; N macron ; B 100 604 396 678 ; C 198 ; WX 273 ; N breve ; B 128 604 405 750 ; C 199 ; WX 273 ; N dotaccent ; B 192 614 316 729 ; C 200 ; WX 273 ; N dieresis ; B 112 614 395 729 ; C 202 ; WX 273 ; N ring ; B 164 568 344 776 ; C 203 ; WX 273 ; N cedilla ; B -30 -228 180 0 ; C 205 ; WX 273 ; N hungarumlaut ; B 113 604 529 750 ; C 206 ; WX 273 ; N ogonek ; B 33 -228 216 0 ; C 207 ; WX 273 ; N caron ; B 123 604 412 750 ; C 208 ; WX 820 ; N emdash ; B 40 227 878 333 ; C 225 ; WX 820 ; N AE ; B 4 0 902 718 ; C 227 ; WX 303 ; N ordfeminine ; B 75 276 381 737 ; C 232 ; WX 501 ; N Lslash ; B 28 0 501 718 ; C 233 ; WX 638 ; N Oslash ; B 29 -27 733 745 ; C 234 ; WX 820 ; N OE ; B 81 -19 913 737 ; C 235 ; WX 299 ; N ordmasculine ; B 75 276 398 737 ; C 241 ; WX 729 ; N ae ; B 46 -14 757 546 ; C 245 ; WX 228 ; N dotlessi ; B 57 0 264 532 ; C 248 ; WX 228 ; N lslash ; B 33 0 334 718 ; C 249 ; WX 501 ; N oslash ; B 18 -29 575 560 ; C 250 ; WX 774 ; N oe ; B 67 -14 801 546 ; C 251 ; WX 501 ; N germandbls ; B 57 -14 539 731 ; C -1 ; WX 501 ; N Zcaron ; B 20 0 604 936 ; C -1 ; WX 456 ; N ccedilla ; B 65 -228 491 546 ; C -1 ; WX 456 ; N ydieresis ; B 34 -214 535 729 ; C -1 ; WX 456 ; N atilde ; B 45 -14 507 737 ; C -1 ; WX 228 ; N icircumflex ; B 57 0 364 750 ; C -1 ; WX 273 ; N threesuperior ; B 75 271 361 710 ; C -1 ; WX 456 ; N ecircumflex ; B 58 -14 486 750 ; C -1 ; WX 501 ; N thorn ; B 15 -208 529 718 ; C -1 ; WX 456 ; N egrave ; B 58 -14 486 750 ; C -1 ; WX 273 ; N twosuperior ; B 57 283 368 710 ; C -1 ; WX 456 ; N eacute ; B 58 -14 514 750 ; C -1 ; WX 501 ; N otilde ; B 67 -14 529 737 ; C -1 ; WX 592 ; N Aacute ; B 16 0 615 936 ; C -1 ; WX 501 ; N ocircumflex ; B 67 -14 527 750 ; C -1 ; WX 456 ; N yacute ; B 34 -214 535 750 ; C -1 ; WX 501 ; N udieresis ; B 80 -14 540 729 ; C -1 ; WX 684 ; N threequarters ; B 82 -19 688 710 ; C -1 ; WX 456 ; N acircumflex ; B 45 -14 478 750 ; C -1 ; WX 592 ; N Eth ; B 51 0 637 718 ; C -1 ; WX 456 ; N edieresis ; B 58 -14 487 729 ; C -1 ; WX 501 ; N ugrave ; B 80 -14 540 750 ; C -1 ; WX 820 ; N trademark ; B 146 306 909 718 ; C -1 ; WX 501 ; N ograve ; B 67 -14 527 750 ; C -1 ; WX 456 ; N scaron ; B 52 -14 504 750 ; C -1 ; WX 228 ; N Idieresis ; B 52 0 405 915 ; C -1 ; WX 501 ; N uacute ; B 80 -14 540 750 ; C -1 ; WX 456 ; N agrave ; B 45 -14 478 750 ; C -1 ; WX 501 ; N ntilde ; B 53 0 529 737 ; C -1 ; WX 456 ; N aring ; B 45 -14 478 776 ; C -1 ; WX 410 ; N zcaron ; B 16 0 481 750 ; C -1 ; WX 228 ; N Icircumflex ; B 52 0 397 936 ; C -1 ; WX 592 ; N Ntilde ; B 57 0 661 923 ; C -1 ; WX 501 ; N ucircumflex ; B 80 -14 540 750 ; C -1 ; WX 547 ; N Ecircumflex ; B 62 0 620 936 ; C -1 ; WX 228 ; N Iacute ; B 52 0 433 936 ; C -1 ; WX 592 ; N Ccedilla ; B 88 -228 647 737 ; C -1 ; WX 638 ; N Odieresis ; B 88 -19 675 915 ; C -1 ; WX 547 ; N Scaron ; B 66 -19 588 936 ; C -1 ; WX 547 ; N Edieresis ; B 62 0 620 915 ; C -1 ; WX 228 ; N Igrave ; B 52 0 301 936 ; C -1 ; WX 456 ; N adieresis ; B 45 -14 487 729 ; C -1 ; WX 638 ; N Ograve ; B 88 -19 675 936 ; C -1 ; WX 547 ; N Egrave ; B 62 0 620 936 ; C -1 ; WX 547 ; N Ydieresis ; B 137 0 661 915 ; C -1 ; WX 604 ; N registered ; B 45 -19 684 737 ; C -1 ; WX 638 ; N Otilde ; B 88 -19 675 923 ; C -1 ; WX 684 ; N onequarter ; B 108 -19 661 710 ; C -1 ; WX 592 ; N Ugrave ; B 96 -19 659 936 ; C -1 ; WX 592 ; N Ucircumflex ; B 96 -19 659 936 ; C -1 ; WX 547 ; N Thorn ; B 62 0 588 718 ; C -1 ; WX 479 ; N divide ; B 67 -42 500 548 ; C -1 ; WX 592 ; N Atilde ; B 16 0 608 923 ; C -1 ; WX 592 ; N Uacute ; B 96 -19 659 936 ; C -1 ; WX 638 ; N Ocircumflex ; B 88 -19 675 936 ; C -1 ; WX 479 ; N logicalnot ; B 86 108 519 419 ; C -1 ; WX 592 ; N Aring ; B 16 0 576 962 ; C -1 ; WX 228 ; N idieresis ; B 57 0 373 729 ; C -1 ; WX 228 ; N iacute ; B 57 0 400 750 ; C -1 ; WX 456 ; N aacute ; B 45 -14 514 750 ; C -1 ; WX 479 ; N plusminus ; B 33 0 512 506 ; C -1 ; WX 479 ; N multiply ; B 47 1 520 505 ; C -1 ; WX 592 ; N Udieresis ; B 96 -19 659 915 ; C -1 ; WX 479 ; N minus ; B 67 197 500 309 ; C -1 ; WX 273 ; N onesuperior ; B 121 283 318 710 ; C -1 ; WX 547 ; N Eacute ; B 62 0 620 936 ; C -1 ; WX 592 ; N Acircumflex ; B 16 0 579 936 ; C -1 ; WX 604 ; N copyright ; B 46 -19 685 737 ; C -1 ; WX 592 ; N Agrave ; B 16 0 576 936 ; C -1 ; WX 501 ; N odieresis ; B 67 -14 527 729 ; C -1 ; WX 501 ; N oacute ; B 67 -14 537 750 ; C -1 ; WX 328 ; N degree ; B 143 426 383 712 ; C -1 ; WX 228 ; N igrave ; B 57 0 268 750 ; C -1 ; WX 501 ; N mu ; B 18 -207 540 532 ; C -1 ; WX 638 ; N Oacute ; B 88 -19 675 936 ; C -1 ; WX 501 ; N eth ; B 67 -14 549 737 ; C -1 ; WX 592 ; N Adieresis ; B 16 0 588 915 ; C -1 ; WX 547 ; N Yacute ; B 137 0 661 936 ; C -1 ; WX 230 ; N brokenbar ; B 66 -19 289 737 ; C -1 ; WX 684 ; N onehalf ; B 108 -19 704 710 ; EndCharMetrics StartKernData StartKernPairs 209 KPX A y -30 KPX A w -30 KPX A v -40 KPX A u -30 KPX A Y -110 KPX A W -60 KPX A V -80 KPX A U -50 KPX A T -90 KPX A Q -40 KPX A O -40 KPX A G -50 KPX A C -40 KPX B U -10 KPX B A -30 KPX D period -30 KPX D comma -30 KPX D Y -70 KPX D W -40 KPX D V -40 KPX D A -40 KPX F period -100 KPX F comma -100 KPX F a -20 KPX F A -80 KPX J u -20 KPX J period -20 KPX J comma -20 KPX J A -20 KPX K y -40 KPX K u -30 KPX K o -35 KPX K e -15 KPX K O -30 KPX L y -30 KPX L quoteright -140 KPX L quotedblright -140 KPX L Y -120 KPX L W -80 KPX L V -110 KPX L T -90 KPX O period -40 KPX O comma -40 KPX O Y -70 KPX O X -50 KPX O W -50 KPX O V -50 KPX O T -40 KPX O A -50 KPX P period -120 KPX P o -40 KPX P e -30 KPX P comma -120 KPX P a -30 KPX P A -100 KPX Q period 20 KPX Q comma 20 KPX Q U -10 KPX R Y -50 KPX R W -40 KPX R V -50 KPX R U -20 KPX R T -20 KPX R O -20 KPX T y -60 KPX T w -60 KPX T u -90 KPX T semicolon -40 KPX T r -80 KPX T period -80 KPX T o -80 KPX T hyphen -120 KPX T e -60 KPX T comma -80 KPX T colon -40 KPX T a -80 KPX T O -40 KPX T A -90 KPX U period -30 KPX U comma -30 KPX U A -50 KPX V u -60 KPX V semicolon -40 KPX V period -120 KPX V o -90 KPX V hyphen -80 KPX V e -50 KPX V comma -120 KPX V colon -40 KPX V a -60 KPX V O -50 KPX V G -50 KPX V A -80 KPX W y -20 KPX W u -45 KPX W semicolon -10 KPX W period -80 KPX W o -60 KPX W hyphen -40 KPX W e -35 KPX W comma -80 KPX W colon -10 KPX W a -40 KPX W O -20 KPX W A -60 KPX Y u -100 KPX Y semicolon -50 KPX Y period -100 KPX Y o -100 KPX Y e -80 KPX Y comma -100 KPX Y colon -50 KPX Y a -90 KPX Y O -70 KPX Y A -110 KPX a y -20 KPX a w -15 KPX a v -15 KPX a g -10 KPX b y -20 KPX b v -20 KPX b u -20 KPX b l -10 KPX c y -10 KPX c l -20 KPX c k -20 KPX c h -10 KPX colon space -40 KPX comma space -40 KPX comma quoteright -120 KPX comma quotedblright -120 KPX d y -15 KPX d w -15 KPX d v -15 KPX d d -10 KPX e y -15 KPX e x -15 KPX e w -15 KPX e v -15 KPX e period 20 KPX e comma 10 KPX f quoteright 30 KPX f quotedblright 30 KPX f period -10 KPX f o -20 KPX f e -10 KPX f comma -10 KPX g g -10 KPX g e 10 KPX h y -20 KPX k o -15 KPX l y -15 KPX l w -15 KPX m y -30 KPX m u -20 KPX n y -20 KPX n v -40 KPX n u -10 KPX o y -20 KPX o x -30 KPX o w -15 KPX o v -20 KPX p y -15 KPX period space -40 KPX period quoteright -120 KPX period quotedblright -120 KPX quotedblright space -80 KPX quoteleft quoteleft -46 KPX quoteright v -20 KPX quoteright space -80 KPX quoteright s -60 KPX quoteright r -40 KPX quoteright quoteright -46 KPX quoteright l -20 KPX quoteright d -80 KPX r y 10 KPX r v 10 KPX r t 20 KPX r s -15 KPX r q -20 KPX r period -60 KPX r o -20 KPX r hyphen -20 KPX r g -15 KPX r d -20 KPX r comma -60 KPX r c -20 KPX s w -15 KPX semicolon space -40 KPX space quoteleft -60 KPX space quotedblleft -80 KPX space Y -120 KPX space W -80 KPX space V -80 KPX space T -100 KPX v period -80 KPX v o -30 KPX v comma -80 KPX v a -20 KPX w period -40 KPX w o -20 KPX w comma -40 KPX x e -10 KPX y period -80 KPX y o -25 KPX y e -10 KPX y comma -80 KPX y a -30 KPX z e 10 EndKernPairs EndKernData StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 192 186 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 192 186 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 192 186 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 192 186 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 192 186 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 192 186 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 176 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 169 186 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 169 186 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 169 186 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 169 186 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 10 186 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 10 186 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 10 186 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 10 186 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 192 186 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 215 186 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 215 186 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 215 186 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 215 186 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 215 186 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 169 186 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 192 186 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 192 186 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 192 186 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 192 186 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 169 186 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 169 186 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 146 186 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 92 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 92 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 92 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 92 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 92 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 92 0 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 108 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 92 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 92 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 92 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 92 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -22 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -22 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -22 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -22 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 114 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 114 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 114 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 114 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 114 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 114 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 92 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 114 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 114 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 114 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 114 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 92 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 92 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 69 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/phvl8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1988 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date:Mon Jan 11 16:46:06 PST 1988 FontName Helvetica-Light EncodingScheme AdobeStandardEncoding FullName Helvetica Light FamilyName Helvetica Weight Light ItalicAngle 0.0 IsFixedPitch false UnderlinePosition -90 UnderlineThickness 58 Version 001.002 Notice Copyright (c) 1985, 1987, 1988 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype Company. FontBBox -164 -212 1000 979 CapHeight 720 XHeight 518 Descender -204 Ascender 720 StartCharMetrics 228 C 32 ; WX 278 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 130 0 203 720 ; C 34 ; WX 278 ; N quotedbl ; B 57 494 220 720 ; C 35 ; WX 556 ; N numbersign ; B 27 0 530 698 ; C 36 ; WX 556 ; N dollar ; B 37 -95 518 766 ; C 37 ; WX 889 ; N percent ; B 67 -14 821 705 ; C 38 ; WX 667 ; N ampersand ; B 41 -19 644 720 ; C 39 ; WX 222 ; N quoteright ; B 80 495 153 720 ; C 40 ; WX 333 ; N parenleft ; B 55 -191 277 739 ; C 41 ; WX 333 ; N parenright ; B 56 -191 278 739 ; C 42 ; WX 389 ; N asterisk ; B 44 434 344 720 ; C 43 ; WX 660 ; N plus ; B 80 0 580 500 ; C 44 ; WX 278 ; N comma ; B 102 -137 175 88 ; C 45 ; WX 333 ; N hyphen ; B 40 229 293 291 ; C 46 ; WX 278 ; N period ; B 102 0 175 88 ; C 47 ; WX 278 ; N slash ; B -3 -90 288 739 ; C 48 ; WX 556 ; N zero ; B 39 -14 516 705 ; C 49 ; WX 556 ; N one ; B 120 0 366 705 ; C 50 ; WX 556 ; N two ; B 48 0 515 705 ; C 51 ; WX 556 ; N three ; B 34 -14 512 705 ; C 52 ; WX 556 ; N four ; B 36 0 520 698 ; C 53 ; WX 556 ; N five ; B 35 -14 506 698 ; C 54 ; WX 556 ; N six ; B 41 -14 514 705 ; C 55 ; WX 556 ; N seven ; B 59 0 508 698 ; C 56 ; WX 556 ; N eight ; B 44 -14 512 705 ; C 57 ; WX 556 ; N nine ; B 41 -14 515 705 ; C 58 ; WX 278 ; N colon ; B 102 0 175 492 ; C 59 ; WX 278 ; N semicolon ; B 102 -137 175 492 ; C 60 ; WX 660 ; N less ; B 80 -6 580 505 ; C 61 ; WX 660 ; N equal ; B 80 124 580 378 ; C 62 ; WX 660 ; N greater ; B 80 -6 580 505 ; C 63 ; WX 500 ; N question ; B 37 0 472 739 ; C 64 ; WX 800 ; N at ; B 40 -19 760 739 ; C 65 ; WX 667 ; N A ; B 15 0 651 720 ; C 66 ; WX 667 ; N B ; B 81 0 610 720 ; C 67 ; WX 722 ; N C ; B 48 -19 670 739 ; C 68 ; WX 722 ; N D ; B 81 0 669 720 ; C 69 ; WX 611 ; N E ; B 81 0 570 720 ; C 70 ; WX 556 ; N F ; B 74 0 538 720 ; C 71 ; WX 778 ; N G ; B 53 -19 695 739 ; C 72 ; WX 722 ; N H ; B 80 0 642 720 ; C 73 ; WX 278 ; N I ; B 105 0 173 720 ; C 74 ; WX 500 ; N J ; B 22 -19 415 720 ; C 75 ; WX 667 ; N K ; B 85 0 649 720 ; C 76 ; WX 556 ; N L ; B 81 0 535 720 ; C 77 ; WX 833 ; N M ; B 78 0 755 720 ; C 78 ; WX 722 ; N N ; B 79 0 642 720 ; C 79 ; WX 778 ; N O ; B 53 -19 724 739 ; C 80 ; WX 611 ; N P ; B 78 0 576 720 ; C 81 ; WX 778 ; N Q ; B 48 -52 719 739 ; C 82 ; WX 667 ; N R ; B 80 0 612 720 ; C 83 ; WX 611 ; N S ; B 43 -19 567 739 ; C 84 ; WX 556 ; N T ; B 16 0 540 720 ; C 85 ; WX 722 ; N U ; B 82 -19 640 720 ; C 86 ; WX 611 ; N V ; B 18 0 593 720 ; C 87 ; WX 889 ; N W ; B 14 0 875 720 ; C 88 ; WX 611 ; N X ; B 18 0 592 720 ; C 89 ; WX 611 ; N Y ; B 12 0 598 720 ; C 90 ; WX 611 ; N Z ; B 31 0 579 720 ; C 91 ; WX 333 ; N bracketleft ; B 91 -191 282 739 ; C 92 ; WX 278 ; N backslash ; B -46 0 324 739 ; C 93 ; WX 333 ; N bracketright ; B 51 -191 242 739 ; C 94 ; WX 660 ; N asciicircum ; B 73 245 586 698 ; C 95 ; WX 500 ; N underscore ; B 0 -119 500 -61 ; C 96 ; WX 222 ; N quoteleft ; B 69 495 142 720 ; C 97 ; WX 556 ; N a ; B 46 -14 534 532 ; C 98 ; WX 611 ; N b ; B 79 -14 555 720 ; C 99 ; WX 556 ; N c ; B 47 -14 508 532 ; C 100 ; WX 611 ; N d ; B 56 -14 532 720 ; C 101 ; WX 556 ; N e ; B 45 -14 511 532 ; C 102 ; WX 278 ; N f ; B 20 0 257 734 ; L i fi ; L l fl ; C 103 ; WX 611 ; N g ; B 56 -212 532 532 ; C 104 ; WX 556 ; N h ; B 72 0 483 720 ; C 105 ; WX 222 ; N i ; B 78 0 144 720 ; C 106 ; WX 222 ; N j ; B 5 -204 151 720 ; C 107 ; WX 500 ; N k ; B 68 0 487 720 ; C 108 ; WX 222 ; N l ; B 81 0 141 720 ; C 109 ; WX 833 ; N m ; B 64 0 768 532 ; C 110 ; WX 556 ; N n ; B 72 0 483 532 ; C 111 ; WX 556 ; N o ; B 38 -14 518 532 ; C 112 ; WX 611 ; N p ; B 79 -204 555 532 ; C 113 ; WX 611 ; N q ; B 56 -204 532 532 ; C 114 ; WX 333 ; N r ; B 75 0 306 532 ; C 115 ; WX 500 ; N s ; B 46 -14 454 532 ; C 116 ; WX 278 ; N t ; B 20 -14 254 662 ; C 117 ; WX 556 ; N u ; B 72 -14 483 518 ; C 118 ; WX 500 ; N v ; B 17 0 483 518 ; C 119 ; WX 722 ; N w ; B 15 0 707 518 ; C 120 ; WX 500 ; N x ; B 18 0 481 518 ; C 121 ; WX 500 ; N y ; B 18 -204 482 518 ; C 122 ; WX 500 ; N z ; B 33 0 467 518 ; C 123 ; WX 333 ; N braceleft ; B 45 -191 279 739 ; C 124 ; WX 222 ; N bar ; B 81 0 141 739 ; C 125 ; WX 333 ; N braceright ; B 51 -187 285 743 ; C 126 ; WX 660 ; N asciitilde ; B 80 174 580 339 ; C 161 ; WX 333 ; N exclamdown ; B 130 -187 203 532 ; C 162 ; WX 556 ; N cent ; B 45 -141 506 647 ; C 163 ; WX 556 ; N sterling ; B 25 -14 530 705 ; C 164 ; WX 167 ; N fraction ; B -164 -14 331 705 ; C 165 ; WX 556 ; N yen ; B 4 0 552 720 ; C 166 ; WX 556 ; N florin ; B 13 -196 539 734 ; C 167 ; WX 556 ; N section ; B 48 -181 508 739 ; C 168 ; WX 556 ; N currency ; B 27 50 529 553 ; C 169 ; WX 222 ; N quotesingle ; B 85 494 137 720 ; C 170 ; WX 389 ; N quotedblleft ; B 86 495 310 720 ; C 171 ; WX 556 ; N guillemotleft ; B 113 117 443 404 ; C 172 ; WX 389 ; N guilsinglleft ; B 121 117 267 404 ; C 173 ; WX 389 ; N guilsinglright ; B 122 117 268 404 ; C 174 ; WX 500 ; N fi ; B 13 0 435 734 ; C 175 ; WX 500 ; N fl ; B 13 0 432 734 ; C 177 ; WX 500 ; N endash ; B 0 238 500 282 ; C 178 ; WX 556 ; N dagger ; B 37 -166 519 720 ; C 179 ; WX 556 ; N daggerdbl ; B 37 -166 519 720 ; C 180 ; WX 278 ; N periodcentered ; B 90 301 187 398 ; C 182 ; WX 650 ; N paragraph ; B 66 -146 506 720 ; C 183 ; WX 500 ; N bullet ; B 70 180 430 540 ; C 184 ; WX 222 ; N quotesinglbase ; B 80 -137 153 88 ; C 185 ; WX 389 ; N quotedblbase ; B 79 -137 303 88 ; C 186 ; WX 389 ; N quotedblright ; B 79 495 303 720 ; C 187 ; WX 556 ; N guillemotright ; B 113 117 443 404 ; C 188 ; WX 1000 ; N ellipsis ; B 131 0 870 88 ; C 189 ; WX 1000 ; N perthousand ; B 14 -14 985 705 ; C 191 ; WX 500 ; N questiondown ; B 28 -207 463 532 ; C 193 ; WX 333 ; N grave ; B 45 574 234 713 ; C 194 ; WX 333 ; N acute ; B 109 574 297 713 ; C 195 ; WX 333 ; N circumflex ; B 24 574 318 713 ; C 196 ; WX 333 ; N tilde ; B 16 586 329 688 ; C 197 ; WX 333 ; N macron ; B 23 612 319 657 ; C 198 ; WX 333 ; N breve ; B 28 580 316 706 ; C 199 ; WX 333 ; N dotaccent ; B 134 584 199 686 ; C 200 ; WX 333 ; N dieresis ; B 60 584 284 686 ; C 202 ; WX 333 ; N ring ; B 67 578 266 777 ; C 203 ; WX 333 ; N cedilla ; B 54 -207 257 0 ; C 205 ; WX 333 ; N hungarumlaut ; B 109 574 459 713 ; C 206 ; WX 333 ; N ogonek ; B 74 -190 228 0 ; C 207 ; WX 333 ; N caron ; B 24 574 318 713 ; C 208 ; WX 1000 ; N emdash ; B 0 238 1000 282 ; C 225 ; WX 1000 ; N AE ; B 5 0 960 720 ; C 227 ; WX 334 ; N ordfeminine ; B 8 307 325 739 ; C 232 ; WX 556 ; N Lslash ; B 0 0 535 720 ; C 233 ; WX 778 ; N Oslash ; B 42 -37 736 747 ; C 234 ; WX 1000 ; N OE ; B 41 -19 967 739 ; C 235 ; WX 334 ; N ordmasculine ; B 11 307 323 739 ; C 241 ; WX 889 ; N ae ; B 39 -14 847 532 ; C 245 ; WX 222 ; N dotlessi ; B 78 0 138 518 ; C 248 ; WX 222 ; N lslash ; B 10 0 212 720 ; C 249 ; WX 556 ; N oslash ; B 35 -23 521 541 ; C 250 ; WX 944 ; N oe ; B 36 -14 904 532 ; C 251 ; WX 500 ; N germandbls ; B 52 -14 459 734 ; C -1 ; WX 667 ; N Aacute ; B 15 0 651 915 ; C -1 ; WX 667 ; N Acircumflex ; B 15 0 651 915 ; C -1 ; WX 667 ; N Adieresis ; B 15 0 651 888 ; C -1 ; WX 667 ; N Agrave ; B 15 0 651 915 ; C -1 ; WX 667 ; N Aring ; B 15 0 651 979 ; C -1 ; WX 667 ; N Atilde ; B 15 0 651 890 ; C -1 ; WX 722 ; N Ccedilla ; B 48 -207 670 739 ; C -1 ; WX 611 ; N Eacute ; B 81 0 570 915 ; C -1 ; WX 611 ; N Ecircumflex ; B 81 0 570 915 ; C -1 ; WX 611 ; N Edieresis ; B 81 0 570 888 ; C -1 ; WX 611 ; N Egrave ; B 81 0 570 915 ; C -1 ; WX 722 ; N Eth ; B 10 0 669 720 ; C -1 ; WX 278 ; N Iacute ; B 62 0 250 915 ; C -1 ; WX 278 ; N Icircumflex ; B -23 0 271 915 ; C -1 ; WX 278 ; N Idieresis ; B 13 0 237 888 ; C -1 ; WX 278 ; N Igrave ; B 18 0 207 915 ; C -1 ; WX 722 ; N Ntilde ; B 79 0 642 890 ; C -1 ; WX 778 ; N Oacute ; B 53 -19 724 915 ; C -1 ; WX 778 ; N Ocircumflex ; B 53 -19 724 915 ; C -1 ; WX 778 ; N Odieresis ; B 53 -19 724 888 ; C -1 ; WX 778 ; N Ograve ; B 53 -19 724 915 ; C -1 ; WX 778 ; N Otilde ; B 53 -19 724 890 ; C -1 ; WX 611 ; N Scaron ; B 43 -19 567 915 ; C -1 ; WX 611 ; N Thorn ; B 78 0 576 720 ; C -1 ; WX 722 ; N Uacute ; B 82 -19 640 915 ; C -1 ; WX 722 ; N Ucircumflex ; B 82 -19 640 915 ; C -1 ; WX 722 ; N Udieresis ; B 82 -19 640 888 ; C -1 ; WX 722 ; N Ugrave ; B 82 -19 640 915 ; C -1 ; WX 611 ; N Yacute ; B 12 0 598 915 ; C -1 ; WX 611 ; N Ydieresis ; B 12 0 598 888 ; C -1 ; WX 611 ; N Zcaron ; B 31 0 579 915 ; C -1 ; WX 556 ; N aacute ; B 46 -14 534 713 ; C -1 ; WX 556 ; N acircumflex ; B 46 -14 534 713 ; C -1 ; WX 556 ; N adieresis ; B 46 -14 534 686 ; C -1 ; WX 556 ; N agrave ; B 46 -14 534 713 ; C -1 ; WX 556 ; N aring ; B 46 -14 534 777 ; C -1 ; WX 556 ; N atilde ; B 46 -14 534 688 ; C -1 ; WX 222 ; N brokenbar ; B 81 0 141 739 ; C -1 ; WX 556 ; N ccedilla ; B 47 -207 508 532 ; C -1 ; WX 800 ; N copyright ; B 21 -19 779 739 ; C -1 ; WX 400 ; N degree ; B 50 405 350 705 ; C -1 ; WX 660 ; N divide ; B 80 0 580 500 ; C -1 ; WX 556 ; N eacute ; B 45 -14 511 713 ; C -1 ; WX 556 ; N ecircumflex ; B 45 -14 511 713 ; C -1 ; WX 556 ; N edieresis ; B 45 -14 511 686 ; C -1 ; WX 556 ; N egrave ; B 45 -14 511 713 ; C -1 ; WX 556 ; N eth ; B 38 -14 518 739 ; C -1 ; WX 222 ; N iacute ; B 34 0 222 713 ; C -1 ; WX 222 ; N icircumflex ; B -51 0 243 713 ; C -1 ; WX 222 ; N idieresis ; B -15 0 209 686 ; C -1 ; WX 222 ; N igrave ; B -10 0 179 713 ; C -1 ; WX 660 ; N logicalnot ; B 80 112 580 378 ; C -1 ; WX 660 ; N minus ; B 80 220 580 280 ; C -1 ; WX 556 ; N mu ; B 72 -204 483 518 ; C -1 ; WX 660 ; N multiply ; B 83 6 578 500 ; C -1 ; WX 556 ; N ntilde ; B 72 0 483 688 ; C -1 ; WX 556 ; N oacute ; B 38 -14 518 713 ; C -1 ; WX 556 ; N ocircumflex ; B 38 -14 518 713 ; C -1 ; WX 556 ; N odieresis ; B 38 -14 518 686 ; C -1 ; WX 556 ; N ograve ; B 38 -14 518 713 ; C -1 ; WX 834 ; N onehalf ; B 40 -14 794 739 ; C -1 ; WX 834 ; N onequarter ; B 40 -14 794 739 ; C -1 ; WX 333 ; N onesuperior ; B 87 316 247 739 ; C -1 ; WX 556 ; N otilde ; B 38 -14 518 688 ; C -1 ; WX 660 ; N plusminus ; B 80 0 580 500 ; C -1 ; WX 800 ; N registered ; B 21 -19 779 739 ; C -1 ; WX 500 ; N scaron ; B 46 -14 454 713 ; C -1 ; WX 611 ; N thorn ; B 79 -204 555 720 ; C -1 ; WX 834 ; N threequarters ; B 40 -14 794 739 ; C -1 ; WX 333 ; N threesuperior ; B 11 308 322 739 ; C -1 ; WX 940 ; N trademark ; B 29 299 859 720 ; C -1 ; WX 333 ; N twosuperior ; B 15 316 318 739 ; C -1 ; WX 556 ; N uacute ; B 72 -14 483 713 ; C -1 ; WX 556 ; N ucircumflex ; B 72 -14 483 713 ; C -1 ; WX 556 ; N udieresis ; B 72 -14 483 686 ; C -1 ; WX 556 ; N ugrave ; B 72 -14 483 713 ; C -1 ; WX 500 ; N yacute ; B 18 -204 482 713 ; C -1 ; WX 500 ; N ydieresis ; B 18 -204 482 686 ; C -1 ; WX 500 ; N zcaron ; B 33 0 467 713 ; EndCharMetrics StartKernData StartKernPairs 115 KPX A y -18 KPX A w -18 KPX A v -18 KPX A quoteright -74 KPX A Y -74 KPX A W -37 KPX A V -74 KPX A T -92 KPX F period -129 KPX F comma -129 KPX F A -55 KPX L y -37 KPX L quoteright -74 KPX L Y -111 KPX L W -55 KPX L V -92 KPX L T -92 KPX P period -129 KPX P comma -129 KPX P A -74 KPX R y 0 KPX R Y -37 KPX R W -18 KPX R V -18 KPX R T -18 KPX T y -84 KPX T w -84 KPX T u -92 KPX T semicolon -111 KPX T s -111 KPX T r -92 KPX T period -111 KPX T o -111 KPX T i 0 KPX T hyphen -129 KPX T e -111 KPX T comma -111 KPX T colon -111 KPX T c -111 KPX T a -111 KPX T A -92 KPX V y -18 KPX V u -37 KPX V semicolon -74 KPX V r -37 KPX V period -129 KPX V o -55 KPX V i -18 KPX V hyphen -55 KPX V e -55 KPX V comma -129 KPX V colon -74 KPX V a -55 KPX V A -74 KPX W y 0 KPX W u -18 KPX W semicolon -18 KPX W r -18 KPX W period -74 KPX W o -18 KPX W i 0 KPX W hyphen 0 KPX W e -18 KPX W comma -74 KPX W colon -18 KPX W a -37 KPX W A -37 KPX Y v -40 KPX Y u -37 KPX Y semicolon -92 KPX Y q -92 KPX Y period -111 KPX Y p -37 KPX Y o -92 KPX Y i -20 KPX Y hyphen -111 KPX Y e -92 KPX Y comma -111 KPX Y colon -92 KPX Y a -92 KPX Y A -74 KPX f quoteright 18 KPX f f -18 KPX quoteleft quoteleft -18 KPX quoteright t -18 KPX quoteright s -74 KPX quoteright quoteright -18 KPX r z 0 KPX r y 18 KPX r x 0 KPX r w 0 KPX r v 0 KPX r u 0 KPX r t 18 KPX r r 0 KPX r quoteright 0 KPX r q -18 KPX r period -92 KPX r o -18 KPX r n 18 KPX r m 18 KPX r hyphen -55 KPX r h 0 KPX r g 0 KPX r f 18 KPX r e -18 KPX r d -18 KPX r comma -92 KPX r c -18 KPX v period -74 KPX v comma -74 KPX w period -55 KPX w comma -55 KPX y period -92 KPX y comma -92 EndKernPairs EndKernData StartComposites 58 CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 202 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 83 0 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 139 202 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 83 0 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 194 0 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 111 0 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 139 202 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 83 0 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 139 202 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 83 0 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 194 202 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 194 202 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 194 202 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 194 202 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 111 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 111 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 111 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 111 0 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute -47 202 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -47 202 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -47 202 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave -27 202 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -75 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -75 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -75 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -55 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 139 202 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 139 202 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 139 202 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 139 202 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 111 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 111 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 111 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 111 0 ; CC Aacute 2 ; PCC A 0 0 ; PCC acute 167 202 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 167 202 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 167 202 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 167 202 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 111 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 111 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 111 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 111 0 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 222 202 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 222 202 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 222 202 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 222 202 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 111 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 111 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 111 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 111 0 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 167 202 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 111 0 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 194 202 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 111 0 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 222 202 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 111 0 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 187 202 ; CC aring 2 ; PCC a 0 0 ; PCC ring 111 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/phvlo8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1988 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date:Mon Jan 11 17:38:44 PST 1988 FontName Helvetica-LightOblique EncodingScheme AdobeStandardEncoding FullName Helvetica Light Oblique FamilyName Helvetica Weight Light ItalicAngle -12.0 IsFixedPitch false UnderlinePosition -90 UnderlineThickness 58 Version 001.002 Notice Copyright (c) 1985, 1987, 1988 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype Company. FontBBox -167 -212 1110 979 CapHeight 720 XHeight 518 Descender -204 Ascender 720 StartCharMetrics 228 C 32 ; WX 278 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 130 0 356 720 ; C 34 ; WX 278 ; N quotedbl ; B 162 494 373 720 ; C 35 ; WX 556 ; N numbersign ; B 75 0 633 698 ; C 36 ; WX 556 ; N dollar ; B 75 -95 613 766 ; C 37 ; WX 889 ; N percent ; B 176 -14 860 705 ; C 38 ; WX 667 ; N ampersand ; B 77 -19 646 720 ; C 39 ; WX 222 ; N quoteright ; B 185 495 306 720 ; C 40 ; WX 333 ; N parenleft ; B 97 -191 434 739 ; C 41 ; WX 333 ; N parenright ; B 15 -191 353 739 ; C 42 ; WX 389 ; N asterisk ; B 172 434 472 720 ; C 43 ; WX 660 ; N plus ; B 127 0 640 500 ; C 44 ; WX 278 ; N comma ; B 73 -137 194 88 ; C 45 ; WX 333 ; N hyphen ; B 89 229 355 291 ; C 46 ; WX 278 ; N period ; B 102 0 194 88 ; C 47 ; WX 278 ; N slash ; B -22 -90 445 739 ; C 48 ; WX 556 ; N zero ; B 93 -14 609 705 ; C 49 ; WX 556 ; N one ; B 231 0 516 705 ; C 50 ; WX 556 ; N two ; B 48 0 628 705 ; C 51 ; WX 556 ; N three ; B 74 -14 605 705 ; C 52 ; WX 556 ; N four ; B 73 0 570 698 ; C 53 ; WX 556 ; N five ; B 71 -14 616 698 ; C 54 ; WX 556 ; N six ; B 94 -14 617 705 ; C 55 ; WX 556 ; N seven ; B 152 0 656 698 ; C 56 ; WX 556 ; N eight ; B 80 -14 601 705 ; C 57 ; WX 556 ; N nine ; B 84 -14 607 705 ; C 58 ; WX 278 ; N colon ; B 102 0 280 492 ; C 59 ; WX 278 ; N semicolon ; B 73 -137 280 492 ; C 60 ; WX 660 ; N less ; B 129 -6 687 505 ; C 61 ; WX 660 ; N equal ; B 106 124 660 378 ; C 62 ; WX 660 ; N greater ; B 79 -6 640 505 ; C 63 ; WX 500 ; N question ; B 148 0 594 739 ; C 64 ; WX 800 ; N at ; B 108 -19 857 739 ; C 65 ; WX 667 ; N A ; B 15 0 651 720 ; C 66 ; WX 667 ; N B ; B 81 0 697 720 ; C 67 ; WX 722 ; N C ; B 111 -19 771 739 ; C 68 ; WX 722 ; N D ; B 81 0 758 720 ; C 69 ; WX 611 ; N E ; B 81 0 713 720 ; C 70 ; WX 556 ; N F ; B 74 0 691 720 ; C 71 ; WX 778 ; N G ; B 116 -19 796 739 ; C 72 ; WX 722 ; N H ; B 80 0 795 720 ; C 73 ; WX 278 ; N I ; B 105 0 326 720 ; C 74 ; WX 500 ; N J ; B 58 -19 568 720 ; C 75 ; WX 667 ; N K ; B 85 0 752 720 ; C 76 ; WX 556 ; N L ; B 81 0 547 720 ; C 77 ; WX 833 ; N M ; B 78 0 908 720 ; C 78 ; WX 722 ; N N ; B 79 0 795 720 ; C 79 ; WX 778 ; N O ; B 117 -19 812 739 ; C 80 ; WX 611 ; N P ; B 78 0 693 720 ; C 81 ; WX 778 ; N Q ; B 112 -52 808 739 ; C 82 ; WX 667 ; N R ; B 80 0 726 720 ; C 83 ; WX 611 ; N S ; B 82 -19 663 739 ; C 84 ; WX 556 ; N T ; B 157 0 693 720 ; C 85 ; WX 722 ; N U ; B 129 -19 793 720 ; C 86 ; WX 611 ; N V ; B 171 0 746 720 ; C 87 ; WX 889 ; N W ; B 167 0 1028 720 ; C 88 ; WX 611 ; N X ; B 18 0 734 720 ; C 89 ; WX 611 ; N Y ; B 165 0 751 720 ; C 90 ; WX 611 ; N Z ; B 31 0 729 720 ; C 91 ; WX 333 ; N bracketleft ; B 50 -191 439 739 ; C 92 ; WX 278 ; N backslash ; B 111 0 324 739 ; C 93 ; WX 333 ; N bracketright ; B 10 -191 399 739 ; C 94 ; WX 660 ; N asciicircum ; B 125 245 638 698 ; C 95 ; WX 500 ; N underscore ; B -25 -119 487 -61 ; C 96 ; WX 222 ; N quoteleft ; B 174 495 295 720 ; C 97 ; WX 556 ; N a ; B 71 -14 555 532 ; C 98 ; WX 611 ; N b ; B 79 -14 619 720 ; C 99 ; WX 556 ; N c ; B 92 -14 576 532 ; C 100 ; WX 611 ; N d ; B 101 -14 685 720 ; C 101 ; WX 556 ; N e ; B 90 -14 575 532 ; C 102 ; WX 278 ; N f ; B 97 0 412 734 ; L i fi ; L l fl ; C 103 ; WX 611 ; N g ; B 56 -212 642 532 ; C 104 ; WX 556 ; N h ; B 72 0 565 720 ; C 105 ; WX 222 ; N i ; B 81 0 297 720 ; C 106 ; WX 222 ; N j ; B -38 -204 304 720 ; C 107 ; WX 500 ; N k ; B 68 0 574 720 ; C 108 ; WX 222 ; N l ; B 81 0 294 720 ; C 109 ; WX 833 ; N m ; B 64 0 848 532 ; C 110 ; WX 556 ; N n ; B 72 0 565 532 ; C 111 ; WX 556 ; N o ; B 84 -14 582 532 ; C 112 ; WX 611 ; N p ; B 36 -204 620 532 ; C 113 ; WX 611 ; N q ; B 102 -204 642 532 ; C 114 ; WX 333 ; N r ; B 75 0 419 532 ; C 115 ; WX 500 ; N s ; B 78 -14 519 532 ; C 116 ; WX 278 ; N t ; B 108 -14 360 662 ; C 117 ; WX 556 ; N u ; B 103 -14 593 518 ; C 118 ; WX 500 ; N v ; B 127 0 593 518 ; C 119 ; WX 722 ; N w ; B 125 0 817 518 ; C 120 ; WX 500 ; N x ; B 18 0 584 518 ; C 121 ; WX 500 ; N y ; B 26 -204 592 518 ; C 122 ; WX 500 ; N z ; B 33 0 564 518 ; C 123 ; WX 333 ; N braceleft ; B 103 -191 436 739 ; C 124 ; WX 222 ; N bar ; B 81 0 298 739 ; C 125 ; WX 333 ; N braceright ; B 12 -187 344 743 ; C 126 ; WX 660 ; N asciitilde ; B 127 174 645 339 ; C 161 ; WX 333 ; N exclamdown ; B 90 -187 316 532 ; C 162 ; WX 556 ; N cent ; B 90 -141 574 647 ; C 163 ; WX 556 ; N sterling ; B 51 -14 613 705 ; C 164 ; WX 167 ; N fraction ; B -167 -14 481 705 ; C 165 ; WX 556 ; N yen ; B 110 0 705 720 ; C 166 ; WX 556 ; N florin ; B -26 -196 691 734 ; C 167 ; WX 556 ; N section ; B 91 -181 581 739 ; C 168 ; WX 556 ; N currency ; B 55 50 629 553 ; C 169 ; WX 222 ; N quotesingle ; B 190 494 290 720 ; C 170 ; WX 389 ; N quotedblleft ; B 191 495 463 720 ; C 171 ; WX 556 ; N guillemotleft ; B 161 117 529 404 ; C 172 ; WX 389 ; N guilsinglleft ; B 169 117 353 404 ; C 173 ; WX 389 ; N guilsinglright ; B 147 117 330 404 ; C 174 ; WX 500 ; N fi ; B 92 0 588 734 ; C 175 ; WX 500 ; N fl ; B 92 0 585 734 ; C 177 ; WX 500 ; N endash ; B 51 238 560 282 ; C 178 ; WX 556 ; N dagger ; B 130 -166 623 720 ; C 179 ; WX 556 ; N daggerdbl ; B 49 -166 625 720 ; C 180 ; WX 278 ; N periodcentered ; B 163 301 262 398 ; C 182 ; WX 650 ; N paragraph ; B 174 -146 659 720 ; C 183 ; WX 500 ; N bullet ; B 142 180 510 540 ; C 184 ; WX 222 ; N quotesinglbase ; B 51 -137 172 88 ; C 185 ; WX 389 ; N quotedblbase ; B 50 -137 322 88 ; C 186 ; WX 389 ; N quotedblright ; B 184 495 456 720 ; C 187 ; WX 556 ; N guillemotright ; B 138 117 505 404 ; C 188 ; WX 1000 ; N ellipsis ; B 131 0 889 88 ; C 189 ; WX 1000 ; N perthousand ; B 83 -14 1020 705 ; C 191 ; WX 500 ; N questiondown ; B 19 -207 465 532 ; C 193 ; WX 333 ; N grave ; B 197 574 356 713 ; C 194 ; WX 333 ; N acute ; B 231 574 449 713 ; C 195 ; WX 333 ; N circumflex ; B 146 574 440 713 ; C 196 ; WX 333 ; N tilde ; B 141 586 475 688 ; C 197 ; WX 333 ; N macron ; B 153 612 459 657 ; C 198 ; WX 333 ; N breve ; B 177 580 466 706 ; C 199 ; WX 333 ; N dotaccent ; B 258 584 345 686 ; C 200 ; WX 333 ; N dieresis ; B 184 584 430 686 ; C 202 ; WX 333 ; N ring ; B 209 578 412 777 ; C 203 ; WX 333 ; N cedilla ; B 14 -207 233 0 ; C 205 ; WX 333 ; N hungarumlaut ; B 231 574 611 713 ; C 206 ; WX 333 ; N ogonek ; B 50 -190 199 0 ; C 207 ; WX 333 ; N caron ; B 176 574 470 713 ; C 208 ; WX 1000 ; N emdash ; B 51 238 1060 282 ; C 225 ; WX 1000 ; N AE ; B 5 0 1101 720 ; C 227 ; WX 334 ; N ordfeminine ; B 73 307 423 739 ; C 232 ; WX 556 ; N Lslash ; B 68 0 547 720 ; C 233 ; WX 778 ; N Oslash ; B 41 -37 887 747 ; C 234 ; WX 1000 ; N OE ; B 104 -19 1110 739 ; C 235 ; WX 334 ; N ordmasculine ; B 76 307 450 739 ; C 241 ; WX 889 ; N ae ; B 63 -14 913 532 ; C 245 ; WX 222 ; N dotlessi ; B 78 0 248 518 ; C 248 ; WX 222 ; N lslash ; B 74 0 316 720 ; C 249 ; WX 556 ; N oslash ; B 36 -23 629 541 ; C 250 ; WX 944 ; N oe ; B 82 -14 970 532 ; C 251 ; WX 500 ; N germandbls ; B 52 -14 554 734 ; C -1 ; WX 667 ; N Aacute ; B 15 0 659 915 ; C -1 ; WX 667 ; N Acircumflex ; B 15 0 651 915 ; C -1 ; WX 667 ; N Adieresis ; B 15 0 651 888 ; C -1 ; WX 667 ; N Agrave ; B 15 0 651 915 ; C -1 ; WX 667 ; N Aring ; B 15 0 651 979 ; C -1 ; WX 667 ; N Atilde ; B 15 0 685 890 ; C -1 ; WX 722 ; N Ccedilla ; B 111 -207 771 739 ; C -1 ; WX 611 ; N Eacute ; B 81 0 713 915 ; C -1 ; WX 611 ; N Ecircumflex ; B 81 0 713 915 ; C -1 ; WX 611 ; N Edieresis ; B 81 0 713 888 ; C -1 ; WX 611 ; N Egrave ; B 81 0 713 915 ; C -1 ; WX 722 ; N Eth ; B 81 0 758 720 ; C -1 ; WX 278 ; N Iacute ; B 105 0 445 915 ; C -1 ; WX 278 ; N Icircumflex ; B 105 0 436 915 ; C -1 ; WX 278 ; N Idieresis ; B 105 0 426 888 ; C -1 ; WX 278 ; N Igrave ; B 105 0 372 915 ; C -1 ; WX 722 ; N Ntilde ; B 79 0 795 890 ; C -1 ; WX 778 ; N Oacute ; B 117 -19 812 915 ; C -1 ; WX 778 ; N Ocircumflex ; B 117 -19 812 915 ; C -1 ; WX 778 ; N Odieresis ; B 117 -19 812 888 ; C -1 ; WX 778 ; N Ograve ; B 117 -19 812 915 ; C -1 ; WX 778 ; N Otilde ; B 117 -19 812 890 ; C -1 ; WX 611 ; N Scaron ; B 82 -19 663 915 ; C -1 ; WX 611 ; N Thorn ; B 78 0 661 720 ; C -1 ; WX 722 ; N Uacute ; B 129 -19 793 915 ; C -1 ; WX 722 ; N Ucircumflex ; B 129 -19 793 915 ; C -1 ; WX 722 ; N Udieresis ; B 129 -19 793 888 ; C -1 ; WX 722 ; N Ugrave ; B 129 -19 793 915 ; C -1 ; WX 611 ; N Yacute ; B 165 0 751 915 ; C -1 ; WX 611 ; N Ydieresis ; B 165 0 751 888 ; C -1 ; WX 611 ; N Zcaron ; B 31 0 729 915 ; C -1 ; WX 556 ; N aacute ; B 71 -14 561 713 ; C -1 ; WX 556 ; N acircumflex ; B 71 -14 555 713 ; C -1 ; WX 556 ; N adieresis ; B 71 -14 555 686 ; C -1 ; WX 556 ; N agrave ; B 71 -14 555 713 ; C -1 ; WX 556 ; N aring ; B 71 -14 555 777 ; C -1 ; WX 556 ; N atilde ; B 71 -14 587 688 ; C -1 ; WX 222 ; N brokenbar ; B 81 0 298 739 ; C -1 ; WX 556 ; N ccedilla ; B 92 -207 576 532 ; C -1 ; WX 800 ; N copyright ; B 89 -19 864 739 ; C -1 ; WX 400 ; N degree ; B 165 405 471 705 ; C -1 ; WX 660 ; N divide ; B 127 0 640 500 ; C -1 ; WX 556 ; N eacute ; B 90 -14 575 713 ; C -1 ; WX 556 ; N ecircumflex ; B 90 -14 575 713 ; C -1 ; WX 556 ; N edieresis ; B 90 -14 575 686 ; C -1 ; WX 556 ; N egrave ; B 90 -14 575 713 ; C -1 ; WX 556 ; N eth ; B 84 -14 582 739 ; C -1 ; WX 222 ; N iacute ; B 78 0 374 713 ; C -1 ; WX 222 ; N icircumflex ; B 71 0 365 713 ; C -1 ; WX 222 ; N idieresis ; B 78 0 355 686 ; C -1 ; WX 222 ; N igrave ; B 78 0 301 713 ; C -1 ; WX 660 ; N logicalnot ; B 148 112 660 378 ; C -1 ; WX 660 ; N minus ; B 127 220 640 280 ; C -1 ; WX 556 ; N mu ; B 29 -204 593 518 ; C -1 ; WX 660 ; N multiply ; B 92 6 677 500 ; C -1 ; WX 556 ; N ntilde ; B 72 0 587 688 ; C -1 ; WX 556 ; N oacute ; B 84 -14 582 713 ; C -1 ; WX 556 ; N ocircumflex ; B 84 -14 582 713 ; C -1 ; WX 556 ; N odieresis ; B 84 -14 582 686 ; C -1 ; WX 556 ; N ograve ; B 84 -14 582 713 ; C -1 ; WX 834 ; N onehalf ; B 125 -14 862 739 ; C -1 ; WX 834 ; N onequarter ; B 165 -14 823 739 ; C -1 ; WX 333 ; N onesuperior ; B 221 316 404 739 ; C -1 ; WX 556 ; N otilde ; B 84 -14 587 688 ; C -1 ; WX 660 ; N plusminus ; B 80 0 650 500 ; C -1 ; WX 800 ; N registered ; B 89 -19 864 739 ; C -1 ; WX 500 ; N scaron ; B 78 -14 554 713 ; C -1 ; WX 611 ; N thorn ; B 36 -204 620 720 ; C -1 ; WX 834 ; N threequarters ; B 131 -14 853 739 ; C -1 ; WX 333 ; N threesuperior ; B 102 308 444 739 ; C -1 ; WX 940 ; N trademark ; B 174 299 1012 720 ; C -1 ; WX 333 ; N twosuperior ; B 82 316 453 739 ; C -1 ; WX 556 ; N uacute ; B 103 -14 593 713 ; C -1 ; WX 556 ; N ucircumflex ; B 103 -14 593 713 ; C -1 ; WX 556 ; N udieresis ; B 103 -14 593 686 ; C -1 ; WX 556 ; N ugrave ; B 103 -14 593 713 ; C -1 ; WX 500 ; N yacute ; B 26 -204 592 713 ; C -1 ; WX 500 ; N ydieresis ; B 26 -204 592 686 ; C -1 ; WX 500 ; N zcaron ; B 33 0 564 713 ; EndCharMetrics StartKernData StartKernPairs 115 KPX A y -18 KPX A w -18 KPX A v -18 KPX A quoteright -74 KPX A Y -74 KPX A W -37 KPX A V -74 KPX A T -92 KPX F period -129 KPX F comma -129 KPX F A -55 KPX L y -37 KPX L quoteright -74 KPX L Y -111 KPX L W -55 KPX L V -92 KPX L T -92 KPX P period -129 KPX P comma -129 KPX P A -74 KPX R y 0 KPX R Y -37 KPX R W -18 KPX R V -18 KPX R T -18 KPX T y -84 KPX T w -84 KPX T u -92 KPX T semicolon -111 KPX T s -111 KPX T r -92 KPX T period -111 KPX T o -111 KPX T i 0 KPX T hyphen -129 KPX T e -111 KPX T comma -111 KPX T colon -111 KPX T c -111 KPX T a -111 KPX T A -92 KPX V y -18 KPX V u -37 KPX V semicolon -74 KPX V r -37 KPX V period -129 KPX V o -55 KPX V i -18 KPX V hyphen -55 KPX V e -55 KPX V comma -129 KPX V colon -74 KPX V a -55 KPX V A -74 KPX W y 0 KPX W u -18 KPX W semicolon -18 KPX W r -18 KPX W period -74 KPX W o -18 KPX W i 0 KPX W hyphen 0 KPX W e -18 KPX W comma -74 KPX W colon -18 KPX W a -37 KPX W A -37 KPX Y v -40 KPX Y u -37 KPX Y semicolon -92 KPX Y q -92 KPX Y period -111 KPX Y p -37 KPX Y o -92 KPX Y i -20 KPX Y hyphen -111 KPX Y e -92 KPX Y comma -111 KPX Y colon -92 KPX Y a -92 KPX Y A -74 KPX f quoteright 18 KPX f f -18 KPX quoteleft quoteleft -18 KPX quoteright t -18 KPX quoteright s -74 KPX quoteright quoteright -18 KPX r z 0 KPX r y 18 KPX r x 0 KPX r w 0 KPX r v 0 KPX r u 0 KPX r t 18 KPX r r 0 KPX r quoteright 0 KPX r q -18 KPX r period -92 KPX r o -18 KPX r n 18 KPX r m 18 KPX r hyphen -55 KPX r h 0 KPX r g 0 KPX r f 18 KPX r e -18 KPX r d -18 KPX r comma -92 KPX r c -18 KPX v period -74 KPX v comma -74 KPX w period -55 KPX w comma -55 KPX y period -92 KPX y comma -92 EndKernPairs EndKernData StartComposites 58 CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 202 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 83 0 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 139 202 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 83 0 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 194 0 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 111 0 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 139 202 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 83 0 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 139 202 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 83 0 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 194 202 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 194 202 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 194 202 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 194 202 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 111 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 111 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 111 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 111 0 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute -47 202 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -47 202 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -47 202 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave -27 202 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -75 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -75 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -75 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -55 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 139 202 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 139 202 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 139 202 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 139 202 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 111 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 111 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 111 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 111 0 ; CC Aacute 2 ; PCC A 0 0 ; PCC acute 167 202 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 167 202 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 167 202 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 167 202 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 111 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 111 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 111 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 111 0 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 222 202 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 222 202 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 222 202 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 222 202 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 111 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 111 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 111 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 111 0 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 167 202 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 111 0 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 194 202 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 111 0 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 222 202 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 111 0 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 187 202 ; CC aring 2 ; PCC a 0 0 ; PCC ring 111 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/phvr8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All rights reserved. Comment Creation Date: Thu Mar 15 08:58:00 1990 Comment UniqueID 28352 Comment VMusage 26389 33281 FontName Helvetica FullName Helvetica FamilyName Helvetica Weight Medium ItalicAngle 0 IsFixedPitch false FontBBox -166 -225 1000 931 UnderlinePosition -100 UnderlineThickness 50 Version 001.006 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All rights reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 718 XHeight 523 Ascender 718 Descender -207 StartCharMetrics 228 C 32 ; WX 278 ; N space ; B 0 0 0 0 ; C 33 ; WX 278 ; N exclam ; B 90 0 187 718 ; C 34 ; WX 355 ; N quotedbl ; B 70 463 285 718 ; C 35 ; WX 556 ; N numbersign ; B 28 0 529 688 ; C 36 ; WX 556 ; N dollar ; B 32 -115 520 775 ; C 37 ; WX 889 ; N percent ; B 39 -19 850 703 ; C 38 ; WX 667 ; N ampersand ; B 44 -15 645 718 ; C 39 ; WX 222 ; N quoteright ; B 53 463 157 718 ; C 40 ; WX 333 ; N parenleft ; B 68 -207 299 733 ; C 41 ; WX 333 ; N parenright ; B 34 -207 265 733 ; C 42 ; WX 389 ; N asterisk ; B 39 431 349 718 ; C 43 ; WX 584 ; N plus ; B 39 0 545 505 ; C 44 ; WX 278 ; N comma ; B 87 -147 191 106 ; C 45 ; WX 333 ; N hyphen ; B 44 232 289 322 ; C 46 ; WX 278 ; N period ; B 87 0 191 106 ; C 47 ; WX 278 ; N slash ; B -17 -19 295 737 ; C 48 ; WX 556 ; N zero ; B 37 -19 519 703 ; C 49 ; WX 556 ; N one ; B 101 0 359 703 ; C 50 ; WX 556 ; N two ; B 26 0 507 703 ; C 51 ; WX 556 ; N three ; B 34 -19 522 703 ; C 52 ; WX 556 ; N four ; B 25 0 523 703 ; C 53 ; WX 556 ; N five ; B 32 -19 514 688 ; C 54 ; WX 556 ; N six ; B 38 -19 518 703 ; C 55 ; WX 556 ; N seven ; B 37 0 523 688 ; C 56 ; WX 556 ; N eight ; B 38 -19 517 703 ; C 57 ; WX 556 ; N nine ; B 42 -19 514 703 ; C 58 ; WX 278 ; N colon ; B 87 0 191 516 ; C 59 ; WX 278 ; N semicolon ; B 87 -147 191 516 ; C 60 ; WX 584 ; N less ; B 48 11 536 495 ; C 61 ; WX 584 ; N equal ; B 39 115 545 390 ; C 62 ; WX 584 ; N greater ; B 48 11 536 495 ; C 63 ; WX 556 ; N question ; B 56 0 492 727 ; C 64 ; WX 1015 ; N at ; B 147 -19 868 737 ; C 65 ; WX 667 ; N A ; B 14 0 654 718 ; C 66 ; WX 667 ; N B ; B 74 0 627 718 ; C 67 ; WX 722 ; N C ; B 44 -19 681 737 ; C 68 ; WX 722 ; N D ; B 81 0 674 718 ; C 69 ; WX 667 ; N E ; B 86 0 616 718 ; C 70 ; WX 611 ; N F ; B 86 0 583 718 ; C 71 ; WX 778 ; N G ; B 48 -19 704 737 ; C 72 ; WX 722 ; N H ; B 77 0 646 718 ; C 73 ; WX 278 ; N I ; B 91 0 188 718 ; C 74 ; WX 500 ; N J ; B 17 -19 428 718 ; C 75 ; WX 667 ; N K ; B 76 0 663 718 ; C 76 ; WX 556 ; N L ; B 76 0 537 718 ; C 77 ; WX 833 ; N M ; B 73 0 761 718 ; C 78 ; WX 722 ; N N ; B 76 0 646 718 ; C 79 ; WX 778 ; N O ; B 39 -19 739 737 ; C 80 ; WX 667 ; N P ; B 86 0 622 718 ; C 81 ; WX 778 ; N Q ; B 39 -56 739 737 ; C 82 ; WX 722 ; N R ; B 88 0 684 718 ; C 83 ; WX 667 ; N S ; B 49 -19 620 737 ; C 84 ; WX 611 ; N T ; B 14 0 597 718 ; C 85 ; WX 722 ; N U ; B 79 -19 644 718 ; C 86 ; WX 667 ; N V ; B 20 0 647 718 ; C 87 ; WX 944 ; N W ; B 16 0 928 718 ; C 88 ; WX 667 ; N X ; B 19 0 648 718 ; C 89 ; WX 667 ; N Y ; B 14 0 653 718 ; C 90 ; WX 611 ; N Z ; B 23 0 588 718 ; C 91 ; WX 278 ; N bracketleft ; B 63 -196 250 722 ; C 92 ; WX 278 ; N backslash ; B -17 -19 295 737 ; C 93 ; WX 278 ; N bracketright ; B 28 -196 215 722 ; C 94 ; WX 469 ; N asciicircum ; B -14 264 483 688 ; C 95 ; WX 556 ; N underscore ; B 0 -125 556 -75 ; C 96 ; WX 222 ; N quoteleft ; B 65 470 169 725 ; C 97 ; WX 556 ; N a ; B 36 -15 530 538 ; C 98 ; WX 556 ; N b ; B 58 -15 517 718 ; C 99 ; WX 500 ; N c ; B 30 -15 477 538 ; C 100 ; WX 556 ; N d ; B 35 -15 499 718 ; C 101 ; WX 556 ; N e ; B 40 -15 516 538 ; C 102 ; WX 278 ; N f ; B 14 0 262 728 ; L i fi ; L l fl ; C 103 ; WX 556 ; N g ; B 40 -220 499 538 ; C 104 ; WX 556 ; N h ; B 65 0 491 718 ; C 105 ; WX 222 ; N i ; B 67 0 155 718 ; C 106 ; WX 222 ; N j ; B -16 -210 155 718 ; C 107 ; WX 500 ; N k ; B 67 0 501 718 ; C 108 ; WX 222 ; N l ; B 67 0 155 718 ; C 109 ; WX 833 ; N m ; B 65 0 769 538 ; C 110 ; WX 556 ; N n ; B 65 0 491 538 ; C 111 ; WX 556 ; N o ; B 35 -14 521 538 ; C 112 ; WX 556 ; N p ; B 58 -207 517 538 ; C 113 ; WX 556 ; N q ; B 35 -207 494 538 ; C 114 ; WX 333 ; N r ; B 77 0 332 538 ; C 115 ; WX 500 ; N s ; B 32 -15 464 538 ; C 116 ; WX 278 ; N t ; B 14 -7 257 669 ; C 117 ; WX 556 ; N u ; B 68 -15 489 523 ; C 118 ; WX 500 ; N v ; B 8 0 492 523 ; C 119 ; WX 722 ; N w ; B 14 0 709 523 ; C 120 ; WX 500 ; N x ; B 11 0 490 523 ; C 121 ; WX 500 ; N y ; B 11 -214 489 523 ; C 122 ; WX 500 ; N z ; B 31 0 469 523 ; C 123 ; WX 334 ; N braceleft ; B 42 -196 292 722 ; C 124 ; WX 260 ; N bar ; B 94 -19 167 737 ; C 125 ; WX 334 ; N braceright ; B 42 -196 292 722 ; C 126 ; WX 584 ; N asciitilde ; B 61 180 523 326 ; C 161 ; WX 333 ; N exclamdown ; B 118 -195 215 523 ; C 162 ; WX 556 ; N cent ; B 51 -115 513 623 ; C 163 ; WX 556 ; N sterling ; B 33 -16 539 718 ; C 164 ; WX 167 ; N fraction ; B -166 -19 333 703 ; C 165 ; WX 556 ; N yen ; B 3 0 553 688 ; C 166 ; WX 556 ; N florin ; B -11 -207 501 737 ; C 167 ; WX 556 ; N section ; B 43 -191 512 737 ; C 168 ; WX 556 ; N currency ; B 28 99 528 603 ; C 169 ; WX 191 ; N quotesingle ; B 59 463 132 718 ; C 170 ; WX 333 ; N quotedblleft ; B 38 470 307 725 ; C 171 ; WX 556 ; N guillemotleft ; B 97 108 459 446 ; C 172 ; WX 333 ; N guilsinglleft ; B 88 108 245 446 ; C 173 ; WX 333 ; N guilsinglright ; B 88 108 245 446 ; C 174 ; WX 500 ; N fi ; B 14 0 434 728 ; C 175 ; WX 500 ; N fl ; B 14 0 432 728 ; C 177 ; WX 556 ; N endash ; B 0 240 556 313 ; C 178 ; WX 556 ; N dagger ; B 43 -159 514 718 ; C 179 ; WX 556 ; N daggerdbl ; B 43 -159 514 718 ; C 180 ; WX 278 ; N periodcentered ; B 77 190 202 315 ; C 182 ; WX 537 ; N paragraph ; B 18 -173 497 718 ; C 183 ; WX 350 ; N bullet ; B 18 202 333 517 ; C 184 ; WX 222 ; N quotesinglbase ; B 53 -149 157 106 ; C 185 ; WX 333 ; N quotedblbase ; B 26 -149 295 106 ; C 186 ; WX 333 ; N quotedblright ; B 26 463 295 718 ; C 187 ; WX 556 ; N guillemotright ; B 97 108 459 446 ; C 188 ; WX 1000 ; N ellipsis ; B 115 0 885 106 ; C 189 ; WX 1000 ; N perthousand ; B 7 -19 994 703 ; C 191 ; WX 611 ; N questiondown ; B 91 -201 527 525 ; C 193 ; WX 333 ; N grave ; B 14 593 211 734 ; C 194 ; WX 333 ; N acute ; B 122 593 319 734 ; C 195 ; WX 333 ; N circumflex ; B 21 593 312 734 ; C 196 ; WX 333 ; N tilde ; B -4 606 337 722 ; C 197 ; WX 333 ; N macron ; B 10 627 323 684 ; C 198 ; WX 333 ; N breve ; B 13 595 321 731 ; C 199 ; WX 333 ; N dotaccent ; B 121 604 212 706 ; C 200 ; WX 333 ; N dieresis ; B 40 604 293 706 ; C 202 ; WX 333 ; N ring ; B 75 572 259 756 ; C 203 ; WX 333 ; N cedilla ; B 45 -225 259 0 ; C 205 ; WX 333 ; N hungarumlaut ; B 31 593 409 734 ; C 206 ; WX 333 ; N ogonek ; B 73 -225 287 0 ; C 207 ; WX 333 ; N caron ; B 21 593 312 734 ; C 208 ; WX 1000 ; N emdash ; B 0 240 1000 313 ; C 225 ; WX 1000 ; N AE ; B 8 0 951 718 ; C 227 ; WX 370 ; N ordfeminine ; B 24 304 346 737 ; C 232 ; WX 556 ; N Lslash ; B -20 0 537 718 ; C 233 ; WX 778 ; N Oslash ; B 39 -19 740 737 ; C 234 ; WX 1000 ; N OE ; B 36 -19 965 737 ; C 235 ; WX 365 ; N ordmasculine ; B 25 304 341 737 ; C 241 ; WX 889 ; N ae ; B 36 -15 847 538 ; C 245 ; WX 278 ; N dotlessi ; B 95 0 183 523 ; C 248 ; WX 222 ; N lslash ; B -20 0 242 718 ; C 249 ; WX 611 ; N oslash ; B 28 -22 537 545 ; C 250 ; WX 944 ; N oe ; B 35 -15 902 538 ; C 251 ; WX 611 ; N germandbls ; B 67 -15 571 728 ; C -1 ; WX 611 ; N Zcaron ; B 23 0 588 929 ; C -1 ; WX 500 ; N ccedilla ; B 30 -225 477 538 ; C -1 ; WX 500 ; N ydieresis ; B 11 -214 489 706 ; C -1 ; WX 556 ; N atilde ; B 36 -15 530 722 ; C -1 ; WX 278 ; N icircumflex ; B -6 0 285 734 ; C -1 ; WX 333 ; N threesuperior ; B 5 270 325 703 ; C -1 ; WX 556 ; N ecircumflex ; B 40 -15 516 734 ; C -1 ; WX 556 ; N thorn ; B 58 -207 517 718 ; C -1 ; WX 556 ; N egrave ; B 40 -15 516 734 ; C -1 ; WX 333 ; N twosuperior ; B 4 281 323 703 ; C -1 ; WX 556 ; N eacute ; B 40 -15 516 734 ; C -1 ; WX 556 ; N otilde ; B 35 -14 521 722 ; C -1 ; WX 667 ; N Aacute ; B 14 0 654 929 ; C -1 ; WX 556 ; N ocircumflex ; B 35 -14 521 734 ; C -1 ; WX 500 ; N yacute ; B 11 -214 489 734 ; C -1 ; WX 556 ; N udieresis ; B 68 -15 489 706 ; C -1 ; WX 834 ; N threequarters ; B 45 -19 810 703 ; C -1 ; WX 556 ; N acircumflex ; B 36 -15 530 734 ; C -1 ; WX 722 ; N Eth ; B 0 0 674 718 ; C -1 ; WX 556 ; N edieresis ; B 40 -15 516 706 ; C -1 ; WX 556 ; N ugrave ; B 68 -15 489 734 ; C -1 ; WX 1000 ; N trademark ; B 46 306 903 718 ; C -1 ; WX 556 ; N ograve ; B 35 -14 521 734 ; C -1 ; WX 500 ; N scaron ; B 32 -15 464 734 ; C -1 ; WX 278 ; N Idieresis ; B 13 0 266 901 ; C -1 ; WX 556 ; N uacute ; B 68 -15 489 734 ; C -1 ; WX 556 ; N agrave ; B 36 -15 530 734 ; C -1 ; WX 556 ; N ntilde ; B 65 0 491 722 ; C -1 ; WX 556 ; N aring ; B 36 -15 530 756 ; C -1 ; WX 500 ; N zcaron ; B 31 0 469 734 ; C -1 ; WX 278 ; N Icircumflex ; B -6 0 285 929 ; C -1 ; WX 722 ; N Ntilde ; B 76 0 646 917 ; C -1 ; WX 556 ; N ucircumflex ; B 68 -15 489 734 ; C -1 ; WX 667 ; N Ecircumflex ; B 86 0 616 929 ; C -1 ; WX 278 ; N Iacute ; B 91 0 292 929 ; C -1 ; WX 722 ; N Ccedilla ; B 44 -225 681 737 ; C -1 ; WX 778 ; N Odieresis ; B 39 -19 739 901 ; C -1 ; WX 667 ; N Scaron ; B 49 -19 620 929 ; C -1 ; WX 667 ; N Edieresis ; B 86 0 616 901 ; C -1 ; WX 278 ; N Igrave ; B -13 0 188 929 ; C -1 ; WX 556 ; N adieresis ; B 36 -15 530 706 ; C -1 ; WX 778 ; N Ograve ; B 39 -19 739 929 ; C -1 ; WX 667 ; N Egrave ; B 86 0 616 929 ; C -1 ; WX 667 ; N Ydieresis ; B 14 0 653 901 ; C -1 ; WX 737 ; N registered ; B -14 -19 752 737 ; C -1 ; WX 778 ; N Otilde ; B 39 -19 739 917 ; C -1 ; WX 834 ; N onequarter ; B 73 -19 756 703 ; C -1 ; WX 722 ; N Ugrave ; B 79 -19 644 929 ; C -1 ; WX 722 ; N Ucircumflex ; B 79 -19 644 929 ; C -1 ; WX 667 ; N Thorn ; B 86 0 622 718 ; C -1 ; WX 584 ; N divide ; B 39 -19 545 524 ; C -1 ; WX 667 ; N Atilde ; B 14 0 654 917 ; C -1 ; WX 722 ; N Uacute ; B 79 -19 644 929 ; C -1 ; WX 778 ; N Ocircumflex ; B 39 -19 739 929 ; C -1 ; WX 584 ; N logicalnot ; B 39 108 545 390 ; C -1 ; WX 667 ; N Aring ; B 14 0 654 931 ; C -1 ; WX 278 ; N idieresis ; B 13 0 266 706 ; C -1 ; WX 278 ; N iacute ; B 95 0 292 734 ; C -1 ; WX 556 ; N aacute ; B 36 -15 530 734 ; C -1 ; WX 584 ; N plusminus ; B 39 0 545 506 ; C -1 ; WX 584 ; N multiply ; B 39 0 545 506 ; C -1 ; WX 722 ; N Udieresis ; B 79 -19 644 901 ; C -1 ; WX 584 ; N minus ; B 39 216 545 289 ; C -1 ; WX 333 ; N onesuperior ; B 43 281 222 703 ; C -1 ; WX 667 ; N Eacute ; B 86 0 616 929 ; C -1 ; WX 667 ; N Acircumflex ; B 14 0 654 929 ; C -1 ; WX 737 ; N copyright ; B -14 -19 752 737 ; C -1 ; WX 667 ; N Agrave ; B 14 0 654 929 ; C -1 ; WX 556 ; N odieresis ; B 35 -14 521 706 ; C -1 ; WX 556 ; N oacute ; B 35 -14 521 734 ; C -1 ; WX 400 ; N degree ; B 54 411 346 703 ; C -1 ; WX 278 ; N igrave ; B -13 0 184 734 ; C -1 ; WX 556 ; N mu ; B 68 -207 489 523 ; C -1 ; WX 778 ; N Oacute ; B 39 -19 739 929 ; C -1 ; WX 556 ; N eth ; B 35 -15 522 737 ; C -1 ; WX 667 ; N Adieresis ; B 14 0 654 901 ; C -1 ; WX 667 ; N Yacute ; B 14 0 653 929 ; C -1 ; WX 260 ; N brokenbar ; B 94 -19 167 737 ; C -1 ; WX 834 ; N onehalf ; B 43 -19 773 703 ; EndCharMetrics StartKernData StartKernPairs 250 KPX A y -40 KPX A w -40 KPX A v -40 KPX A u -30 KPX A Y -100 KPX A W -50 KPX A V -70 KPX A U -50 KPX A T -120 KPX A Q -30 KPX A O -30 KPX A G -30 KPX A C -30 KPX B period -20 KPX B comma -20 KPX B U -10 KPX C period -30 KPX C comma -30 KPX D period -70 KPX D comma -70 KPX D Y -90 KPX D W -40 KPX D V -70 KPX D A -40 KPX F r -45 KPX F period -150 KPX F o -30 KPX F e -30 KPX F comma -150 KPX F a -50 KPX F A -80 KPX J u -20 KPX J period -30 KPX J comma -30 KPX J a -20 KPX J A -20 KPX K y -50 KPX K u -30 KPX K o -40 KPX K e -40 KPX K O -50 KPX L y -30 KPX L quoteright -160 KPX L quotedblright -140 KPX L Y -140 KPX L W -70 KPX L V -110 KPX L T -110 KPX O period -40 KPX O comma -40 KPX O Y -70 KPX O X -60 KPX O W -30 KPX O V -50 KPX O T -40 KPX O A -20 KPX P period -180 KPX P o -50 KPX P e -50 KPX P comma -180 KPX P a -40 KPX P A -120 KPX Q U -10 KPX R Y -50 KPX R W -30 KPX R V -50 KPX R U -40 KPX R T -30 KPX R O -20 KPX S period -20 KPX S comma -20 KPX T y -120 KPX T w -120 KPX T u -120 KPX T semicolon -20 KPX T r -120 KPX T period -120 KPX T o -120 KPX T hyphen -140 KPX T e -120 KPX T comma -120 KPX T colon -20 KPX T a -120 KPX T O -40 KPX T A -120 KPX U period -40 KPX U comma -40 KPX U A -40 KPX V u -70 KPX V semicolon -40 KPX V period -125 KPX V o -80 KPX V hyphen -80 KPX V e -80 KPX V comma -125 KPX V colon -40 KPX V a -70 KPX V O -40 KPX V G -40 KPX V A -80 KPX W y -20 KPX W u -30 KPX W period -80 KPX W o -30 KPX W hyphen -40 KPX W e -30 KPX W comma -80 KPX W a -40 KPX W O -20 KPX W A -50 KPX Y u -110 KPX Y semicolon -60 KPX Y period -140 KPX Y o -140 KPX Y i -20 KPX Y hyphen -140 KPX Y e -140 KPX Y comma -140 KPX Y colon -60 KPX Y a -140 KPX Y O -85 KPX Y A -110 KPX a y -30 KPX a w -20 KPX a v -20 KPX b y -20 KPX b v -20 KPX b u -20 KPX b period -40 KPX b l -20 KPX b comma -40 KPX b b -10 KPX c k -20 KPX c comma -15 KPX colon space -50 KPX comma quoteright -100 KPX comma quotedblright -100 KPX e y -20 KPX e x -30 KPX e w -20 KPX e v -30 KPX e period -15 KPX e comma -15 KPX f quoteright 50 KPX f quotedblright 60 KPX f period -30 KPX f o -30 KPX f e -30 KPX f dotlessi -28 KPX f comma -30 KPX f a -30 KPX g r -10 KPX h y -30 KPX k o -20 KPX k e -20 KPX m y -15 KPX m u -10 KPX n y -15 KPX n v -20 KPX n u -10 KPX o y -30 KPX o x -30 KPX o w -15 KPX o v -15 KPX o period -40 KPX o comma -40 KPX oslash z -55 KPX oslash y -70 KPX oslash x -85 KPX oslash w -70 KPX oslash v -70 KPX oslash u -55 KPX oslash t -55 KPX oslash s -55 KPX oslash r -55 KPX oslash q -55 KPX oslash period -95 KPX oslash p -55 KPX oslash o -55 KPX oslash n -55 KPX oslash m -55 KPX oslash l -55 KPX oslash k -55 KPX oslash j -55 KPX oslash i -55 KPX oslash h -55 KPX oslash g -55 KPX oslash f -55 KPX oslash e -55 KPX oslash d -55 KPX oslash comma -95 KPX oslash c -55 KPX oslash b -55 KPX oslash a -55 KPX p y -30 KPX p period -35 KPX p comma -35 KPX period space -60 KPX period quoteright -100 KPX period quotedblright -100 KPX quotedblright space -40 KPX quoteleft quoteleft -57 KPX quoteright space -70 KPX quoteright s -50 KPX quoteright r -50 KPX quoteright quoteright -57 KPX quoteright d -50 KPX r y 30 KPX r v 30 KPX r u 15 KPX r t 40 KPX r semicolon 30 KPX r period -50 KPX r p 30 KPX r n 25 KPX r m 25 KPX r l 15 KPX r k 15 KPX r i 15 KPX r comma -50 KPX r colon 30 KPX r a -10 KPX s w -30 KPX s period -15 KPX s comma -15 KPX semicolon space -50 KPX space quoteleft -60 KPX space quotedblleft -30 KPX space Y -90 KPX space W -40 KPX space V -50 KPX space T -50 KPX v period -80 KPX v o -25 KPX v e -25 KPX v comma -80 KPX v a -25 KPX w period -60 KPX w o -10 KPX w e -10 KPX w comma -60 KPX w a -15 KPX x e -30 KPX y period -100 KPX y o -20 KPX y e -20 KPX y comma -100 KPX y a -20 KPX z o -15 KPX z e -15 EndKernPairs EndKernData StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 167 195 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 167 195 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 167 195 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 167 195 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 167 175 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 167 195 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 195 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 167 195 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 167 195 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 167 195 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 167 195 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute -27 195 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -27 195 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -27 195 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave -27 195 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 205 195 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 223 195 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 223 195 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 223 195 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 223 195 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 223 195 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 167 195 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 195 195 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 195 195 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 195 195 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 195 195 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 167 195 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 167 195 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 195 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 112 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 112 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 112 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 112 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 112 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 102 0 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 84 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 112 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 112 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 112 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 112 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 102 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 112 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 112 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 112 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 112 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 112 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 84 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 112 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 112 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 112 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 112 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 84 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 84 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/phvr8an.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All rights reserved. Comment Creation Date: Thu Mar 15 11:04:57 1990 Comment UniqueID 28380 Comment VMusage 7572 42473 FontName Helvetica-Narrow FullName Helvetica Narrow FamilyName Helvetica Weight Medium ItalicAngle 0 IsFixedPitch false FontBBox -136 -225 820 931 UnderlinePosition -100 UnderlineThickness 50 Version 001.006 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All rights reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 718 XHeight 523 Ascender 718 Descender -207 StartCharMetrics 228 C 32 ; WX 228 ; N space ; B 0 0 0 0 ; C 33 ; WX 228 ; N exclam ; B 74 0 153 718 ; C 34 ; WX 291 ; N quotedbl ; B 57 463 234 718 ; C 35 ; WX 456 ; N numbersign ; B 23 0 434 688 ; C 36 ; WX 456 ; N dollar ; B 26 -115 426 775 ; C 37 ; WX 729 ; N percent ; B 32 -19 697 703 ; C 38 ; WX 547 ; N ampersand ; B 36 -15 529 718 ; C 39 ; WX 182 ; N quoteright ; B 43 463 129 718 ; C 40 ; WX 273 ; N parenleft ; B 56 -207 245 733 ; C 41 ; WX 273 ; N parenright ; B 28 -207 217 733 ; C 42 ; WX 319 ; N asterisk ; B 32 431 286 718 ; C 43 ; WX 479 ; N plus ; B 32 0 447 505 ; C 44 ; WX 228 ; N comma ; B 71 -147 157 106 ; C 45 ; WX 273 ; N hyphen ; B 36 232 237 322 ; C 46 ; WX 228 ; N period ; B 71 0 157 106 ; C 47 ; WX 228 ; N slash ; B -14 -19 242 737 ; C 48 ; WX 456 ; N zero ; B 30 -19 426 703 ; C 49 ; WX 456 ; N one ; B 83 0 294 703 ; C 50 ; WX 456 ; N two ; B 21 0 416 703 ; C 51 ; WX 456 ; N three ; B 28 -19 428 703 ; C 52 ; WX 456 ; N four ; B 20 0 429 703 ; C 53 ; WX 456 ; N five ; B 26 -19 421 688 ; C 54 ; WX 456 ; N six ; B 31 -19 425 703 ; C 55 ; WX 456 ; N seven ; B 30 0 429 688 ; C 56 ; WX 456 ; N eight ; B 31 -19 424 703 ; C 57 ; WX 456 ; N nine ; B 34 -19 421 703 ; C 58 ; WX 228 ; N colon ; B 71 0 157 516 ; C 59 ; WX 228 ; N semicolon ; B 71 -147 157 516 ; C 60 ; WX 479 ; N less ; B 39 11 440 495 ; C 61 ; WX 479 ; N equal ; B 32 115 447 390 ; C 62 ; WX 479 ; N greater ; B 39 11 440 495 ; C 63 ; WX 456 ; N question ; B 46 0 403 727 ; C 64 ; WX 832 ; N at ; B 121 -19 712 737 ; C 65 ; WX 547 ; N A ; B 11 0 536 718 ; C 66 ; WX 547 ; N B ; B 61 0 514 718 ; C 67 ; WX 592 ; N C ; B 36 -19 558 737 ; C 68 ; WX 592 ; N D ; B 66 0 553 718 ; C 69 ; WX 547 ; N E ; B 71 0 505 718 ; C 70 ; WX 501 ; N F ; B 71 0 478 718 ; C 71 ; WX 638 ; N G ; B 39 -19 577 737 ; C 72 ; WX 592 ; N H ; B 63 0 530 718 ; C 73 ; WX 228 ; N I ; B 75 0 154 718 ; C 74 ; WX 410 ; N J ; B 14 -19 351 718 ; C 75 ; WX 547 ; N K ; B 62 0 544 718 ; C 76 ; WX 456 ; N L ; B 62 0 440 718 ; C 77 ; WX 683 ; N M ; B 60 0 624 718 ; C 78 ; WX 592 ; N N ; B 62 0 530 718 ; C 79 ; WX 638 ; N O ; B 32 -19 606 737 ; C 80 ; WX 547 ; N P ; B 71 0 510 718 ; C 81 ; WX 638 ; N Q ; B 32 -56 606 737 ; C 82 ; WX 592 ; N R ; B 72 0 561 718 ; C 83 ; WX 547 ; N S ; B 40 -19 508 737 ; C 84 ; WX 501 ; N T ; B 11 0 490 718 ; C 85 ; WX 592 ; N U ; B 65 -19 528 718 ; C 86 ; WX 547 ; N V ; B 16 0 531 718 ; C 87 ; WX 774 ; N W ; B 13 0 761 718 ; C 88 ; WX 547 ; N X ; B 16 0 531 718 ; C 89 ; WX 547 ; N Y ; B 11 0 535 718 ; C 90 ; WX 501 ; N Z ; B 19 0 482 718 ; C 91 ; WX 228 ; N bracketleft ; B 52 -196 205 722 ; C 92 ; WX 228 ; N backslash ; B -14 -19 242 737 ; C 93 ; WX 228 ; N bracketright ; B 23 -196 176 722 ; C 94 ; WX 385 ; N asciicircum ; B -11 264 396 688 ; C 95 ; WX 456 ; N underscore ; B 0 -125 456 -75 ; C 96 ; WX 182 ; N quoteleft ; B 53 470 139 725 ; C 97 ; WX 456 ; N a ; B 30 -15 435 538 ; C 98 ; WX 456 ; N b ; B 48 -15 424 718 ; C 99 ; WX 410 ; N c ; B 25 -15 391 538 ; C 100 ; WX 456 ; N d ; B 29 -15 409 718 ; C 101 ; WX 456 ; N e ; B 33 -15 423 538 ; C 102 ; WX 228 ; N f ; B 11 0 215 728 ; L i fi ; L l fl ; C 103 ; WX 456 ; N g ; B 33 -220 409 538 ; C 104 ; WX 456 ; N h ; B 53 0 403 718 ; C 105 ; WX 182 ; N i ; B 55 0 127 718 ; C 106 ; WX 182 ; N j ; B -13 -210 127 718 ; C 107 ; WX 410 ; N k ; B 55 0 411 718 ; C 108 ; WX 182 ; N l ; B 55 0 127 718 ; C 109 ; WX 683 ; N m ; B 53 0 631 538 ; C 110 ; WX 456 ; N n ; B 53 0 403 538 ; C 111 ; WX 456 ; N o ; B 29 -14 427 538 ; C 112 ; WX 456 ; N p ; B 48 -207 424 538 ; C 113 ; WX 456 ; N q ; B 29 -207 405 538 ; C 114 ; WX 273 ; N r ; B 63 0 272 538 ; C 115 ; WX 410 ; N s ; B 26 -15 380 538 ; C 116 ; WX 228 ; N t ; B 11 -7 211 669 ; C 117 ; WX 456 ; N u ; B 56 -15 401 523 ; C 118 ; WX 410 ; N v ; B 7 0 403 523 ; C 119 ; WX 592 ; N w ; B 11 0 581 523 ; C 120 ; WX 410 ; N x ; B 9 0 402 523 ; C 121 ; WX 410 ; N y ; B 9 -214 401 523 ; C 122 ; WX 410 ; N z ; B 25 0 385 523 ; C 123 ; WX 274 ; N braceleft ; B 34 -196 239 722 ; C 124 ; WX 213 ; N bar ; B 77 -19 137 737 ; C 125 ; WX 274 ; N braceright ; B 34 -196 239 722 ; C 126 ; WX 479 ; N asciitilde ; B 50 180 429 326 ; C 161 ; WX 273 ; N exclamdown ; B 97 -195 176 523 ; C 162 ; WX 456 ; N cent ; B 42 -115 421 623 ; C 163 ; WX 456 ; N sterling ; B 27 -16 442 718 ; C 164 ; WX 137 ; N fraction ; B -136 -19 273 703 ; C 165 ; WX 456 ; N yen ; B 2 0 453 688 ; C 166 ; WX 456 ; N florin ; B -9 -207 411 737 ; C 167 ; WX 456 ; N section ; B 35 -191 420 737 ; C 168 ; WX 456 ; N currency ; B 23 99 433 603 ; C 169 ; WX 157 ; N quotesingle ; B 48 463 108 718 ; C 170 ; WX 273 ; N quotedblleft ; B 31 470 252 725 ; C 171 ; WX 456 ; N guillemotleft ; B 80 108 376 446 ; C 172 ; WX 273 ; N guilsinglleft ; B 72 108 201 446 ; C 173 ; WX 273 ; N guilsinglright ; B 72 108 201 446 ; C 174 ; WX 410 ; N fi ; B 11 0 356 728 ; C 175 ; WX 410 ; N fl ; B 11 0 354 728 ; C 177 ; WX 456 ; N endash ; B 0 240 456 313 ; C 178 ; WX 456 ; N dagger ; B 35 -159 421 718 ; C 179 ; WX 456 ; N daggerdbl ; B 35 -159 421 718 ; C 180 ; WX 228 ; N periodcentered ; B 63 190 166 315 ; C 182 ; WX 440 ; N paragraph ; B 15 -173 408 718 ; C 183 ; WX 287 ; N bullet ; B 15 202 273 517 ; C 184 ; WX 182 ; N quotesinglbase ; B 43 -149 129 106 ; C 185 ; WX 273 ; N quotedblbase ; B 21 -149 242 106 ; C 186 ; WX 273 ; N quotedblright ; B 21 463 242 718 ; C 187 ; WX 456 ; N guillemotright ; B 80 108 376 446 ; C 188 ; WX 820 ; N ellipsis ; B 94 0 726 106 ; C 189 ; WX 820 ; N perthousand ; B 6 -19 815 703 ; C 191 ; WX 501 ; N questiondown ; B 75 -201 432 525 ; C 193 ; WX 273 ; N grave ; B 11 593 173 734 ; C 194 ; WX 273 ; N acute ; B 100 593 262 734 ; C 195 ; WX 273 ; N circumflex ; B 17 593 256 734 ; C 196 ; WX 273 ; N tilde ; B -3 606 276 722 ; C 197 ; WX 273 ; N macron ; B 8 627 265 684 ; C 198 ; WX 273 ; N breve ; B 11 595 263 731 ; C 199 ; WX 273 ; N dotaccent ; B 99 604 174 706 ; C 200 ; WX 273 ; N dieresis ; B 33 604 240 706 ; C 202 ; WX 273 ; N ring ; B 61 572 212 756 ; C 203 ; WX 273 ; N cedilla ; B 37 -225 212 0 ; C 205 ; WX 273 ; N hungarumlaut ; B 25 593 335 734 ; C 206 ; WX 273 ; N ogonek ; B 60 -225 235 0 ; C 207 ; WX 273 ; N caron ; B 17 593 256 734 ; C 208 ; WX 820 ; N emdash ; B 0 240 820 313 ; C 225 ; WX 820 ; N AE ; B 7 0 780 718 ; C 227 ; WX 303 ; N ordfeminine ; B 20 304 284 737 ; C 232 ; WX 456 ; N Lslash ; B -16 0 440 718 ; C 233 ; WX 638 ; N Oslash ; B 32 -19 607 737 ; C 234 ; WX 820 ; N OE ; B 30 -19 791 737 ; C 235 ; WX 299 ; N ordmasculine ; B 20 304 280 737 ; C 241 ; WX 729 ; N ae ; B 30 -15 695 538 ; C 245 ; WX 228 ; N dotlessi ; B 78 0 150 523 ; C 248 ; WX 182 ; N lslash ; B -16 0 198 718 ; C 249 ; WX 501 ; N oslash ; B 23 -22 440 545 ; C 250 ; WX 774 ; N oe ; B 29 -15 740 538 ; C 251 ; WX 501 ; N germandbls ; B 55 -15 468 728 ; C -1 ; WX 501 ; N Zcaron ; B 19 0 482 929 ; C -1 ; WX 410 ; N ccedilla ; B 25 -225 391 538 ; C -1 ; WX 410 ; N ydieresis ; B 9 -214 401 706 ; C -1 ; WX 456 ; N atilde ; B 30 -15 435 722 ; C -1 ; WX 228 ; N icircumflex ; B -5 0 234 734 ; C -1 ; WX 273 ; N threesuperior ; B 4 270 266 703 ; C -1 ; WX 456 ; N ecircumflex ; B 33 -15 423 734 ; C -1 ; WX 456 ; N thorn ; B 48 -207 424 718 ; C -1 ; WX 456 ; N egrave ; B 33 -15 423 734 ; C -1 ; WX 273 ; N twosuperior ; B 3 281 265 703 ; C -1 ; WX 456 ; N eacute ; B 33 -15 423 734 ; C -1 ; WX 456 ; N otilde ; B 29 -14 427 722 ; C -1 ; WX 547 ; N Aacute ; B 11 0 536 929 ; C -1 ; WX 456 ; N ocircumflex ; B 29 -14 427 734 ; C -1 ; WX 410 ; N yacute ; B 9 -214 401 734 ; C -1 ; WX 456 ; N udieresis ; B 56 -15 401 706 ; C -1 ; WX 684 ; N threequarters ; B 37 -19 664 703 ; C -1 ; WX 456 ; N acircumflex ; B 30 -15 435 734 ; C -1 ; WX 592 ; N Eth ; B 0 0 553 718 ; C -1 ; WX 456 ; N edieresis ; B 33 -15 423 706 ; C -1 ; WX 456 ; N ugrave ; B 56 -15 401 734 ; C -1 ; WX 820 ; N trademark ; B 38 306 740 718 ; C -1 ; WX 456 ; N ograve ; B 29 -14 427 734 ; C -1 ; WX 410 ; N scaron ; B 26 -15 380 734 ; C -1 ; WX 228 ; N Idieresis ; B 11 0 218 901 ; C -1 ; WX 456 ; N uacute ; B 56 -15 401 734 ; C -1 ; WX 456 ; N agrave ; B 30 -15 435 734 ; C -1 ; WX 456 ; N ntilde ; B 53 0 403 722 ; C -1 ; WX 456 ; N aring ; B 30 -15 435 756 ; C -1 ; WX 410 ; N zcaron ; B 25 0 385 734 ; C -1 ; WX 228 ; N Icircumflex ; B -5 0 234 929 ; C -1 ; WX 592 ; N Ntilde ; B 62 0 530 917 ; C -1 ; WX 456 ; N ucircumflex ; B 56 -15 401 734 ; C -1 ; WX 547 ; N Ecircumflex ; B 71 0 505 929 ; C -1 ; WX 228 ; N Iacute ; B 75 0 239 929 ; C -1 ; WX 592 ; N Ccedilla ; B 36 -225 558 737 ; C -1 ; WX 638 ; N Odieresis ; B 32 -19 606 901 ; C -1 ; WX 547 ; N Scaron ; B 40 -19 508 929 ; C -1 ; WX 547 ; N Edieresis ; B 71 0 505 901 ; C -1 ; WX 228 ; N Igrave ; B -11 0 154 929 ; C -1 ; WX 456 ; N adieresis ; B 30 -15 435 706 ; C -1 ; WX 638 ; N Ograve ; B 32 -19 606 929 ; C -1 ; WX 547 ; N Egrave ; B 71 0 505 929 ; C -1 ; WX 547 ; N Ydieresis ; B 11 0 535 901 ; C -1 ; WX 604 ; N registered ; B -11 -19 617 737 ; C -1 ; WX 638 ; N Otilde ; B 32 -19 606 917 ; C -1 ; WX 684 ; N onequarter ; B 60 -19 620 703 ; C -1 ; WX 592 ; N Ugrave ; B 65 -19 528 929 ; C -1 ; WX 592 ; N Ucircumflex ; B 65 -19 528 929 ; C -1 ; WX 547 ; N Thorn ; B 71 0 510 718 ; C -1 ; WX 479 ; N divide ; B 32 -19 447 524 ; C -1 ; WX 547 ; N Atilde ; B 11 0 536 917 ; C -1 ; WX 592 ; N Uacute ; B 65 -19 528 929 ; C -1 ; WX 638 ; N Ocircumflex ; B 32 -19 606 929 ; C -1 ; WX 479 ; N logicalnot ; B 32 108 447 390 ; C -1 ; WX 547 ; N Aring ; B 11 0 536 931 ; C -1 ; WX 228 ; N idieresis ; B 11 0 218 706 ; C -1 ; WX 228 ; N iacute ; B 78 0 239 734 ; C -1 ; WX 456 ; N aacute ; B 30 -15 435 734 ; C -1 ; WX 479 ; N plusminus ; B 32 0 447 506 ; C -1 ; WX 479 ; N multiply ; B 32 0 447 506 ; C -1 ; WX 592 ; N Udieresis ; B 65 -19 528 901 ; C -1 ; WX 479 ; N minus ; B 32 216 447 289 ; C -1 ; WX 273 ; N onesuperior ; B 35 281 182 703 ; C -1 ; WX 547 ; N Eacute ; B 71 0 505 929 ; C -1 ; WX 547 ; N Acircumflex ; B 11 0 536 929 ; C -1 ; WX 604 ; N copyright ; B -11 -19 617 737 ; C -1 ; WX 547 ; N Agrave ; B 11 0 536 929 ; C -1 ; WX 456 ; N odieresis ; B 29 -14 427 706 ; C -1 ; WX 456 ; N oacute ; B 29 -14 427 734 ; C -1 ; WX 328 ; N degree ; B 44 411 284 703 ; C -1 ; WX 228 ; N igrave ; B -11 0 151 734 ; C -1 ; WX 456 ; N mu ; B 56 -207 401 523 ; C -1 ; WX 638 ; N Oacute ; B 32 -19 606 929 ; C -1 ; WX 456 ; N eth ; B 29 -15 428 737 ; C -1 ; WX 547 ; N Adieresis ; B 11 0 536 901 ; C -1 ; WX 547 ; N Yacute ; B 11 0 535 929 ; C -1 ; WX 213 ; N brokenbar ; B 77 -19 137 737 ; C -1 ; WX 684 ; N onehalf ; B 35 -19 634 703 ; EndCharMetrics StartKernData StartKernPairs 250 KPX A y -32 KPX A w -32 KPX A v -32 KPX A u -24 KPX A Y -81 KPX A W -40 KPX A V -56 KPX A U -40 KPX A T -97 KPX A Q -24 KPX A O -24 KPX A G -24 KPX A C -24 KPX B period -15 KPX B comma -15 KPX B U -7 KPX C period -24 KPX C comma -24 KPX D period -56 KPX D comma -56 KPX D Y -73 KPX D W -32 KPX D V -56 KPX D A -32 KPX F r -36 KPX F period -122 KPX F o -24 KPX F e -24 KPX F comma -122 KPX F a -40 KPX F A -65 KPX J u -15 KPX J period -24 KPX J comma -24 KPX J a -15 KPX J A -15 KPX K y -40 KPX K u -24 KPX K o -32 KPX K e -32 KPX K O -40 KPX L y -24 KPX L quoteright -130 KPX L quotedblright -114 KPX L Y -114 KPX L W -56 KPX L V -89 KPX L T -89 KPX O period -32 KPX O comma -32 KPX O Y -56 KPX O X -48 KPX O W -24 KPX O V -40 KPX O T -32 KPX O A -15 KPX P period -147 KPX P o -40 KPX P e -40 KPX P comma -147 KPX P a -32 KPX P A -97 KPX Q U -7 KPX R Y -40 KPX R W -24 KPX R V -40 KPX R U -32 KPX R T -24 KPX R O -15 KPX S period -15 KPX S comma -15 KPX T y -97 KPX T w -97 KPX T u -97 KPX T semicolon -15 KPX T r -97 KPX T period -97 KPX T o -97 KPX T hyphen -114 KPX T e -97 KPX T comma -97 KPX T colon -15 KPX T a -97 KPX T O -32 KPX T A -97 KPX U period -32 KPX U comma -32 KPX U A -32 KPX V u -56 KPX V semicolon -32 KPX V period -102 KPX V o -65 KPX V hyphen -65 KPX V e -65 KPX V comma -102 KPX V colon -32 KPX V a -56 KPX V O -32 KPX V G -32 KPX V A -65 KPX W y -15 KPX W u -24 KPX W period -65 KPX W o -24 KPX W hyphen -32 KPX W e -24 KPX W comma -65 KPX W a -32 KPX W O -15 KPX W A -40 KPX Y u -89 KPX Y semicolon -48 KPX Y period -114 KPX Y o -114 KPX Y i -15 KPX Y hyphen -114 KPX Y e -114 KPX Y comma -114 KPX Y colon -48 KPX Y a -114 KPX Y O -69 KPX Y A -89 KPX a y -24 KPX a w -15 KPX a v -15 KPX b y -15 KPX b v -15 KPX b u -15 KPX b period -32 KPX b l -15 KPX b comma -32 KPX b b -7 KPX c k -15 KPX c comma -11 KPX colon space -40 KPX comma quoteright -81 KPX comma quotedblright -81 KPX e y -15 KPX e x -24 KPX e w -15 KPX e v -24 KPX e period -11 KPX e comma -11 KPX f quoteright 41 KPX f quotedblright 49 KPX f period -24 KPX f o -24 KPX f e -24 KPX f dotlessi -22 KPX f comma -24 KPX f a -24 KPX g r -7 KPX h y -24 KPX k o -15 KPX k e -15 KPX m y -11 KPX m u -7 KPX n y -11 KPX n v -15 KPX n u -7 KPX o y -24 KPX o x -24 KPX o w -11 KPX o v -11 KPX o period -32 KPX o comma -32 KPX oslash z -44 KPX oslash y -56 KPX oslash x -69 KPX oslash w -56 KPX oslash v -56 KPX oslash u -44 KPX oslash t -44 KPX oslash s -44 KPX oslash r -44 KPX oslash q -44 KPX oslash period -77 KPX oslash p -44 KPX oslash o -44 KPX oslash n -44 KPX oslash m -44 KPX oslash l -44 KPX oslash k -44 KPX oslash j -44 KPX oslash i -44 KPX oslash h -44 KPX oslash g -44 KPX oslash f -44 KPX oslash e -44 KPX oslash d -44 KPX oslash comma -77 KPX oslash c -44 KPX oslash b -44 KPX oslash a -44 KPX p y -24 KPX p period -28 KPX p comma -28 KPX period space -48 KPX period quoteright -81 KPX period quotedblright -81 KPX quotedblright space -32 KPX quoteleft quoteleft -46 KPX quoteright space -56 KPX quoteright s -40 KPX quoteright r -40 KPX quoteright quoteright -46 KPX quoteright d -40 KPX r y 25 KPX r v 25 KPX r u 12 KPX r t 33 KPX r semicolon 25 KPX r period -40 KPX r p 25 KPX r n 21 KPX r m 21 KPX r l 12 KPX r k 12 KPX r i 12 KPX r comma -40 KPX r colon 25 KPX r a -7 KPX s w -24 KPX s period -11 KPX s comma -11 KPX semicolon space -40 KPX space quoteleft -48 KPX space quotedblleft -24 KPX space Y -73 KPX space W -32 KPX space V -40 KPX space T -40 KPX v period -65 KPX v o -20 KPX v e -20 KPX v comma -65 KPX v a -20 KPX w period -48 KPX w o -7 KPX w e -7 KPX w comma -48 KPX w a -11 KPX x e -24 KPX y period -81 KPX y o -15 KPX y e -15 KPX y comma -81 KPX y a -15 KPX z o -11 KPX z e -11 EndKernPairs EndKernData StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 137 195 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 137 195 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 137 195 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 137 195 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 137 175 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 137 195 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 160 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 137 195 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 137 195 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 137 195 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 137 195 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute -22 195 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex -22 195 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis -22 195 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave -22 195 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 168 195 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 183 195 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 183 195 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 183 195 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 183 195 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 183 195 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 137 195 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 160 195 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 160 195 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 160 195 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 160 195 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 137 195 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 137 195 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 114 195 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 92 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 92 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 92 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 92 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 92 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 84 0 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 69 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 92 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 92 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 92 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 92 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -22 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -22 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -22 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -22 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 84 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 92 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 92 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 92 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 92 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 92 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 69 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 92 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 92 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 92 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 92 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 69 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 69 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 69 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/phvro8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All rights reserved. Comment Creation Date: Thu Mar 15 10:24:18 1990 Comment UniqueID 28362 Comment VMusage 7572 42473 FontName Helvetica-Oblique FullName Helvetica Oblique FamilyName Helvetica Weight Medium ItalicAngle -12 IsFixedPitch false FontBBox -170 -225 1116 931 UnderlinePosition -100 UnderlineThickness 50 Version 001.006 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All rights reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 718 XHeight 523 Ascender 718 Descender -207 StartCharMetrics 228 C 32 ; WX 278 ; N space ; B 0 0 0 0 ; C 33 ; WX 278 ; N exclam ; B 90 0 340 718 ; C 34 ; WX 355 ; N quotedbl ; B 168 463 438 718 ; C 35 ; WX 556 ; N numbersign ; B 73 0 631 688 ; C 36 ; WX 556 ; N dollar ; B 69 -115 617 775 ; C 37 ; WX 889 ; N percent ; B 147 -19 889 703 ; C 38 ; WX 667 ; N ampersand ; B 77 -15 647 718 ; C 39 ; WX 222 ; N quoteright ; B 151 463 310 718 ; C 40 ; WX 333 ; N parenleft ; B 108 -207 454 733 ; C 41 ; WX 333 ; N parenright ; B -9 -207 337 733 ; C 42 ; WX 389 ; N asterisk ; B 165 431 475 718 ; C 43 ; WX 584 ; N plus ; B 85 0 606 505 ; C 44 ; WX 278 ; N comma ; B 56 -147 214 106 ; C 45 ; WX 333 ; N hyphen ; B 93 232 357 322 ; C 46 ; WX 278 ; N period ; B 87 0 214 106 ; C 47 ; WX 278 ; N slash ; B -21 -19 452 737 ; C 48 ; WX 556 ; N zero ; B 93 -19 608 703 ; C 49 ; WX 556 ; N one ; B 207 0 508 703 ; C 50 ; WX 556 ; N two ; B 26 0 617 703 ; C 51 ; WX 556 ; N three ; B 75 -19 610 703 ; C 52 ; WX 556 ; N four ; B 61 0 576 703 ; C 53 ; WX 556 ; N five ; B 68 -19 621 688 ; C 54 ; WX 556 ; N six ; B 91 -19 615 703 ; C 55 ; WX 556 ; N seven ; B 137 0 669 688 ; C 56 ; WX 556 ; N eight ; B 74 -19 607 703 ; C 57 ; WX 556 ; N nine ; B 82 -19 609 703 ; C 58 ; WX 278 ; N colon ; B 87 0 301 516 ; C 59 ; WX 278 ; N semicolon ; B 56 -147 301 516 ; C 60 ; WX 584 ; N less ; B 94 11 641 495 ; C 61 ; WX 584 ; N equal ; B 63 115 628 390 ; C 62 ; WX 584 ; N greater ; B 50 11 597 495 ; C 63 ; WX 556 ; N question ; B 161 0 610 727 ; C 64 ; WX 1015 ; N at ; B 215 -19 965 737 ; C 65 ; WX 667 ; N A ; B 14 0 654 718 ; C 66 ; WX 667 ; N B ; B 74 0 712 718 ; C 67 ; WX 722 ; N C ; B 108 -19 782 737 ; C 68 ; WX 722 ; N D ; B 81 0 764 718 ; C 69 ; WX 667 ; N E ; B 86 0 762 718 ; C 70 ; WX 611 ; N F ; B 86 0 736 718 ; C 71 ; WX 778 ; N G ; B 111 -19 799 737 ; C 72 ; WX 722 ; N H ; B 77 0 799 718 ; C 73 ; WX 278 ; N I ; B 91 0 341 718 ; C 74 ; WX 500 ; N J ; B 47 -19 581 718 ; C 75 ; WX 667 ; N K ; B 76 0 808 718 ; C 76 ; WX 556 ; N L ; B 76 0 555 718 ; C 77 ; WX 833 ; N M ; B 73 0 914 718 ; C 78 ; WX 722 ; N N ; B 76 0 799 718 ; C 79 ; WX 778 ; N O ; B 105 -19 826 737 ; C 80 ; WX 667 ; N P ; B 86 0 737 718 ; C 81 ; WX 778 ; N Q ; B 105 -56 826 737 ; C 82 ; WX 722 ; N R ; B 88 0 773 718 ; C 83 ; WX 667 ; N S ; B 90 -19 713 737 ; C 84 ; WX 611 ; N T ; B 148 0 750 718 ; C 85 ; WX 722 ; N U ; B 123 -19 797 718 ; C 86 ; WX 667 ; N V ; B 173 0 800 718 ; C 87 ; WX 944 ; N W ; B 169 0 1081 718 ; C 88 ; WX 667 ; N X ; B 19 0 790 718 ; C 89 ; WX 667 ; N Y ; B 167 0 806 718 ; C 90 ; WX 611 ; N Z ; B 23 0 741 718 ; C 91 ; WX 278 ; N bracketleft ; B 21 -196 403 722 ; C 92 ; WX 278 ; N backslash ; B 140 -19 291 737 ; C 93 ; WX 278 ; N bracketright ; B -14 -196 368 722 ; C 94 ; WX 469 ; N asciicircum ; B 42 264 539 688 ; C 95 ; WX 556 ; N underscore ; B -27 -125 540 -75 ; C 96 ; WX 222 ; N quoteleft ; B 165 470 323 725 ; C 97 ; WX 556 ; N a ; B 61 -15 559 538 ; C 98 ; WX 556 ; N b ; B 58 -15 584 718 ; C 99 ; WX 500 ; N c ; B 74 -15 553 538 ; C 100 ; WX 556 ; N d ; B 84 -15 652 718 ; C 101 ; WX 556 ; N e ; B 84 -15 578 538 ; C 102 ; WX 278 ; N f ; B 86 0 416 728 ; L i fi ; L l fl ; C 103 ; WX 556 ; N g ; B 42 -220 610 538 ; C 104 ; WX 556 ; N h ; B 65 0 573 718 ; C 105 ; WX 222 ; N i ; B 67 0 308 718 ; C 106 ; WX 222 ; N j ; B -60 -210 308 718 ; C 107 ; WX 500 ; N k ; B 67 0 600 718 ; C 108 ; WX 222 ; N l ; B 67 0 308 718 ; C 109 ; WX 833 ; N m ; B 65 0 852 538 ; C 110 ; WX 556 ; N n ; B 65 0 573 538 ; C 111 ; WX 556 ; N o ; B 83 -14 585 538 ; C 112 ; WX 556 ; N p ; B 14 -207 584 538 ; C 113 ; WX 556 ; N q ; B 84 -207 605 538 ; C 114 ; WX 333 ; N r ; B 77 0 446 538 ; C 115 ; WX 500 ; N s ; B 63 -15 529 538 ; C 116 ; WX 278 ; N t ; B 102 -7 368 669 ; C 117 ; WX 556 ; N u ; B 94 -15 600 523 ; C 118 ; WX 500 ; N v ; B 119 0 603 523 ; C 119 ; WX 722 ; N w ; B 125 0 820 523 ; C 120 ; WX 500 ; N x ; B 11 0 594 523 ; C 121 ; WX 500 ; N y ; B 15 -214 600 523 ; C 122 ; WX 500 ; N z ; B 31 0 571 523 ; C 123 ; WX 334 ; N braceleft ; B 92 -196 445 722 ; C 124 ; WX 260 ; N bar ; B 90 -19 324 737 ; C 125 ; WX 334 ; N braceright ; B 0 -196 354 722 ; C 126 ; WX 584 ; N asciitilde ; B 111 180 580 326 ; C 161 ; WX 333 ; N exclamdown ; B 77 -195 326 523 ; C 162 ; WX 556 ; N cent ; B 95 -115 584 623 ; C 163 ; WX 556 ; N sterling ; B 49 -16 634 718 ; C 164 ; WX 167 ; N fraction ; B -170 -19 482 703 ; C 165 ; WX 556 ; N yen ; B 81 0 699 688 ; C 166 ; WX 556 ; N florin ; B -52 -207 654 737 ; C 167 ; WX 556 ; N section ; B 76 -191 584 737 ; C 168 ; WX 556 ; N currency ; B 60 99 646 603 ; C 169 ; WX 191 ; N quotesingle ; B 157 463 285 718 ; C 170 ; WX 333 ; N quotedblleft ; B 138 470 461 725 ; C 171 ; WX 556 ; N guillemotleft ; B 146 108 554 446 ; C 172 ; WX 333 ; N guilsinglleft ; B 137 108 340 446 ; C 173 ; WX 333 ; N guilsinglright ; B 111 108 314 446 ; C 174 ; WX 500 ; N fi ; B 86 0 587 728 ; C 175 ; WX 500 ; N fl ; B 86 0 585 728 ; C 177 ; WX 556 ; N endash ; B 51 240 623 313 ; C 178 ; WX 556 ; N dagger ; B 135 -159 622 718 ; C 179 ; WX 556 ; N daggerdbl ; B 52 -159 623 718 ; C 180 ; WX 278 ; N periodcentered ; B 129 190 257 315 ; C 182 ; WX 537 ; N paragraph ; B 126 -173 650 718 ; C 183 ; WX 350 ; N bullet ; B 91 202 413 517 ; C 184 ; WX 222 ; N quotesinglbase ; B 21 -149 180 106 ; C 185 ; WX 333 ; N quotedblbase ; B -6 -149 318 106 ; C 186 ; WX 333 ; N quotedblright ; B 124 463 448 718 ; C 187 ; WX 556 ; N guillemotright ; B 120 108 528 446 ; C 188 ; WX 1000 ; N ellipsis ; B 115 0 908 106 ; C 189 ; WX 1000 ; N perthousand ; B 88 -19 1029 703 ; C 191 ; WX 611 ; N questiondown ; B 85 -201 534 525 ; C 193 ; WX 333 ; N grave ; B 170 593 337 734 ; C 194 ; WX 333 ; N acute ; B 248 593 475 734 ; C 195 ; WX 333 ; N circumflex ; B 147 593 438 734 ; C 196 ; WX 333 ; N tilde ; B 125 606 490 722 ; C 197 ; WX 333 ; N macron ; B 143 627 468 684 ; C 198 ; WX 333 ; N breve ; B 167 595 476 731 ; C 199 ; WX 333 ; N dotaccent ; B 249 604 362 706 ; C 200 ; WX 333 ; N dieresis ; B 168 604 443 706 ; C 202 ; WX 333 ; N ring ; B 214 572 402 756 ; C 203 ; WX 333 ; N cedilla ; B 2 -225 232 0 ; C 205 ; WX 333 ; N hungarumlaut ; B 157 593 565 734 ; C 206 ; WX 333 ; N ogonek ; B 43 -225 249 0 ; C 207 ; WX 333 ; N caron ; B 177 593 468 734 ; C 208 ; WX 1000 ; N emdash ; B 51 240 1067 313 ; C 225 ; WX 1000 ; N AE ; B 8 0 1097 718 ; C 227 ; WX 370 ; N ordfeminine ; B 100 304 449 737 ; C 232 ; WX 556 ; N Lslash ; B 41 0 555 718 ; C 233 ; WX 778 ; N Oslash ; B 43 -19 890 737 ; C 234 ; WX 1000 ; N OE ; B 98 -19 1116 737 ; C 235 ; WX 365 ; N ordmasculine ; B 100 304 468 737 ; C 241 ; WX 889 ; N ae ; B 61 -15 909 538 ; C 245 ; WX 278 ; N dotlessi ; B 95 0 294 523 ; C 248 ; WX 222 ; N lslash ; B 41 0 347 718 ; C 249 ; WX 611 ; N oslash ; B 29 -22 647 545 ; C 250 ; WX 944 ; N oe ; B 83 -15 964 538 ; C 251 ; WX 611 ; N germandbls ; B 67 -15 658 728 ; C -1 ; WX 611 ; N Zcaron ; B 23 0 741 929 ; C -1 ; WX 500 ; N ccedilla ; B 74 -225 553 538 ; C -1 ; WX 500 ; N ydieresis ; B 15 -214 600 706 ; C -1 ; WX 556 ; N atilde ; B 61 -15 592 722 ; C -1 ; WX 278 ; N icircumflex ; B 95 0 411 734 ; C -1 ; WX 333 ; N threesuperior ; B 90 270 436 703 ; C -1 ; WX 556 ; N ecircumflex ; B 84 -15 578 734 ; C -1 ; WX 556 ; N thorn ; B 14 -207 584 718 ; C -1 ; WX 556 ; N egrave ; B 84 -15 578 734 ; C -1 ; WX 333 ; N twosuperior ; B 64 281 449 703 ; C -1 ; WX 556 ; N eacute ; B 84 -15 587 734 ; C -1 ; WX 556 ; N otilde ; B 83 -14 602 722 ; C -1 ; WX 667 ; N Aacute ; B 14 0 683 929 ; C -1 ; WX 556 ; N ocircumflex ; B 83 -14 585 734 ; C -1 ; WX 500 ; N yacute ; B 15 -214 600 734 ; C -1 ; WX 556 ; N udieresis ; B 94 -15 600 706 ; C -1 ; WX 834 ; N threequarters ; B 130 -19 861 703 ; C -1 ; WX 556 ; N acircumflex ; B 61 -15 559 734 ; C -1 ; WX 722 ; N Eth ; B 69 0 764 718 ; C -1 ; WX 556 ; N edieresis ; B 84 -15 578 706 ; C -1 ; WX 556 ; N ugrave ; B 94 -15 600 734 ; C -1 ; WX 1000 ; N trademark ; B 186 306 1056 718 ; C -1 ; WX 556 ; N ograve ; B 83 -14 585 734 ; C -1 ; WX 500 ; N scaron ; B 63 -15 552 734 ; C -1 ; WX 278 ; N Idieresis ; B 91 0 458 901 ; C -1 ; WX 556 ; N uacute ; B 94 -15 600 734 ; C -1 ; WX 556 ; N agrave ; B 61 -15 559 734 ; C -1 ; WX 556 ; N ntilde ; B 65 0 592 722 ; C -1 ; WX 556 ; N aring ; B 61 -15 559 756 ; C -1 ; WX 500 ; N zcaron ; B 31 0 571 734 ; C -1 ; WX 278 ; N Icircumflex ; B 91 0 452 929 ; C -1 ; WX 722 ; N Ntilde ; B 76 0 799 917 ; C -1 ; WX 556 ; N ucircumflex ; B 94 -15 600 734 ; C -1 ; WX 667 ; N Ecircumflex ; B 86 0 762 929 ; C -1 ; WX 278 ; N Iacute ; B 91 0 489 929 ; C -1 ; WX 722 ; N Ccedilla ; B 108 -225 782 737 ; C -1 ; WX 778 ; N Odieresis ; B 105 -19 826 901 ; C -1 ; WX 667 ; N Scaron ; B 90 -19 713 929 ; C -1 ; WX 667 ; N Edieresis ; B 86 0 762 901 ; C -1 ; WX 278 ; N Igrave ; B 91 0 351 929 ; C -1 ; WX 556 ; N adieresis ; B 61 -15 559 706 ; C -1 ; WX 778 ; N Ograve ; B 105 -19 826 929 ; C -1 ; WX 667 ; N Egrave ; B 86 0 762 929 ; C -1 ; WX 667 ; N Ydieresis ; B 167 0 806 901 ; C -1 ; WX 737 ; N registered ; B 54 -19 837 737 ; C -1 ; WX 778 ; N Otilde ; B 105 -19 826 917 ; C -1 ; WX 834 ; N onequarter ; B 150 -19 802 703 ; C -1 ; WX 722 ; N Ugrave ; B 123 -19 797 929 ; C -1 ; WX 722 ; N Ucircumflex ; B 123 -19 797 929 ; C -1 ; WX 667 ; N Thorn ; B 86 0 712 718 ; C -1 ; WX 584 ; N divide ; B 85 -19 606 524 ; C -1 ; WX 667 ; N Atilde ; B 14 0 699 917 ; C -1 ; WX 722 ; N Uacute ; B 123 -19 797 929 ; C -1 ; WX 778 ; N Ocircumflex ; B 105 -19 826 929 ; C -1 ; WX 584 ; N logicalnot ; B 106 108 628 390 ; C -1 ; WX 667 ; N Aring ; B 14 0 654 931 ; C -1 ; WX 278 ; N idieresis ; B 95 0 416 706 ; C -1 ; WX 278 ; N iacute ; B 95 0 448 734 ; C -1 ; WX 556 ; N aacute ; B 61 -15 587 734 ; C -1 ; WX 584 ; N plusminus ; B 39 0 618 506 ; C -1 ; WX 584 ; N multiply ; B 50 0 642 506 ; C -1 ; WX 722 ; N Udieresis ; B 123 -19 797 901 ; C -1 ; WX 584 ; N minus ; B 85 216 606 289 ; C -1 ; WX 333 ; N onesuperior ; B 166 281 371 703 ; C -1 ; WX 667 ; N Eacute ; B 86 0 762 929 ; C -1 ; WX 667 ; N Acircumflex ; B 14 0 654 929 ; C -1 ; WX 737 ; N copyright ; B 54 -19 837 737 ; C -1 ; WX 667 ; N Agrave ; B 14 0 654 929 ; C -1 ; WX 556 ; N odieresis ; B 83 -14 585 706 ; C -1 ; WX 556 ; N oacute ; B 83 -14 587 734 ; C -1 ; WX 400 ; N degree ; B 169 411 468 703 ; C -1 ; WX 278 ; N igrave ; B 95 0 310 734 ; C -1 ; WX 556 ; N mu ; B 24 -207 600 523 ; C -1 ; WX 778 ; N Oacute ; B 105 -19 826 929 ; C -1 ; WX 556 ; N eth ; B 81 -15 617 737 ; C -1 ; WX 667 ; N Adieresis ; B 14 0 654 901 ; C -1 ; WX 667 ; N Yacute ; B 167 0 806 929 ; C -1 ; WX 260 ; N brokenbar ; B 90 -19 324 737 ; C -1 ; WX 834 ; N onehalf ; B 114 -19 839 703 ; EndCharMetrics StartKernData StartKernPairs 250 KPX A y -40 KPX A w -40 KPX A v -40 KPX A u -30 KPX A Y -100 KPX A W -50 KPX A V -70 KPX A U -50 KPX A T -120 KPX A Q -30 KPX A O -30 KPX A G -30 KPX A C -30 KPX B period -20 KPX B comma -20 KPX B U -10 KPX C period -30 KPX C comma -30 KPX D period -70 KPX D comma -70 KPX D Y -90 KPX D W -40 KPX D V -70 KPX D A -40 KPX F r -45 KPX F period -150 KPX F o -30 KPX F e -30 KPX F comma -150 KPX F a -50 KPX F A -80 KPX J u -20 KPX J period -30 KPX J comma -30 KPX J a -20 KPX J A -20 KPX K y -50 KPX K u -30 KPX K o -40 KPX K e -40 KPX K O -50 KPX L y -30 KPX L quoteright -160 KPX L quotedblright -140 KPX L Y -140 KPX L W -70 KPX L V -110 KPX L T -110 KPX O period -40 KPX O comma -40 KPX O Y -70 KPX O X -60 KPX O W -30 KPX O V -50 KPX O T -40 KPX O A -20 KPX P period -180 KPX P o -50 KPX P e -50 KPX P comma -180 KPX P a -40 KPX P A -120 KPX Q U -10 KPX R Y -50 KPX R W -30 KPX R V -50 KPX R U -40 KPX R T -30 KPX R O -20 KPX S period -20 KPX S comma -20 KPX T y -120 KPX T w -120 KPX T u -120 KPX T semicolon -20 KPX T r -120 KPX T period -120 KPX T o -120 KPX T hyphen -140 KPX T e -120 KPX T comma -120 KPX T colon -20 KPX T a -120 KPX T O -40 KPX T A -120 KPX U period -40 KPX U comma -40 KPX U A -40 KPX V u -70 KPX V semicolon -40 KPX V period -125 KPX V o -80 KPX V hyphen -80 KPX V e -80 KPX V comma -125 KPX V colon -40 KPX V a -70 KPX V O -40 KPX V G -40 KPX V A -80 KPX W y -20 KPX W u -30 KPX W period -80 KPX W o -30 KPX W hyphen -40 KPX W e -30 KPX W comma -80 KPX W a -40 KPX W O -20 KPX W A -50 KPX Y u -110 KPX Y semicolon -60 KPX Y period -140 KPX Y o -140 KPX Y i -20 KPX Y hyphen -140 KPX Y e -140 KPX Y comma -140 KPX Y colon -60 KPX Y a -140 KPX Y O -85 KPX Y A -110 KPX a y -30 KPX a w -20 KPX a v -20 KPX b y -20 KPX b v -20 KPX b u -20 KPX b period -40 KPX b l -20 KPX b comma -40 KPX b b -10 KPX c k -20 KPX c comma -15 KPX colon space -50 KPX comma quoteright -100 KPX comma quotedblright -100 KPX e y -20 KPX e x -30 KPX e w -20 KPX e v -30 KPX e period -15 KPX e comma -15 KPX f quoteright 50 KPX f quotedblright 60 KPX f period -30 KPX f o -30 KPX f e -30 KPX f dotlessi -28 KPX f comma -30 KPX f a -30 KPX g r -10 KPX h y -30 KPX k o -20 KPX k e -20 KPX m y -15 KPX m u -10 KPX n y -15 KPX n v -20 KPX n u -10 KPX o y -30 KPX o x -30 KPX o w -15 KPX o v -15 KPX o period -40 KPX o comma -40 KPX oslash z -55 KPX oslash y -70 KPX oslash x -85 KPX oslash w -70 KPX oslash v -70 KPX oslash u -55 KPX oslash t -55 KPX oslash s -55 KPX oslash r -55 KPX oslash q -55 KPX oslash period -95 KPX oslash p -55 KPX oslash o -55 KPX oslash n -55 KPX oslash m -55 KPX oslash l -55 KPX oslash k -55 KPX oslash j -55 KPX oslash i -55 KPX oslash h -55 KPX oslash g -55 KPX oslash f -55 KPX oslash e -55 KPX oslash d -55 KPX oslash comma -95 KPX oslash c -55 KPX oslash b -55 KPX oslash a -55 KPX p y -30 KPX p period -35 KPX p comma -35 KPX period space -60 KPX period quoteright -100 KPX period quotedblright -100 KPX quotedblright space -40 KPX quoteleft quoteleft -57 KPX quoteright space -70 KPX quoteright s -50 KPX quoteright r -50 KPX quoteright quoteright -57 KPX quoteright d -50 KPX r y 30 KPX r v 30 KPX r u 15 KPX r t 40 KPX r semicolon 30 KPX r period -50 KPX r p 30 KPX r n 25 KPX r m 25 KPX r l 15 KPX r k 15 KPX r i 15 KPX r comma -50 KPX r colon 30 KPX r a -10 KPX s w -30 KPX s period -15 KPX s comma -15 KPX semicolon space -50 KPX space quoteleft -60 KPX space quotedblleft -30 KPX space Y -90 KPX space W -40 KPX space V -50 KPX space T -50 KPX v period -80 KPX v o -25 KPX v e -25 KPX v comma -80 KPX v a -25 KPX w period -60 KPX w o -10 KPX w e -10 KPX w comma -60 KPX w a -15 KPX x e -30 KPX y period -100 KPX y o -20 KPX y e -20 KPX y comma -100 KPX y a -20 KPX z o -15 KPX z e -15 EndKernPairs EndKernData StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 208 195 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 208 195 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 208 195 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 208 195 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 204 175 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 208 195 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 195 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 208 195 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 208 195 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 208 195 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 208 195 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 14 195 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 14 195 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 14 195 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 14 195 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 246 195 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 264 195 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 264 195 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 264 195 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 264 195 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 264 195 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 208 195 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 236 195 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 236 195 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 236 195 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 236 195 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 208 195 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 208 195 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 180 195 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 112 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 112 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 112 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 112 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 112 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 102 0 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 84 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 112 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 112 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 112 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 112 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 102 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 112 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 112 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 112 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 112 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 112 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 84 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 112 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 112 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 112 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 112 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 84 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 84 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/phvro8an.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All rights reserved. Comment Creation Date: Thu Mar 15 11:25:48 1990 Comment UniqueID 28389 Comment VMusage 7572 42473 FontName Helvetica-Narrow-Oblique FullName Helvetica Narrow Oblique FamilyName Helvetica Weight Medium ItalicAngle -12 IsFixedPitch false FontBBox -139 -225 915 931 UnderlinePosition -100 UnderlineThickness 50 Version 001.006 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All rights reserved.Helvetica is a trademark of Linotype AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 718 XHeight 523 Ascender 718 Descender -207 StartCharMetrics 228 C 32 ; WX 228 ; N space ; B 0 0 0 0 ; C 33 ; WX 228 ; N exclam ; B 74 0 278 718 ; C 34 ; WX 291 ; N quotedbl ; B 138 463 359 718 ; C 35 ; WX 456 ; N numbersign ; B 60 0 517 688 ; C 36 ; WX 456 ; N dollar ; B 57 -115 506 775 ; C 37 ; WX 729 ; N percent ; B 120 -19 729 703 ; C 38 ; WX 547 ; N ampersand ; B 63 -15 530 718 ; C 39 ; WX 182 ; N quoteright ; B 124 463 254 718 ; C 40 ; WX 273 ; N parenleft ; B 89 -207 372 733 ; C 41 ; WX 273 ; N parenright ; B -7 -207 276 733 ; C 42 ; WX 319 ; N asterisk ; B 135 431 389 718 ; C 43 ; WX 479 ; N plus ; B 70 0 497 505 ; C 44 ; WX 228 ; N comma ; B 46 -147 175 106 ; C 45 ; WX 273 ; N hyphen ; B 77 232 293 322 ; C 46 ; WX 228 ; N period ; B 71 0 175 106 ; C 47 ; WX 228 ; N slash ; B -17 -19 370 737 ; C 48 ; WX 456 ; N zero ; B 77 -19 499 703 ; C 49 ; WX 456 ; N one ; B 170 0 417 703 ; C 50 ; WX 456 ; N two ; B 21 0 506 703 ; C 51 ; WX 456 ; N three ; B 61 -19 500 703 ; C 52 ; WX 456 ; N four ; B 50 0 472 703 ; C 53 ; WX 456 ; N five ; B 55 -19 509 688 ; C 54 ; WX 456 ; N six ; B 74 -19 504 703 ; C 55 ; WX 456 ; N seven ; B 112 0 549 688 ; C 56 ; WX 456 ; N eight ; B 60 -19 497 703 ; C 57 ; WX 456 ; N nine ; B 67 -19 499 703 ; C 58 ; WX 228 ; N colon ; B 71 0 247 516 ; C 59 ; WX 228 ; N semicolon ; B 46 -147 247 516 ; C 60 ; WX 479 ; N less ; B 77 11 526 495 ; C 61 ; WX 479 ; N equal ; B 52 115 515 390 ; C 62 ; WX 479 ; N greater ; B 41 11 490 495 ; C 63 ; WX 456 ; N question ; B 132 0 500 727 ; C 64 ; WX 832 ; N at ; B 176 -19 791 737 ; C 65 ; WX 547 ; N A ; B 11 0 536 718 ; C 66 ; WX 547 ; N B ; B 61 0 583 718 ; C 67 ; WX 592 ; N C ; B 88 -19 640 737 ; C 68 ; WX 592 ; N D ; B 66 0 626 718 ; C 69 ; WX 547 ; N E ; B 71 0 625 718 ; C 70 ; WX 501 ; N F ; B 71 0 603 718 ; C 71 ; WX 638 ; N G ; B 91 -19 655 737 ; C 72 ; WX 592 ; N H ; B 63 0 655 718 ; C 73 ; WX 228 ; N I ; B 75 0 279 718 ; C 74 ; WX 410 ; N J ; B 39 -19 476 718 ; C 75 ; WX 547 ; N K ; B 62 0 662 718 ; C 76 ; WX 456 ; N L ; B 62 0 455 718 ; C 77 ; WX 683 ; N M ; B 60 0 749 718 ; C 78 ; WX 592 ; N N ; B 62 0 655 718 ; C 79 ; WX 638 ; N O ; B 86 -19 677 737 ; C 80 ; WX 547 ; N P ; B 71 0 604 718 ; C 81 ; WX 638 ; N Q ; B 86 -56 677 737 ; C 82 ; WX 592 ; N R ; B 72 0 634 718 ; C 83 ; WX 547 ; N S ; B 74 -19 584 737 ; C 84 ; WX 501 ; N T ; B 122 0 615 718 ; C 85 ; WX 592 ; N U ; B 101 -19 653 718 ; C 86 ; WX 547 ; N V ; B 142 0 656 718 ; C 87 ; WX 774 ; N W ; B 138 0 886 718 ; C 88 ; WX 547 ; N X ; B 16 0 647 718 ; C 89 ; WX 547 ; N Y ; B 137 0 661 718 ; C 90 ; WX 501 ; N Z ; B 19 0 607 718 ; C 91 ; WX 228 ; N bracketleft ; B 17 -196 331 722 ; C 92 ; WX 228 ; N backslash ; B 115 -19 239 737 ; C 93 ; WX 228 ; N bracketright ; B -11 -196 302 722 ; C 94 ; WX 385 ; N asciicircum ; B 35 264 442 688 ; C 95 ; WX 456 ; N underscore ; B -22 -125 443 -75 ; C 96 ; WX 182 ; N quoteleft ; B 135 470 265 725 ; C 97 ; WX 456 ; N a ; B 50 -15 458 538 ; C 98 ; WX 456 ; N b ; B 48 -15 479 718 ; C 99 ; WX 410 ; N c ; B 61 -15 454 538 ; C 100 ; WX 456 ; N d ; B 69 -15 534 718 ; C 101 ; WX 456 ; N e ; B 69 -15 474 538 ; C 102 ; WX 228 ; N f ; B 71 0 341 728 ; L i fi ; L l fl ; C 103 ; WX 456 ; N g ; B 34 -220 500 538 ; C 104 ; WX 456 ; N h ; B 53 0 470 718 ; C 105 ; WX 182 ; N i ; B 55 0 252 718 ; C 106 ; WX 182 ; N j ; B -49 -210 252 718 ; C 107 ; WX 410 ; N k ; B 55 0 492 718 ; C 108 ; WX 182 ; N l ; B 55 0 252 718 ; C 109 ; WX 683 ; N m ; B 53 0 699 538 ; C 110 ; WX 456 ; N n ; B 53 0 470 538 ; C 111 ; WX 456 ; N o ; B 68 -14 479 538 ; C 112 ; WX 456 ; N p ; B 11 -207 479 538 ; C 113 ; WX 456 ; N q ; B 69 -207 496 538 ; C 114 ; WX 273 ; N r ; B 63 0 365 538 ; C 115 ; WX 410 ; N s ; B 52 -15 434 538 ; C 116 ; WX 228 ; N t ; B 84 -7 302 669 ; C 117 ; WX 456 ; N u ; B 77 -15 492 523 ; C 118 ; WX 410 ; N v ; B 98 0 495 523 ; C 119 ; WX 592 ; N w ; B 103 0 673 523 ; C 120 ; WX 410 ; N x ; B 9 0 487 523 ; C 121 ; WX 410 ; N y ; B 12 -214 492 523 ; C 122 ; WX 410 ; N z ; B 25 0 468 523 ; C 123 ; WX 274 ; N braceleft ; B 75 -196 365 722 ; C 124 ; WX 213 ; N bar ; B 74 -19 265 737 ; C 125 ; WX 274 ; N braceright ; B 0 -196 291 722 ; C 126 ; WX 479 ; N asciitilde ; B 91 180 476 326 ; C 161 ; WX 273 ; N exclamdown ; B 63 -195 267 523 ; C 162 ; WX 456 ; N cent ; B 78 -115 479 623 ; C 163 ; WX 456 ; N sterling ; B 40 -16 520 718 ; C 164 ; WX 137 ; N fraction ; B -139 -19 396 703 ; C 165 ; WX 456 ; N yen ; B 67 0 573 688 ; C 166 ; WX 456 ; N florin ; B -43 -207 537 737 ; C 167 ; WX 456 ; N section ; B 63 -191 479 737 ; C 168 ; WX 456 ; N currency ; B 49 99 530 603 ; C 169 ; WX 157 ; N quotesingle ; B 129 463 233 718 ; C 170 ; WX 273 ; N quotedblleft ; B 113 470 378 725 ; C 171 ; WX 456 ; N guillemotleft ; B 120 108 454 446 ; C 172 ; WX 273 ; N guilsinglleft ; B 112 108 279 446 ; C 173 ; WX 273 ; N guilsinglright ; B 91 108 257 446 ; C 174 ; WX 410 ; N fi ; B 71 0 481 728 ; C 175 ; WX 410 ; N fl ; B 71 0 479 728 ; C 177 ; WX 456 ; N endash ; B 42 240 510 313 ; C 178 ; WX 456 ; N dagger ; B 110 -159 510 718 ; C 179 ; WX 456 ; N daggerdbl ; B 43 -159 511 718 ; C 180 ; WX 228 ; N periodcentered ; B 106 190 211 315 ; C 182 ; WX 440 ; N paragraph ; B 103 -173 533 718 ; C 183 ; WX 287 ; N bullet ; B 74 202 339 517 ; C 184 ; WX 182 ; N quotesinglbase ; B 17 -149 147 106 ; C 185 ; WX 273 ; N quotedblbase ; B -5 -149 260 106 ; C 186 ; WX 273 ; N quotedblright ; B 102 463 367 718 ; C 187 ; WX 456 ; N guillemotright ; B 98 108 433 446 ; C 188 ; WX 820 ; N ellipsis ; B 94 0 744 106 ; C 189 ; WX 820 ; N perthousand ; B 72 -19 844 703 ; C 191 ; WX 501 ; N questiondown ; B 70 -201 438 525 ; C 193 ; WX 273 ; N grave ; B 139 593 276 734 ; C 194 ; WX 273 ; N acute ; B 203 593 390 734 ; C 195 ; WX 273 ; N circumflex ; B 121 593 359 734 ; C 196 ; WX 273 ; N tilde ; B 102 606 402 722 ; C 197 ; WX 273 ; N macron ; B 117 627 384 684 ; C 198 ; WX 273 ; N breve ; B 137 595 391 731 ; C 199 ; WX 273 ; N dotaccent ; B 204 604 297 706 ; C 200 ; WX 273 ; N dieresis ; B 138 604 363 706 ; C 202 ; WX 273 ; N ring ; B 175 572 330 756 ; C 203 ; WX 273 ; N cedilla ; B 2 -225 191 0 ; C 205 ; WX 273 ; N hungarumlaut ; B 129 593 463 734 ; C 206 ; WX 273 ; N ogonek ; B 35 -225 204 0 ; C 207 ; WX 273 ; N caron ; B 145 593 384 734 ; C 208 ; WX 820 ; N emdash ; B 42 240 875 313 ; C 225 ; WX 820 ; N AE ; B 7 0 899 718 ; C 227 ; WX 303 ; N ordfeminine ; B 82 304 368 737 ; C 232 ; WX 456 ; N Lslash ; B 34 0 455 718 ; C 233 ; WX 638 ; N Oslash ; B 35 -19 730 737 ; C 234 ; WX 820 ; N OE ; B 80 -19 915 737 ; C 235 ; WX 299 ; N ordmasculine ; B 82 304 384 737 ; C 241 ; WX 729 ; N ae ; B 50 -15 746 538 ; C 245 ; WX 228 ; N dotlessi ; B 78 0 241 523 ; C 248 ; WX 182 ; N lslash ; B 34 0 284 718 ; C 249 ; WX 501 ; N oslash ; B 24 -22 531 545 ; C 250 ; WX 774 ; N oe ; B 68 -15 791 538 ; C 251 ; WX 501 ; N germandbls ; B 55 -15 539 728 ; C -1 ; WX 501 ; N Zcaron ; B 19 0 607 929 ; C -1 ; WX 410 ; N ccedilla ; B 61 -225 454 538 ; C -1 ; WX 410 ; N ydieresis ; B 12 -214 492 706 ; C -1 ; WX 456 ; N atilde ; B 50 -15 486 722 ; C -1 ; WX 228 ; N icircumflex ; B 78 0 337 734 ; C -1 ; WX 273 ; N threesuperior ; B 74 270 358 703 ; C -1 ; WX 456 ; N ecircumflex ; B 69 -15 474 734 ; C -1 ; WX 456 ; N thorn ; B 11 -207 479 718 ; C -1 ; WX 456 ; N egrave ; B 69 -15 474 734 ; C -1 ; WX 273 ; N twosuperior ; B 52 281 368 703 ; C -1 ; WX 456 ; N eacute ; B 69 -15 481 734 ; C -1 ; WX 456 ; N otilde ; B 68 -14 494 722 ; C -1 ; WX 547 ; N Aacute ; B 11 0 560 929 ; C -1 ; WX 456 ; N ocircumflex ; B 68 -14 479 734 ; C -1 ; WX 410 ; N yacute ; B 12 -214 492 734 ; C -1 ; WX 456 ; N udieresis ; B 77 -15 492 706 ; C -1 ; WX 684 ; N threequarters ; B 106 -19 706 703 ; C -1 ; WX 456 ; N acircumflex ; B 50 -15 458 734 ; C -1 ; WX 592 ; N Eth ; B 57 0 626 718 ; C -1 ; WX 456 ; N edieresis ; B 69 -15 474 706 ; C -1 ; WX 456 ; N ugrave ; B 77 -15 492 734 ; C -1 ; WX 820 ; N trademark ; B 152 306 866 718 ; C -1 ; WX 456 ; N ograve ; B 68 -14 479 734 ; C -1 ; WX 410 ; N scaron ; B 52 -15 453 734 ; C -1 ; WX 228 ; N Idieresis ; B 75 0 375 901 ; C -1 ; WX 456 ; N uacute ; B 77 -15 492 734 ; C -1 ; WX 456 ; N agrave ; B 50 -15 458 734 ; C -1 ; WX 456 ; N ntilde ; B 53 0 486 722 ; C -1 ; WX 456 ; N aring ; B 50 -15 458 756 ; C -1 ; WX 410 ; N zcaron ; B 25 0 468 734 ; C -1 ; WX 228 ; N Icircumflex ; B 75 0 371 929 ; C -1 ; WX 592 ; N Ntilde ; B 62 0 655 917 ; C -1 ; WX 456 ; N ucircumflex ; B 77 -15 492 734 ; C -1 ; WX 547 ; N Ecircumflex ; B 71 0 625 929 ; C -1 ; WX 228 ; N Iacute ; B 75 0 401 929 ; C -1 ; WX 592 ; N Ccedilla ; B 88 -225 640 737 ; C -1 ; WX 638 ; N Odieresis ; B 86 -19 677 901 ; C -1 ; WX 547 ; N Scaron ; B 74 -19 584 929 ; C -1 ; WX 547 ; N Edieresis ; B 71 0 625 901 ; C -1 ; WX 228 ; N Igrave ; B 75 0 288 929 ; C -1 ; WX 456 ; N adieresis ; B 50 -15 458 706 ; C -1 ; WX 638 ; N Ograve ; B 86 -19 677 929 ; C -1 ; WX 547 ; N Egrave ; B 71 0 625 929 ; C -1 ; WX 547 ; N Ydieresis ; B 137 0 661 901 ; C -1 ; WX 604 ; N registered ; B 44 -19 687 737 ; C -1 ; WX 638 ; N Otilde ; B 86 -19 677 917 ; C -1 ; WX 684 ; N onequarter ; B 123 -19 658 703 ; C -1 ; WX 592 ; N Ugrave ; B 101 -19 653 929 ; C -1 ; WX 592 ; N Ucircumflex ; B 101 -19 653 929 ; C -1 ; WX 547 ; N Thorn ; B 71 0 584 718 ; C -1 ; WX 479 ; N divide ; B 70 -19 497 524 ; C -1 ; WX 547 ; N Atilde ; B 11 0 573 917 ; C -1 ; WX 592 ; N Uacute ; B 101 -19 653 929 ; C -1 ; WX 638 ; N Ocircumflex ; B 86 -19 677 929 ; C -1 ; WX 479 ; N logicalnot ; B 87 108 515 390 ; C -1 ; WX 547 ; N Aring ; B 11 0 536 931 ; C -1 ; WX 228 ; N idieresis ; B 78 0 341 706 ; C -1 ; WX 228 ; N iacute ; B 78 0 367 734 ; C -1 ; WX 456 ; N aacute ; B 50 -15 481 734 ; C -1 ; WX 479 ; N plusminus ; B 32 0 507 506 ; C -1 ; WX 479 ; N multiply ; B 41 0 526 506 ; C -1 ; WX 592 ; N Udieresis ; B 101 -19 653 901 ; C -1 ; WX 479 ; N minus ; B 70 216 497 289 ; C -1 ; WX 273 ; N onesuperior ; B 136 281 305 703 ; C -1 ; WX 547 ; N Eacute ; B 71 0 625 929 ; C -1 ; WX 547 ; N Acircumflex ; B 11 0 536 929 ; C -1 ; WX 604 ; N copyright ; B 44 -19 687 737 ; C -1 ; WX 547 ; N Agrave ; B 11 0 536 929 ; C -1 ; WX 456 ; N odieresis ; B 68 -14 479 706 ; C -1 ; WX 456 ; N oacute ; B 68 -14 481 734 ; C -1 ; WX 328 ; N degree ; B 138 411 384 703 ; C -1 ; WX 228 ; N igrave ; B 78 0 254 734 ; C -1 ; WX 456 ; N mu ; B 20 -207 492 523 ; C -1 ; WX 638 ; N Oacute ; B 86 -19 677 929 ; C -1 ; WX 456 ; N eth ; B 67 -15 506 737 ; C -1 ; WX 547 ; N Adieresis ; B 11 0 536 901 ; C -1 ; WX 547 ; N Yacute ; B 137 0 661 929 ; C -1 ; WX 213 ; N brokenbar ; B 74 -19 265 737 ; C -1 ; WX 684 ; N onehalf ; B 93 -19 688 703 ; EndCharMetrics StartKernData StartKernPairs 250 KPX A y -40 KPX A w -40 KPX A v -40 KPX A u -30 KPX A Y -100 KPX A W -50 KPX A V -70 KPX A U -50 KPX A T -120 KPX A Q -30 KPX A O -30 KPX A G -30 KPX A C -30 KPX B period -20 KPX B comma -20 KPX B U -10 KPX C period -30 KPX C comma -30 KPX D period -70 KPX D comma -70 KPX D Y -90 KPX D W -40 KPX D V -70 KPX D A -40 KPX F r -45 KPX F period -150 KPX F o -30 KPX F e -30 KPX F comma -150 KPX F a -50 KPX F A -80 KPX J u -20 KPX J period -30 KPX J comma -30 KPX J a -20 KPX J A -20 KPX K y -50 KPX K u -30 KPX K o -40 KPX K e -40 KPX K O -50 KPX L y -30 KPX L quoteright -160 KPX L quotedblright -140 KPX L Y -140 KPX L W -70 KPX L V -110 KPX L T -110 KPX O period -40 KPX O comma -40 KPX O Y -70 KPX O X -60 KPX O W -30 KPX O V -50 KPX O T -40 KPX O A -20 KPX P period -180 KPX P o -50 KPX P e -50 KPX P comma -180 KPX P a -40 KPX P A -120 KPX Q U -10 KPX R Y -50 KPX R W -30 KPX R V -50 KPX R U -40 KPX R T -30 KPX R O -20 KPX S period -20 KPX S comma -20 KPX T y -120 KPX T w -120 KPX T u -120 KPX T semicolon -20 KPX T r -120 KPX T period -120 KPX T o -120 KPX T hyphen -140 KPX T e -120 KPX T comma -120 KPX T colon -20 KPX T a -120 KPX T O -40 KPX T A -120 KPX U period -40 KPX U comma -40 KPX U A -40 KPX V u -70 KPX V semicolon -40 KPX V period -125 KPX V o -80 KPX V hyphen -80 KPX V e -80 KPX V comma -125 KPX V colon -40 KPX V a -70 KPX V O -40 KPX V G -40 KPX V A -80 KPX W y -20 KPX W u -30 KPX W period -80 KPX W o -30 KPX W hyphen -40 KPX W e -30 KPX W comma -80 KPX W a -40 KPX W O -20 KPX W A -50 KPX Y u -110 KPX Y semicolon -60 KPX Y period -140 KPX Y o -140 KPX Y i -20 KPX Y hyphen -140 KPX Y e -140 KPX Y comma -140 KPX Y colon -60 KPX Y a -140 KPX Y O -85 KPX Y A -110 KPX a y -30 KPX a w -20 KPX a v -20 KPX b y -20 KPX b v -20 KPX b u -20 KPX b period -40 KPX b l -20 KPX b comma -40 KPX b b -10 KPX c k -20 KPX c comma -15 KPX colon space -50 KPX comma quoteright -100 KPX comma quotedblright -100 KPX e y -20 KPX e x -30 KPX e w -20 KPX e v -30 KPX e period -15 KPX e comma -15 KPX f quoteright 50 KPX f quotedblright 60 KPX f period -30 KPX f o -30 KPX f e -30 KPX f dotlessi -28 KPX f comma -30 KPX f a -30 KPX g r -10 KPX h y -30 KPX k o -20 KPX k e -20 KPX m y -15 KPX m u -10 KPX n y -15 KPX n v -20 KPX n u -10 KPX o y -30 KPX o x -30 KPX o w -15 KPX o v -15 KPX o period -40 KPX o comma -40 KPX oslash z -55 KPX oslash y -70 KPX oslash x -85 KPX oslash w -70 KPX oslash v -70 KPX oslash u -55 KPX oslash t -55 KPX oslash s -55 KPX oslash r -55 KPX oslash q -55 KPX oslash period -95 KPX oslash p -55 KPX oslash o -55 KPX oslash n -55 KPX oslash m -55 KPX oslash l -55 KPX oslash k -55 KPX oslash j -55 KPX oslash i -55 KPX oslash h -55 KPX oslash g -55 KPX oslash f -55 KPX oslash e -55 KPX oslash d -55 KPX oslash comma -95 KPX oslash c -55 KPX oslash b -55 KPX oslash a -55 KPX p y -30 KPX p period -35 KPX p comma -35 KPX period space -60 KPX period quoteright -100 KPX period quotedblright -100 KPX quotedblright space -40 KPX quoteleft quoteleft -57 KPX quoteright space -70 KPX quoteright s -50 KPX quoteright r -50 KPX quoteright quoteright -57 KPX quoteright d -50 KPX r y 30 KPX r v 30 KPX r u 15 KPX r t 40 KPX r semicolon 30 KPX r period -50 KPX r p 30 KPX r n 25 KPX r m 25 KPX r l 15 KPX r k 15 KPX r i 15 KPX r comma -50 KPX r colon 30 KPX r a -10 KPX s w -30 KPX s period -15 KPX s comma -15 KPX semicolon space -50 KPX space quoteleft -60 KPX space quotedblleft -30 KPX space Y -90 KPX space W -40 KPX space V -50 KPX space T -50 KPX v period -80 KPX v o -25 KPX v e -25 KPX v comma -80 KPX v a -25 KPX w period -60 KPX w o -10 KPX w e -10 KPX w comma -60 KPX w a -15 KPX x e -30 KPX y period -100 KPX y o -20 KPX y e -20 KPX y comma -100 KPX y a -20 KPX z o -15 KPX z e -15 EndKernPairs EndKernData StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 171 195 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 171 195 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 171 195 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 171 195 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 167 175 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 171 195 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 160 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 171 195 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 171 195 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 171 195 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 171 195 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 12 195 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 12 195 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 12 195 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 12 195 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 202 195 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 217 195 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 217 195 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 217 195 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 217 195 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 217 195 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 171 195 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 194 195 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 194 195 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 194 195 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 194 195 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 171 195 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 171 195 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 148 195 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 92 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 92 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 92 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 92 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 92 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 84 0 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 69 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 92 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 92 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 92 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 92 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -22 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -22 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -22 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -22 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 84 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 92 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 92 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 92 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 92 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 92 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 69 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 92 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 92 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 92 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 92 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 69 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 69 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 69 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pncb8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1988, 1991 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Tue May 28 16:48:12 1991 Comment UniqueID 35031 Comment VMusage 30773 37665 FontName NewCenturySchlbk-Bold FullName New Century Schoolbook Bold FamilyName New Century Schoolbook Weight Bold ItalicAngle 0 IsFixedPitch false FontBBox -165 -250 1000 988 UnderlinePosition -100 UnderlineThickness 50 Version 001.009 Notice Copyright (c) 1985, 1987, 1988, 1991 Adobe Systems Incorporated. All Rights Reserved. EncodingScheme AdobeStandardEncoding CapHeight 722 XHeight 475 Ascender 737 Descender -205 StartCharMetrics 228 C 32 ; WX 287 ; N space ; B 0 0 0 0 ; C 33 ; WX 296 ; N exclam ; B 53 -15 243 737 ; C 34 ; WX 333 ; N quotedbl ; B 0 378 333 737 ; C 35 ; WX 574 ; N numbersign ; B 36 0 538 690 ; C 36 ; WX 574 ; N dollar ; B 25 -141 549 810 ; C 37 ; WX 833 ; N percent ; B 14 -15 819 705 ; C 38 ; WX 852 ; N ampersand ; B 34 -15 818 737 ; C 39 ; WX 241 ; N quoteright ; B 22 378 220 737 ; C 40 ; WX 389 ; N parenleft ; B 77 -117 345 745 ; C 41 ; WX 389 ; N parenright ; B 44 -117 312 745 ; C 42 ; WX 500 ; N asterisk ; B 54 302 446 737 ; C 43 ; WX 606 ; N plus ; B 50 0 556 506 ; C 44 ; WX 278 ; N comma ; B 40 -184 238 175 ; C 45 ; WX 333 ; N hyphen ; B 42 174 291 302 ; C 46 ; WX 278 ; N period ; B 44 -15 234 175 ; C 47 ; WX 278 ; N slash ; B -42 -15 320 737 ; C 48 ; WX 574 ; N zero ; B 27 -15 547 705 ; C 49 ; WX 574 ; N one ; B 83 0 491 705 ; C 50 ; WX 574 ; N two ; B 19 0 531 705 ; C 51 ; WX 574 ; N three ; B 23 -15 531 705 ; C 52 ; WX 574 ; N four ; B 19 0 547 705 ; C 53 ; WX 574 ; N five ; B 32 -15 534 705 ; C 54 ; WX 574 ; N six ; B 27 -15 547 705 ; C 55 ; WX 574 ; N seven ; B 45 -15 547 705 ; C 56 ; WX 574 ; N eight ; B 27 -15 548 705 ; C 57 ; WX 574 ; N nine ; B 27 -15 547 705 ; C 58 ; WX 278 ; N colon ; B 44 -15 234 485 ; C 59 ; WX 278 ; N semicolon ; B 40 -184 238 485 ; C 60 ; WX 606 ; N less ; B 50 -9 556 515 ; C 61 ; WX 606 ; N equal ; B 50 103 556 403 ; C 62 ; WX 606 ; N greater ; B 50 -9 556 515 ; C 63 ; WX 500 ; N question ; B 23 -15 477 737 ; C 64 ; WX 747 ; N at ; B -2 -15 750 737 ; C 65 ; WX 759 ; N A ; B -19 0 778 737 ; C 66 ; WX 778 ; N B ; B 19 0 739 722 ; C 67 ; WX 778 ; N C ; B 39 -15 723 737 ; C 68 ; WX 833 ; N D ; B 19 0 794 722 ; C 69 ; WX 759 ; N E ; B 19 0 708 722 ; C 70 ; WX 722 ; N F ; B 19 0 697 722 ; C 71 ; WX 833 ; N G ; B 39 -15 818 737 ; C 72 ; WX 870 ; N H ; B 19 0 851 722 ; C 73 ; WX 444 ; N I ; B 29 0 415 722 ; C 74 ; WX 648 ; N J ; B 6 -15 642 722 ; C 75 ; WX 815 ; N K ; B 19 0 822 722 ; C 76 ; WX 722 ; N L ; B 19 0 703 722 ; C 77 ; WX 981 ; N M ; B 10 0 971 722 ; C 78 ; WX 833 ; N N ; B 5 -10 828 722 ; C 79 ; WX 833 ; N O ; B 39 -15 794 737 ; C 80 ; WX 759 ; N P ; B 24 0 735 722 ; C 81 ; WX 833 ; N Q ; B 39 -189 808 737 ; C 82 ; WX 815 ; N R ; B 19 -15 815 722 ; C 83 ; WX 667 ; N S ; B 51 -15 634 737 ; C 84 ; WX 722 ; N T ; B 16 0 706 722 ; C 85 ; WX 833 ; N U ; B 14 -15 825 722 ; C 86 ; WX 759 ; N V ; B -19 -10 778 722 ; C 87 ; WX 981 ; N W ; B 7 -10 974 722 ; C 88 ; WX 722 ; N X ; B -12 0 734 722 ; C 89 ; WX 722 ; N Y ; B -12 0 734 722 ; C 90 ; WX 667 ; N Z ; B 28 0 639 722 ; C 91 ; WX 389 ; N bracketleft ; B 84 -109 339 737 ; C 92 ; WX 606 ; N backslash ; B 122 -15 484 737 ; C 93 ; WX 389 ; N bracketright ; B 50 -109 305 737 ; C 94 ; WX 606 ; N asciicircum ; B 66 325 540 690 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 241 ; N quoteleft ; B 22 378 220 737 ; C 97 ; WX 611 ; N a ; B 40 -15 601 485 ; C 98 ; WX 648 ; N b ; B 4 -15 616 737 ; C 99 ; WX 556 ; N c ; B 32 -15 524 485 ; C 100 ; WX 667 ; N d ; B 32 -15 644 737 ; C 101 ; WX 574 ; N e ; B 32 -15 542 485 ; C 102 ; WX 389 ; N f ; B 11 0 461 737 ; L i fi ; L l fl ; C 103 ; WX 611 ; N g ; B 30 -205 623 535 ; C 104 ; WX 685 ; N h ; B 17 0 662 737 ; C 105 ; WX 370 ; N i ; B 26 0 338 737 ; C 106 ; WX 352 ; N j ; B -86 -205 271 737 ; C 107 ; WX 667 ; N k ; B 17 0 662 737 ; C 108 ; WX 352 ; N l ; B 17 0 329 737 ; C 109 ; WX 963 ; N m ; B 17 0 940 485 ; C 110 ; WX 685 ; N n ; B 17 0 662 485 ; C 111 ; WX 611 ; N o ; B 32 -15 579 485 ; C 112 ; WX 667 ; N p ; B 17 -205 629 485 ; C 113 ; WX 648 ; N q ; B 32 -205 638 485 ; C 114 ; WX 519 ; N r ; B 17 0 516 485 ; C 115 ; WX 500 ; N s ; B 48 -15 476 485 ; C 116 ; WX 426 ; N t ; B 21 -15 405 675 ; C 117 ; WX 685 ; N u ; B 17 -15 668 475 ; C 118 ; WX 611 ; N v ; B 12 -10 599 475 ; C 119 ; WX 889 ; N w ; B 16 -10 873 475 ; C 120 ; WX 611 ; N x ; B 12 0 599 475 ; C 121 ; WX 611 ; N y ; B 12 -205 599 475 ; C 122 ; WX 537 ; N z ; B 38 0 499 475 ; C 123 ; WX 389 ; N braceleft ; B 36 -109 313 737 ; C 124 ; WX 606 ; N bar ; B 249 -250 357 750 ; C 125 ; WX 389 ; N braceright ; B 76 -109 353 737 ; C 126 ; WX 606 ; N asciitilde ; B 72 160 534 346 ; C 161 ; WX 296 ; N exclamdown ; B 53 -205 243 547 ; C 162 ; WX 574 ; N cent ; B 32 -102 528 572 ; C 163 ; WX 574 ; N sterling ; B 16 -15 558 705 ; C 164 ; WX 167 ; N fraction ; B -165 -15 332 705 ; C 165 ; WX 574 ; N yen ; B -10 0 584 690 ; C 166 ; WX 574 ; N florin ; B 14 -205 548 737 ; C 167 ; WX 500 ; N section ; B 62 -86 438 737 ; C 168 ; WX 574 ; N currency ; B 27 84 547 605 ; C 169 ; WX 241 ; N quotesingle ; B 53 378 189 737 ; C 170 ; WX 481 ; N quotedblleft ; B 22 378 459 737 ; C 171 ; WX 500 ; N guillemotleft ; B 46 79 454 397 ; C 172 ; WX 333 ; N guilsinglleft ; B 62 79 271 397 ; C 173 ; WX 333 ; N guilsinglright ; B 62 79 271 397 ; C 174 ; WX 685 ; N fi ; B 11 0 666 737 ; C 175 ; WX 685 ; N fl ; B 11 0 666 737 ; C 177 ; WX 500 ; N endash ; B 0 184 500 292 ; C 178 ; WX 500 ; N dagger ; B 39 -101 461 737 ; C 179 ; WX 500 ; N daggerdbl ; B 39 -89 461 737 ; C 180 ; WX 278 ; N periodcentered ; B 53 200 225 372 ; C 182 ; WX 747 ; N paragraph ; B 96 -71 631 722 ; C 183 ; WX 606 ; N bullet ; B 122 180 484 542 ; C 184 ; WX 241 ; N quotesinglbase ; B 22 -184 220 175 ; C 185 ; WX 481 ; N quotedblbase ; B 22 -184 459 175 ; C 186 ; WX 481 ; N quotedblright ; B 22 378 459 737 ; C 187 ; WX 500 ; N guillemotright ; B 46 79 454 397 ; C 188 ; WX 1000 ; N ellipsis ; B 72 -15 928 175 ; C 189 ; WX 1000 ; N perthousand ; B 7 -15 993 705 ; C 191 ; WX 500 ; N questiondown ; B 23 -205 477 547 ; C 193 ; WX 333 ; N grave ; B 2 547 249 737 ; C 194 ; WX 333 ; N acute ; B 84 547 331 737 ; C 195 ; WX 333 ; N circumflex ; B -10 547 344 725 ; C 196 ; WX 333 ; N tilde ; B -24 563 357 705 ; C 197 ; WX 333 ; N macron ; B -6 582 339 664 ; C 198 ; WX 333 ; N breve ; B 9 547 324 714 ; C 199 ; WX 333 ; N dotaccent ; B 95 552 237 694 ; C 200 ; WX 333 ; N dieresis ; B -12 552 345 694 ; C 202 ; WX 333 ; N ring ; B 58 545 274 761 ; C 203 ; WX 333 ; N cedilla ; B 17 -224 248 0 ; C 205 ; WX 333 ; N hungarumlaut ; B -16 547 431 737 ; C 206 ; WX 333 ; N ogonek ; B 168 -163 346 3 ; C 207 ; WX 333 ; N caron ; B -10 547 344 725 ; C 208 ; WX 1000 ; N emdash ; B 0 184 1000 292 ; C 225 ; WX 981 ; N AE ; B -29 0 963 722 ; C 227 ; WX 367 ; N ordfeminine ; B 1 407 393 705 ; C 232 ; WX 722 ; N Lslash ; B 19 0 703 722 ; C 233 ; WX 833 ; N Oslash ; B 39 -53 794 775 ; C 234 ; WX 1000 ; N OE ; B 0 0 982 722 ; C 235 ; WX 367 ; N ordmasculine ; B 1 407 366 705 ; C 241 ; WX 870 ; N ae ; B 32 -15 838 485 ; C 245 ; WX 370 ; N dotlessi ; B 26 0 338 475 ; C 248 ; WX 352 ; N lslash ; B 17 0 329 737 ; C 249 ; WX 611 ; N oslash ; B 32 -103 579 573 ; C 250 ; WX 907 ; N oe ; B 32 -15 875 485 ; C 251 ; WX 611 ; N germandbls ; B -2 -15 580 737 ; C -1 ; WX 574 ; N ecircumflex ; B 32 -15 542 725 ; C -1 ; WX 574 ; N edieresis ; B 32 -15 542 694 ; C -1 ; WX 611 ; N aacute ; B 40 -15 601 737 ; C -1 ; WX 747 ; N registered ; B -2 -15 750 737 ; C -1 ; WX 370 ; N icircumflex ; B 9 0 363 725 ; C -1 ; WX 685 ; N udieresis ; B 17 -15 668 694 ; C -1 ; WX 611 ; N ograve ; B 32 -15 579 737 ; C -1 ; WX 685 ; N uacute ; B 17 -15 668 737 ; C -1 ; WX 685 ; N ucircumflex ; B 17 -15 668 725 ; C -1 ; WX 759 ; N Aacute ; B -19 0 778 964 ; C -1 ; WX 370 ; N igrave ; B 21 0 338 737 ; C -1 ; WX 444 ; N Icircumflex ; B 29 0 415 952 ; C -1 ; WX 556 ; N ccedilla ; B 32 -224 524 485 ; C -1 ; WX 611 ; N adieresis ; B 40 -15 601 694 ; C -1 ; WX 759 ; N Ecircumflex ; B 19 0 708 952 ; C -1 ; WX 500 ; N scaron ; B 48 -15 476 725 ; C -1 ; WX 667 ; N thorn ; B 17 -205 629 737 ; C -1 ; WX 1000 ; N trademark ; B 6 317 982 722 ; C -1 ; WX 574 ; N egrave ; B 32 -15 542 737 ; C -1 ; WX 344 ; N threesuperior ; B -3 273 355 705 ; C -1 ; WX 537 ; N zcaron ; B 38 0 499 725 ; C -1 ; WX 611 ; N atilde ; B 40 -15 601 705 ; C -1 ; WX 611 ; N aring ; B 40 -15 601 761 ; C -1 ; WX 611 ; N ocircumflex ; B 32 -15 579 725 ; C -1 ; WX 759 ; N Edieresis ; B 19 0 708 921 ; C -1 ; WX 861 ; N threequarters ; B 15 -15 838 705 ; C -1 ; WX 611 ; N ydieresis ; B 12 -205 599 694 ; C -1 ; WX 611 ; N yacute ; B 12 -205 599 737 ; C -1 ; WX 370 ; N iacute ; B 26 0 350 737 ; C -1 ; WX 759 ; N Acircumflex ; B -19 0 778 952 ; C -1 ; WX 833 ; N Uacute ; B 14 -15 825 964 ; C -1 ; WX 574 ; N eacute ; B 32 -15 542 737 ; C -1 ; WX 833 ; N Ograve ; B 39 -15 794 964 ; C -1 ; WX 611 ; N agrave ; B 40 -15 601 737 ; C -1 ; WX 833 ; N Udieresis ; B 14 -15 825 921 ; C -1 ; WX 611 ; N acircumflex ; B 40 -15 601 725 ; C -1 ; WX 444 ; N Igrave ; B 29 0 415 964 ; C -1 ; WX 344 ; N twosuperior ; B -3 282 350 705 ; C -1 ; WX 833 ; N Ugrave ; B 14 -15 825 964 ; C -1 ; WX 861 ; N onequarter ; B 31 -15 838 705 ; C -1 ; WX 833 ; N Ucircumflex ; B 14 -15 825 952 ; C -1 ; WX 667 ; N Scaron ; B 51 -15 634 952 ; C -1 ; WX 444 ; N Idieresis ; B 29 0 415 921 ; C -1 ; WX 370 ; N idieresis ; B 7 0 364 694 ; C -1 ; WX 759 ; N Egrave ; B 19 0 708 964 ; C -1 ; WX 833 ; N Oacute ; B 39 -15 794 964 ; C -1 ; WX 606 ; N divide ; B 50 -40 556 546 ; C -1 ; WX 759 ; N Atilde ; B -19 0 778 932 ; C -1 ; WX 759 ; N Aring ; B -19 0 778 988 ; C -1 ; WX 833 ; N Odieresis ; B 39 -15 794 921 ; C -1 ; WX 759 ; N Adieresis ; B -19 0 778 921 ; C -1 ; WX 833 ; N Ntilde ; B 5 -10 828 932 ; C -1 ; WX 667 ; N Zcaron ; B 28 0 639 952 ; C -1 ; WX 759 ; N Thorn ; B 24 0 735 722 ; C -1 ; WX 444 ; N Iacute ; B 29 0 415 964 ; C -1 ; WX 606 ; N plusminus ; B 50 0 556 506 ; C -1 ; WX 606 ; N multiply ; B 65 15 541 491 ; C -1 ; WX 759 ; N Eacute ; B 19 0 708 964 ; C -1 ; WX 722 ; N Ydieresis ; B -12 0 734 921 ; C -1 ; WX 344 ; N onesuperior ; B 31 282 309 705 ; C -1 ; WX 685 ; N ugrave ; B 17 -15 668 737 ; C -1 ; WX 606 ; N logicalnot ; B 50 103 556 403 ; C -1 ; WX 685 ; N ntilde ; B 17 0 662 705 ; C -1 ; WX 833 ; N Otilde ; B 39 -15 794 932 ; C -1 ; WX 611 ; N otilde ; B 32 -15 579 705 ; C -1 ; WX 778 ; N Ccedilla ; B 39 -224 723 737 ; C -1 ; WX 759 ; N Agrave ; B -19 0 778 964 ; C -1 ; WX 861 ; N onehalf ; B 31 -15 838 705 ; C -1 ; WX 833 ; N Eth ; B 19 0 794 722 ; C -1 ; WX 400 ; N degree ; B 57 419 343 705 ; C -1 ; WX 722 ; N Yacute ; B -12 0 734 964 ; C -1 ; WX 833 ; N Ocircumflex ; B 39 -15 794 952 ; C -1 ; WX 611 ; N oacute ; B 32 -15 579 737 ; C -1 ; WX 685 ; N mu ; B 17 -205 668 475 ; C -1 ; WX 606 ; N minus ; B 50 199 556 307 ; C -1 ; WX 611 ; N eth ; B 32 -15 579 737 ; C -1 ; WX 611 ; N odieresis ; B 32 -15 579 694 ; C -1 ; WX 747 ; N copyright ; B -2 -15 750 737 ; C -1 ; WX 606 ; N brokenbar ; B 249 -175 357 675 ; EndCharMetrics StartKernData StartKernPairs 128 KPX A y -18 KPX A w -18 KPX A v -18 KPX A quoteright -74 KPX A quotedblright -74 KPX A Y -91 KPX A W -74 KPX A V -74 KPX A U -18 KPX A T -55 KPX C period -18 KPX C comma -18 KPX D period -25 KPX D comma -25 KPX F r -18 KPX F period -125 KPX F o -55 KPX F i -18 KPX F e -55 KPX F comma -125 KPX F a -74 KPX J u -18 KPX J period -55 KPX J o -18 KPX J e -18 KPX J comma -55 KPX J a -18 KPX J A -18 KPX K y -25 KPX K u -18 KPX L y -25 KPX L quoteright -100 KPX L quotedblright -100 KPX L Y -74 KPX L W -74 KPX L V -100 KPX L T -100 KPX N period -18 KPX N comma -18 KPX O period -25 KPX O comma -25 KPX O T 10 KPX P period -150 KPX P o -55 KPX P e -55 KPX P comma -150 KPX P a -55 KPX P A -74 KPX S period -18 KPX S comma -18 KPX T u -18 KPX T r -18 KPX T period -100 KPX T o -74 KPX T i -18 KPX T hyphen -125 KPX T e -74 KPX T comma -100 KPX T a -74 KPX T O 10 KPX T A -55 KPX U period -25 KPX U comma -25 KPX U A -18 KPX V u -55 KPX V semicolon -37 KPX V period -125 KPX V o -74 KPX V i -18 KPX V hyphen -100 KPX V e -74 KPX V comma -125 KPX V colon -37 KPX V a -74 KPX V A -74 KPX W y -25 KPX W u -37 KPX W semicolon -55 KPX W period -100 KPX W o -74 KPX W i -18 KPX W hyphen -100 KPX W e -74 KPX W comma -100 KPX W colon -55 KPX W a -74 KPX W A -74 KPX Y u -55 KPX Y semicolon -25 KPX Y period -100 KPX Y o -100 KPX Y i -18 KPX Y hyphen -125 KPX Y e -100 KPX Y comma -100 KPX Y colon -25 KPX Y a -100 KPX Y A -91 KPX colon space -18 KPX comma space -18 KPX comma quoteright -18 KPX comma quotedblright -18 KPX f quoteright 75 KPX f quotedblright 75 KPX period space -18 KPX period quoteright -18 KPX period quotedblright -18 KPX quotedblleft A -74 KPX quotedblright space -18 KPX quoteleft A -74 KPX quoteright s -25 KPX quoteright d -25 KPX r period -74 KPX r comma -74 KPX semicolon space -18 KPX space quoteleft -18 KPX space quotedblleft -18 KPX space Y -18 KPX space W -18 KPX space V -18 KPX space T -18 KPX space A -18 KPX v period -100 KPX v comma -100 KPX w period -100 KPX w comma -100 KPX y period -100 KPX y comma -100 EndKernPairs EndKernData StartComposites 56 CC Aacute 2 ; PCC A 0 0 ; PCC acute 213 227 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 213 227 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 213 227 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 213 227 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 213 227 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 213 227 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 213 227 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 213 227 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 213 227 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 213 227 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 56 227 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 56 227 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 56 227 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 56 227 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 250 227 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 250 227 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 250 227 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 250 227 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 250 227 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 250 227 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 167 227 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 250 227 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 250 227 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 250 227 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 250 227 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 195 227 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 195 227 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 167 227 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 139 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 139 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 139 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 139 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 139 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 139 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 121 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 121 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 121 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 121 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 19 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex 19 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis 19 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 19 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 176 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 139 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 139 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 139 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 139 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 139 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 84 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 176 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 176 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 176 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 176 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 139 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 139 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 102 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pncbi8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1991 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Tue May 28 16:56:07 1991 Comment UniqueID 35034 Comment VMusage 31030 37922 FontName NewCenturySchlbk-BoldItalic FullName New Century Schoolbook Bold Italic FamilyName New Century Schoolbook Weight Bold ItalicAngle -16 IsFixedPitch false FontBBox -205 -250 1147 991 UnderlinePosition -100 UnderlineThickness 50 Version 001.007 Notice Copyright (c) 1985, 1987, 1989, 1991 Adobe Systems Incorporated. All Rights Reserved. EncodingScheme AdobeStandardEncoding CapHeight 722 XHeight 477 Ascender 737 Descender -205 StartCharMetrics 228 C 32 ; WX 287 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 0 -15 333 737 ; C 34 ; WX 400 ; N quotedbl ; B 66 388 428 737 ; C 35 ; WX 574 ; N numbersign ; B 30 0 544 690 ; C 36 ; WX 574 ; N dollar ; B 9 -120 565 810 ; C 37 ; WX 889 ; N percent ; B 54 -28 835 727 ; C 38 ; WX 889 ; N ampersand ; B 32 -15 823 737 ; C 39 ; WX 259 ; N quoteright ; B 48 388 275 737 ; C 40 ; WX 407 ; N parenleft ; B 72 -117 454 745 ; C 41 ; WX 407 ; N parenright ; B -70 -117 310 745 ; C 42 ; WX 500 ; N asterisk ; B 58 301 498 737 ; C 43 ; WX 606 ; N plus ; B 50 0 556 506 ; C 44 ; WX 287 ; N comma ; B -57 -192 170 157 ; C 45 ; WX 333 ; N hyphen ; B 2 177 263 299 ; C 46 ; WX 287 ; N period ; B -20 -15 152 157 ; C 47 ; WX 278 ; N slash ; B -41 -15 320 737 ; C 48 ; WX 574 ; N zero ; B 21 -15 553 705 ; C 49 ; WX 574 ; N one ; B 25 0 489 705 ; C 50 ; WX 574 ; N two ; B -38 -3 538 705 ; C 51 ; WX 574 ; N three ; B -7 -15 536 705 ; C 52 ; WX 574 ; N four ; B -13 0 544 705 ; C 53 ; WX 574 ; N five ; B 0 -15 574 705 ; C 54 ; WX 574 ; N six ; B 31 -15 574 705 ; C 55 ; WX 574 ; N seven ; B 64 -15 593 705 ; C 56 ; WX 574 ; N eight ; B 0 -15 552 705 ; C 57 ; WX 574 ; N nine ; B 0 -15 543 705 ; C 58 ; WX 287 ; N colon ; B -20 -15 237 477 ; C 59 ; WX 287 ; N semicolon ; B -57 -192 237 477 ; C 60 ; WX 606 ; N less ; B 50 -9 556 515 ; C 61 ; WX 606 ; N equal ; B 50 103 556 403 ; C 62 ; WX 606 ; N greater ; B 50 -8 556 514 ; C 63 ; WX 481 ; N question ; B 79 -15 451 737 ; C 64 ; WX 747 ; N at ; B -4 -15 751 737 ; C 65 ; WX 741 ; N A ; B -75 0 716 737 ; C 66 ; WX 759 ; N B ; B -50 0 721 722 ; C 67 ; WX 759 ; N C ; B 37 -15 759 737 ; C 68 ; WX 833 ; N D ; B -47 0 796 722 ; C 69 ; WX 741 ; N E ; B -41 0 730 722 ; C 70 ; WX 704 ; N F ; B -41 0 730 722 ; C 71 ; WX 815 ; N G ; B 37 -15 805 737 ; C 72 ; WX 870 ; N H ; B -41 0 911 722 ; C 73 ; WX 444 ; N I ; B -41 0 485 722 ; C 74 ; WX 667 ; N J ; B -20 -15 708 722 ; C 75 ; WX 778 ; N K ; B -41 0 832 722 ; C 76 ; WX 704 ; N L ; B -41 0 670 722 ; C 77 ; WX 944 ; N M ; B -44 0 988 722 ; C 78 ; WX 852 ; N N ; B -61 -10 913 722 ; C 79 ; WX 833 ; N O ; B 37 -15 796 737 ; C 80 ; WX 741 ; N P ; B -41 0 730 722 ; C 81 ; WX 833 ; N Q ; B 37 -189 796 737 ; C 82 ; WX 796 ; N R ; B -41 -15 749 722 ; C 83 ; WX 685 ; N S ; B 1 -15 666 737 ; C 84 ; WX 722 ; N T ; B 41 0 759 722 ; C 85 ; WX 833 ; N U ; B 88 -15 900 722 ; C 86 ; WX 741 ; N V ; B 32 -10 802 722 ; C 87 ; WX 944 ; N W ; B 40 -10 1000 722 ; C 88 ; WX 741 ; N X ; B -82 0 801 722 ; C 89 ; WX 704 ; N Y ; B 13 0 775 722 ; C 90 ; WX 704 ; N Z ; B -33 0 711 722 ; C 91 ; WX 407 ; N bracketleft ; B 1 -109 464 737 ; C 92 ; WX 606 ; N backslash ; B 161 -15 445 737 ; C 93 ; WX 407 ; N bracketright ; B -101 -109 362 737 ; C 94 ; WX 606 ; N asciicircum ; B 66 325 540 690 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 259 ; N quoteleft ; B 47 388 274 737 ; C 97 ; WX 667 ; N a ; B 6 -15 636 477 ; C 98 ; WX 611 ; N b ; B 29 -15 557 737 ; C 99 ; WX 537 ; N c ; B 0 -15 482 477 ; C 100 ; WX 667 ; N d ; B 0 -15 660 737 ; C 101 ; WX 519 ; N e ; B 0 -15 479 477 ; C 102 ; WX 389 ; N f ; B -48 -205 550 737 ; L i fi ; L l fl ; C 103 ; WX 611 ; N g ; B -63 -205 604 528 ; C 104 ; WX 685 ; N h ; B 0 -15 639 737 ; C 105 ; WX 389 ; N i ; B 32 -15 345 737 ; C 106 ; WX 370 ; N j ; B -205 -205 347 737 ; C 107 ; WX 648 ; N k ; B -11 -15 578 737 ; C 108 ; WX 389 ; N l ; B 32 -15 375 737 ; C 109 ; WX 944 ; N m ; B 0 -15 909 477 ; C 110 ; WX 685 ; N n ; B 0 -15 639 477 ; C 111 ; WX 574 ; N o ; B 0 -15 530 477 ; C 112 ; WX 648 ; N p ; B -119 -205 590 477 ; C 113 ; WX 630 ; N q ; B 0 -205 587 477 ; C 114 ; WX 519 ; N r ; B 0 0 527 486 ; C 115 ; WX 481 ; N s ; B 0 -15 435 477 ; C 116 ; WX 407 ; N t ; B 24 -15 403 650 ; C 117 ; WX 685 ; N u ; B 30 -15 635 477 ; C 118 ; WX 556 ; N v ; B 30 -15 496 477 ; C 119 ; WX 833 ; N w ; B 30 -15 773 477 ; C 120 ; WX 574 ; N x ; B -46 -15 574 477 ; C 121 ; WX 519 ; N y ; B -66 -205 493 477 ; C 122 ; WX 519 ; N z ; B -19 -15 473 477 ; C 123 ; WX 407 ; N braceleft ; B 52 -109 408 737 ; C 124 ; WX 606 ; N bar ; B 249 -250 357 750 ; C 125 ; WX 407 ; N braceright ; B -25 -109 331 737 ; C 126 ; WX 606 ; N asciitilde ; B 72 160 534 346 ; C 161 ; WX 333 ; N exclamdown ; B -44 -205 289 547 ; C 162 ; WX 574 ; N cent ; B 30 -144 512 578 ; C 163 ; WX 574 ; N sterling ; B -18 -15 566 705 ; C 164 ; WX 167 ; N fraction ; B -166 -15 333 705 ; C 165 ; WX 574 ; N yen ; B 17 0 629 690 ; C 166 ; WX 574 ; N florin ; B -43 -205 575 737 ; C 167 ; WX 500 ; N section ; B -30 -146 515 737 ; C 168 ; WX 574 ; N currency ; B 27 84 547 605 ; C 169 ; WX 287 ; N quotesingle ; B 112 388 250 737 ; C 170 ; WX 481 ; N quotedblleft ; B 54 388 521 737 ; C 171 ; WX 481 ; N guillemotleft ; B -35 69 449 407 ; C 172 ; WX 278 ; N guilsinglleft ; B -25 69 244 407 ; C 173 ; WX 278 ; N guilsinglright ; B -26 69 243 407 ; C 174 ; WX 685 ; N fi ; B -70 -205 641 737 ; C 175 ; WX 685 ; N fl ; B -70 -205 671 737 ; C 177 ; WX 500 ; N endash ; B -47 189 479 287 ; C 178 ; WX 500 ; N dagger ; B 48 -146 508 737 ; C 179 ; WX 500 ; N daggerdbl ; B -60 -150 508 737 ; C 180 ; WX 287 ; N periodcentered ; B 57 200 229 372 ; C 182 ; WX 650 ; N paragraph ; B 25 -131 681 722 ; C 183 ; WX 606 ; N bullet ; B 122 180 484 542 ; C 184 ; WX 259 ; N quotesinglbase ; B -57 -192 170 157 ; C 185 ; WX 481 ; N quotedblbase ; B -57 -192 412 157 ; C 186 ; WX 481 ; N quotedblright ; B 43 388 510 737 ; C 187 ; WX 481 ; N guillemotright ; B -31 69 453 407 ; C 188 ; WX 1000 ; N ellipsis ; B 81 -15 919 157 ; C 189 ; WX 1167 ; N perthousand ; B 20 -28 1147 727 ; C 191 ; WX 481 ; N questiondown ; B 0 -205 372 547 ; C 193 ; WX 333 ; N grave ; B 74 538 294 722 ; C 194 ; WX 333 ; N acute ; B 123 538 372 722 ; C 195 ; WX 333 ; N circumflex ; B 23 533 365 705 ; C 196 ; WX 333 ; N tilde ; B 28 561 398 690 ; C 197 ; WX 333 ; N macron ; B 47 573 404 649 ; C 198 ; WX 333 ; N breve ; B 67 535 390 698 ; C 199 ; WX 333 ; N dotaccent ; B 145 546 289 690 ; C 200 ; WX 333 ; N dieresis ; B 33 546 393 690 ; C 202 ; WX 333 ; N ring ; B 111 522 335 746 ; C 203 ; WX 333 ; N cedilla ; B -21 -220 225 3 ; C 205 ; WX 333 ; N hungarumlaut ; B 15 538 480 722 ; C 206 ; WX 333 ; N ogonek ; B 68 -155 246 -10 ; C 207 ; WX 333 ; N caron ; B 60 531 403 705 ; C 208 ; WX 1000 ; N emdash ; B -47 189 979 287 ; C 225 ; WX 889 ; N AE ; B -86 0 915 722 ; C 227 ; WX 412 ; N ordfeminine ; B 47 407 460 705 ; C 232 ; WX 704 ; N Lslash ; B -41 0 670 722 ; C 233 ; WX 833 ; N Oslash ; B 35 -68 798 790 ; C 234 ; WX 963 ; N OE ; B 29 0 989 722 ; C 235 ; WX 356 ; N ordmasculine ; B 42 407 394 705 ; C 241 ; WX 815 ; N ae ; B -18 -15 775 477 ; C 245 ; WX 389 ; N dotlessi ; B 32 -15 345 477 ; C 248 ; WX 389 ; N lslash ; B 5 -15 390 737 ; C 249 ; WX 574 ; N oslash ; B 0 -121 530 583 ; C 250 ; WX 852 ; N oe ; B -6 -15 812 477 ; C 251 ; WX 574 ; N germandbls ; B -91 -205 540 737 ; C -1 ; WX 519 ; N ecircumflex ; B 0 -15 479 705 ; C -1 ; WX 519 ; N edieresis ; B 0 -15 486 690 ; C -1 ; WX 667 ; N aacute ; B 6 -15 636 722 ; C -1 ; WX 747 ; N registered ; B -2 -15 750 737 ; C -1 ; WX 389 ; N icircumflex ; B 21 -15 363 698 ; C -1 ; WX 685 ; N udieresis ; B 30 -15 635 690 ; C -1 ; WX 574 ; N ograve ; B 0 -15 530 722 ; C -1 ; WX 685 ; N uacute ; B 30 -15 635 722 ; C -1 ; WX 685 ; N ucircumflex ; B 30 -15 635 705 ; C -1 ; WX 741 ; N Aacute ; B -75 0 716 947 ; C -1 ; WX 389 ; N igrave ; B 32 -15 345 715 ; C -1 ; WX 444 ; N Icircumflex ; B -41 0 485 930 ; C -1 ; WX 537 ; N ccedilla ; B 0 -220 482 477 ; C -1 ; WX 667 ; N adieresis ; B 6 -15 636 690 ; C -1 ; WX 741 ; N Ecircumflex ; B -41 0 730 930 ; C -1 ; WX 481 ; N scaron ; B 0 -15 477 705 ; C -1 ; WX 648 ; N thorn ; B -119 -205 590 737 ; C -1 ; WX 950 ; N trademark ; B 42 317 1017 722 ; C -1 ; WX 519 ; N egrave ; B 0 -15 479 722 ; C -1 ; WX 344 ; N threesuperior ; B 3 273 361 705 ; C -1 ; WX 519 ; N zcaron ; B -19 -15 473 695 ; C -1 ; WX 667 ; N atilde ; B 6 -15 636 690 ; C -1 ; WX 667 ; N aring ; B 6 -15 636 746 ; C -1 ; WX 574 ; N ocircumflex ; B 0 -15 530 705 ; C -1 ; WX 741 ; N Edieresis ; B -41 0 730 915 ; C -1 ; WX 861 ; N threequarters ; B 35 -15 789 705 ; C -1 ; WX 519 ; N ydieresis ; B -66 -205 493 690 ; C -1 ; WX 519 ; N yacute ; B -66 -205 493 722 ; C -1 ; WX 389 ; N iacute ; B 32 -15 370 715 ; C -1 ; WX 741 ; N Acircumflex ; B -75 0 716 930 ; C -1 ; WX 833 ; N Uacute ; B 88 -15 900 947 ; C -1 ; WX 519 ; N eacute ; B 0 -15 479 722 ; C -1 ; WX 833 ; N Ograve ; B 37 -15 796 947 ; C -1 ; WX 667 ; N agrave ; B 6 -15 636 722 ; C -1 ; WX 833 ; N Udieresis ; B 88 -15 900 915 ; C -1 ; WX 667 ; N acircumflex ; B 6 -15 636 705 ; C -1 ; WX 444 ; N Igrave ; B -41 0 485 947 ; C -1 ; WX 344 ; N twosuperior ; B -17 280 362 705 ; C -1 ; WX 833 ; N Ugrave ; B 88 -15 900 947 ; C -1 ; WX 861 ; N onequarter ; B 17 -15 789 705 ; C -1 ; WX 833 ; N Ucircumflex ; B 88 -15 900 930 ; C -1 ; WX 685 ; N Scaron ; B 1 -15 666 930 ; C -1 ; WX 444 ; N Idieresis ; B -41 0 509 915 ; C -1 ; WX 389 ; N idieresis ; B 31 -15 391 683 ; C -1 ; WX 741 ; N Egrave ; B -41 0 730 947 ; C -1 ; WX 833 ; N Oacute ; B 37 -15 796 947 ; C -1 ; WX 606 ; N divide ; B 50 -40 556 546 ; C -1 ; WX 741 ; N Atilde ; B -75 0 716 915 ; C -1 ; WX 741 ; N Aring ; B -75 0 716 991 ; C -1 ; WX 833 ; N Odieresis ; B 37 -15 796 915 ; C -1 ; WX 741 ; N Adieresis ; B -75 0 716 915 ; C -1 ; WX 852 ; N Ntilde ; B -61 -10 913 915 ; C -1 ; WX 704 ; N Zcaron ; B -33 0 711 930 ; C -1 ; WX 741 ; N Thorn ; B -41 0 690 722 ; C -1 ; WX 444 ; N Iacute ; B -41 0 488 947 ; C -1 ; WX 606 ; N plusminus ; B 50 0 556 506 ; C -1 ; WX 606 ; N multiply ; B 65 15 541 491 ; C -1 ; WX 741 ; N Eacute ; B -41 0 730 947 ; C -1 ; WX 704 ; N Ydieresis ; B 13 0 775 915 ; C -1 ; WX 344 ; N onesuperior ; B 19 282 326 705 ; C -1 ; WX 685 ; N ugrave ; B 30 -15 635 722 ; C -1 ; WX 606 ; N logicalnot ; B 50 103 556 403 ; C -1 ; WX 685 ; N ntilde ; B 0 -15 639 690 ; C -1 ; WX 833 ; N Otilde ; B 37 -15 796 915 ; C -1 ; WX 574 ; N otilde ; B 0 -15 530 690 ; C -1 ; WX 759 ; N Ccedilla ; B 37 -220 759 737 ; C -1 ; WX 741 ; N Agrave ; B -75 0 716 947 ; C -1 ; WX 861 ; N onehalf ; B 17 -15 798 705 ; C -1 ; WX 833 ; N Eth ; B -47 0 796 722 ; C -1 ; WX 400 ; N degree ; B 86 419 372 705 ; C -1 ; WX 704 ; N Yacute ; B 13 0 775 947 ; C -1 ; WX 833 ; N Ocircumflex ; B 37 -15 796 930 ; C -1 ; WX 574 ; N oacute ; B 0 -15 530 722 ; C -1 ; WX 685 ; N mu ; B -89 -205 635 477 ; C -1 ; WX 606 ; N minus ; B 50 199 556 307 ; C -1 ; WX 574 ; N eth ; B 0 -15 530 752 ; C -1 ; WX 574 ; N odieresis ; B 0 -15 530 690 ; C -1 ; WX 747 ; N copyright ; B -2 -15 750 737 ; C -1 ; WX 606 ; N brokenbar ; B 249 -175 357 675 ; EndCharMetrics StartKernData StartKernPairs 239 KPX A y -33 KPX A w -25 KPX A v -10 KPX A u -15 KPX A quoteright -95 KPX A quotedblright -95 KPX A Y -70 KPX A W -84 KPX A V -100 KPX A U -32 KPX A T 5 KPX A Q 5 KPX A O 5 KPX A G 5 KPX A C 5 KPX B period 15 KPX B comma 15 KPX B U 15 KPX B A -11 KPX C A -5 KPX D period -11 KPX D comma -11 KPX D Y 6 KPX D W -11 KPX D V -18 KPX F r -27 KPX F period -91 KPX F o -47 KPX F i -41 KPX F e -41 KPX F comma -91 KPX F a -47 KPX F A -79 KPX J u -39 KPX J period -74 KPX J o -40 KPX J e -33 KPX J comma -74 KPX J a -40 KPX J A -30 KPX K y -48 KPX K u -4 KPX K o -4 KPX K e 18 KPX L y -30 KPX L quoteright -100 KPX L quotedblright -100 KPX L Y -55 KPX L W -69 KPX L V -97 KPX L T -75 KPX N period -49 KPX N comma -49 KPX O period -18 KPX O comma -18 KPX O X -18 KPX O W -15 KPX O V -24 KPX O A -5 KPX P period -100 KPX P o -40 KPX P e -33 KPX P comma -100 KPX P a -40 KPX P A -80 KPX R W -14 KPX R V -24 KPX S period -18 KPX S comma -18 KPX T y -30 KPX T w -30 KPX T u -22 KPX T r -9 KPX T period -55 KPX T o -40 KPX T i -22 KPX T hyphen -75 KPX T h -9 KPX T e -33 KPX T comma -55 KPX T a -40 KPX T O 11 KPX T A -60 KPX U period -25 KPX U comma -25 KPX U A -42 KPX V u -70 KPX V semicolon 6 KPX V period -94 KPX V o -71 KPX V i -35 KPX V hyphen -94 KPX V e -66 KPX V comma -94 KPX V colon -49 KPX V a -55 KPX V O -19 KPX V G -12 KPX V A -100 KPX W y -41 KPX W u -25 KPX W semicolon -22 KPX W period -86 KPX W o -33 KPX W i -27 KPX W hyphen -61 KPX W h 5 KPX W e -39 KPX W comma -86 KPX W colon -22 KPX W a -33 KPX W O -11 KPX W A -66 KPX Y u -58 KPX Y semicolon -55 KPX Y period -91 KPX Y o -77 KPX Y i -22 KPX Y hyphen -91 KPX Y e -71 KPX Y comma -91 KPX Y colon -55 KPX Y a -77 KPX Y A -79 KPX a y -8 KPX a w -8 KPX a v 6 KPX b y -6 KPX b v 8 KPX b period 6 KPX b comma 6 KPX c y -20 KPX c period -8 KPX c l -13 KPX c k -8 KPX c h -18 KPX c comma -8 KPX colon space -18 KPX comma space -18 KPX comma quoteright -18 KPX comma quotedblright -18 KPX d y -15 KPX d w -15 KPX e y -15 KPX e x -5 KPX e w -15 KPX e p -11 KPX e g -4 KPX e b -8 KPX f quoteright 105 KPX f quotedblright 105 KPX f period -28 KPX f o 7 KPX f l 7 KPX f i 7 KPX f e 14 KPX f dotlessi 7 KPX f comma -28 KPX f a 8 KPX g y -11 KPX g r 11 KPX g period -5 KPX g comma -5 KPX h y -20 KPX i v 7 KPX k y -15 KPX k o -22 KPX k e -16 KPX l y -7 KPX l w -7 KPX m y -20 KPX m u -11 KPX n y -20 KPX n v -7 KPX n u -11 KPX o y -11 KPX o w -8 KPX o v 6 KPX p y -4 KPX p period 8 KPX p comma 8 KPX period space -18 KPX period quoteright -18 KPX period quotedblright -18 KPX quotedblleft quoteleft 20 KPX quotedblleft A -60 KPX quotedblright space -18 KPX quoteleft A -80 KPX quoteright v -16 KPX quoteright t -22 KPX quoteright s -46 KPX quoteright r -9 KPX quoteright l -22 KPX quoteright d -41 KPX r y -20 KPX r v -7 KPX r u -11 KPX r t -11 KPX r semicolon 9 KPX r s -20 KPX r quoteright 9 KPX r period -90 KPX r p -17 KPX r o -11 KPX r l -14 KPX r k 9 KPX r i -14 KPX r hyphen -16 KPX r g -11 KPX r e -7 KPX r d -7 KPX r comma -90 KPX r colon 9 KPX r a -11 KPX s period 11 KPX s comma 11 KPX semicolon space -18 KPX space quotedblleft -18 KPX space Y -18 KPX space W -33 KPX space V -24 KPX space T -18 KPX space A -22 KPX v period -11 KPX v o -6 KPX v comma -11 KPX v a -6 KPX w period -17 KPX w o -14 KPX w e -8 KPX w comma -17 KPX w a -14 KPX x e 5 KPX y period -25 KPX y o 8 KPX y e 15 KPX y comma -25 KPX y a 8 KPX z e 4 EndKernPairs EndKernData StartComposites 56 CC Aacute 2 ; PCC A 0 0 ; PCC acute 259 225 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 259 225 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 259 225 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 259 225 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 229 245 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 259 225 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 296 225 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 296 225 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 296 225 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 296 225 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 116 225 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 116 225 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 116 225 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 116 225 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 326 225 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 315 225 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 315 225 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 315 225 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 315 225 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 315 225 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 206 225 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 340 225 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 340 225 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 340 225 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 340 225 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 246 225 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 236 225 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 226 225 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 167 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 167 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 167 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 167 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 167 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 167 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 93 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 93 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 93 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 93 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -2 -7 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -2 -7 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -2 -7 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -2 -7 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 176 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 121 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 121 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 121 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 121 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 121 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 74 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 176 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 176 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 176 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 176 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 93 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 93 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 63 -10 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pncr8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1991 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Tue May 28 16:31:51 1991 Comment UniqueID 35025 Comment VMusage 30420 37312 FontName NewCenturySchlbk-Roman FullName New Century Schoolbook Roman FamilyName New Century Schoolbook Weight Roman ItalicAngle 0 IsFixedPitch false FontBBox -195 -250 1000 965 UnderlinePosition -100 UnderlineThickness 50 Version 001.007 Notice Copyright (c) 1985, 1987, 1989, 1991 Adobe Systems Incorporated. All Rights Reserved. EncodingScheme AdobeStandardEncoding CapHeight 722 XHeight 464 Ascender 737 Descender -205 StartCharMetrics 228 C 32 ; WX 278 ; N space ; B 0 0 0 0 ; C 33 ; WX 296 ; N exclam ; B 86 -15 210 737 ; C 34 ; WX 389 ; N quotedbl ; B 61 443 328 737 ; C 35 ; WX 556 ; N numbersign ; B 28 0 528 690 ; C 36 ; WX 556 ; N dollar ; B 45 -138 511 813 ; C 37 ; WX 833 ; N percent ; B 43 -15 790 705 ; C 38 ; WX 815 ; N ampersand ; B 51 -15 775 737 ; C 39 ; WX 204 ; N quoteright ; B 25 443 179 737 ; C 40 ; WX 333 ; N parenleft ; B 40 -117 279 745 ; C 41 ; WX 333 ; N parenright ; B 54 -117 293 745 ; C 42 ; WX 500 ; N asterisk ; B 57 306 443 737 ; C 43 ; WX 606 ; N plus ; B 50 0 556 506 ; C 44 ; WX 278 ; N comma ; B 62 -185 216 109 ; C 45 ; WX 333 ; N hyphen ; B 42 199 291 277 ; C 46 ; WX 278 ; N period ; B 77 -15 201 109 ; C 47 ; WX 278 ; N slash ; B -32 -15 310 737 ; C 48 ; WX 556 ; N zero ; B 42 -15 514 705 ; C 49 ; WX 556 ; N one ; B 100 0 496 705 ; C 50 ; WX 556 ; N two ; B 35 0 505 705 ; C 51 ; WX 556 ; N three ; B 42 -15 498 705 ; C 52 ; WX 556 ; N four ; B 28 0 528 705 ; C 53 ; WX 556 ; N five ; B 46 -15 502 705 ; C 54 ; WX 556 ; N six ; B 41 -15 515 705 ; C 55 ; WX 556 ; N seven ; B 59 -15 508 705 ; C 56 ; WX 556 ; N eight ; B 42 -15 514 705 ; C 57 ; WX 556 ; N nine ; B 41 -15 515 705 ; C 58 ; WX 278 ; N colon ; B 77 -15 201 474 ; C 59 ; WX 278 ; N semicolon ; B 62 -185 216 474 ; C 60 ; WX 606 ; N less ; B 50 -8 556 514 ; C 61 ; WX 606 ; N equal ; B 50 117 556 389 ; C 62 ; WX 606 ; N greater ; B 50 -8 556 514 ; C 63 ; WX 444 ; N question ; B 29 -15 415 737 ; C 64 ; WX 737 ; N at ; B -8 -15 744 737 ; C 65 ; WX 722 ; N A ; B -8 0 730 737 ; C 66 ; WX 722 ; N B ; B 29 0 669 722 ; C 67 ; WX 722 ; N C ; B 45 -15 668 737 ; C 68 ; WX 778 ; N D ; B 29 0 733 722 ; C 69 ; WX 722 ; N E ; B 29 0 663 722 ; C 70 ; WX 667 ; N F ; B 29 0 638 722 ; C 71 ; WX 778 ; N G ; B 45 -15 775 737 ; C 72 ; WX 833 ; N H ; B 29 0 804 722 ; C 73 ; WX 407 ; N I ; B 38 0 369 722 ; C 74 ; WX 556 ; N J ; B 5 -15 540 722 ; C 75 ; WX 778 ; N K ; B 29 0 803 722 ; C 76 ; WX 667 ; N L ; B 29 0 644 722 ; C 77 ; WX 944 ; N M ; B 29 0 915 722 ; C 78 ; WX 815 ; N N ; B 24 -15 791 722 ; C 79 ; WX 778 ; N O ; B 45 -15 733 737 ; C 80 ; WX 667 ; N P ; B 29 0 650 722 ; C 81 ; WX 778 ; N Q ; B 45 -190 748 737 ; C 82 ; WX 722 ; N R ; B 29 -15 713 722 ; C 83 ; WX 630 ; N S ; B 47 -15 583 737 ; C 84 ; WX 667 ; N T ; B 19 0 648 722 ; C 85 ; WX 815 ; N U ; B 16 -15 799 722 ; C 86 ; WX 722 ; N V ; B -8 -10 730 722 ; C 87 ; WX 981 ; N W ; B 5 -10 976 722 ; C 88 ; WX 704 ; N X ; B -8 0 712 722 ; C 89 ; WX 704 ; N Y ; B -11 0 715 722 ; C 90 ; WX 611 ; N Z ; B 24 0 576 722 ; C 91 ; WX 333 ; N bracketleft ; B 126 -109 315 737 ; C 92 ; WX 606 ; N backslash ; B 132 -15 474 737 ; C 93 ; WX 333 ; N bracketright ; B 18 -109 207 737 ; C 94 ; WX 606 ; N asciicircum ; B 89 325 517 690 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 204 ; N quoteleft ; B 25 443 179 737 ; C 97 ; WX 556 ; N a ; B 44 -15 542 479 ; C 98 ; WX 556 ; N b ; B 10 -15 522 737 ; C 99 ; WX 444 ; N c ; B 34 -15 426 479 ; C 100 ; WX 574 ; N d ; B 34 -15 552 737 ; C 101 ; WX 500 ; N e ; B 34 -15 466 479 ; C 102 ; WX 333 ; N f ; B 18 0 437 737 ; L i fi ; L l fl ; C 103 ; WX 537 ; N g ; B 23 -205 542 494 ; C 104 ; WX 611 ; N h ; B 7 0 592 737 ; C 105 ; WX 315 ; N i ; B 18 0 286 722 ; C 106 ; WX 296 ; N j ; B -86 -205 216 722 ; C 107 ; WX 593 ; N k ; B 10 0 589 737 ; C 108 ; WX 315 ; N l ; B 18 0 286 737 ; C 109 ; WX 889 ; N m ; B 26 0 863 479 ; C 110 ; WX 611 ; N n ; B 22 0 589 479 ; C 111 ; WX 500 ; N o ; B 34 -15 466 479 ; C 112 ; WX 574 ; N p ; B 22 -205 540 479 ; C 113 ; WX 556 ; N q ; B 34 -205 552 479 ; C 114 ; WX 444 ; N r ; B 18 0 434 479 ; C 115 ; WX 463 ; N s ; B 46 -15 417 479 ; C 116 ; WX 389 ; N t ; B 18 -15 371 666 ; C 117 ; WX 611 ; N u ; B 22 -15 589 464 ; C 118 ; WX 537 ; N v ; B -6 -10 515 464 ; C 119 ; WX 778 ; N w ; B 1 -10 749 464 ; C 120 ; WX 537 ; N x ; B 8 0 529 464 ; C 121 ; WX 537 ; N y ; B 4 -205 533 464 ; C 122 ; WX 481 ; N z ; B 42 0 439 464 ; C 123 ; WX 333 ; N braceleft ; B 54 -109 279 737 ; C 124 ; WX 606 ; N bar ; B 267 -250 339 750 ; C 125 ; WX 333 ; N braceright ; B 54 -109 279 737 ; C 126 ; WX 606 ; N asciitilde ; B 72 184 534 322 ; C 161 ; WX 296 ; N exclamdown ; B 86 -205 210 547 ; C 162 ; WX 556 ; N cent ; B 74 -141 482 584 ; C 163 ; WX 556 ; N sterling ; B 18 -15 538 705 ; C 164 ; WX 167 ; N fraction ; B -195 -15 362 705 ; C 165 ; WX 556 ; N yen ; B -1 0 557 690 ; C 166 ; WX 556 ; N florin ; B 0 -205 538 737 ; C 167 ; WX 500 ; N section ; B 55 -147 445 737 ; C 168 ; WX 556 ; N currency ; B 26 93 530 597 ; C 169 ; WX 204 ; N quotesingle ; B 59 443 145 737 ; C 170 ; WX 389 ; N quotedblleft ; B 25 443 364 737 ; C 171 ; WX 426 ; N guillemotleft ; B 39 78 387 398 ; C 172 ; WX 259 ; N guilsinglleft ; B 39 78 220 398 ; C 173 ; WX 259 ; N guilsinglright ; B 39 78 220 398 ; C 174 ; WX 611 ; N fi ; B 18 0 582 737 ; C 175 ; WX 611 ; N fl ; B 18 0 582 737 ; C 177 ; WX 556 ; N endash ; B 0 208 556 268 ; C 178 ; WX 500 ; N dagger ; B 42 -147 458 737 ; C 179 ; WX 500 ; N daggerdbl ; B 42 -149 458 737 ; C 180 ; WX 278 ; N periodcentered ; B 71 238 207 374 ; C 182 ; WX 606 ; N paragraph ; B 60 -132 546 722 ; C 183 ; WX 606 ; N bullet ; B 122 180 484 542 ; C 184 ; WX 204 ; N quotesinglbase ; B 25 -185 179 109 ; C 185 ; WX 389 ; N quotedblbase ; B 25 -185 364 109 ; C 186 ; WX 389 ; N quotedblright ; B 25 443 364 737 ; C 187 ; WX 426 ; N guillemotright ; B 39 78 387 398 ; C 188 ; WX 1000 ; N ellipsis ; B 105 -15 895 109 ; C 189 ; WX 1000 ; N perthousand ; B 6 -15 994 705 ; C 191 ; WX 444 ; N questiondown ; B 29 -205 415 547 ; C 193 ; WX 333 ; N grave ; B 17 528 242 699 ; C 194 ; WX 333 ; N acute ; B 91 528 316 699 ; C 195 ; WX 333 ; N circumflex ; B 10 528 323 695 ; C 196 ; WX 333 ; N tilde ; B 1 553 332 655 ; C 197 ; WX 333 ; N macron ; B 10 568 323 623 ; C 198 ; WX 333 ; N breve ; B 25 528 308 685 ; C 199 ; WX 333 ; N dotaccent ; B 116 543 218 645 ; C 200 ; WX 333 ; N dieresis ; B 16 543 317 645 ; C 202 ; WX 333 ; N ring ; B 66 522 266 722 ; C 203 ; WX 333 ; N cedilla ; B 29 -215 237 0 ; C 205 ; WX 333 ; N hungarumlaut ; B -9 528 416 699 ; C 206 ; WX 333 ; N ogonek ; B 68 -215 254 0 ; C 207 ; WX 333 ; N caron ; B 10 528 323 695 ; C 208 ; WX 1000 ; N emdash ; B 0 208 1000 268 ; C 225 ; WX 1000 ; N AE ; B 0 0 962 722 ; C 227 ; WX 334 ; N ordfeminine ; B -4 407 338 705 ; C 232 ; WX 667 ; N Lslash ; B 29 0 644 722 ; C 233 ; WX 778 ; N Oslash ; B 45 -56 733 778 ; C 234 ; WX 1000 ; N OE ; B 21 0 979 722 ; C 235 ; WX 300 ; N ordmasculine ; B 4 407 296 705 ; C 241 ; WX 796 ; N ae ; B 34 -15 762 479 ; C 245 ; WX 315 ; N dotlessi ; B 18 0 286 464 ; C 248 ; WX 315 ; N lslash ; B 18 0 286 737 ; C 249 ; WX 500 ; N oslash ; B 34 -97 466 561 ; C 250 ; WX 833 ; N oe ; B 34 -15 799 479 ; C 251 ; WX 574 ; N germandbls ; B 30 -15 537 737 ; C -1 ; WX 500 ; N ecircumflex ; B 34 -15 466 695 ; C -1 ; WX 500 ; N edieresis ; B 34 -15 466 645 ; C -1 ; WX 556 ; N aacute ; B 44 -15 542 699 ; C -1 ; WX 737 ; N registered ; B -8 -15 744 737 ; C -1 ; WX 315 ; N icircumflex ; B 1 0 314 695 ; C -1 ; WX 611 ; N udieresis ; B 22 -15 589 645 ; C -1 ; WX 500 ; N ograve ; B 34 -15 466 699 ; C -1 ; WX 611 ; N uacute ; B 22 -15 589 699 ; C -1 ; WX 611 ; N ucircumflex ; B 22 -15 589 695 ; C -1 ; WX 722 ; N Aacute ; B -8 0 730 937 ; C -1 ; WX 315 ; N igrave ; B 8 0 286 699 ; C -1 ; WX 407 ; N Icircumflex ; B 38 0 369 933 ; C -1 ; WX 444 ; N ccedilla ; B 34 -215 426 479 ; C -1 ; WX 556 ; N adieresis ; B 44 -15 542 645 ; C -1 ; WX 722 ; N Ecircumflex ; B 29 0 663 933 ; C -1 ; WX 463 ; N scaron ; B 46 -15 417 695 ; C -1 ; WX 574 ; N thorn ; B 22 -205 540 737 ; C -1 ; WX 1000 ; N trademark ; B 32 318 968 722 ; C -1 ; WX 500 ; N egrave ; B 34 -15 466 699 ; C -1 ; WX 333 ; N threesuperior ; B 18 273 315 705 ; C -1 ; WX 481 ; N zcaron ; B 42 0 439 695 ; C -1 ; WX 556 ; N atilde ; B 44 -15 542 655 ; C -1 ; WX 556 ; N aring ; B 44 -15 542 732 ; C -1 ; WX 500 ; N ocircumflex ; B 34 -15 466 695 ; C -1 ; WX 722 ; N Edieresis ; B 29 0 663 883 ; C -1 ; WX 834 ; N threequarters ; B 28 -15 795 705 ; C -1 ; WX 537 ; N ydieresis ; B 4 -205 533 645 ; C -1 ; WX 537 ; N yacute ; B 4 -205 533 699 ; C -1 ; WX 315 ; N iacute ; B 18 0 307 699 ; C -1 ; WX 722 ; N Acircumflex ; B -8 0 730 933 ; C -1 ; WX 815 ; N Uacute ; B 16 -15 799 937 ; C -1 ; WX 500 ; N eacute ; B 34 -15 466 699 ; C -1 ; WX 778 ; N Ograve ; B 45 -15 733 937 ; C -1 ; WX 556 ; N agrave ; B 44 -15 542 699 ; C -1 ; WX 815 ; N Udieresis ; B 16 -15 799 883 ; C -1 ; WX 556 ; N acircumflex ; B 44 -15 542 695 ; C -1 ; WX 407 ; N Igrave ; B 38 0 369 937 ; C -1 ; WX 333 ; N twosuperior ; B 14 282 319 705 ; C -1 ; WX 815 ; N Ugrave ; B 16 -15 799 937 ; C -1 ; WX 834 ; N onequarter ; B 39 -15 795 705 ; C -1 ; WX 815 ; N Ucircumflex ; B 16 -15 799 933 ; C -1 ; WX 630 ; N Scaron ; B 47 -15 583 933 ; C -1 ; WX 407 ; N Idieresis ; B 38 0 369 883 ; C -1 ; WX 315 ; N idieresis ; B 7 0 308 645 ; C -1 ; WX 722 ; N Egrave ; B 29 0 663 937 ; C -1 ; WX 778 ; N Oacute ; B 45 -15 733 937 ; C -1 ; WX 606 ; N divide ; B 50 -22 556 528 ; C -1 ; WX 722 ; N Atilde ; B -8 0 730 893 ; C -1 ; WX 722 ; N Aring ; B -8 0 730 965 ; C -1 ; WX 778 ; N Odieresis ; B 45 -15 733 883 ; C -1 ; WX 722 ; N Adieresis ; B -8 0 730 883 ; C -1 ; WX 815 ; N Ntilde ; B 24 -15 791 893 ; C -1 ; WX 611 ; N Zcaron ; B 24 0 576 933 ; C -1 ; WX 667 ; N Thorn ; B 29 0 650 722 ; C -1 ; WX 407 ; N Iacute ; B 38 0 369 937 ; C -1 ; WX 606 ; N plusminus ; B 50 0 556 506 ; C -1 ; WX 606 ; N multiply ; B 74 24 532 482 ; C -1 ; WX 722 ; N Eacute ; B 29 0 663 937 ; C -1 ; WX 704 ; N Ydieresis ; B -11 0 715 883 ; C -1 ; WX 333 ; N onesuperior ; B 39 282 294 705 ; C -1 ; WX 611 ; N ugrave ; B 22 -15 589 699 ; C -1 ; WX 606 ; N logicalnot ; B 50 108 556 389 ; C -1 ; WX 611 ; N ntilde ; B 22 0 589 655 ; C -1 ; WX 778 ; N Otilde ; B 45 -15 733 893 ; C -1 ; WX 500 ; N otilde ; B 34 -15 466 655 ; C -1 ; WX 722 ; N Ccedilla ; B 45 -215 668 737 ; C -1 ; WX 722 ; N Agrave ; B -8 0 730 937 ; C -1 ; WX 834 ; N onehalf ; B 39 -15 820 705 ; C -1 ; WX 778 ; N Eth ; B 29 0 733 722 ; C -1 ; WX 400 ; N degree ; B 57 419 343 705 ; C -1 ; WX 704 ; N Yacute ; B -11 0 715 937 ; C -1 ; WX 778 ; N Ocircumflex ; B 45 -15 733 933 ; C -1 ; WX 500 ; N oacute ; B 34 -15 466 699 ; C -1 ; WX 611 ; N mu ; B 22 -205 589 464 ; C -1 ; WX 606 ; N minus ; B 50 217 556 289 ; C -1 ; WX 500 ; N eth ; B 34 -15 466 752 ; C -1 ; WX 500 ; N odieresis ; B 34 -15 466 645 ; C -1 ; WX 737 ; N copyright ; B -8 -15 744 737 ; C -1 ; WX 606 ; N brokenbar ; B 267 -175 339 675 ; EndCharMetrics StartKernData StartKernPairs 169 KPX A y -37 KPX A w -25 KPX A v -37 KPX A quoteright -74 KPX A quotedblright -74 KPX A Y -75 KPX A W -50 KPX A V -75 KPX A U -30 KPX A T -18 KPX B period -37 KPX B comma -37 KPX B A -18 KPX C period -37 KPX C comma -37 KPX C A -18 KPX D period -37 KPX D comma -37 KPX D Y -18 KPX D V -18 KPX F r -10 KPX F period -125 KPX F o -55 KPX F i -10 KPX F e -55 KPX F comma -125 KPX F a -65 KPX F A -50 KPX G period -37 KPX G comma -37 KPX J u -25 KPX J period -74 KPX J o -25 KPX J e -25 KPX J comma -74 KPX J a -25 KPX J A -18 KPX K y -25 KPX K o 10 KPX K e 10 KPX L y -25 KPX L quoteright -100 KPX L quotedblright -100 KPX L Y -74 KPX L W -74 KPX L V -91 KPX L T -75 KPX N period -55 KPX N comma -55 KPX O period -37 KPX O comma -37 KPX O Y -18 KPX O V -18 KPX O T 10 KPX P period -125 KPX P o -37 KPX P e -37 KPX P comma -125 KPX P a -37 KPX P A -55 KPX Q period -25 KPX Q comma -25 KPX S period -37 KPX S comma -37 KPX T semicolon -37 KPX T period -125 KPX T o -55 KPX T hyphen -100 KPX T e -55 KPX T comma -125 KPX T colon -37 KPX T a -55 KPX T O 10 KPX T A -18 KPX U period -100 KPX U comma -100 KPX U A -30 KPX V u -75 KPX V semicolon -75 KPX V period -125 KPX V o -75 KPX V i -18 KPX V hyphen -100 KPX V e -75 KPX V comma -125 KPX V colon -75 KPX V a -85 KPX V O -18 KPX V A -74 KPX W y -55 KPX W u -55 KPX W semicolon -100 KPX W period -125 KPX W o -60 KPX W i -18 KPX W hyphen -100 KPX W e -60 KPX W comma -125 KPX W colon -100 KPX W a -75 KPX W A -50 KPX Y u -91 KPX Y semicolon -75 KPX Y period -100 KPX Y o -100 KPX Y i -18 KPX Y hyphen -125 KPX Y e -100 KPX Y comma -100 KPX Y colon -75 KPX Y a -100 KPX Y O -18 KPX Y A -75 KPX a y -10 KPX a w -10 KPX a v -10 KPX b period -18 KPX b comma -18 KPX c period -18 KPX c l -7 KPX c k -7 KPX c h -7 KPX c comma -18 KPX colon space -37 KPX comma space -37 KPX comma quoteright -37 KPX comma quotedblright -37 KPX e period -18 KPX e comma -18 KPX f quoteright 100 KPX f quotedblright 100 KPX f period -37 KPX f comma -37 KPX g period -25 KPX g comma -25 KPX o period -18 KPX o comma -18 KPX p period -18 KPX p comma -18 KPX period space -37 KPX period quoteright -37 KPX period quotedblright -37 KPX quotedblleft A -74 KPX quotedblright space -37 KPX quoteleft quoteleft -25 KPX quoteleft A -74 KPX quoteright s -25 KPX quoteright quoteright -25 KPX quoteright d -37 KPX r period -100 KPX r hyphen -37 KPX r comma -100 KPX s period -25 KPX s comma -25 KPX semicolon space -37 KPX space quoteleft -37 KPX space quotedblleft -37 KPX space Y -37 KPX space W -37 KPX space V -37 KPX space T -37 KPX space A -37 KPX v period -125 KPX v comma -125 KPX w period -125 KPX w comma -125 KPX w a -18 KPX y period -125 KPX y comma -125 EndKernPairs EndKernData StartComposites 56 CC Aacute 2 ; PCC A 0 0 ; PCC acute 195 238 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 195 238 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 195 238 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 195 238 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 195 243 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 195 238 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 195 238 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 195 238 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 195 238 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 195 238 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 37 238 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 37 238 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 37 238 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 37 238 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 241 238 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 223 238 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 223 238 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 223 238 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 223 238 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 223 238 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 149 238 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 241 238 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 241 238 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 241 238 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 241 238 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 216 238 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 186 238 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 238 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 112 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 112 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 112 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 112 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 112 10 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 112 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 84 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 84 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 84 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 84 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -9 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -9 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -9 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -9 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 139 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 84 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 84 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 65 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 139 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 139 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 139 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 139 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 102 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 102 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 74 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pncri8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1991 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Tue May 28 16:40:04 1991 Comment UniqueID 35028 Comment VMusage 31423 38315 FontName NewCenturySchlbk-Italic FullName New Century Schoolbook Italic FamilyName New Century Schoolbook Weight Medium ItalicAngle -16 IsFixedPitch false FontBBox -166 -250 994 958 UnderlinePosition -100 UnderlineThickness 50 Version 001.006 Notice Copyright (c) 1985, 1987, 1989, 1991 Adobe Systems Incorporated. All Rights Reserved. EncodingScheme AdobeStandardEncoding CapHeight 722 XHeight 466 Ascender 737 Descender -205 StartCharMetrics 228 C 32 ; WX 278 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 17 -15 303 737 ; C 34 ; WX 400 ; N quotedbl ; B 127 463 363 737 ; C 35 ; WX 556 ; N numbersign ; B 28 0 528 690 ; C 36 ; WX 556 ; N dollar ; B 4 -142 536 808 ; C 37 ; WX 833 ; N percent ; B 43 -15 790 705 ; C 38 ; WX 852 ; N ampersand ; B 24 -15 773 737 ; C 39 ; WX 204 ; N quoteright ; B 39 463 229 737 ; C 40 ; WX 333 ; N parenleft ; B 53 -117 411 745 ; C 41 ; WX 333 ; N parenright ; B -93 -117 265 745 ; C 42 ; WX 500 ; N asterisk ; B 80 318 500 737 ; C 43 ; WX 606 ; N plus ; B 50 0 556 506 ; C 44 ; WX 278 ; N comma ; B -39 -165 151 109 ; C 45 ; WX 333 ; N hyphen ; B 32 202 259 274 ; C 46 ; WX 278 ; N period ; B 17 -15 141 109 ; C 47 ; WX 606 ; N slash ; B 132 -15 474 737 ; C 48 ; WX 556 ; N zero ; B 30 -15 526 705 ; C 49 ; WX 556 ; N one ; B 50 0 459 705 ; C 50 ; WX 556 ; N two ; B -37 0 506 705 ; C 51 ; WX 556 ; N three ; B -2 -15 506 705 ; C 52 ; WX 556 ; N four ; B -8 0 512 705 ; C 53 ; WX 556 ; N five ; B 4 -15 540 705 ; C 54 ; WX 556 ; N six ; B 36 -15 548 705 ; C 55 ; WX 556 ; N seven ; B 69 -15 561 705 ; C 56 ; WX 556 ; N eight ; B 6 -15 526 705 ; C 57 ; WX 556 ; N nine ; B 8 -15 520 705 ; C 58 ; WX 278 ; N colon ; B 17 -15 229 466 ; C 59 ; WX 278 ; N semicolon ; B -39 -165 229 466 ; C 60 ; WX 606 ; N less ; B 36 -8 542 514 ; C 61 ; WX 606 ; N equal ; B 50 117 556 389 ; C 62 ; WX 606 ; N greater ; B 64 -8 570 514 ; C 63 ; WX 444 ; N question ; B 102 -15 417 737 ; C 64 ; WX 747 ; N at ; B -2 -15 750 737 ; C 65 ; WX 704 ; N A ; B -87 0 668 737 ; C 66 ; WX 722 ; N B ; B -33 0 670 722 ; C 67 ; WX 722 ; N C ; B 40 -15 712 737 ; C 68 ; WX 778 ; N D ; B -33 0 738 722 ; C 69 ; WX 722 ; N E ; B -33 0 700 722 ; C 70 ; WX 667 ; N F ; B -33 0 700 722 ; C 71 ; WX 778 ; N G ; B 40 -15 763 737 ; C 72 ; WX 833 ; N H ; B -33 0 866 722 ; C 73 ; WX 407 ; N I ; B -33 0 435 722 ; C 74 ; WX 611 ; N J ; B -14 -15 651 722 ; C 75 ; WX 741 ; N K ; B -33 0 816 722 ; C 76 ; WX 667 ; N L ; B -33 0 627 722 ; C 77 ; WX 944 ; N M ; B -33 0 977 722 ; C 78 ; WX 815 ; N N ; B -51 -15 866 722 ; C 79 ; WX 778 ; N O ; B 40 -15 738 737 ; C 80 ; WX 667 ; N P ; B -33 0 667 722 ; C 81 ; WX 778 ; N Q ; B 40 -190 738 737 ; C 82 ; WX 741 ; N R ; B -45 -15 692 722 ; C 83 ; WX 667 ; N S ; B -6 -15 638 737 ; C 84 ; WX 685 ; N T ; B 40 0 725 722 ; C 85 ; WX 815 ; N U ; B 93 -15 867 722 ; C 86 ; WX 704 ; N V ; B 36 -10 779 722 ; C 87 ; WX 926 ; N W ; B 53 -10 978 722 ; C 88 ; WX 704 ; N X ; B -75 0 779 722 ; C 89 ; WX 685 ; N Y ; B 31 0 760 722 ; C 90 ; WX 667 ; N Z ; B -25 0 667 722 ; C 91 ; WX 333 ; N bracketleft ; B -55 -109 388 737 ; C 92 ; WX 606 ; N backslash ; B 132 -15 474 737 ; C 93 ; WX 333 ; N bracketright ; B -77 -109 366 737 ; C 94 ; WX 606 ; N asciicircum ; B 89 325 517 690 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 204 ; N quoteleft ; B 39 463 229 737 ; C 97 ; WX 574 ; N a ; B 2 -15 524 466 ; C 98 ; WX 556 ; N b ; B 32 -15 488 737 ; C 99 ; WX 444 ; N c ; B 2 -15 394 466 ; C 100 ; WX 611 ; N d ; B 2 -15 585 737 ; C 101 ; WX 444 ; N e ; B -6 -15 388 466 ; C 102 ; WX 333 ; N f ; B -68 -205 470 737 ; L i fi ; L l fl ; C 103 ; WX 537 ; N g ; B -79 -205 523 497 ; C 104 ; WX 611 ; N h ; B 14 -15 562 737 ; C 105 ; WX 333 ; N i ; B 29 -15 282 715 ; C 106 ; WX 315 ; N j ; B -166 -205 318 715 ; C 107 ; WX 556 ; N k ; B 0 -15 497 737 ; C 108 ; WX 333 ; N l ; B 14 -15 292 737 ; C 109 ; WX 889 ; N m ; B 14 -15 840 466 ; C 110 ; WX 611 ; N n ; B 14 -15 562 466 ; C 111 ; WX 500 ; N o ; B 2 -15 450 466 ; C 112 ; WX 574 ; N p ; B -101 -205 506 466 ; C 113 ; WX 556 ; N q ; B 2 -205 500 466 ; C 114 ; WX 444 ; N r ; B 10 0 434 466 ; C 115 ; WX 444 ; N s ; B 2 -15 394 466 ; C 116 ; WX 352 ; N t ; B 24 -15 328 619 ; C 117 ; WX 611 ; N u ; B 44 -15 556 466 ; C 118 ; WX 519 ; N v ; B 31 -15 447 466 ; C 119 ; WX 778 ; N w ; B 31 -15 706 466 ; C 120 ; WX 500 ; N x ; B -33 -15 471 466 ; C 121 ; WX 500 ; N y ; B -83 -205 450 466 ; C 122 ; WX 463 ; N z ; B -33 -15 416 466 ; C 123 ; WX 333 ; N braceleft ; B 38 -109 394 737 ; C 124 ; WX 606 ; N bar ; B 267 -250 339 750 ; C 125 ; WX 333 ; N braceright ; B -87 -109 269 737 ; C 126 ; WX 606 ; N asciitilde ; B 72 184 534 322 ; C 161 ; WX 333 ; N exclamdown ; B -22 -205 264 547 ; C 162 ; WX 556 ; N cent ; B 62 -144 486 580 ; C 163 ; WX 556 ; N sterling ; B -13 -15 544 705 ; C 164 ; WX 167 ; N fraction ; B -134 -15 301 705 ; C 165 ; WX 556 ; N yen ; B 40 0 624 690 ; C 166 ; WX 556 ; N florin ; B -58 -205 569 737 ; C 167 ; WX 500 ; N section ; B -10 -147 480 737 ; C 168 ; WX 556 ; N currency ; B 26 93 530 597 ; C 169 ; WX 278 ; N quotesingle ; B 151 463 237 737 ; C 170 ; WX 389 ; N quotedblleft ; B 39 463 406 737 ; C 171 ; WX 426 ; N guillemotleft ; B -15 74 402 402 ; C 172 ; WX 333 ; N guilsinglleft ; B 40 74 259 402 ; C 173 ; WX 333 ; N guilsinglright ; B 40 74 259 402 ; C 174 ; WX 611 ; N fi ; B -68 -205 555 737 ; C 175 ; WX 611 ; N fl ; B -68 -205 587 737 ; C 177 ; WX 500 ; N endash ; B -27 208 487 268 ; C 178 ; WX 500 ; N dagger ; B 51 -147 506 737 ; C 179 ; WX 500 ; N daggerdbl ; B -54 -147 506 737 ; C 180 ; WX 278 ; N periodcentered ; B 71 238 207 374 ; C 182 ; WX 650 ; N paragraph ; B 48 -132 665 722 ; C 183 ; WX 606 ; N bullet ; B 122 180 484 542 ; C 184 ; WX 204 ; N quotesinglbase ; B -78 -165 112 109 ; C 185 ; WX 389 ; N quotedblbase ; B -78 -165 289 109 ; C 186 ; WX 389 ; N quotedblright ; B 39 463 406 737 ; C 187 ; WX 426 ; N guillemotright ; B -15 74 402 402 ; C 188 ; WX 1000 ; N ellipsis ; B 59 -15 849 109 ; C 189 ; WX 1000 ; N perthousand ; B 6 -15 994 705 ; C 191 ; WX 444 ; N questiondown ; B -3 -205 312 547 ; C 193 ; WX 333 ; N grave ; B 71 518 262 690 ; C 194 ; WX 333 ; N acute ; B 132 518 355 690 ; C 195 ; WX 333 ; N circumflex ; B 37 518 331 690 ; C 196 ; WX 333 ; N tilde ; B 52 547 383 649 ; C 197 ; WX 333 ; N macron ; B 52 560 363 610 ; C 198 ; WX 333 ; N breve ; B 69 518 370 677 ; C 199 ; WX 333 ; N dotaccent ; B 146 544 248 646 ; C 200 ; WX 333 ; N dieresis ; B 59 544 359 646 ; C 202 ; WX 333 ; N ring ; B 114 512 314 712 ; C 203 ; WX 333 ; N cedilla ; B 3 -215 215 0 ; C 205 ; WX 333 ; N hungarumlaut ; B 32 518 455 690 ; C 206 ; WX 333 ; N ogonek ; B 68 -215 254 0 ; C 207 ; WX 333 ; N caron ; B 73 518 378 690 ; C 208 ; WX 1000 ; N emdash ; B -27 208 987 268 ; C 225 ; WX 870 ; N AE ; B -87 0 888 722 ; C 227 ; WX 422 ; N ordfeminine ; B 72 416 420 705 ; C 232 ; WX 667 ; N Lslash ; B -33 0 627 722 ; C 233 ; WX 778 ; N Oslash ; B 16 -68 748 780 ; C 234 ; WX 981 ; N OE ; B 40 0 975 722 ; C 235 ; WX 372 ; N ordmasculine ; B 66 416 370 705 ; C 241 ; WX 722 ; N ae ; B -18 -15 666 466 ; C 245 ; WX 333 ; N dotlessi ; B 29 -15 282 466 ; C 248 ; WX 333 ; N lslash ; B -25 -15 340 737 ; C 249 ; WX 500 ; N oslash ; B 2 -121 450 549 ; C 250 ; WX 778 ; N oe ; B 2 -15 722 466 ; C 251 ; WX 556 ; N germandbls ; B -76 -205 525 737 ; C -1 ; WX 444 ; N ecircumflex ; B -6 -15 388 690 ; C -1 ; WX 444 ; N edieresis ; B -6 -15 415 646 ; C -1 ; WX 574 ; N aacute ; B 2 -15 524 690 ; C -1 ; WX 747 ; N registered ; B -2 -15 750 737 ; C -1 ; WX 333 ; N icircumflex ; B 29 -15 331 690 ; C -1 ; WX 611 ; N udieresis ; B 44 -15 556 646 ; C -1 ; WX 500 ; N ograve ; B 2 -15 450 690 ; C -1 ; WX 611 ; N uacute ; B 44 -15 556 690 ; C -1 ; WX 611 ; N ucircumflex ; B 44 -15 556 690 ; C -1 ; WX 704 ; N Aacute ; B -87 0 668 946 ; C -1 ; WX 333 ; N igrave ; B 29 -15 282 690 ; C -1 ; WX 407 ; N Icircumflex ; B -33 0 435 946 ; C -1 ; WX 444 ; N ccedilla ; B 2 -215 394 466 ; C -1 ; WX 574 ; N adieresis ; B 2 -15 524 646 ; C -1 ; WX 722 ; N Ecircumflex ; B -33 0 700 946 ; C -1 ; WX 444 ; N scaron ; B 2 -15 434 690 ; C -1 ; WX 574 ; N thorn ; B -101 -205 506 737 ; C -1 ; WX 950 ; N trademark ; B 32 318 968 722 ; C -1 ; WX 444 ; N egrave ; B -6 -15 388 690 ; C -1 ; WX 333 ; N threesuperior ; B 22 273 359 705 ; C -1 ; WX 463 ; N zcaron ; B -33 -15 443 690 ; C -1 ; WX 574 ; N atilde ; B 2 -15 524 649 ; C -1 ; WX 574 ; N aring ; B 2 -15 524 712 ; C -1 ; WX 500 ; N ocircumflex ; B 2 -15 450 690 ; C -1 ; WX 722 ; N Edieresis ; B -33 0 700 902 ; C -1 ; WX 834 ; N threequarters ; B 22 -15 782 705 ; C -1 ; WX 500 ; N ydieresis ; B -83 -205 450 646 ; C -1 ; WX 500 ; N yacute ; B -83 -205 450 690 ; C -1 ; WX 333 ; N iacute ; B 29 -15 355 690 ; C -1 ; WX 704 ; N Acircumflex ; B -87 0 668 946 ; C -1 ; WX 815 ; N Uacute ; B 93 -15 867 946 ; C -1 ; WX 444 ; N eacute ; B -6 -15 411 690 ; C -1 ; WX 778 ; N Ograve ; B 40 -15 738 946 ; C -1 ; WX 574 ; N agrave ; B 2 -15 524 690 ; C -1 ; WX 815 ; N Udieresis ; B 93 -15 867 902 ; C -1 ; WX 574 ; N acircumflex ; B 2 -15 524 690 ; C -1 ; WX 407 ; N Igrave ; B -33 0 435 946 ; C -1 ; WX 333 ; N twosuperior ; B 0 282 359 705 ; C -1 ; WX 815 ; N Ugrave ; B 93 -15 867 946 ; C -1 ; WX 834 ; N onequarter ; B 34 -15 782 705 ; C -1 ; WX 815 ; N Ucircumflex ; B 93 -15 867 946 ; C -1 ; WX 667 ; N Scaron ; B -6 -15 638 946 ; C -1 ; WX 407 ; N Idieresis ; B -33 0 456 902 ; C -1 ; WX 333 ; N idieresis ; B 29 -15 359 646 ; C -1 ; WX 722 ; N Egrave ; B -33 0 700 946 ; C -1 ; WX 778 ; N Oacute ; B 40 -15 738 946 ; C -1 ; WX 606 ; N divide ; B 50 -22 556 528 ; C -1 ; WX 704 ; N Atilde ; B -87 0 668 905 ; C -1 ; WX 704 ; N Aring ; B -87 0 668 958 ; C -1 ; WX 778 ; N Odieresis ; B 40 -15 738 902 ; C -1 ; WX 704 ; N Adieresis ; B -87 0 668 902 ; C -1 ; WX 815 ; N Ntilde ; B -51 -15 866 905 ; C -1 ; WX 667 ; N Zcaron ; B -25 0 667 946 ; C -1 ; WX 667 ; N Thorn ; B -33 0 627 722 ; C -1 ; WX 407 ; N Iacute ; B -33 0 452 946 ; C -1 ; WX 606 ; N plusminus ; B 50 0 556 506 ; C -1 ; WX 606 ; N multiply ; B 74 24 532 482 ; C -1 ; WX 722 ; N Eacute ; B -33 0 700 946 ; C -1 ; WX 685 ; N Ydieresis ; B 31 0 760 902 ; C -1 ; WX 333 ; N onesuperior ; B 34 282 311 705 ; C -1 ; WX 611 ; N ugrave ; B 44 -15 556 690 ; C -1 ; WX 606 ; N logicalnot ; B 50 108 556 389 ; C -1 ; WX 611 ; N ntilde ; B 14 -15 562 649 ; C -1 ; WX 778 ; N Otilde ; B 40 -15 738 905 ; C -1 ; WX 500 ; N otilde ; B 2 -15 467 649 ; C -1 ; WX 722 ; N Ccedilla ; B 40 -215 712 737 ; C -1 ; WX 704 ; N Agrave ; B -87 0 668 946 ; C -1 ; WX 834 ; N onehalf ; B 34 -15 776 705 ; C -1 ; WX 778 ; N Eth ; B -33 0 738 722 ; C -1 ; WX 400 ; N degree ; B 86 419 372 705 ; C -1 ; WX 685 ; N Yacute ; B 31 0 760 946 ; C -1 ; WX 778 ; N Ocircumflex ; B 40 -15 738 946 ; C -1 ; WX 500 ; N oacute ; B 2 -15 450 690 ; C -1 ; WX 611 ; N mu ; B -60 -205 556 466 ; C -1 ; WX 606 ; N minus ; B 50 217 556 289 ; C -1 ; WX 500 ; N eth ; B 2 -15 450 737 ; C -1 ; WX 500 ; N odieresis ; B 2 -15 450 646 ; C -1 ; WX 747 ; N copyright ; B -2 -15 750 737 ; C -1 ; WX 606 ; N brokenbar ; B 267 -175 339 675 ; EndCharMetrics StartKernData StartKernPairs 181 KPX A y -55 KPX A w -18 KPX A v -18 KPX A u -18 KPX A quoteright -125 KPX A quotedblright -125 KPX A Y -55 KPX A W -74 KPX A V -74 KPX A U -37 KPX A T -30 KPX A Q -18 KPX A O -18 KPX A G -18 KPX A C -18 KPX B period -50 KPX B comma -50 KPX C period -50 KPX C comma -50 KPX D period -50 KPX D comma -50 KPX D Y -18 KPX D W -18 KPX D V -18 KPX F r -55 KPX F period -125 KPX F o -55 KPX F i -10 KPX F e -55 KPX F comma -125 KPX F a -55 KPX F A -35 KPX G period -50 KPX G comma -50 KPX J u -18 KPX J period -100 KPX J o -37 KPX J e -37 KPX J comma -100 KPX J a -37 KPX J A -18 KPX L y -50 KPX L quoteright -125 KPX L quotedblright -125 KPX L Y -100 KPX L W -100 KPX L V -100 KPX L T -100 KPX N period -60 KPX N comma -60 KPX O period -50 KPX O comma -50 KPX O Y -18 KPX O X -18 KPX O V -18 KPX O T 18 KPX P period -125 KPX P o -55 KPX P e -55 KPX P comma -125 KPX P a -55 KPX P A -50 KPX Q period -20 KPX Q comma -20 KPX R Y -18 KPX R W -18 KPX R V -18 KPX R U -18 KPX S period -50 KPX S comma -50 KPX T y -50 KPX T w -50 KPX T u -50 KPX T semicolon -50 KPX T r -50 KPX T period -100 KPX T o -74 KPX T i -18 KPX T hyphen -100 KPX T h -25 KPX T e -74 KPX T comma -100 KPX T colon -50 KPX T a -74 KPX T O 18 KPX U period -100 KPX U comma -100 KPX U A -18 KPX V u -75 KPX V semicolon -75 KPX V period -100 KPX V o -75 KPX V i -50 KPX V hyphen -100 KPX V e -75 KPX V comma -100 KPX V colon -75 KPX V a -75 KPX V A -37 KPX W y -55 KPX W u -55 KPX W semicolon -75 KPX W period -100 KPX W o -55 KPX W i -20 KPX W hyphen -75 KPX W h -20 KPX W e -55 KPX W comma -100 KPX W colon -75 KPX W a -55 KPX W A -55 KPX Y u -100 KPX Y semicolon -75 KPX Y period -100 KPX Y o -100 KPX Y i -25 KPX Y hyphen -100 KPX Y e -100 KPX Y comma -100 KPX Y colon -75 KPX Y a -100 KPX Y A -55 KPX b period -50 KPX b comma -50 KPX b b -10 KPX c period -50 KPX c k -18 KPX c h -18 KPX c comma -50 KPX colon space -37 KPX comma space -37 KPX comma quoteright -37 KPX comma quotedblright -37 KPX e period -37 KPX e comma -37 KPX f quoteright 75 KPX f quotedblright 75 KPX f period -75 KPX f o -10 KPX f comma -75 KPX g period -50 KPX g comma -50 KPX l y -10 KPX o period -50 KPX o comma -50 KPX p period -50 KPX p comma -50 KPX period space -37 KPX period quoteright -37 KPX period quotedblright -37 KPX quotedblleft A -75 KPX quotedblright space -37 KPX quoteleft quoteleft -37 KPX quoteleft A -75 KPX quoteright s -25 KPX quoteright quoteright -37 KPX quoteright d -37 KPX r semicolon -25 KPX r s -10 KPX r period -125 KPX r k -18 KPX r hyphen -75 KPX r comma -125 KPX r colon -25 KPX s period -50 KPX s comma -50 KPX semicolon space -37 KPX space quoteleft -37 KPX space quotedblleft -37 KPX space Y -37 KPX space W -37 KPX space V -37 KPX space T -37 KPX space A -37 KPX v period -75 KPX v comma -75 KPX w period -75 KPX w comma -75 KPX y period -75 KPX y comma -75 EndKernPairs EndKernData StartComposites 56 CC Aacute 2 ; PCC A 0 0 ; PCC acute 246 256 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 246 256 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 231 256 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 246 256 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 216 246 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 231 256 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 255 256 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 255 256 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 255 256 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 255 256 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 97 256 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 97 256 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 97 256 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 97 256 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 301 256 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 283 256 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 283 256 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 283 256 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 283 256 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 283 256 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 227 256 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 301 256 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 301 256 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 301 256 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 301 256 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 256 256 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 236 256 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 227 256 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 121 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 121 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 121 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 121 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 121 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 121 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 56 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 56 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 56 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 56 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex 0 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis 0 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 139 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 84 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 84 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 56 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 139 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 139 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 139 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 139 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 84 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 65 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pplb8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Mon Jul 2 22:26:30 1990 Comment UniqueID 31793 Comment VMusage 36031 46923 FontName Palatino-Bold FullName Palatino Bold FamilyName Palatino Weight Bold ItalicAngle 0 IsFixedPitch false FontBBox -152 -266 1000 924 UnderlinePosition -100 UnderlineThickness 50 Version 001.005 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved.Palatino is a trademark of Linotype AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 681 XHeight 471 Ascender 720 Descender -258 StartCharMetrics 228 C 32 ; WX 250 ; N space ; B 0 0 0 0 ; C 33 ; WX 278 ; N exclam ; B 63 -12 219 688 ; C 34 ; WX 402 ; N quotedbl ; B 22 376 380 695 ; C 35 ; WX 500 ; N numbersign ; B 4 0 496 673 ; C 36 ; WX 500 ; N dollar ; B 28 -114 472 721 ; C 37 ; WX 889 ; N percent ; B 61 -9 828 714 ; C 38 ; WX 833 ; N ampersand ; B 52 -17 813 684 ; C 39 ; WX 278 ; N quoteright ; B 29 405 249 695 ; C 40 ; WX 333 ; N parenleft ; B 65 -104 305 723 ; C 41 ; WX 333 ; N parenright ; B 28 -104 268 723 ; C 42 ; WX 444 ; N asterisk ; B 44 332 399 695 ; C 43 ; WX 606 ; N plus ; B 51 0 555 505 ; C 44 ; WX 250 ; N comma ; B -6 -166 227 141 ; C 45 ; WX 333 ; N hyphen ; B 16 195 317 305 ; C 46 ; WX 250 ; N period ; B 47 -12 203 144 ; C 47 ; WX 296 ; N slash ; B -9 -17 305 720 ; C 48 ; WX 500 ; N zero ; B 33 -17 468 660 ; C 49 ; WX 500 ; N one ; B 35 -3 455 670 ; C 50 ; WX 500 ; N two ; B 25 -3 472 660 ; C 51 ; WX 500 ; N three ; B 22 -17 458 660 ; C 52 ; WX 500 ; N four ; B 12 -3 473 672 ; C 53 ; WX 500 ; N five ; B 42 -17 472 656 ; C 54 ; WX 500 ; N six ; B 37 -17 469 660 ; C 55 ; WX 500 ; N seven ; B 46 -3 493 656 ; C 56 ; WX 500 ; N eight ; B 34 -17 467 660 ; C 57 ; WX 500 ; N nine ; B 31 -17 463 660 ; C 58 ; WX 250 ; N colon ; B 47 -12 203 454 ; C 59 ; WX 250 ; N semicolon ; B -6 -166 227 454 ; C 60 ; WX 606 ; N less ; B 49 -15 558 519 ; C 61 ; WX 606 ; N equal ; B 51 114 555 396 ; C 62 ; WX 606 ; N greater ; B 49 -15 558 519 ; C 63 ; WX 444 ; N question ; B 43 -12 411 687 ; C 64 ; WX 747 ; N at ; B 42 -12 704 681 ; C 65 ; WX 778 ; N A ; B 24 -3 757 686 ; C 66 ; WX 667 ; N B ; B 39 -3 611 681 ; C 67 ; WX 722 ; N C ; B 44 -17 695 695 ; C 68 ; WX 833 ; N D ; B 35 -3 786 681 ; C 69 ; WX 611 ; N E ; B 39 -4 577 681 ; C 70 ; WX 556 ; N F ; B 28 -3 539 681 ; C 71 ; WX 833 ; N G ; B 47 -17 776 695 ; C 72 ; WX 833 ; N H ; B 36 -3 796 681 ; C 73 ; WX 389 ; N I ; B 39 -3 350 681 ; C 74 ; WX 389 ; N J ; B -11 -213 350 681 ; C 75 ; WX 778 ; N K ; B 39 -3 763 681 ; C 76 ; WX 611 ; N L ; B 39 -4 577 681 ; C 77 ; WX 1000 ; N M ; B 32 -10 968 681 ; C 78 ; WX 833 ; N N ; B 35 -16 798 681 ; C 79 ; WX 833 ; N O ; B 47 -17 787 695 ; C 80 ; WX 611 ; N P ; B 39 -3 594 681 ; C 81 ; WX 833 ; N Q ; B 47 -184 787 695 ; C 82 ; WX 722 ; N R ; B 39 -3 708 681 ; C 83 ; WX 611 ; N S ; B 57 -17 559 695 ; C 84 ; WX 667 ; N T ; B 17 -3 650 681 ; C 85 ; WX 778 ; N U ; B 26 -17 760 681 ; C 86 ; WX 778 ; N V ; B 20 -3 763 681 ; C 87 ; WX 1000 ; N W ; B 17 -3 988 686 ; C 88 ; WX 667 ; N X ; B 17 -3 650 695 ; C 89 ; WX 667 ; N Y ; B 15 -3 660 695 ; C 90 ; WX 667 ; N Z ; B 24 -3 627 681 ; C 91 ; WX 333 ; N bracketleft ; B 73 -104 291 720 ; C 92 ; WX 606 ; N backslash ; B 72 0 534 720 ; C 93 ; WX 333 ; N bracketright ; B 42 -104 260 720 ; C 94 ; WX 606 ; N asciicircum ; B 52 275 554 678 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 278 ; N quoteleft ; B 29 405 249 695 ; C 97 ; WX 500 ; N a ; B 40 -17 478 471 ; C 98 ; WX 611 ; N b ; B 10 -17 556 720 ; C 99 ; WX 444 ; N c ; B 37 -17 414 471 ; C 100 ; WX 611 ; N d ; B 42 -17 577 720 ; C 101 ; WX 500 ; N e ; B 42 -17 461 471 ; C 102 ; WX 389 ; N f ; B 34 -3 381 720 ; L i fi ; L l fl ; C 103 ; WX 556 ; N g ; B 26 -266 535 471 ; C 104 ; WX 611 ; N h ; B 24 -3 587 720 ; C 105 ; WX 333 ; N i ; B 34 -3 298 706 ; C 106 ; WX 333 ; N j ; B 3 -266 241 706 ; C 107 ; WX 611 ; N k ; B 21 -3 597 720 ; C 108 ; WX 333 ; N l ; B 24 -3 296 720 ; C 109 ; WX 889 ; N m ; B 24 -3 864 471 ; C 110 ; WX 611 ; N n ; B 24 -3 587 471 ; C 111 ; WX 556 ; N o ; B 40 -17 517 471 ; C 112 ; WX 611 ; N p ; B 29 -258 567 471 ; C 113 ; WX 611 ; N q ; B 52 -258 589 471 ; C 114 ; WX 389 ; N r ; B 30 -3 389 471 ; C 115 ; WX 444 ; N s ; B 39 -17 405 471 ; C 116 ; WX 333 ; N t ; B 22 -17 324 632 ; C 117 ; WX 611 ; N u ; B 25 -17 583 471 ; C 118 ; WX 556 ; N v ; B 11 -3 545 459 ; C 119 ; WX 833 ; N w ; B 13 -3 820 471 ; C 120 ; WX 500 ; N x ; B 20 -3 483 471 ; C 121 ; WX 556 ; N y ; B 10 -266 546 459 ; C 122 ; WX 500 ; N z ; B 16 -3 464 459 ; C 123 ; WX 310 ; N braceleft ; B 5 -117 288 725 ; C 124 ; WX 606 ; N bar ; B 260 0 346 720 ; C 125 ; WX 310 ; N braceright ; B 22 -117 305 725 ; C 126 ; WX 606 ; N asciitilde ; B 51 155 555 342 ; C 161 ; WX 278 ; N exclamdown ; B 59 -227 215 471 ; C 162 ; WX 500 ; N cent ; B 73 -106 450 554 ; C 163 ; WX 500 ; N sterling ; B -2 -19 501 676 ; C 164 ; WX 167 ; N fraction ; B -152 0 320 660 ; C 165 ; WX 500 ; N yen ; B 17 -3 483 695 ; C 166 ; WX 500 ; N florin ; B 11 -242 490 703 ; C 167 ; WX 500 ; N section ; B 30 -217 471 695 ; C 168 ; WX 500 ; N currency ; B 32 96 468 533 ; C 169 ; WX 227 ; N quotesingle ; B 45 376 181 695 ; C 170 ; WX 500 ; N quotedblleft ; B 34 405 466 695 ; C 171 ; WX 500 ; N guillemotleft ; B 36 44 463 438 ; C 172 ; WX 389 ; N guilsinglleft ; B 82 44 307 438 ; C 173 ; WX 389 ; N guilsinglright ; B 82 44 307 438 ; C 174 ; WX 611 ; N fi ; B 10 -3 595 720 ; C 175 ; WX 611 ; N fl ; B 17 -3 593 720 ; C 177 ; WX 500 ; N endash ; B 0 208 500 291 ; C 178 ; WX 500 ; N dagger ; B 29 -6 472 682 ; C 179 ; WX 500 ; N daggerdbl ; B 32 -245 468 682 ; C 180 ; WX 250 ; N periodcentered ; B 47 179 203 335 ; C 182 ; WX 641 ; N paragraph ; B 19 -161 599 683 ; C 183 ; WX 606 ; N bullet ; B 131 172 475 516 ; C 184 ; WX 333 ; N quotesinglbase ; B 56 -160 276 130 ; C 185 ; WX 500 ; N quotedblbase ; B 34 -160 466 130 ; C 186 ; WX 500 ; N quotedblright ; B 34 405 466 695 ; C 187 ; WX 500 ; N guillemotright ; B 37 44 464 438 ; C 188 ; WX 1000 ; N ellipsis ; B 89 -12 911 144 ; C 189 ; WX 1000 ; N perthousand ; B 33 -9 982 724 ; C 191 ; WX 444 ; N questiondown ; B 33 -231 401 471 ; C 193 ; WX 333 ; N grave ; B 18 506 256 691 ; C 194 ; WX 333 ; N acute ; B 78 506 316 691 ; C 195 ; WX 333 ; N circumflex ; B -2 506 335 681 ; C 196 ; WX 333 ; N tilde ; B -16 535 349 661 ; C 197 ; WX 333 ; N macron ; B 1 538 332 609 ; C 198 ; WX 333 ; N breve ; B 15 506 318 669 ; C 199 ; WX 333 ; N dotaccent ; B 100 537 234 671 ; C 200 ; WX 333 ; N dieresis ; B -8 537 341 671 ; C 202 ; WX 333 ; N ring ; B 67 500 267 700 ; C 203 ; WX 333 ; N cedilla ; B 73 -225 300 -7 ; C 205 ; WX 333 ; N hungarumlaut ; B -56 506 390 691 ; C 206 ; WX 333 ; N ogonek ; B 60 -246 274 -17 ; C 207 ; WX 333 ; N caron ; B -2 510 335 685 ; C 208 ; WX 1000 ; N emdash ; B 0 208 1000 291 ; C 225 ; WX 1000 ; N AE ; B 12 -4 954 681 ; C 227 ; WX 438 ; N ordfeminine ; B 77 367 361 660 ; C 232 ; WX 611 ; N Lslash ; B 16 -4 577 681 ; C 233 ; WX 833 ; N Oslash ; B 32 -20 808 698 ; C 234 ; WX 1000 ; N OE ; B 43 -17 985 695 ; C 235 ; WX 488 ; N ordmasculine ; B 89 367 399 660 ; C 241 ; WX 778 ; N ae ; B 46 -17 731 471 ; C 245 ; WX 333 ; N dotlessi ; B 34 -3 298 471 ; C 248 ; WX 333 ; N lslash ; B -4 -3 334 720 ; C 249 ; WX 556 ; N oslash ; B 23 -18 534 471 ; C 250 ; WX 833 ; N oe ; B 48 -17 799 471 ; C 251 ; WX 611 ; N germandbls ; B 30 -17 565 720 ; C -1 ; WX 667 ; N Zcaron ; B 24 -3 627 909 ; C -1 ; WX 444 ; N ccedilla ; B 37 -225 414 471 ; C -1 ; WX 556 ; N ydieresis ; B 10 -266 546 691 ; C -1 ; WX 500 ; N atilde ; B 40 -17 478 673 ; C -1 ; WX 333 ; N icircumflex ; B -2 -3 335 701 ; C -1 ; WX 300 ; N threesuperior ; B 9 261 292 667 ; C -1 ; WX 500 ; N ecircumflex ; B 42 -17 461 701 ; C -1 ; WX 611 ; N thorn ; B 17 -258 563 720 ; C -1 ; WX 500 ; N egrave ; B 42 -17 461 711 ; C -1 ; WX 300 ; N twosuperior ; B 5 261 295 660 ; C -1 ; WX 500 ; N eacute ; B 42 -17 461 711 ; C -1 ; WX 556 ; N otilde ; B 40 -17 517 673 ; C -1 ; WX 778 ; N Aacute ; B 24 -3 757 915 ; C -1 ; WX 556 ; N ocircumflex ; B 40 -17 517 701 ; C -1 ; WX 556 ; N yacute ; B 10 -266 546 711 ; C -1 ; WX 611 ; N udieresis ; B 25 -17 583 691 ; C -1 ; WX 750 ; N threequarters ; B 15 -2 735 667 ; C -1 ; WX 500 ; N acircumflex ; B 40 -17 478 701 ; C -1 ; WX 833 ; N Eth ; B 10 -3 786 681 ; C -1 ; WX 500 ; N edieresis ; B 42 -17 461 691 ; C -1 ; WX 611 ; N ugrave ; B 25 -17 583 711 ; C -1 ; WX 998 ; N trademark ; B 38 274 961 678 ; C -1 ; WX 556 ; N ograve ; B 40 -17 517 711 ; C -1 ; WX 444 ; N scaron ; B 39 -17 405 693 ; C -1 ; WX 389 ; N Idieresis ; B 20 -3 369 895 ; C -1 ; WX 611 ; N uacute ; B 25 -17 583 711 ; C -1 ; WX 500 ; N agrave ; B 40 -17 478 711 ; C -1 ; WX 611 ; N ntilde ; B 24 -3 587 673 ; C -1 ; WX 500 ; N aring ; B 40 -17 478 700 ; C -1 ; WX 500 ; N zcaron ; B 16 -3 464 693 ; C -1 ; WX 389 ; N Icircumflex ; B 26 -3 363 905 ; C -1 ; WX 833 ; N Ntilde ; B 35 -16 798 885 ; C -1 ; WX 611 ; N ucircumflex ; B 25 -17 583 701 ; C -1 ; WX 611 ; N Ecircumflex ; B 39 -4 577 905 ; C -1 ; WX 389 ; N Iacute ; B 39 -3 350 915 ; C -1 ; WX 722 ; N Ccedilla ; B 44 -225 695 695 ; C -1 ; WX 833 ; N Odieresis ; B 47 -17 787 895 ; C -1 ; WX 611 ; N Scaron ; B 57 -17 559 909 ; C -1 ; WX 611 ; N Edieresis ; B 39 -4 577 895 ; C -1 ; WX 389 ; N Igrave ; B 39 -3 350 915 ; C -1 ; WX 500 ; N adieresis ; B 40 -17 478 691 ; C -1 ; WX 833 ; N Ograve ; B 47 -17 787 915 ; C -1 ; WX 611 ; N Egrave ; B 39 -4 577 915 ; C -1 ; WX 667 ; N Ydieresis ; B 15 -3 660 895 ; C -1 ; WX 747 ; N registered ; B 26 -17 720 695 ; C -1 ; WX 833 ; N Otilde ; B 47 -17 787 885 ; C -1 ; WX 750 ; N onequarter ; B 19 -2 735 665 ; C -1 ; WX 778 ; N Ugrave ; B 26 -17 760 915 ; C -1 ; WX 778 ; N Ucircumflex ; B 26 -17 760 905 ; C -1 ; WX 611 ; N Thorn ; B 39 -3 574 681 ; C -1 ; WX 606 ; N divide ; B 51 0 555 510 ; C -1 ; WX 778 ; N Atilde ; B 24 -3 757 885 ; C -1 ; WX 778 ; N Uacute ; B 26 -17 760 915 ; C -1 ; WX 833 ; N Ocircumflex ; B 47 -17 787 905 ; C -1 ; WX 606 ; N logicalnot ; B 51 114 555 396 ; C -1 ; WX 778 ; N Aring ; B 24 -3 757 924 ; C -1 ; WX 333 ; N idieresis ; B -8 -3 341 691 ; C -1 ; WX 333 ; N iacute ; B 34 -3 316 711 ; C -1 ; WX 500 ; N aacute ; B 40 -17 478 711 ; C -1 ; WX 606 ; N plusminus ; B 51 0 555 505 ; C -1 ; WX 606 ; N multiply ; B 72 21 534 483 ; C -1 ; WX 778 ; N Udieresis ; B 26 -17 760 895 ; C -1 ; WX 606 ; N minus ; B 51 212 555 298 ; C -1 ; WX 300 ; N onesuperior ; B 14 261 287 665 ; C -1 ; WX 611 ; N Eacute ; B 39 -4 577 915 ; C -1 ; WX 778 ; N Acircumflex ; B 24 -3 757 905 ; C -1 ; WX 747 ; N copyright ; B 26 -17 720 695 ; C -1 ; WX 778 ; N Agrave ; B 24 -3 757 915 ; C -1 ; WX 556 ; N odieresis ; B 40 -17 517 691 ; C -1 ; WX 556 ; N oacute ; B 40 -17 517 711 ; C -1 ; WX 400 ; N degree ; B 50 360 350 660 ; C -1 ; WX 333 ; N igrave ; B 18 -3 298 711 ; C -1 ; WX 611 ; N mu ; B 25 -225 583 471 ; C -1 ; WX 833 ; N Oacute ; B 47 -17 787 915 ; C -1 ; WX 556 ; N eth ; B 40 -17 517 720 ; C -1 ; WX 778 ; N Adieresis ; B 24 -3 757 895 ; C -1 ; WX 667 ; N Yacute ; B 15 -3 660 915 ; C -1 ; WX 606 ; N brokenbar ; B 260 0 346 720 ; C -1 ; WX 750 ; N onehalf ; B 9 -2 745 665 ; EndCharMetrics StartKernData StartKernPairs 101 KPX A y -70 KPX A w -70 KPX A v -70 KPX A space -18 KPX A quoteright -92 KPX A Y -111 KPX A W -90 KPX A V -129 KPX A T -92 KPX F period -111 KPX F comma -111 KPX F A -55 KPX L y -74 KPX L space -18 KPX L quoteright -74 KPX L Y -92 KPX L W -92 KPX L V -92 KPX L T -74 KPX P period -129 KPX P comma -129 KPX P A -74 KPX R y -30 KPX R Y -55 KPX R W -37 KPX R V -74 KPX R T -55 KPX T y -90 KPX T w -90 KPX T u -129 KPX T semicolon -74 KPX T s -111 KPX T r -111 KPX T period -92 KPX T o -111 KPX T i -55 KPX T hyphen -92 KPX T e -111 KPX T comma -92 KPX T colon -74 KPX T c -129 KPX T a -111 KPX T A -92 KPX V y -90 KPX V u -92 KPX V semicolon -74 KPX V r -111 KPX V period -129 KPX V o -111 KPX V i -55 KPX V hyphen -92 KPX V e -111 KPX V comma -129 KPX V colon -74 KPX V a -111 KPX V A -129 KPX W y -74 KPX W u -74 KPX W semicolon -37 KPX W r -74 KPX W period -37 KPX W o -74 KPX W i -37 KPX W hyphen -37 KPX W e -74 KPX W comma -92 KPX W colon -37 KPX W a -74 KPX W A -90 KPX Y v -74 KPX Y u -74 KPX Y semicolon -55 KPX Y q -92 KPX Y period -74 KPX Y p -74 KPX Y o -74 KPX Y i -55 KPX Y hyphen -74 KPX Y e -74 KPX Y comma -74 KPX Y colon -55 KPX Y a -74 KPX Y A -55 KPX f quoteright 37 KPX f f -18 KPX one one -37 KPX quoteleft quoteleft -55 KPX quoteright t -18 KPX quoteright space -55 KPX quoteright s -55 KPX quoteright quoteright -55 KPX r quoteright 55 KPX r period -55 KPX r hyphen -18 KPX r comma -55 KPX v period -111 KPX v comma -111 KPX w period -92 KPX w comma -92 KPX y period -92 KPX y comma -92 EndKernPairs EndKernData StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 223 224 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 211 224 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 223 224 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 215 224 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 223 224 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 223 224 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 195 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 139 224 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 139 224 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 139 224 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 139 224 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 28 224 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 28 224 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 28 224 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 28 224 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 250 224 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 250 224 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 250 224 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 250 224 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 250 224 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 250 224 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 139 224 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 235 224 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 235 224 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 235 224 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 223 224 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 211 224 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 199 224 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 167 224 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 84 20 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 84 20 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 84 20 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 84 20 ; CC aring 2 ; PCC a 0 0 ; PCC ring 84 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 84 12 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 56 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 84 20 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 96 20 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 92 20 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 84 20 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 20 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex 0 20 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis 0 20 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 20 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 139 12 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 112 20 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 112 20 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 112 20 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 112 20 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 112 12 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 56 8 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 151 20 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 139 20 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 139 20 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 131 20 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 144 20 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 124 20 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 84 8 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pplbi8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Mon Jul 2 22:48:39 1990 Comment UniqueID 31799 Comment VMusage 37656 48548 FontName Palatino-BoldItalic FullName Palatino Bold Italic FamilyName Palatino Weight Bold ItalicAngle -10 IsFixedPitch false FontBBox -170 -271 1073 926 UnderlinePosition -100 UnderlineThickness 50 Version 001.005 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved.Palatino is a trademark of Linotype AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 681 XHeight 469 Ascender 726 Descender -271 StartCharMetrics 228 C 32 ; WX 250 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 58 -17 322 695 ; C 34 ; WX 500 ; N quotedbl ; B 137 467 493 720 ; C 35 ; WX 500 ; N numbersign ; B 4 0 496 673 ; C 36 ; WX 500 ; N dollar ; B 20 -108 477 737 ; C 37 ; WX 889 ; N percent ; B 56 -17 790 697 ; C 38 ; WX 833 ; N ampersand ; B 74 -17 811 695 ; C 39 ; WX 278 ; N quoteright ; B 76 431 302 720 ; C 40 ; WX 333 ; N parenleft ; B 58 -129 368 723 ; C 41 ; WX 333 ; N parenright ; B -12 -129 298 723 ; C 42 ; WX 444 ; N asterisk ; B 84 332 439 695 ; C 43 ; WX 606 ; N plus ; B 50 -5 556 501 ; C 44 ; WX 250 ; N comma ; B -33 -164 208 147 ; C 45 ; WX 389 ; N hyphen ; B 37 198 362 300 ; C 46 ; WX 250 ; N period ; B 48 -17 187 135 ; C 47 ; WX 315 ; N slash ; B 1 -17 315 720 ; C 48 ; WX 500 ; N zero ; B 42 -17 490 683 ; C 49 ; WX 500 ; N one ; B 41 -3 434 678 ; C 50 ; WX 500 ; N two ; B 1 -3 454 683 ; C 51 ; WX 500 ; N three ; B 8 -17 450 683 ; C 52 ; WX 500 ; N four ; B 3 -3 487 683 ; C 53 ; WX 500 ; N five ; B 14 -17 481 675 ; C 54 ; WX 500 ; N six ; B 39 -17 488 683 ; C 55 ; WX 500 ; N seven ; B 69 -3 544 674 ; C 56 ; WX 500 ; N eight ; B 26 -17 484 683 ; C 57 ; WX 500 ; N nine ; B 27 -17 491 683 ; C 58 ; WX 250 ; N colon ; B 38 -17 236 452 ; C 59 ; WX 250 ; N semicolon ; B -33 -164 247 452 ; C 60 ; WX 606 ; N less ; B 49 -21 558 517 ; C 61 ; WX 606 ; N equal ; B 51 106 555 390 ; C 62 ; WX 606 ; N greater ; B 48 -21 557 517 ; C 63 ; WX 444 ; N question ; B 91 -17 450 695 ; C 64 ; WX 833 ; N at ; B 82 -12 744 681 ; C 65 ; WX 722 ; N A ; B -35 -3 685 683 ; C 66 ; WX 667 ; N B ; B 8 -3 629 681 ; C 67 ; WX 685 ; N C ; B 69 -17 695 695 ; C 68 ; WX 778 ; N D ; B 0 -3 747 682 ; C 69 ; WX 611 ; N E ; B 11 -3 606 681 ; C 70 ; WX 556 ; N F ; B -6 -3 593 681 ; C 71 ; WX 778 ; N G ; B 72 -17 750 695 ; C 72 ; WX 778 ; N H ; B -12 -3 826 681 ; C 73 ; WX 389 ; N I ; B -1 -3 412 681 ; C 74 ; WX 389 ; N J ; B -29 -207 417 681 ; C 75 ; WX 722 ; N K ; B -10 -3 746 681 ; C 76 ; WX 611 ; N L ; B 26 -3 578 681 ; C 77 ; WX 944 ; N M ; B -23 -17 985 681 ; C 78 ; WX 778 ; N N ; B -2 -3 829 681 ; C 79 ; WX 833 ; N O ; B 76 -17 794 695 ; C 80 ; WX 667 ; N P ; B 11 -3 673 681 ; C 81 ; WX 833 ; N Q ; B 76 -222 794 695 ; C 82 ; WX 722 ; N R ; B 4 -3 697 681 ; C 83 ; WX 556 ; N S ; B 50 -17 517 695 ; C 84 ; WX 611 ; N T ; B 56 -3 674 681 ; C 85 ; WX 778 ; N U ; B 83 -17 825 681 ; C 86 ; WX 667 ; N V ; B 67 -3 745 681 ; C 87 ; WX 1000 ; N W ; B 67 -3 1073 689 ; C 88 ; WX 722 ; N X ; B -9 -3 772 681 ; C 89 ; WX 611 ; N Y ; B 54 -3 675 695 ; C 90 ; WX 667 ; N Z ; B 1 -3 676 681 ; C 91 ; WX 333 ; N bracketleft ; B 45 -102 381 723 ; C 92 ; WX 606 ; N backslash ; B 72 0 534 720 ; C 93 ; WX 333 ; N bracketright ; B -21 -102 315 723 ; C 94 ; WX 606 ; N asciicircum ; B 63 275 543 678 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 278 ; N quoteleft ; B 65 431 291 720 ; C 97 ; WX 556 ; N a ; B 44 -17 519 470 ; C 98 ; WX 537 ; N b ; B 44 -17 494 726 ; C 99 ; WX 444 ; N c ; B 32 -17 436 469 ; C 100 ; WX 556 ; N d ; B 38 -17 550 726 ; C 101 ; WX 444 ; N e ; B 28 -17 418 469 ; C 102 ; WX 333 ; N f ; B -130 -271 449 726 ; L i fi ; L l fl ; C 103 ; WX 500 ; N g ; B -50 -271 529 469 ; C 104 ; WX 556 ; N h ; B 22 -17 522 726 ; C 105 ; WX 333 ; N i ; B 26 -17 312 695 ; C 106 ; WX 333 ; N j ; B -64 -271 323 695 ; C 107 ; WX 556 ; N k ; B 34 -17 528 726 ; C 108 ; WX 333 ; N l ; B 64 -17 318 726 ; C 109 ; WX 833 ; N m ; B 19 -17 803 469 ; C 110 ; WX 556 ; N n ; B 17 -17 521 469 ; C 111 ; WX 556 ; N o ; B 48 -17 502 469 ; C 112 ; WX 556 ; N p ; B -21 -271 516 469 ; C 113 ; WX 537 ; N q ; B 32 -271 513 469 ; C 114 ; WX 389 ; N r ; B 20 -17 411 469 ; C 115 ; WX 444 ; N s ; B 25 -17 406 469 ; C 116 ; WX 389 ; N t ; B 42 -17 409 636 ; C 117 ; WX 556 ; N u ; B 22 -17 521 469 ; C 118 ; WX 556 ; N v ; B 19 -17 513 469 ; C 119 ; WX 833 ; N w ; B 27 -17 802 469 ; C 120 ; WX 500 ; N x ; B -8 -17 500 469 ; C 121 ; WX 556 ; N y ; B 13 -271 541 469 ; C 122 ; WX 500 ; N z ; B 31 -17 470 469 ; C 123 ; WX 333 ; N braceleft ; B 18 -105 334 720 ; C 124 ; WX 606 ; N bar ; B 259 0 347 720 ; C 125 ; WX 333 ; N braceright ; B -1 -105 315 720 ; C 126 ; WX 606 ; N asciitilde ; B 51 151 555 346 ; C 161 ; WX 333 ; N exclamdown ; B 2 -225 259 479 ; C 162 ; WX 500 ; N cent ; B 52 -105 456 547 ; C 163 ; WX 500 ; N sterling ; B 21 -5 501 683 ; C 164 ; WX 167 ; N fraction ; B -170 0 338 683 ; C 165 ; WX 500 ; N yen ; B 11 -3 538 695 ; C 166 ; WX 500 ; N florin ; B 8 -242 479 690 ; C 167 ; WX 556 ; N section ; B 47 -151 497 695 ; C 168 ; WX 500 ; N currency ; B 32 96 468 533 ; C 169 ; WX 250 ; N quotesingle ; B 127 467 293 720 ; C 170 ; WX 500 ; N quotedblleft ; B 65 431 511 720 ; C 171 ; WX 500 ; N guillemotleft ; B 35 43 458 446 ; C 172 ; WX 333 ; N guilsinglleft ; B 60 43 292 446 ; C 173 ; WX 333 ; N guilsinglright ; B 35 40 267 443 ; C 174 ; WX 611 ; N fi ; B -130 -271 588 726 ; C 175 ; WX 611 ; N fl ; B -130 -271 631 726 ; C 177 ; WX 500 ; N endash ; B -12 214 512 282 ; C 178 ; WX 556 ; N dagger ; B 67 -3 499 685 ; C 179 ; WX 556 ; N daggerdbl ; B 33 -153 537 693 ; C 180 ; WX 250 ; N periodcentered ; B 67 172 206 324 ; C 182 ; WX 556 ; N paragraph ; B 14 -204 629 681 ; C 183 ; WX 606 ; N bullet ; B 131 172 475 516 ; C 184 ; WX 250 ; N quotesinglbase ; B -3 -144 220 145 ; C 185 ; WX 500 ; N quotedblbase ; B -18 -144 424 145 ; C 186 ; WX 500 ; N quotedblright ; B 73 431 519 720 ; C 187 ; WX 500 ; N guillemotright ; B 35 40 458 443 ; C 188 ; WX 1000 ; N ellipsis ; B 91 -17 896 135 ; C 189 ; WX 1000 ; N perthousand ; B 65 -17 912 691 ; C 191 ; WX 444 ; N questiondown ; B -12 -226 347 479 ; C 193 ; WX 333 ; N grave ; B 110 518 322 699 ; C 194 ; WX 333 ; N acute ; B 153 518 392 699 ; C 195 ; WX 333 ; N circumflex ; B 88 510 415 684 ; C 196 ; WX 333 ; N tilde ; B 82 535 441 654 ; C 197 ; WX 333 ; N macron ; B 76 538 418 608 ; C 198 ; WX 333 ; N breve ; B 96 518 412 680 ; C 199 ; WX 333 ; N dotaccent ; B 202 537 325 668 ; C 200 ; WX 333 ; N dieresis ; B 90 537 426 668 ; C 202 ; WX 556 ; N ring ; B 277 514 477 714 ; C 203 ; WX 333 ; N cedilla ; B 12 -218 248 5 ; C 205 ; WX 333 ; N hungarumlaut ; B -28 518 409 699 ; C 206 ; WX 333 ; N ogonek ; B 32 -206 238 -17 ; C 207 ; WX 333 ; N caron ; B 113 510 445 684 ; C 208 ; WX 1000 ; N emdash ; B -12 214 1012 282 ; C 225 ; WX 944 ; N AE ; B -29 -3 927 681 ; C 227 ; WX 333 ; N ordfeminine ; B 47 391 355 684 ; C 232 ; WX 611 ; N Lslash ; B 6 -3 578 681 ; C 233 ; WX 833 ; N Oslash ; B 57 -54 797 730 ; C 234 ; WX 944 ; N OE ; B 39 -17 961 695 ; C 235 ; WX 333 ; N ordmasculine ; B 51 391 346 683 ; C 241 ; WX 738 ; N ae ; B 44 -17 711 469 ; C 245 ; WX 333 ; N dotlessi ; B 26 -17 293 469 ; C 248 ; WX 333 ; N lslash ; B 13 -17 365 726 ; C 249 ; WX 556 ; N oslash ; B 14 -50 522 506 ; C 250 ; WX 778 ; N oe ; B 48 -17 755 469 ; C 251 ; WX 556 ; N germandbls ; B -131 -271 549 726 ; C -1 ; WX 667 ; N Zcaron ; B 1 -3 676 896 ; C -1 ; WX 444 ; N ccedilla ; B 32 -218 436 469 ; C -1 ; WX 556 ; N ydieresis ; B 13 -271 541 688 ; C -1 ; WX 556 ; N atilde ; B 44 -17 553 666 ; C -1 ; WX 333 ; N icircumflex ; B 26 -17 403 704 ; C -1 ; WX 300 ; N threesuperior ; B 23 263 310 683 ; C -1 ; WX 444 ; N ecircumflex ; B 28 -17 471 704 ; C -1 ; WX 556 ; N thorn ; B -21 -271 516 726 ; C -1 ; WX 444 ; N egrave ; B 28 -17 418 719 ; C -1 ; WX 300 ; N twosuperior ; B 26 271 321 683 ; C -1 ; WX 444 ; N eacute ; B 28 -17 448 719 ; C -1 ; WX 556 ; N otilde ; B 48 -17 553 666 ; C -1 ; WX 722 ; N Aacute ; B -35 -3 685 911 ; C -1 ; WX 556 ; N ocircumflex ; B 48 -17 515 704 ; C -1 ; WX 556 ; N yacute ; B 13 -271 541 719 ; C -1 ; WX 556 ; N udieresis ; B 22 -17 538 688 ; C -1 ; WX 750 ; N threequarters ; B 18 -2 732 683 ; C -1 ; WX 556 ; N acircumflex ; B 44 -17 527 704 ; C -1 ; WX 778 ; N Eth ; B 0 -3 747 682 ; C -1 ; WX 444 ; N edieresis ; B 28 -17 482 688 ; C -1 ; WX 556 ; N ugrave ; B 22 -17 521 719 ; C -1 ; WX 1000 ; N trademark ; B 38 274 961 678 ; C -1 ; WX 556 ; N ograve ; B 48 -17 502 719 ; C -1 ; WX 444 ; N scaron ; B 25 -17 489 692 ; C -1 ; WX 389 ; N Idieresis ; B -1 -3 454 880 ; C -1 ; WX 556 ; N uacute ; B 22 -17 521 719 ; C -1 ; WX 556 ; N agrave ; B 44 -17 519 719 ; C -1 ; WX 556 ; N ntilde ; B 17 -17 553 666 ; C -1 ; WX 556 ; N aring ; B 44 -17 519 714 ; C -1 ; WX 500 ; N zcaron ; B 31 -17 517 692 ; C -1 ; WX 389 ; N Icircumflex ; B -1 -3 443 896 ; C -1 ; WX 778 ; N Ntilde ; B -2 -3 829 866 ; C -1 ; WX 556 ; N ucircumflex ; B 22 -17 521 704 ; C -1 ; WX 611 ; N Ecircumflex ; B 11 -3 606 896 ; C -1 ; WX 389 ; N Iacute ; B -1 -3 420 911 ; C -1 ; WX 685 ; N Ccedilla ; B 69 -218 695 695 ; C -1 ; WX 833 ; N Odieresis ; B 76 -17 794 880 ; C -1 ; WX 556 ; N Scaron ; B 50 -17 557 896 ; C -1 ; WX 611 ; N Edieresis ; B 11 -3 606 880 ; C -1 ; WX 389 ; N Igrave ; B -1 -3 412 911 ; C -1 ; WX 556 ; N adieresis ; B 44 -17 538 688 ; C -1 ; WX 833 ; N Ograve ; B 76 -17 794 911 ; C -1 ; WX 611 ; N Egrave ; B 11 -3 606 911 ; C -1 ; WX 611 ; N Ydieresis ; B 54 -3 675 880 ; C -1 ; WX 747 ; N registered ; B 26 -17 720 695 ; C -1 ; WX 833 ; N Otilde ; B 76 -17 794 866 ; C -1 ; WX 750 ; N onequarter ; B 18 -2 732 683 ; C -1 ; WX 778 ; N Ugrave ; B 83 -17 825 911 ; C -1 ; WX 778 ; N Ucircumflex ; B 83 -17 825 896 ; C -1 ; WX 667 ; N Thorn ; B 11 -3 644 681 ; C -1 ; WX 606 ; N divide ; B 50 -5 556 501 ; C -1 ; WX 722 ; N Atilde ; B -35 -3 685 866 ; C -1 ; WX 778 ; N Uacute ; B 83 -17 825 911 ; C -1 ; WX 833 ; N Ocircumflex ; B 76 -17 794 896 ; C -1 ; WX 606 ; N logicalnot ; B 51 107 555 390 ; C -1 ; WX 722 ; N Aring ; B -35 -3 685 926 ; C -1 ; WX 333 ; N idieresis ; B 26 -17 426 688 ; C -1 ; WX 333 ; N iacute ; B 26 -17 392 719 ; C -1 ; WX 556 ; N aacute ; B 44 -17 519 719 ; C -1 ; WX 606 ; N plusminus ; B 50 0 556 501 ; C -1 ; WX 606 ; N multiply ; B 72 17 534 479 ; C -1 ; WX 778 ; N Udieresis ; B 83 -17 825 880 ; C -1 ; WX 606 ; N minus ; B 51 204 555 292 ; C -1 ; WX 300 ; N onesuperior ; B 41 271 298 680 ; C -1 ; WX 611 ; N Eacute ; B 11 -3 606 911 ; C -1 ; WX 722 ; N Acircumflex ; B -35 -3 685 896 ; C -1 ; WX 747 ; N copyright ; B 26 -17 720 695 ; C -1 ; WX 722 ; N Agrave ; B -35 -3 685 911 ; C -1 ; WX 556 ; N odieresis ; B 48 -17 538 688 ; C -1 ; WX 556 ; N oacute ; B 48 -17 504 719 ; C -1 ; WX 400 ; N degree ; B 50 383 350 683 ; C -1 ; WX 333 ; N igrave ; B 26 -17 322 719 ; C -1 ; WX 556 ; N mu ; B -15 -232 521 469 ; C -1 ; WX 833 ; N Oacute ; B 76 -17 794 911 ; C -1 ; WX 556 ; N eth ; B 48 -17 546 726 ; C -1 ; WX 722 ; N Adieresis ; B -35 -3 685 880 ; C -1 ; WX 611 ; N Yacute ; B 54 -3 675 911 ; C -1 ; WX 606 ; N brokenbar ; B 259 0 347 720 ; C -1 ; WX 750 ; N onehalf ; B 14 -2 736 683 ; EndCharMetrics StartKernData StartKernPairs 108 KPX A y -55 KPX A w -37 KPX A v -55 KPX A space -55 KPX A quoteright -55 KPX A Y -74 KPX A W -74 KPX A V -74 KPX A T -55 KPX F space -18 KPX F period -111 KPX F comma -111 KPX F A -74 KPX L y -37 KPX L space -18 KPX L quoteright -55 KPX L Y -74 KPX L W -74 KPX L V -74 KPX L T -74 KPX P space -55 KPX P period -129 KPX P comma -129 KPX P A -92 KPX R y -20 KPX R Y -37 KPX R W -55 KPX R V -55 KPX R T -37 KPX T y -80 KPX T w -50 KPX T u -92 KPX T semicolon -55 KPX T s -92 KPX T r -92 KPX T period -55 KPX T o -111 KPX T i -74 KPX T hyphen -92 KPX T e -111 KPX T comma -55 KPX T colon -55 KPX T c -92 KPX T a -111 KPX T O -18 KPX T A -55 KPX V y -50 KPX V u -50 KPX V semicolon -37 KPX V r -74 KPX V period -111 KPX V o -74 KPX V i -50 KPX V hyphen -37 KPX V e -74 KPX V comma -111 KPX V colon -37 KPX V a -92 KPX V A -74 KPX W y -30 KPX W u -30 KPX W semicolon -18 KPX W r -30 KPX W period -55 KPX W o -55 KPX W i -30 KPX W e -55 KPX W comma -55 KPX W colon -28 KPX W a -74 KPX W A -74 KPX Y v -30 KPX Y u -50 KPX Y semicolon -55 KPX Y q -92 KPX Y period -55 KPX Y p -74 KPX Y o -111 KPX Y i -54 KPX Y hyphen -55 KPX Y e -92 KPX Y comma -55 KPX Y colon -55 KPX Y a -111 KPX Y A -55 KPX f quoteright 37 KPX f f -37 KPX one one -55 KPX quoteleft quoteleft -55 KPX quoteright t -18 KPX quoteright space -37 KPX quoteright s -37 KPX quoteright quoteright -55 KPX r quoteright 55 KPX r q -18 KPX r period -55 KPX r o -18 KPX r h -18 KPX r g -18 KPX r e -18 KPX r comma -55 KPX r c -18 KPX v period -55 KPX v comma -55 KPX w period -55 KPX w comma -55 KPX y period -37 KPX y comma -37 EndKernPairs EndKernData StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 195 212 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 195 212 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 195 212 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 195 212 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 83 212 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 195 212 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 176 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 139 212 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 139 212 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 139 212 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 139 212 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 28 212 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 28 212 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 28 212 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 28 212 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 223 212 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 250 212 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 250 212 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 250 212 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 250 212 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 250 212 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 112 212 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 223 212 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 223 212 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 223 212 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 211 212 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 151 212 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 139 212 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 167 212 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 112 20 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 112 20 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 112 20 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 112 20 ; CC aring 2 ; PCC a 0 0 ; PCC ring 0 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 112 12 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 56 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 56 20 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 56 20 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 56 20 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 56 20 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute 0 20 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -12 20 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis 0 20 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave 0 20 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 112 12 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 112 20 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 100 20 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 112 20 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 112 20 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 112 12 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 44 8 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 112 20 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 100 20 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 112 20 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 112 20 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 112 20 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 112 20 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 72 8 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pplr8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Mon Jul 2 22:14:17 1990 Comment UniqueID 31790 Comment VMusage 36445 47337 FontName Palatino-Roman FullName Palatino Roman FamilyName Palatino Weight Roman ItalicAngle 0 IsFixedPitch false FontBBox -166 -283 1021 927 UnderlinePosition -100 UnderlineThickness 50 Version 001.005 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved.Palatino is a trademark of Linotype AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 692 XHeight 469 Ascender 726 Descender -281 StartCharMetrics 228 C 32 ; WX 250 ; N space ; B 0 0 0 0 ; C 33 ; WX 278 ; N exclam ; B 81 -5 197 694 ; C 34 ; WX 371 ; N quotedbl ; B 52 469 319 709 ; C 35 ; WX 500 ; N numbersign ; B 4 0 495 684 ; C 36 ; WX 500 ; N dollar ; B 30 -116 471 731 ; C 37 ; WX 840 ; N percent ; B 39 -20 802 709 ; C 38 ; WX 778 ; N ampersand ; B 43 -20 753 689 ; C 39 ; WX 278 ; N quoteright ; B 45 446 233 709 ; C 40 ; WX 333 ; N parenleft ; B 60 -215 301 726 ; C 41 ; WX 333 ; N parenright ; B 32 -215 273 726 ; C 42 ; WX 389 ; N asterisk ; B 32 342 359 689 ; C 43 ; WX 606 ; N plus ; B 51 7 555 512 ; C 44 ; WX 250 ; N comma ; B 16 -155 218 123 ; C 45 ; WX 333 ; N hyphen ; B 17 215 312 287 ; C 46 ; WX 250 ; N period ; B 67 -5 183 111 ; C 47 ; WX 606 ; N slash ; B 87 -119 519 726 ; C 48 ; WX 500 ; N zero ; B 29 -20 465 689 ; C 49 ; WX 500 ; N one ; B 60 -3 418 694 ; C 50 ; WX 500 ; N two ; B 16 -3 468 689 ; C 51 ; WX 500 ; N three ; B 15 -20 462 689 ; C 52 ; WX 500 ; N four ; B 2 -3 472 694 ; C 53 ; WX 500 ; N five ; B 13 -20 459 689 ; C 54 ; WX 500 ; N six ; B 32 -20 468 689 ; C 55 ; WX 500 ; N seven ; B 44 -3 497 689 ; C 56 ; WX 500 ; N eight ; B 30 -20 464 689 ; C 57 ; WX 500 ; N nine ; B 20 -20 457 689 ; C 58 ; WX 250 ; N colon ; B 66 -5 182 456 ; C 59 ; WX 250 ; N semicolon ; B 16 -153 218 456 ; C 60 ; WX 606 ; N less ; B 57 0 558 522 ; C 61 ; WX 606 ; N equal ; B 51 136 555 386 ; C 62 ; WX 606 ; N greater ; B 48 0 549 522 ; C 63 ; WX 444 ; N question ; B 43 -5 395 694 ; C 64 ; WX 747 ; N at ; B 24 -20 724 694 ; C 65 ; WX 778 ; N A ; B 15 -3 756 700 ; C 66 ; WX 611 ; N B ; B 26 -3 576 692 ; C 67 ; WX 709 ; N C ; B 22 -20 670 709 ; C 68 ; WX 774 ; N D ; B 22 -3 751 692 ; C 69 ; WX 611 ; N E ; B 22 -3 572 692 ; C 70 ; WX 556 ; N F ; B 22 -3 536 692 ; C 71 ; WX 763 ; N G ; B 22 -20 728 709 ; C 72 ; WX 832 ; N H ; B 22 -3 810 692 ; C 73 ; WX 337 ; N I ; B 22 -3 315 692 ; C 74 ; WX 333 ; N J ; B -15 -194 311 692 ; C 75 ; WX 726 ; N K ; B 22 -3 719 692 ; C 76 ; WX 611 ; N L ; B 22 -3 586 692 ; C 77 ; WX 946 ; N M ; B 16 -13 926 692 ; C 78 ; WX 831 ; N N ; B 17 -20 813 692 ; C 79 ; WX 786 ; N O ; B 22 -20 764 709 ; C 80 ; WX 604 ; N P ; B 22 -3 580 692 ; C 81 ; WX 786 ; N Q ; B 22 -176 764 709 ; C 82 ; WX 668 ; N R ; B 22 -3 669 692 ; C 83 ; WX 525 ; N S ; B 24 -20 503 709 ; C 84 ; WX 613 ; N T ; B 18 -3 595 692 ; C 85 ; WX 778 ; N U ; B 12 -20 759 692 ; C 86 ; WX 722 ; N V ; B 8 -9 706 692 ; C 87 ; WX 1000 ; N W ; B 8 -9 984 700 ; C 88 ; WX 667 ; N X ; B 14 -3 648 700 ; C 89 ; WX 667 ; N Y ; B 9 -3 654 704 ; C 90 ; WX 667 ; N Z ; B 15 -3 638 692 ; C 91 ; WX 333 ; N bracketleft ; B 79 -184 288 726 ; C 92 ; WX 606 ; N backslash ; B 81 0 512 726 ; C 93 ; WX 333 ; N bracketright ; B 45 -184 254 726 ; C 94 ; WX 606 ; N asciicircum ; B 51 283 554 689 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 278 ; N quoteleft ; B 45 446 233 709 ; C 97 ; WX 500 ; N a ; B 32 -12 471 469 ; C 98 ; WX 553 ; N b ; B -15 -12 508 726 ; C 99 ; WX 444 ; N c ; B 26 -20 413 469 ; C 100 ; WX 611 ; N d ; B 35 -12 579 726 ; C 101 ; WX 479 ; N e ; B 26 -20 448 469 ; C 102 ; WX 333 ; N f ; B 23 -3 341 728 ; L i fi ; L l fl ; C 103 ; WX 556 ; N g ; B 32 -283 544 469 ; C 104 ; WX 582 ; N h ; B 6 -3 572 726 ; C 105 ; WX 291 ; N i ; B 21 -3 271 687 ; C 106 ; WX 234 ; N j ; B -40 -283 167 688 ; C 107 ; WX 556 ; N k ; B 21 -12 549 726 ; C 108 ; WX 291 ; N l ; B 21 -3 271 726 ; C 109 ; WX 883 ; N m ; B 16 -3 869 469 ; C 110 ; WX 582 ; N n ; B 6 -3 572 469 ; C 111 ; WX 546 ; N o ; B 32 -20 514 469 ; C 112 ; WX 601 ; N p ; B 8 -281 554 469 ; C 113 ; WX 560 ; N q ; B 35 -281 560 469 ; C 114 ; WX 395 ; N r ; B 21 -3 374 469 ; C 115 ; WX 424 ; N s ; B 30 -20 391 469 ; C 116 ; WX 326 ; N t ; B 22 -12 319 621 ; C 117 ; WX 603 ; N u ; B 18 -12 581 469 ; C 118 ; WX 565 ; N v ; B 6 -7 539 459 ; C 119 ; WX 834 ; N w ; B 6 -7 808 469 ; C 120 ; WX 516 ; N x ; B 20 -3 496 469 ; C 121 ; WX 556 ; N y ; B 12 -283 544 459 ; C 122 ; WX 500 ; N z ; B 16 -3 466 462 ; C 123 ; WX 333 ; N braceleft ; B 58 -175 289 726 ; C 124 ; WX 606 ; N bar ; B 275 0 331 726 ; C 125 ; WX 333 ; N braceright ; B 44 -175 275 726 ; C 126 ; WX 606 ; N asciitilde ; B 51 176 555 347 ; C 161 ; WX 278 ; N exclamdown ; B 81 -225 197 469 ; C 162 ; WX 500 ; N cent ; B 61 -101 448 562 ; C 163 ; WX 500 ; N sterling ; B 12 -13 478 694 ; C 164 ; WX 167 ; N fraction ; B -166 0 337 689 ; C 165 ; WX 500 ; N yen ; B 5 -3 496 701 ; C 166 ; WX 500 ; N florin ; B 0 -262 473 706 ; C 167 ; WX 500 ; N section ; B 26 -219 465 709 ; C 168 ; WX 500 ; N currency ; B 30 96 470 531 ; C 169 ; WX 208 ; N quotesingle ; B 61 469 147 709 ; C 170 ; WX 500 ; N quotedblleft ; B 51 446 449 709 ; C 171 ; WX 500 ; N guillemotleft ; B 50 71 450 428 ; C 172 ; WX 331 ; N guilsinglleft ; B 66 71 265 428 ; C 173 ; WX 331 ; N guilsinglright ; B 66 71 265 428 ; C 174 ; WX 605 ; N fi ; B 23 -3 587 728 ; C 175 ; WX 608 ; N fl ; B 23 -3 590 728 ; C 177 ; WX 500 ; N endash ; B 0 219 500 277 ; C 178 ; WX 500 ; N dagger ; B 34 -5 466 694 ; C 179 ; WX 500 ; N daggerdbl ; B 34 -249 466 694 ; C 180 ; WX 250 ; N periodcentered ; B 67 203 183 319 ; C 182 ; WX 628 ; N paragraph ; B 39 -150 589 694 ; C 183 ; WX 606 ; N bullet ; B 131 172 475 516 ; C 184 ; WX 278 ; N quotesinglbase ; B 22 -153 210 110 ; C 185 ; WX 500 ; N quotedblbase ; B 51 -153 449 110 ; C 186 ; WX 500 ; N quotedblright ; B 51 446 449 709 ; C 187 ; WX 500 ; N guillemotright ; B 50 71 450 428 ; C 188 ; WX 1000 ; N ellipsis ; B 109 -5 891 111 ; C 189 ; WX 1144 ; N perthousand ; B 123 -20 1021 709 ; C 191 ; WX 444 ; N questiondown ; B 43 -231 395 469 ; C 193 ; WX 333 ; N grave ; B 31 506 255 677 ; C 194 ; WX 333 ; N acute ; B 78 506 302 677 ; C 195 ; WX 333 ; N circumflex ; B 11 510 323 677 ; C 196 ; WX 333 ; N tilde ; B 2 535 332 640 ; C 197 ; WX 333 ; N macron ; B 11 538 323 591 ; C 198 ; WX 333 ; N breve ; B 26 506 308 664 ; C 199 ; WX 250 ; N dotaccent ; B 75 537 175 637 ; C 200 ; WX 333 ; N dieresis ; B 17 537 316 637 ; C 202 ; WX 333 ; N ring ; B 67 496 267 696 ; C 203 ; WX 333 ; N cedilla ; B 96 -225 304 -10 ; C 205 ; WX 380 ; N hungarumlaut ; B 3 506 377 687 ; C 206 ; WX 313 ; N ogonek ; B 68 -165 245 -20 ; C 207 ; WX 333 ; N caron ; B 11 510 323 677 ; C 208 ; WX 1000 ; N emdash ; B 0 219 1000 277 ; C 225 ; WX 944 ; N AE ; B -10 -3 908 692 ; C 227 ; WX 333 ; N ordfeminine ; B 24 422 310 709 ; C 232 ; WX 611 ; N Lslash ; B 6 -3 586 692 ; C 233 ; WX 833 ; N Oslash ; B 30 -20 797 709 ; C 234 ; WX 998 ; N OE ; B 22 -20 962 709 ; C 235 ; WX 333 ; N ordmasculine ; B 10 416 323 709 ; C 241 ; WX 758 ; N ae ; B 30 -20 732 469 ; C 245 ; WX 287 ; N dotlessi ; B 21 -3 271 469 ; C 248 ; WX 291 ; N lslash ; B -14 -3 306 726 ; C 249 ; WX 556 ; N oslash ; B 16 -23 530 474 ; C 250 ; WX 827 ; N oe ; B 32 -20 800 469 ; C 251 ; WX 556 ; N germandbls ; B 23 -9 519 731 ; C -1 ; WX 667 ; N Zcaron ; B 15 -3 638 908 ; C -1 ; WX 444 ; N ccedilla ; B 26 -225 413 469 ; C -1 ; WX 556 ; N ydieresis ; B 12 -283 544 657 ; C -1 ; WX 500 ; N atilde ; B 32 -12 471 652 ; C -1 ; WX 287 ; N icircumflex ; B -12 -3 300 697 ; C -1 ; WX 300 ; N threesuperior ; B 1 266 299 689 ; C -1 ; WX 479 ; N ecircumflex ; B 26 -20 448 697 ; C -1 ; WX 601 ; N thorn ; B -2 -281 544 726 ; C -1 ; WX 479 ; N egrave ; B 26 -20 448 697 ; C -1 ; WX 300 ; N twosuperior ; B 0 273 301 689 ; C -1 ; WX 479 ; N eacute ; B 26 -20 448 697 ; C -1 ; WX 546 ; N otilde ; B 32 -20 514 652 ; C -1 ; WX 778 ; N Aacute ; B 15 -3 756 908 ; C -1 ; WX 546 ; N ocircumflex ; B 32 -20 514 697 ; C -1 ; WX 556 ; N yacute ; B 12 -283 544 697 ; C -1 ; WX 603 ; N udieresis ; B 18 -12 581 657 ; C -1 ; WX 750 ; N threequarters ; B 15 -3 735 689 ; C -1 ; WX 500 ; N acircumflex ; B 32 -12 471 697 ; C -1 ; WX 774 ; N Eth ; B 14 -3 751 692 ; C -1 ; WX 479 ; N edieresis ; B 26 -20 448 657 ; C -1 ; WX 603 ; N ugrave ; B 18 -12 581 697 ; C -1 ; WX 979 ; N trademark ; B 40 285 939 689 ; C -1 ; WX 546 ; N ograve ; B 32 -20 514 697 ; C -1 ; WX 424 ; N scaron ; B 30 -20 391 685 ; C -1 ; WX 337 ; N Idieresis ; B 19 -3 318 868 ; C -1 ; WX 603 ; N uacute ; B 18 -12 581 697 ; C -1 ; WX 500 ; N agrave ; B 32 -12 471 697 ; C -1 ; WX 582 ; N ntilde ; B 6 -3 572 652 ; C -1 ; WX 500 ; N aring ; B 32 -12 471 716 ; C -1 ; WX 500 ; N zcaron ; B 16 -3 466 685 ; C -1 ; WX 337 ; N Icircumflex ; B 13 -3 325 908 ; C -1 ; WX 831 ; N Ntilde ; B 17 -20 813 871 ; C -1 ; WX 603 ; N ucircumflex ; B 18 -12 581 697 ; C -1 ; WX 611 ; N Ecircumflex ; B 22 -3 572 908 ; C -1 ; WX 337 ; N Iacute ; B 22 -3 315 908 ; C -1 ; WX 709 ; N Ccedilla ; B 22 -225 670 709 ; C -1 ; WX 786 ; N Odieresis ; B 22 -20 764 868 ; C -1 ; WX 525 ; N Scaron ; B 24 -20 503 908 ; C -1 ; WX 611 ; N Edieresis ; B 22 -3 572 868 ; C -1 ; WX 337 ; N Igrave ; B 22 -3 315 908 ; C -1 ; WX 500 ; N adieresis ; B 32 -12 471 657 ; C -1 ; WX 786 ; N Ograve ; B 22 -20 764 908 ; C -1 ; WX 611 ; N Egrave ; B 22 -3 572 908 ; C -1 ; WX 667 ; N Ydieresis ; B 9 -3 654 868 ; C -1 ; WX 747 ; N registered ; B 11 -18 736 706 ; C -1 ; WX 786 ; N Otilde ; B 22 -20 764 883 ; C -1 ; WX 750 ; N onequarter ; B 30 -3 727 692 ; C -1 ; WX 778 ; N Ugrave ; B 12 -20 759 908 ; C -1 ; WX 778 ; N Ucircumflex ; B 12 -20 759 908 ; C -1 ; WX 604 ; N Thorn ; B 32 -3 574 692 ; C -1 ; WX 606 ; N divide ; B 51 10 555 512 ; C -1 ; WX 778 ; N Atilde ; B 15 -3 756 871 ; C -1 ; WX 778 ; N Uacute ; B 12 -20 759 908 ; C -1 ; WX 786 ; N Ocircumflex ; B 22 -20 764 908 ; C -1 ; WX 606 ; N logicalnot ; B 51 120 551 386 ; C -1 ; WX 778 ; N Aring ; B 15 -3 756 927 ; C -1 ; WX 287 ; N idieresis ; B -6 -3 293 657 ; C -1 ; WX 287 ; N iacute ; B 21 -3 279 697 ; C -1 ; WX 500 ; N aacute ; B 32 -12 471 697 ; C -1 ; WX 606 ; N plusminus ; B 51 0 555 512 ; C -1 ; WX 606 ; N multiply ; B 83 36 523 474 ; C -1 ; WX 778 ; N Udieresis ; B 12 -20 759 868 ; C -1 ; WX 606 ; N minus ; B 51 233 555 289 ; C -1 ; WX 300 ; N onesuperior ; B 31 273 269 692 ; C -1 ; WX 611 ; N Eacute ; B 22 -3 572 908 ; C -1 ; WX 778 ; N Acircumflex ; B 15 -3 756 908 ; C -1 ; WX 747 ; N copyright ; B 11 -18 736 706 ; C -1 ; WX 778 ; N Agrave ; B 15 -3 756 908 ; C -1 ; WX 546 ; N odieresis ; B 32 -20 514 657 ; C -1 ; WX 546 ; N oacute ; B 32 -20 514 697 ; C -1 ; WX 400 ; N degree ; B 50 389 350 689 ; C -1 ; WX 287 ; N igrave ; B 8 -3 271 697 ; C -1 ; WX 603 ; N mu ; B 18 -236 581 469 ; C -1 ; WX 786 ; N Oacute ; B 22 -20 764 908 ; C -1 ; WX 546 ; N eth ; B 32 -20 504 728 ; C -1 ; WX 778 ; N Adieresis ; B 15 -3 756 868 ; C -1 ; WX 667 ; N Yacute ; B 9 -3 654 908 ; C -1 ; WX 606 ; N brokenbar ; B 275 0 331 726 ; C -1 ; WX 750 ; N onehalf ; B 15 -3 735 692 ; EndCharMetrics StartKernData StartKernPairs 111 KPX A y -74 KPX A w -74 KPX A v -92 KPX A space -55 KPX A quoteright -74 KPX A Y -111 KPX A W -74 KPX A V -111 KPX A T -74 KPX F period -92 KPX F comma -92 KPX F A -74 KPX L y -55 KPX L space -37 KPX L quoteright -74 KPX L Y -92 KPX L W -74 KPX L V -92 KPX L T -74 KPX P space -18 KPX P period -129 KPX P comma -129 KPX P A -92 KPX R y -37 KPX R Y -37 KPX R W -37 KPX R V -55 KPX R T -37 KPX T y -90 KPX T w -90 KPX T u -90 KPX T semicolon -55 KPX T s -90 KPX T r -90 KPX T period -74 KPX T o -92 KPX T i -55 KPX T hyphen -55 KPX T e -92 KPX T comma -74 KPX T colon -55 KPX T c -111 KPX T a -92 KPX T O -18 KPX T A -74 KPX V y -92 KPX V u -92 KPX V semicolon -55 KPX V r -92 KPX V period -129 KPX V o -111 KPX V i -55 KPX V hyphen -74 KPX V e -111 KPX V comma -129 KPX V colon -55 KPX V a -92 KPX V A -111 KPX W y -50 KPX W u -50 KPX W semicolon -18 KPX W r -74 KPX W period -92 KPX W o -92 KPX W i -55 KPX W hyphen -55 KPX W e -92 KPX W comma -92 KPX W colon -18 KPX W a -92 KPX W A -92 KPX Y v -90 KPX Y u -90 KPX Y space -18 KPX Y semicolon -74 KPX Y q -90 KPX Y period -111 KPX Y p -111 KPX Y o -92 KPX Y i -55 KPX Y hyphen -92 KPX Y e -92 KPX Y comma -111 KPX Y colon -74 KPX Y a -92 KPX Y A -92 KPX f quoteright 55 KPX f f -18 KPX one one -55 KPX quoteleft quoteleft -37 KPX quoteright quoteright -37 KPX r u -8 KPX r quoteright 74 KPX r q -18 KPX r period -74 KPX r o -18 KPX r hyphen -18 KPX r h -18 KPX r g -18 KPX r e -18 KPX r d -18 KPX r comma -74 KPX r c -18 KPX space Y -18 KPX space A -37 KPX v period -111 KPX v comma -111 KPX w period -92 KPX w comma -92 KPX y period -111 KPX y comma -111 EndKernPairs EndKernData StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 229 231 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 223 231 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 223 231 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 215 231 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 223 231 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 223 231 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 188 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 139 231 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 139 231 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 139 231 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 139 231 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 2 231 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 2 231 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 2 231 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 2 231 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 249 231 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 227 231 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 227 231 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 227 231 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 227 231 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 227 243 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 96 231 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 255 231 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 247 231 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 223 231 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 223 231 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 203 231 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 191 231 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 179 231 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 84 20 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 72 20 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 72 20 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 60 20 ; CC aring 2 ; PCC a 0 0 ; PCC ring 72 20 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 72 12 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 56 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 97 20 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 85 20 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 73 20 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 73 20 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -23 20 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -23 20 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -23 20 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -23 20 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 113 12 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 107 20 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 107 20 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 107 20 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 95 20 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 107 12 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 46 8 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 159 20 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 135 20 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 135 20 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 111 20 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 144 20 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 112 20 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 84 8 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pplri8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Mon Jul 2 22:37:33 1990 Comment UniqueID 31796 Comment VMusage 37415 48307 FontName Palatino-Italic FullName Palatino Italic FamilyName Palatino Weight Medium ItalicAngle -10 IsFixedPitch false FontBBox -170 -276 1010 918 UnderlinePosition -100 UnderlineThickness 50 Version 001.005 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved.Palatino is a trademark of Linotype AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 692 XHeight 482 Ascender 733 Descender -276 StartCharMetrics 228 C 32 ; WX 250 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 76 -8 292 733 ; C 34 ; WX 500 ; N quotedbl ; B 140 508 455 733 ; C 35 ; WX 500 ; N numbersign ; B 4 0 495 692 ; C 36 ; WX 500 ; N dollar ; B 15 -113 452 733 ; C 37 ; WX 889 ; N percent ; B 74 -7 809 710 ; C 38 ; WX 778 ; N ampersand ; B 47 -18 766 692 ; C 39 ; WX 278 ; N quoteright ; B 78 488 258 733 ; C 40 ; WX 333 ; N parenleft ; B 54 -106 331 733 ; C 41 ; WX 333 ; N parenright ; B 2 -106 279 733 ; C 42 ; WX 389 ; N asterisk ; B 76 368 400 706 ; C 43 ; WX 606 ; N plus ; B 51 0 555 504 ; C 44 ; WX 250 ; N comma ; B 8 -143 203 123 ; C 45 ; WX 333 ; N hyphen ; B 19 223 304 281 ; C 46 ; WX 250 ; N period ; B 53 -5 158 112 ; C 47 ; WX 296 ; N slash ; B -40 -119 392 733 ; C 48 ; WX 500 ; N zero ; B 36 -11 480 699 ; C 49 ; WX 500 ; N one ; B 54 -3 398 699 ; C 50 ; WX 500 ; N two ; B 12 -3 437 699 ; C 51 ; WX 500 ; N three ; B 22 -11 447 699 ; C 52 ; WX 500 ; N four ; B 15 -3 478 699 ; C 53 ; WX 500 ; N five ; B 14 -11 491 693 ; C 54 ; WX 500 ; N six ; B 49 -11 469 699 ; C 55 ; WX 500 ; N seven ; B 53 -3 502 692 ; C 56 ; WX 500 ; N eight ; B 36 -11 469 699 ; C 57 ; WX 500 ; N nine ; B 32 -11 468 699 ; C 58 ; WX 250 ; N colon ; B 44 -5 207 458 ; C 59 ; WX 250 ; N semicolon ; B -9 -146 219 456 ; C 60 ; WX 606 ; N less ; B 53 -6 554 516 ; C 61 ; WX 606 ; N equal ; B 51 126 555 378 ; C 62 ; WX 606 ; N greater ; B 53 -6 554 516 ; C 63 ; WX 500 ; N question ; B 114 -8 427 706 ; C 64 ; WX 747 ; N at ; B 27 -18 718 706 ; C 65 ; WX 722 ; N A ; B -19 -3 677 705 ; C 66 ; WX 611 ; N B ; B 26 -6 559 692 ; C 67 ; WX 667 ; N C ; B 45 -18 651 706 ; C 68 ; WX 778 ; N D ; B 28 -3 741 692 ; C 69 ; WX 611 ; N E ; B 30 -3 570 692 ; C 70 ; WX 556 ; N F ; B 0 -3 548 692 ; C 71 ; WX 722 ; N G ; B 50 -18 694 706 ; C 72 ; WX 778 ; N H ; B -3 -3 800 692 ; C 73 ; WX 333 ; N I ; B 7 -3 354 692 ; C 74 ; WX 333 ; N J ; B -35 -206 358 692 ; C 75 ; WX 667 ; N K ; B 13 -3 683 692 ; C 76 ; WX 556 ; N L ; B 16 -3 523 692 ; C 77 ; WX 944 ; N M ; B -19 -18 940 692 ; C 78 ; WX 778 ; N N ; B 2 -11 804 692 ; C 79 ; WX 778 ; N O ; B 53 -18 748 706 ; C 80 ; WX 611 ; N P ; B 9 -3 594 692 ; C 81 ; WX 778 ; N Q ; B 53 -201 748 706 ; C 82 ; WX 667 ; N R ; B 9 -3 639 692 ; C 83 ; WX 556 ; N S ; B 42 -18 506 706 ; C 84 ; WX 611 ; N T ; B 53 -3 635 692 ; C 85 ; WX 778 ; N U ; B 88 -18 798 692 ; C 86 ; WX 722 ; N V ; B 75 -8 754 692 ; C 87 ; WX 944 ; N W ; B 71 -8 980 700 ; C 88 ; WX 722 ; N X ; B 20 -3 734 692 ; C 89 ; WX 667 ; N Y ; B 52 -3 675 705 ; C 90 ; WX 667 ; N Z ; B 20 -3 637 692 ; C 91 ; WX 333 ; N bracketleft ; B 18 -100 326 733 ; C 92 ; WX 606 ; N backslash ; B 81 0 513 733 ; C 93 ; WX 333 ; N bracketright ; B 7 -100 315 733 ; C 94 ; WX 606 ; N asciicircum ; B 51 283 554 689 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 278 ; N quoteleft ; B 78 488 258 733 ; C 97 ; WX 444 ; N a ; B 4 -11 406 482 ; C 98 ; WX 463 ; N b ; B 37 -11 433 733 ; C 99 ; WX 407 ; N c ; B 25 -11 389 482 ; C 100 ; WX 500 ; N d ; B 17 -11 483 733 ; C 101 ; WX 389 ; N e ; B 15 -11 374 482 ; C 102 ; WX 278 ; N f ; B -162 -276 413 733 ; L i fi ; L l fl ; C 103 ; WX 500 ; N g ; B -37 -276 498 482 ; C 104 ; WX 500 ; N h ; B 10 -9 471 733 ; C 105 ; WX 278 ; N i ; B 34 -9 264 712 ; C 106 ; WX 278 ; N j ; B -70 -276 265 712 ; C 107 ; WX 444 ; N k ; B 8 -9 449 733 ; C 108 ; WX 278 ; N l ; B 36 -9 251 733 ; C 109 ; WX 778 ; N m ; B 24 -9 740 482 ; C 110 ; WX 556 ; N n ; B 24 -9 514 482 ; C 111 ; WX 444 ; N o ; B 17 -11 411 482 ; C 112 ; WX 500 ; N p ; B -7 -276 465 482 ; C 113 ; WX 463 ; N q ; B 24 -276 432 482 ; C 114 ; WX 389 ; N r ; B 26 -9 384 482 ; C 115 ; WX 389 ; N s ; B 9 -11 345 482 ; C 116 ; WX 333 ; N t ; B 41 -9 310 646 ; C 117 ; WX 556 ; N u ; B 32 -11 512 482 ; C 118 ; WX 500 ; N v ; B 21 -11 477 482 ; C 119 ; WX 722 ; N w ; B 21 -11 699 482 ; C 120 ; WX 500 ; N x ; B 9 -11 484 482 ; C 121 ; WX 500 ; N y ; B -8 -276 490 482 ; C 122 ; WX 444 ; N z ; B -1 -11 416 482 ; C 123 ; WX 333 ; N braceleft ; B 15 -100 319 733 ; C 124 ; WX 606 ; N bar ; B 275 0 331 733 ; C 125 ; WX 333 ; N braceright ; B 14 -100 318 733 ; C 126 ; WX 606 ; N asciitilde ; B 51 168 555 339 ; C 161 ; WX 333 ; N exclamdown ; B 15 -276 233 467 ; C 162 ; WX 500 ; N cent ; B 56 -96 418 551 ; C 163 ; WX 500 ; N sterling ; B 2 -18 479 708 ; C 164 ; WX 167 ; N fraction ; B -170 0 337 699 ; C 165 ; WX 500 ; N yen ; B 35 -3 512 699 ; C 166 ; WX 500 ; N florin ; B 5 -276 470 708 ; C 167 ; WX 500 ; N section ; B 14 -220 463 706 ; C 168 ; WX 500 ; N currency ; B 14 115 486 577 ; C 169 ; WX 333 ; N quotesingle ; B 140 508 288 733 ; C 170 ; WX 500 ; N quotedblleft ; B 98 488 475 733 ; C 171 ; WX 500 ; N guillemotleft ; B 57 70 437 440 ; C 172 ; WX 333 ; N guilsinglleft ; B 57 70 270 440 ; C 173 ; WX 333 ; N guilsinglright ; B 63 70 276 440 ; C 174 ; WX 528 ; N fi ; B -162 -276 502 733 ; C 175 ; WX 545 ; N fl ; B -162 -276 520 733 ; C 177 ; WX 500 ; N endash ; B -10 228 510 278 ; C 178 ; WX 500 ; N dagger ; B 48 0 469 692 ; C 179 ; WX 500 ; N daggerdbl ; B 10 -162 494 692 ; C 180 ; WX 250 ; N periodcentered ; B 53 195 158 312 ; C 182 ; WX 500 ; N paragraph ; B 33 -224 611 692 ; C 183 ; WX 500 ; N bullet ; B 86 182 430 526 ; C 184 ; WX 278 ; N quotesinglbase ; B 27 -122 211 120 ; C 185 ; WX 500 ; N quotedblbase ; B 43 -122 424 120 ; C 186 ; WX 500 ; N quotedblright ; B 98 488 475 733 ; C 187 ; WX 500 ; N guillemotright ; B 63 70 443 440 ; C 188 ; WX 1000 ; N ellipsis ; B 102 -5 873 112 ; C 189 ; WX 1000 ; N perthousand ; B 72 -6 929 717 ; C 191 ; WX 500 ; N questiondown ; B 57 -246 370 467 ; C 193 ; WX 333 ; N grave ; B 86 518 310 687 ; C 194 ; WX 333 ; N acute ; B 122 518 346 687 ; C 195 ; WX 333 ; N circumflex ; B 56 510 350 679 ; C 196 ; WX 333 ; N tilde ; B 63 535 390 638 ; C 197 ; WX 333 ; N macron ; B 74 538 386 589 ; C 198 ; WX 333 ; N breve ; B 92 518 393 677 ; C 199 ; WX 333 ; N dotaccent ; B 175 537 283 645 ; C 200 ; WX 333 ; N dieresis ; B 78 537 378 637 ; C 202 ; WX 333 ; N ring ; B 159 508 359 708 ; C 203 ; WX 333 ; N cedilla ; B -9 -216 202 0 ; C 205 ; WX 333 ; N hungarumlaut ; B 46 518 385 730 ; C 206 ; WX 333 ; N ogonek ; B 38 -207 196 -18 ; C 207 ; WX 333 ; N caron ; B 104 510 409 679 ; C 208 ; WX 1000 ; N emdash ; B -10 228 1010 278 ; C 225 ; WX 941 ; N AE ; B -4 -3 902 692 ; C 227 ; WX 333 ; N ordfeminine ; B 60 404 321 699 ; C 232 ; WX 556 ; N Lslash ; B -16 -3 523 692 ; C 233 ; WX 778 ; N Oslash ; B 32 -39 762 721 ; C 234 ; WX 1028 ; N OE ; B 56 -18 989 706 ; C 235 ; WX 333 ; N ordmasculine ; B 66 404 322 699 ; C 241 ; WX 638 ; N ae ; B 1 -11 623 482 ; C 245 ; WX 278 ; N dotlessi ; B 34 -9 241 482 ; C 248 ; WX 278 ; N lslash ; B -10 -9 302 733 ; C 249 ; WX 444 ; N oslash ; B -18 -24 460 510 ; C 250 ; WX 669 ; N oe ; B 17 -11 654 482 ; C 251 ; WX 500 ; N germandbls ; B -160 -276 488 733 ; C -1 ; WX 667 ; N Zcaron ; B 20 -3 637 907 ; C -1 ; WX 407 ; N ccedilla ; B 25 -216 389 482 ; C -1 ; WX 500 ; N ydieresis ; B -8 -276 490 657 ; C -1 ; WX 444 ; N atilde ; B 4 -11 446 650 ; C -1 ; WX 278 ; N icircumflex ; B 29 -9 323 699 ; C -1 ; WX 300 ; N threesuperior ; B 28 273 304 699 ; C -1 ; WX 389 ; N ecircumflex ; B 15 -11 398 699 ; C -1 ; WX 500 ; N thorn ; B -39 -276 433 733 ; C -1 ; WX 389 ; N egrave ; B 15 -11 374 707 ; C -1 ; WX 300 ; N twosuperior ; B 13 278 290 699 ; C -1 ; WX 389 ; N eacute ; B 15 -11 394 707 ; C -1 ; WX 444 ; N otilde ; B 17 -11 446 650 ; C -1 ; WX 722 ; N Aacute ; B -19 -3 677 897 ; C -1 ; WX 444 ; N ocircumflex ; B 17 -11 411 699 ; C -1 ; WX 500 ; N yacute ; B -8 -276 490 707 ; C -1 ; WX 556 ; N udieresis ; B 32 -11 512 657 ; C -1 ; WX 750 ; N threequarters ; B 35 -2 715 699 ; C -1 ; WX 444 ; N acircumflex ; B 4 -11 406 699 ; C -1 ; WX 778 ; N Eth ; B 19 -3 741 692 ; C -1 ; WX 389 ; N edieresis ; B 15 -11 406 657 ; C -1 ; WX 556 ; N ugrave ; B 32 -11 512 707 ; C -1 ; WX 1000 ; N trademark ; B 52 285 951 689 ; C -1 ; WX 444 ; N ograve ; B 17 -11 411 707 ; C -1 ; WX 389 ; N scaron ; B 9 -11 419 687 ; C -1 ; WX 333 ; N Idieresis ; B 7 -3 418 847 ; C -1 ; WX 556 ; N uacute ; B 32 -11 512 707 ; C -1 ; WX 444 ; N agrave ; B 4 -11 406 707 ; C -1 ; WX 556 ; N ntilde ; B 24 -9 514 650 ; C -1 ; WX 444 ; N aring ; B 4 -11 406 728 ; C -1 ; WX 444 ; N zcaron ; B -1 -11 447 687 ; C -1 ; WX 333 ; N Icircumflex ; B 7 -3 390 889 ; C -1 ; WX 778 ; N Ntilde ; B 2 -11 804 866 ; C -1 ; WX 556 ; N ucircumflex ; B 32 -11 512 699 ; C -1 ; WX 611 ; N Ecircumflex ; B 30 -3 570 889 ; C -1 ; WX 333 ; N Iacute ; B 7 -3 406 897 ; C -1 ; WX 667 ; N Ccedilla ; B 45 -216 651 706 ; C -1 ; WX 778 ; N Odieresis ; B 53 -18 748 847 ; C -1 ; WX 556 ; N Scaron ; B 42 -18 539 907 ; C -1 ; WX 611 ; N Edieresis ; B 30 -3 570 847 ; C -1 ; WX 333 ; N Igrave ; B 7 -3 354 897 ; C -1 ; WX 444 ; N adieresis ; B 4 -11 434 657 ; C -1 ; WX 778 ; N Ograve ; B 53 -18 748 897 ; C -1 ; WX 611 ; N Egrave ; B 30 -3 570 897 ; C -1 ; WX 667 ; N Ydieresis ; B 52 -3 675 847 ; C -1 ; WX 747 ; N registered ; B 11 -18 736 706 ; C -1 ; WX 778 ; N Otilde ; B 53 -18 748 866 ; C -1 ; WX 750 ; N onequarter ; B 31 -2 715 699 ; C -1 ; WX 778 ; N Ugrave ; B 88 -18 798 897 ; C -1 ; WX 778 ; N Ucircumflex ; B 88 -18 798 889 ; C -1 ; WX 611 ; N Thorn ; B 9 -3 570 692 ; C -1 ; WX 606 ; N divide ; B 51 0 555 504 ; C -1 ; WX 722 ; N Atilde ; B -19 -3 677 866 ; C -1 ; WX 778 ; N Uacute ; B 88 -18 798 897 ; C -1 ; WX 778 ; N Ocircumflex ; B 53 -18 748 889 ; C -1 ; WX 606 ; N logicalnot ; B 51 118 555 378 ; C -1 ; WX 722 ; N Aring ; B -19 -3 677 918 ; C -1 ; WX 278 ; N idieresis ; B 34 -9 351 657 ; C -1 ; WX 278 ; N iacute ; B 34 -9 331 707 ; C -1 ; WX 444 ; N aacute ; B 4 -11 414 707 ; C -1 ; WX 606 ; N plusminus ; B 51 0 555 504 ; C -1 ; WX 606 ; N multiply ; B 83 36 523 474 ; C -1 ; WX 778 ; N Udieresis ; B 88 -18 798 847 ; C -1 ; WX 606 ; N minus ; B 51 224 555 280 ; C -1 ; WX 300 ; N onesuperior ; B 61 278 285 699 ; C -1 ; WX 611 ; N Eacute ; B 30 -3 570 897 ; C -1 ; WX 722 ; N Acircumflex ; B -19 -3 677 889 ; C -1 ; WX 747 ; N copyright ; B 11 -18 736 706 ; C -1 ; WX 722 ; N Agrave ; B -19 -3 677 897 ; C -1 ; WX 444 ; N odieresis ; B 17 -11 434 657 ; C -1 ; WX 444 ; N oacute ; B 17 -11 414 707 ; C -1 ; WX 400 ; N degree ; B 90 389 390 689 ; C -1 ; WX 278 ; N igrave ; B 34 -9 271 707 ; C -1 ; WX 556 ; N mu ; B 15 -226 512 482 ; C -1 ; WX 778 ; N Oacute ; B 53 -18 748 897 ; C -1 ; WX 444 ; N eth ; B 17 -11 478 733 ; C -1 ; WX 722 ; N Adieresis ; B -19 -3 677 847 ; C -1 ; WX 667 ; N Yacute ; B 52 -3 675 897 ; C -1 ; WX 606 ; N brokenbar ; B 275 0 331 733 ; C -1 ; WX 750 ; N onehalf ; B 31 -2 721 699 ; EndCharMetrics StartKernData StartKernPairs 106 KPX A y -55 KPX A w -37 KPX A v -37 KPX A space -37 KPX A quoteright -55 KPX A Y -55 KPX A W -55 KPX A V -74 KPX A T -55 KPX F period -111 KPX F comma -111 KPX F A -111 KPX L y -37 KPX L space -18 KPX L quoteright -37 KPX L Y -74 KPX L W -74 KPX L V -74 KPX L T -74 KPX P period -129 KPX P comma -129 KPX P A -129 KPX R y -37 KPX R Y -55 KPX R W -55 KPX R V -74 KPX R T -55 KPX T y -92 KPX T w -92 KPX T u -111 KPX T semicolon -74 KPX T s -111 KPX T r -111 KPX T period -74 KPX T o -111 KPX T i -55 KPX T hyphen -55 KPX T e -111 KPX T comma -74 KPX T colon -74 KPX T c -111 KPX T a -111 KPX T O -18 KPX T A -92 KPX V y -74 KPX V u -74 KPX V semicolon -37 KPX V r -92 KPX V period -129 KPX V o -74 KPX V i -74 KPX V hyphen -55 KPX V e -92 KPX V comma -129 KPX V colon -37 KPX V a -74 KPX V A -210 KPX W y -20 KPX W u -20 KPX W semicolon -18 KPX W r -20 KPX W period -55 KPX W o -20 KPX W i -20 KPX W hyphen -18 KPX W e -20 KPX W comma -55 KPX W colon -18 KPX W a -20 KPX W A -92 KPX Y v -74 KPX Y u -92 KPX Y semicolon -74 KPX Y q -92 KPX Y period -92 KPX Y p -74 KPX Y o -111 KPX Y i -55 KPX Y hyphen -74 KPX Y e -111 KPX Y comma -92 KPX Y colon -74 KPX Y a -92 KPX Y A -92 KPX f quoteright 55 KPX one one -55 KPX quoteleft quoteleft -74 KPX quoteright t -37 KPX quoteright space -55 KPX quoteright s -55 KPX quoteright quoteright -74 KPX r quoteright 37 KPX r q -18 KPX r period -74 KPX r o -18 KPX r h -18 KPX r g -18 KPX r e -18 KPX r comma -74 KPX r c -18 KPX v period -55 KPX v comma -55 KPX w period -55 KPX w comma -55 KPX y period -37 KPX y comma -37 EndKernPairs EndKernData StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 271 210 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 261 210 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 255 210 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 235 210 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 235 210 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 255 228 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 207 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 199 210 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 179 210 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 179 210 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 167 210 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 60 210 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 40 210 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 40 210 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 28 210 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 263 228 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 283 210 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 263 210 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 255 210 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 251 210 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 263 228 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 130 228 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 277 210 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 255 210 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 235 210 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 235 210 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 227 210 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 187 210 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 179 228 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 68 20 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 56 20 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 56 20 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 44 20 ; CC aring 2 ; PCC a 0 0 ; PCC ring 36 20 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 56 12 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 37 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 48 20 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 48 20 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 28 20 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 16 20 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -15 20 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 20 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 20 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -39 20 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 112 12 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 68 20 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 56 20 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 56 20 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 36 20 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 56 12 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 10 8 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 124 20 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 112 20 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 112 20 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 100 20 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 96 20 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 20 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 38 8 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/psyr.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All rights reserved. Comment Creation Date: Wed Jan 17 21:48:26 1990 Comment UniqueID 27004 Comment VMusage 28489 37622 FontName Symbol FullName Symbol FamilyName Symbol Weight Medium ItalicAngle 0 IsFixedPitch false FontBBox -180 -293 1090 1010 UnderlinePosition -98 UnderlineThickness 54 Version 001.007 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All rights reserved. EncodingScheme FontSpecific StartCharMetrics 189 C 32 ; WX 250 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 128 -17 240 672 ; C 34 ; WX 713 ; N universal ; B 31 0 681 705 ; C 35 ; WX 500 ; N numbersign ; B 20 -16 481 673 ; C 36 ; WX 549 ; N existential ; B 25 0 478 707 ; C 37 ; WX 833 ; N percent ; B 63 -36 771 655 ; C 38 ; WX 778 ; N ampersand ; B 41 -18 750 661 ; C 39 ; WX 439 ; N suchthat ; B 48 -17 414 500 ; C 40 ; WX 333 ; N parenleft ; B 53 -191 300 673 ; C 41 ; WX 333 ; N parenright ; B 30 -191 277 673 ; C 42 ; WX 500 ; N asteriskmath ; B 65 134 427 551 ; C 43 ; WX 549 ; N plus ; B 10 0 539 533 ; C 44 ; WX 250 ; N comma ; B 56 -152 194 104 ; C 45 ; WX 549 ; N minus ; B 11 233 535 288 ; C 46 ; WX 250 ; N period ; B 69 -17 181 95 ; C 47 ; WX 278 ; N slash ; B 0 -18 254 646 ; C 48 ; WX 500 ; N zero ; B 23 -17 471 685 ; C 49 ; WX 500 ; N one ; B 117 0 390 673 ; C 50 ; WX 500 ; N two ; B 25 0 475 686 ; C 51 ; WX 500 ; N three ; B 39 -17 435 685 ; C 52 ; WX 500 ; N four ; B 16 0 469 685 ; C 53 ; WX 500 ; N five ; B 29 -17 443 685 ; C 54 ; WX 500 ; N six ; B 36 -17 467 685 ; C 55 ; WX 500 ; N seven ; B 24 -16 448 673 ; C 56 ; WX 500 ; N eight ; B 54 -18 440 685 ; C 57 ; WX 500 ; N nine ; B 31 -18 460 685 ; C 58 ; WX 278 ; N colon ; B 81 -17 193 460 ; C 59 ; WX 278 ; N semicolon ; B 83 -152 221 460 ; C 60 ; WX 549 ; N less ; B 26 0 523 522 ; C 61 ; WX 549 ; N equal ; B 11 141 537 390 ; C 62 ; WX 549 ; N greater ; B 26 0 523 522 ; C 63 ; WX 444 ; N question ; B 70 -17 412 686 ; C 64 ; WX 549 ; N congruent ; B 11 0 537 475 ; C 65 ; WX 722 ; N Alpha ; B 4 0 684 673 ; C 66 ; WX 667 ; N Beta ; B 29 0 592 673 ; C 67 ; WX 722 ; N Chi ; B -9 0 704 673 ; C 68 ; WX 612 ; N Delta ; B 6 0 608 688 ; C 69 ; WX 611 ; N Epsilon ; B 32 0 617 673 ; C 70 ; WX 763 ; N Phi ; B 26 0 741 673 ; C 71 ; WX 603 ; N Gamma ; B 24 0 609 673 ; C 72 ; WX 722 ; N Eta ; B 39 0 729 673 ; C 73 ; WX 333 ; N Iota ; B 32 0 316 673 ; C 74 ; WX 631 ; N theta1 ; B 18 -18 623 689 ; C 75 ; WX 722 ; N Kappa ; B 35 0 722 673 ; C 76 ; WX 686 ; N Lambda ; B 6 0 680 688 ; C 77 ; WX 889 ; N Mu ; B 28 0 887 673 ; C 78 ; WX 722 ; N Nu ; B 29 -8 720 673 ; C 79 ; WX 722 ; N Omicron ; B 41 -17 715 685 ; C 80 ; WX 768 ; N Pi ; B 25 0 745 673 ; C 81 ; WX 741 ; N Theta ; B 41 -17 715 685 ; C 82 ; WX 556 ; N Rho ; B 28 0 563 673 ; C 83 ; WX 592 ; N Sigma ; B 5 0 589 673 ; C 84 ; WX 611 ; N Tau ; B 33 0 607 673 ; C 85 ; WX 690 ; N Upsilon ; B -8 0 694 673 ; C 86 ; WX 439 ; N sigma1 ; B 40 -233 436 500 ; C 87 ; WX 768 ; N Omega ; B 34 0 736 688 ; C 88 ; WX 645 ; N Xi ; B 40 0 599 673 ; C 89 ; WX 795 ; N Psi ; B 15 0 781 684 ; C 90 ; WX 611 ; N Zeta ; B 44 0 636 673 ; C 91 ; WX 333 ; N bracketleft ; B 86 -155 299 674 ; C 92 ; WX 863 ; N therefore ; B 163 0 701 478 ; C 93 ; WX 333 ; N bracketright ; B 33 -155 246 674 ; C 94 ; WX 658 ; N perpendicular ; B 15 0 652 674 ; C 95 ; WX 500 ; N underscore ; B -2 -252 502 -206 ; C 96 ; WX 500 ; N radicalex ; B 480 881 1090 917 ; C 97 ; WX 631 ; N alpha ; B 41 -18 622 500 ; C 98 ; WX 549 ; N beta ; B 61 -223 515 741 ; C 99 ; WX 549 ; N chi ; B 12 -231 522 499 ; C 100 ; WX 494 ; N delta ; B 40 -19 481 740 ; C 101 ; WX 439 ; N epsilon ; B 22 -19 427 502 ; C 102 ; WX 521 ; N phi ; B 27 -224 490 671 ; C 103 ; WX 411 ; N gamma ; B 5 -225 484 499 ; C 104 ; WX 603 ; N eta ; B 0 -202 527 514 ; C 105 ; WX 329 ; N iota ; B 0 -17 301 503 ; C 106 ; WX 603 ; N phi1 ; B 36 -224 587 499 ; C 107 ; WX 549 ; N kappa ; B 33 0 558 501 ; C 108 ; WX 549 ; N lambda ; B 24 -17 548 739 ; C 109 ; WX 576 ; N mu ; B 33 -223 567 500 ; C 110 ; WX 521 ; N nu ; B -9 -16 475 507 ; C 111 ; WX 549 ; N omicron ; B 35 -19 501 499 ; C 112 ; WX 549 ; N pi ; B 10 -19 530 487 ; C 113 ; WX 521 ; N theta ; B 43 -17 485 690 ; C 114 ; WX 549 ; N rho ; B 50 -230 490 499 ; C 115 ; WX 603 ; N sigma ; B 30 -21 588 500 ; C 116 ; WX 439 ; N tau ; B 10 -19 418 500 ; C 117 ; WX 576 ; N upsilon ; B 7 -18 535 507 ; C 118 ; WX 713 ; N omega1 ; B 12 -18 671 583 ; C 119 ; WX 686 ; N omega ; B 42 -17 684 500 ; C 120 ; WX 493 ; N xi ; B 27 -224 469 766 ; C 121 ; WX 686 ; N psi ; B 12 -228 701 500 ; C 122 ; WX 494 ; N zeta ; B 60 -225 467 756 ; C 123 ; WX 480 ; N braceleft ; B 58 -183 397 673 ; C 124 ; WX 200 ; N bar ; B 65 -177 135 673 ; C 125 ; WX 480 ; N braceright ; B 79 -183 418 673 ; C 126 ; WX 549 ; N similar ; B 17 203 529 307 ; C 161 ; WX 620 ; N Upsilon1 ; B -2 0 610 685 ; C 162 ; WX 247 ; N minute ; B 27 459 228 735 ; C 163 ; WX 549 ; N lessequal ; B 29 0 526 639 ; C 164 ; WX 167 ; N fraction ; B -180 -12 340 677 ; C 165 ; WX 713 ; N infinity ; B 26 124 688 404 ; C 166 ; WX 500 ; N florin ; B 2 -193 494 686 ; C 167 ; WX 753 ; N club ; B 86 -26 660 533 ; C 168 ; WX 753 ; N diamond ; B 142 -36 600 550 ; C 169 ; WX 753 ; N heart ; B 117 -33 631 532 ; C 170 ; WX 753 ; N spade ; B 113 -36 629 548 ; C 171 ; WX 1042 ; N arrowboth ; B 24 -15 1024 511 ; C 172 ; WX 987 ; N arrowleft ; B 32 -15 942 511 ; C 173 ; WX 603 ; N arrowup ; B 45 0 571 910 ; C 174 ; WX 987 ; N arrowright ; B 49 -15 959 511 ; C 175 ; WX 603 ; N arrowdown ; B 45 -22 571 888 ; C 176 ; WX 400 ; N degree ; B 50 385 350 685 ; C 177 ; WX 549 ; N plusminus ; B 10 0 539 645 ; C 178 ; WX 411 ; N second ; B 20 459 413 737 ; C 179 ; WX 549 ; N greaterequal ; B 29 0 526 639 ; C 180 ; WX 549 ; N multiply ; B 17 8 533 524 ; C 181 ; WX 713 ; N proportional ; B 27 123 639 404 ; C 182 ; WX 494 ; N partialdiff ; B 26 -20 462 746 ; C 183 ; WX 460 ; N bullet ; B 50 113 410 473 ; C 184 ; WX 549 ; N divide ; B 10 71 536 456 ; C 185 ; WX 549 ; N notequal ; B 15 -25 540 549 ; C 186 ; WX 549 ; N equivalence ; B 14 82 538 443 ; C 187 ; WX 549 ; N approxequal ; B 14 135 527 394 ; C 188 ; WX 1000 ; N ellipsis ; B 111 -17 889 95 ; C 189 ; WX 603 ; N arrowvertex ; B 280 -120 336 1010 ; C 190 ; WX 1000 ; N arrowhorizex ; B -60 220 1050 276 ; C 191 ; WX 658 ; N carriagereturn ; B 15 -16 602 629 ; C 192 ; WX 823 ; N aleph ; B 175 -18 661 658 ; C 193 ; WX 686 ; N Ifraktur ; B 10 -53 578 740 ; C 194 ; WX 795 ; N Rfraktur ; B 26 -15 759 734 ; C 195 ; WX 987 ; N weierstrass ; B 159 -211 870 573 ; C 196 ; WX 768 ; N circlemultiply ; B 43 -17 733 673 ; C 197 ; WX 768 ; N circleplus ; B 43 -15 733 675 ; C 198 ; WX 823 ; N emptyset ; B 39 -24 781 719 ; C 199 ; WX 768 ; N intersection ; B 40 0 732 509 ; C 200 ; WX 768 ; N union ; B 40 -17 732 492 ; C 201 ; WX 713 ; N propersuperset ; B 20 0 673 470 ; C 202 ; WX 713 ; N reflexsuperset ; B 20 -125 673 470 ; C 203 ; WX 713 ; N notsubset ; B 36 -70 690 540 ; C 204 ; WX 713 ; N propersubset ; B 37 0 690 470 ; C 205 ; WX 713 ; N reflexsubset ; B 37 -125 690 470 ; C 206 ; WX 713 ; N element ; B 45 0 505 468 ; C 207 ; WX 713 ; N notelement ; B 45 -58 505 555 ; C 208 ; WX 768 ; N angle ; B 26 0 738 673 ; C 209 ; WX 713 ; N gradient ; B 36 -19 681 718 ; C 210 ; WX 790 ; N registerserif ; B 50 -17 740 673 ; C 211 ; WX 790 ; N copyrightserif ; B 51 -15 741 675 ; C 212 ; WX 890 ; N trademarkserif ; B 18 293 855 673 ; C 213 ; WX 823 ; N product ; B 25 -101 803 751 ; C 214 ; WX 549 ; N radical ; B 10 -38 515 917 ; C 215 ; WX 250 ; N dotmath ; B 69 210 169 310 ; C 216 ; WX 713 ; N logicalnot ; B 15 0 680 288 ; C 217 ; WX 603 ; N logicaland ; B 23 0 583 454 ; C 218 ; WX 603 ; N logicalor ; B 30 0 578 477 ; C 219 ; WX 1042 ; N arrowdblboth ; B 27 -20 1023 510 ; C 220 ; WX 987 ; N arrowdblleft ; B 30 -15 939 513 ; C 221 ; WX 603 ; N arrowdblup ; B 39 2 567 911 ; C 222 ; WX 987 ; N arrowdblright ; B 45 -20 954 508 ; C 223 ; WX 603 ; N arrowdbldown ; B 44 -19 572 890 ; C 224 ; WX 494 ; N lozenge ; B 18 0 466 745 ; C 225 ; WX 329 ; N angleleft ; B 25 -198 306 746 ; C 226 ; WX 790 ; N registersans ; B 50 -20 740 670 ; C 227 ; WX 790 ; N copyrightsans ; B 49 -15 739 675 ; C 228 ; WX 786 ; N trademarksans ; B 5 293 725 673 ; C 229 ; WX 713 ; N summation ; B 14 -108 695 752 ; C 230 ; WX 384 ; N parenlefttp ; B 40 -293 436 926 ; C 231 ; WX 384 ; N parenleftex ; B 40 -85 92 925 ; C 232 ; WX 384 ; N parenleftbt ; B 40 -293 436 926 ; C 233 ; WX 384 ; N bracketlefttp ; B 0 -80 341 926 ; C 234 ; WX 384 ; N bracketleftex ; B 0 -79 55 925 ; C 235 ; WX 384 ; N bracketleftbt ; B 0 -80 340 926 ; C 236 ; WX 494 ; N bracelefttp ; B 201 -75 439 926 ; C 237 ; WX 494 ; N braceleftmid ; B 14 -85 255 935 ; C 238 ; WX 494 ; N braceleftbt ; B 201 -70 439 926 ; C 239 ; WX 494 ; N braceex ; B 201 -80 255 935 ; C 241 ; WX 329 ; N angleright ; B 21 -198 302 746 ; C 242 ; WX 274 ; N integral ; B 2 -107 291 916 ; C 243 ; WX 686 ; N integraltp ; B 332 -83 715 921 ; C 244 ; WX 686 ; N integralex ; B 332 -88 415 975 ; C 245 ; WX 686 ; N integralbt ; B 39 -81 415 921 ; C 246 ; WX 384 ; N parenrighttp ; B 54 -293 450 926 ; C 247 ; WX 384 ; N parenrightex ; B 398 -85 450 925 ; C 248 ; WX 384 ; N parenrightbt ; B 54 -293 450 926 ; C 249 ; WX 384 ; N bracketrighttp ; B 22 -80 360 926 ; C 250 ; WX 384 ; N bracketrightex ; B 305 -79 360 925 ; C 251 ; WX 384 ; N bracketrightbt ; B 20 -80 360 926 ; C 252 ; WX 494 ; N bracerighttp ; B 17 -75 255 926 ; C 253 ; WX 494 ; N bracerightmid ; B 201 -85 442 935 ; C 254 ; WX 494 ; N bracerightbt ; B 17 -70 255 926 ; C -1 ; WX 790 ; N apple ; B 56 -3 733 808 ; EndCharMetrics EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/ptmb8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Tue Mar 20 12:17:14 1990 Comment UniqueID 28417 Comment VMusage 30458 37350 FontName Times-Bold FullName Times Bold FamilyName Times Weight Bold ItalicAngle 0 IsFixedPitch false FontBBox -168 -218 1000 935 UnderlinePosition -100 UnderlineThickness 50 Version 001.007 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 676 XHeight 461 Ascender 676 Descender -205 StartCharMetrics 228 C 32 ; WX 250 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 81 -13 251 691 ; C 34 ; WX 555 ; N quotedbl ; B 83 404 472 691 ; C 35 ; WX 500 ; N numbersign ; B 4 0 496 700 ; C 36 ; WX 500 ; N dollar ; B 29 -99 472 750 ; C 37 ; WX 1000 ; N percent ; B 124 -14 877 692 ; C 38 ; WX 833 ; N ampersand ; B 62 -16 787 691 ; C 39 ; WX 333 ; N quoteright ; B 79 356 263 691 ; C 40 ; WX 333 ; N parenleft ; B 46 -168 306 694 ; C 41 ; WX 333 ; N parenright ; B 27 -168 287 694 ; C 42 ; WX 500 ; N asterisk ; B 56 255 447 691 ; C 43 ; WX 570 ; N plus ; B 33 0 537 506 ; C 44 ; WX 250 ; N comma ; B 39 -180 223 155 ; C 45 ; WX 333 ; N hyphen ; B 44 171 287 287 ; C 46 ; WX 250 ; N period ; B 41 -13 210 156 ; C 47 ; WX 278 ; N slash ; B -24 -19 302 691 ; C 48 ; WX 500 ; N zero ; B 24 -13 476 688 ; C 49 ; WX 500 ; N one ; B 65 0 442 688 ; C 50 ; WX 500 ; N two ; B 17 0 478 688 ; C 51 ; WX 500 ; N three ; B 16 -14 468 688 ; C 52 ; WX 500 ; N four ; B 19 0 475 688 ; C 53 ; WX 500 ; N five ; B 22 -8 470 676 ; C 54 ; WX 500 ; N six ; B 28 -13 475 688 ; C 55 ; WX 500 ; N seven ; B 17 0 477 676 ; C 56 ; WX 500 ; N eight ; B 28 -13 472 688 ; C 57 ; WX 500 ; N nine ; B 26 -13 473 688 ; C 58 ; WX 333 ; N colon ; B 82 -13 251 472 ; C 59 ; WX 333 ; N semicolon ; B 82 -180 266 472 ; C 60 ; WX 570 ; N less ; B 31 -8 539 514 ; C 61 ; WX 570 ; N equal ; B 33 107 537 399 ; C 62 ; WX 570 ; N greater ; B 31 -8 539 514 ; C 63 ; WX 500 ; N question ; B 57 -13 445 689 ; C 64 ; WX 930 ; N at ; B 108 -19 822 691 ; C 65 ; WX 722 ; N A ; B 9 0 689 690 ; C 66 ; WX 667 ; N B ; B 16 0 619 676 ; C 67 ; WX 722 ; N C ; B 49 -19 687 691 ; C 68 ; WX 722 ; N D ; B 14 0 690 676 ; C 69 ; WX 667 ; N E ; B 16 0 641 676 ; C 70 ; WX 611 ; N F ; B 16 0 583 676 ; C 71 ; WX 778 ; N G ; B 37 -19 755 691 ; C 72 ; WX 778 ; N H ; B 21 0 759 676 ; C 73 ; WX 389 ; N I ; B 20 0 370 676 ; C 74 ; WX 500 ; N J ; B 3 -96 479 676 ; C 75 ; WX 778 ; N K ; B 30 0 769 676 ; C 76 ; WX 667 ; N L ; B 19 0 638 676 ; C 77 ; WX 944 ; N M ; B 14 0 921 676 ; C 78 ; WX 722 ; N N ; B 16 -18 701 676 ; C 79 ; WX 778 ; N O ; B 35 -19 743 691 ; C 80 ; WX 611 ; N P ; B 16 0 600 676 ; C 81 ; WX 778 ; N Q ; B 35 -176 743 691 ; C 82 ; WX 722 ; N R ; B 26 0 715 676 ; C 83 ; WX 556 ; N S ; B 35 -19 513 692 ; C 84 ; WX 667 ; N T ; B 31 0 636 676 ; C 85 ; WX 722 ; N U ; B 16 -19 701 676 ; C 86 ; WX 722 ; N V ; B 16 -18 701 676 ; C 87 ; WX 1000 ; N W ; B 19 -15 981 676 ; C 88 ; WX 722 ; N X ; B 16 0 699 676 ; C 89 ; WX 722 ; N Y ; B 15 0 699 676 ; C 90 ; WX 667 ; N Z ; B 28 0 634 676 ; C 91 ; WX 333 ; N bracketleft ; B 67 -149 301 678 ; C 92 ; WX 278 ; N backslash ; B -25 -19 303 691 ; C 93 ; WX 333 ; N bracketright ; B 32 -149 266 678 ; C 94 ; WX 581 ; N asciicircum ; B 73 311 509 676 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 333 ; N quoteleft ; B 70 356 254 691 ; C 97 ; WX 500 ; N a ; B 25 -14 488 473 ; C 98 ; WX 556 ; N b ; B 17 -14 521 676 ; C 99 ; WX 444 ; N c ; B 25 -14 430 473 ; C 100 ; WX 556 ; N d ; B 25 -14 534 676 ; C 101 ; WX 444 ; N e ; B 25 -14 426 473 ; C 102 ; WX 333 ; N f ; B 14 0 389 691 ; L i fi ; L l fl ; C 103 ; WX 500 ; N g ; B 28 -206 483 473 ; C 104 ; WX 556 ; N h ; B 16 0 534 676 ; C 105 ; WX 278 ; N i ; B 16 0 255 691 ; C 106 ; WX 333 ; N j ; B -57 -203 263 691 ; C 107 ; WX 556 ; N k ; B 22 0 543 676 ; C 108 ; WX 278 ; N l ; B 16 0 255 676 ; C 109 ; WX 833 ; N m ; B 16 0 814 473 ; C 110 ; WX 556 ; N n ; B 21 0 539 473 ; C 111 ; WX 500 ; N o ; B 25 -14 476 473 ; C 112 ; WX 556 ; N p ; B 19 -205 524 473 ; C 113 ; WX 556 ; N q ; B 34 -205 536 473 ; C 114 ; WX 444 ; N r ; B 29 0 434 473 ; C 115 ; WX 389 ; N s ; B 25 -14 361 473 ; C 116 ; WX 333 ; N t ; B 20 -12 332 630 ; C 117 ; WX 556 ; N u ; B 16 -14 537 461 ; C 118 ; WX 500 ; N v ; B 21 -14 485 461 ; C 119 ; WX 722 ; N w ; B 23 -14 707 461 ; C 120 ; WX 500 ; N x ; B 12 0 484 461 ; C 121 ; WX 500 ; N y ; B 16 -205 480 461 ; C 122 ; WX 444 ; N z ; B 21 0 420 461 ; C 123 ; WX 394 ; N braceleft ; B 22 -175 340 698 ; C 124 ; WX 220 ; N bar ; B 66 -19 154 691 ; C 125 ; WX 394 ; N braceright ; B 54 -175 372 698 ; C 126 ; WX 520 ; N asciitilde ; B 29 173 491 333 ; C 161 ; WX 333 ; N exclamdown ; B 82 -203 252 501 ; C 162 ; WX 500 ; N cent ; B 53 -140 458 588 ; C 163 ; WX 500 ; N sterling ; B 21 -14 477 684 ; C 164 ; WX 167 ; N fraction ; B -168 -12 329 688 ; C 165 ; WX 500 ; N yen ; B -64 0 547 676 ; C 166 ; WX 500 ; N florin ; B 0 -155 498 706 ; C 167 ; WX 500 ; N section ; B 57 -132 443 691 ; C 168 ; WX 500 ; N currency ; B -26 61 526 613 ; C 169 ; WX 278 ; N quotesingle ; B 75 404 204 691 ; C 170 ; WX 500 ; N quotedblleft ; B 32 356 486 691 ; C 171 ; WX 500 ; N guillemotleft ; B 23 36 473 415 ; C 172 ; WX 333 ; N guilsinglleft ; B 51 36 305 415 ; C 173 ; WX 333 ; N guilsinglright ; B 28 36 282 415 ; C 174 ; WX 556 ; N fi ; B 14 0 536 691 ; C 175 ; WX 556 ; N fl ; B 14 0 536 691 ; C 177 ; WX 500 ; N endash ; B 0 181 500 271 ; C 178 ; WX 500 ; N dagger ; B 47 -134 453 691 ; C 179 ; WX 500 ; N daggerdbl ; B 45 -132 456 691 ; C 180 ; WX 250 ; N periodcentered ; B 41 248 210 417 ; C 182 ; WX 540 ; N paragraph ; B 0 -186 519 676 ; C 183 ; WX 350 ; N bullet ; B 35 198 315 478 ; C 184 ; WX 333 ; N quotesinglbase ; B 79 -180 263 155 ; C 185 ; WX 500 ; N quotedblbase ; B 14 -180 468 155 ; C 186 ; WX 500 ; N quotedblright ; B 14 356 468 691 ; C 187 ; WX 500 ; N guillemotright ; B 27 36 477 415 ; C 188 ; WX 1000 ; N ellipsis ; B 82 -13 917 156 ; C 189 ; WX 1000 ; N perthousand ; B 7 -29 995 706 ; C 191 ; WX 500 ; N questiondown ; B 55 -201 443 501 ; C 193 ; WX 333 ; N grave ; B 8 528 246 713 ; C 194 ; WX 333 ; N acute ; B 86 528 324 713 ; C 195 ; WX 333 ; N circumflex ; B -2 528 335 704 ; C 196 ; WX 333 ; N tilde ; B -16 547 349 674 ; C 197 ; WX 333 ; N macron ; B 1 565 331 637 ; C 198 ; WX 333 ; N breve ; B 15 528 318 691 ; C 199 ; WX 333 ; N dotaccent ; B 103 537 230 667 ; C 200 ; WX 333 ; N dieresis ; B -2 537 335 667 ; C 202 ; WX 333 ; N ring ; B 60 527 273 740 ; C 203 ; WX 333 ; N cedilla ; B 68 -218 294 0 ; C 205 ; WX 333 ; N hungarumlaut ; B -13 528 425 713 ; C 206 ; WX 333 ; N ogonek ; B 90 -173 319 44 ; C 207 ; WX 333 ; N caron ; B -2 528 335 704 ; C 208 ; WX 1000 ; N emdash ; B 0 181 1000 271 ; C 225 ; WX 1000 ; N AE ; B 4 0 951 676 ; C 227 ; WX 300 ; N ordfeminine ; B -1 397 301 688 ; C 232 ; WX 667 ; N Lslash ; B 19 0 638 676 ; C 233 ; WX 778 ; N Oslash ; B 35 -74 743 737 ; C 234 ; WX 1000 ; N OE ; B 22 -5 981 684 ; C 235 ; WX 330 ; N ordmasculine ; B 18 397 312 688 ; C 241 ; WX 722 ; N ae ; B 33 -14 693 473 ; C 245 ; WX 278 ; N dotlessi ; B 16 0 255 461 ; C 248 ; WX 278 ; N lslash ; B -22 0 303 676 ; C 249 ; WX 500 ; N oslash ; B 25 -92 476 549 ; C 250 ; WX 722 ; N oe ; B 22 -14 696 473 ; C 251 ; WX 556 ; N germandbls ; B 19 -12 517 691 ; C -1 ; WX 667 ; N Zcaron ; B 28 0 634 914 ; C -1 ; WX 444 ; N ccedilla ; B 25 -218 430 473 ; C -1 ; WX 500 ; N ydieresis ; B 16 -205 480 667 ; C -1 ; WX 500 ; N atilde ; B 25 -14 488 674 ; C -1 ; WX 278 ; N icircumflex ; B -36 0 301 704 ; C -1 ; WX 300 ; N threesuperior ; B 3 268 297 688 ; C -1 ; WX 444 ; N ecircumflex ; B 25 -14 426 704 ; C -1 ; WX 556 ; N thorn ; B 19 -205 524 676 ; C -1 ; WX 444 ; N egrave ; B 25 -14 426 713 ; C -1 ; WX 300 ; N twosuperior ; B 0 275 300 688 ; C -1 ; WX 444 ; N eacute ; B 25 -14 426 713 ; C -1 ; WX 500 ; N otilde ; B 25 -14 476 674 ; C -1 ; WX 722 ; N Aacute ; B 9 0 689 923 ; C -1 ; WX 500 ; N ocircumflex ; B 25 -14 476 704 ; C -1 ; WX 500 ; N yacute ; B 16 -205 480 713 ; C -1 ; WX 556 ; N udieresis ; B 16 -14 537 667 ; C -1 ; WX 750 ; N threequarters ; B 23 -12 733 688 ; C -1 ; WX 500 ; N acircumflex ; B 25 -14 488 704 ; C -1 ; WX 722 ; N Eth ; B 6 0 690 676 ; C -1 ; WX 444 ; N edieresis ; B 25 -14 426 667 ; C -1 ; WX 556 ; N ugrave ; B 16 -14 537 713 ; C -1 ; WX 1000 ; N trademark ; B 24 271 977 676 ; C -1 ; WX 500 ; N ograve ; B 25 -14 476 713 ; C -1 ; WX 389 ; N scaron ; B 25 -14 363 704 ; C -1 ; WX 389 ; N Idieresis ; B 20 0 370 877 ; C -1 ; WX 556 ; N uacute ; B 16 -14 537 713 ; C -1 ; WX 500 ; N agrave ; B 25 -14 488 713 ; C -1 ; WX 556 ; N ntilde ; B 21 0 539 674 ; C -1 ; WX 500 ; N aring ; B 25 -14 488 740 ; C -1 ; WX 444 ; N zcaron ; B 21 0 420 704 ; C -1 ; WX 389 ; N Icircumflex ; B 20 0 370 914 ; C -1 ; WX 722 ; N Ntilde ; B 16 -18 701 884 ; C -1 ; WX 556 ; N ucircumflex ; B 16 -14 537 704 ; C -1 ; WX 667 ; N Ecircumflex ; B 16 0 641 914 ; C -1 ; WX 389 ; N Iacute ; B 20 0 370 923 ; C -1 ; WX 722 ; N Ccedilla ; B 49 -218 687 691 ; C -1 ; WX 778 ; N Odieresis ; B 35 -19 743 877 ; C -1 ; WX 556 ; N Scaron ; B 35 -19 513 914 ; C -1 ; WX 667 ; N Edieresis ; B 16 0 641 877 ; C -1 ; WX 389 ; N Igrave ; B 20 0 370 923 ; C -1 ; WX 500 ; N adieresis ; B 25 -14 488 667 ; C -1 ; WX 778 ; N Ograve ; B 35 -19 743 923 ; C -1 ; WX 667 ; N Egrave ; B 16 0 641 923 ; C -1 ; WX 722 ; N Ydieresis ; B 15 0 699 877 ; C -1 ; WX 747 ; N registered ; B 26 -19 721 691 ; C -1 ; WX 778 ; N Otilde ; B 35 -19 743 884 ; C -1 ; WX 750 ; N onequarter ; B 28 -12 743 688 ; C -1 ; WX 722 ; N Ugrave ; B 16 -19 701 923 ; C -1 ; WX 722 ; N Ucircumflex ; B 16 -19 701 914 ; C -1 ; WX 611 ; N Thorn ; B 16 0 600 676 ; C -1 ; WX 570 ; N divide ; B 33 -31 537 537 ; C -1 ; WX 722 ; N Atilde ; B 9 0 689 884 ; C -1 ; WX 722 ; N Uacute ; B 16 -19 701 923 ; C -1 ; WX 778 ; N Ocircumflex ; B 35 -19 743 914 ; C -1 ; WX 570 ; N logicalnot ; B 33 108 537 399 ; C -1 ; WX 722 ; N Aring ; B 9 0 689 935 ; C -1 ; WX 278 ; N idieresis ; B -36 0 301 667 ; C -1 ; WX 278 ; N iacute ; B 16 0 290 713 ; C -1 ; WX 500 ; N aacute ; B 25 -14 488 713 ; C -1 ; WX 570 ; N plusminus ; B 33 0 537 506 ; C -1 ; WX 570 ; N multiply ; B 48 16 522 490 ; C -1 ; WX 722 ; N Udieresis ; B 16 -19 701 877 ; C -1 ; WX 570 ; N minus ; B 33 209 537 297 ; C -1 ; WX 300 ; N onesuperior ; B 28 275 273 688 ; C -1 ; WX 667 ; N Eacute ; B 16 0 641 923 ; C -1 ; WX 722 ; N Acircumflex ; B 9 0 689 914 ; C -1 ; WX 747 ; N copyright ; B 26 -19 721 691 ; C -1 ; WX 722 ; N Agrave ; B 9 0 689 923 ; C -1 ; WX 500 ; N odieresis ; B 25 -14 476 667 ; C -1 ; WX 500 ; N oacute ; B 25 -14 476 713 ; C -1 ; WX 400 ; N degree ; B 57 402 343 688 ; C -1 ; WX 278 ; N igrave ; B -26 0 255 713 ; C -1 ; WX 556 ; N mu ; B 33 -206 536 461 ; C -1 ; WX 778 ; N Oacute ; B 35 -19 743 923 ; C -1 ; WX 500 ; N eth ; B 25 -14 476 691 ; C -1 ; WX 722 ; N Adieresis ; B 9 0 689 877 ; C -1 ; WX 722 ; N Yacute ; B 15 0 699 928 ; C -1 ; WX 220 ; N brokenbar ; B 66 -19 154 691 ; C -1 ; WX 750 ; N onehalf ; B -7 -12 775 688 ; EndCharMetrics StartKernData StartKernPairs 283 KPX A y -74 KPX A w -90 KPX A v -100 KPX A u -50 KPX A quoteright -74 KPX A quotedblright 0 KPX A p -25 KPX A Y -100 KPX A W -130 KPX A V -145 KPX A U -50 KPX A T -95 KPX A Q -45 KPX A O -45 KPX A G -55 KPX A C -55 KPX B period 0 KPX B comma 0 KPX B U -10 KPX B A -30 KPX D period -20 KPX D comma 0 KPX D Y -40 KPX D W -40 KPX D V -40 KPX D A -35 KPX F r 0 KPX F period -110 KPX F o -25 KPX F i 0 KPX F e -25 KPX F comma -92 KPX F a -25 KPX F A -90 KPX G period 0 KPX G comma 0 KPX J u -15 KPX J period -20 KPX J o -15 KPX J e -15 KPX J comma 0 KPX J a -15 KPX J A -30 KPX K y -45 KPX K u -15 KPX K o -25 KPX K e -25 KPX K O -30 KPX L y -55 KPX L quoteright -110 KPX L quotedblright -20 KPX L Y -92 KPX L W -92 KPX L V -92 KPX L T -92 KPX N period 0 KPX N comma 0 KPX N A -20 KPX O period 0 KPX O comma 0 KPX O Y -50 KPX O X -40 KPX O W -50 KPX O V -50 KPX O T -40 KPX O A -40 KPX P period -110 KPX P o -20 KPX P e -20 KPX P comma -92 KPX P a -10 KPX P A -74 KPX Q period -20 KPX Q comma 0 KPX Q U -10 KPX R Y -35 KPX R W -35 KPX R V -55 KPX R U -30 KPX R T -40 KPX R O -30 KPX S period 0 KPX S comma 0 KPX T y -74 KPX T w -74 KPX T u -92 KPX T semicolon -74 KPX T r -74 KPX T period -90 KPX T o -92 KPX T i -18 KPX T hyphen -92 KPX T h 0 KPX T e -92 KPX T comma -74 KPX T colon -74 KPX T a -92 KPX T O -18 KPX T A -90 KPX U period -50 KPX U comma -50 KPX U A -60 KPX V u -92 KPX V semicolon -92 KPX V period -145 KPX V o -100 KPX V i -37 KPX V hyphen -74 KPX V e -100 KPX V comma -129 KPX V colon -92 KPX V a -92 KPX V O -45 KPX V G -30 KPX V A -135 KPX W y -60 KPX W u -50 KPX W semicolon -55 KPX W period -92 KPX W o -75 KPX W i -18 KPX W hyphen -37 KPX W h 0 KPX W e -65 KPX W comma -92 KPX W colon -55 KPX W a -65 KPX W O -10 KPX W A -120 KPX Y u -92 KPX Y semicolon -92 KPX Y period -92 KPX Y o -111 KPX Y i -37 KPX Y hyphen -92 KPX Y e -111 KPX Y comma -92 KPX Y colon -92 KPX Y a -85 KPX Y O -35 KPX Y A -110 KPX a y 0 KPX a w 0 KPX a v -25 KPX a t 0 KPX a p 0 KPX a g 0 KPX a b 0 KPX b y 0 KPX b v -15 KPX b u -20 KPX b period -40 KPX b l 0 KPX b comma 0 KPX b b -10 KPX c y 0 KPX c period 0 KPX c l 0 KPX c k 0 KPX c h 0 KPX c comma 0 KPX colon space 0 KPX comma space 0 KPX comma quoteright -55 KPX comma quotedblright -45 KPX d y 0 KPX d w -15 KPX d v 0 KPX d period 0 KPX d d 0 KPX d comma 0 KPX e y 0 KPX e x 0 KPX e w 0 KPX e v -15 KPX e period 0 KPX e p 0 KPX e g 0 KPX e comma 0 KPX e b 0 KPX f quoteright 55 KPX f quotedblright 50 KPX f period -15 KPX f o -25 KPX f l 0 KPX f i -25 KPX f f 0 KPX f e 0 KPX f dotlessi -35 KPX f comma -15 KPX f a 0 KPX g y 0 KPX g r 0 KPX g period -15 KPX g o 0 KPX g i 0 KPX g g 0 KPX g e 0 KPX g comma 0 KPX g a 0 KPX h y -15 KPX i v -10 KPX k y -15 KPX k o -15 KPX k e -10 KPX l y 0 KPX l w 0 KPX m y 0 KPX m u 0 KPX n y 0 KPX n v -40 KPX n u 0 KPX o y 0 KPX o x 0 KPX o w -10 KPX o v -10 KPX o g 0 KPX p y 0 KPX period quoteright -55 KPX period quotedblright -55 KPX quotedblleft quoteleft 0 KPX quotedblleft A -10 KPX quotedblright space 0 KPX quoteleft quoteleft -63 KPX quoteleft A -10 KPX quoteright v -20 KPX quoteright t 0 KPX quoteright space -74 KPX quoteright s -37 KPX quoteright r -20 KPX quoteright quoteright -63 KPX quoteright quotedblright 0 KPX quoteright l 0 KPX quoteright d -20 KPX r y 0 KPX r v -10 KPX r u 0 KPX r t 0 KPX r s 0 KPX r r 0 KPX r q -18 KPX r period -100 KPX r p -10 KPX r o -18 KPX r n -15 KPX r m 0 KPX r l 0 KPX r k 0 KPX r i 0 KPX r hyphen -37 KPX r g -10 KPX r e -18 KPX r d 0 KPX r comma -92 KPX r c -18 KPX r a 0 KPX s w 0 KPX space quoteleft 0 KPX space quotedblleft 0 KPX space Y -55 KPX space W -30 KPX space V -45 KPX space T -30 KPX space A -55 KPX v period -70 KPX v o -10 KPX v e -10 KPX v comma -55 KPX v a -10 KPX w period -70 KPX w o -10 KPX w h 0 KPX w e 0 KPX w comma -55 KPX w a 0 KPX x e 0 KPX y period -70 KPX y o -25 KPX y e -10 KPX y comma -55 KPX y a 0 KPX z o 0 KPX z e 0 EndKernPairs EndKernData StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 188 210 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 188 210 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 188 210 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 188 210 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 180 195 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 188 210 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 208 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 174 210 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 174 210 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 174 210 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 174 210 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 28 210 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 28 210 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 28 210 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 28 210 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 195 210 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 223 210 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 223 210 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 223 210 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 223 210 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 223 210 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 112 210 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 222 210 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 222 210 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 222 210 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 222 210 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 210 215 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 215 210 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 167 210 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 77 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 77 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 77 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 77 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 77 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 77 0 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 69 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 62 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 62 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 62 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 62 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -34 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -34 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -34 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -34 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 112 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 84 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 84 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 105 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 105 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 105 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 105 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 84 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 56 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/ptmbi8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Tue Mar 20 13:14:55 1990 Comment UniqueID 28425 Comment VMusage 32721 39613 FontName Times-BoldItalic FullName Times Bold Italic FamilyName Times Weight Bold ItalicAngle -15 IsFixedPitch false FontBBox -200 -218 996 921 UnderlinePosition -100 UnderlineThickness 50 Version 001.009 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 669 XHeight 462 Ascender 699 Descender -205 StartCharMetrics 228 C 32 ; WX 250 ; N space ; B 0 0 0 0 ; C 33 ; WX 389 ; N exclam ; B 67 -13 370 684 ; C 34 ; WX 555 ; N quotedbl ; B 136 398 536 685 ; C 35 ; WX 500 ; N numbersign ; B -33 0 533 700 ; C 36 ; WX 500 ; N dollar ; B -20 -100 497 733 ; C 37 ; WX 833 ; N percent ; B 39 -10 793 692 ; C 38 ; WX 778 ; N ampersand ; B 5 -19 699 682 ; C 39 ; WX 333 ; N quoteright ; B 98 369 302 685 ; C 40 ; WX 333 ; N parenleft ; B 28 -179 344 685 ; C 41 ; WX 333 ; N parenright ; B -44 -179 271 685 ; C 42 ; WX 500 ; N asterisk ; B 65 249 456 685 ; C 43 ; WX 570 ; N plus ; B 33 0 537 506 ; C 44 ; WX 250 ; N comma ; B -60 -182 144 134 ; C 45 ; WX 333 ; N hyphen ; B 2 166 271 282 ; C 46 ; WX 250 ; N period ; B -9 -13 139 135 ; C 47 ; WX 278 ; N slash ; B -64 -18 342 685 ; C 48 ; WX 500 ; N zero ; B 17 -14 477 683 ; C 49 ; WX 500 ; N one ; B 5 0 419 683 ; C 50 ; WX 500 ; N two ; B -27 0 446 683 ; C 51 ; WX 500 ; N three ; B -15 -13 450 683 ; C 52 ; WX 500 ; N four ; B -15 0 503 683 ; C 53 ; WX 500 ; N five ; B -11 -13 487 669 ; C 54 ; WX 500 ; N six ; B 23 -15 509 679 ; C 55 ; WX 500 ; N seven ; B 52 0 525 669 ; C 56 ; WX 500 ; N eight ; B 3 -13 476 683 ; C 57 ; WX 500 ; N nine ; B -12 -10 475 683 ; C 58 ; WX 333 ; N colon ; B 23 -13 264 459 ; C 59 ; WX 333 ; N semicolon ; B -25 -183 264 459 ; C 60 ; WX 570 ; N less ; B 31 -8 539 514 ; C 61 ; WX 570 ; N equal ; B 33 107 537 399 ; C 62 ; WX 570 ; N greater ; B 31 -8 539 514 ; C 63 ; WX 500 ; N question ; B 79 -13 470 684 ; C 64 ; WX 832 ; N at ; B 63 -18 770 685 ; C 65 ; WX 667 ; N A ; B -67 0 593 683 ; C 66 ; WX 667 ; N B ; B -24 0 624 669 ; C 67 ; WX 667 ; N C ; B 32 -18 677 685 ; C 68 ; WX 722 ; N D ; B -46 0 685 669 ; C 69 ; WX 667 ; N E ; B -27 0 653 669 ; C 70 ; WX 667 ; N F ; B -13 0 660 669 ; C 71 ; WX 722 ; N G ; B 21 -18 706 685 ; C 72 ; WX 778 ; N H ; B -24 0 799 669 ; C 73 ; WX 389 ; N I ; B -32 0 406 669 ; C 74 ; WX 500 ; N J ; B -46 -99 524 669 ; C 75 ; WX 667 ; N K ; B -21 0 702 669 ; C 76 ; WX 611 ; N L ; B -22 0 590 669 ; C 77 ; WX 889 ; N M ; B -29 -12 917 669 ; C 78 ; WX 722 ; N N ; B -27 -15 748 669 ; C 79 ; WX 722 ; N O ; B 27 -18 691 685 ; C 80 ; WX 611 ; N P ; B -27 0 613 669 ; C 81 ; WX 722 ; N Q ; B 27 -208 691 685 ; C 82 ; WX 667 ; N R ; B -29 0 623 669 ; C 83 ; WX 556 ; N S ; B 2 -18 526 685 ; C 84 ; WX 611 ; N T ; B 50 0 650 669 ; C 85 ; WX 722 ; N U ; B 67 -18 744 669 ; C 86 ; WX 667 ; N V ; B 65 -18 715 669 ; C 87 ; WX 889 ; N W ; B 65 -18 940 669 ; C 88 ; WX 667 ; N X ; B -24 0 694 669 ; C 89 ; WX 611 ; N Y ; B 73 0 659 669 ; C 90 ; WX 611 ; N Z ; B -11 0 590 669 ; C 91 ; WX 333 ; N bracketleft ; B -37 -159 362 674 ; C 92 ; WX 278 ; N backslash ; B -1 -18 279 685 ; C 93 ; WX 333 ; N bracketright ; B -56 -157 343 674 ; C 94 ; WX 570 ; N asciicircum ; B 67 304 503 669 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 333 ; N quoteleft ; B 128 369 332 685 ; C 97 ; WX 500 ; N a ; B -21 -14 455 462 ; C 98 ; WX 500 ; N b ; B -14 -13 444 699 ; C 99 ; WX 444 ; N c ; B -5 -13 392 462 ; C 100 ; WX 500 ; N d ; B -21 -13 517 699 ; C 101 ; WX 444 ; N e ; B 5 -13 398 462 ; C 102 ; WX 333 ; N f ; B -169 -205 446 698 ; L i fi ; L l fl ; C 103 ; WX 500 ; N g ; B -52 -203 478 462 ; C 104 ; WX 556 ; N h ; B -13 -9 498 699 ; C 105 ; WX 278 ; N i ; B 2 -9 263 684 ; C 106 ; WX 278 ; N j ; B -189 -207 279 684 ; C 107 ; WX 500 ; N k ; B -23 -8 483 699 ; C 108 ; WX 278 ; N l ; B 2 -9 290 699 ; C 109 ; WX 778 ; N m ; B -14 -9 722 462 ; C 110 ; WX 556 ; N n ; B -6 -9 493 462 ; C 111 ; WX 500 ; N o ; B -3 -13 441 462 ; C 112 ; WX 500 ; N p ; B -120 -205 446 462 ; C 113 ; WX 500 ; N q ; B 1 -205 471 462 ; C 114 ; WX 389 ; N r ; B -21 0 389 462 ; C 115 ; WX 389 ; N s ; B -19 -13 333 462 ; C 116 ; WX 278 ; N t ; B -11 -9 281 594 ; C 117 ; WX 556 ; N u ; B 15 -9 492 462 ; C 118 ; WX 444 ; N v ; B 16 -13 401 462 ; C 119 ; WX 667 ; N w ; B 16 -13 614 462 ; C 120 ; WX 500 ; N x ; B -46 -13 469 462 ; C 121 ; WX 444 ; N y ; B -94 -205 392 462 ; C 122 ; WX 389 ; N z ; B -43 -78 368 449 ; C 123 ; WX 348 ; N braceleft ; B 5 -187 436 686 ; C 124 ; WX 220 ; N bar ; B 66 -18 154 685 ; C 125 ; WX 348 ; N braceright ; B -129 -187 302 686 ; C 126 ; WX 570 ; N asciitilde ; B 54 173 516 333 ; C 161 ; WX 389 ; N exclamdown ; B 19 -205 322 492 ; C 162 ; WX 500 ; N cent ; B 42 -143 439 576 ; C 163 ; WX 500 ; N sterling ; B -32 -12 510 683 ; C 164 ; WX 167 ; N fraction ; B -169 -14 324 683 ; C 165 ; WX 500 ; N yen ; B 33 0 628 669 ; C 166 ; WX 500 ; N florin ; B -87 -156 537 707 ; C 167 ; WX 500 ; N section ; B 36 -143 459 685 ; C 168 ; WX 500 ; N currency ; B -26 34 526 586 ; C 169 ; WX 278 ; N quotesingle ; B 128 398 268 685 ; C 170 ; WX 500 ; N quotedblleft ; B 53 369 513 685 ; C 171 ; WX 500 ; N guillemotleft ; B 12 32 468 415 ; C 172 ; WX 333 ; N guilsinglleft ; B 32 32 303 415 ; C 173 ; WX 333 ; N guilsinglright ; B 10 32 281 415 ; C 174 ; WX 556 ; N fi ; B -188 -205 514 703 ; C 175 ; WX 556 ; N fl ; B -186 -205 553 704 ; C 177 ; WX 500 ; N endash ; B -40 178 477 269 ; C 178 ; WX 500 ; N dagger ; B 91 -145 494 685 ; C 179 ; WX 500 ; N daggerdbl ; B 10 -139 493 685 ; C 180 ; WX 250 ; N periodcentered ; B 51 257 199 405 ; C 182 ; WX 500 ; N paragraph ; B -57 -193 562 669 ; C 183 ; WX 350 ; N bullet ; B 0 175 350 525 ; C 184 ; WX 333 ; N quotesinglbase ; B -5 -182 199 134 ; C 185 ; WX 500 ; N quotedblbase ; B -57 -182 403 134 ; C 186 ; WX 500 ; N quotedblright ; B 53 369 513 685 ; C 187 ; WX 500 ; N guillemotright ; B 12 32 468 415 ; C 188 ; WX 1000 ; N ellipsis ; B 40 -13 852 135 ; C 189 ; WX 1000 ; N perthousand ; B 7 -29 996 706 ; C 191 ; WX 500 ; N questiondown ; B 30 -205 421 492 ; C 193 ; WX 333 ; N grave ; B 85 516 297 697 ; C 194 ; WX 333 ; N acute ; B 139 516 379 697 ; C 195 ; WX 333 ; N circumflex ; B 40 516 367 690 ; C 196 ; WX 333 ; N tilde ; B 48 536 407 655 ; C 197 ; WX 333 ; N macron ; B 51 553 393 623 ; C 198 ; WX 333 ; N breve ; B 71 516 387 678 ; C 199 ; WX 333 ; N dotaccent ; B 163 525 293 655 ; C 200 ; WX 333 ; N dieresis ; B 55 525 397 655 ; C 202 ; WX 333 ; N ring ; B 127 516 340 729 ; C 203 ; WX 333 ; N cedilla ; B -80 -218 156 5 ; C 205 ; WX 333 ; N hungarumlaut ; B 69 516 498 697 ; C 206 ; WX 333 ; N ogonek ; B -40 -173 189 44 ; C 207 ; WX 333 ; N caron ; B 79 516 411 690 ; C 208 ; WX 1000 ; N emdash ; B -40 178 977 269 ; C 225 ; WX 944 ; N AE ; B -64 0 918 669 ; C 227 ; WX 266 ; N ordfeminine ; B 16 399 330 685 ; C 232 ; WX 611 ; N Lslash ; B -22 0 590 669 ; C 233 ; WX 722 ; N Oslash ; B 27 -125 691 764 ; C 234 ; WX 944 ; N OE ; B 23 -8 946 677 ; C 235 ; WX 300 ; N ordmasculine ; B 56 400 347 685 ; C 241 ; WX 722 ; N ae ; B -5 -13 673 462 ; C 245 ; WX 278 ; N dotlessi ; B 2 -9 238 462 ; C 248 ; WX 278 ; N lslash ; B -13 -9 301 699 ; C 249 ; WX 500 ; N oslash ; B -3 -119 441 560 ; C 250 ; WX 722 ; N oe ; B 6 -13 674 462 ; C 251 ; WX 500 ; N germandbls ; B -200 -200 473 705 ; C -1 ; WX 611 ; N Zcaron ; B -11 0 590 897 ; C -1 ; WX 444 ; N ccedilla ; B -24 -218 392 462 ; C -1 ; WX 444 ; N ydieresis ; B -94 -205 438 655 ; C -1 ; WX 500 ; N atilde ; B -21 -14 491 655 ; C -1 ; WX 278 ; N icircumflex ; B -2 -9 325 690 ; C -1 ; WX 300 ; N threesuperior ; B 17 265 321 683 ; C -1 ; WX 444 ; N ecircumflex ; B 5 -13 423 690 ; C -1 ; WX 500 ; N thorn ; B -120 -205 446 699 ; C -1 ; WX 444 ; N egrave ; B 5 -13 398 697 ; C -1 ; WX 300 ; N twosuperior ; B 2 274 313 683 ; C -1 ; WX 444 ; N eacute ; B 5 -13 435 697 ; C -1 ; WX 500 ; N otilde ; B -3 -13 491 655 ; C -1 ; WX 667 ; N Aacute ; B -67 0 593 904 ; C -1 ; WX 500 ; N ocircumflex ; B -3 -13 451 690 ; C -1 ; WX 444 ; N yacute ; B -94 -205 435 697 ; C -1 ; WX 556 ; N udieresis ; B 15 -9 494 655 ; C -1 ; WX 750 ; N threequarters ; B 7 -14 726 683 ; C -1 ; WX 500 ; N acircumflex ; B -21 -14 455 690 ; C -1 ; WX 722 ; N Eth ; B -31 0 700 669 ; C -1 ; WX 444 ; N edieresis ; B 5 -13 443 655 ; C -1 ; WX 556 ; N ugrave ; B 15 -9 492 697 ; C -1 ; WX 1000 ; N trademark ; B 32 263 968 669 ; C -1 ; WX 500 ; N ograve ; B -3 -13 441 697 ; C -1 ; WX 389 ; N scaron ; B -19 -13 439 690 ; C -1 ; WX 389 ; N Idieresis ; B -32 0 445 862 ; C -1 ; WX 556 ; N uacute ; B 15 -9 492 697 ; C -1 ; WX 500 ; N agrave ; B -21 -14 455 697 ; C -1 ; WX 556 ; N ntilde ; B -6 -9 504 655 ; C -1 ; WX 500 ; N aring ; B -21 -14 455 729 ; C -1 ; WX 389 ; N zcaron ; B -43 -78 424 690 ; C -1 ; WX 389 ; N Icircumflex ; B -32 0 420 897 ; C -1 ; WX 722 ; N Ntilde ; B -27 -15 748 862 ; C -1 ; WX 556 ; N ucircumflex ; B 15 -9 492 690 ; C -1 ; WX 667 ; N Ecircumflex ; B -27 0 653 897 ; C -1 ; WX 389 ; N Iacute ; B -32 0 412 904 ; C -1 ; WX 667 ; N Ccedilla ; B 32 -218 677 685 ; C -1 ; WX 722 ; N Odieresis ; B 27 -18 691 862 ; C -1 ; WX 556 ; N Scaron ; B 2 -18 526 897 ; C -1 ; WX 667 ; N Edieresis ; B -27 0 653 862 ; C -1 ; WX 389 ; N Igrave ; B -32 0 406 904 ; C -1 ; WX 500 ; N adieresis ; B -21 -14 471 655 ; C -1 ; WX 722 ; N Ograve ; B 27 -18 691 904 ; C -1 ; WX 667 ; N Egrave ; B -27 0 653 904 ; C -1 ; WX 611 ; N Ydieresis ; B 73 0 659 862 ; C -1 ; WX 747 ; N registered ; B 30 -18 718 685 ; C -1 ; WX 722 ; N Otilde ; B 27 -18 691 862 ; C -1 ; WX 750 ; N onequarter ; B 7 -14 721 683 ; C -1 ; WX 722 ; N Ugrave ; B 67 -18 744 904 ; C -1 ; WX 722 ; N Ucircumflex ; B 67 -18 744 897 ; C -1 ; WX 611 ; N Thorn ; B -27 0 573 669 ; C -1 ; WX 570 ; N divide ; B 33 -29 537 535 ; C -1 ; WX 667 ; N Atilde ; B -67 0 593 862 ; C -1 ; WX 722 ; N Uacute ; B 67 -18 744 904 ; C -1 ; WX 722 ; N Ocircumflex ; B 27 -18 691 897 ; C -1 ; WX 606 ; N logicalnot ; B 51 108 555 399 ; C -1 ; WX 667 ; N Aring ; B -67 0 593 921 ; C -1 ; WX 278 ; N idieresis ; B 2 -9 360 655 ; C -1 ; WX 278 ; N iacute ; B 2 -9 352 697 ; C -1 ; WX 500 ; N aacute ; B -21 -14 463 697 ; C -1 ; WX 570 ; N plusminus ; B 33 0 537 506 ; C -1 ; WX 570 ; N multiply ; B 48 16 522 490 ; C -1 ; WX 722 ; N Udieresis ; B 67 -18 744 862 ; C -1 ; WX 606 ; N minus ; B 51 209 555 297 ; C -1 ; WX 300 ; N onesuperior ; B 30 274 301 683 ; C -1 ; WX 667 ; N Eacute ; B -27 0 653 904 ; C -1 ; WX 667 ; N Acircumflex ; B -67 0 593 897 ; C -1 ; WX 747 ; N copyright ; B 30 -18 718 685 ; C -1 ; WX 667 ; N Agrave ; B -67 0 593 904 ; C -1 ; WX 500 ; N odieresis ; B -3 -13 466 655 ; C -1 ; WX 500 ; N oacute ; B -3 -13 463 697 ; C -1 ; WX 400 ; N degree ; B 83 397 369 683 ; C -1 ; WX 278 ; N igrave ; B 2 -9 260 697 ; C -1 ; WX 576 ; N mu ; B -60 -207 516 449 ; C -1 ; WX 722 ; N Oacute ; B 27 -18 691 904 ; C -1 ; WX 500 ; N eth ; B -3 -13 454 699 ; C -1 ; WX 667 ; N Adieresis ; B -67 0 593 862 ; C -1 ; WX 611 ; N Yacute ; B 73 0 659 904 ; C -1 ; WX 220 ; N brokenbar ; B 66 -18 154 685 ; C -1 ; WX 750 ; N onehalf ; B -9 -14 723 683 ; EndCharMetrics StartKernData StartKernPairs 283 KPX A y -74 KPX A w -74 KPX A v -74 KPX A u -30 KPX A quoteright -74 KPX A quotedblright 0 KPX A p 0 KPX A Y -70 KPX A W -100 KPX A V -95 KPX A U -50 KPX A T -55 KPX A Q -55 KPX A O -50 KPX A G -60 KPX A C -65 KPX B period 0 KPX B comma 0 KPX B U -10 KPX B A -25 KPX D period 0 KPX D comma 0 KPX D Y -50 KPX D W -40 KPX D V -50 KPX D A -25 KPX F r -50 KPX F period -129 KPX F o -70 KPX F i -40 KPX F e -100 KPX F comma -129 KPX F a -95 KPX F A -100 KPX G period 0 KPX G comma 0 KPX J u -40 KPX J period -10 KPX J o -40 KPX J e -40 KPX J comma -10 KPX J a -40 KPX J A -25 KPX K y -20 KPX K u -20 KPX K o -25 KPX K e -25 KPX K O -30 KPX L y -37 KPX L quoteright -55 KPX L quotedblright 0 KPX L Y -37 KPX L W -37 KPX L V -37 KPX L T -18 KPX N period 0 KPX N comma 0 KPX N A -30 KPX O period 0 KPX O comma 0 KPX O Y -50 KPX O X -40 KPX O W -50 KPX O V -50 KPX O T -40 KPX O A -40 KPX P period -129 KPX P o -55 KPX P e -50 KPX P comma -129 KPX P a -40 KPX P A -85 KPX Q period 0 KPX Q comma 0 KPX Q U -10 KPX R Y -18 KPX R W -18 KPX R V -18 KPX R U -40 KPX R T -30 KPX R O -40 KPX S period 0 KPX S comma 0 KPX T y -37 KPX T w -37 KPX T u -37 KPX T semicolon -74 KPX T r -37 KPX T period -92 KPX T o -95 KPX T i -37 KPX T hyphen -92 KPX T h 0 KPX T e -92 KPX T comma -92 KPX T colon -74 KPX T a -92 KPX T O -18 KPX T A -55 KPX U period 0 KPX U comma 0 KPX U A -45 KPX V u -55 KPX V semicolon -74 KPX V period -129 KPX V o -111 KPX V i -55 KPX V hyphen -70 KPX V e -111 KPX V comma -129 KPX V colon -74 KPX V a -111 KPX V O -30 KPX V G -10 KPX V A -85 KPX W y -55 KPX W u -55 KPX W semicolon -55 KPX W period -74 KPX W o -80 KPX W i -37 KPX W hyphen -50 KPX W h 0 KPX W e -90 KPX W comma -74 KPX W colon -55 KPX W a -85 KPX W O -15 KPX W A -74 KPX Y u -92 KPX Y semicolon -92 KPX Y period -74 KPX Y o -111 KPX Y i -55 KPX Y hyphen -92 KPX Y e -111 KPX Y comma -92 KPX Y colon -92 KPX Y a -92 KPX Y O -25 KPX Y A -74 KPX a y 0 KPX a w 0 KPX a v 0 KPX a t 0 KPX a p 0 KPX a g 0 KPX a b 0 KPX b y 0 KPX b v 0 KPX b u -20 KPX b period -40 KPX b l 0 KPX b comma 0 KPX b b -10 KPX c y 0 KPX c period 0 KPX c l 0 KPX c k -10 KPX c h -10 KPX c comma 0 KPX colon space 0 KPX comma space 0 KPX comma quoteright -95 KPX comma quotedblright -95 KPX d y 0 KPX d w 0 KPX d v 0 KPX d period 0 KPX d d 0 KPX d comma 0 KPX e y 0 KPX e x 0 KPX e w 0 KPX e v 0 KPX e period 0 KPX e p 0 KPX e g 0 KPX e comma 0 KPX e b -10 KPX f quoteright 55 KPX f quotedblright 0 KPX f period -10 KPX f o -10 KPX f l 0 KPX f i 0 KPX f f -18 KPX f e -10 KPX f dotlessi -30 KPX f comma -10 KPX f a 0 KPX g y 0 KPX g r 0 KPX g period 0 KPX g o 0 KPX g i 0 KPX g g 0 KPX g e 0 KPX g comma 0 KPX g a 0 KPX h y 0 KPX i v 0 KPX k y 0 KPX k o -10 KPX k e -30 KPX l y 0 KPX l w 0 KPX m y 0 KPX m u 0 KPX n y 0 KPX n v -40 KPX n u 0 KPX o y -10 KPX o x -10 KPX o w -25 KPX o v -15 KPX o g 0 KPX p y 0 KPX period quoteright -95 KPX period quotedblright -95 KPX quotedblleft quoteleft 0 KPX quotedblleft A 0 KPX quotedblright space 0 KPX quoteleft quoteleft -74 KPX quoteleft A 0 KPX quoteright v -15 KPX quoteright t -37 KPX quoteright space -74 KPX quoteright s -74 KPX quoteright r -15 KPX quoteright quoteright -74 KPX quoteright quotedblright 0 KPX quoteright l 0 KPX quoteright d -15 KPX r y 0 KPX r v 0 KPX r u 0 KPX r t 0 KPX r s 0 KPX r r 0 KPX r q 0 KPX r period -65 KPX r p 0 KPX r o 0 KPX r n 0 KPX r m 0 KPX r l 0 KPX r k 0 KPX r i 0 KPX r hyphen 0 KPX r g 0 KPX r e 0 KPX r d 0 KPX r comma -65 KPX r c 0 KPX r a 0 KPX s w 0 KPX space quoteleft 0 KPX space quotedblleft 0 KPX space Y -70 KPX space W -70 KPX space V -70 KPX space T 0 KPX space A -37 KPX v period -37 KPX v o -15 KPX v e -15 KPX v comma -37 KPX v a 0 KPX w period -37 KPX w o -15 KPX w h 0 KPX w e -10 KPX w comma -37 KPX w a -10 KPX x e -10 KPX y period -37 KPX y o 0 KPX y e 0 KPX y comma -37 KPX y a 0 KPX z o 0 KPX z e 0 EndKernPairs EndKernData StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 172 207 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 187 207 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 167 207 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 172 207 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 157 192 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 167 207 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 167 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 172 207 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 187 207 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 187 207 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 172 207 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 33 207 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 53 207 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 48 207 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 33 207 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 210 207 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 200 207 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 230 207 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 215 207 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 200 207 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 215 207 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 112 207 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 210 207 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 230 207 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 230 207 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 200 207 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 154 207 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 169 207 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 207 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 84 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 84 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 74 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 74 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 84 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 84 0 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 56 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 56 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 56 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 46 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 46 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -42 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -37 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -37 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 97 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 84 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 69 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 74 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 84 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 112 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 112 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 97 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 102 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 56 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 41 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 13 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/ptmr8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Tue Mar 20 12:15:44 1990 Comment UniqueID 28416 Comment VMusage 30487 37379 FontName Times-Roman FullName Times Roman FamilyName Times Weight Roman ItalicAngle 0 IsFixedPitch false FontBBox -168 -218 1000 898 UnderlinePosition -100 UnderlineThickness 50 Version 001.007 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 662 XHeight 450 Ascender 683 Descender -217 StartCharMetrics 228 C 32 ; WX 250 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 130 -9 238 676 ; C 34 ; WX 408 ; N quotedbl ; B 77 431 331 676 ; C 35 ; WX 500 ; N numbersign ; B 5 0 496 662 ; C 36 ; WX 500 ; N dollar ; B 44 -87 457 727 ; C 37 ; WX 833 ; N percent ; B 61 -13 772 676 ; C 38 ; WX 778 ; N ampersand ; B 42 -13 750 676 ; C 39 ; WX 333 ; N quoteright ; B 79 433 218 676 ; C 40 ; WX 333 ; N parenleft ; B 48 -177 304 676 ; C 41 ; WX 333 ; N parenright ; B 29 -177 285 676 ; C 42 ; WX 500 ; N asterisk ; B 69 265 432 676 ; C 43 ; WX 564 ; N plus ; B 30 0 534 506 ; C 44 ; WX 250 ; N comma ; B 56 -141 195 102 ; C 45 ; WX 333 ; N hyphen ; B 39 194 285 257 ; C 46 ; WX 250 ; N period ; B 70 -11 181 100 ; C 47 ; WX 278 ; N slash ; B -9 -14 287 676 ; C 48 ; WX 500 ; N zero ; B 24 -14 476 676 ; C 49 ; WX 500 ; N one ; B 111 0 394 676 ; C 50 ; WX 500 ; N two ; B 30 0 475 676 ; C 51 ; WX 500 ; N three ; B 43 -14 431 676 ; C 52 ; WX 500 ; N four ; B 12 0 472 676 ; C 53 ; WX 500 ; N five ; B 32 -14 438 688 ; C 54 ; WX 500 ; N six ; B 34 -14 468 684 ; C 55 ; WX 500 ; N seven ; B 20 -8 449 662 ; C 56 ; WX 500 ; N eight ; B 56 -14 445 676 ; C 57 ; WX 500 ; N nine ; B 30 -22 459 676 ; C 58 ; WX 278 ; N colon ; B 81 -11 192 459 ; C 59 ; WX 278 ; N semicolon ; B 80 -141 219 459 ; C 60 ; WX 564 ; N less ; B 28 -8 536 514 ; C 61 ; WX 564 ; N equal ; B 30 120 534 386 ; C 62 ; WX 564 ; N greater ; B 28 -8 536 514 ; C 63 ; WX 444 ; N question ; B 68 -8 414 676 ; C 64 ; WX 921 ; N at ; B 116 -14 809 676 ; C 65 ; WX 722 ; N A ; B 15 0 706 674 ; C 66 ; WX 667 ; N B ; B 17 0 593 662 ; C 67 ; WX 667 ; N C ; B 28 -14 633 676 ; C 68 ; WX 722 ; N D ; B 16 0 685 662 ; C 69 ; WX 611 ; N E ; B 12 0 597 662 ; C 70 ; WX 556 ; N F ; B 12 0 546 662 ; C 71 ; WX 722 ; N G ; B 32 -14 709 676 ; C 72 ; WX 722 ; N H ; B 19 0 702 662 ; C 73 ; WX 333 ; N I ; B 18 0 315 662 ; C 74 ; WX 389 ; N J ; B 10 -14 370 662 ; C 75 ; WX 722 ; N K ; B 34 0 723 662 ; C 76 ; WX 611 ; N L ; B 12 0 598 662 ; C 77 ; WX 889 ; N M ; B 12 0 863 662 ; C 78 ; WX 722 ; N N ; B 12 -11 707 662 ; C 79 ; WX 722 ; N O ; B 34 -14 688 676 ; C 80 ; WX 556 ; N P ; B 16 0 542 662 ; C 81 ; WX 722 ; N Q ; B 34 -178 701 676 ; C 82 ; WX 667 ; N R ; B 17 0 659 662 ; C 83 ; WX 556 ; N S ; B 42 -14 491 676 ; C 84 ; WX 611 ; N T ; B 17 0 593 662 ; C 85 ; WX 722 ; N U ; B 14 -14 705 662 ; C 86 ; WX 722 ; N V ; B 16 -11 697 662 ; C 87 ; WX 944 ; N W ; B 5 -11 932 662 ; C 88 ; WX 722 ; N X ; B 10 0 704 662 ; C 89 ; WX 722 ; N Y ; B 22 0 703 662 ; C 90 ; WX 611 ; N Z ; B 9 0 597 662 ; C 91 ; WX 333 ; N bracketleft ; B 88 -156 299 662 ; C 92 ; WX 278 ; N backslash ; B -9 -14 287 676 ; C 93 ; WX 333 ; N bracketright ; B 34 -156 245 662 ; C 94 ; WX 469 ; N asciicircum ; B 24 297 446 662 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 333 ; N quoteleft ; B 115 433 254 676 ; C 97 ; WX 444 ; N a ; B 37 -10 442 460 ; C 98 ; WX 500 ; N b ; B 3 -10 468 683 ; C 99 ; WX 444 ; N c ; B 25 -10 412 460 ; C 100 ; WX 500 ; N d ; B 27 -10 491 683 ; C 101 ; WX 444 ; N e ; B 25 -10 424 460 ; C 102 ; WX 333 ; N f ; B 20 0 383 683 ; L i fi ; L l fl ; C 103 ; WX 500 ; N g ; B 28 -218 470 460 ; C 104 ; WX 500 ; N h ; B 9 0 487 683 ; C 105 ; WX 278 ; N i ; B 16 0 253 683 ; C 106 ; WX 278 ; N j ; B -70 -218 194 683 ; C 107 ; WX 500 ; N k ; B 7 0 505 683 ; C 108 ; WX 278 ; N l ; B 19 0 257 683 ; C 109 ; WX 778 ; N m ; B 16 0 775 460 ; C 110 ; WX 500 ; N n ; B 16 0 485 460 ; C 111 ; WX 500 ; N o ; B 29 -10 470 460 ; C 112 ; WX 500 ; N p ; B 5 -217 470 460 ; C 113 ; WX 500 ; N q ; B 24 -217 488 460 ; C 114 ; WX 333 ; N r ; B 5 0 335 460 ; C 115 ; WX 389 ; N s ; B 51 -10 348 460 ; C 116 ; WX 278 ; N t ; B 13 -10 279 579 ; C 117 ; WX 500 ; N u ; B 9 -10 479 450 ; C 118 ; WX 500 ; N v ; B 19 -14 477 450 ; C 119 ; WX 722 ; N w ; B 21 -14 694 450 ; C 120 ; WX 500 ; N x ; B 17 0 479 450 ; C 121 ; WX 500 ; N y ; B 14 -218 475 450 ; C 122 ; WX 444 ; N z ; B 27 0 418 450 ; C 123 ; WX 480 ; N braceleft ; B 100 -181 350 680 ; C 124 ; WX 200 ; N bar ; B 67 -14 133 676 ; C 125 ; WX 480 ; N braceright ; B 130 -181 380 680 ; C 126 ; WX 541 ; N asciitilde ; B 40 183 502 323 ; C 161 ; WX 333 ; N exclamdown ; B 97 -218 205 467 ; C 162 ; WX 500 ; N cent ; B 53 -138 448 579 ; C 163 ; WX 500 ; N sterling ; B 12 -8 490 676 ; C 164 ; WX 167 ; N fraction ; B -168 -14 331 676 ; C 165 ; WX 500 ; N yen ; B -53 0 512 662 ; C 166 ; WX 500 ; N florin ; B 7 -189 490 676 ; C 167 ; WX 500 ; N section ; B 70 -148 426 676 ; C 168 ; WX 500 ; N currency ; B -22 58 522 602 ; C 169 ; WX 180 ; N quotesingle ; B 48 431 133 676 ; C 170 ; WX 444 ; N quotedblleft ; B 43 433 414 676 ; C 171 ; WX 500 ; N guillemotleft ; B 42 33 456 416 ; C 172 ; WX 333 ; N guilsinglleft ; B 63 33 285 416 ; C 173 ; WX 333 ; N guilsinglright ; B 48 33 270 416 ; C 174 ; WX 556 ; N fi ; B 31 0 521 683 ; C 175 ; WX 556 ; N fl ; B 32 0 521 683 ; C 177 ; WX 500 ; N endash ; B 0 201 500 250 ; C 178 ; WX 500 ; N dagger ; B 59 -149 442 676 ; C 179 ; WX 500 ; N daggerdbl ; B 58 -153 442 676 ; C 180 ; WX 250 ; N periodcentered ; B 70 199 181 310 ; C 182 ; WX 453 ; N paragraph ; B -22 -154 450 662 ; C 183 ; WX 350 ; N bullet ; B 40 196 310 466 ; C 184 ; WX 333 ; N quotesinglbase ; B 79 -141 218 102 ; C 185 ; WX 444 ; N quotedblbase ; B 45 -141 416 102 ; C 186 ; WX 444 ; N quotedblright ; B 30 433 401 676 ; C 187 ; WX 500 ; N guillemotright ; B 44 33 458 416 ; C 188 ; WX 1000 ; N ellipsis ; B 111 -11 888 100 ; C 189 ; WX 1000 ; N perthousand ; B 7 -19 994 706 ; C 191 ; WX 444 ; N questiondown ; B 30 -218 376 466 ; C 193 ; WX 333 ; N grave ; B 19 507 242 678 ; C 194 ; WX 333 ; N acute ; B 93 507 317 678 ; C 195 ; WX 333 ; N circumflex ; B 11 507 322 674 ; C 196 ; WX 333 ; N tilde ; B 1 532 331 638 ; C 197 ; WX 333 ; N macron ; B 11 547 322 601 ; C 198 ; WX 333 ; N breve ; B 26 507 307 664 ; C 199 ; WX 333 ; N dotaccent ; B 118 523 216 623 ; C 200 ; WX 333 ; N dieresis ; B 18 523 315 623 ; C 202 ; WX 333 ; N ring ; B 67 512 266 711 ; C 203 ; WX 333 ; N cedilla ; B 52 -215 261 0 ; C 205 ; WX 333 ; N hungarumlaut ; B -3 507 377 678 ; C 206 ; WX 333 ; N ogonek ; B 64 -165 249 0 ; C 207 ; WX 333 ; N caron ; B 11 507 322 674 ; C 208 ; WX 1000 ; N emdash ; B 0 201 1000 250 ; C 225 ; WX 889 ; N AE ; B 0 0 863 662 ; C 227 ; WX 276 ; N ordfeminine ; B 4 394 270 676 ; C 232 ; WX 611 ; N Lslash ; B 12 0 598 662 ; C 233 ; WX 722 ; N Oslash ; B 34 -80 688 734 ; C 234 ; WX 889 ; N OE ; B 30 -6 885 668 ; C 235 ; WX 310 ; N ordmasculine ; B 6 394 304 676 ; C 241 ; WX 667 ; N ae ; B 38 -10 632 460 ; C 245 ; WX 278 ; N dotlessi ; B 16 0 253 460 ; C 248 ; WX 278 ; N lslash ; B 19 0 259 683 ; C 249 ; WX 500 ; N oslash ; B 29 -112 470 551 ; C 250 ; WX 722 ; N oe ; B 30 -10 690 460 ; C 251 ; WX 500 ; N germandbls ; B 12 -9 468 683 ; C -1 ; WX 611 ; N Zcaron ; B 9 0 597 886 ; C -1 ; WX 444 ; N ccedilla ; B 25 -215 412 460 ; C -1 ; WX 500 ; N ydieresis ; B 14 -218 475 623 ; C -1 ; WX 444 ; N atilde ; B 37 -10 442 638 ; C -1 ; WX 278 ; N icircumflex ; B -16 0 295 674 ; C -1 ; WX 300 ; N threesuperior ; B 15 262 291 676 ; C -1 ; WX 444 ; N ecircumflex ; B 25 -10 424 674 ; C -1 ; WX 500 ; N thorn ; B 5 -217 470 683 ; C -1 ; WX 444 ; N egrave ; B 25 -10 424 678 ; C -1 ; WX 300 ; N twosuperior ; B 1 270 296 676 ; C -1 ; WX 444 ; N eacute ; B 25 -10 424 678 ; C -1 ; WX 500 ; N otilde ; B 29 -10 470 638 ; C -1 ; WX 722 ; N Aacute ; B 15 0 706 890 ; C -1 ; WX 500 ; N ocircumflex ; B 29 -10 470 674 ; C -1 ; WX 500 ; N yacute ; B 14 -218 475 678 ; C -1 ; WX 500 ; N udieresis ; B 9 -10 479 623 ; C -1 ; WX 750 ; N threequarters ; B 15 -14 718 676 ; C -1 ; WX 444 ; N acircumflex ; B 37 -10 442 674 ; C -1 ; WX 722 ; N Eth ; B 16 0 685 662 ; C -1 ; WX 444 ; N edieresis ; B 25 -10 424 623 ; C -1 ; WX 500 ; N ugrave ; B 9 -10 479 678 ; C -1 ; WX 980 ; N trademark ; B 30 256 957 662 ; C -1 ; WX 500 ; N ograve ; B 29 -10 470 678 ; C -1 ; WX 389 ; N scaron ; B 39 -10 350 674 ; C -1 ; WX 333 ; N Idieresis ; B 18 0 315 835 ; C -1 ; WX 500 ; N uacute ; B 9 -10 479 678 ; C -1 ; WX 444 ; N agrave ; B 37 -10 442 678 ; C -1 ; WX 500 ; N ntilde ; B 16 0 485 638 ; C -1 ; WX 444 ; N aring ; B 37 -10 442 711 ; C -1 ; WX 444 ; N zcaron ; B 27 0 418 674 ; C -1 ; WX 333 ; N Icircumflex ; B 11 0 322 886 ; C -1 ; WX 722 ; N Ntilde ; B 12 -11 707 850 ; C -1 ; WX 500 ; N ucircumflex ; B 9 -10 479 674 ; C -1 ; WX 611 ; N Ecircumflex ; B 12 0 597 886 ; C -1 ; WX 333 ; N Iacute ; B 18 0 317 890 ; C -1 ; WX 667 ; N Ccedilla ; B 28 -215 633 676 ; C -1 ; WX 722 ; N Odieresis ; B 34 -14 688 835 ; C -1 ; WX 556 ; N Scaron ; B 42 -14 491 886 ; C -1 ; WX 611 ; N Edieresis ; B 12 0 597 835 ; C -1 ; WX 333 ; N Igrave ; B 18 0 315 890 ; C -1 ; WX 444 ; N adieresis ; B 37 -10 442 623 ; C -1 ; WX 722 ; N Ograve ; B 34 -14 688 890 ; C -1 ; WX 611 ; N Egrave ; B 12 0 597 890 ; C -1 ; WX 722 ; N Ydieresis ; B 22 0 703 835 ; C -1 ; WX 760 ; N registered ; B 38 -14 722 676 ; C -1 ; WX 722 ; N Otilde ; B 34 -14 688 850 ; C -1 ; WX 750 ; N onequarter ; B 37 -14 718 676 ; C -1 ; WX 722 ; N Ugrave ; B 14 -14 705 890 ; C -1 ; WX 722 ; N Ucircumflex ; B 14 -14 705 886 ; C -1 ; WX 556 ; N Thorn ; B 16 0 542 662 ; C -1 ; WX 564 ; N divide ; B 30 -10 534 516 ; C -1 ; WX 722 ; N Atilde ; B 15 0 706 850 ; C -1 ; WX 722 ; N Uacute ; B 14 -14 705 890 ; C -1 ; WX 722 ; N Ocircumflex ; B 34 -14 688 886 ; C -1 ; WX 564 ; N logicalnot ; B 30 108 534 386 ; C -1 ; WX 722 ; N Aring ; B 15 0 706 898 ; C -1 ; WX 278 ; N idieresis ; B -9 0 288 623 ; C -1 ; WX 278 ; N iacute ; B 16 0 290 678 ; C -1 ; WX 444 ; N aacute ; B 37 -10 442 678 ; C -1 ; WX 564 ; N plusminus ; B 30 0 534 506 ; C -1 ; WX 564 ; N multiply ; B 38 8 527 497 ; C -1 ; WX 722 ; N Udieresis ; B 14 -14 705 835 ; C -1 ; WX 564 ; N minus ; B 30 220 534 286 ; C -1 ; WX 300 ; N onesuperior ; B 57 270 248 676 ; C -1 ; WX 611 ; N Eacute ; B 12 0 597 890 ; C -1 ; WX 722 ; N Acircumflex ; B 15 0 706 886 ; C -1 ; WX 760 ; N copyright ; B 38 -14 722 676 ; C -1 ; WX 722 ; N Agrave ; B 15 0 706 890 ; C -1 ; WX 500 ; N odieresis ; B 29 -10 470 623 ; C -1 ; WX 500 ; N oacute ; B 29 -10 470 678 ; C -1 ; WX 400 ; N degree ; B 57 390 343 676 ; C -1 ; WX 278 ; N igrave ; B -8 0 253 678 ; C -1 ; WX 500 ; N mu ; B 36 -218 512 450 ; C -1 ; WX 722 ; N Oacute ; B 34 -14 688 890 ; C -1 ; WX 500 ; N eth ; B 29 -10 471 686 ; C -1 ; WX 722 ; N Adieresis ; B 15 0 706 835 ; C -1 ; WX 722 ; N Yacute ; B 22 0 703 890 ; C -1 ; WX 200 ; N brokenbar ; B 67 -14 133 676 ; C -1 ; WX 750 ; N onehalf ; B 31 -14 746 676 ; EndCharMetrics StartKernData StartKernPairs 283 KPX A y -92 KPX A w -92 KPX A v -74 KPX A u 0 KPX A quoteright -111 KPX A quotedblright 0 KPX A p 0 KPX A Y -105 KPX A W -90 KPX A V -135 KPX A U -55 KPX A T -111 KPX A Q -55 KPX A O -55 KPX A G -40 KPX A C -40 KPX B period 0 KPX B comma 0 KPX B U -10 KPX B A -35 KPX D period 0 KPX D comma 0 KPX D Y -55 KPX D W -30 KPX D V -40 KPX D A -40 KPX F r 0 KPX F period -80 KPX F o -15 KPX F i 0 KPX F e 0 KPX F comma -80 KPX F a -15 KPX F A -74 KPX G period 0 KPX G comma 0 KPX J u 0 KPX J period 0 KPX J o 0 KPX J e 0 KPX J comma 0 KPX J a 0 KPX J A -60 KPX K y -25 KPX K u -15 KPX K o -35 KPX K e -25 KPX K O -30 KPX L y -55 KPX L quoteright -92 KPX L quotedblright 0 KPX L Y -100 KPX L W -74 KPX L V -100 KPX L T -92 KPX N period 0 KPX N comma 0 KPX N A -35 KPX O period 0 KPX O comma 0 KPX O Y -50 KPX O X -40 KPX O W -35 KPX O V -50 KPX O T -40 KPX O A -35 KPX P period -111 KPX P o 0 KPX P e 0 KPX P comma -111 KPX P a -15 KPX P A -92 KPX Q period 0 KPX Q comma 0 KPX Q U -10 KPX R Y -65 KPX R W -55 KPX R V -80 KPX R U -40 KPX R T -60 KPX R O -40 KPX S period 0 KPX S comma 0 KPX T y -80 KPX T w -80 KPX T u -45 KPX T semicolon -55 KPX T r -35 KPX T period -74 KPX T o -80 KPX T i -35 KPX T hyphen -92 KPX T h 0 KPX T e -70 KPX T comma -74 KPX T colon -50 KPX T a -80 KPX T O -18 KPX T A -93 KPX U period 0 KPX U comma 0 KPX U A -40 KPX V u -75 KPX V semicolon -74 KPX V period -129 KPX V o -129 KPX V i -60 KPX V hyphen -100 KPX V e -111 KPX V comma -129 KPX V colon -74 KPX V a -111 KPX V O -40 KPX V G -15 KPX V A -135 KPX W y -73 KPX W u -50 KPX W semicolon -37 KPX W period -92 KPX W o -80 KPX W i -40 KPX W hyphen -65 KPX W h 0 KPX W e -80 KPX W comma -92 KPX W colon -37 KPX W a -80 KPX W O -10 KPX W A -120 KPX Y u -111 KPX Y semicolon -92 KPX Y period -129 KPX Y o -110 KPX Y i -55 KPX Y hyphen -111 KPX Y e -100 KPX Y comma -129 KPX Y colon -92 KPX Y a -100 KPX Y O -30 KPX Y A -120 KPX a y 0 KPX a w -15 KPX a v -20 KPX a t 0 KPX a p 0 KPX a g 0 KPX a b 0 KPX b y 0 KPX b v -15 KPX b u -20 KPX b period -40 KPX b l 0 KPX b comma 0 KPX b b 0 KPX c y -15 KPX c period 0 KPX c l 0 KPX c k 0 KPX c h 0 KPX c comma 0 KPX colon space 0 KPX comma space 0 KPX comma quoteright -70 KPX comma quotedblright -70 KPX d y 0 KPX d w 0 KPX d v 0 KPX d period 0 KPX d d 0 KPX d comma 0 KPX e y -15 KPX e x -15 KPX e w -25 KPX e v -25 KPX e period 0 KPX e p 0 KPX e g -15 KPX e comma 0 KPX e b 0 KPX f quoteright 55 KPX f quotedblright 0 KPX f period 0 KPX f o 0 KPX f l 0 KPX f i -20 KPX f f -25 KPX f e 0 KPX f dotlessi -50 KPX f comma 0 KPX f a -10 KPX g y 0 KPX g r 0 KPX g period 0 KPX g o 0 KPX g i 0 KPX g g 0 KPX g e 0 KPX g comma 0 KPX g a -5 KPX h y -5 KPX i v -25 KPX k y -15 KPX k o -10 KPX k e -10 KPX l y 0 KPX l w -10 KPX m y 0 KPX m u 0 KPX n y -15 KPX n v -40 KPX n u 0 KPX o y -10 KPX o x 0 KPX o w -25 KPX o v -15 KPX o g 0 KPX p y -10 KPX period quoteright -70 KPX period quotedblright -70 KPX quotedblleft quoteleft 0 KPX quotedblleft A -80 KPX quotedblright space 0 KPX quoteleft quoteleft -74 KPX quoteleft A -80 KPX quoteright v -50 KPX quoteright t -18 KPX quoteright space -74 KPX quoteright s -55 KPX quoteright r -50 KPX quoteright quoteright -74 KPX quoteright quotedblright 0 KPX quoteright l -10 KPX quoteright d -50 KPX r y 0 KPX r v 0 KPX r u 0 KPX r t 0 KPX r s 0 KPX r r 0 KPX r q 0 KPX r period -55 KPX r p 0 KPX r o 0 KPX r n 0 KPX r m 0 KPX r l 0 KPX r k 0 KPX r i 0 KPX r hyphen -20 KPX r g -18 KPX r e 0 KPX r d 0 KPX r comma -40 KPX r c 0 KPX r a 0 KPX s w 0 KPX space quoteleft 0 KPX space quotedblleft 0 KPX space Y -90 KPX space W -30 KPX space V -50 KPX space T -18 KPX space A -55 KPX v period -65 KPX v o -20 KPX v e -15 KPX v comma -65 KPX v a -25 KPX w period -65 KPX w o -10 KPX w h 0 KPX w e 0 KPX w comma -65 KPX w a -10 KPX x e -15 KPX y period -65 KPX y o 0 KPX y e 0 KPX y comma -65 KPX y a 0 KPX z o 0 KPX z e 0 EndKernPairs EndKernData StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 195 212 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 195 212 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 195 212 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 195 212 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 185 187 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 195 212 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 167 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 139 212 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 139 212 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 139 212 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 139 212 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 0 212 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 0 212 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 0 212 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 0 212 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 195 212 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 195 212 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 195 212 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 195 212 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 195 212 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 195 212 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 112 212 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 195 212 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 195 212 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 195 212 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 195 212 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 195 212 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 195 212 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 139 212 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 56 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 56 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 56 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 56 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 56 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 56 0 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 56 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 56 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 56 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 56 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 56 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -27 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -27 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -27 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 84 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 84 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 84 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 84 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 84 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 84 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 84 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 84 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 84 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 56 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/ptmri8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Tue Mar 20 13:14:56 1990 Comment UniqueID 28427 Comment VMusage 32912 39804 FontName Times-Italic FullName Times Italic FamilyName Times Weight Medium ItalicAngle -15.5 IsFixedPitch false FontBBox -169 -217 1010 883 UnderlinePosition -100 UnderlineThickness 50 Version 001.007 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 653 XHeight 441 Ascender 683 Descender -205 StartCharMetrics 228 C 32 ; WX 250 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 39 -11 302 667 ; C 34 ; WX 420 ; N quotedbl ; B 144 421 432 666 ; C 35 ; WX 500 ; N numbersign ; B 2 0 540 676 ; C 36 ; WX 500 ; N dollar ; B 31 -89 497 731 ; C 37 ; WX 833 ; N percent ; B 79 -13 790 676 ; C 38 ; WX 778 ; N ampersand ; B 76 -18 723 666 ; C 39 ; WX 333 ; N quoteright ; B 151 436 290 666 ; C 40 ; WX 333 ; N parenleft ; B 42 -181 315 669 ; C 41 ; WX 333 ; N parenright ; B 16 -180 289 669 ; C 42 ; WX 500 ; N asterisk ; B 128 255 492 666 ; C 43 ; WX 675 ; N plus ; B 86 0 590 506 ; C 44 ; WX 250 ; N comma ; B -4 -129 135 101 ; C 45 ; WX 333 ; N hyphen ; B 49 192 282 255 ; C 46 ; WX 250 ; N period ; B 27 -11 138 100 ; C 47 ; WX 278 ; N slash ; B -65 -18 386 666 ; C 48 ; WX 500 ; N zero ; B 32 -7 497 676 ; C 49 ; WX 500 ; N one ; B 49 0 409 676 ; C 50 ; WX 500 ; N two ; B 12 0 452 676 ; C 51 ; WX 500 ; N three ; B 15 -7 465 676 ; C 52 ; WX 500 ; N four ; B 1 0 479 676 ; C 53 ; WX 500 ; N five ; B 15 -7 491 666 ; C 54 ; WX 500 ; N six ; B 30 -7 521 686 ; C 55 ; WX 500 ; N seven ; B 75 -8 537 666 ; C 56 ; WX 500 ; N eight ; B 30 -7 493 676 ; C 57 ; WX 500 ; N nine ; B 23 -17 492 676 ; C 58 ; WX 333 ; N colon ; B 50 -11 261 441 ; C 59 ; WX 333 ; N semicolon ; B 27 -129 261 441 ; C 60 ; WX 675 ; N less ; B 84 -8 592 514 ; C 61 ; WX 675 ; N equal ; B 86 120 590 386 ; C 62 ; WX 675 ; N greater ; B 84 -8 592 514 ; C 63 ; WX 500 ; N question ; B 132 -12 472 664 ; C 64 ; WX 920 ; N at ; B 118 -18 806 666 ; C 65 ; WX 611 ; N A ; B -51 0 564 668 ; C 66 ; WX 611 ; N B ; B -8 0 588 653 ; C 67 ; WX 667 ; N C ; B 66 -18 689 666 ; C 68 ; WX 722 ; N D ; B -8 0 700 653 ; C 69 ; WX 611 ; N E ; B -1 0 634 653 ; C 70 ; WX 611 ; N F ; B 8 0 645 653 ; C 71 ; WX 722 ; N G ; B 52 -18 722 666 ; C 72 ; WX 722 ; N H ; B -8 0 767 653 ; C 73 ; WX 333 ; N I ; B -8 0 384 653 ; C 74 ; WX 444 ; N J ; B -6 -18 491 653 ; C 75 ; WX 667 ; N K ; B 7 0 722 653 ; C 76 ; WX 556 ; N L ; B -8 0 559 653 ; C 77 ; WX 833 ; N M ; B -18 0 873 653 ; C 78 ; WX 667 ; N N ; B -20 -15 727 653 ; C 79 ; WX 722 ; N O ; B 60 -18 699 666 ; C 80 ; WX 611 ; N P ; B 0 0 605 653 ; C 81 ; WX 722 ; N Q ; B 59 -182 699 666 ; C 82 ; WX 611 ; N R ; B -13 0 588 653 ; C 83 ; WX 500 ; N S ; B 17 -18 508 667 ; C 84 ; WX 556 ; N T ; B 59 0 633 653 ; C 85 ; WX 722 ; N U ; B 102 -18 765 653 ; C 86 ; WX 611 ; N V ; B 76 -18 688 653 ; C 87 ; WX 833 ; N W ; B 71 -18 906 653 ; C 88 ; WX 611 ; N X ; B -29 0 655 653 ; C 89 ; WX 556 ; N Y ; B 78 0 633 653 ; C 90 ; WX 556 ; N Z ; B -6 0 606 653 ; C 91 ; WX 389 ; N bracketleft ; B 21 -153 391 663 ; C 92 ; WX 278 ; N backslash ; B -41 -18 319 666 ; C 93 ; WX 389 ; N bracketright ; B 12 -153 382 663 ; C 94 ; WX 422 ; N asciicircum ; B 0 301 422 666 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 333 ; N quoteleft ; B 171 436 310 666 ; C 97 ; WX 500 ; N a ; B 17 -11 476 441 ; C 98 ; WX 500 ; N b ; B 23 -11 473 683 ; C 99 ; WX 444 ; N c ; B 30 -11 425 441 ; C 100 ; WX 500 ; N d ; B 15 -13 527 683 ; C 101 ; WX 444 ; N e ; B 31 -11 412 441 ; C 102 ; WX 278 ; N f ; B -147 -207 424 678 ; L i fi ; L l fl ; C 103 ; WX 500 ; N g ; B 8 -206 472 441 ; C 104 ; WX 500 ; N h ; B 19 -9 478 683 ; C 105 ; WX 278 ; N i ; B 49 -11 264 654 ; C 106 ; WX 278 ; N j ; B -124 -207 276 654 ; C 107 ; WX 444 ; N k ; B 14 -11 461 683 ; C 108 ; WX 278 ; N l ; B 41 -11 279 683 ; C 109 ; WX 722 ; N m ; B 12 -9 704 441 ; C 110 ; WX 500 ; N n ; B 14 -9 474 441 ; C 111 ; WX 500 ; N o ; B 27 -11 468 441 ; C 112 ; WX 500 ; N p ; B -75 -205 469 441 ; C 113 ; WX 500 ; N q ; B 25 -209 483 441 ; C 114 ; WX 389 ; N r ; B 45 0 412 441 ; C 115 ; WX 389 ; N s ; B 16 -13 366 442 ; C 116 ; WX 278 ; N t ; B 37 -11 296 546 ; C 117 ; WX 500 ; N u ; B 42 -11 475 441 ; C 118 ; WX 444 ; N v ; B 21 -18 426 441 ; C 119 ; WX 667 ; N w ; B 16 -18 648 441 ; C 120 ; WX 444 ; N x ; B -27 -11 447 441 ; C 121 ; WX 444 ; N y ; B -24 -206 426 441 ; C 122 ; WX 389 ; N z ; B -2 -81 380 428 ; C 123 ; WX 400 ; N braceleft ; B 51 -177 407 687 ; C 124 ; WX 275 ; N bar ; B 105 -18 171 666 ; C 125 ; WX 400 ; N braceright ; B -7 -177 349 687 ; C 126 ; WX 541 ; N asciitilde ; B 40 183 502 323 ; C 161 ; WX 389 ; N exclamdown ; B 59 -205 322 473 ; C 162 ; WX 500 ; N cent ; B 77 -143 472 560 ; C 163 ; WX 500 ; N sterling ; B 10 -6 517 670 ; C 164 ; WX 167 ; N fraction ; B -169 -10 337 676 ; C 165 ; WX 500 ; N yen ; B 27 0 603 653 ; C 166 ; WX 500 ; N florin ; B 25 -182 507 682 ; C 167 ; WX 500 ; N section ; B 53 -162 461 666 ; C 168 ; WX 500 ; N currency ; B -22 53 522 597 ; C 169 ; WX 214 ; N quotesingle ; B 132 421 241 666 ; C 170 ; WX 556 ; N quotedblleft ; B 166 436 514 666 ; C 171 ; WX 500 ; N guillemotleft ; B 53 37 445 403 ; C 172 ; WX 333 ; N guilsinglleft ; B 51 37 281 403 ; C 173 ; WX 333 ; N guilsinglright ; B 52 37 282 403 ; C 174 ; WX 500 ; N fi ; B -141 -207 481 681 ; C 175 ; WX 500 ; N fl ; B -141 -204 518 682 ; C 177 ; WX 500 ; N endash ; B -6 197 505 243 ; C 178 ; WX 500 ; N dagger ; B 101 -159 488 666 ; C 179 ; WX 500 ; N daggerdbl ; B 22 -143 491 666 ; C 180 ; WX 250 ; N periodcentered ; B 70 199 181 310 ; C 182 ; WX 523 ; N paragraph ; B 55 -123 616 653 ; C 183 ; WX 350 ; N bullet ; B 40 191 310 461 ; C 184 ; WX 333 ; N quotesinglbase ; B 44 -129 183 101 ; C 185 ; WX 556 ; N quotedblbase ; B 57 -129 405 101 ; C 186 ; WX 556 ; N quotedblright ; B 151 436 499 666 ; C 187 ; WX 500 ; N guillemotright ; B 55 37 447 403 ; C 188 ; WX 889 ; N ellipsis ; B 57 -11 762 100 ; C 189 ; WX 1000 ; N perthousand ; B 25 -19 1010 706 ; C 191 ; WX 500 ; N questiondown ; B 28 -205 368 471 ; C 193 ; WX 333 ; N grave ; B 121 492 311 664 ; C 194 ; WX 333 ; N acute ; B 180 494 403 664 ; C 195 ; WX 333 ; N circumflex ; B 91 492 385 661 ; C 196 ; WX 333 ; N tilde ; B 100 517 427 624 ; C 197 ; WX 333 ; N macron ; B 99 532 411 583 ; C 198 ; WX 333 ; N breve ; B 117 492 418 650 ; C 199 ; WX 333 ; N dotaccent ; B 207 508 305 606 ; C 200 ; WX 333 ; N dieresis ; B 107 508 405 606 ; C 202 ; WX 333 ; N ring ; B 155 492 355 691 ; C 203 ; WX 333 ; N cedilla ; B -30 -217 182 0 ; C 205 ; WX 333 ; N hungarumlaut ; B 93 494 486 664 ; C 206 ; WX 333 ; N ogonek ; B -20 -169 200 40 ; C 207 ; WX 333 ; N caron ; B 121 492 426 661 ; C 208 ; WX 889 ; N emdash ; B -6 197 894 243 ; C 225 ; WX 889 ; N AE ; B -27 0 911 653 ; C 227 ; WX 276 ; N ordfeminine ; B 42 406 352 676 ; C 232 ; WX 556 ; N Lslash ; B -8 0 559 653 ; C 233 ; WX 722 ; N Oslash ; B 60 -105 699 722 ; C 234 ; WX 944 ; N OE ; B 49 -8 964 666 ; C 235 ; WX 310 ; N ordmasculine ; B 67 406 362 676 ; C 241 ; WX 667 ; N ae ; B 23 -11 640 441 ; C 245 ; WX 278 ; N dotlessi ; B 49 -11 235 441 ; C 248 ; WX 278 ; N lslash ; B 37 -11 307 683 ; C 249 ; WX 500 ; N oslash ; B 28 -135 469 554 ; C 250 ; WX 667 ; N oe ; B 20 -12 646 441 ; C 251 ; WX 500 ; N germandbls ; B -168 -207 493 679 ; C -1 ; WX 556 ; N Zcaron ; B -6 0 606 873 ; C -1 ; WX 444 ; N ccedilla ; B 26 -217 425 441 ; C -1 ; WX 444 ; N ydieresis ; B -24 -206 441 606 ; C -1 ; WX 500 ; N atilde ; B 17 -11 511 624 ; C -1 ; WX 278 ; N icircumflex ; B 34 -11 328 661 ; C -1 ; WX 300 ; N threesuperior ; B 43 268 339 676 ; C -1 ; WX 444 ; N ecircumflex ; B 31 -11 441 661 ; C -1 ; WX 500 ; N thorn ; B -75 -205 469 683 ; C -1 ; WX 444 ; N egrave ; B 31 -11 412 664 ; C -1 ; WX 300 ; N twosuperior ; B 33 271 324 676 ; C -1 ; WX 444 ; N eacute ; B 31 -11 459 664 ; C -1 ; WX 500 ; N otilde ; B 27 -11 496 624 ; C -1 ; WX 611 ; N Aacute ; B -51 0 564 876 ; C -1 ; WX 500 ; N ocircumflex ; B 27 -11 468 661 ; C -1 ; WX 444 ; N yacute ; B -24 -206 459 664 ; C -1 ; WX 500 ; N udieresis ; B 42 -11 479 606 ; C -1 ; WX 750 ; N threequarters ; B 23 -10 736 676 ; C -1 ; WX 500 ; N acircumflex ; B 17 -11 476 661 ; C -1 ; WX 722 ; N Eth ; B -8 0 700 653 ; C -1 ; WX 444 ; N edieresis ; B 31 -11 451 606 ; C -1 ; WX 500 ; N ugrave ; B 42 -11 475 664 ; C -1 ; WX 980 ; N trademark ; B 30 247 957 653 ; C -1 ; WX 500 ; N ograve ; B 27 -11 468 664 ; C -1 ; WX 389 ; N scaron ; B 16 -13 454 661 ; C -1 ; WX 333 ; N Idieresis ; B -8 0 435 818 ; C -1 ; WX 500 ; N uacute ; B 42 -11 477 664 ; C -1 ; WX 500 ; N agrave ; B 17 -11 476 664 ; C -1 ; WX 500 ; N ntilde ; B 14 -9 476 624 ; C -1 ; WX 500 ; N aring ; B 17 -11 476 691 ; C -1 ; WX 389 ; N zcaron ; B -2 -81 434 661 ; C -1 ; WX 333 ; N Icircumflex ; B -8 0 425 873 ; C -1 ; WX 667 ; N Ntilde ; B -20 -15 727 836 ; C -1 ; WX 500 ; N ucircumflex ; B 42 -11 475 661 ; C -1 ; WX 611 ; N Ecircumflex ; B -1 0 634 873 ; C -1 ; WX 333 ; N Iacute ; B -8 0 413 876 ; C -1 ; WX 667 ; N Ccedilla ; B 66 -217 689 666 ; C -1 ; WX 722 ; N Odieresis ; B 60 -18 699 818 ; C -1 ; WX 500 ; N Scaron ; B 17 -18 520 873 ; C -1 ; WX 611 ; N Edieresis ; B -1 0 634 818 ; C -1 ; WX 333 ; N Igrave ; B -8 0 384 876 ; C -1 ; WX 500 ; N adieresis ; B 17 -11 489 606 ; C -1 ; WX 722 ; N Ograve ; B 60 -18 699 876 ; C -1 ; WX 611 ; N Egrave ; B -1 0 634 876 ; C -1 ; WX 556 ; N Ydieresis ; B 78 0 633 818 ; C -1 ; WX 760 ; N registered ; B 41 -18 719 666 ; C -1 ; WX 722 ; N Otilde ; B 60 -18 699 836 ; C -1 ; WX 750 ; N onequarter ; B 33 -10 736 676 ; C -1 ; WX 722 ; N Ugrave ; B 102 -18 765 876 ; C -1 ; WX 722 ; N Ucircumflex ; B 102 -18 765 873 ; C -1 ; WX 611 ; N Thorn ; B 0 0 569 653 ; C -1 ; WX 675 ; N divide ; B 86 -11 590 517 ; C -1 ; WX 611 ; N Atilde ; B -51 0 566 836 ; C -1 ; WX 722 ; N Uacute ; B 102 -18 765 876 ; C -1 ; WX 722 ; N Ocircumflex ; B 60 -18 699 873 ; C -1 ; WX 675 ; N logicalnot ; B 86 108 590 386 ; C -1 ; WX 611 ; N Aring ; B -51 0 564 883 ; C -1 ; WX 278 ; N idieresis ; B 49 -11 353 606 ; C -1 ; WX 278 ; N iacute ; B 49 -11 356 664 ; C -1 ; WX 500 ; N aacute ; B 17 -11 487 664 ; C -1 ; WX 675 ; N plusminus ; B 86 0 590 506 ; C -1 ; WX 675 ; N multiply ; B 93 8 582 497 ; C -1 ; WX 722 ; N Udieresis ; B 102 -18 765 818 ; C -1 ; WX 675 ; N minus ; B 86 220 590 286 ; C -1 ; WX 300 ; N onesuperior ; B 43 271 284 676 ; C -1 ; WX 611 ; N Eacute ; B -1 0 634 876 ; C -1 ; WX 611 ; N Acircumflex ; B -51 0 564 873 ; C -1 ; WX 760 ; N copyright ; B 41 -18 719 666 ; C -1 ; WX 611 ; N Agrave ; B -51 0 564 876 ; C -1 ; WX 500 ; N odieresis ; B 27 -11 489 606 ; C -1 ; WX 500 ; N oacute ; B 27 -11 487 664 ; C -1 ; WX 400 ; N degree ; B 101 390 387 676 ; C -1 ; WX 278 ; N igrave ; B 49 -11 284 664 ; C -1 ; WX 500 ; N mu ; B -30 -209 497 428 ; C -1 ; WX 722 ; N Oacute ; B 60 -18 699 876 ; C -1 ; WX 500 ; N eth ; B 27 -11 482 683 ; C -1 ; WX 611 ; N Adieresis ; B -51 0 564 818 ; C -1 ; WX 556 ; N Yacute ; B 78 0 633 876 ; C -1 ; WX 275 ; N brokenbar ; B 105 -18 171 666 ; C -1 ; WX 750 ; N onehalf ; B 34 -10 749 676 ; EndCharMetrics StartKernData StartKernPairs 283 KPX A y -55 KPX A w -55 KPX A v -55 KPX A u -20 KPX A quoteright -37 KPX A quotedblright 0 KPX A p 0 KPX A Y -55 KPX A W -95 KPX A V -105 KPX A U -50 KPX A T -37 KPX A Q -40 KPX A O -40 KPX A G -35 KPX A C -30 KPX B period 0 KPX B comma 0 KPX B U -10 KPX B A -25 KPX D period 0 KPX D comma 0 KPX D Y -40 KPX D W -40 KPX D V -40 KPX D A -35 KPX F r -55 KPX F period -135 KPX F o -105 KPX F i -45 KPX F e -75 KPX F comma -135 KPX F a -75 KPX F A -115 KPX G period 0 KPX G comma 0 KPX J u -35 KPX J period -25 KPX J o -25 KPX J e -25 KPX J comma -25 KPX J a -35 KPX J A -40 KPX K y -40 KPX K u -40 KPX K o -40 KPX K e -35 KPX K O -50 KPX L y -30 KPX L quoteright -37 KPX L quotedblright 0 KPX L Y -20 KPX L W -55 KPX L V -55 KPX L T -20 KPX N period 0 KPX N comma 0 KPX N A -27 KPX O period 0 KPX O comma 0 KPX O Y -50 KPX O X -40 KPX O W -50 KPX O V -50 KPX O T -40 KPX O A -55 KPX P period -135 KPX P o -80 KPX P e -80 KPX P comma -135 KPX P a -80 KPX P A -90 KPX Q period 0 KPX Q comma 0 KPX Q U -10 KPX R Y -18 KPX R W -18 KPX R V -18 KPX R U -40 KPX R T 0 KPX R O -40 KPX S period 0 KPX S comma 0 KPX T y -74 KPX T w -74 KPX T u -55 KPX T semicolon -65 KPX T r -55 KPX T period -74 KPX T o -92 KPX T i -55 KPX T hyphen -74 KPX T h 0 KPX T e -92 KPX T comma -74 KPX T colon -55 KPX T a -92 KPX T O -18 KPX T A -50 KPX U period -25 KPX U comma -25 KPX U A -40 KPX V u -74 KPX V semicolon -74 KPX V period -129 KPX V o -111 KPX V i -74 KPX V hyphen -55 KPX V e -111 KPX V comma -129 KPX V colon -65 KPX V a -111 KPX V O -30 KPX V G 0 KPX V A -60 KPX W y -70 KPX W u -55 KPX W semicolon -65 KPX W period -92 KPX W o -92 KPX W i -55 KPX W hyphen -37 KPX W h 0 KPX W e -92 KPX W comma -92 KPX W colon -65 KPX W a -92 KPX W O -25 KPX W A -60 KPX Y u -92 KPX Y semicolon -65 KPX Y period -92 KPX Y o -92 KPX Y i -74 KPX Y hyphen -74 KPX Y e -92 KPX Y comma -92 KPX Y colon -65 KPX Y a -92 KPX Y O -15 KPX Y A -50 KPX a y 0 KPX a w 0 KPX a v 0 KPX a t 0 KPX a p 0 KPX a g -10 KPX a b 0 KPX b y 0 KPX b v 0 KPX b u -20 KPX b period -40 KPX b l 0 KPX b comma 0 KPX b b 0 KPX c y 0 KPX c period 0 KPX c l 0 KPX c k -20 KPX c h -15 KPX c comma 0 KPX colon space 0 KPX comma space 0 KPX comma quoteright -140 KPX comma quotedblright -140 KPX d y 0 KPX d w 0 KPX d v 0 KPX d period 0 KPX d d 0 KPX d comma 0 KPX e y -30 KPX e x -20 KPX e w -15 KPX e v -15 KPX e period -15 KPX e p 0 KPX e g -40 KPX e comma -10 KPX e b 0 KPX f quoteright 92 KPX f quotedblright 0 KPX f period -15 KPX f o 0 KPX f l 0 KPX f i -20 KPX f f -18 KPX f e 0 KPX f dotlessi -60 KPX f comma -10 KPX f a 0 KPX g y 0 KPX g r 0 KPX g period -15 KPX g o 0 KPX g i 0 KPX g g -10 KPX g e -10 KPX g comma -10 KPX g a 0 KPX h y 0 KPX i v 0 KPX k y -10 KPX k o -10 KPX k e -10 KPX l y 0 KPX l w 0 KPX m y 0 KPX m u 0 KPX n y 0 KPX n v -40 KPX n u 0 KPX o y 0 KPX o x 0 KPX o w 0 KPX o v -10 KPX o g -10 KPX p y 0 KPX period quoteright -140 KPX period quotedblright -140 KPX quotedblleft quoteleft 0 KPX quotedblleft A 0 KPX quotedblright space 0 KPX quoteleft quoteleft -111 KPX quoteleft A 0 KPX quoteright v -10 KPX quoteright t -30 KPX quoteright space -111 KPX quoteright s -40 KPX quoteright r -25 KPX quoteright quoteright -111 KPX quoteright quotedblright 0 KPX quoteright l 0 KPX quoteright d -25 KPX r y 0 KPX r v 0 KPX r u 0 KPX r t 0 KPX r s -10 KPX r r 0 KPX r q -37 KPX r period -111 KPX r p 0 KPX r o -45 KPX r n 0 KPX r m 0 KPX r l 0 KPX r k 0 KPX r i 0 KPX r hyphen -20 KPX r g -37 KPX r e -37 KPX r d -37 KPX r comma -111 KPX r c -37 KPX r a -15 KPX s w 0 KPX space quoteleft 0 KPX space quotedblleft 0 KPX space Y -75 KPX space W -40 KPX space V -35 KPX space T -18 KPX space A -18 KPX v period -74 KPX v o 0 KPX v e 0 KPX v comma -74 KPX v a 0 KPX w period -74 KPX w o 0 KPX w h 0 KPX w e 0 KPX w comma -74 KPX w a 0 KPX x e 0 KPX y period -55 KPX y o 0 KPX y e 0 KPX y comma -55 KPX y a 0 KPX z o 0 KPX z e 0 EndKernPairs EndKernData StartComposites 58 CC Aacute 2 ; PCC A 0 0 ; PCC acute 139 212 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 144 212 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 139 212 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 149 212 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 129 192 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 139 212 ; CC Ccedilla 2 ; PCC C 0 0 ; PCC cedilla 167 0 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 149 212 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 169 212 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 159 212 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 149 212 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 10 212 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 40 212 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 30 212 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 10 212 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 177 212 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 195 212 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 230 212 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 230 212 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 205 212 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 215 212 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 94 212 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 195 212 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 215 212 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 225 212 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 215 212 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 132 212 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 142 212 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 112 212 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 84 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 84 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 84 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 84 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 84 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 84 0 ; CC ccedilla 2 ; PCC c 0 0 ; PCC cedilla 56 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 56 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex 56 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis 46 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 56 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -47 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -57 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -52 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -27 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 49 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 84 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 74 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 84 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 84 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde 69 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron 28 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 74 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 74 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 74 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 84 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 56 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 36 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 8 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/putb8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1989, 1991 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Fri Jan 17 15:08:52 1992 Comment UniqueID 37705 Comment VMusage 33078 39970 FontName Utopia-Bold FullName Utopia Bold FamilyName Utopia Weight Bold ItalicAngle 0 IsFixedPitch false FontBBox -155 -250 1249 916 UnderlinePosition -100 UnderlineThickness 50 Version 001.002 Notice Copyright (c) 1989, 1991 Adobe Systems Incorporated. All Rights Reserved.Utopia is a registered trademark of Adobe Systems Incorporated. EncodingScheme AdobeStandardEncoding CapHeight 692 XHeight 490 Ascender 742 Descender -230 StartCharMetrics 228 C 32 ; WX 210 ; N space ; B 0 0 0 0 ; C 33 ; WX 278 ; N exclam ; B 47 -12 231 707 ; C 34 ; WX 473 ; N quotedbl ; B 71 407 402 707 ; C 35 ; WX 560 ; N numbersign ; B 14 0 547 668 ; C 36 ; WX 560 ; N dollar ; B 38 -104 524 748 ; C 37 ; WX 887 ; N percent ; B 40 -31 847 701 ; C 38 ; WX 748 ; N ampersand ; B 45 -12 734 680 ; C 39 ; WX 252 ; N quoteright ; B 40 387 212 707 ; C 40 ; WX 365 ; N parenleft ; B 99 -135 344 699 ; C 41 ; WX 365 ; N parenright ; B 21 -135 266 699 ; C 42 ; WX 442 ; N asterisk ; B 40 315 402 707 ; C 43 ; WX 600 ; N plus ; B 58 0 542 490 ; C 44 ; WX 280 ; N comma ; B 40 -167 226 180 ; C 45 ; WX 392 ; N hyphen ; B 65 203 328 298 ; C 46 ; WX 280 ; N period ; B 48 -12 232 174 ; C 47 ; WX 378 ; N slash ; B 34 -15 344 707 ; C 48 ; WX 560 ; N zero ; B 31 -12 530 680 ; C 49 ; WX 560 ; N one ; B 102 0 459 680 ; C 50 ; WX 560 ; N two ; B 30 0 539 680 ; C 51 ; WX 560 ; N three ; B 27 -12 519 680 ; C 52 ; WX 560 ; N four ; B 19 0 533 668 ; C 53 ; WX 560 ; N five ; B 43 -12 519 668 ; C 54 ; WX 560 ; N six ; B 30 -12 537 680 ; C 55 ; WX 560 ; N seven ; B 34 -12 530 668 ; C 56 ; WX 560 ; N eight ; B 27 -12 533 680 ; C 57 ; WX 560 ; N nine ; B 34 -12 523 680 ; C 58 ; WX 280 ; N colon ; B 48 -12 232 490 ; C 59 ; WX 280 ; N semicolon ; B 40 -167 232 490 ; C 60 ; WX 600 ; N less ; B 61 5 539 493 ; C 61 ; WX 600 ; N equal ; B 58 103 542 397 ; C 62 ; WX 600 ; N greater ; B 61 5 539 493 ; C 63 ; WX 456 ; N question ; B 20 -12 433 707 ; C 64 ; WX 833 ; N at ; B 45 -15 797 707 ; C 65 ; WX 644 ; N A ; B -28 0 663 692 ; C 66 ; WX 683 ; N B ; B 33 0 645 692 ; C 67 ; WX 689 ; N C ; B 42 -15 654 707 ; C 68 ; WX 777 ; N D ; B 33 0 735 692 ; C 69 ; WX 629 ; N E ; B 33 0 604 692 ; C 70 ; WX 593 ; N F ; B 37 0 568 692 ; C 71 ; WX 726 ; N G ; B 42 -15 709 707 ; C 72 ; WX 807 ; N H ; B 33 0 774 692 ; C 73 ; WX 384 ; N I ; B 33 0 351 692 ; C 74 ; WX 386 ; N J ; B 6 -114 361 692 ; C 75 ; WX 707 ; N K ; B 33 -6 719 692 ; C 76 ; WX 585 ; N L ; B 33 0 584 692 ; C 77 ; WX 918 ; N M ; B 23 0 885 692 ; C 78 ; WX 739 ; N N ; B 25 0 719 692 ; C 79 ; WX 768 ; N O ; B 42 -15 726 707 ; C 80 ; WX 650 ; N P ; B 33 0 623 692 ; C 81 ; WX 768 ; N Q ; B 42 -193 726 707 ; C 82 ; WX 684 ; N R ; B 33 0 686 692 ; C 83 ; WX 561 ; N S ; B 42 -15 533 707 ; C 84 ; WX 624 ; N T ; B 15 0 609 692 ; C 85 ; WX 786 ; N U ; B 29 -15 757 692 ; C 86 ; WX 645 ; N V ; B -16 0 679 692 ; C 87 ; WX 933 ; N W ; B -10 0 960 692 ; C 88 ; WX 634 ; N X ; B -19 0 671 692 ; C 89 ; WX 617 ; N Y ; B -12 0 655 692 ; C 90 ; WX 614 ; N Z ; B 0 0 606 692 ; C 91 ; WX 335 ; N bracketleft ; B 123 -128 308 692 ; C 92 ; WX 379 ; N backslash ; B 34 -15 345 707 ; C 93 ; WX 335 ; N bracketright ; B 27 -128 212 692 ; C 94 ; WX 600 ; N asciicircum ; B 56 215 544 668 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 252 ; N quoteleft ; B 40 399 212 719 ; C 97 ; WX 544 ; N a ; B 41 -12 561 502 ; C 98 ; WX 605 ; N b ; B 15 -12 571 742 ; C 99 ; WX 494 ; N c ; B 34 -12 484 502 ; C 100 ; WX 605 ; N d ; B 34 -12 596 742 ; C 101 ; WX 519 ; N e ; B 34 -12 505 502 ; C 102 ; WX 342 ; N f ; B 27 0 421 742 ; L i fi ; L l fl ; C 103 ; WX 533 ; N g ; B 25 -242 546 512 ; C 104 ; WX 631 ; N h ; B 19 0 622 742 ; C 105 ; WX 316 ; N i ; B 26 0 307 720 ; C 106 ; WX 316 ; N j ; B -12 -232 260 720 ; C 107 ; WX 582 ; N k ; B 19 0 595 742 ; C 108 ; WX 309 ; N l ; B 19 0 300 742 ; C 109 ; WX 948 ; N m ; B 26 0 939 502 ; C 110 ; WX 638 ; N n ; B 26 0 629 502 ; C 111 ; WX 585 ; N o ; B 34 -12 551 502 ; C 112 ; WX 615 ; N p ; B 19 -230 581 502 ; C 113 ; WX 597 ; N q ; B 34 -230 596 502 ; C 114 ; WX 440 ; N r ; B 26 0 442 502 ; C 115 ; WX 446 ; N s ; B 38 -12 425 502 ; C 116 ; WX 370 ; N t ; B 32 -12 373 616 ; C 117 ; WX 629 ; N u ; B 23 -12 620 502 ; C 118 ; WX 520 ; N v ; B -8 0 546 490 ; C 119 ; WX 774 ; N w ; B -10 0 802 490 ; C 120 ; WX 522 ; N x ; B -15 0 550 490 ; C 121 ; WX 524 ; N y ; B -12 -242 557 490 ; C 122 ; WX 483 ; N z ; B -1 0 480 490 ; C 123 ; WX 365 ; N braceleft ; B 74 -128 325 692 ; C 124 ; WX 284 ; N bar ; B 94 -250 190 750 ; C 125 ; WX 365 ; N braceright ; B 40 -128 291 692 ; C 126 ; WX 600 ; N asciitilde ; B 50 158 551 339 ; C 161 ; WX 278 ; N exclamdown ; B 47 -217 231 502 ; C 162 ; WX 560 ; N cent ; B 39 -15 546 678 ; C 163 ; WX 560 ; N sterling ; B 21 0 555 679 ; C 164 ; WX 100 ; N fraction ; B -155 -27 255 695 ; C 165 ; WX 560 ; N yen ; B 3 0 562 668 ; C 166 ; WX 560 ; N florin ; B -40 -135 562 691 ; C 167 ; WX 566 ; N section ; B 35 -115 531 707 ; C 168 ; WX 560 ; N currency ; B 21 73 539 596 ; C 169 ; WX 252 ; N quotesingle ; B 57 407 196 707 ; C 170 ; WX 473 ; N quotedblleft ; B 40 399 433 719 ; C 171 ; WX 487 ; N guillemotleft ; B 40 37 452 464 ; C 172 ; WX 287 ; N guilsinglleft ; B 40 37 252 464 ; C 173 ; WX 287 ; N guilsinglright ; B 35 37 247 464 ; C 174 ; WX 639 ; N fi ; B 27 0 630 742 ; C 175 ; WX 639 ; N fl ; B 27 0 630 742 ; C 177 ; WX 500 ; N endash ; B 0 209 500 292 ; C 178 ; WX 510 ; N dagger ; B 35 -125 475 707 ; C 179 ; WX 486 ; N daggerdbl ; B 35 -119 451 707 ; C 180 ; WX 280 ; N periodcentered ; B 48 156 232 342 ; C 182 ; WX 552 ; N paragraph ; B 35 -101 527 692 ; C 183 ; WX 455 ; N bullet ; B 50 174 405 529 ; C 184 ; WX 252 ; N quotesinglbase ; B 40 -153 212 167 ; C 185 ; WX 473 ; N quotedblbase ; B 40 -153 433 167 ; C 186 ; WX 473 ; N quotedblright ; B 40 387 433 707 ; C 187 ; WX 487 ; N guillemotright ; B 35 37 447 464 ; C 188 ; WX 1000 ; N ellipsis ; B 75 -12 925 174 ; C 189 ; WX 1289 ; N perthousand ; B 40 -31 1249 701 ; C 191 ; WX 456 ; N questiondown ; B 23 -217 436 502 ; C 193 ; WX 430 ; N grave ; B 40 511 312 740 ; C 194 ; WX 430 ; N acute ; B 119 511 391 740 ; C 195 ; WX 430 ; N circumflex ; B 28 520 402 747 ; C 196 ; WX 430 ; N tilde ; B 2 553 427 706 ; C 197 ; WX 430 ; N macron ; B 60 587 371 674 ; C 198 ; WX 430 ; N breve ; B 56 556 375 716 ; C 199 ; WX 430 ; N dotaccent ; B 136 561 294 710 ; C 200 ; WX 430 ; N dieresis ; B 16 561 414 710 ; C 202 ; WX 430 ; N ring ; B 96 540 334 762 ; C 203 ; WX 430 ; N cedilla ; B 136 -246 335 0 ; C 205 ; WX 430 ; N hungarumlaut ; B 64 521 446 751 ; C 206 ; WX 430 ; N ogonek ; B 105 -246 325 0 ; C 207 ; WX 430 ; N caron ; B 28 520 402 747 ; C 208 ; WX 1000 ; N emdash ; B 0 209 1000 292 ; C 225 ; WX 879 ; N AE ; B -77 0 854 692 ; C 227 ; WX 405 ; N ordfeminine ; B 28 265 395 590 ; C 232 ; WX 591 ; N Lslash ; B 30 0 590 692 ; C 233 ; WX 768 ; N Oslash ; B 42 -61 726 747 ; C 234 ; WX 1049 ; N OE ; B 42 0 1024 692 ; C 235 ; WX 427 ; N ordmasculine ; B 28 265 399 590 ; C 241 ; WX 806 ; N ae ; B 41 -12 792 502 ; C 245 ; WX 316 ; N dotlessi ; B 26 0 307 502 ; C 248 ; WX 321 ; N lslash ; B 16 0 332 742 ; C 249 ; WX 585 ; N oslash ; B 34 -51 551 535 ; C 250 ; WX 866 ; N oe ; B 34 -12 852 502 ; C 251 ; WX 662 ; N germandbls ; B 29 -12 647 742 ; C -1 ; WX 402 ; N onesuperior ; B 71 272 324 680 ; C -1 ; WX 600 ; N minus ; B 58 210 542 290 ; C -1 ; WX 396 ; N degree ; B 35 360 361 680 ; C -1 ; WX 585 ; N oacute ; B 34 -12 551 755 ; C -1 ; WX 768 ; N Odieresis ; B 42 -15 726 881 ; C -1 ; WX 585 ; N odieresis ; B 34 -12 551 710 ; C -1 ; WX 629 ; N Eacute ; B 33 0 604 904 ; C -1 ; WX 629 ; N ucircumflex ; B 23 -12 620 747 ; C -1 ; WX 900 ; N onequarter ; B 73 -27 814 695 ; C -1 ; WX 600 ; N logicalnot ; B 58 95 542 397 ; C -1 ; WX 629 ; N Ecircumflex ; B 33 0 604 905 ; C -1 ; WX 900 ; N onehalf ; B 53 -27 849 695 ; C -1 ; WX 768 ; N Otilde ; B 42 -15 726 876 ; C -1 ; WX 629 ; N uacute ; B 23 -12 620 740 ; C -1 ; WX 519 ; N eacute ; B 34 -12 505 755 ; C -1 ; WX 316 ; N iacute ; B 26 0 369 740 ; C -1 ; WX 629 ; N Egrave ; B 33 0 604 904 ; C -1 ; WX 316 ; N icircumflex ; B -28 0 346 747 ; C -1 ; WX 629 ; N mu ; B 23 -242 620 502 ; C -1 ; WX 284 ; N brokenbar ; B 94 -175 190 675 ; C -1 ; WX 609 ; N thorn ; B 13 -230 575 722 ; C -1 ; WX 644 ; N Aring ; B -28 0 663 872 ; C -1 ; WX 524 ; N yacute ; B -12 -242 557 740 ; C -1 ; WX 617 ; N Ydieresis ; B -12 0 655 881 ; C -1 ; WX 1090 ; N trademark ; B 38 277 1028 692 ; C -1 ; WX 800 ; N registered ; B 36 -15 764 707 ; C -1 ; WX 585 ; N ocircumflex ; B 34 -12 551 747 ; C -1 ; WX 644 ; N Agrave ; B -28 0 663 904 ; C -1 ; WX 561 ; N Scaron ; B 42 -15 533 916 ; C -1 ; WX 786 ; N Ugrave ; B 29 -15 757 904 ; C -1 ; WX 629 ; N Edieresis ; B 33 0 604 881 ; C -1 ; WX 786 ; N Uacute ; B 29 -15 757 904 ; C -1 ; WX 585 ; N otilde ; B 34 -12 551 706 ; C -1 ; WX 638 ; N ntilde ; B 26 0 629 706 ; C -1 ; WX 524 ; N ydieresis ; B -12 -242 557 710 ; C -1 ; WX 644 ; N Aacute ; B -28 0 663 904 ; C -1 ; WX 585 ; N eth ; B 34 -12 551 742 ; C -1 ; WX 544 ; N acircumflex ; B 41 -12 561 747 ; C -1 ; WX 544 ; N aring ; B 41 -12 561 762 ; C -1 ; WX 768 ; N Ograve ; B 42 -15 726 904 ; C -1 ; WX 494 ; N ccedilla ; B 34 -246 484 502 ; C -1 ; WX 600 ; N multiply ; B 75 20 525 476 ; C -1 ; WX 600 ; N divide ; B 58 6 542 494 ; C -1 ; WX 402 ; N twosuperior ; B 29 272 382 680 ; C -1 ; WX 739 ; N Ntilde ; B 25 0 719 876 ; C -1 ; WX 629 ; N ugrave ; B 23 -12 620 740 ; C -1 ; WX 786 ; N Ucircumflex ; B 29 -15 757 905 ; C -1 ; WX 644 ; N Atilde ; B -28 0 663 876 ; C -1 ; WX 483 ; N zcaron ; B -1 0 480 747 ; C -1 ; WX 316 ; N idieresis ; B -37 0 361 710 ; C -1 ; WX 644 ; N Acircumflex ; B -28 0 663 905 ; C -1 ; WX 384 ; N Icircumflex ; B 4 0 380 905 ; C -1 ; WX 617 ; N Yacute ; B -12 0 655 904 ; C -1 ; WX 768 ; N Oacute ; B 42 -15 726 904 ; C -1 ; WX 644 ; N Adieresis ; B -28 0 663 881 ; C -1 ; WX 614 ; N Zcaron ; B 0 0 606 916 ; C -1 ; WX 544 ; N agrave ; B 41 -12 561 755 ; C -1 ; WX 402 ; N threesuperior ; B 30 265 368 680 ; C -1 ; WX 585 ; N ograve ; B 34 -12 551 755 ; C -1 ; WX 900 ; N threequarters ; B 40 -27 842 695 ; C -1 ; WX 783 ; N Eth ; B 35 0 741 692 ; C -1 ; WX 600 ; N plusminus ; B 58 0 542 549 ; C -1 ; WX 629 ; N udieresis ; B 23 -12 620 710 ; C -1 ; WX 519 ; N edieresis ; B 34 -12 505 710 ; C -1 ; WX 544 ; N aacute ; B 41 -12 561 755 ; C -1 ; WX 316 ; N igrave ; B -47 0 307 740 ; C -1 ; WX 384 ; N Idieresis ; B -13 0 397 881 ; C -1 ; WX 544 ; N adieresis ; B 41 -12 561 710 ; C -1 ; WX 384 ; N Iacute ; B 33 0 423 904 ; C -1 ; WX 800 ; N copyright ; B 36 -15 764 707 ; C -1 ; WX 384 ; N Igrave ; B -31 0 351 904 ; C -1 ; WX 689 ; N Ccedilla ; B 42 -246 654 707 ; C -1 ; WX 446 ; N scaron ; B 38 -12 425 747 ; C -1 ; WX 519 ; N egrave ; B 34 -12 505 755 ; C -1 ; WX 768 ; N Ocircumflex ; B 42 -15 726 905 ; C -1 ; WX 640 ; N Thorn ; B 33 0 622 692 ; C -1 ; WX 544 ; N atilde ; B 41 -12 561 706 ; C -1 ; WX 786 ; N Udieresis ; B 29 -15 757 881 ; C -1 ; WX 519 ; N ecircumflex ; B 34 -12 505 747 ; EndCharMetrics StartKernData StartKernPairs 685 KPX A z 25 KPX A y -40 KPX A w -42 KPX A v -48 KPX A u -18 KPX A t -12 KPX A s 6 KPX A quoteright -110 KPX A quotedblright -80 KPX A q -6 KPX A p -18 KPX A o -12 KPX A e -6 KPX A d -12 KPX A c -12 KPX A b -12 KPX A a -6 KPX A Y -64 KPX A X -18 KPX A W -54 KPX A V -70 KPX A U -40 KPX A T -58 KPX A Q -18 KPX A O -18 KPX A G -18 KPX A C -18 KPX B y -18 KPX B u -12 KPX B r -12 KPX B o -6 KPX B l -15 KPX B k -15 KPX B i -12 KPX B h -15 KPX B e -6 KPX B b -10 KPX B a -12 KPX B W -20 KPX B V -20 KPX B U -25 KPX B T -20 KPX C z -5 KPX C y -24 KPX C u -18 KPX C r -6 KPX C o -12 KPX C e -12 KPX C a -16 KPX C Q -6 KPX C O -6 KPX C G -6 KPX C C -6 KPX D u -12 KPX D r -12 KPX D period -40 KPX D o -5 KPX D i -12 KPX D h -18 KPX D e -5 KPX D comma -40 KPX D a -15 KPX D Y -60 KPX D W -40 KPX D V -40 KPX E y -30 KPX E w -24 KPX E v -24 KPX E u -12 KPX E t -18 KPX E s -12 KPX E r -4 KPX E q -6 KPX E period 10 KPX E p -18 KPX E o -6 KPX E n -4 KPX E m -4 KPX E j -6 KPX E i -6 KPX E g -6 KPX E e -6 KPX E d -6 KPX E comma 10 KPX E c -6 KPX E b -5 KPX E a -4 KPX E Y -6 KPX E W -6 KPX E V -6 KPX F y -18 KPX F u -12 KPX F r -36 KPX F quoteright 20 KPX F quotedblright 20 KPX F period -150 KPX F o -36 KPX F l -12 KPX F i -22 KPX F e -36 KPX F comma -150 KPX F a -48 KPX F A -60 KPX G y -12 KPX G u -12 KPX G r -18 KPX G quotedblright -20 KPX G n -18 KPX G l -6 KPX G i -12 KPX G h -12 KPX G a -12 KPX H y -24 KPX H u -26 KPX H o -30 KPX H i -18 KPX H e -30 KPX H a -25 KPX I z -6 KPX I y -6 KPX I x -6 KPX I w -18 KPX I v -24 KPX I u -26 KPX I t -24 KPX I s -18 KPX I r -12 KPX I p -26 KPX I o -30 KPX I n -18 KPX I m -18 KPX I l -6 KPX I k -6 KPX I h -6 KPX I g -6 KPX I f -6 KPX I e -30 KPX I d -30 KPX I c -30 KPX I b -6 KPX I a -24 KPX J y -20 KPX J u -36 KPX J o -35 KPX J i -20 KPX J e -35 KPX J bracketright 15 KPX J braceright 15 KPX J a -36 KPX K y -70 KPX K w -60 KPX K v -80 KPX K u -42 KPX K o -30 KPX K l 10 KPX K i 6 KPX K h 10 KPX K e -18 KPX K a -6 KPX K Q -36 KPX K O -36 KPX K G -36 KPX K C -36 KPX K A 20 KPX L y -52 KPX L w -58 KPX L u -12 KPX L quoteright -130 KPX L quotedblright -130 KPX L l 6 KPX L j -6 KPX L Y -70 KPX L W -78 KPX L V -95 KPX L U -32 KPX L T -80 KPX L Q -12 KPX L O -12 KPX L G -12 KPX L C -12 KPX L A 30 KPX M y -24 KPX M u -36 KPX M o -30 KPX M n -6 KPX M j -12 KPX M i -12 KPX M e -30 KPX M d -30 KPX M c -30 KPX M a -25 KPX N y -24 KPX N u -30 KPX N o -30 KPX N i -24 KPX N e -30 KPX N a -30 KPX O z -6 KPX O u -6 KPX O t -6 KPX O s -6 KPX O r -10 KPX O q -6 KPX O period -40 KPX O p -10 KPX O o -6 KPX O n -10 KPX O m -10 KPX O l -15 KPX O k -15 KPX O i -6 KPX O h -15 KPX O g -6 KPX O e -6 KPX O d -6 KPX O comma -40 KPX O c -6 KPX O b -15 KPX O a -12 KPX O Y -50 KPX O X -40 KPX O W -35 KPX O V -35 KPX O T -40 KPX O A -30 KPX P y 10 KPX P u -18 KPX P t -6 KPX P s -30 KPX P r -12 KPX P quoteright 20 KPX P quotedblright 20 KPX P period -200 KPX P o -36 KPX P n -12 KPX P l -15 KPX P i -6 KPX P hyphen -30 KPX P h -15 KPX P e -36 KPX P comma -200 KPX P a -36 KPX P I -20 KPX P H -20 KPX P E -20 KPX P A -85 KPX Q u -6 KPX Q a -18 KPX Q Y -50 KPX Q X -40 KPX Q W -35 KPX Q V -35 KPX Q U -25 KPX Q T -40 KPX Q A -30 KPX R y -20 KPX R u -12 KPX R t -25 KPX R quoteright -10 KPX R quotedblright -10 KPX R o -12 KPX R e -18 KPX R a -6 KPX R Y -32 KPX R X 20 KPX R W -18 KPX R V -26 KPX R U -30 KPX R T -20 KPX R Q -10 KPX R O -10 KPX R G -10 KPX R C -10 KPX S y -35 KPX S w -30 KPX S v -40 KPX S u -24 KPX S t -24 KPX S r -10 KPX S quoteright -15 KPX S quotedblright -15 KPX S p -24 KPX S n -24 KPX S m -24 KPX S l -18 KPX S k -24 KPX S j -30 KPX S i -12 KPX S h -12 KPX S a -18 KPX T z -64 KPX T y -74 KPX T w -72 KPX T u -74 KPX T semicolon -50 KPX T s -82 KPX T r -74 KPX T quoteright 24 KPX T quotedblright 24 KPX T period -95 KPX T parenright 40 KPX T o -90 KPX T m -72 KPX T i -28 KPX T hyphen -110 KPX T endash -40 KPX T emdash -60 KPX T e -80 KPX T comma -95 KPX T bracketright 40 KPX T braceright 30 KPX T a -90 KPX T Y 12 KPX T X 10 KPX T W 15 KPX T V 6 KPX T T 30 KPX T S -12 KPX T Q -25 KPX T O -25 KPX T G -25 KPX T C -25 KPX T A -52 KPX U z -35 KPX U y -30 KPX U x -30 KPX U v -30 KPX U t -36 KPX U s -45 KPX U r -50 KPX U p -50 KPX U n -50 KPX U m -50 KPX U l -12 KPX U k -12 KPX U i -22 KPX U h -6 KPX U g -40 KPX U f -20 KPX U d -40 KPX U c -40 KPX U b -12 KPX U a -50 KPX U A -50 KPX V y -36 KPX V u -50 KPX V semicolon -45 KPX V r -75 KPX V quoteright 50 KPX V quotedblright 36 KPX V period -135 KPX V parenright 80 KPX V o -70 KPX V i 20 KPX V hyphen -90 KPX V emdash -20 KPX V e -70 KPX V comma -135 KPX V colon -45 KPX V bracketright 80 KPX V braceright 80 KPX V a -70 KPX V Q -20 KPX V O -20 KPX V G -20 KPX V C -20 KPX V A -60 KPX W y -50 KPX W u -46 KPX W t -30 KPX W semicolon -40 KPX W r -50 KPX W quoteright 40 KPX W quotedblright 24 KPX W period -100 KPX W parenright 80 KPX W o -60 KPX W m -50 KPX W i 5 KPX W hyphen -70 KPX W h 20 KPX W e -60 KPX W d -60 KPX W comma -100 KPX W colon -40 KPX W bracketright 80 KPX W braceright 70 KPX W a -75 KPX W T 30 KPX W Q -20 KPX W O -20 KPX W G -20 KPX W C -20 KPX W A -58 KPX X y -40 KPX X u -24 KPX X quoteright 15 KPX X e -6 KPX X a -6 KPX X Q -24 KPX X O -30 KPX X G -30 KPX X C -30 KPX X A 20 KPX Y v -50 KPX Y u -65 KPX Y t -46 KPX Y semicolon -37 KPX Y quoteright 50 KPX Y quotedblright 36 KPX Y q -100 KPX Y period -90 KPX Y parenright 60 KPX Y o -90 KPX Y l 25 KPX Y i 15 KPX Y hyphen -100 KPX Y endash -30 KPX Y emdash -50 KPX Y e -90 KPX Y d -90 KPX Y comma -90 KPX Y colon -60 KPX Y bracketright 80 KPX Y braceright 64 KPX Y a -80 KPX Y Y 12 KPX Y X 12 KPX Y W 12 KPX Y V 12 KPX Y T 30 KPX Y Q -40 KPX Y O -40 KPX Y G -40 KPX Y C -40 KPX Y A -55 KPX Z y -36 KPX Z w -36 KPX Z u -6 KPX Z o -12 KPX Z i -12 KPX Z e -6 KPX Z a -6 KPX Z Q -18 KPX Z O -18 KPX Z G -18 KPX Z C -18 KPX Z A 25 KPX a quoteright -45 KPX a quotedblright -40 KPX b y -15 KPX b w -20 KPX b v -20 KPX b quoteright -45 KPX b quotedblright -40 KPX b period -10 KPX b comma -10 KPX braceleft Y 64 KPX braceleft W 64 KPX braceleft V 64 KPX braceleft T 25 KPX braceleft J 50 KPX bracketleft Y 64 KPX bracketleft W 64 KPX bracketleft V 64 KPX bracketleft T 35 KPX bracketleft J 60 KPX c quoteright -5 KPX colon space -20 KPX comma space -40 KPX comma quoteright -100 KPX comma quotedblright -100 KPX d quoteright -24 KPX d quotedblright -24 KPX e z -4 KPX e quoteright -25 KPX e quotedblright -20 KPX f quotesingle 70 KPX f quoteright 68 KPX f quotedblright 68 KPX f period -10 KPX f parenright 110 KPX f comma -20 KPX f bracketright 100 KPX f braceright 80 KPX g y 20 KPX g p 20 KPX g f 20 KPX g comma 10 KPX h quoteright -60 KPX h quotedblright -60 KPX i quoteright -20 KPX i quotedblright -20 KPX j quoteright -20 KPX j quotedblright -20 KPX j period -10 KPX j comma -10 KPX k quoteright -30 KPX k quotedblright -30 KPX l quoteright -24 KPX l quotedblright -24 KPX m quoteright -60 KPX m quotedblright -60 KPX n quoteright -60 KPX n quotedblright -60 KPX o z -12 KPX o y -25 KPX o x -18 KPX o w -30 KPX o v -30 KPX o quoteright -45 KPX o quotedblright -40 KPX o period -10 KPX o comma -10 KPX p z -10 KPX p y -15 KPX p w -15 KPX p quoteright -45 KPX p quotedblright -60 KPX p period -10 KPX p comma -10 KPX parenleft Y 64 KPX parenleft W 64 KPX parenleft V 64 KPX parenleft T 50 KPX parenleft J 50 KPX period space -40 KPX period quoteright -100 KPX period quotedblright -100 KPX q quoteright -50 KPX q quotedblright -50 KPX q period -10 KPX q comma -10 KPX quotedblleft z -26 KPX quotedblleft w 10 KPX quotedblleft u -40 KPX quotedblleft t -40 KPX quotedblleft s -32 KPX quotedblleft r -40 KPX quotedblleft q -70 KPX quotedblleft p -40 KPX quotedblleft o -70 KPX quotedblleft n -40 KPX quotedblleft m -40 KPX quotedblleft g -50 KPX quotedblleft f -30 KPX quotedblleft e -70 KPX quotedblleft d -70 KPX quotedblleft c -70 KPX quotedblleft a -60 KPX quotedblleft Y 30 KPX quotedblleft X 20 KPX quotedblleft W 40 KPX quotedblleft V 40 KPX quotedblleft T 18 KPX quotedblleft J -24 KPX quotedblleft A -122 KPX quotedblright space -40 KPX quotedblright period -100 KPX quotedblright comma -100 KPX quoteleft z -26 KPX quoteleft y -5 KPX quoteleft x -5 KPX quoteleft w 5 KPX quoteleft v -5 KPX quoteleft u -25 KPX quoteleft t -25 KPX quoteleft s -40 KPX quoteleft r -40 KPX quoteleft quoteleft -30 KPX quoteleft q -70 KPX quoteleft p -40 KPX quoteleft o -70 KPX quoteleft n -40 KPX quoteleft m -40 KPX quoteleft g -50 KPX quoteleft f -10 KPX quoteleft e -70 KPX quoteleft d -70 KPX quoteleft c -70 KPX quoteleft a -60 KPX quoteleft Y 35 KPX quoteleft X 30 KPX quoteleft W 35 KPX quoteleft V 35 KPX quoteleft T 35 KPX quoteleft J -24 KPX quoteleft A -122 KPX quoteright v -20 KPX quoteright t -50 KPX quoteright space -40 KPX quoteright s -70 KPX quoteright r -42 KPX quoteright quoteright -30 KPX quoteright period -100 KPX quoteright m -42 KPX quoteright l -6 KPX quoteright d -100 KPX quoteright comma -100 KPX r z 20 KPX r y 18 KPX r x 12 KPX r w 30 KPX r v 30 KPX r u 8 KPX r t 8 KPX r semicolon 20 KPX r quoteright -20 KPX r quotedblright -10 KPX r q -6 KPX r period -60 KPX r o -6 KPX r n 8 KPX r m 8 KPX r l -10 KPX r k -10 KPX r i 8 KPX r hyphen -60 KPX r h -10 KPX r g 5 KPX r f 8 KPX r emdash -20 KPX r e -20 KPX r d -20 KPX r comma -80 KPX r colon 20 KPX r c -20 KPX s quoteright -40 KPX s quotedblright -40 KPX semicolon space -20 KPX space quotesinglbase -100 KPX space quoteleft -40 KPX space quotedblleft -40 KPX space quotedblbase -100 KPX space Y -60 KPX space W -60 KPX space V -60 KPX space T -40 KPX t period 15 KPX t comma 10 KPX u quoteright -60 KPX u quotedblright -60 KPX v semicolon 20 KPX v quoteright 5 KPX v quotedblright 10 KPX v q -15 KPX v period -75 KPX v o -15 KPX v e -15 KPX v d -15 KPX v comma -90 KPX v colon 20 KPX v c -15 KPX v a -15 KPX w semicolon 20 KPX w quoteright 15 KPX w quotedblright 20 KPX w q -10 KPX w period -60 KPX w o -10 KPX w e -10 KPX w d -10 KPX w comma -68 KPX w colon 20 KPX w c -10 KPX x quoteright -25 KPX x quotedblright -20 KPX x q -6 KPX x o -6 KPX x e -12 KPX x d -12 KPX x c -12 KPX y semicolon 20 KPX y quoteright 5 KPX y quotedblright 10 KPX y period -72 KPX y hyphen -20 KPX y comma -72 KPX y colon 20 KPX z quoteright -20 KPX z quotedblright -20 KPX z o -6 KPX z e -6 KPX z d -6 KPX z c -6 EndKernPairs EndKernData EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/putbi8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1989, 1991 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Fri Jan 17 15:47:44 1992 Comment UniqueID 37716 Comment VMusage 34427 41319 FontName Utopia-BoldItalic FullName Utopia Bold Italic FamilyName Utopia Weight Bold ItalicAngle -13 IsFixedPitch false FontBBox -176 -250 1262 916 UnderlinePosition -100 UnderlineThickness 50 Version 001.002 Notice Copyright (c) 1989, 1991 Adobe Systems Incorporated. All Rights Reserved.Utopia is a registered trademark of Adobe Systems Incorporated. EncodingScheme AdobeStandardEncoding CapHeight 692 XHeight 502 Ascender 742 Descender -242 StartCharMetrics 228 C 32 ; WX 210 ; N space ; B 0 0 0 0 ; C 33 ; WX 285 ; N exclam ; B 35 -12 336 707 ; C 34 ; WX 455 ; N quotedbl ; B 142 407 496 707 ; C 35 ; WX 560 ; N numbersign ; B 37 0 606 668 ; C 36 ; WX 560 ; N dollar ; B 32 -104 588 748 ; C 37 ; WX 896 ; N percent ; B 106 -31 861 702 ; C 38 ; WX 752 ; N ampersand ; B 62 -12 736 680 ; C 39 ; WX 246 ; N quoteright ; B 95 387 294 707 ; C 40 ; WX 350 ; N parenleft ; B 87 -135 438 699 ; C 41 ; WX 350 ; N parenright ; B -32 -135 319 699 ; C 42 ; WX 500 ; N asterisk ; B 121 315 528 707 ; C 43 ; WX 600 ; N plus ; B 83 0 567 490 ; C 44 ; WX 280 ; N comma ; B -9 -167 207 180 ; C 45 ; WX 392 ; N hyphen ; B 71 203 354 298 ; C 46 ; WX 280 ; N period ; B 32 -12 212 166 ; C 47 ; WX 260 ; N slash ; B -16 -15 370 707 ; C 48 ; WX 560 ; N zero ; B 57 -12 583 680 ; C 49 ; WX 560 ; N one ; B 72 0 470 680 ; C 50 ; WX 560 ; N two ; B 4 0 578 680 ; C 51 ; WX 560 ; N three ; B 21 -12 567 680 ; C 52 ; WX 560 ; N four ; B 28 0 557 668 ; C 53 ; WX 560 ; N five ; B 23 -12 593 668 ; C 54 ; WX 560 ; N six ; B 56 -12 586 680 ; C 55 ; WX 560 ; N seven ; B 112 -12 632 668 ; C 56 ; WX 560 ; N eight ; B 37 -12 584 680 ; C 57 ; WX 560 ; N nine ; B 48 -12 570 680 ; C 58 ; WX 280 ; N colon ; B 32 -12 280 490 ; C 59 ; WX 280 ; N semicolon ; B -9 -167 280 490 ; C 60 ; WX 600 ; N less ; B 66 5 544 495 ; C 61 ; WX 600 ; N equal ; B 83 103 567 397 ; C 62 ; WX 600 ; N greater ; B 86 5 564 495 ; C 63 ; WX 454 ; N question ; B 115 -12 515 707 ; C 64 ; WX 828 ; N at ; B 90 -15 842 707 ; C 65 ; WX 634 ; N A ; B -59 0 639 692 ; C 66 ; WX 680 ; N B ; B 5 0 689 692 ; C 67 ; WX 672 ; N C ; B 76 -15 742 707 ; C 68 ; WX 774 ; N D ; B 5 0 784 692 ; C 69 ; WX 622 ; N E ; B 5 0 687 692 ; C 70 ; WX 585 ; N F ; B 5 0 683 692 ; C 71 ; WX 726 ; N G ; B 76 -15 756 707 ; C 72 ; WX 800 ; N H ; B 5 0 880 692 ; C 73 ; WX 386 ; N I ; B 5 0 466 692 ; C 74 ; WX 388 ; N J ; B -50 -114 477 692 ; C 75 ; WX 688 ; N K ; B 5 -6 823 692 ; C 76 ; WX 586 ; N L ; B 5 0 591 692 ; C 77 ; WX 921 ; N M ; B 0 0 998 692 ; C 78 ; WX 741 ; N N ; B -5 0 838 692 ; C 79 ; WX 761 ; N O ; B 78 -15 768 707 ; C 80 ; WX 660 ; N P ; B 5 0 694 692 ; C 81 ; WX 761 ; N Q ; B 78 -193 768 707 ; C 82 ; WX 681 ; N R ; B 5 0 696 692 ; C 83 ; WX 551 ; N S ; B 31 -15 570 707 ; C 84 ; WX 616 ; N T ; B 91 0 722 692 ; C 85 ; WX 776 ; N U ; B 115 -15 867 692 ; C 86 ; WX 630 ; N V ; B 92 0 783 692 ; C 87 ; WX 920 ; N W ; B 80 0 1062 692 ; C 88 ; WX 630 ; N X ; B -56 0 744 692 ; C 89 ; WX 622 ; N Y ; B 92 0 765 692 ; C 90 ; WX 618 ; N Z ; B -30 0 714 692 ; C 91 ; WX 350 ; N bracketleft ; B 56 -128 428 692 ; C 92 ; WX 460 ; N backslash ; B 114 -15 425 707 ; C 93 ; WX 350 ; N bracketright ; B -22 -128 350 692 ; C 94 ; WX 600 ; N asciicircum ; B 79 215 567 668 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 246 ; N quoteleft ; B 114 399 313 719 ; C 97 ; WX 596 ; N a ; B 26 -12 612 502 ; C 98 ; WX 586 ; N b ; B 34 -12 592 742 ; C 99 ; WX 456 ; N c ; B 38 -12 498 502 ; C 100 ; WX 609 ; N d ; B 29 -12 651 742 ; C 101 ; WX 476 ; N e ; B 38 -12 497 502 ; C 102 ; WX 348 ; N f ; B -129 -242 553 742 ; L i fi ; L l fl ; C 103 ; WX 522 ; N g ; B -14 -242 609 512 ; C 104 ; WX 629 ; N h ; B 44 -12 631 742 ; C 105 ; WX 339 ; N i ; B 66 -12 357 720 ; C 106 ; WX 333 ; N j ; B -120 -242 364 720 ; C 107 ; WX 570 ; N k ; B 39 -12 604 742 ; C 108 ; WX 327 ; N l ; B 62 -12 360 742 ; C 109 ; WX 914 ; N m ; B 46 -12 917 502 ; C 110 ; WX 635 ; N n ; B 45 -12 639 502 ; C 111 ; WX 562 ; N o ; B 42 -12 556 502 ; C 112 ; WX 606 ; N p ; B 0 -242 613 502 ; C 113 ; WX 584 ; N q ; B 29 -242 604 513 ; C 114 ; WX 440 ; N r ; B 51 -12 497 502 ; C 115 ; WX 417 ; N s ; B 10 -12 432 502 ; C 116 ; WX 359 ; N t ; B 68 -12 428 641 ; C 117 ; WX 634 ; N u ; B 71 -12 643 502 ; C 118 ; WX 518 ; N v ; B 68 -12 547 502 ; C 119 ; WX 795 ; N w ; B 70 -12 826 502 ; C 120 ; WX 516 ; N x ; B -26 -12 546 502 ; C 121 ; WX 489 ; N y ; B -49 -242 532 502 ; C 122 ; WX 466 ; N z ; B -17 -12 506 490 ; C 123 ; WX 340 ; N braceleft ; B 90 -128 439 692 ; C 124 ; WX 265 ; N bar ; B 117 -250 221 750 ; C 125 ; WX 340 ; N braceright ; B -42 -128 307 692 ; C 126 ; WX 600 ; N asciitilde ; B 70 157 571 338 ; C 161 ; WX 285 ; N exclamdown ; B -13 -217 288 502 ; C 162 ; WX 560 ; N cent ; B 80 -21 611 668 ; C 163 ; WX 560 ; N sterling ; B -4 0 583 679 ; C 164 ; WX 100 ; N fraction ; B -176 -27 370 695 ; C 165 ; WX 560 ; N yen ; B 65 0 676 668 ; C 166 ; WX 560 ; N florin ; B -16 -135 635 691 ; C 167 ; WX 568 ; N section ; B 64 -115 559 707 ; C 168 ; WX 560 ; N currency ; B 60 73 578 596 ; C 169 ; WX 246 ; N quotesingle ; B 134 376 285 707 ; C 170 ; WX 455 ; N quotedblleft ; B 114 399 522 719 ; C 171 ; WX 560 ; N guillemotleft ; B 90 37 533 464 ; C 172 ; WX 360 ; N guilsinglleft ; B 90 37 333 464 ; C 173 ; WX 360 ; N guilsinglright ; B 58 37 301 464 ; C 174 ; WX 651 ; N fi ; B -129 -242 655 742 ; C 175 ; WX 652 ; N fl ; B -129 -242 685 742 ; C 177 ; WX 500 ; N endash ; B 12 209 531 292 ; C 178 ; WX 514 ; N dagger ; B 101 -125 545 707 ; C 179 ; WX 490 ; N daggerdbl ; B 32 -119 528 707 ; C 180 ; WX 280 ; N periodcentered ; B 67 161 247 339 ; C 182 ; WX 580 ; N paragraph ; B 110 -101 653 692 ; C 183 ; WX 465 ; N bullet ; B 99 174 454 529 ; C 184 ; WX 246 ; N quotesinglbase ; B -17 -153 182 167 ; C 185 ; WX 455 ; N quotedblbase ; B -17 -153 391 167 ; C 186 ; WX 455 ; N quotedblright ; B 95 387 503 707 ; C 187 ; WX 560 ; N guillemotright ; B 58 37 502 464 ; C 188 ; WX 1000 ; N ellipsis ; B 85 -12 931 166 ; C 189 ; WX 1297 ; N perthousand ; B 106 -31 1262 702 ; C 191 ; WX 454 ; N questiondown ; B -10 -217 391 502 ; C 193 ; WX 400 ; N grave ; B 109 511 381 740 ; C 194 ; WX 400 ; N acute ; B 186 511 458 740 ; C 195 ; WX 400 ; N circumflex ; B 93 520 471 747 ; C 196 ; WX 400 ; N tilde ; B 94 549 502 697 ; C 197 ; WX 400 ; N macron ; B 133 592 459 664 ; C 198 ; WX 400 ; N breve ; B 146 556 469 714 ; C 199 ; WX 402 ; N dotaccent ; B 220 561 378 710 ; C 200 ; WX 400 ; N dieresis ; B 106 561 504 710 ; C 202 ; WX 400 ; N ring ; B 166 529 423 762 ; C 203 ; WX 400 ; N cedilla ; B 85 -246 292 0 ; C 205 ; WX 400 ; N hungarumlaut ; B 158 546 482 750 ; C 206 ; WX 350 ; N ogonek ; B 38 -246 253 0 ; C 207 ; WX 400 ; N caron ; B 130 520 508 747 ; C 208 ; WX 1000 ; N emdash ; B 12 209 1031 292 ; C 225 ; WX 890 ; N AE ; B -107 0 958 692 ; C 227 ; WX 444 ; N ordfeminine ; B 62 265 482 590 ; C 232 ; WX 592 ; N Lslash ; B 11 0 597 692 ; C 233 ; WX 761 ; N Oslash ; B 77 -51 769 734 ; C 234 ; WX 1016 ; N OE ; B 76 0 1084 692 ; C 235 ; WX 412 ; N ordmasculine ; B 86 265 446 590 ; C 241 ; WX 789 ; N ae ; B 26 -12 810 509 ; C 245 ; WX 339 ; N dotlessi ; B 66 -12 343 502 ; C 248 ; WX 339 ; N lslash ; B 18 -12 420 742 ; C 249 ; WX 562 ; N oslash ; B 42 -69 556 549 ; C 250 ; WX 811 ; N oe ; B 42 -12 832 502 ; C 251 ; WX 628 ; N germandbls ; B -129 -242 692 742 ; C -1 ; WX 402 ; N onesuperior ; B 84 272 361 680 ; C -1 ; WX 600 ; N minus ; B 83 210 567 290 ; C -1 ; WX 375 ; N degree ; B 93 360 425 680 ; C -1 ; WX 562 ; N oacute ; B 42 -12 572 755 ; C -1 ; WX 761 ; N Odieresis ; B 78 -15 768 881 ; C -1 ; WX 562 ; N odieresis ; B 42 -12 585 710 ; C -1 ; WX 622 ; N Eacute ; B 5 0 687 904 ; C -1 ; WX 634 ; N ucircumflex ; B 71 -12 643 747 ; C -1 ; WX 940 ; N onequarter ; B 104 -27 849 695 ; C -1 ; WX 600 ; N logicalnot ; B 83 95 567 397 ; C -1 ; WX 622 ; N Ecircumflex ; B 5 0 687 905 ; C -1 ; WX 940 ; N onehalf ; B 90 -27 898 695 ; C -1 ; WX 761 ; N Otilde ; B 78 -15 768 876 ; C -1 ; WX 634 ; N uacute ; B 71 -12 643 740 ; C -1 ; WX 476 ; N eacute ; B 38 -12 545 755 ; C -1 ; WX 339 ; N iacute ; B 66 -12 438 740 ; C -1 ; WX 622 ; N Egrave ; B 5 0 687 904 ; C -1 ; WX 339 ; N icircumflex ; B 38 -12 416 747 ; C -1 ; WX 634 ; N mu ; B -3 -230 643 502 ; C -1 ; WX 265 ; N brokenbar ; B 117 -175 221 675 ; C -1 ; WX 600 ; N thorn ; B -6 -242 607 700 ; C -1 ; WX 634 ; N Aring ; B -59 0 639 879 ; C -1 ; WX 489 ; N yacute ; B -49 -242 553 740 ; C -1 ; WX 622 ; N Ydieresis ; B 92 0 765 881 ; C -1 ; WX 1100 ; N trademark ; B 103 277 1093 692 ; C -1 ; WX 824 ; N registered ; B 91 -15 819 707 ; C -1 ; WX 562 ; N ocircumflex ; B 42 -12 556 747 ; C -1 ; WX 634 ; N Agrave ; B -59 0 639 904 ; C -1 ; WX 551 ; N Scaron ; B 31 -15 612 916 ; C -1 ; WX 776 ; N Ugrave ; B 115 -15 867 904 ; C -1 ; WX 622 ; N Edieresis ; B 5 0 687 881 ; C -1 ; WX 776 ; N Uacute ; B 115 -15 867 904 ; C -1 ; WX 562 ; N otilde ; B 42 -12 583 697 ; C -1 ; WX 635 ; N ntilde ; B 45 -12 639 697 ; C -1 ; WX 489 ; N ydieresis ; B -49 -242 532 710 ; C -1 ; WX 634 ; N Aacute ; B -59 0 678 904 ; C -1 ; WX 562 ; N eth ; B 42 -12 558 742 ; C -1 ; WX 596 ; N acircumflex ; B 26 -12 612 747 ; C -1 ; WX 596 ; N aring ; B 26 -12 612 762 ; C -1 ; WX 761 ; N Ograve ; B 78 -15 768 904 ; C -1 ; WX 456 ; N ccedilla ; B 38 -246 498 502 ; C -1 ; WX 600 ; N multiply ; B 110 22 560 478 ; C -1 ; WX 600 ; N divide ; B 63 7 547 493 ; C -1 ; WX 402 ; N twosuperior ; B 29 272 423 680 ; C -1 ; WX 741 ; N Ntilde ; B -5 0 838 876 ; C -1 ; WX 634 ; N ugrave ; B 71 -12 643 740 ; C -1 ; WX 776 ; N Ucircumflex ; B 115 -15 867 905 ; C -1 ; WX 634 ; N Atilde ; B -59 0 662 876 ; C -1 ; WX 466 ; N zcaron ; B -17 -12 526 747 ; C -1 ; WX 339 ; N idieresis ; B 46 -12 444 710 ; C -1 ; WX 634 ; N Acircumflex ; B -59 0 639 905 ; C -1 ; WX 386 ; N Icircumflex ; B 5 0 506 905 ; C -1 ; WX 622 ; N Yacute ; B 92 0 765 904 ; C -1 ; WX 761 ; N Oacute ; B 78 -15 768 904 ; C -1 ; WX 634 ; N Adieresis ; B -59 0 652 881 ; C -1 ; WX 618 ; N Zcaron ; B -30 0 714 916 ; C -1 ; WX 596 ; N agrave ; B 26 -12 612 755 ; C -1 ; WX 402 ; N threesuperior ; B 59 265 421 680 ; C -1 ; WX 562 ; N ograve ; B 42 -12 556 755 ; C -1 ; WX 940 ; N threequarters ; B 95 -27 876 695 ; C -1 ; WX 780 ; N Eth ; B 11 0 790 692 ; C -1 ; WX 600 ; N plusminus ; B 83 0 567 549 ; C -1 ; WX 634 ; N udieresis ; B 71 -12 643 710 ; C -1 ; WX 476 ; N edieresis ; B 38 -12 542 710 ; C -1 ; WX 596 ; N aacute ; B 26 -12 621 755 ; C -1 ; WX 339 ; N igrave ; B 39 -12 343 740 ; C -1 ; WX 386 ; N Idieresis ; B 5 0 533 881 ; C -1 ; WX 596 ; N adieresis ; B 26 -12 612 710 ; C -1 ; WX 386 ; N Iacute ; B 5 0 549 904 ; C -1 ; WX 824 ; N copyright ; B 91 -15 819 707 ; C -1 ; WX 386 ; N Igrave ; B 5 0 466 904 ; C -1 ; WX 672 ; N Ccedilla ; B 76 -246 742 707 ; C -1 ; WX 417 ; N scaron ; B 10 -12 522 747 ; C -1 ; WX 476 ; N egrave ; B 38 -12 497 755 ; C -1 ; WX 761 ; N Ocircumflex ; B 78 -15 768 905 ; C -1 ; WX 629 ; N Thorn ; B 5 0 660 692 ; C -1 ; WX 596 ; N atilde ; B 26 -12 612 697 ; C -1 ; WX 776 ; N Udieresis ; B 115 -15 867 881 ; C -1 ; WX 476 ; N ecircumflex ; B 38 -12 524 747 ; EndCharMetrics StartKernData StartKernPairs 697 KPX A z 18 KPX A y -40 KPX A x 16 KPX A w -30 KPX A v -30 KPX A u -18 KPX A t -6 KPX A s 6 KPX A r -6 KPX A quoteright -92 KPX A quotedblright -92 KPX A p -6 KPX A o -18 KPX A n -12 KPX A m -12 KPX A l -18 KPX A h -6 KPX A d 4 KPX A c -6 KPX A b -6 KPX A a 10 KPX A Y -56 KPX A X -8 KPX A W -46 KPX A V -75 KPX A U -50 KPX A T -60 KPX A Q -30 KPX A O -30 KPX A G -30 KPX A C -30 KPX B y -6 KPX B u -12 KPX B r -6 KPX B quoteright -20 KPX B quotedblright -32 KPX B o 6 KPX B l -20 KPX B k -10 KPX B i -12 KPX B h -15 KPX B e 4 KPX B a 10 KPX B W -30 KPX B V -45 KPX B U -30 KPX B T -20 KPX C z -6 KPX C y -18 KPX C u -12 KPX C r -12 KPX C quoteright 12 KPX C quotedblright 20 KPX C i -6 KPX C e -6 KPX C a -6 KPX C Q -12 KPX C O -12 KPX C G -12 KPX C C -12 KPX D y 18 KPX D quoteright -20 KPX D quotedblright -20 KPX D period -20 KPX D o 6 KPX D h -15 KPX D e 6 KPX D comma -20 KPX D a 6 KPX D Y -80 KPX D W -40 KPX D V -65 KPX E z -6 KPX E y -24 KPX E x 15 KPX E w -30 KPX E v -18 KPX E u -24 KPX E t -18 KPX E s -6 KPX E r -6 KPX E quoteright 10 KPX E q 10 KPX E period 15 KPX E p -12 KPX E n -12 KPX E m -12 KPX E l -6 KPX E j -6 KPX E i -12 KPX E g -12 KPX E d 10 KPX E comma 15 KPX E a 10 KPX F y -12 KPX F u -24 KPX F r -12 KPX F quoteright 40 KPX F quotedblright 35 KPX F period -120 KPX F o -24 KPX F i -6 KPX F e -24 KPX F comma -110 KPX F a -30 KPX F A -45 KPX G y -25 KPX G u -22 KPX G r -22 KPX G quoteright -30 KPX G quotedblright -30 KPX G n -22 KPX G l -24 KPX G i -12 KPX G h -18 KPX G e 5 KPX H y -18 KPX H u -30 KPX H o -25 KPX H i -25 KPX H e -25 KPX H a -25 KPX I z -20 KPX I y -6 KPX I x -6 KPX I w -30 KPX I v -30 KPX I u -30 KPX I t -18 KPX I s -18 KPX I r -12 KPX I p -18 KPX I o -25 KPX I n -18 KPX I m -18 KPX I l -6 KPX I k -6 KPX I j -20 KPX I i -10 KPX I g -24 KPX I f -6 KPX I e -25 KPX I d -15 KPX I c -25 KPX I b -6 KPX I a -15 KPX J y -12 KPX J u -32 KPX J quoteright 6 KPX J quotedblright 6 KPX J o -36 KPX J i -30 KPX J e -30 KPX J braceright 15 KPX J a -36 KPX K y -70 KPX K w -36 KPX K v -30 KPX K u -30 KPX K r -24 KPX K quoteright 36 KPX K quotedblright 36 KPX K o -30 KPX K n -24 KPX K l 10 KPX K i -12 KPX K h 15 KPX K e -30 KPX K a -12 KPX K Q -50 KPX K O -50 KPX K G -50 KPX K C -50 KPX K A 15 KPX L y -70 KPX L w -30 KPX L u -18 KPX L quoteright -110 KPX L quotedblright -110 KPX L l -16 KPX L j -18 KPX L i -18 KPX L Y -80 KPX L W -78 KPX L V -110 KPX L U -42 KPX L T -100 KPX L Q -48 KPX L O -48 KPX L G -48 KPX L C -48 KPX L A 40 KPX M y -18 KPX M u -24 KPX M quoteright 6 KPX M quotedblright 6 KPX M o -25 KPX M n -20 KPX M j -35 KPX M i -20 KPX M e -25 KPX M d -20 KPX M c -25 KPX M a -20 KPX N y -18 KPX N u -24 KPX N o -18 KPX N i -12 KPX N e -16 KPX N a -22 KPX O z -6 KPX O y 12 KPX O u -6 KPX O t -6 KPX O s -6 KPX O r -6 KPX O quoteright -20 KPX O quotedblright -20 KPX O q 6 KPX O period -10 KPX O p -6 KPX O n -6 KPX O m -6 KPX O l -15 KPX O k -10 KPX O j -6 KPX O h -10 KPX O g -6 KPX O e 6 KPX O d 6 KPX O comma -10 KPX O a 6 KPX O Y -70 KPX O X -30 KPX O W -35 KPX O V -50 KPX O T -42 KPX O A -8 KPX P y 6 KPX P u -18 KPX P t -6 KPX P s -24 KPX P r -6 KPX P quoteright -12 KPX P period -170 KPX P o -24 KPX P n -12 KPX P l -20 KPX P h -20 KPX P e -24 KPX P comma -170 KPX P a -40 KPX P I -45 KPX P H -45 KPX P E -45 KPX P A -70 KPX Q u -6 KPX Q quoteright -20 KPX Q quotedblright -38 KPX Q a -6 KPX Q Y -70 KPX Q X -12 KPX Q W -35 KPX Q V -50 KPX Q U -30 KPX Q T -36 KPX Q A -18 KPX R y -6 KPX R u -12 KPX R quoteright -22 KPX R quotedblright -22 KPX R o -20 KPX R e -12 KPX R Y -45 KPX R X 15 KPX R W -25 KPX R V -35 KPX R U -40 KPX R T -18 KPX R Q -8 KPX R O -8 KPX R G -8 KPX R C -8 KPX R A 15 KPX S y -30 KPX S w -30 KPX S v -20 KPX S u -18 KPX S t -18 KPX S r -20 KPX S quoteright -38 KPX S quotedblright -50 KPX S p -18 KPX S n -24 KPX S m -24 KPX S l -20 KPX S k -18 KPX S j -25 KPX S i -20 KPX S h -12 KPX S e -6 KPX T z -48 KPX T y -52 KPX T w -54 KPX T u -54 KPX T semicolon -6 KPX T s -60 KPX T r -54 KPX T quoteright 36 KPX T quotedblright 36 KPX T period -70 KPX T parenright 25 KPX T o -78 KPX T m -54 KPX T i -22 KPX T hyphen -100 KPX T h 6 KPX T endash -40 KPX T emdash -40 KPX T e -78 KPX T comma -90 KPX T bracketright 20 KPX T braceright 30 KPX T a -78 KPX T Y 12 KPX T X 18 KPX T W 30 KPX T V 20 KPX T T 40 KPX T Q -6 KPX T O -6 KPX T G -6 KPX T C -6 KPX T A -40 KPX U z -18 KPX U x -30 KPX U v -20 KPX U t -24 KPX U s -40 KPX U r -30 KPX U p -30 KPX U n -30 KPX U m -30 KPX U l -12 KPX U k -12 KPX U i -24 KPX U h -6 KPX U g -30 KPX U f -10 KPX U d -30 KPX U c -30 KPX U b -6 KPX U a -30 KPX U A -40 KPX V y -34 KPX V u -42 KPX V semicolon -45 KPX V r -55 KPX V quoteright 46 KPX V quotedblright 60 KPX V period -110 KPX V parenright 64 KPX V o -55 KPX V i 15 KPX V hyphen -60 KPX V endash -20 KPX V emdash -20 KPX V e -55 KPX V comma -110 KPX V colon -18 KPX V bracketright 64 KPX V braceright 64 KPX V a -80 KPX V T 12 KPX V A -70 KPX W y -36 KPX W u -30 KPX W t -10 KPX W semicolon -12 KPX W r -30 KPX W quoteright 42 KPX W quotedblright 55 KPX W period -80 KPX W parenright 55 KPX W o -55 KPX W m -30 KPX W i 5 KPX W hyphen -40 KPX W h 16 KPX W e -55 KPX W d -60 KPX W comma -80 KPX W colon -12 KPX W bracketright 64 KPX W braceright 64 KPX W a -60 KPX W T 30 KPX W Q -5 KPX W O -5 KPX W G -5 KPX W C -5 KPX W A -45 KPX X y -40 KPX X u -30 KPX X r -6 KPX X quoteright 24 KPX X quotedblright 40 KPX X i -6 KPX X e -18 KPX X a -6 KPX X Y -6 KPX X W -6 KPX X Q -45 KPX X O -45 KPX X G -45 KPX X C -45 KPX Y v -60 KPX Y u -70 KPX Y t -32 KPX Y semicolon -20 KPX Y quoteright 56 KPX Y quotedblright 70 KPX Y q -100 KPX Y period -80 KPX Y parenright 5 KPX Y o -95 KPX Y l 15 KPX Y i 15 KPX Y hyphen -110 KPX Y endash -40 KPX Y emdash -40 KPX Y e -95 KPX Y d -85 KPX Y comma -80 KPX Y colon -20 KPX Y bracketright 64 KPX Y braceright 64 KPX Y a -85 KPX Y Y 12 KPX Y X 12 KPX Y W 12 KPX Y V 6 KPX Y T 30 KPX Y Q -25 KPX Y O -25 KPX Y G -25 KPX Y C -25 KPX Y A -40 KPX Z y -36 KPX Z w -36 KPX Z u -12 KPX Z quoteright 18 KPX Z quotedblright 18 KPX Z o -6 KPX Z i -12 KPX Z e -6 KPX Z a -6 KPX Z Q -20 KPX Z O -20 KPX Z G -20 KPX Z C -20 KPX Z A 30 KPX a quoteright -54 KPX a quotedblright -54 KPX b y -6 KPX b w -5 KPX b v -5 KPX b quoteright -30 KPX b quotedblright -30 KPX b period -15 KPX b comma -15 KPX braceleft Y 64 KPX braceleft W 64 KPX braceleft V 64 KPX braceleft T 40 KPX braceleft J 60 KPX bracketleft Y 60 KPX bracketleft W 64 KPX bracketleft V 64 KPX bracketleft T 35 KPX bracketleft J 30 KPX c quoteright 5 KPX c quotedblright 5 KPX colon space -30 KPX comma space -40 KPX comma quoteright -100 KPX comma quotedblright -100 KPX d quoteright -12 KPX d quotedblright -12 KPX d period 15 KPX d comma 15 KPX e y 6 KPX e x -10 KPX e w -10 KPX e v -10 KPX e quoteright -25 KPX e quotedblright -25 KPX f quoteright 120 KPX f quotedblright 120 KPX f period -30 KPX f parenright 100 KPX f comma -30 KPX f bracketright 110 KPX f braceright 110 KPX g y 50 KPX g quotedblright -20 KPX g p 30 KPX g f 42 KPX g comma 20 KPX h quoteright -78 KPX h quotedblright -78 KPX i quoteright -20 KPX i quotedblright -20 KPX j quoteright -20 KPX j quotedblright -20 KPX j period -20 KPX j comma -20 KPX k quoteright -38 KPX k quotedblright -38 KPX l quoteright -12 KPX l quotedblright -12 KPX m quoteright -78 KPX m quotedblright -78 KPX n quoteright -88 KPX n quotedblright -88 KPX o y -12 KPX o x -20 KPX o w -25 KPX o v -25 KPX o quoteright -50 KPX o quotedblright -50 KPX o period -10 KPX o comma -10 KPX p w -6 KPX p quoteright -30 KPX p quotedblright -52 KPX p period -15 KPX p comma -15 KPX parenleft Y 64 KPX parenleft W 64 KPX parenleft V 64 KPX parenleft T 30 KPX parenleft J 50 KPX period space -40 KPX period quoteright -100 KPX period quotedblright -100 KPX q quoteright -40 KPX q quotedblright -40 KPX q period -10 KPX q comma -5 KPX quotedblleft z -30 KPX quotedblleft x -60 KPX quotedblleft w -12 KPX quotedblleft v -12 KPX quotedblleft u -12 KPX quotedblleft t 5 KPX quotedblleft s -30 KPX quotedblleft r -12 KPX quotedblleft q -50 KPX quotedblleft p -12 KPX quotedblleft o -30 KPX quotedblleft n -12 KPX quotedblleft m -12 KPX quotedblleft l 10 KPX quotedblleft k 10 KPX quotedblleft h 10 KPX quotedblleft g -30 KPX quotedblleft e -30 KPX quotedblleft d -50 KPX quotedblleft c -30 KPX quotedblleft b 24 KPX quotedblleft a -50 KPX quotedblleft Y 30 KPX quotedblleft X 45 KPX quotedblleft W 55 KPX quotedblleft V 40 KPX quotedblleft T 36 KPX quotedblleft A -100 KPX quotedblright space -50 KPX quotedblright period -200 KPX quotedblright comma -200 KPX quoteleft z -30 KPX quoteleft y 30 KPX quoteleft x -10 KPX quoteleft w -12 KPX quoteleft u -12 KPX quoteleft t -30 KPX quoteleft s -30 KPX quoteleft r -12 KPX quoteleft q -30 KPX quoteleft p -12 KPX quoteleft o -30 KPX quoteleft n -12 KPX quoteleft m -12 KPX quoteleft l 10 KPX quoteleft k 10 KPX quoteleft h 10 KPX quoteleft g -30 KPX quoteleft e -30 KPX quoteleft d -30 KPX quoteleft c -30 KPX quoteleft b 24 KPX quoteleft a -30 KPX quoteleft Y 12 KPX quoteleft X 46 KPX quoteleft W 46 KPX quoteleft V 28 KPX quoteleft T 36 KPX quoteleft A -100 KPX quoteright v -20 KPX quoteright space -50 KPX quoteright s -45 KPX quoteright r -12 KPX quoteright period -140 KPX quoteright m -12 KPX quoteright l -12 KPX quoteright d -65 KPX quoteright comma -140 KPX r z 20 KPX r y 18 KPX r x 12 KPX r w 6 KPX r v 6 KPX r t 8 KPX r semicolon 20 KPX r quoteright -6 KPX r quotedblright -6 KPX r q -24 KPX r period -100 KPX r o -6 KPX r l -12 KPX r k -12 KPX r hyphen -40 KPX r h -10 KPX r f 8 KPX r endash -20 KPX r e -26 KPX r d -25 KPX r comma -100 KPX r colon 20 KPX r c -12 KPX r a -25 KPX s quoteright -25 KPX s quotedblright -30 KPX semicolon space -30 KPX space quotesinglbase -60 KPX space quoteleft -60 KPX space quotedblleft -60 KPX space quotedblbase -60 KPX space Y -70 KPX space W -50 KPX space V -70 KPX space T -50 KPX space A -50 KPX t quoteright 15 KPX t quotedblright 15 KPX t period 15 KPX t comma 15 KPX u quoteright -65 KPX u quotedblright -78 KPX u period 20 KPX u comma 20 KPX v quoteright -10 KPX v quotedblright -10 KPX v q -6 KPX v period -62 KPX v o -6 KPX v e -6 KPX v d -6 KPX v comma -62 KPX v c -6 KPX v a -6 KPX w quoteright -10 KPX w quotedblright -10 KPX w period -40 KPX w comma -50 KPX x y 12 KPX x w -6 KPX x quoteright -30 KPX x quotedblright -30 KPX x q -6 KPX x o -6 KPX x e -6 KPX x d -6 KPX x c -6 KPX y quoteright -10 KPX y quotedblright -10 KPX y q -10 KPX y period -56 KPX y d -10 KPX y comma -56 KPX z quoteright -40 KPX z quotedblright -40 KPX z o -6 KPX z e -6 KPX z d -6 KPX z c -6 EndKernPairs EndKernData EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/putr8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1989, 1991 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Fri Jan 17 13:38:17 1992 Comment UniqueID 37674 Comment VMusage 32991 39883 FontName Utopia-Regular FullName Utopia Regular FamilyName Utopia Weight Regular ItalicAngle 0 IsFixedPitch false FontBBox -158 -250 1158 890 UnderlinePosition -100 UnderlineThickness 50 Version 001.002 Notice Copyright (c) 1989, 1991 Adobe Systems Incorporated. All Rights Reserved.Utopia is a registered trademark of Adobe Systems Incorporated. EncodingScheme AdobeStandardEncoding CapHeight 692 XHeight 490 Ascender 742 Descender -230 StartCharMetrics 228 C 32 ; WX 225 ; N space ; B 0 0 0 0 ; C 33 ; WX 242 ; N exclam ; B 58 -12 184 707 ; C 34 ; WX 458 ; N quotedbl ; B 101 464 358 742 ; C 35 ; WX 530 ; N numbersign ; B 11 0 519 668 ; C 36 ; WX 530 ; N dollar ; B 44 -102 487 743 ; C 37 ; WX 838 ; N percent ; B 50 -25 788 700 ; C 38 ; WX 706 ; N ampersand ; B 46 -12 692 680 ; C 39 ; WX 278 ; N quoteright ; B 72 472 207 742 ; C 40 ; WX 350 ; N parenleft ; B 105 -128 325 692 ; C 41 ; WX 350 ; N parenright ; B 25 -128 245 692 ; C 42 ; WX 412 ; N asterisk ; B 50 356 363 707 ; C 43 ; WX 570 ; N plus ; B 43 0 527 490 ; C 44 ; WX 265 ; N comma ; B 51 -141 193 141 ; C 45 ; WX 392 ; N hyphen ; B 74 216 319 286 ; C 46 ; WX 265 ; N period ; B 70 -12 196 116 ; C 47 ; WX 460 ; N slash ; B 92 -15 369 707 ; C 48 ; WX 530 ; N zero ; B 41 -12 489 680 ; C 49 ; WX 530 ; N one ; B 109 0 437 680 ; C 50 ; WX 530 ; N two ; B 27 0 485 680 ; C 51 ; WX 530 ; N three ; B 27 -12 473 680 ; C 52 ; WX 530 ; N four ; B 19 0 493 668 ; C 53 ; WX 530 ; N five ; B 40 -12 480 668 ; C 54 ; WX 530 ; N six ; B 44 -12 499 680 ; C 55 ; WX 530 ; N seven ; B 41 -12 497 668 ; C 56 ; WX 530 ; N eight ; B 42 -12 488 680 ; C 57 ; WX 530 ; N nine ; B 36 -12 477 680 ; C 58 ; WX 265 ; N colon ; B 70 -12 196 490 ; C 59 ; WX 265 ; N semicolon ; B 51 -141 196 490 ; C 60 ; WX 570 ; N less ; B 46 1 524 499 ; C 61 ; WX 570 ; N equal ; B 43 111 527 389 ; C 62 ; WX 570 ; N greater ; B 46 1 524 499 ; C 63 ; WX 389 ; N question ; B 29 -12 359 707 ; C 64 ; WX 793 ; N at ; B 46 -15 755 707 ; C 65 ; WX 635 ; N A ; B -29 0 650 692 ; C 66 ; WX 646 ; N B ; B 35 0 595 692 ; C 67 ; WX 684 ; N C ; B 48 -15 649 707 ; C 68 ; WX 779 ; N D ; B 35 0 731 692 ; C 69 ; WX 606 ; N E ; B 35 0 577 692 ; C 70 ; WX 580 ; N F ; B 35 0 543 692 ; C 71 ; WX 734 ; N G ; B 48 -15 725 707 ; C 72 ; WX 798 ; N H ; B 35 0 763 692 ; C 73 ; WX 349 ; N I ; B 35 0 314 692 ; C 74 ; WX 350 ; N J ; B 0 -114 323 692 ; C 75 ; WX 658 ; N K ; B 35 -5 671 692 ; C 76 ; WX 568 ; N L ; B 35 0 566 692 ; C 77 ; WX 944 ; N M ; B 33 0 909 692 ; C 78 ; WX 780 ; N N ; B 34 0 753 692 ; C 79 ; WX 762 ; N O ; B 48 -15 714 707 ; C 80 ; WX 600 ; N P ; B 35 0 574 692 ; C 81 ; WX 762 ; N Q ; B 48 -193 714 707 ; C 82 ; WX 644 ; N R ; B 35 0 638 692 ; C 83 ; WX 541 ; N S ; B 50 -15 504 707 ; C 84 ; WX 621 ; N T ; B 22 0 599 692 ; C 85 ; WX 791 ; N U ; B 29 -15 762 692 ; C 86 ; WX 634 ; N V ; B -18 0 678 692 ; C 87 ; WX 940 ; N W ; B -13 0 977 692 ; C 88 ; WX 624 ; N X ; B -19 0 657 692 ; C 89 ; WX 588 ; N Y ; B -12 0 632 692 ; C 90 ; WX 610 ; N Z ; B 9 0 594 692 ; C 91 ; WX 330 ; N bracketleft ; B 133 -128 292 692 ; C 92 ; WX 460 ; N backslash ; B 91 -15 369 707 ; C 93 ; WX 330 ; N bracketright ; B 38 -128 197 692 ; C 94 ; WX 570 ; N asciicircum ; B 56 228 514 668 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 278 ; N quoteleft ; B 72 478 207 748 ; C 97 ; WX 523 ; N a ; B 49 -12 525 502 ; C 98 ; WX 598 ; N b ; B 20 -12 549 742 ; C 99 ; WX 496 ; N c ; B 49 -12 473 502 ; C 100 ; WX 598 ; N d ; B 49 -12 583 742 ; C 101 ; WX 514 ; N e ; B 49 -12 481 502 ; C 102 ; WX 319 ; N f ; B 30 0 389 742 ; L i fi ; L l fl ; C 103 ; WX 520 ; N g ; B 42 -242 525 512 ; C 104 ; WX 607 ; N h ; B 21 0 592 742 ; C 105 ; WX 291 ; N i ; B 32 0 276 715 ; C 106 ; WX 280 ; N j ; B -33 -242 214 715 ; C 107 ; WX 524 ; N k ; B 20 -5 538 742 ; C 108 ; WX 279 ; N l ; B 20 0 264 742 ; C 109 ; WX 923 ; N m ; B 32 0 908 502 ; C 110 ; WX 619 ; N n ; B 32 0 604 502 ; C 111 ; WX 577 ; N o ; B 49 -12 528 502 ; C 112 ; WX 608 ; N p ; B 25 -230 559 502 ; C 113 ; WX 591 ; N q ; B 49 -230 583 502 ; C 114 ; WX 389 ; N r ; B 32 0 386 502 ; C 115 ; WX 436 ; N s ; B 47 -12 400 502 ; C 116 ; WX 344 ; N t ; B 31 -12 342 616 ; C 117 ; WX 606 ; N u ; B 26 -12 591 502 ; C 118 ; WX 504 ; N v ; B 1 0 529 490 ; C 119 ; WX 768 ; N w ; B -2 0 792 490 ; C 120 ; WX 486 ; N x ; B 1 0 509 490 ; C 121 ; WX 506 ; N y ; B -5 -242 528 490 ; C 122 ; WX 480 ; N z ; B 19 0 462 490 ; C 123 ; WX 340 ; N braceleft ; B 79 -128 298 692 ; C 124 ; WX 228 ; N bar ; B 80 -250 148 750 ; C 125 ; WX 340 ; N braceright ; B 42 -128 261 692 ; C 126 ; WX 570 ; N asciitilde ; B 73 175 497 317 ; C 161 ; WX 242 ; N exclamdown ; B 58 -217 184 502 ; C 162 ; WX 530 ; N cent ; B 37 -10 487 675 ; C 163 ; WX 530 ; N sterling ; B 27 0 510 680 ; C 164 ; WX 150 ; N fraction ; B -158 -27 308 695 ; C 165 ; WX 530 ; N yen ; B -2 0 525 668 ; C 166 ; WX 530 ; N florin ; B -2 -135 522 691 ; C 167 ; WX 554 ; N section ; B 46 -115 507 707 ; C 168 ; WX 530 ; N currency ; B 25 90 505 578 ; C 169 ; WX 278 ; N quotesingle ; B 93 464 185 742 ; C 170 ; WX 458 ; N quotedblleft ; B 72 478 387 748 ; C 171 ; WX 442 ; N guillemotleft ; B 41 41 401 435 ; C 172 ; WX 257 ; N guilsinglleft ; B 41 41 216 435 ; C 173 ; WX 257 ; N guilsinglright ; B 41 41 216 435 ; C 174 ; WX 610 ; N fi ; B 30 0 595 742 ; C 175 ; WX 610 ; N fl ; B 30 0 595 742 ; C 177 ; WX 500 ; N endash ; B 0 221 500 279 ; C 178 ; WX 504 ; N dagger ; B 45 -125 459 717 ; C 179 ; WX 488 ; N daggerdbl ; B 45 -119 443 717 ; C 180 ; WX 265 ; N periodcentered ; B 70 188 196 316 ; C 182 ; WX 555 ; N paragraph ; B 64 -101 529 692 ; C 183 ; WX 409 ; N bullet ; B 45 192 364 512 ; C 184 ; WX 278 ; N quotesinglbase ; B 72 -125 207 145 ; C 185 ; WX 458 ; N quotedblbase ; B 72 -125 387 145 ; C 186 ; WX 458 ; N quotedblright ; B 72 472 387 742 ; C 187 ; WX 442 ; N guillemotright ; B 41 41 401 435 ; C 188 ; WX 1000 ; N ellipsis ; B 104 -12 896 116 ; C 189 ; WX 1208 ; N perthousand ; B 50 -25 1158 700 ; C 191 ; WX 389 ; N questiondown ; B 30 -217 360 502 ; C 193 ; WX 400 ; N grave ; B 49 542 271 723 ; C 194 ; WX 400 ; N acute ; B 129 542 351 723 ; C 195 ; WX 400 ; N circumflex ; B 47 541 353 720 ; C 196 ; WX 400 ; N tilde ; B 22 563 377 682 ; C 197 ; WX 400 ; N macron ; B 56 597 344 656 ; C 198 ; WX 400 ; N breve ; B 63 568 337 704 ; C 199 ; WX 400 ; N dotaccent ; B 140 570 260 683 ; C 200 ; WX 400 ; N dieresis ; B 36 570 364 683 ; C 202 ; WX 400 ; N ring ; B 92 550 308 752 ; C 203 ; WX 400 ; N cedilla ; B 163 -230 329 0 ; C 205 ; WX 400 ; N hungarumlaut ; B 101 546 380 750 ; C 206 ; WX 400 ; N ogonek ; B 103 -230 295 0 ; C 207 ; WX 400 ; N caron ; B 47 541 353 720 ; C 208 ; WX 1000 ; N emdash ; B 0 221 1000 279 ; C 225 ; WX 876 ; N AE ; B -63 0 847 692 ; C 227 ; WX 390 ; N ordfeminine ; B 40 265 364 590 ; C 232 ; WX 574 ; N Lslash ; B 36 0 572 692 ; C 233 ; WX 762 ; N Oslash ; B 48 -53 714 739 ; C 234 ; WX 1025 ; N OE ; B 48 0 996 692 ; C 235 ; WX 398 ; N ordmasculine ; B 35 265 363 590 ; C 241 ; WX 797 ; N ae ; B 49 -12 764 502 ; C 245 ; WX 291 ; N dotlessi ; B 32 0 276 502 ; C 248 ; WX 294 ; N lslash ; B 14 0 293 742 ; C 249 ; WX 577 ; N oslash ; B 49 -41 528 532 ; C 250 ; WX 882 ; N oe ; B 49 -12 849 502 ; C 251 ; WX 601 ; N germandbls ; B 22 -12 573 742 ; C -1 ; WX 380 ; N onesuperior ; B 81 272 307 680 ; C -1 ; WX 570 ; N minus ; B 43 221 527 279 ; C -1 ; WX 350 ; N degree ; B 37 404 313 680 ; C -1 ; WX 577 ; N oacute ; B 49 -12 528 723 ; C -1 ; WX 762 ; N Odieresis ; B 48 -15 714 841 ; C -1 ; WX 577 ; N odieresis ; B 49 -12 528 683 ; C -1 ; WX 606 ; N Eacute ; B 35 0 577 890 ; C -1 ; WX 606 ; N ucircumflex ; B 26 -12 591 720 ; C -1 ; WX 860 ; N onequarter ; B 65 -27 795 695 ; C -1 ; WX 570 ; N logicalnot ; B 43 102 527 389 ; C -1 ; WX 606 ; N Ecircumflex ; B 35 0 577 876 ; C -1 ; WX 860 ; N onehalf ; B 58 -27 807 695 ; C -1 ; WX 762 ; N Otilde ; B 48 -15 714 842 ; C -1 ; WX 606 ; N uacute ; B 26 -12 591 723 ; C -1 ; WX 514 ; N eacute ; B 49 -12 481 723 ; C -1 ; WX 291 ; N iacute ; B 32 0 317 723 ; C -1 ; WX 606 ; N Egrave ; B 35 0 577 890 ; C -1 ; WX 291 ; N icircumflex ; B -3 0 304 720 ; C -1 ; WX 606 ; N mu ; B 26 -246 591 502 ; C -1 ; WX 228 ; N brokenbar ; B 80 -175 148 675 ; C -1 ; WX 606 ; N thorn ; B 23 -230 557 722 ; C -1 ; WX 627 ; N Aring ; B -32 0 647 861 ; C -1 ; WX 506 ; N yacute ; B -5 -242 528 723 ; C -1 ; WX 588 ; N Ydieresis ; B -12 0 632 841 ; C -1 ; WX 1100 ; N trademark ; B 45 277 1048 692 ; C -1 ; WX 818 ; N registered ; B 45 -15 773 707 ; C -1 ; WX 577 ; N ocircumflex ; B 49 -12 528 720 ; C -1 ; WX 635 ; N Agrave ; B -29 0 650 890 ; C -1 ; WX 541 ; N Scaron ; B 50 -15 504 882 ; C -1 ; WX 791 ; N Ugrave ; B 29 -15 762 890 ; C -1 ; WX 606 ; N Edieresis ; B 35 0 577 841 ; C -1 ; WX 791 ; N Uacute ; B 29 -15 762 890 ; C -1 ; WX 577 ; N otilde ; B 49 -12 528 682 ; C -1 ; WX 619 ; N ntilde ; B 32 0 604 682 ; C -1 ; WX 506 ; N ydieresis ; B -5 -242 528 683 ; C -1 ; WX 635 ; N Aacute ; B -29 0 650 890 ; C -1 ; WX 577 ; N eth ; B 49 -12 528 742 ; C -1 ; WX 523 ; N acircumflex ; B 49 -12 525 720 ; C -1 ; WX 523 ; N aring ; B 49 -12 525 752 ; C -1 ; WX 762 ; N Ograve ; B 48 -15 714 890 ; C -1 ; WX 496 ; N ccedilla ; B 49 -230 473 502 ; C -1 ; WX 570 ; N multiply ; B 63 22 507 478 ; C -1 ; WX 570 ; N divide ; B 43 26 527 474 ; C -1 ; WX 380 ; N twosuperior ; B 32 272 348 680 ; C -1 ; WX 780 ; N Ntilde ; B 34 0 753 842 ; C -1 ; WX 606 ; N ugrave ; B 26 -12 591 723 ; C -1 ; WX 791 ; N Ucircumflex ; B 29 -15 762 876 ; C -1 ; WX 635 ; N Atilde ; B -29 0 650 842 ; C -1 ; WX 480 ; N zcaron ; B 19 0 462 720 ; C -1 ; WX 291 ; N idieresis ; B -19 0 310 683 ; C -1 ; WX 635 ; N Acircumflex ; B -29 0 650 876 ; C -1 ; WX 349 ; N Icircumflex ; B 22 0 328 876 ; C -1 ; WX 588 ; N Yacute ; B -12 0 632 890 ; C -1 ; WX 762 ; N Oacute ; B 48 -15 714 890 ; C -1 ; WX 635 ; N Adieresis ; B -29 0 650 841 ; C -1 ; WX 610 ; N Zcaron ; B 9 0 594 882 ; C -1 ; WX 523 ; N agrave ; B 49 -12 525 723 ; C -1 ; WX 380 ; N threesuperior ; B 36 265 339 680 ; C -1 ; WX 577 ; N ograve ; B 49 -12 528 723 ; C -1 ; WX 860 ; N threequarters ; B 50 -27 808 695 ; C -1 ; WX 785 ; N Eth ; B 20 0 737 692 ; C -1 ; WX 570 ; N plusminus ; B 43 0 527 556 ; C -1 ; WX 606 ; N udieresis ; B 26 -12 591 683 ; C -1 ; WX 514 ; N edieresis ; B 49 -12 481 683 ; C -1 ; WX 523 ; N aacute ; B 49 -12 525 723 ; C -1 ; WX 291 ; N igrave ; B -35 0 276 723 ; C -1 ; WX 349 ; N Idieresis ; B 13 0 337 841 ; C -1 ; WX 523 ; N adieresis ; B 49 -12 525 683 ; C -1 ; WX 349 ; N Iacute ; B 35 0 371 890 ; C -1 ; WX 818 ; N copyright ; B 45 -15 773 707 ; C -1 ; WX 349 ; N Igrave ; B -17 0 314 890 ; C -1 ; WX 680 ; N Ccedilla ; B 48 -230 649 707 ; C -1 ; WX 436 ; N scaron ; B 47 -12 400 720 ; C -1 ; WX 514 ; N egrave ; B 49 -12 481 723 ; C -1 ; WX 762 ; N Ocircumflex ; B 48 -15 714 876 ; C -1 ; WX 593 ; N Thorn ; B 35 0 556 692 ; C -1 ; WX 523 ; N atilde ; B 49 -12 525 682 ; C -1 ; WX 791 ; N Udieresis ; B 29 -15 762 841 ; C -1 ; WX 514 ; N ecircumflex ; B 49 -12 481 720 ; EndCharMetrics StartKernData StartKernPairs 712 KPX A z 6 KPX A y -50 KPX A w -45 KPX A v -60 KPX A u -25 KPX A t -12 KPX A quoteright -120 KPX A quotedblright -120 KPX A q -6 KPX A p -18 KPX A o -12 KPX A e -6 KPX A d -12 KPX A c -12 KPX A b -12 KPX A Y -70 KPX A X -6 KPX A W -58 KPX A V -72 KPX A U -50 KPX A T -70 KPX A Q -24 KPX A O -24 KPX A G -24 KPX A C -24 KPX B y -18 KPX B u -12 KPX B r -12 KPX B period -30 KPX B o -6 KPX B l -12 KPX B i -12 KPX B h -12 KPX B e -6 KPX B comma -20 KPX B a -12 KPX B W -25 KPX B V -20 KPX B U -20 KPX B T -20 KPX C z -18 KPX C y -24 KPX C u -18 KPX C r -6 KPX C o -12 KPX C e -12 KPX C a -12 KPX C Q -6 KPX C O -6 KPX C G -6 KPX C C -6 KPX D y 6 KPX D u -12 KPX D r -12 KPX D quoteright -20 KPX D quotedblright -20 KPX D period -60 KPX D i -6 KPX D h -12 KPX D e -6 KPX D comma -50 KPX D a -6 KPX D Y -45 KPX D W -35 KPX D V -35 KPX E z -6 KPX E y -30 KPX E x -6 KPX E w -24 KPX E v -24 KPX E u -12 KPX E t -18 KPX E r -4 KPX E q -6 KPX E p -18 KPX E o -6 KPX E n -4 KPX E m -4 KPX E l 5 KPX E k 5 KPX E j -6 KPX E i -6 KPX E g -6 KPX E f -12 KPX E e -6 KPX E d -6 KPX E c -6 KPX E b -12 KPX E Y -6 KPX E W -6 KPX E V -6 KPX F y -18 KPX F u -12 KPX F r -20 KPX F period -180 KPX F o -36 KPX F l -12 KPX F i -10 KPX F endash 20 KPX F e -36 KPX F comma -180 KPX F a -48 KPX F A -60 KPX G y -18 KPX G u -12 KPX G r -5 KPX G o 5 KPX G n -5 KPX G l -6 KPX G i -12 KPX G h -12 KPX G e 5 KPX G a -12 KPX H y -24 KPX H u -26 KPX H o -30 KPX H i -18 KPX H e -30 KPX H a -24 KPX I z -6 KPX I y -6 KPX I x -6 KPX I w -18 KPX I v -24 KPX I u -26 KPX I t -24 KPX I s -18 KPX I r -12 KPX I p -26 KPX I o -30 KPX I n -18 KPX I m -18 KPX I l -6 KPX I k -6 KPX I h -6 KPX I g -10 KPX I f -6 KPX I e -30 KPX I d -30 KPX I c -30 KPX I b -6 KPX I a -24 KPX J y -12 KPX J u -36 KPX J o -30 KPX J i -20 KPX J e -30 KPX J bracketright 20 KPX J braceright 20 KPX J a -36 KPX K y -60 KPX K w -70 KPX K v -70 KPX K u -42 KPX K o -30 KPX K i 6 KPX K e -24 KPX K a -12 KPX K Q -42 KPX K O -42 KPX K G -42 KPX K C -42 KPX L y -52 KPX L w -58 KPX L u -12 KPX L quoteright -130 KPX L quotedblright -50 KPX L l 6 KPX L j -6 KPX L Y -70 KPX L W -90 KPX L V -100 KPX L U -24 KPX L T -100 KPX L Q -18 KPX L O -10 KPX L G -18 KPX L C -18 KPX L A 12 KPX M y -24 KPX M u -36 KPX M o -30 KPX M n -6 KPX M j -12 KPX M i -12 KPX M e -30 KPX M d -30 KPX M c -30 KPX M a -12 KPX N y -24 KPX N u -30 KPX N o -30 KPX N i -24 KPX N e -30 KPX N a -30 KPX O z -6 KPX O u -6 KPX O t -6 KPX O s -6 KPX O q -6 KPX O period -60 KPX O p -6 KPX O o -6 KPX O n -5 KPX O m -5 KPX O l -6 KPX O k -6 KPX O i -5 KPX O h -12 KPX O g -6 KPX O e -6 KPX O d -6 KPX O comma -50 KPX O c -6 KPX O a -12 KPX O Y -55 KPX O X -24 KPX O W -30 KPX O V -18 KPX O T -30 KPX O A -18 KPX P u -12 KPX P t -6 KPX P s -24 KPX P r -12 KPX P period -200 KPX P o -30 KPX P n -12 KPX P l -6 KPX P hyphen -40 KPX P h -6 KPX P e -30 KPX P comma -200 KPX P a -36 KPX P I -6 KPX P H -12 KPX P E -6 KPX P A -55 KPX Q u -6 KPX Q a -18 KPX Q Y -30 KPX Q X -24 KPX Q W -24 KPX Q V -18 KPX Q U -30 KPX Q T -24 KPX Q A -18 KPX R y -20 KPX R u -12 KPX R quoteright -20 KPX R quotedblright -20 KPX R o -20 KPX R hyphen -30 KPX R e -20 KPX R d -20 KPX R a -12 KPX R Y -45 KPX R W -24 KPX R V -32 KPX R U -30 KPX R T -32 KPX R Q -24 KPX R O -24 KPX R G -24 KPX R C -24 KPX S y -25 KPX S w -30 KPX S v -30 KPX S u -24 KPX S t -24 KPX S r -20 KPX S quoteright -10 KPX S quotedblright -10 KPX S q -5 KPX S p -24 KPX S o -12 KPX S n -20 KPX S m -20 KPX S l -18 KPX S k -24 KPX S j -12 KPX S i -20 KPX S h -12 KPX S e -12 KPX S a -18 KPX T z -64 KPX T y -84 KPX T w -100 KPX T u -82 KPX T semicolon -56 KPX T s -82 KPX T r -82 KPX T quoteright 24 KPX T period -110 KPX T parenright 54 KPX T o -100 KPX T m -82 KPX T i -34 KPX T hyphen -100 KPX T endash -50 KPX T emdash -50 KPX T e -100 KPX T comma -110 KPX T colon -50 KPX T bracketright 54 KPX T braceright 54 KPX T a -100 KPX T Y 12 KPX T X 18 KPX T W 6 KPX T V 6 KPX T T 12 KPX T S -12 KPX T Q -18 KPX T O -18 KPX T G -18 KPX T C -18 KPX T A -65 KPX U z -30 KPX U y -20 KPX U x -30 KPX U v -20 KPX U t -36 KPX U s -40 KPX U r -40 KPX U p -42 KPX U n -40 KPX U m -40 KPX U l -12 KPX U k -12 KPX U i -28 KPX U h -6 KPX U g -50 KPX U f -12 KPX U d -45 KPX U c -45 KPX U b -12 KPX U a -40 KPX U A -40 KPX V y -36 KPX V u -40 KPX V semicolon -45 KPX V r -70 KPX V quoteright 36 KPX V quotedblright 20 KPX V period -140 KPX V parenright 85 KPX V o -70 KPX V i 6 KPX V hyphen -60 KPX V endash -20 KPX V emdash -20 KPX V e -70 KPX V comma -140 KPX V colon -45 KPX V bracketright 64 KPX V braceright 64 KPX V a -60 KPX V T 6 KPX V Q -12 KPX V O -12 KPX V G -12 KPX V C -12 KPX V A -60 KPX W y -50 KPX W u -46 KPX W semicolon -40 KPX W r -45 KPX W quoteright 36 KPX W quotedblright 20 KPX W period -110 KPX W parenright 85 KPX W o -65 KPX W m -45 KPX W i -10 KPX W hyphen -40 KPX W e -65 KPX W d -65 KPX W comma -100 KPX W colon -40 KPX W bracketright 64 KPX W braceright 64 KPX W a -60 KPX W T 18 KPX W Q -6 KPX W O -6 KPX W G -6 KPX W C -6 KPX W A -48 KPX X y -18 KPX X u -24 KPX X quoteright 15 KPX X e -6 KPX X a -6 KPX X Q -24 KPX X O -30 KPX X G -30 KPX X C -30 KPX X A 6 KPX Y v -50 KPX Y u -54 KPX Y t -46 KPX Y semicolon -37 KPX Y quoteright 36 KPX Y quotedblright 20 KPX Y q -100 KPX Y period -90 KPX Y parenright 60 KPX Y o -90 KPX Y l 10 KPX Y hyphen -50 KPX Y emdash -20 KPX Y e -90 KPX Y d -90 KPX Y comma -90 KPX Y colon -50 KPX Y bracketright 64 KPX Y braceright 64 KPX Y a -68 KPX Y Y 12 KPX Y X 12 KPX Y W 12 KPX Y V 12 KPX Y T 12 KPX Y Q -18 KPX Y O -18 KPX Y G -18 KPX Y C -18 KPX Y A -32 KPX Z y -36 KPX Z w -36 KPX Z u -6 KPX Z o -12 KPX Z i -12 KPX Z e -6 KPX Z a -6 KPX Z Q -20 KPX Z O -20 KPX Z G -30 KPX Z C -20 KPX Z A 20 KPX a quoteright -70 KPX a quotedblright -80 KPX b y -25 KPX b w -30 KPX b v -35 KPX b quoteright -70 KPX b quotedblright -70 KPX b period -40 KPX b comma -40 KPX braceleft Y 64 KPX braceleft W 64 KPX braceleft V 64 KPX braceleft T 54 KPX braceleft J 80 KPX bracketleft Y 64 KPX bracketleft W 64 KPX bracketleft V 64 KPX bracketleft T 54 KPX bracketleft J 80 KPX c quoteright -28 KPX c quotedblright -28 KPX c period -10 KPX comma quoteright -50 KPX comma quotedblright -50 KPX d quoteright -24 KPX d quotedblright -24 KPX e z -4 KPX e quoteright -60 KPX e quotedblright -60 KPX e period -20 KPX e comma -20 KPX f quotesingle 30 KPX f quoteright 65 KPX f quotedblright 56 KPX f quotedbl 30 KPX f parenright 100 KPX f bracketright 100 KPX f braceright 100 KPX g quoteright -18 KPX g quotedblright -10 KPX h quoteright -80 KPX h quotedblright -80 KPX j quoteright -20 KPX j quotedblright -20 KPX j period -30 KPX j comma -30 KPX k quoteright -40 KPX k quotedblright -40 KPX l quoteright -10 KPX l quotedblright -10 KPX m quoteright -80 KPX m quotedblright -80 KPX n quoteright -80 KPX n quotedblright -80 KPX o z -12 KPX o y -30 KPX o x -18 KPX o w -30 KPX o v -30 KPX o quoteright -70 KPX o quotedblright -70 KPX o period -40 KPX o comma -40 KPX p z -20 KPX p y -25 KPX p w -30 KPX p quoteright -70 KPX p quotedblright -70 KPX p period -40 KPX p comma -40 KPX parenleft Y 64 KPX parenleft W 64 KPX parenleft V 64 KPX parenleft T 64 KPX parenleft J 80 KPX period quoteright -50 KPX period quotedblright -50 KPX q quoteright -50 KPX q quotedblright -50 KPX q period -20 KPX q comma -10 KPX quotedblleft z -60 KPX quotedblleft y -30 KPX quotedblleft x -40 KPX quotedblleft w -20 KPX quotedblleft v -20 KPX quotedblleft u -40 KPX quotedblleft t -40 KPX quotedblleft s -50 KPX quotedblleft r -50 KPX quotedblleft q -80 KPX quotedblleft p -50 KPX quotedblleft o -80 KPX quotedblleft n -50 KPX quotedblleft m -50 KPX quotedblleft g -70 KPX quotedblleft f -50 KPX quotedblleft e -80 KPX quotedblleft d -80 KPX quotedblleft c -80 KPX quotedblleft a -70 KPX quotedblleft Z -20 KPX quotedblleft Y 12 KPX quotedblleft W 18 KPX quotedblleft V 18 KPX quotedblleft U -20 KPX quotedblleft T 10 KPX quotedblleft S -20 KPX quotedblleft R -20 KPX quotedblleft Q -20 KPX quotedblleft P -20 KPX quotedblleft O -30 KPX quotedblleft N -20 KPX quotedblleft M -20 KPX quotedblleft L -20 KPX quotedblleft K -20 KPX quotedblleft J -40 KPX quotedblleft I -20 KPX quotedblleft H -20 KPX quotedblleft G -30 KPX quotedblleft F -20 KPX quotedblleft E -20 KPX quotedblleft D -20 KPX quotedblleft C -30 KPX quotedblleft B -20 KPX quotedblleft A -130 KPX quotedblright period -130 KPX quotedblright comma -130 KPX quoteleft z -40 KPX quoteleft y -35 KPX quoteleft x -30 KPX quoteleft w -20 KPX quoteleft v -20 KPX quoteleft u -50 KPX quoteleft t -40 KPX quoteleft s -45 KPX quoteleft r -50 KPX quoteleft quoteleft -72 KPX quoteleft q -70 KPX quoteleft p -50 KPX quoteleft o -70 KPX quoteleft n -50 KPX quoteleft m -50 KPX quoteleft g -65 KPX quoteleft f -40 KPX quoteleft e -70 KPX quoteleft d -70 KPX quoteleft c -70 KPX quoteleft a -60 KPX quoteleft Z -20 KPX quoteleft Y 18 KPX quoteleft X 12 KPX quoteleft W 18 KPX quoteleft V 18 KPX quoteleft U -20 KPX quoteleft T 10 KPX quoteleft R -20 KPX quoteleft Q -20 KPX quoteleft P -20 KPX quoteleft O -30 KPX quoteleft N -20 KPX quoteleft M -20 KPX quoteleft L -20 KPX quoteleft K -20 KPX quoteleft J -40 KPX quoteleft I -20 KPX quoteleft H -20 KPX quoteleft G -40 KPX quoteleft F -20 KPX quoteleft E -20 KPX quoteleft D -20 KPX quoteleft C -30 KPX quoteleft B -20 KPX quoteleft A -130 KPX quoteright v -40 KPX quoteright t -75 KPX quoteright s -110 KPX quoteright r -70 KPX quoteright quoteright -72 KPX quoteright period -130 KPX quoteright m -70 KPX quoteright l -6 KPX quoteright d -120 KPX quoteright comma -130 KPX r z 10 KPX r y 18 KPX r x 12 KPX r w 18 KPX r v 18 KPX r u 8 KPX r t 8 KPX r semicolon 10 KPX r quoteright -20 KPX r quotedblright -20 KPX r q -6 KPX r period -60 KPX r o -6 KPX r n 8 KPX r m 8 KPX r k -6 KPX r i 8 KPX r hyphen -20 KPX r h 6 KPX r g -6 KPX r f 8 KPX r e -20 KPX r d -20 KPX r comma -60 KPX r colon 10 KPX r c -20 KPX r a -10 KPX s quoteright -40 KPX s quotedblright -40 KPX s period -20 KPX s comma -10 KPX space quotesinglbase -60 KPX space quoteleft -40 KPX space quotedblleft -40 KPX space quotedblbase -60 KPX space Y -60 KPX space W -60 KPX space V -60 KPX space T -36 KPX t quoteright -18 KPX t quotedblright -18 KPX u quoteright -30 KPX u quotedblright -30 KPX v semicolon 10 KPX v quoteright 20 KPX v quotedblright 20 KPX v q -10 KPX v period -90 KPX v o -5 KPX v e -5 KPX v d -10 KPX v comma -90 KPX v colon 10 KPX v c -6 KPX v a -6 KPX w semicolon 10 KPX w quoteright 20 KPX w quotedblright 20 KPX w q -6 KPX w period -80 KPX w e -6 KPX w d -6 KPX w comma -75 KPX w colon 10 KPX w c -6 KPX x quoteright -10 KPX x quotedblright -20 KPX x q -6 KPX x o -6 KPX x d -12 KPX x c -12 KPX y semicolon 10 KPX y q -6 KPX y period -95 KPX y o -6 KPX y hyphen -30 KPX y e -6 KPX y d -6 KPX y comma -85 KPX y colon 10 KPX y c -6 KPX z quoteright -20 KPX z quotedblright -30 KPX z o -6 KPX z e -6 KPX z d -6 KPX z c -6 EndKernPairs EndKernData EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/putri8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1989, 1991 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Fri Jan 17 13:15:45 1992 Comment UniqueID 37666 Comment VMusage 34143 41035 FontName Utopia-Italic FullName Utopia Italic FamilyName Utopia Weight Regular ItalicAngle -13 IsFixedPitch false FontBBox -201 -250 1170 890 UnderlinePosition -100 UnderlineThickness 50 Version 001.002 Notice Copyright (c) 1989, 1991 Adobe Systems Incorporated. All Rights Reserved.Utopia is a registered trademark of Adobe Systems Incorporated. EncodingScheme AdobeStandardEncoding CapHeight 692 XHeight 502 Ascender 742 Descender -242 StartCharMetrics 228 C 32 ; WX 225 ; N space ; B 0 0 0 0 ; C 33 ; WX 240 ; N exclam ; B 34 -12 290 707 ; C 34 ; WX 402 ; N quotedbl ; B 171 469 454 742 ; C 35 ; WX 530 ; N numbersign ; B 54 0 585 668 ; C 36 ; WX 530 ; N dollar ; B 31 -109 551 743 ; C 37 ; WX 826 ; N percent ; B 98 -25 795 702 ; C 38 ; WX 725 ; N ampersand ; B 60 -12 703 680 ; C 39 ; WX 216 ; N quoteright ; B 112 482 265 742 ; C 40 ; WX 350 ; N parenleft ; B 106 -128 458 692 ; C 41 ; WX 350 ; N parenright ; B -46 -128 306 692 ; C 42 ; WX 412 ; N asterisk ; B 106 356 458 707 ; C 43 ; WX 570 ; N plus ; B 58 0 542 490 ; C 44 ; WX 265 ; N comma ; B 11 -134 173 142 ; C 45 ; WX 392 ; N hyphen ; B 82 216 341 286 ; C 46 ; WX 265 ; N period ; B 47 -12 169 113 ; C 47 ; WX 270 ; N slash ; B 0 -15 341 707 ; C 48 ; WX 530 ; N zero ; B 60 -12 541 680 ; C 49 ; WX 530 ; N one ; B 74 0 429 680 ; C 50 ; WX 530 ; N two ; B -2 0 538 680 ; C 51 ; WX 530 ; N three ; B 19 -12 524 680 ; C 52 ; WX 530 ; N four ; B 32 0 509 668 ; C 53 ; WX 530 ; N five ; B 24 -12 550 668 ; C 54 ; WX 530 ; N six ; B 56 -12 551 680 ; C 55 ; WX 530 ; N seven ; B 130 -12 600 668 ; C 56 ; WX 530 ; N eight ; B 46 -12 535 680 ; C 57 ; WX 530 ; N nine ; B 51 -12 536 680 ; C 58 ; WX 265 ; N colon ; B 47 -12 248 490 ; C 59 ; WX 265 ; N semicolon ; B 11 -134 248 490 ; C 60 ; WX 570 ; N less ; B 51 1 529 497 ; C 61 ; WX 570 ; N equal ; B 58 111 542 389 ; C 62 ; WX 570 ; N greater ; B 51 1 529 497 ; C 63 ; WX 425 ; N question ; B 115 -12 456 707 ; C 64 ; WX 794 ; N at ; B 88 -15 797 707 ; C 65 ; WX 624 ; N A ; B -58 0 623 692 ; C 66 ; WX 632 ; N B ; B 3 0 636 692 ; C 67 ; WX 661 ; N C ; B 79 -15 723 707 ; C 68 ; WX 763 ; N D ; B 5 0 767 692 ; C 69 ; WX 596 ; N E ; B 3 0 657 692 ; C 70 ; WX 571 ; N F ; B 3 0 660 692 ; C 71 ; WX 709 ; N G ; B 79 -15 737 707 ; C 72 ; WX 775 ; N H ; B 5 0 857 692 ; C 73 ; WX 345 ; N I ; B 5 0 428 692 ; C 74 ; WX 352 ; N J ; B -78 -119 436 692 ; C 75 ; WX 650 ; N K ; B 5 -5 786 692 ; C 76 ; WX 565 ; N L ; B 5 0 568 692 ; C 77 ; WX 920 ; N M ; B -4 0 1002 692 ; C 78 ; WX 763 ; N N ; B -4 0 855 692 ; C 79 ; WX 753 ; N O ; B 79 -15 754 707 ; C 80 ; WX 614 ; N P ; B 5 0 646 692 ; C 81 ; WX 753 ; N Q ; B 79 -203 754 707 ; C 82 ; WX 640 ; N R ; B 5 0 642 692 ; C 83 ; WX 533 ; N S ; B 34 -15 542 707 ; C 84 ; WX 606 ; N T ; B 102 0 708 692 ; C 85 ; WX 794 ; N U ; B 131 -15 880 692 ; C 86 ; WX 637 ; N V ; B 96 0 786 692 ; C 87 ; WX 946 ; N W ; B 86 0 1075 692 ; C 88 ; WX 632 ; N X ; B -36 0 735 692 ; C 89 ; WX 591 ; N Y ; B 96 0 744 692 ; C 90 ; WX 622 ; N Z ; B -20 0 703 692 ; C 91 ; WX 330 ; N bracketleft ; B 69 -128 414 692 ; C 92 ; WX 390 ; N backslash ; B 89 -15 371 707 ; C 93 ; WX 330 ; N bracketright ; B -21 -128 324 692 ; C 94 ; WX 570 ; N asciicircum ; B 83 228 547 668 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 216 ; N quoteleft ; B 130 488 283 748 ; C 97 ; WX 561 ; N a ; B 31 -12 563 502 ; C 98 ; WX 559 ; N b ; B 47 -12 557 742 ; C 99 ; WX 441 ; N c ; B 46 -12 465 502 ; C 100 ; WX 587 ; N d ; B 37 -12 612 742 ; C 101 ; WX 453 ; N e ; B 45 -12 471 502 ; C 102 ; WX 315 ; N f ; B -107 -242 504 742 ; L i fi ; L l fl ; C 103 ; WX 499 ; N g ; B -5 -242 573 512 ; C 104 ; WX 607 ; N h ; B 57 -12 588 742 ; C 105 ; WX 317 ; N i ; B 79 -12 328 715 ; C 106 ; WX 309 ; N j ; B -95 -242 330 715 ; C 107 ; WX 545 ; N k ; B 57 -12 567 742 ; C 108 ; WX 306 ; N l ; B 76 -12 331 742 ; C 109 ; WX 912 ; N m ; B 63 -12 894 502 ; C 110 ; WX 618 ; N n ; B 63 -12 600 502 ; C 111 ; WX 537 ; N o ; B 49 -12 522 502 ; C 112 ; WX 590 ; N p ; B 22 -242 586 502 ; C 113 ; WX 559 ; N q ; B 38 -242 567 525 ; C 114 ; WX 402 ; N r ; B 69 -12 448 502 ; C 115 ; WX 389 ; N s ; B 19 -12 397 502 ; C 116 ; WX 341 ; N t ; B 84 -12 404 616 ; C 117 ; WX 618 ; N u ; B 89 -12 609 502 ; C 118 ; WX 510 ; N v ; B 84 -12 528 502 ; C 119 ; WX 785 ; N w ; B 87 -12 808 502 ; C 120 ; WX 516 ; N x ; B -4 -12 531 502 ; C 121 ; WX 468 ; N y ; B -40 -242 505 502 ; C 122 ; WX 468 ; N z ; B 4 -12 483 490 ; C 123 ; WX 340 ; N braceleft ; B 100 -128 423 692 ; C 124 ; WX 270 ; N bar ; B 130 -250 198 750 ; C 125 ; WX 340 ; N braceright ; B -20 -128 302 692 ; C 126 ; WX 570 ; N asciitilde ; B 98 176 522 318 ; C 161 ; WX 240 ; N exclamdown ; B -18 -217 238 502 ; C 162 ; WX 530 ; N cent ; B 94 -21 563 669 ; C 163 ; WX 530 ; N sterling ; B 9 0 549 680 ; C 164 ; WX 100 ; N fraction ; B -201 -24 369 698 ; C 165 ; WX 530 ; N yen ; B 72 0 645 668 ; C 166 ; WX 530 ; N florin ; B 4 -135 588 691 ; C 167 ; WX 530 ; N section ; B 55 -115 533 707 ; C 168 ; WX 530 ; N currency ; B 56 90 536 578 ; C 169 ; WX 216 ; N quotesingle ; B 161 469 274 742 ; C 170 ; WX 402 ; N quotedblleft ; B 134 488 473 748 ; C 171 ; WX 462 ; N guillemotleft ; B 79 41 470 435 ; C 172 ; WX 277 ; N guilsinglleft ; B 71 41 267 435 ; C 173 ; WX 277 ; N guilsinglright ; B 44 41 240 435 ; C 174 ; WX 607 ; N fi ; B -107 -242 589 742 ; C 175 ; WX 603 ; N fl ; B -107 -242 628 742 ; C 177 ; WX 500 ; N endash ; B 12 221 524 279 ; C 178 ; WX 500 ; N dagger ; B 101 -125 519 717 ; C 179 ; WX 490 ; N daggerdbl ; B 39 -119 509 717 ; C 180 ; WX 265 ; N periodcentered ; B 89 187 211 312 ; C 182 ; WX 560 ; N paragraph ; B 109 -101 637 692 ; C 183 ; WX 500 ; N bullet ; B 110 192 429 512 ; C 184 ; WX 216 ; N quotesinglbase ; B -7 -109 146 151 ; C 185 ; WX 402 ; N quotedblbase ; B -7 -109 332 151 ; C 186 ; WX 402 ; N quotedblright ; B 107 484 446 744 ; C 187 ; WX 462 ; N guillemotright ; B 29 41 420 435 ; C 188 ; WX 1000 ; N ellipsis ; B 85 -12 873 113 ; C 189 ; WX 1200 ; N perthousand ; B 98 -25 1170 702 ; C 191 ; WX 425 ; N questiondown ; B 3 -217 344 502 ; C 193 ; WX 400 ; N grave ; B 146 542 368 723 ; C 194 ; WX 400 ; N acute ; B 214 542 436 723 ; C 195 ; WX 400 ; N circumflex ; B 187 546 484 720 ; C 196 ; WX 400 ; N tilde ; B 137 563 492 682 ; C 197 ; WX 400 ; N macron ; B 193 597 489 656 ; C 198 ; WX 400 ; N breve ; B 227 568 501 698 ; C 199 ; WX 402 ; N dotaccent ; B 252 570 359 680 ; C 200 ; WX 400 ; N dieresis ; B 172 572 487 682 ; C 202 ; WX 400 ; N ring ; B 186 550 402 752 ; C 203 ; WX 400 ; N cedilla ; B 62 -230 241 0 ; C 205 ; WX 400 ; N hungarumlaut ; B 176 546 455 750 ; C 206 ; WX 350 ; N ogonek ; B 68 -219 248 0 ; C 207 ; WX 400 ; N caron ; B 213 557 510 731 ; C 208 ; WX 1000 ; N emdash ; B 12 221 1024 279 ; C 225 ; WX 880 ; N AE ; B -88 0 941 692 ; C 227 ; WX 425 ; N ordfeminine ; B 77 265 460 590 ; C 232 ; WX 571 ; N Lslash ; B 11 0 574 692 ; C 233 ; WX 753 ; N Oslash ; B 79 -45 754 736 ; C 234 ; WX 1020 ; N OE ; B 79 0 1081 692 ; C 235 ; WX 389 ; N ordmasculine ; B 86 265 420 590 ; C 241 ; WX 779 ; N ae ; B 34 -12 797 514 ; C 245 ; WX 317 ; N dotlessi ; B 79 -12 299 502 ; C 248 ; WX 318 ; N lslash ; B 45 -12 376 742 ; C 249 ; WX 537 ; N oslash ; B 49 -39 522 529 ; C 250 ; WX 806 ; N oe ; B 49 -12 824 502 ; C 251 ; WX 577 ; N germandbls ; B -107 -242 630 742 ; C -1 ; WX 370 ; N onesuperior ; B 90 272 326 680 ; C -1 ; WX 570 ; N minus ; B 58 221 542 279 ; C -1 ; WX 400 ; N degree ; B 152 404 428 680 ; C -1 ; WX 537 ; N oacute ; B 49 -12 530 723 ; C -1 ; WX 753 ; N Odieresis ; B 79 -15 754 848 ; C -1 ; WX 537 ; N odieresis ; B 49 -12 532 682 ; C -1 ; WX 596 ; N Eacute ; B 3 0 657 890 ; C -1 ; WX 618 ; N ucircumflex ; B 89 -12 609 720 ; C -1 ; WX 890 ; N onequarter ; B 97 -24 805 698 ; C -1 ; WX 570 ; N logicalnot ; B 58 102 542 389 ; C -1 ; WX 596 ; N Ecircumflex ; B 3 0 657 876 ; C -1 ; WX 890 ; N onehalf ; B 71 -24 812 698 ; C -1 ; WX 753 ; N Otilde ; B 79 -15 754 842 ; C -1 ; WX 618 ; N uacute ; B 89 -12 609 723 ; C -1 ; WX 453 ; N eacute ; B 45 -12 508 723 ; C -1 ; WX 317 ; N iacute ; B 79 -12 398 723 ; C -1 ; WX 596 ; N Egrave ; B 3 0 657 890 ; C -1 ; WX 317 ; N icircumflex ; B 79 -12 383 720 ; C -1 ; WX 618 ; N mu ; B 11 -232 609 502 ; C -1 ; WX 270 ; N brokenbar ; B 130 -175 198 675 ; C -1 ; WX 584 ; N thorn ; B 16 -242 580 700 ; C -1 ; WX 624 ; N Aring ; B -58 0 623 861 ; C -1 ; WX 468 ; N yacute ; B -40 -242 505 723 ; C -1 ; WX 591 ; N Ydieresis ; B 96 0 744 848 ; C -1 ; WX 1100 ; N trademark ; B 91 277 1094 692 ; C -1 ; WX 836 ; N registered ; B 91 -15 819 707 ; C -1 ; WX 537 ; N ocircumflex ; B 49 -12 522 720 ; C -1 ; WX 624 ; N Agrave ; B -58 0 623 890 ; C -1 ; WX 533 ; N Scaron ; B 34 -15 561 888 ; C -1 ; WX 794 ; N Ugrave ; B 131 -15 880 890 ; C -1 ; WX 596 ; N Edieresis ; B 3 0 657 848 ; C -1 ; WX 794 ; N Uacute ; B 131 -15 880 890 ; C -1 ; WX 537 ; N otilde ; B 49 -12 525 682 ; C -1 ; WX 618 ; N ntilde ; B 63 -12 600 682 ; C -1 ; WX 468 ; N ydieresis ; B -40 -242 513 682 ; C -1 ; WX 624 ; N Aacute ; B -58 0 642 890 ; C -1 ; WX 537 ; N eth ; B 47 -12 521 742 ; C -1 ; WX 561 ; N acircumflex ; B 31 -12 563 720 ; C -1 ; WX 561 ; N aring ; B 31 -12 563 752 ; C -1 ; WX 753 ; N Ograve ; B 79 -15 754 890 ; C -1 ; WX 441 ; N ccedilla ; B 46 -230 465 502 ; C -1 ; WX 570 ; N multiply ; B 88 22 532 478 ; C -1 ; WX 570 ; N divide ; B 58 25 542 475 ; C -1 ; WX 370 ; N twosuperior ; B 35 272 399 680 ; C -1 ; WX 763 ; N Ntilde ; B -4 0 855 842 ; C -1 ; WX 618 ; N ugrave ; B 89 -12 609 723 ; C -1 ; WX 794 ; N Ucircumflex ; B 131 -15 880 876 ; C -1 ; WX 624 ; N Atilde ; B -58 0 623 842 ; C -1 ; WX 468 ; N zcaron ; B 4 -12 484 731 ; C -1 ; WX 317 ; N idieresis ; B 79 -12 398 682 ; C -1 ; WX 624 ; N Acircumflex ; B -58 0 623 876 ; C -1 ; WX 345 ; N Icircumflex ; B 5 0 453 876 ; C -1 ; WX 591 ; N Yacute ; B 96 0 744 890 ; C -1 ; WX 753 ; N Oacute ; B 79 -15 754 890 ; C -1 ; WX 624 ; N Adieresis ; B -58 0 623 848 ; C -1 ; WX 622 ; N Zcaron ; B -20 0 703 888 ; C -1 ; WX 561 ; N agrave ; B 31 -12 563 723 ; C -1 ; WX 370 ; N threesuperior ; B 59 265 389 680 ; C -1 ; WX 537 ; N ograve ; B 49 -12 522 723 ; C -1 ; WX 890 ; N threequarters ; B 105 -24 816 698 ; C -1 ; WX 770 ; N Eth ; B 12 0 774 692 ; C -1 ; WX 570 ; N plusminus ; B 58 0 542 556 ; C -1 ; WX 618 ; N udieresis ; B 89 -12 609 682 ; C -1 ; WX 453 ; N edieresis ; B 45 -12 490 682 ; C -1 ; WX 561 ; N aacute ; B 31 -12 571 723 ; C -1 ; WX 317 ; N igrave ; B 55 -12 299 723 ; C -1 ; WX 345 ; N Idieresis ; B 5 0 461 848 ; C -1 ; WX 561 ; N adieresis ; B 31 -12 563 682 ; C -1 ; WX 345 ; N Iacute ; B 5 0 506 890 ; C -1 ; WX 836 ; N copyright ; B 91 -15 819 707 ; C -1 ; WX 345 ; N Igrave ; B 5 0 428 890 ; C -1 ; WX 661 ; N Ccedilla ; B 79 -230 723 707 ; C -1 ; WX 389 ; N scaron ; B 19 -12 457 731 ; C -1 ; WX 453 ; N egrave ; B 45 -12 471 723 ; C -1 ; WX 753 ; N Ocircumflex ; B 79 -15 754 876 ; C -1 ; WX 604 ; N Thorn ; B 5 0 616 692 ; C -1 ; WX 561 ; N atilde ; B 31 -12 563 682 ; C -1 ; WX 794 ; N Udieresis ; B 131 -15 880 848 ; C -1 ; WX 453 ; N ecircumflex ; B 45 -12 475 720 ; EndCharMetrics StartKernData StartKernPairs 690 KPX A y -20 KPX A x 10 KPX A w -30 KPX A v -30 KPX A u -10 KPX A t -6 KPX A s 15 KPX A r -12 KPX A quoteright -110 KPX A quotedblright -110 KPX A q 10 KPX A p -12 KPX A o -10 KPX A n -18 KPX A m -18 KPX A l -18 KPX A j 6 KPX A h -6 KPX A d 10 KPX A c -6 KPX A b -6 KPX A a 12 KPX A Y -76 KPX A X -8 KPX A W -80 KPX A V -90 KPX A U -60 KPX A T -72 KPX A Q -30 KPX A O -30 KPX A G -30 KPX A C -30 KPX B y -6 KPX B u -20 KPX B r -15 KPX B quoteright -40 KPX B quotedblright -30 KPX B o 6 KPX B l -20 KPX B k -15 KPX B i -12 KPX B h -15 KPX B e 6 KPX B a 12 KPX B W -20 KPX B V -50 KPX B U -50 KPX B T -20 KPX C z -6 KPX C y -18 KPX C u -18 KPX C quotedblright 20 KPX C i -5 KPX C e -6 KPX C a -6 KPX D y 18 KPX D u -10 KPX D quoteright -40 KPX D quotedblright -50 KPX D period -30 KPX D o 6 KPX D i 6 KPX D h -25 KPX D e 6 KPX D comma -20 KPX D a 6 KPX D Y -70 KPX D W -50 KPX D V -60 KPX E z -6 KPX E y -18 KPX E x 5 KPX E w -20 KPX E v -18 KPX E u -24 KPX E t -18 KPX E s 5 KPX E r -6 KPX E quoteright 10 KPX E quotedblright 10 KPX E q 10 KPX E period 10 KPX E p -12 KPX E o -6 KPX E n -12 KPX E m -12 KPX E l -12 KPX E k -10 KPX E j -6 KPX E i -12 KPX E g -12 KPX E e 5 KPX E d 10 KPX E comma 10 KPX E b -6 KPX F y -12 KPX F u -30 KPX F r -18 KPX F quoteright 15 KPX F quotedblright 35 KPX F period -180 KPX F o -30 KPX F l -6 KPX F i -12 KPX F e -30 KPX F comma -170 KPX F a -30 KPX F A -45 KPX G y -16 KPX G u -22 KPX G r -22 KPX G quoteright -20 KPX G quotedblright -20 KPX G o 10 KPX G n -22 KPX G l -24 KPX G i -12 KPX G h -18 KPX G e 10 KPX G a 5 KPX H y -18 KPX H u -30 KPX H quoteright 10 KPX H quotedblright 10 KPX H o -12 KPX H i -12 KPX H e -12 KPX H a -12 KPX I z -20 KPX I y -6 KPX I x -6 KPX I w -30 KPX I v -30 KPX I u -30 KPX I t -18 KPX I s -18 KPX I r -12 KPX I quoteright 10 KPX I quotedblright 10 KPX I p -18 KPX I o -12 KPX I n -18 KPX I m -18 KPX I l -6 KPX I k -6 KPX I g -12 KPX I f -6 KPX I d -6 KPX I c -12 KPX I b -6 KPX I a -6 KPX J y -12 KPX J u -36 KPX J quoteright 6 KPX J quotedblright 15 KPX J o -36 KPX J i -30 KPX J e -36 KPX J braceright 10 KPX J a -36 KPX K y -40 KPX K w -30 KPX K v -20 KPX K u -24 KPX K r -12 KPX K quoteright 25 KPX K quotedblright 40 KPX K o -24 KPX K n -18 KPX K i -6 KPX K h 6 KPX K e -12 KPX K a -6 KPX K Q -24 KPX K O -24 KPX K G -24 KPX K C -24 KPX L y -55 KPX L w -30 KPX L u -18 KPX L quoteright -110 KPX L quotedblright -110 KPX L l -16 KPX L j -18 KPX L i -18 KPX L a 10 KPX L Y -80 KPX L W -90 KPX L V -110 KPX L U -42 KPX L T -80 KPX L Q -48 KPX L O -48 KPX L G -48 KPX L C -48 KPX L A 30 KPX M y -18 KPX M u -24 KPX M quoteright 6 KPX M quotedblright 15 KPX M o -25 KPX M n -12 KPX M j -18 KPX M i -12 KPX M e -20 KPX M d -10 KPX M c -20 KPX M a -6 KPX N y -18 KPX N u -24 KPX N quoteright 10 KPX N quotedblright 10 KPX N o -25 KPX N i -12 KPX N e -20 KPX N a -22 KPX O z -6 KPX O y 12 KPX O w -10 KPX O v -10 KPX O u -6 KPX O t -6 KPX O s -6 KPX O r -6 KPX O quoteright -40 KPX O quotedblright -40 KPX O q 5 KPX O period -20 KPX O p -6 KPX O n -6 KPX O m -6 KPX O l -20 KPX O k -10 KPX O j -6 KPX O h -10 KPX O g -6 KPX O e 5 KPX O d 6 KPX O comma -10 KPX O c 5 KPX O b -6 KPX O a 5 KPX O Y -75 KPX O X -30 KPX O W -40 KPX O V -60 KPX O T -48 KPX O A -18 KPX P y 6 KPX P u -18 KPX P t -6 KPX P s -24 KPX P r -6 KPX P period -220 KPX P o -24 KPX P n -12 KPX P l -25 KPX P h -15 KPX P e -24 KPX P comma -220 KPX P a -24 KPX P I -30 KPX P H -30 KPX P E -30 KPX P A -75 KPX Q u -6 KPX Q quoteright -40 KPX Q quotedblright -50 KPX Q a -6 KPX Q Y -70 KPX Q X -12 KPX Q W -35 KPX Q V -60 KPX Q U -35 KPX Q T -36 KPX Q A -18 KPX R y -14 KPX R u -12 KPX R quoteright -30 KPX R quotedblright -20 KPX R o -12 KPX R hyphen -20 KPX R e -12 KPX R Y -50 KPX R W -30 KPX R V -40 KPX R U -40 KPX R T -30 KPX R Q -10 KPX R O -10 KPX R G -10 KPX R C -10 KPX R A -6 KPX S y -30 KPX S w -30 KPX S v -30 KPX S u -18 KPX S t -30 KPX S r -20 KPX S quoteright -38 KPX S quotedblright -30 KPX S p -18 KPX S n -24 KPX S m -24 KPX S l -30 KPX S k -24 KPX S j -25 KPX S i -30 KPX S h -30 KPX S e -6 KPX T z -70 KPX T y -60 KPX T w -64 KPX T u -74 KPX T semicolon -36 KPX T s -72 KPX T r -64 KPX T quoteright 45 KPX T quotedblright 50 KPX T period -100 KPX T parenright 54 KPX T o -90 KPX T m -64 KPX T i -34 KPX T hyphen -100 KPX T endash -60 KPX T emdash -60 KPX T e -90 KPX T comma -110 KPX T colon -10 KPX T bracketright 45 KPX T braceright 54 KPX T a -90 KPX T Y 12 KPX T X 18 KPX T W 6 KPX T T 18 KPX T Q -12 KPX T O -12 KPX T G -12 KPX T C -12 KPX T A -56 KPX U z -30 KPX U x -40 KPX U t -24 KPX U s -30 KPX U r -30 KPX U quoteright 10 KPX U quotedblright 10 KPX U p -40 KPX U n -45 KPX U m -45 KPX U l -12 KPX U k -12 KPX U i -24 KPX U h -6 KPX U g -30 KPX U d -40 KPX U c -35 KPX U b -6 KPX U a -40 KPX U A -45 KPX V y -46 KPX V u -42 KPX V semicolon -35 KPX V r -50 KPX V quoteright 75 KPX V quotedblright 70 KPX V period -130 KPX V parenright 64 KPX V o -62 KPX V i -10 KPX V hyphen -60 KPX V endash -20 KPX V emdash -20 KPX V e -52 KPX V comma -120 KPX V colon -18 KPX V bracketright 64 KPX V braceright 64 KPX V a -60 KPX V T 6 KPX V A -70 KPX W y -42 KPX W u -56 KPX W t -20 KPX W semicolon -28 KPX W r -40 KPX W quoteright 55 KPX W quotedblright 60 KPX W period -108 KPX W parenright 64 KPX W o -60 KPX W m -35 KPX W i -10 KPX W hyphen -40 KPX W endash -2 KPX W emdash -10 KPX W e -54 KPX W d -50 KPX W comma -108 KPX W colon -28 KPX W bracketright 55 KPX W braceright 64 KPX W a -60 KPX W T 12 KPX W Q -10 KPX W O -10 KPX W G -10 KPX W C -10 KPX W A -58 KPX X y -35 KPX X u -30 KPX X r -6 KPX X quoteright 35 KPX X quotedblright 15 KPX X i -6 KPX X e -10 KPX X a 5 KPX X Y -6 KPX X W -6 KPX X Q -30 KPX X O -30 KPX X G -30 KPX X C -30 KPX X A -18 KPX Y v -50 KPX Y u -58 KPX Y t -32 KPX Y semicolon -36 KPX Y quoteright 65 KPX Y quotedblright 70 KPX Y q -100 KPX Y period -90 KPX Y parenright 60 KPX Y o -72 KPX Y l 10 KPX Y hyphen -95 KPX Y endash -20 KPX Y emdash -20 KPX Y e -72 KPX Y d -80 KPX Y comma -80 KPX Y colon -36 KPX Y bracketright 64 KPX Y braceright 75 KPX Y a -82 KPX Y Y 12 KPX Y X 12 KPX Y W 12 KPX Y V 6 KPX Y T 25 KPX Y Q -5 KPX Y O -5 KPX Y G -5 KPX Y C -5 KPX Y A -36 KPX Z y -36 KPX Z w -36 KPX Z u -12 KPX Z quoteright 10 KPX Z quotedblright 10 KPX Z o -6 KPX Z i -12 KPX Z e -6 KPX Z a -6 KPX Z Q -30 KPX Z O -30 KPX Z G -30 KPX Z C -30 KPX Z A 12 KPX a quoteright -40 KPX a quotedblright -40 KPX b y -6 KPX b w -15 KPX b v -15 KPX b quoteright -50 KPX b quotedblright -50 KPX b period -40 KPX b comma -30 KPX braceleft Y 64 KPX braceleft W 64 KPX braceleft V 64 KPX braceleft T 54 KPX braceleft J 80 KPX bracketleft Y 64 KPX bracketleft W 64 KPX bracketleft V 64 KPX bracketleft T 54 KPX bracketleft J 80 KPX c quoteright -20 KPX c quotedblright -20 KPX colon space -30 KPX comma space -40 KPX comma quoteright -80 KPX comma quotedblright -80 KPX d quoteright -12 KPX d quotedblright -12 KPX e x -10 KPX e w -10 KPX e quoteright -30 KPX e quotedblright -30 KPX f quoteright 110 KPX f quotedblright 110 KPX f period -20 KPX f parenright 100 KPX f comma -20 KPX f bracketright 90 KPX f braceright 90 KPX g y 30 KPX g p 12 KPX g f 42 KPX h quoteright -80 KPX h quotedblright -80 KPX j quoteright -20 KPX j quotedblright -20 KPX j period -35 KPX j comma -20 KPX k quoteright -30 KPX k quotedblright -50 KPX m quoteright -80 KPX m quotedblright -80 KPX n quoteright -80 KPX n quotedblright -80 KPX o z -10 KPX o y -20 KPX o x -20 KPX o w -30 KPX o v -35 KPX o quoteright -60 KPX o quotedblright -50 KPX o period -30 KPX o comma -20 KPX p z -10 KPX p w -15 KPX p quoteright -50 KPX p quotedblright -70 KPX p period -30 KPX p comma -20 KPX parenleft Y 75 KPX parenleft W 75 KPX parenleft V 75 KPX parenleft T 64 KPX parenleft J 80 KPX period space -40 KPX period quoteright -80 KPX period quotedblright -80 KPX q quoteright -20 KPX q quotedblright -30 KPX q period -20 KPX q comma -10 KPX quotedblleft z -30 KPX quotedblleft x -40 KPX quotedblleft w -12 KPX quotedblleft v -12 KPX quotedblleft u -12 KPX quotedblleft t -12 KPX quotedblleft s -30 KPX quotedblleft r -12 KPX quotedblleft q -40 KPX quotedblleft p -12 KPX quotedblleft o -30 KPX quotedblleft n -12 KPX quotedblleft m -12 KPX quotedblleft l 10 KPX quotedblleft k 10 KPX quotedblleft h 10 KPX quotedblleft g -30 KPX quotedblleft e -40 KPX quotedblleft d -40 KPX quotedblleft c -40 KPX quotedblleft b 24 KPX quotedblleft a -60 KPX quotedblleft Y 12 KPX quotedblleft X 28 KPX quotedblleft W 28 KPX quotedblleft V 28 KPX quotedblleft T 36 KPX quotedblleft A -90 KPX quotedblright space -40 KPX quotedblright period -100 KPX quotedblright comma -100 KPX quoteleft z -30 KPX quoteleft y -10 KPX quoteleft x -40 KPX quoteleft w -12 KPX quoteleft v -12 KPX quoteleft u -12 KPX quoteleft t -12 KPX quoteleft s -30 KPX quoteleft r -12 KPX quoteleft quoteleft -18 KPX quoteleft q -30 KPX quoteleft p -12 KPX quoteleft o -30 KPX quoteleft n -12 KPX quoteleft m -12 KPX quoteleft l 10 KPX quoteleft k 10 KPX quoteleft h 10 KPX quoteleft g -30 KPX quoteleft e -30 KPX quoteleft d -30 KPX quoteleft c -30 KPX quoteleft b 24 KPX quoteleft a -45 KPX quoteleft Y 12 KPX quoteleft X 28 KPX quoteleft W 28 KPX quoteleft V 28 KPX quoteleft T 36 KPX quoteleft A -90 KPX quoteright v -35 KPX quoteright t -35 KPX quoteright space -40 KPX quoteright s -55 KPX quoteright r -25 KPX quoteright quoteright -18 KPX quoteright period -100 KPX quoteright m -25 KPX quoteright l -12 KPX quoteright d -70 KPX quoteright comma -100 KPX r y 18 KPX r w 6 KPX r v 6 KPX r t 8 KPX r quotedblright -15 KPX r q -24 KPX r period -120 KPX r o -6 KPX r l -20 KPX r k -20 KPX r hyphen -30 KPX r h -20 KPX r f 8 KPX r emdash -20 KPX r e -26 KPX r d -26 KPX r comma -110 KPX r c -12 KPX r a -20 KPX s quoteright -40 KPX s quotedblright -45 KPX semicolon space -30 KPX space quotesinglbase -30 KPX space quoteleft -40 KPX space quotedblleft -40 KPX space quotedblbase -30 KPX space Y -70 KPX space W -70 KPX space V -70 KPX t quoteright 10 KPX t quotedblright -10 KPX u quoteright -55 KPX u quotedblright -50 KPX v quoteright -20 KPX v quotedblright -30 KPX v q -6 KPX v period -70 KPX v o -6 KPX v e -6 KPX v d -6 KPX v comma -70 KPX v c -6 KPX v a -6 KPX w quoteright -20 KPX w quotedblright -30 KPX w period -62 KPX w comma -62 KPX x y 12 KPX x w -6 KPX x quoteright -40 KPX x quotedblright -50 KPX x q -6 KPX x o -6 KPX x e -6 KPX x d -6 KPX x c -6 KPX y quoteright -10 KPX y quotedblright -20 KPX y period -70 KPX y emdash 40 KPX y comma -60 KPX z quoteright -40 KPX z quotedblright -50 KPX z o -6 KPX z e -6 KPX z d -6 KPX z c -6 EndKernPairs EndKernData EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pzcmi8a.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Fri Dec 28 16:35:46 1990 Comment UniqueID 33936 Comment VMusage 34559 41451 FontName ZapfChancery-MediumItalic FullName ITC Zapf Chancery Medium Italic FamilyName ITC Zapf Chancery Weight Medium ItalicAngle -14 IsFixedPitch false FontBBox -181 -314 1065 831 UnderlinePosition -100 UnderlineThickness 50 Version 001.007 Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved.ITC Zapf Chancery is a registered trademark of International Typeface Corporation. EncodingScheme AdobeStandardEncoding CapHeight 708 XHeight 438 Ascender 714 Descender -314 StartCharMetrics 228 C 32 ; WX 220 ; N space ; B 0 0 0 0 ; C 33 ; WX 280 ; N exclam ; B 119 -14 353 610 ; C 34 ; WX 220 ; N quotedbl ; B 120 343 333 610 ; C 35 ; WX 440 ; N numbersign ; B 83 0 521 594 ; C 36 ; WX 440 ; N dollar ; B 60 -144 508 709 ; C 37 ; WX 680 ; N percent ; B 132 -160 710 700 ; C 38 ; WX 780 ; N ampersand ; B 126 -16 915 610 ; C 39 ; WX 240 ; N quoteright ; B 168 343 338 610 ; C 40 ; WX 260 ; N parenleft ; B 96 -216 411 664 ; C 41 ; WX 220 ; N parenright ; B -13 -216 302 664 ; C 42 ; WX 420 ; N asterisk ; B 139 263 479 610 ; C 43 ; WX 520 ; N plus ; B 117 0 543 426 ; C 44 ; WX 220 ; N comma ; B 25 -140 213 148 ; C 45 ; WX 280 ; N hyphen ; B 69 190 334 248 ; C 46 ; WX 220 ; N period ; B 102 -14 228 128 ; C 47 ; WX 340 ; N slash ; B 74 -16 458 610 ; C 48 ; WX 440 ; N zero ; B 79 -16 538 610 ; C 49 ; WX 440 ; N one ; B 41 0 428 610 ; C 50 ; WX 440 ; N two ; B 17 -16 485 610 ; C 51 ; WX 440 ; N three ; B 1 -16 485 610 ; C 52 ; WX 440 ; N four ; B 77 -35 499 610 ; C 53 ; WX 440 ; N five ; B 60 -16 595 679 ; C 54 ; WX 440 ; N six ; B 90 -16 556 610 ; C 55 ; WX 440 ; N seven ; B 157 -33 561 645 ; C 56 ; WX 440 ; N eight ; B 65 -16 529 610 ; C 57 ; WX 440 ; N nine ; B 32 -16 517 610 ; C 58 ; WX 260 ; N colon ; B 98 -14 296 438 ; C 59 ; WX 240 ; N semicolon ; B 29 -140 299 438 ; C 60 ; WX 520 ; N less ; B 139 0 527 468 ; C 61 ; WX 520 ; N equal ; B 117 86 543 340 ; C 62 ; WX 520 ; N greater ; B 139 0 527 468 ; C 63 ; WX 380 ; N question ; B 150 -14 455 610 ; C 64 ; WX 700 ; N at ; B 127 -16 753 610 ; C 65 ; WX 620 ; N A ; B 13 -16 697 632 ; C 66 ; WX 600 ; N B ; B 85 -6 674 640 ; C 67 ; WX 520 ; N C ; B 93 -16 631 610 ; C 68 ; WX 700 ; N D ; B 86 -6 768 640 ; C 69 ; WX 620 ; N E ; B 91 -12 709 618 ; C 70 ; WX 580 ; N F ; B 120 -118 793 629 ; C 71 ; WX 620 ; N G ; B 148 -242 709 610 ; C 72 ; WX 680 ; N H ; B 18 -16 878 708 ; C 73 ; WX 380 ; N I ; B 99 0 504 594 ; C 74 ; WX 400 ; N J ; B -14 -147 538 594 ; C 75 ; WX 660 ; N K ; B 53 -153 844 610 ; C 76 ; WX 580 ; N L ; B 53 -16 657 610 ; C 77 ; WX 840 ; N M ; B 58 -16 1020 722 ; C 78 ; WX 700 ; N N ; B 85 -168 915 708 ; C 79 ; WX 600 ; N O ; B 94 -16 660 610 ; C 80 ; WX 540 ; N P ; B 42 0 658 628 ; C 81 ; WX 600 ; N Q ; B 84 -177 775 610 ; C 82 ; WX 600 ; N R ; B 58 -168 805 640 ; C 83 ; WX 460 ; N S ; B 45 -81 558 610 ; C 84 ; WX 500 ; N T ; B 63 0 744 667 ; C 85 ; WX 740 ; N U ; B 126 -16 792 617 ; C 86 ; WX 640 ; N V ; B 124 -16 810 714 ; C 87 ; WX 880 ; N W ; B 94 -16 1046 723 ; C 88 ; WX 560 ; N X ; B -30 -16 699 610 ; C 89 ; WX 560 ; N Y ; B 41 -168 774 647 ; C 90 ; WX 620 ; N Z ; B 42 -19 669 624 ; C 91 ; WX 240 ; N bracketleft ; B -13 -207 405 655 ; C 92 ; WX 480 ; N backslash ; B 140 -16 524 610 ; C 93 ; WX 320 ; N bracketright ; B -27 -207 391 655 ; C 94 ; WX 520 ; N asciicircum ; B 132 239 532 594 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 240 ; N quoteleft ; B 169 343 339 610 ; C 97 ; WX 420 ; N a ; B 92 -15 485 438 ; C 98 ; WX 420 ; N b ; B 82 -23 492 714 ; C 99 ; WX 340 ; N c ; B 87 -14 406 438 ; C 100 ; WX 440 ; N d ; B 102 -14 651 714 ; C 101 ; WX 340 ; N e ; B 87 -14 403 438 ; C 102 ; WX 320 ; N f ; B -119 -314 547 714 ; L i fi ; L l fl ; C 103 ; WX 400 ; N g ; B -108 -314 503 438 ; C 104 ; WX 440 ; N h ; B 55 -14 524 714 ; C 105 ; WX 240 ; N i ; B 100 -14 341 635 ; C 106 ; WX 220 ; N j ; B -112 -314 332 635 ; C 107 ; WX 440 ; N k ; B 87 -184 628 714 ; C 108 ; WX 240 ; N l ; B 102 -14 480 714 ; C 109 ; WX 620 ; N m ; B 86 -14 704 438 ; C 110 ; WX 460 ; N n ; B 101 -14 544 438 ; C 111 ; WX 400 ; N o ; B 87 -14 449 438 ; C 112 ; WX 440 ; N p ; B -23 -314 484 432 ; C 113 ; WX 400 ; N q ; B 87 -300 490 510 ; C 114 ; WX 300 ; N r ; B 101 -14 424 438 ; C 115 ; WX 320 ; N s ; B 46 -14 403 438 ; C 116 ; WX 320 ; N t ; B 106 -14 426 539 ; C 117 ; WX 460 ; N u ; B 102 -14 528 438 ; C 118 ; WX 440 ; N v ; B 87 -14 533 488 ; C 119 ; WX 680 ; N w ; B 87 -14 782 488 ; C 120 ; WX 420 ; N x ; B 70 -195 589 438 ; C 121 ; WX 400 ; N y ; B -24 -314 483 438 ; C 122 ; WX 440 ; N z ; B 26 -14 508 445 ; C 123 ; WX 240 ; N braceleft ; B 55 -207 383 655 ; C 124 ; WX 520 ; N bar ; B 320 -16 378 714 ; C 125 ; WX 240 ; N braceright ; B -10 -207 318 655 ; C 126 ; WX 520 ; N asciitilde ; B 123 186 539 320 ; C 161 ; WX 280 ; N exclamdown ; B 72 -186 306 438 ; C 162 ; WX 440 ; N cent ; B 122 -134 476 543 ; C 163 ; WX 440 ; N sterling ; B -16 -52 506 610 ; C 164 ; WX 60 ; N fraction ; B -181 -16 320 610 ; C 165 ; WX 440 ; N yen ; B -1 -168 613 647 ; C 166 ; WX 440 ; N florin ; B -64 -314 582 610 ; C 167 ; WX 420 ; N section ; B 53 -215 514 610 ; C 168 ; WX 440 ; N currency ; B 50 85 474 509 ; C 169 ; WX 160 ; N quotesingle ; B 145 343 215 610 ; C 170 ; WX 340 ; N quotedblleft ; B 169 343 464 610 ; C 171 ; WX 340 ; N guillemotleft ; B 98 24 356 414 ; C 172 ; WX 240 ; N guilsinglleft ; B 98 24 258 414 ; C 173 ; WX 260 ; N guilsinglright ; B 106 24 266 414 ; C 174 ; WX 520 ; N fi ; B -124 -314 605 714 ; C 175 ; WX 520 ; N fl ; B -124 -314 670 714 ; C 177 ; WX 500 ; N endash ; B 51 199 565 239 ; C 178 ; WX 460 ; N dagger ; B 138 -37 568 610 ; C 179 ; WX 480 ; N daggerdbl ; B 138 -59 533 610 ; C 180 ; WX 220 ; N periodcentered ; B 139 208 241 310 ; C 182 ; WX 500 ; N paragraph ; B 105 -199 638 594 ; C 183 ; WX 600 ; N bullet ; B 228 149 524 445 ; C 184 ; WX 180 ; N quotesinglbase ; B 21 -121 191 146 ; C 185 ; WX 280 ; N quotedblbase ; B -14 -121 281 146 ; C 186 ; WX 360 ; N quotedblright ; B 158 343 453 610 ; C 187 ; WX 380 ; N guillemotright ; B 117 24 375 414 ; C 188 ; WX 1000 ; N ellipsis ; B 124 -14 916 128 ; C 189 ; WX 960 ; N perthousand ; B 112 -160 1005 700 ; C 191 ; WX 400 ; N questiondown ; B 82 -186 387 438 ; C 193 ; WX 220 ; N grave ; B 193 492 339 659 ; C 194 ; WX 300 ; N acute ; B 265 492 422 659 ; C 195 ; WX 340 ; N circumflex ; B 223 482 443 649 ; C 196 ; WX 440 ; N tilde ; B 243 543 522 619 ; C 197 ; WX 440 ; N macron ; B 222 544 465 578 ; C 198 ; WX 440 ; N breve ; B 253 522 501 631 ; C 199 ; WX 220 ; N dotaccent ; B 236 522 328 610 ; C 200 ; WX 360 ; N dieresis ; B 243 522 469 610 ; C 202 ; WX 300 ; N ring ; B 240 483 416 659 ; C 203 ; WX 300 ; N cedilla ; B 12 -191 184 6 ; C 205 ; WX 400 ; N hungarumlaut ; B 208 492 495 659 ; C 206 ; WX 280 ; N ogonek ; B 38 -191 233 6 ; C 207 ; WX 340 ; N caron ; B 254 492 474 659 ; C 208 ; WX 1000 ; N emdash ; B 51 199 1065 239 ; C 225 ; WX 740 ; N AE ; B -21 -16 799 594 ; C 227 ; WX 260 ; N ordfeminine ; B 111 338 386 610 ; C 232 ; WX 580 ; N Lslash ; B 49 -16 657 610 ; C 233 ; WX 660 ; N Oslash ; B 83 -78 751 672 ; C 234 ; WX 820 ; N OE ; B 63 -16 909 610 ; C 235 ; WX 260 ; N ordmasculine ; B 128 339 373 610 ; C 241 ; WX 540 ; N ae ; B 67 -14 624 468 ; C 245 ; WX 240 ; N dotlessi ; B 100 -14 306 438 ; C 248 ; WX 300 ; N lslash ; B 121 -14 515 714 ; C 249 ; WX 440 ; N oslash ; B 46 -64 540 488 ; C 250 ; WX 560 ; N oe ; B 78 -14 628 438 ; C 251 ; WX 420 ; N germandbls ; B -127 -314 542 714 ; C -1 ; WX 340 ; N ecircumflex ; B 87 -14 433 649 ; C -1 ; WX 340 ; N edieresis ; B 87 -14 449 610 ; C -1 ; WX 420 ; N aacute ; B 92 -15 492 659 ; C -1 ; WX 740 ; N registered ; B 137 -16 763 610 ; C -1 ; WX 240 ; N icircumflex ; B 100 -14 363 649 ; C -1 ; WX 460 ; N udieresis ; B 102 -14 528 610 ; C -1 ; WX 400 ; N ograve ; B 87 -14 449 659 ; C -1 ; WX 460 ; N uacute ; B 102 -14 528 659 ; C -1 ; WX 460 ; N ucircumflex ; B 102 -14 528 649 ; C -1 ; WX 620 ; N Aacute ; B 13 -16 702 821 ; C -1 ; WX 240 ; N igrave ; B 100 -14 306 659 ; C -1 ; WX 380 ; N Icircumflex ; B 99 0 504 821 ; C -1 ; WX 340 ; N ccedilla ; B 62 -191 406 438 ; C -1 ; WX 420 ; N adieresis ; B 92 -15 485 610 ; C -1 ; WX 620 ; N Ecircumflex ; B 91 -12 709 821 ; C -1 ; WX 320 ; N scaron ; B 46 -14 464 659 ; C -1 ; WX 440 ; N thorn ; B -38 -314 505 714 ; C -1 ; WX 1000 ; N trademark ; B 127 187 1046 594 ; C -1 ; WX 340 ; N egrave ; B 87 -14 403 659 ; C -1 ; WX 264 ; N threesuperior ; B 59 234 348 610 ; C -1 ; WX 440 ; N zcaron ; B 26 -14 514 659 ; C -1 ; WX 420 ; N atilde ; B 92 -15 522 619 ; C -1 ; WX 420 ; N aring ; B 92 -15 485 659 ; C -1 ; WX 400 ; N ocircumflex ; B 87 -14 453 649 ; C -1 ; WX 620 ; N Edieresis ; B 91 -12 709 762 ; C -1 ; WX 660 ; N threequarters ; B 39 -16 706 610 ; C -1 ; WX 400 ; N ydieresis ; B -24 -314 483 610 ; C -1 ; WX 400 ; N yacute ; B -24 -314 483 659 ; C -1 ; WX 240 ; N iacute ; B 100 -14 392 659 ; C -1 ; WX 620 ; N Acircumflex ; B 13 -16 697 821 ; C -1 ; WX 740 ; N Uacute ; B 126 -16 792 821 ; C -1 ; WX 340 ; N eacute ; B 87 -14 462 659 ; C -1 ; WX 600 ; N Ograve ; B 94 -16 660 821 ; C -1 ; WX 420 ; N agrave ; B 92 -15 485 659 ; C -1 ; WX 740 ; N Udieresis ; B 126 -16 792 762 ; C -1 ; WX 420 ; N acircumflex ; B 92 -15 485 649 ; C -1 ; WX 380 ; N Igrave ; B 99 0 504 821 ; C -1 ; WX 264 ; N twosuperior ; B 72 234 354 610 ; C -1 ; WX 740 ; N Ugrave ; B 126 -16 792 821 ; C -1 ; WX 660 ; N onequarter ; B 56 -16 702 610 ; C -1 ; WX 740 ; N Ucircumflex ; B 126 -16 792 821 ; C -1 ; WX 460 ; N Scaron ; B 45 -81 594 831 ; C -1 ; WX 380 ; N Idieresis ; B 99 0 519 762 ; C -1 ; WX 240 ; N idieresis ; B 100 -14 369 610 ; C -1 ; WX 620 ; N Egrave ; B 91 -12 709 821 ; C -1 ; WX 600 ; N Oacute ; B 94 -16 660 821 ; C -1 ; WX 520 ; N divide ; B 117 -14 543 440 ; C -1 ; WX 620 ; N Atilde ; B 13 -16 702 771 ; C -1 ; WX 620 ; N Aring ; B 13 -16 697 831 ; C -1 ; WX 600 ; N Odieresis ; B 94 -16 660 762 ; C -1 ; WX 620 ; N Adieresis ; B 13 -16 709 762 ; C -1 ; WX 700 ; N Ntilde ; B 85 -168 915 761 ; C -1 ; WX 620 ; N Zcaron ; B 42 -19 669 831 ; C -1 ; WX 540 ; N Thorn ; B 52 0 647 623 ; C -1 ; WX 380 ; N Iacute ; B 99 0 532 821 ; C -1 ; WX 520 ; N plusminus ; B 117 0 543 436 ; C -1 ; WX 520 ; N multiply ; B 133 16 527 410 ; C -1 ; WX 620 ; N Eacute ; B 91 -12 709 821 ; C -1 ; WX 560 ; N Ydieresis ; B 41 -168 774 762 ; C -1 ; WX 264 ; N onesuperior ; B 83 244 311 610 ; C -1 ; WX 460 ; N ugrave ; B 102 -14 528 659 ; C -1 ; WX 520 ; N logicalnot ; B 117 86 543 340 ; C -1 ; WX 460 ; N ntilde ; B 101 -14 544 619 ; C -1 ; WX 600 ; N Otilde ; B 94 -16 660 761 ; C -1 ; WX 400 ; N otilde ; B 87 -14 502 619 ; C -1 ; WX 520 ; N Ccedilla ; B 93 -191 631 610 ; C -1 ; WX 620 ; N Agrave ; B 13 -16 697 821 ; C -1 ; WX 660 ; N onehalf ; B 56 -16 702 610 ; C -1 ; WX 700 ; N Eth ; B 86 -6 768 640 ; C -1 ; WX 400 ; N degree ; B 171 324 457 610 ; C -1 ; WX 560 ; N Yacute ; B 41 -168 774 821 ; C -1 ; WX 600 ; N Ocircumflex ; B 94 -16 660 821 ; C -1 ; WX 400 ; N oacute ; B 87 -14 482 659 ; C -1 ; WX 460 ; N mu ; B 7 -314 523 438 ; C -1 ; WX 520 ; N minus ; B 117 184 543 242 ; C -1 ; WX 400 ; N eth ; B 87 -14 522 714 ; C -1 ; WX 400 ; N odieresis ; B 87 -14 479 610 ; C -1 ; WX 740 ; N copyright ; B 137 -16 763 610 ; C -1 ; WX 520 ; N brokenbar ; B 320 -16 378 714 ; EndCharMetrics StartKernData StartKernPairs 131 KPX A quoteright -40 KPX A quotedblright -40 KPX A U -10 KPX A T 10 KPX A Q 10 KPX A O 10 KPX A G -30 KPX A C 20 KPX D period -30 KPX D comma -20 KPX D Y 10 KPX D A -10 KPX F period -40 KPX F i 10 KPX F comma -30 KPX G period -20 KPX G comma -10 KPX J period -20 KPX J comma -10 KPX K u -20 KPX K o -20 KPX K e -20 KPX L y -10 KPX L quoteright -25 KPX L quotedblright -25 KPX L W -10 KPX L V -20 KPX O period -20 KPX O comma -10 KPX O Y 10 KPX O T 20 KPX O A -20 KPX P period -50 KPX P o -10 KPX P e -10 KPX P comma -40 KPX P a -20 KPX P A -10 KPX Q U -10 KPX R Y 10 KPX R W 10 KPX R T 20 KPX T o -20 KPX T i 20 KPX T hyphen -20 KPX T h 20 KPX T e -20 KPX T a -20 KPX T O 30 KPX T A 10 KPX V period -100 KPX V o -20 KPX V e -20 KPX V comma -90 KPX V a -20 KPX V O 10 KPX V G -20 KPX W period -50 KPX W o -20 KPX W i 10 KPX W h 10 KPX W e -20 KPX W comma -40 KPX W a -20 KPX W O 10 KPX Y u -20 KPX Y period -50 KPX Y o -50 KPX Y i 10 KPX Y e -40 KPX Y comma -40 KPX Y a -60 KPX b period -30 KPX b l -20 KPX b comma -20 KPX b b -20 KPX c k -10 KPX comma quoteright -70 KPX comma quotedblright -70 KPX d w -20 KPX d v -10 KPX d d -40 KPX e y 10 KPX f quoteright 30 KPX f quotedblright 30 KPX f period -50 KPX f f -50 KPX f e -10 KPX f comma -40 KPX f a -20 KPX g y 10 KPX g period -30 KPX g i 10 KPX g e 10 KPX g comma -20 KPX g a 10 KPX k y 10 KPX k o -10 KPX k e -20 KPX m y 10 KPX m u 10 KPX n y 20 KPX o period -30 KPX o comma -20 KPX p period -30 KPX p p -10 KPX p comma -20 KPX period quoteright -80 KPX period quotedblright -80 KPX quotedblleft quoteleft 20 KPX quotedblleft A 10 KPX quoteleft quoteleft -115 KPX quoteleft A 10 KPX quoteright v 30 KPX quoteright t 20 KPX quoteright s -25 KPX quoteright r 30 KPX quoteright quoteright -115 KPX quoteright quotedblright 20 KPX quoteright l 20 KPX r period -50 KPX r i 10 KPX r comma -40 KPX s period -20 KPX s comma -10 KPX v period -30 KPX v comma -20 KPX w period -30 KPX w o 10 KPX w h 20 KPX w comma -20 EndKernPairs EndKernData StartComposites 56 CC Aacute 2 ; PCC A 0 0 ; PCC acute 280 162 ; CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 240 172 ; CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 240 152 ; CC Agrave 2 ; PCC A 0 0 ; PCC grave 250 162 ; CC Aring 2 ; PCC A 0 0 ; PCC ring 260 172 ; CC Atilde 2 ; PCC A 0 0 ; PCC tilde 180 152 ; CC Eacute 2 ; PCC E 0 0 ; PCC acute 230 162 ; CC Ecircumflex 2 ; PCC E 0 0 ; PCC circumflex 180 172 ; CC Edieresis 2 ; PCC E 0 0 ; PCC dieresis 170 152 ; CC Egrave 2 ; PCC E 0 0 ; PCC grave 220 162 ; CC Iacute 2 ; PCC I 0 0 ; PCC acute 110 162 ; CC Icircumflex 2 ; PCC I 0 0 ; PCC circumflex 60 172 ; CC Idieresis 2 ; PCC I 0 0 ; PCC dieresis 50 152 ; CC Igrave 2 ; PCC I 0 0 ; PCC grave 100 162 ; CC Ntilde 2 ; PCC N 0 0 ; PCC tilde 210 142 ; CC Oacute 2 ; PCC O 0 0 ; PCC acute 160 162 ; CC Ocircumflex 2 ; PCC O 0 0 ; PCC circumflex 130 172 ; CC Odieresis 2 ; PCC O 0 0 ; PCC dieresis 120 152 ; CC Ograve 2 ; PCC O 0 0 ; PCC grave 150 162 ; CC Otilde 2 ; PCC O 0 0 ; PCC tilde 90 142 ; CC Scaron 2 ; PCC S 0 0 ; PCC caron 120 172 ; CC Uacute 2 ; PCC U 0 0 ; PCC acute 310 162 ; CC Ucircumflex 2 ; PCC U 0 0 ; PCC circumflex 260 172 ; CC Udieresis 2 ; PCC U 0 0 ; PCC dieresis 260 152 ; CC Ugrave 2 ; PCC U 0 0 ; PCC grave 270 162 ; CC Yacute 2 ; PCC Y 0 0 ; PCC acute 220 162 ; CC Ydieresis 2 ; PCC Y 0 0 ; PCC dieresis 170 152 ; CC Zcaron 2 ; PCC Z 0 0 ; PCC caron 130 172 ; CC aacute 2 ; PCC a 0 0 ; PCC acute 70 0 ; CC acircumflex 2 ; PCC a 0 0 ; PCC circumflex 20 0 ; CC adieresis 2 ; PCC a 0 0 ; PCC dieresis 10 0 ; CC agrave 2 ; PCC a 0 0 ; PCC grave 80 0 ; CC aring 2 ; PCC a 0 0 ; PCC ring 60 0 ; CC atilde 2 ; PCC a 0 0 ; PCC tilde 0 0 ; CC eacute 2 ; PCC e 0 0 ; PCC acute 40 0 ; CC ecircumflex 2 ; PCC e 0 0 ; PCC circumflex -10 0 ; CC edieresis 2 ; PCC e 0 0 ; PCC dieresis -20 0 ; CC egrave 2 ; PCC e 0 0 ; PCC grave 30 0 ; CC iacute 2 ; PCC dotlessi 0 0 ; PCC acute -30 0 ; CC icircumflex 2 ; PCC dotlessi 0 0 ; PCC circumflex -80 0 ; CC idieresis 2 ; PCC dotlessi 0 0 ; PCC dieresis -100 0 ; CC igrave 2 ; PCC dotlessi 0 0 ; PCC grave -40 0 ; CC ntilde 2 ; PCC n 0 0 ; PCC tilde 10 0 ; CC oacute 2 ; PCC o 0 0 ; PCC acute 60 0 ; CC ocircumflex 2 ; PCC o 0 0 ; PCC circumflex 10 0 ; CC odieresis 2 ; PCC o 0 0 ; PCC dieresis 10 0 ; CC ograve 2 ; PCC o 0 0 ; PCC grave 60 0 ; CC otilde 2 ; PCC o 0 0 ; PCC tilde -20 0 ; CC scaron 2 ; PCC s 0 0 ; PCC caron -10 0 ; CC uacute 2 ; PCC u 0 0 ; PCC acute 70 0 ; CC ucircumflex 2 ; PCC u 0 0 ; PCC circumflex 30 0 ; CC udieresis 2 ; PCC u 0 0 ; PCC dieresis 20 0 ; CC ugrave 2 ; PCC u 0 0 ; PCC grave 50 0 ; CC yacute 2 ; PCC y 0 0 ; PCC acute 60 0 ; CC ydieresis 2 ; PCC y 0 0 ; PCC dieresis 0 0 ; CC zcaron 2 ; PCC z 0 0 ; PCC caron 40 0 ; EndComposites EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/afm/pzdr.afm ================================================ StartFontMetrics 2.0 Comment Copyright (c) 1985, 1987, 1988, 1989 Adobe Systems Incorporated. All rights reserved. Comment Creation Date: Fri Dec 1 12:57:42 1989 Comment UniqueID 26200 Comment VMusage 39281 49041 FontName ZapfDingbats FullName ITC Zapf Dingbats FamilyName ITC Zapf Dingbats Weight Medium ItalicAngle 0 IsFixedPitch false FontBBox -1 -143 981 820 UnderlinePosition -98 UnderlineThickness 54 Version 001.004 Notice Copyright (c) 1985, 1987, 1988, 1989 Adobe Systems Incorporated. All rights reserved.ITC Zapf Dingbats is a registered trademark of International Typeface Corporation. EncodingScheme FontSpecific StartCharMetrics 202 C 32 ; WX 278 ; N space ; B 0 0 0 0 ; C 33 ; WX 974 ; N a1 ; B 35 72 939 621 ; C 34 ; WX 961 ; N a2 ; B 35 81 927 611 ; C 35 ; WX 974 ; N a202 ; B 35 72 939 621 ; C 36 ; WX 980 ; N a3 ; B 35 0 945 692 ; C 37 ; WX 719 ; N a4 ; B 34 139 685 566 ; C 38 ; WX 789 ; N a5 ; B 35 -14 755 705 ; C 39 ; WX 790 ; N a119 ; B 35 -14 755 705 ; C 40 ; WX 791 ; N a118 ; B 35 -13 761 705 ; C 41 ; WX 690 ; N a117 ; B 35 138 655 553 ; C 42 ; WX 960 ; N a11 ; B 35 123 925 568 ; C 43 ; WX 939 ; N a12 ; B 35 134 904 559 ; C 44 ; WX 549 ; N a13 ; B 29 -11 516 705 ; C 45 ; WX 855 ; N a14 ; B 34 59 820 632 ; C 46 ; WX 911 ; N a15 ; B 35 50 876 642 ; C 47 ; WX 933 ; N a16 ; B 35 139 899 550 ; C 48 ; WX 911 ; N a105 ; B 35 50 876 642 ; C 49 ; WX 945 ; N a17 ; B 35 139 909 553 ; C 50 ; WX 974 ; N a18 ; B 35 104 938 587 ; C 51 ; WX 755 ; N a19 ; B 34 -13 721 705 ; C 52 ; WX 846 ; N a20 ; B 36 -14 811 705 ; C 53 ; WX 762 ; N a21 ; B 35 0 727 692 ; C 54 ; WX 761 ; N a22 ; B 35 0 727 692 ; C 55 ; WX 571 ; N a23 ; B -1 -68 571 661 ; C 56 ; WX 677 ; N a24 ; B 36 -13 642 705 ; C 57 ; WX 763 ; N a25 ; B 35 0 728 692 ; C 58 ; WX 760 ; N a26 ; B 35 0 726 692 ; C 59 ; WX 759 ; N a27 ; B 35 0 725 692 ; C 60 ; WX 754 ; N a28 ; B 35 0 720 692 ; C 61 ; WX 494 ; N a6 ; B 35 0 460 692 ; C 62 ; WX 552 ; N a7 ; B 35 0 517 692 ; C 63 ; WX 537 ; N a8 ; B 35 0 503 692 ; C 64 ; WX 577 ; N a9 ; B 35 96 542 596 ; C 65 ; WX 692 ; N a10 ; B 35 -14 657 705 ; C 66 ; WX 786 ; N a29 ; B 35 -14 751 705 ; C 67 ; WX 788 ; N a30 ; B 35 -14 752 705 ; C 68 ; WX 788 ; N a31 ; B 35 -14 753 705 ; C 69 ; WX 790 ; N a32 ; B 35 -14 756 705 ; C 70 ; WX 793 ; N a33 ; B 35 -13 759 705 ; C 71 ; WX 794 ; N a34 ; B 35 -13 759 705 ; C 72 ; WX 816 ; N a35 ; B 35 -14 782 705 ; C 73 ; WX 823 ; N a36 ; B 35 -14 787 705 ; C 74 ; WX 789 ; N a37 ; B 35 -14 754 705 ; C 75 ; WX 841 ; N a38 ; B 35 -14 807 705 ; C 76 ; WX 823 ; N a39 ; B 35 -14 789 705 ; C 77 ; WX 833 ; N a40 ; B 35 -14 798 705 ; C 78 ; WX 816 ; N a41 ; B 35 -13 782 705 ; C 79 ; WX 831 ; N a42 ; B 35 -14 796 705 ; C 80 ; WX 923 ; N a43 ; B 35 -14 888 705 ; C 81 ; WX 744 ; N a44 ; B 35 0 710 692 ; C 82 ; WX 723 ; N a45 ; B 35 0 688 692 ; C 83 ; WX 749 ; N a46 ; B 35 0 714 692 ; C 84 ; WX 790 ; N a47 ; B 34 -14 756 705 ; C 85 ; WX 792 ; N a48 ; B 35 -14 758 705 ; C 86 ; WX 695 ; N a49 ; B 35 -14 661 706 ; C 87 ; WX 776 ; N a50 ; B 35 -6 741 699 ; C 88 ; WX 768 ; N a51 ; B 35 -7 734 699 ; C 89 ; WX 792 ; N a52 ; B 35 -14 757 705 ; C 90 ; WX 759 ; N a53 ; B 35 0 725 692 ; C 91 ; WX 707 ; N a54 ; B 35 -13 672 704 ; C 92 ; WX 708 ; N a55 ; B 35 -14 672 705 ; C 93 ; WX 682 ; N a56 ; B 35 -14 647 705 ; C 94 ; WX 701 ; N a57 ; B 35 -14 666 705 ; C 95 ; WX 826 ; N a58 ; B 35 -14 791 705 ; C 96 ; WX 815 ; N a59 ; B 35 -14 780 705 ; C 97 ; WX 789 ; N a60 ; B 35 -14 754 705 ; C 98 ; WX 789 ; N a61 ; B 35 -14 754 705 ; C 99 ; WX 707 ; N a62 ; B 34 -14 673 705 ; C 100 ; WX 687 ; N a63 ; B 36 0 651 692 ; C 101 ; WX 696 ; N a64 ; B 35 0 661 691 ; C 102 ; WX 689 ; N a65 ; B 35 0 655 692 ; C 103 ; WX 786 ; N a66 ; B 34 -14 751 705 ; C 104 ; WX 787 ; N a67 ; B 35 -14 752 705 ; C 105 ; WX 713 ; N a68 ; B 35 -14 678 705 ; C 106 ; WX 791 ; N a69 ; B 35 -14 756 705 ; C 107 ; WX 785 ; N a70 ; B 36 -14 751 705 ; C 108 ; WX 791 ; N a71 ; B 35 -14 757 705 ; C 109 ; WX 873 ; N a72 ; B 35 -14 838 705 ; C 110 ; WX 761 ; N a73 ; B 35 0 726 692 ; C 111 ; WX 762 ; N a74 ; B 35 0 727 692 ; C 112 ; WX 762 ; N a203 ; B 35 0 727 692 ; C 113 ; WX 759 ; N a75 ; B 35 0 725 692 ; C 114 ; WX 759 ; N a204 ; B 35 0 725 692 ; C 115 ; WX 892 ; N a76 ; B 35 0 858 705 ; C 116 ; WX 892 ; N a77 ; B 35 -14 858 692 ; C 117 ; WX 788 ; N a78 ; B 35 -14 754 705 ; C 118 ; WX 784 ; N a79 ; B 35 -14 749 705 ; C 119 ; WX 438 ; N a81 ; B 35 -14 403 705 ; C 120 ; WX 138 ; N a82 ; B 35 0 104 692 ; C 121 ; WX 277 ; N a83 ; B 35 0 242 692 ; C 122 ; WX 415 ; N a84 ; B 35 0 380 692 ; C 123 ; WX 392 ; N a97 ; B 35 263 357 705 ; C 124 ; WX 392 ; N a98 ; B 34 263 357 705 ; C 125 ; WX 668 ; N a99 ; B 35 263 633 705 ; C 126 ; WX 668 ; N a100 ; B 36 263 634 705 ; C 161 ; WX 732 ; N a101 ; B 35 -143 697 806 ; C 162 ; WX 544 ; N a102 ; B 56 -14 488 706 ; C 163 ; WX 544 ; N a103 ; B 34 -14 508 705 ; C 164 ; WX 910 ; N a104 ; B 35 40 875 651 ; C 165 ; WX 667 ; N a106 ; B 35 -14 633 705 ; C 166 ; WX 760 ; N a107 ; B 35 -14 726 705 ; C 167 ; WX 760 ; N a108 ; B 0 121 758 569 ; C 168 ; WX 776 ; N a112 ; B 35 0 741 705 ; C 169 ; WX 595 ; N a111 ; B 34 -14 560 705 ; C 170 ; WX 694 ; N a110 ; B 35 -14 659 705 ; C 171 ; WX 626 ; N a109 ; B 34 0 591 705 ; C 172 ; WX 788 ; N a120 ; B 35 -14 754 705 ; C 173 ; WX 788 ; N a121 ; B 35 -14 754 705 ; C 174 ; WX 788 ; N a122 ; B 35 -14 754 705 ; C 175 ; WX 788 ; N a123 ; B 35 -14 754 705 ; C 176 ; WX 788 ; N a124 ; B 35 -14 754 705 ; C 177 ; WX 788 ; N a125 ; B 35 -14 754 705 ; C 178 ; WX 788 ; N a126 ; B 35 -14 754 705 ; C 179 ; WX 788 ; N a127 ; B 35 -14 754 705 ; C 180 ; WX 788 ; N a128 ; B 35 -14 754 705 ; C 181 ; WX 788 ; N a129 ; B 35 -14 754 705 ; C 182 ; WX 788 ; N a130 ; B 35 -14 754 705 ; C 183 ; WX 788 ; N a131 ; B 35 -14 754 705 ; C 184 ; WX 788 ; N a132 ; B 35 -14 754 705 ; C 185 ; WX 788 ; N a133 ; B 35 -14 754 705 ; C 186 ; WX 788 ; N a134 ; B 35 -14 754 705 ; C 187 ; WX 788 ; N a135 ; B 35 -14 754 705 ; C 188 ; WX 788 ; N a136 ; B 35 -14 754 705 ; C 189 ; WX 788 ; N a137 ; B 35 -14 754 705 ; C 190 ; WX 788 ; N a138 ; B 35 -14 754 705 ; C 191 ; WX 788 ; N a139 ; B 35 -14 754 705 ; C 192 ; WX 788 ; N a140 ; B 35 -14 754 705 ; C 193 ; WX 788 ; N a141 ; B 35 -14 754 705 ; C 194 ; WX 788 ; N a142 ; B 35 -14 754 705 ; C 195 ; WX 788 ; N a143 ; B 35 -14 754 705 ; C 196 ; WX 788 ; N a144 ; B 35 -14 754 705 ; C 197 ; WX 788 ; N a145 ; B 35 -14 754 705 ; C 198 ; WX 788 ; N a146 ; B 35 -14 754 705 ; C 199 ; WX 788 ; N a147 ; B 35 -14 754 705 ; C 200 ; WX 788 ; N a148 ; B 35 -14 754 705 ; C 201 ; WX 788 ; N a149 ; B 35 -14 754 705 ; C 202 ; WX 788 ; N a150 ; B 35 -14 754 705 ; C 203 ; WX 788 ; N a151 ; B 35 -14 754 705 ; C 204 ; WX 788 ; N a152 ; B 35 -14 754 705 ; C 205 ; WX 788 ; N a153 ; B 35 -14 754 705 ; C 206 ; WX 788 ; N a154 ; B 35 -14 754 705 ; C 207 ; WX 788 ; N a155 ; B 35 -14 754 705 ; C 208 ; WX 788 ; N a156 ; B 35 -14 754 705 ; C 209 ; WX 788 ; N a157 ; B 35 -14 754 705 ; C 210 ; WX 788 ; N a158 ; B 35 -14 754 705 ; C 211 ; WX 788 ; N a159 ; B 35 -14 754 705 ; C 212 ; WX 894 ; N a160 ; B 35 58 860 634 ; C 213 ; WX 838 ; N a161 ; B 35 152 803 540 ; C 214 ; WX 1016 ; N a163 ; B 34 152 981 540 ; C 215 ; WX 458 ; N a164 ; B 35 -127 422 820 ; C 216 ; WX 748 ; N a196 ; B 35 94 698 597 ; C 217 ; WX 924 ; N a165 ; B 35 140 890 552 ; C 218 ; WX 748 ; N a192 ; B 35 94 698 597 ; C 219 ; WX 918 ; N a166 ; B 35 166 884 526 ; C 220 ; WX 927 ; N a167 ; B 35 32 892 660 ; C 221 ; WX 928 ; N a168 ; B 35 129 891 562 ; C 222 ; WX 928 ; N a169 ; B 35 128 893 563 ; C 223 ; WX 834 ; N a170 ; B 35 155 799 537 ; C 224 ; WX 873 ; N a171 ; B 35 93 838 599 ; C 225 ; WX 828 ; N a172 ; B 35 104 791 588 ; C 226 ; WX 924 ; N a173 ; B 35 98 889 594 ; C 227 ; WX 924 ; N a162 ; B 35 98 889 594 ; C 228 ; WX 917 ; N a174 ; B 35 0 882 692 ; C 229 ; WX 930 ; N a175 ; B 35 84 896 608 ; C 230 ; WX 931 ; N a176 ; B 35 84 896 608 ; C 231 ; WX 463 ; N a177 ; B 35 -99 429 791 ; C 232 ; WX 883 ; N a178 ; B 35 71 848 623 ; C 233 ; WX 836 ; N a179 ; B 35 44 802 648 ; C 234 ; WX 836 ; N a193 ; B 35 44 802 648 ; C 235 ; WX 867 ; N a180 ; B 35 101 832 591 ; C 236 ; WX 867 ; N a199 ; B 35 101 832 591 ; C 237 ; WX 696 ; N a181 ; B 35 44 661 648 ; C 238 ; WX 696 ; N a200 ; B 35 44 661 648 ; C 239 ; WX 874 ; N a182 ; B 35 77 840 619 ; C 241 ; WX 874 ; N a201 ; B 35 73 840 615 ; C 242 ; WX 760 ; N a183 ; B 35 0 725 692 ; C 243 ; WX 946 ; N a184 ; B 35 160 911 533 ; C 244 ; WX 771 ; N a197 ; B 34 37 736 655 ; C 245 ; WX 865 ; N a185 ; B 35 207 830 481 ; C 246 ; WX 771 ; N a194 ; B 34 37 736 655 ; C 247 ; WX 888 ; N a198 ; B 34 -19 853 712 ; C 248 ; WX 967 ; N a186 ; B 35 124 932 568 ; C 249 ; WX 888 ; N a195 ; B 34 -19 853 712 ; C 250 ; WX 831 ; N a187 ; B 35 113 796 579 ; C 251 ; WX 873 ; N a188 ; B 36 118 838 578 ; C 252 ; WX 927 ; N a189 ; B 35 150 891 542 ; C 253 ; WX 970 ; N a190 ; B 35 76 931 616 ; C 254 ; WX 918 ; N a191 ; B 34 99 884 593 ; C -1 ; WX 410 ; N a86 ; B 35 0 375 692 ; C -1 ; WX 509 ; N a85 ; B 35 0 475 692 ; C -1 ; WX 334 ; N a95 ; B 35 0 299 692 ; C -1 ; WX 509 ; N a205 ; B 35 0 475 692 ; C -1 ; WX 390 ; N a89 ; B 35 -14 356 705 ; C -1 ; WX 234 ; N a87 ; B 35 -14 199 705 ; C -1 ; WX 276 ; N a91 ; B 35 0 242 692 ; C -1 ; WX 390 ; N a90 ; B 35 -14 355 705 ; C -1 ; WX 410 ; N a206 ; B 35 0 375 692 ; C -1 ; WX 317 ; N a94 ; B 35 0 283 692 ; C -1 ; WX 317 ; N a93 ; B 35 0 283 692 ; C -1 ; WX 276 ; N a92 ; B 35 0 242 692 ; C -1 ; WX 334 ; N a96 ; B 35 0 299 692 ; C -1 ; WX 234 ; N a88 ; B 35 -14 199 705 ; EndCharMetrics EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/pdfcorefonts/Courier-Bold.afm ================================================ StartFontMetrics 4.1 Comment Copyright (c) 1989, 1990, 1991, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Mon Jun 23 16:28:00 1997 Comment UniqueID 43048 Comment VMusage 41139 52164 FontName Courier-Bold FullName Courier Bold FamilyName Courier Weight Bold ItalicAngle 0 IsFixedPitch true CharacterSet ExtendedRoman FontBBox -113 -250 749 801 UnderlinePosition -100 UnderlineThickness 50 Version 003.000 Notice Copyright (c) 1989, 1990, 1991, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. EncodingScheme AdobeStandardEncoding CapHeight 562 XHeight 439 Ascender 629 Descender -157 StdHW 84 StdVW 106 StartCharMetrics 315 C 32 ; WX 600 ; N space ; B 0 0 0 0 ; C 33 ; WX 600 ; N exclam ; B 202 -15 398 572 ; C 34 ; WX 600 ; N quotedbl ; B 135 277 465 562 ; C 35 ; WX 600 ; N numbersign ; B 56 -45 544 651 ; C 36 ; WX 600 ; N dollar ; B 82 -126 519 666 ; C 37 ; WX 600 ; N percent ; B 5 -15 595 616 ; C 38 ; WX 600 ; N ampersand ; B 36 -15 546 543 ; C 39 ; WX 600 ; N quoteright ; B 171 277 423 562 ; C 40 ; WX 600 ; N parenleft ; B 219 -102 461 616 ; C 41 ; WX 600 ; N parenright ; B 139 -102 381 616 ; C 42 ; WX 600 ; N asterisk ; B 91 219 509 601 ; C 43 ; WX 600 ; N plus ; B 71 39 529 478 ; C 44 ; WX 600 ; N comma ; B 123 -111 393 174 ; C 45 ; WX 600 ; N hyphen ; B 100 203 500 313 ; C 46 ; WX 600 ; N period ; B 192 -15 408 171 ; C 47 ; WX 600 ; N slash ; B 98 -77 502 626 ; C 48 ; WX 600 ; N zero ; B 87 -15 513 616 ; C 49 ; WX 600 ; N one ; B 81 0 539 616 ; C 50 ; WX 600 ; N two ; B 61 0 499 616 ; C 51 ; WX 600 ; N three ; B 63 -15 501 616 ; C 52 ; WX 600 ; N four ; B 53 0 507 616 ; C 53 ; WX 600 ; N five ; B 70 -15 521 601 ; C 54 ; WX 600 ; N six ; B 90 -15 521 616 ; C 55 ; WX 600 ; N seven ; B 55 0 494 601 ; C 56 ; WX 600 ; N eight ; B 83 -15 517 616 ; C 57 ; WX 600 ; N nine ; B 79 -15 510 616 ; C 58 ; WX 600 ; N colon ; B 191 -15 407 425 ; C 59 ; WX 600 ; N semicolon ; B 123 -111 408 425 ; C 60 ; WX 600 ; N less ; B 66 15 523 501 ; C 61 ; WX 600 ; N equal ; B 71 118 529 398 ; C 62 ; WX 600 ; N greater ; B 77 15 534 501 ; C 63 ; WX 600 ; N question ; B 98 -14 501 580 ; C 64 ; WX 600 ; N at ; B 16 -15 584 616 ; C 65 ; WX 600 ; N A ; B -9 0 609 562 ; C 66 ; WX 600 ; N B ; B 30 0 573 562 ; C 67 ; WX 600 ; N C ; B 22 -18 560 580 ; C 68 ; WX 600 ; N D ; B 30 0 594 562 ; C 69 ; WX 600 ; N E ; B 25 0 560 562 ; C 70 ; WX 600 ; N F ; B 39 0 570 562 ; C 71 ; WX 600 ; N G ; B 22 -18 594 580 ; C 72 ; WX 600 ; N H ; B 20 0 580 562 ; C 73 ; WX 600 ; N I ; B 77 0 523 562 ; C 74 ; WX 600 ; N J ; B 37 -18 601 562 ; C 75 ; WX 600 ; N K ; B 21 0 599 562 ; C 76 ; WX 600 ; N L ; B 39 0 578 562 ; C 77 ; WX 600 ; N M ; B -2 0 602 562 ; C 78 ; WX 600 ; N N ; B 8 -12 610 562 ; C 79 ; WX 600 ; N O ; B 22 -18 578 580 ; C 80 ; WX 600 ; N P ; B 48 0 559 562 ; C 81 ; WX 600 ; N Q ; B 32 -138 578 580 ; C 82 ; WX 600 ; N R ; B 24 0 599 562 ; C 83 ; WX 600 ; N S ; B 47 -22 553 582 ; C 84 ; WX 600 ; N T ; B 21 0 579 562 ; C 85 ; WX 600 ; N U ; B 4 -18 596 562 ; C 86 ; WX 600 ; N V ; B -13 0 613 562 ; C 87 ; WX 600 ; N W ; B -18 0 618 562 ; C 88 ; WX 600 ; N X ; B 12 0 588 562 ; C 89 ; WX 600 ; N Y ; B 12 0 589 562 ; C 90 ; WX 600 ; N Z ; B 62 0 539 562 ; C 91 ; WX 600 ; N bracketleft ; B 245 -102 475 616 ; C 92 ; WX 600 ; N backslash ; B 99 -77 503 626 ; C 93 ; WX 600 ; N bracketright ; B 125 -102 355 616 ; C 94 ; WX 600 ; N asciicircum ; B 108 250 492 616 ; C 95 ; WX 600 ; N underscore ; B 0 -125 600 -75 ; C 96 ; WX 600 ; N quoteleft ; B 178 277 428 562 ; C 97 ; WX 600 ; N a ; B 35 -15 570 454 ; C 98 ; WX 600 ; N b ; B 0 -15 584 626 ; C 99 ; WX 600 ; N c ; B 40 -15 545 459 ; C 100 ; WX 600 ; N d ; B 20 -15 591 626 ; C 101 ; WX 600 ; N e ; B 40 -15 563 454 ; C 102 ; WX 600 ; N f ; B 83 0 547 626 ; L i fi ; L l fl ; C 103 ; WX 600 ; N g ; B 30 -146 580 454 ; C 104 ; WX 600 ; N h ; B 5 0 592 626 ; C 105 ; WX 600 ; N i ; B 77 0 523 658 ; C 106 ; WX 600 ; N j ; B 63 -146 440 658 ; C 107 ; WX 600 ; N k ; B 20 0 585 626 ; C 108 ; WX 600 ; N l ; B 77 0 523 626 ; C 109 ; WX 600 ; N m ; B -22 0 626 454 ; C 110 ; WX 600 ; N n ; B 18 0 592 454 ; C 111 ; WX 600 ; N o ; B 30 -15 570 454 ; C 112 ; WX 600 ; N p ; B -1 -142 570 454 ; C 113 ; WX 600 ; N q ; B 20 -142 591 454 ; C 114 ; WX 600 ; N r ; B 47 0 580 454 ; C 115 ; WX 600 ; N s ; B 68 -17 535 459 ; C 116 ; WX 600 ; N t ; B 47 -15 532 562 ; C 117 ; WX 600 ; N u ; B -1 -15 569 439 ; C 118 ; WX 600 ; N v ; B -1 0 601 439 ; C 119 ; WX 600 ; N w ; B -18 0 618 439 ; C 120 ; WX 600 ; N x ; B 6 0 594 439 ; C 121 ; WX 600 ; N y ; B -4 -142 601 439 ; C 122 ; WX 600 ; N z ; B 81 0 520 439 ; C 123 ; WX 600 ; N braceleft ; B 160 -102 464 616 ; C 124 ; WX 600 ; N bar ; B 255 -250 345 750 ; C 125 ; WX 600 ; N braceright ; B 136 -102 440 616 ; C 126 ; WX 600 ; N asciitilde ; B 71 153 530 356 ; C 161 ; WX 600 ; N exclamdown ; B 202 -146 398 449 ; C 162 ; WX 600 ; N cent ; B 66 -49 518 614 ; C 163 ; WX 600 ; N sterling ; B 72 -28 558 611 ; C 164 ; WX 600 ; N fraction ; B 25 -60 576 661 ; C 165 ; WX 600 ; N yen ; B 10 0 590 562 ; C 166 ; WX 600 ; N florin ; B -30 -131 572 616 ; C 167 ; WX 600 ; N section ; B 83 -70 517 580 ; C 168 ; WX 600 ; N currency ; B 54 49 546 517 ; C 169 ; WX 600 ; N quotesingle ; B 227 277 373 562 ; C 170 ; WX 600 ; N quotedblleft ; B 71 277 535 562 ; C 171 ; WX 600 ; N guillemotleft ; B 8 70 553 446 ; C 172 ; WX 600 ; N guilsinglleft ; B 141 70 459 446 ; C 173 ; WX 600 ; N guilsinglright ; B 141 70 459 446 ; C 174 ; WX 600 ; N fi ; B 12 0 593 626 ; C 175 ; WX 600 ; N fl ; B 12 0 593 626 ; C 177 ; WX 600 ; N endash ; B 65 203 535 313 ; C 178 ; WX 600 ; N dagger ; B 106 -70 494 580 ; C 179 ; WX 600 ; N daggerdbl ; B 106 -70 494 580 ; C 180 ; WX 600 ; N periodcentered ; B 196 165 404 351 ; C 182 ; WX 600 ; N paragraph ; B 6 -70 576 580 ; C 183 ; WX 600 ; N bullet ; B 140 132 460 430 ; C 184 ; WX 600 ; N quotesinglbase ; B 175 -142 427 143 ; C 185 ; WX 600 ; N quotedblbase ; B 65 -142 529 143 ; C 186 ; WX 600 ; N quotedblright ; B 61 277 525 562 ; C 187 ; WX 600 ; N guillemotright ; B 47 70 592 446 ; C 188 ; WX 600 ; N ellipsis ; B 26 -15 574 116 ; C 189 ; WX 600 ; N perthousand ; B -113 -15 713 616 ; C 191 ; WX 600 ; N questiondown ; B 99 -146 502 449 ; C 193 ; WX 600 ; N grave ; B 132 508 395 661 ; C 194 ; WX 600 ; N acute ; B 205 508 468 661 ; C 195 ; WX 600 ; N circumflex ; B 103 483 497 657 ; C 196 ; WX 600 ; N tilde ; B 89 493 512 636 ; C 197 ; WX 600 ; N macron ; B 88 505 512 585 ; C 198 ; WX 600 ; N breve ; B 83 468 517 631 ; C 199 ; WX 600 ; N dotaccent ; B 230 498 370 638 ; C 200 ; WX 600 ; N dieresis ; B 128 498 472 638 ; C 202 ; WX 600 ; N ring ; B 198 481 402 678 ; C 203 ; WX 600 ; N cedilla ; B 205 -206 387 0 ; C 205 ; WX 600 ; N hungarumlaut ; B 68 488 588 661 ; C 206 ; WX 600 ; N ogonek ; B 169 -199 400 0 ; C 207 ; WX 600 ; N caron ; B 103 493 497 667 ; C 208 ; WX 600 ; N emdash ; B -10 203 610 313 ; C 225 ; WX 600 ; N AE ; B -29 0 602 562 ; C 227 ; WX 600 ; N ordfeminine ; B 147 196 453 580 ; C 232 ; WX 600 ; N Lslash ; B 39 0 578 562 ; C 233 ; WX 600 ; N Oslash ; B 22 -22 578 584 ; C 234 ; WX 600 ; N OE ; B -25 0 595 562 ; C 235 ; WX 600 ; N ordmasculine ; B 147 196 453 580 ; C 241 ; WX 600 ; N ae ; B -4 -15 601 454 ; C 245 ; WX 600 ; N dotlessi ; B 77 0 523 439 ; C 248 ; WX 600 ; N lslash ; B 77 0 523 626 ; C 249 ; WX 600 ; N oslash ; B 30 -24 570 463 ; C 250 ; WX 600 ; N oe ; B -18 -15 611 454 ; C 251 ; WX 600 ; N germandbls ; B 22 -15 596 626 ; C -1 ; WX 600 ; N Idieresis ; B 77 0 523 761 ; C -1 ; WX 600 ; N eacute ; B 40 -15 563 661 ; C -1 ; WX 600 ; N abreve ; B 35 -15 570 661 ; C -1 ; WX 600 ; N uhungarumlaut ; B -1 -15 628 661 ; C -1 ; WX 600 ; N ecaron ; B 40 -15 563 667 ; C -1 ; WX 600 ; N Ydieresis ; B 12 0 589 761 ; C -1 ; WX 600 ; N divide ; B 71 16 529 500 ; C -1 ; WX 600 ; N Yacute ; B 12 0 589 784 ; C -1 ; WX 600 ; N Acircumflex ; B -9 0 609 780 ; C -1 ; WX 600 ; N aacute ; B 35 -15 570 661 ; C -1 ; WX 600 ; N Ucircumflex ; B 4 -18 596 780 ; C -1 ; WX 600 ; N yacute ; B -4 -142 601 661 ; C -1 ; WX 600 ; N scommaaccent ; B 68 -250 535 459 ; C -1 ; WX 600 ; N ecircumflex ; B 40 -15 563 657 ; C -1 ; WX 600 ; N Uring ; B 4 -18 596 801 ; C -1 ; WX 600 ; N Udieresis ; B 4 -18 596 761 ; C -1 ; WX 600 ; N aogonek ; B 35 -199 586 454 ; C -1 ; WX 600 ; N Uacute ; B 4 -18 596 784 ; C -1 ; WX 600 ; N uogonek ; B -1 -199 585 439 ; C -1 ; WX 600 ; N Edieresis ; B 25 0 560 761 ; C -1 ; WX 600 ; N Dcroat ; B 30 0 594 562 ; C -1 ; WX 600 ; N commaaccent ; B 205 -250 397 -57 ; C -1 ; WX 600 ; N copyright ; B 0 -18 600 580 ; C -1 ; WX 600 ; N Emacron ; B 25 0 560 708 ; C -1 ; WX 600 ; N ccaron ; B 40 -15 545 667 ; C -1 ; WX 600 ; N aring ; B 35 -15 570 678 ; C -1 ; WX 600 ; N Ncommaaccent ; B 8 -250 610 562 ; C -1 ; WX 600 ; N lacute ; B 77 0 523 801 ; C -1 ; WX 600 ; N agrave ; B 35 -15 570 661 ; C -1 ; WX 600 ; N Tcommaaccent ; B 21 -250 579 562 ; C -1 ; WX 600 ; N Cacute ; B 22 -18 560 784 ; C -1 ; WX 600 ; N atilde ; B 35 -15 570 636 ; C -1 ; WX 600 ; N Edotaccent ; B 25 0 560 761 ; C -1 ; WX 600 ; N scaron ; B 68 -17 535 667 ; C -1 ; WX 600 ; N scedilla ; B 68 -206 535 459 ; C -1 ; WX 600 ; N iacute ; B 77 0 523 661 ; C -1 ; WX 600 ; N lozenge ; B 66 0 534 740 ; C -1 ; WX 600 ; N Rcaron ; B 24 0 599 790 ; C -1 ; WX 600 ; N Gcommaaccent ; B 22 -250 594 580 ; C -1 ; WX 600 ; N ucircumflex ; B -1 -15 569 657 ; C -1 ; WX 600 ; N acircumflex ; B 35 -15 570 657 ; C -1 ; WX 600 ; N Amacron ; B -9 0 609 708 ; C -1 ; WX 600 ; N rcaron ; B 47 0 580 667 ; C -1 ; WX 600 ; N ccedilla ; B 40 -206 545 459 ; C -1 ; WX 600 ; N Zdotaccent ; B 62 0 539 761 ; C -1 ; WX 600 ; N Thorn ; B 48 0 557 562 ; C -1 ; WX 600 ; N Omacron ; B 22 -18 578 708 ; C -1 ; WX 600 ; N Racute ; B 24 0 599 784 ; C -1 ; WX 600 ; N Sacute ; B 47 -22 553 784 ; C -1 ; WX 600 ; N dcaron ; B 20 -15 727 626 ; C -1 ; WX 600 ; N Umacron ; B 4 -18 596 708 ; C -1 ; WX 600 ; N uring ; B -1 -15 569 678 ; C -1 ; WX 600 ; N threesuperior ; B 138 222 433 616 ; C -1 ; WX 600 ; N Ograve ; B 22 -18 578 784 ; C -1 ; WX 600 ; N Agrave ; B -9 0 609 784 ; C -1 ; WX 600 ; N Abreve ; B -9 0 609 784 ; C -1 ; WX 600 ; N multiply ; B 81 39 520 478 ; C -1 ; WX 600 ; N uacute ; B -1 -15 569 661 ; C -1 ; WX 600 ; N Tcaron ; B 21 0 579 790 ; C -1 ; WX 600 ; N partialdiff ; B 63 -38 537 728 ; C -1 ; WX 600 ; N ydieresis ; B -4 -142 601 638 ; C -1 ; WX 600 ; N Nacute ; B 8 -12 610 784 ; C -1 ; WX 600 ; N icircumflex ; B 73 0 523 657 ; C -1 ; WX 600 ; N Ecircumflex ; B 25 0 560 780 ; C -1 ; WX 600 ; N adieresis ; B 35 -15 570 638 ; C -1 ; WX 600 ; N edieresis ; B 40 -15 563 638 ; C -1 ; WX 600 ; N cacute ; B 40 -15 545 661 ; C -1 ; WX 600 ; N nacute ; B 18 0 592 661 ; C -1 ; WX 600 ; N umacron ; B -1 -15 569 585 ; C -1 ; WX 600 ; N Ncaron ; B 8 -12 610 790 ; C -1 ; WX 600 ; N Iacute ; B 77 0 523 784 ; C -1 ; WX 600 ; N plusminus ; B 71 24 529 515 ; C -1 ; WX 600 ; N brokenbar ; B 255 -175 345 675 ; C -1 ; WX 600 ; N registered ; B 0 -18 600 580 ; C -1 ; WX 600 ; N Gbreve ; B 22 -18 594 784 ; C -1 ; WX 600 ; N Idotaccent ; B 77 0 523 761 ; C -1 ; WX 600 ; N summation ; B 15 -10 586 706 ; C -1 ; WX 600 ; N Egrave ; B 25 0 560 784 ; C -1 ; WX 600 ; N racute ; B 47 0 580 661 ; C -1 ; WX 600 ; N omacron ; B 30 -15 570 585 ; C -1 ; WX 600 ; N Zacute ; B 62 0 539 784 ; C -1 ; WX 600 ; N Zcaron ; B 62 0 539 790 ; C -1 ; WX 600 ; N greaterequal ; B 26 0 523 696 ; C -1 ; WX 600 ; N Eth ; B 30 0 594 562 ; C -1 ; WX 600 ; N Ccedilla ; B 22 -206 560 580 ; C -1 ; WX 600 ; N lcommaaccent ; B 77 -250 523 626 ; C -1 ; WX 600 ; N tcaron ; B 47 -15 532 703 ; C -1 ; WX 600 ; N eogonek ; B 40 -199 563 454 ; C -1 ; WX 600 ; N Uogonek ; B 4 -199 596 562 ; C -1 ; WX 600 ; N Aacute ; B -9 0 609 784 ; C -1 ; WX 600 ; N Adieresis ; B -9 0 609 761 ; C -1 ; WX 600 ; N egrave ; B 40 -15 563 661 ; C -1 ; WX 600 ; N zacute ; B 81 0 520 661 ; C -1 ; WX 600 ; N iogonek ; B 77 -199 523 658 ; C -1 ; WX 600 ; N Oacute ; B 22 -18 578 784 ; C -1 ; WX 600 ; N oacute ; B 30 -15 570 661 ; C -1 ; WX 600 ; N amacron ; B 35 -15 570 585 ; C -1 ; WX 600 ; N sacute ; B 68 -17 535 661 ; C -1 ; WX 600 ; N idieresis ; B 77 0 523 618 ; C -1 ; WX 600 ; N Ocircumflex ; B 22 -18 578 780 ; C -1 ; WX 600 ; N Ugrave ; B 4 -18 596 784 ; C -1 ; WX 600 ; N Delta ; B 6 0 594 688 ; C -1 ; WX 600 ; N thorn ; B -14 -142 570 626 ; C -1 ; WX 600 ; N twosuperior ; B 143 230 436 616 ; C -1 ; WX 600 ; N Odieresis ; B 22 -18 578 761 ; C -1 ; WX 600 ; N mu ; B -1 -142 569 439 ; C -1 ; WX 600 ; N igrave ; B 77 0 523 661 ; C -1 ; WX 600 ; N ohungarumlaut ; B 30 -15 668 661 ; C -1 ; WX 600 ; N Eogonek ; B 25 -199 576 562 ; C -1 ; WX 600 ; N dcroat ; B 20 -15 591 626 ; C -1 ; WX 600 ; N threequarters ; B -47 -60 648 661 ; C -1 ; WX 600 ; N Scedilla ; B 47 -206 553 582 ; C -1 ; WX 600 ; N lcaron ; B 77 0 597 626 ; C -1 ; WX 600 ; N Kcommaaccent ; B 21 -250 599 562 ; C -1 ; WX 600 ; N Lacute ; B 39 0 578 784 ; C -1 ; WX 600 ; N trademark ; B -9 230 749 562 ; C -1 ; WX 600 ; N edotaccent ; B 40 -15 563 638 ; C -1 ; WX 600 ; N Igrave ; B 77 0 523 784 ; C -1 ; WX 600 ; N Imacron ; B 77 0 523 708 ; C -1 ; WX 600 ; N Lcaron ; B 39 0 637 562 ; C -1 ; WX 600 ; N onehalf ; B -47 -60 648 661 ; C -1 ; WX 600 ; N lessequal ; B 26 0 523 696 ; C -1 ; WX 600 ; N ocircumflex ; B 30 -15 570 657 ; C -1 ; WX 600 ; N ntilde ; B 18 0 592 636 ; C -1 ; WX 600 ; N Uhungarumlaut ; B 4 -18 638 784 ; C -1 ; WX 600 ; N Eacute ; B 25 0 560 784 ; C -1 ; WX 600 ; N emacron ; B 40 -15 563 585 ; C -1 ; WX 600 ; N gbreve ; B 30 -146 580 661 ; C -1 ; WX 600 ; N onequarter ; B -56 -60 656 661 ; C -1 ; WX 600 ; N Scaron ; B 47 -22 553 790 ; C -1 ; WX 600 ; N Scommaaccent ; B 47 -250 553 582 ; C -1 ; WX 600 ; N Ohungarumlaut ; B 22 -18 628 784 ; C -1 ; WX 600 ; N degree ; B 86 243 474 616 ; C -1 ; WX 600 ; N ograve ; B 30 -15 570 661 ; C -1 ; WX 600 ; N Ccaron ; B 22 -18 560 790 ; C -1 ; WX 600 ; N ugrave ; B -1 -15 569 661 ; C -1 ; WX 600 ; N radical ; B -19 -104 473 778 ; C -1 ; WX 600 ; N Dcaron ; B 30 0 594 790 ; C -1 ; WX 600 ; N rcommaaccent ; B 47 -250 580 454 ; C -1 ; WX 600 ; N Ntilde ; B 8 -12 610 759 ; C -1 ; WX 600 ; N otilde ; B 30 -15 570 636 ; C -1 ; WX 600 ; N Rcommaaccent ; B 24 -250 599 562 ; C -1 ; WX 600 ; N Lcommaaccent ; B 39 -250 578 562 ; C -1 ; WX 600 ; N Atilde ; B -9 0 609 759 ; C -1 ; WX 600 ; N Aogonek ; B -9 -199 625 562 ; C -1 ; WX 600 ; N Aring ; B -9 0 609 801 ; C -1 ; WX 600 ; N Otilde ; B 22 -18 578 759 ; C -1 ; WX 600 ; N zdotaccent ; B 81 0 520 638 ; C -1 ; WX 600 ; N Ecaron ; B 25 0 560 790 ; C -1 ; WX 600 ; N Iogonek ; B 77 -199 523 562 ; C -1 ; WX 600 ; N kcommaaccent ; B 20 -250 585 626 ; C -1 ; WX 600 ; N minus ; B 71 203 529 313 ; C -1 ; WX 600 ; N Icircumflex ; B 77 0 523 780 ; C -1 ; WX 600 ; N ncaron ; B 18 0 592 667 ; C -1 ; WX 600 ; N tcommaaccent ; B 47 -250 532 562 ; C -1 ; WX 600 ; N logicalnot ; B 71 103 529 413 ; C -1 ; WX 600 ; N odieresis ; B 30 -15 570 638 ; C -1 ; WX 600 ; N udieresis ; B -1 -15 569 638 ; C -1 ; WX 600 ; N notequal ; B 12 -47 537 563 ; C -1 ; WX 600 ; N gcommaaccent ; B 30 -146 580 714 ; C -1 ; WX 600 ; N eth ; B 58 -27 543 626 ; C -1 ; WX 600 ; N zcaron ; B 81 0 520 667 ; C -1 ; WX 600 ; N ncommaaccent ; B 18 -250 592 454 ; C -1 ; WX 600 ; N onesuperior ; B 153 230 447 616 ; C -1 ; WX 600 ; N imacron ; B 77 0 523 585 ; C -1 ; WX 600 ; N Euro ; B 0 0 0 0 ; EndCharMetrics EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/pdfcorefonts/Courier-BoldOblique.afm ================================================ StartFontMetrics 4.1 Comment Copyright (c) 1989, 1990, 1991, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Mon Jun 23 16:28:46 1997 Comment UniqueID 43049 Comment VMusage 17529 79244 FontName Courier-BoldOblique FullName Courier Bold Oblique FamilyName Courier Weight Bold ItalicAngle -12 IsFixedPitch true CharacterSet ExtendedRoman FontBBox -57 -250 869 801 UnderlinePosition -100 UnderlineThickness 50 Version 003.000 Notice Copyright (c) 1989, 1990, 1991, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. EncodingScheme AdobeStandardEncoding CapHeight 562 XHeight 439 Ascender 629 Descender -157 StdHW 84 StdVW 106 StartCharMetrics 315 C 32 ; WX 600 ; N space ; B 0 0 0 0 ; C 33 ; WX 600 ; N exclam ; B 215 -15 495 572 ; C 34 ; WX 600 ; N quotedbl ; B 211 277 585 562 ; C 35 ; WX 600 ; N numbersign ; B 88 -45 641 651 ; C 36 ; WX 600 ; N dollar ; B 87 -126 630 666 ; C 37 ; WX 600 ; N percent ; B 101 -15 625 616 ; C 38 ; WX 600 ; N ampersand ; B 61 -15 595 543 ; C 39 ; WX 600 ; N quoteright ; B 229 277 543 562 ; C 40 ; WX 600 ; N parenleft ; B 265 -102 592 616 ; C 41 ; WX 600 ; N parenright ; B 117 -102 444 616 ; C 42 ; WX 600 ; N asterisk ; B 179 219 598 601 ; C 43 ; WX 600 ; N plus ; B 114 39 596 478 ; C 44 ; WX 600 ; N comma ; B 99 -111 430 174 ; C 45 ; WX 600 ; N hyphen ; B 143 203 567 313 ; C 46 ; WX 600 ; N period ; B 206 -15 427 171 ; C 47 ; WX 600 ; N slash ; B 90 -77 626 626 ; C 48 ; WX 600 ; N zero ; B 135 -15 593 616 ; C 49 ; WX 600 ; N one ; B 93 0 562 616 ; C 50 ; WX 600 ; N two ; B 61 0 594 616 ; C 51 ; WX 600 ; N three ; B 71 -15 571 616 ; C 52 ; WX 600 ; N four ; B 81 0 559 616 ; C 53 ; WX 600 ; N five ; B 77 -15 621 601 ; C 54 ; WX 600 ; N six ; B 135 -15 652 616 ; C 55 ; WX 600 ; N seven ; B 147 0 622 601 ; C 56 ; WX 600 ; N eight ; B 115 -15 604 616 ; C 57 ; WX 600 ; N nine ; B 75 -15 592 616 ; C 58 ; WX 600 ; N colon ; B 205 -15 480 425 ; C 59 ; WX 600 ; N semicolon ; B 99 -111 481 425 ; C 60 ; WX 600 ; N less ; B 120 15 613 501 ; C 61 ; WX 600 ; N equal ; B 96 118 614 398 ; C 62 ; WX 600 ; N greater ; B 97 15 589 501 ; C 63 ; WX 600 ; N question ; B 183 -14 592 580 ; C 64 ; WX 600 ; N at ; B 65 -15 642 616 ; C 65 ; WX 600 ; N A ; B -9 0 632 562 ; C 66 ; WX 600 ; N B ; B 30 0 630 562 ; C 67 ; WX 600 ; N C ; B 74 -18 675 580 ; C 68 ; WX 600 ; N D ; B 30 0 664 562 ; C 69 ; WX 600 ; N E ; B 25 0 670 562 ; C 70 ; WX 600 ; N F ; B 39 0 684 562 ; C 71 ; WX 600 ; N G ; B 74 -18 675 580 ; C 72 ; WX 600 ; N H ; B 20 0 700 562 ; C 73 ; WX 600 ; N I ; B 77 0 643 562 ; C 74 ; WX 600 ; N J ; B 58 -18 721 562 ; C 75 ; WX 600 ; N K ; B 21 0 692 562 ; C 76 ; WX 600 ; N L ; B 39 0 636 562 ; C 77 ; WX 600 ; N M ; B -2 0 722 562 ; C 78 ; WX 600 ; N N ; B 8 -12 730 562 ; C 79 ; WX 600 ; N O ; B 74 -18 645 580 ; C 80 ; WX 600 ; N P ; B 48 0 643 562 ; C 81 ; WX 600 ; N Q ; B 83 -138 636 580 ; C 82 ; WX 600 ; N R ; B 24 0 617 562 ; C 83 ; WX 600 ; N S ; B 54 -22 673 582 ; C 84 ; WX 600 ; N T ; B 86 0 679 562 ; C 85 ; WX 600 ; N U ; B 101 -18 716 562 ; C 86 ; WX 600 ; N V ; B 84 0 733 562 ; C 87 ; WX 600 ; N W ; B 79 0 738 562 ; C 88 ; WX 600 ; N X ; B 12 0 690 562 ; C 89 ; WX 600 ; N Y ; B 109 0 709 562 ; C 90 ; WX 600 ; N Z ; B 62 0 637 562 ; C 91 ; WX 600 ; N bracketleft ; B 223 -102 606 616 ; C 92 ; WX 600 ; N backslash ; B 222 -77 496 626 ; C 93 ; WX 600 ; N bracketright ; B 103 -102 486 616 ; C 94 ; WX 600 ; N asciicircum ; B 171 250 556 616 ; C 95 ; WX 600 ; N underscore ; B -27 -125 585 -75 ; C 96 ; WX 600 ; N quoteleft ; B 297 277 487 562 ; C 97 ; WX 600 ; N a ; B 61 -15 593 454 ; C 98 ; WX 600 ; N b ; B 13 -15 636 626 ; C 99 ; WX 600 ; N c ; B 81 -15 631 459 ; C 100 ; WX 600 ; N d ; B 60 -15 645 626 ; C 101 ; WX 600 ; N e ; B 81 -15 605 454 ; C 102 ; WX 600 ; N f ; B 83 0 677 626 ; L i fi ; L l fl ; C 103 ; WX 600 ; N g ; B 40 -146 674 454 ; C 104 ; WX 600 ; N h ; B 18 0 615 626 ; C 105 ; WX 600 ; N i ; B 77 0 546 658 ; C 106 ; WX 600 ; N j ; B 36 -146 580 658 ; C 107 ; WX 600 ; N k ; B 33 0 643 626 ; C 108 ; WX 600 ; N l ; B 77 0 546 626 ; C 109 ; WX 600 ; N m ; B -22 0 649 454 ; C 110 ; WX 600 ; N n ; B 18 0 615 454 ; C 111 ; WX 600 ; N o ; B 71 -15 622 454 ; C 112 ; WX 600 ; N p ; B -32 -142 622 454 ; C 113 ; WX 600 ; N q ; B 60 -142 685 454 ; C 114 ; WX 600 ; N r ; B 47 0 655 454 ; C 115 ; WX 600 ; N s ; B 66 -17 608 459 ; C 116 ; WX 600 ; N t ; B 118 -15 567 562 ; C 117 ; WX 600 ; N u ; B 70 -15 592 439 ; C 118 ; WX 600 ; N v ; B 70 0 695 439 ; C 119 ; WX 600 ; N w ; B 53 0 712 439 ; C 120 ; WX 600 ; N x ; B 6 0 671 439 ; C 121 ; WX 600 ; N y ; B -21 -142 695 439 ; C 122 ; WX 600 ; N z ; B 81 0 614 439 ; C 123 ; WX 600 ; N braceleft ; B 203 -102 595 616 ; C 124 ; WX 600 ; N bar ; B 201 -250 505 750 ; C 125 ; WX 600 ; N braceright ; B 114 -102 506 616 ; C 126 ; WX 600 ; N asciitilde ; B 120 153 590 356 ; C 161 ; WX 600 ; N exclamdown ; B 196 -146 477 449 ; C 162 ; WX 600 ; N cent ; B 121 -49 605 614 ; C 163 ; WX 600 ; N sterling ; B 106 -28 650 611 ; C 164 ; WX 600 ; N fraction ; B 22 -60 708 661 ; C 165 ; WX 600 ; N yen ; B 98 0 710 562 ; C 166 ; WX 600 ; N florin ; B -57 -131 702 616 ; C 167 ; WX 600 ; N section ; B 74 -70 620 580 ; C 168 ; WX 600 ; N currency ; B 77 49 644 517 ; C 169 ; WX 600 ; N quotesingle ; B 303 277 493 562 ; C 170 ; WX 600 ; N quotedblleft ; B 190 277 594 562 ; C 171 ; WX 600 ; N guillemotleft ; B 62 70 639 446 ; C 172 ; WX 600 ; N guilsinglleft ; B 195 70 545 446 ; C 173 ; WX 600 ; N guilsinglright ; B 165 70 514 446 ; C 174 ; WX 600 ; N fi ; B 12 0 644 626 ; C 175 ; WX 600 ; N fl ; B 12 0 644 626 ; C 177 ; WX 600 ; N endash ; B 108 203 602 313 ; C 178 ; WX 600 ; N dagger ; B 175 -70 586 580 ; C 179 ; WX 600 ; N daggerdbl ; B 121 -70 587 580 ; C 180 ; WX 600 ; N periodcentered ; B 248 165 461 351 ; C 182 ; WX 600 ; N paragraph ; B 61 -70 700 580 ; C 183 ; WX 600 ; N bullet ; B 196 132 523 430 ; C 184 ; WX 600 ; N quotesinglbase ; B 144 -142 458 143 ; C 185 ; WX 600 ; N quotedblbase ; B 34 -142 560 143 ; C 186 ; WX 600 ; N quotedblright ; B 119 277 645 562 ; C 187 ; WX 600 ; N guillemotright ; B 71 70 647 446 ; C 188 ; WX 600 ; N ellipsis ; B 35 -15 587 116 ; C 189 ; WX 600 ; N perthousand ; B -45 -15 743 616 ; C 191 ; WX 600 ; N questiondown ; B 100 -146 509 449 ; C 193 ; WX 600 ; N grave ; B 272 508 503 661 ; C 194 ; WX 600 ; N acute ; B 312 508 609 661 ; C 195 ; WX 600 ; N circumflex ; B 212 483 607 657 ; C 196 ; WX 600 ; N tilde ; B 199 493 643 636 ; C 197 ; WX 600 ; N macron ; B 195 505 637 585 ; C 198 ; WX 600 ; N breve ; B 217 468 652 631 ; C 199 ; WX 600 ; N dotaccent ; B 348 498 493 638 ; C 200 ; WX 600 ; N dieresis ; B 246 498 595 638 ; C 202 ; WX 600 ; N ring ; B 319 481 528 678 ; C 203 ; WX 600 ; N cedilla ; B 168 -206 368 0 ; C 205 ; WX 600 ; N hungarumlaut ; B 171 488 729 661 ; C 206 ; WX 600 ; N ogonek ; B 143 -199 367 0 ; C 207 ; WX 600 ; N caron ; B 238 493 633 667 ; C 208 ; WX 600 ; N emdash ; B 33 203 677 313 ; C 225 ; WX 600 ; N AE ; B -29 0 708 562 ; C 227 ; WX 600 ; N ordfeminine ; B 188 196 526 580 ; C 232 ; WX 600 ; N Lslash ; B 39 0 636 562 ; C 233 ; WX 600 ; N Oslash ; B 48 -22 673 584 ; C 234 ; WX 600 ; N OE ; B 26 0 701 562 ; C 235 ; WX 600 ; N ordmasculine ; B 188 196 543 580 ; C 241 ; WX 600 ; N ae ; B 21 -15 652 454 ; C 245 ; WX 600 ; N dotlessi ; B 77 0 546 439 ; C 248 ; WX 600 ; N lslash ; B 77 0 587 626 ; C 249 ; WX 600 ; N oslash ; B 54 -24 638 463 ; C 250 ; WX 600 ; N oe ; B 18 -15 662 454 ; C 251 ; WX 600 ; N germandbls ; B 22 -15 629 626 ; C -1 ; WX 600 ; N Idieresis ; B 77 0 643 761 ; C -1 ; WX 600 ; N eacute ; B 81 -15 609 661 ; C -1 ; WX 600 ; N abreve ; B 61 -15 658 661 ; C -1 ; WX 600 ; N uhungarumlaut ; B 70 -15 769 661 ; C -1 ; WX 600 ; N ecaron ; B 81 -15 633 667 ; C -1 ; WX 600 ; N Ydieresis ; B 109 0 709 761 ; C -1 ; WX 600 ; N divide ; B 114 16 596 500 ; C -1 ; WX 600 ; N Yacute ; B 109 0 709 784 ; C -1 ; WX 600 ; N Acircumflex ; B -9 0 632 780 ; C -1 ; WX 600 ; N aacute ; B 61 -15 609 661 ; C -1 ; WX 600 ; N Ucircumflex ; B 101 -18 716 780 ; C -1 ; WX 600 ; N yacute ; B -21 -142 695 661 ; C -1 ; WX 600 ; N scommaaccent ; B 66 -250 608 459 ; C -1 ; WX 600 ; N ecircumflex ; B 81 -15 607 657 ; C -1 ; WX 600 ; N Uring ; B 101 -18 716 801 ; C -1 ; WX 600 ; N Udieresis ; B 101 -18 716 761 ; C -1 ; WX 600 ; N aogonek ; B 61 -199 593 454 ; C -1 ; WX 600 ; N Uacute ; B 101 -18 716 784 ; C -1 ; WX 600 ; N uogonek ; B 70 -199 592 439 ; C -1 ; WX 600 ; N Edieresis ; B 25 0 670 761 ; C -1 ; WX 600 ; N Dcroat ; B 30 0 664 562 ; C -1 ; WX 600 ; N commaaccent ; B 151 -250 385 -57 ; C -1 ; WX 600 ; N copyright ; B 53 -18 667 580 ; C -1 ; WX 600 ; N Emacron ; B 25 0 670 708 ; C -1 ; WX 600 ; N ccaron ; B 81 -15 633 667 ; C -1 ; WX 600 ; N aring ; B 61 -15 593 678 ; C -1 ; WX 600 ; N Ncommaaccent ; B 8 -250 730 562 ; C -1 ; WX 600 ; N lacute ; B 77 0 639 801 ; C -1 ; WX 600 ; N agrave ; B 61 -15 593 661 ; C -1 ; WX 600 ; N Tcommaaccent ; B 86 -250 679 562 ; C -1 ; WX 600 ; N Cacute ; B 74 -18 675 784 ; C -1 ; WX 600 ; N atilde ; B 61 -15 643 636 ; C -1 ; WX 600 ; N Edotaccent ; B 25 0 670 761 ; C -1 ; WX 600 ; N scaron ; B 66 -17 633 667 ; C -1 ; WX 600 ; N scedilla ; B 66 -206 608 459 ; C -1 ; WX 600 ; N iacute ; B 77 0 609 661 ; C -1 ; WX 600 ; N lozenge ; B 145 0 614 740 ; C -1 ; WX 600 ; N Rcaron ; B 24 0 659 790 ; C -1 ; WX 600 ; N Gcommaaccent ; B 74 -250 675 580 ; C -1 ; WX 600 ; N ucircumflex ; B 70 -15 597 657 ; C -1 ; WX 600 ; N acircumflex ; B 61 -15 607 657 ; C -1 ; WX 600 ; N Amacron ; B -9 0 633 708 ; C -1 ; WX 600 ; N rcaron ; B 47 0 655 667 ; C -1 ; WX 600 ; N ccedilla ; B 81 -206 631 459 ; C -1 ; WX 600 ; N Zdotaccent ; B 62 0 637 761 ; C -1 ; WX 600 ; N Thorn ; B 48 0 620 562 ; C -1 ; WX 600 ; N Omacron ; B 74 -18 663 708 ; C -1 ; WX 600 ; N Racute ; B 24 0 665 784 ; C -1 ; WX 600 ; N Sacute ; B 54 -22 673 784 ; C -1 ; WX 600 ; N dcaron ; B 60 -15 861 626 ; C -1 ; WX 600 ; N Umacron ; B 101 -18 716 708 ; C -1 ; WX 600 ; N uring ; B 70 -15 592 678 ; C -1 ; WX 600 ; N threesuperior ; B 193 222 526 616 ; C -1 ; WX 600 ; N Ograve ; B 74 -18 645 784 ; C -1 ; WX 600 ; N Agrave ; B -9 0 632 784 ; C -1 ; WX 600 ; N Abreve ; B -9 0 684 784 ; C -1 ; WX 600 ; N multiply ; B 104 39 606 478 ; C -1 ; WX 600 ; N uacute ; B 70 -15 599 661 ; C -1 ; WX 600 ; N Tcaron ; B 86 0 679 790 ; C -1 ; WX 600 ; N partialdiff ; B 91 -38 627 728 ; C -1 ; WX 600 ; N ydieresis ; B -21 -142 695 638 ; C -1 ; WX 600 ; N Nacute ; B 8 -12 730 784 ; C -1 ; WX 600 ; N icircumflex ; B 77 0 577 657 ; C -1 ; WX 600 ; N Ecircumflex ; B 25 0 670 780 ; C -1 ; WX 600 ; N adieresis ; B 61 -15 595 638 ; C -1 ; WX 600 ; N edieresis ; B 81 -15 605 638 ; C -1 ; WX 600 ; N cacute ; B 81 -15 649 661 ; C -1 ; WX 600 ; N nacute ; B 18 0 639 661 ; C -1 ; WX 600 ; N umacron ; B 70 -15 637 585 ; C -1 ; WX 600 ; N Ncaron ; B 8 -12 730 790 ; C -1 ; WX 600 ; N Iacute ; B 77 0 643 784 ; C -1 ; WX 600 ; N plusminus ; B 76 24 614 515 ; C -1 ; WX 600 ; N brokenbar ; B 217 -175 489 675 ; C -1 ; WX 600 ; N registered ; B 53 -18 667 580 ; C -1 ; WX 600 ; N Gbreve ; B 74 -18 684 784 ; C -1 ; WX 600 ; N Idotaccent ; B 77 0 643 761 ; C -1 ; WX 600 ; N summation ; B 15 -10 672 706 ; C -1 ; WX 600 ; N Egrave ; B 25 0 670 784 ; C -1 ; WX 600 ; N racute ; B 47 0 655 661 ; C -1 ; WX 600 ; N omacron ; B 71 -15 637 585 ; C -1 ; WX 600 ; N Zacute ; B 62 0 665 784 ; C -1 ; WX 600 ; N Zcaron ; B 62 0 659 790 ; C -1 ; WX 600 ; N greaterequal ; B 26 0 627 696 ; C -1 ; WX 600 ; N Eth ; B 30 0 664 562 ; C -1 ; WX 600 ; N Ccedilla ; B 74 -206 675 580 ; C -1 ; WX 600 ; N lcommaaccent ; B 77 -250 546 626 ; C -1 ; WX 600 ; N tcaron ; B 118 -15 627 703 ; C -1 ; WX 600 ; N eogonek ; B 81 -199 605 454 ; C -1 ; WX 600 ; N Uogonek ; B 101 -199 716 562 ; C -1 ; WX 600 ; N Aacute ; B -9 0 655 784 ; C -1 ; WX 600 ; N Adieresis ; B -9 0 632 761 ; C -1 ; WX 600 ; N egrave ; B 81 -15 605 661 ; C -1 ; WX 600 ; N zacute ; B 81 0 614 661 ; C -1 ; WX 600 ; N iogonek ; B 77 -199 546 658 ; C -1 ; WX 600 ; N Oacute ; B 74 -18 645 784 ; C -1 ; WX 600 ; N oacute ; B 71 -15 649 661 ; C -1 ; WX 600 ; N amacron ; B 61 -15 637 585 ; C -1 ; WX 600 ; N sacute ; B 66 -17 609 661 ; C -1 ; WX 600 ; N idieresis ; B 77 0 561 618 ; C -1 ; WX 600 ; N Ocircumflex ; B 74 -18 645 780 ; C -1 ; WX 600 ; N Ugrave ; B 101 -18 716 784 ; C -1 ; WX 600 ; N Delta ; B 6 0 594 688 ; C -1 ; WX 600 ; N thorn ; B -32 -142 622 626 ; C -1 ; WX 600 ; N twosuperior ; B 191 230 542 616 ; C -1 ; WX 600 ; N Odieresis ; B 74 -18 645 761 ; C -1 ; WX 600 ; N mu ; B 49 -142 592 439 ; C -1 ; WX 600 ; N igrave ; B 77 0 546 661 ; C -1 ; WX 600 ; N ohungarumlaut ; B 71 -15 809 661 ; C -1 ; WX 600 ; N Eogonek ; B 25 -199 670 562 ; C -1 ; WX 600 ; N dcroat ; B 60 -15 712 626 ; C -1 ; WX 600 ; N threequarters ; B 8 -60 699 661 ; C -1 ; WX 600 ; N Scedilla ; B 54 -206 673 582 ; C -1 ; WX 600 ; N lcaron ; B 77 0 731 626 ; C -1 ; WX 600 ; N Kcommaaccent ; B 21 -250 692 562 ; C -1 ; WX 600 ; N Lacute ; B 39 0 636 784 ; C -1 ; WX 600 ; N trademark ; B 86 230 869 562 ; C -1 ; WX 600 ; N edotaccent ; B 81 -15 605 638 ; C -1 ; WX 600 ; N Igrave ; B 77 0 643 784 ; C -1 ; WX 600 ; N Imacron ; B 77 0 663 708 ; C -1 ; WX 600 ; N Lcaron ; B 39 0 757 562 ; C -1 ; WX 600 ; N onehalf ; B 22 -60 716 661 ; C -1 ; WX 600 ; N lessequal ; B 26 0 671 696 ; C -1 ; WX 600 ; N ocircumflex ; B 71 -15 622 657 ; C -1 ; WX 600 ; N ntilde ; B 18 0 643 636 ; C -1 ; WX 600 ; N Uhungarumlaut ; B 101 -18 805 784 ; C -1 ; WX 600 ; N Eacute ; B 25 0 670 784 ; C -1 ; WX 600 ; N emacron ; B 81 -15 637 585 ; C -1 ; WX 600 ; N gbreve ; B 40 -146 674 661 ; C -1 ; WX 600 ; N onequarter ; B 13 -60 707 661 ; C -1 ; WX 600 ; N Scaron ; B 54 -22 689 790 ; C -1 ; WX 600 ; N Scommaaccent ; B 54 -250 673 582 ; C -1 ; WX 600 ; N Ohungarumlaut ; B 74 -18 795 784 ; C -1 ; WX 600 ; N degree ; B 173 243 570 616 ; C -1 ; WX 600 ; N ograve ; B 71 -15 622 661 ; C -1 ; WX 600 ; N Ccaron ; B 74 -18 689 790 ; C -1 ; WX 600 ; N ugrave ; B 70 -15 592 661 ; C -1 ; WX 600 ; N radical ; B 67 -104 635 778 ; C -1 ; WX 600 ; N Dcaron ; B 30 0 664 790 ; C -1 ; WX 600 ; N rcommaaccent ; B 47 -250 655 454 ; C -1 ; WX 600 ; N Ntilde ; B 8 -12 730 759 ; C -1 ; WX 600 ; N otilde ; B 71 -15 643 636 ; C -1 ; WX 600 ; N Rcommaaccent ; B 24 -250 617 562 ; C -1 ; WX 600 ; N Lcommaaccent ; B 39 -250 636 562 ; C -1 ; WX 600 ; N Atilde ; B -9 0 669 759 ; C -1 ; WX 600 ; N Aogonek ; B -9 -199 632 562 ; C -1 ; WX 600 ; N Aring ; B -9 0 632 801 ; C -1 ; WX 600 ; N Otilde ; B 74 -18 669 759 ; C -1 ; WX 600 ; N zdotaccent ; B 81 0 614 638 ; C -1 ; WX 600 ; N Ecaron ; B 25 0 670 790 ; C -1 ; WX 600 ; N Iogonek ; B 77 -199 643 562 ; C -1 ; WX 600 ; N kcommaaccent ; B 33 -250 643 626 ; C -1 ; WX 600 ; N minus ; B 114 203 596 313 ; C -1 ; WX 600 ; N Icircumflex ; B 77 0 643 780 ; C -1 ; WX 600 ; N ncaron ; B 18 0 633 667 ; C -1 ; WX 600 ; N tcommaaccent ; B 118 -250 567 562 ; C -1 ; WX 600 ; N logicalnot ; B 135 103 617 413 ; C -1 ; WX 600 ; N odieresis ; B 71 -15 622 638 ; C -1 ; WX 600 ; N udieresis ; B 70 -15 595 638 ; C -1 ; WX 600 ; N notequal ; B 30 -47 626 563 ; C -1 ; WX 600 ; N gcommaaccent ; B 40 -146 674 714 ; C -1 ; WX 600 ; N eth ; B 93 -27 661 626 ; C -1 ; WX 600 ; N zcaron ; B 81 0 643 667 ; C -1 ; WX 600 ; N ncommaaccent ; B 18 -250 615 454 ; C -1 ; WX 600 ; N onesuperior ; B 212 230 514 616 ; C -1 ; WX 600 ; N imacron ; B 77 0 575 585 ; C -1 ; WX 600 ; N Euro ; B 0 0 0 0 ; EndCharMetrics EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/pdfcorefonts/Courier-Oblique.afm ================================================ StartFontMetrics 4.1 Comment Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Thu May 1 17:37:52 1997 Comment UniqueID 43051 Comment VMusage 16248 75829 FontName Courier-Oblique FullName Courier Oblique FamilyName Courier Weight Medium ItalicAngle -12 IsFixedPitch true CharacterSet ExtendedRoman FontBBox -27 -250 849 805 UnderlinePosition -100 UnderlineThickness 50 Version 003.000 Notice Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. EncodingScheme AdobeStandardEncoding CapHeight 562 XHeight 426 Ascender 629 Descender -157 StdHW 51 StdVW 51 StartCharMetrics 315 C 32 ; WX 600 ; N space ; B 0 0 0 0 ; C 33 ; WX 600 ; N exclam ; B 243 -15 464 572 ; C 34 ; WX 600 ; N quotedbl ; B 273 328 532 562 ; C 35 ; WX 600 ; N numbersign ; B 133 -32 596 639 ; C 36 ; WX 600 ; N dollar ; B 108 -126 596 662 ; C 37 ; WX 600 ; N percent ; B 134 -15 599 622 ; C 38 ; WX 600 ; N ampersand ; B 87 -15 580 543 ; C 39 ; WX 600 ; N quoteright ; B 283 328 495 562 ; C 40 ; WX 600 ; N parenleft ; B 313 -108 572 622 ; C 41 ; WX 600 ; N parenright ; B 137 -108 396 622 ; C 42 ; WX 600 ; N asterisk ; B 212 257 580 607 ; C 43 ; WX 600 ; N plus ; B 129 44 580 470 ; C 44 ; WX 600 ; N comma ; B 157 -112 370 122 ; C 45 ; WX 600 ; N hyphen ; B 152 231 558 285 ; C 46 ; WX 600 ; N period ; B 238 -15 382 109 ; C 47 ; WX 600 ; N slash ; B 112 -80 604 629 ; C 48 ; WX 600 ; N zero ; B 154 -15 575 622 ; C 49 ; WX 600 ; N one ; B 98 0 515 622 ; C 50 ; WX 600 ; N two ; B 70 0 568 622 ; C 51 ; WX 600 ; N three ; B 82 -15 538 622 ; C 52 ; WX 600 ; N four ; B 108 0 541 622 ; C 53 ; WX 600 ; N five ; B 99 -15 589 607 ; C 54 ; WX 600 ; N six ; B 155 -15 629 622 ; C 55 ; WX 600 ; N seven ; B 182 0 612 607 ; C 56 ; WX 600 ; N eight ; B 132 -15 588 622 ; C 57 ; WX 600 ; N nine ; B 93 -15 574 622 ; C 58 ; WX 600 ; N colon ; B 238 -15 441 385 ; C 59 ; WX 600 ; N semicolon ; B 157 -112 441 385 ; C 60 ; WX 600 ; N less ; B 96 42 610 472 ; C 61 ; WX 600 ; N equal ; B 109 138 600 376 ; C 62 ; WX 600 ; N greater ; B 85 42 599 472 ; C 63 ; WX 600 ; N question ; B 222 -15 583 572 ; C 64 ; WX 600 ; N at ; B 127 -15 582 622 ; C 65 ; WX 600 ; N A ; B 3 0 607 562 ; C 66 ; WX 600 ; N B ; B 43 0 616 562 ; C 67 ; WX 600 ; N C ; B 93 -18 655 580 ; C 68 ; WX 600 ; N D ; B 43 0 645 562 ; C 69 ; WX 600 ; N E ; B 53 0 660 562 ; C 70 ; WX 600 ; N F ; B 53 0 660 562 ; C 71 ; WX 600 ; N G ; B 83 -18 645 580 ; C 72 ; WX 600 ; N H ; B 32 0 687 562 ; C 73 ; WX 600 ; N I ; B 96 0 623 562 ; C 74 ; WX 600 ; N J ; B 52 -18 685 562 ; C 75 ; WX 600 ; N K ; B 38 0 671 562 ; C 76 ; WX 600 ; N L ; B 47 0 607 562 ; C 77 ; WX 600 ; N M ; B 4 0 715 562 ; C 78 ; WX 600 ; N N ; B 7 -13 712 562 ; C 79 ; WX 600 ; N O ; B 94 -18 625 580 ; C 80 ; WX 600 ; N P ; B 79 0 644 562 ; C 81 ; WX 600 ; N Q ; B 95 -138 625 580 ; C 82 ; WX 600 ; N R ; B 38 0 598 562 ; C 83 ; WX 600 ; N S ; B 76 -20 650 580 ; C 84 ; WX 600 ; N T ; B 108 0 665 562 ; C 85 ; WX 600 ; N U ; B 125 -18 702 562 ; C 86 ; WX 600 ; N V ; B 105 -13 723 562 ; C 87 ; WX 600 ; N W ; B 106 -13 722 562 ; C 88 ; WX 600 ; N X ; B 23 0 675 562 ; C 89 ; WX 600 ; N Y ; B 133 0 695 562 ; C 90 ; WX 600 ; N Z ; B 86 0 610 562 ; C 91 ; WX 600 ; N bracketleft ; B 246 -108 574 622 ; C 92 ; WX 600 ; N backslash ; B 249 -80 468 629 ; C 93 ; WX 600 ; N bracketright ; B 135 -108 463 622 ; C 94 ; WX 600 ; N asciicircum ; B 175 354 587 622 ; C 95 ; WX 600 ; N underscore ; B -27 -125 584 -75 ; C 96 ; WX 600 ; N quoteleft ; B 343 328 457 562 ; C 97 ; WX 600 ; N a ; B 76 -15 569 441 ; C 98 ; WX 600 ; N b ; B 29 -15 625 629 ; C 99 ; WX 600 ; N c ; B 106 -15 608 441 ; C 100 ; WX 600 ; N d ; B 85 -15 640 629 ; C 101 ; WX 600 ; N e ; B 106 -15 598 441 ; C 102 ; WX 600 ; N f ; B 114 0 662 629 ; L i fi ; L l fl ; C 103 ; WX 600 ; N g ; B 61 -157 657 441 ; C 104 ; WX 600 ; N h ; B 33 0 592 629 ; C 105 ; WX 600 ; N i ; B 95 0 515 657 ; C 106 ; WX 600 ; N j ; B 52 -157 550 657 ; C 107 ; WX 600 ; N k ; B 58 0 633 629 ; C 108 ; WX 600 ; N l ; B 95 0 515 629 ; C 109 ; WX 600 ; N m ; B -5 0 615 441 ; C 110 ; WX 600 ; N n ; B 26 0 585 441 ; C 111 ; WX 600 ; N o ; B 102 -15 588 441 ; C 112 ; WX 600 ; N p ; B -24 -157 605 441 ; C 113 ; WX 600 ; N q ; B 85 -157 682 441 ; C 114 ; WX 600 ; N r ; B 60 0 636 441 ; C 115 ; WX 600 ; N s ; B 78 -15 584 441 ; C 116 ; WX 600 ; N t ; B 167 -15 561 561 ; C 117 ; WX 600 ; N u ; B 101 -15 572 426 ; C 118 ; WX 600 ; N v ; B 90 -10 681 426 ; C 119 ; WX 600 ; N w ; B 76 -10 695 426 ; C 120 ; WX 600 ; N x ; B 20 0 655 426 ; C 121 ; WX 600 ; N y ; B -4 -157 683 426 ; C 122 ; WX 600 ; N z ; B 99 0 593 426 ; C 123 ; WX 600 ; N braceleft ; B 233 -108 569 622 ; C 124 ; WX 600 ; N bar ; B 222 -250 485 750 ; C 125 ; WX 600 ; N braceright ; B 140 -108 477 622 ; C 126 ; WX 600 ; N asciitilde ; B 116 197 600 320 ; C 161 ; WX 600 ; N exclamdown ; B 225 -157 445 430 ; C 162 ; WX 600 ; N cent ; B 151 -49 588 614 ; C 163 ; WX 600 ; N sterling ; B 124 -21 621 611 ; C 164 ; WX 600 ; N fraction ; B 84 -57 646 665 ; C 165 ; WX 600 ; N yen ; B 120 0 693 562 ; C 166 ; WX 600 ; N florin ; B -26 -143 671 622 ; C 167 ; WX 600 ; N section ; B 104 -78 590 580 ; C 168 ; WX 600 ; N currency ; B 94 58 628 506 ; C 169 ; WX 600 ; N quotesingle ; B 345 328 460 562 ; C 170 ; WX 600 ; N quotedblleft ; B 262 328 541 562 ; C 171 ; WX 600 ; N guillemotleft ; B 92 70 652 446 ; C 172 ; WX 600 ; N guilsinglleft ; B 204 70 540 446 ; C 173 ; WX 600 ; N guilsinglright ; B 170 70 506 446 ; C 174 ; WX 600 ; N fi ; B 3 0 619 629 ; C 175 ; WX 600 ; N fl ; B 3 0 619 629 ; C 177 ; WX 600 ; N endash ; B 124 231 586 285 ; C 178 ; WX 600 ; N dagger ; B 217 -78 546 580 ; C 179 ; WX 600 ; N daggerdbl ; B 163 -78 546 580 ; C 180 ; WX 600 ; N periodcentered ; B 275 189 434 327 ; C 182 ; WX 600 ; N paragraph ; B 100 -78 630 562 ; C 183 ; WX 600 ; N bullet ; B 224 130 485 383 ; C 184 ; WX 600 ; N quotesinglbase ; B 185 -134 397 100 ; C 185 ; WX 600 ; N quotedblbase ; B 115 -134 478 100 ; C 186 ; WX 600 ; N quotedblright ; B 213 328 576 562 ; C 187 ; WX 600 ; N guillemotright ; B 58 70 618 446 ; C 188 ; WX 600 ; N ellipsis ; B 46 -15 575 111 ; C 189 ; WX 600 ; N perthousand ; B 59 -15 627 622 ; C 191 ; WX 600 ; N questiondown ; B 105 -157 466 430 ; C 193 ; WX 600 ; N grave ; B 294 497 484 672 ; C 194 ; WX 600 ; N acute ; B 348 497 612 672 ; C 195 ; WX 600 ; N circumflex ; B 229 477 581 654 ; C 196 ; WX 600 ; N tilde ; B 212 489 629 606 ; C 197 ; WX 600 ; N macron ; B 232 525 600 565 ; C 198 ; WX 600 ; N breve ; B 279 501 576 609 ; C 199 ; WX 600 ; N dotaccent ; B 373 537 478 640 ; C 200 ; WX 600 ; N dieresis ; B 272 537 579 640 ; C 202 ; WX 600 ; N ring ; B 332 463 500 627 ; C 203 ; WX 600 ; N cedilla ; B 197 -151 344 10 ; C 205 ; WX 600 ; N hungarumlaut ; B 239 497 683 672 ; C 206 ; WX 600 ; N ogonek ; B 189 -172 377 4 ; C 207 ; WX 600 ; N caron ; B 262 492 614 669 ; C 208 ; WX 600 ; N emdash ; B 49 231 661 285 ; C 225 ; WX 600 ; N AE ; B 3 0 655 562 ; C 227 ; WX 600 ; N ordfeminine ; B 209 249 512 580 ; C 232 ; WX 600 ; N Lslash ; B 47 0 607 562 ; C 233 ; WX 600 ; N Oslash ; B 94 -80 625 629 ; C 234 ; WX 600 ; N OE ; B 59 0 672 562 ; C 235 ; WX 600 ; N ordmasculine ; B 210 249 535 580 ; C 241 ; WX 600 ; N ae ; B 41 -15 626 441 ; C 245 ; WX 600 ; N dotlessi ; B 95 0 515 426 ; C 248 ; WX 600 ; N lslash ; B 95 0 587 629 ; C 249 ; WX 600 ; N oslash ; B 102 -80 588 506 ; C 250 ; WX 600 ; N oe ; B 54 -15 615 441 ; C 251 ; WX 600 ; N germandbls ; B 48 -15 617 629 ; C -1 ; WX 600 ; N Idieresis ; B 96 0 623 753 ; C -1 ; WX 600 ; N eacute ; B 106 -15 612 672 ; C -1 ; WX 600 ; N abreve ; B 76 -15 576 609 ; C -1 ; WX 600 ; N uhungarumlaut ; B 101 -15 723 672 ; C -1 ; WX 600 ; N ecaron ; B 106 -15 614 669 ; C -1 ; WX 600 ; N Ydieresis ; B 133 0 695 753 ; C -1 ; WX 600 ; N divide ; B 136 48 573 467 ; C -1 ; WX 600 ; N Yacute ; B 133 0 695 805 ; C -1 ; WX 600 ; N Acircumflex ; B 3 0 607 787 ; C -1 ; WX 600 ; N aacute ; B 76 -15 612 672 ; C -1 ; WX 600 ; N Ucircumflex ; B 125 -18 702 787 ; C -1 ; WX 600 ; N yacute ; B -4 -157 683 672 ; C -1 ; WX 600 ; N scommaaccent ; B 78 -250 584 441 ; C -1 ; WX 600 ; N ecircumflex ; B 106 -15 598 654 ; C -1 ; WX 600 ; N Uring ; B 125 -18 702 760 ; C -1 ; WX 600 ; N Udieresis ; B 125 -18 702 753 ; C -1 ; WX 600 ; N aogonek ; B 76 -172 569 441 ; C -1 ; WX 600 ; N Uacute ; B 125 -18 702 805 ; C -1 ; WX 600 ; N uogonek ; B 101 -172 572 426 ; C -1 ; WX 600 ; N Edieresis ; B 53 0 660 753 ; C -1 ; WX 600 ; N Dcroat ; B 43 0 645 562 ; C -1 ; WX 600 ; N commaaccent ; B 145 -250 323 -58 ; C -1 ; WX 600 ; N copyright ; B 53 -18 667 580 ; C -1 ; WX 600 ; N Emacron ; B 53 0 660 698 ; C -1 ; WX 600 ; N ccaron ; B 106 -15 614 669 ; C -1 ; WX 600 ; N aring ; B 76 -15 569 627 ; C -1 ; WX 600 ; N Ncommaaccent ; B 7 -250 712 562 ; C -1 ; WX 600 ; N lacute ; B 95 0 640 805 ; C -1 ; WX 600 ; N agrave ; B 76 -15 569 672 ; C -1 ; WX 600 ; N Tcommaaccent ; B 108 -250 665 562 ; C -1 ; WX 600 ; N Cacute ; B 93 -18 655 805 ; C -1 ; WX 600 ; N atilde ; B 76 -15 629 606 ; C -1 ; WX 600 ; N Edotaccent ; B 53 0 660 753 ; C -1 ; WX 600 ; N scaron ; B 78 -15 614 669 ; C -1 ; WX 600 ; N scedilla ; B 78 -151 584 441 ; C -1 ; WX 600 ; N iacute ; B 95 0 612 672 ; C -1 ; WX 600 ; N lozenge ; B 94 0 519 706 ; C -1 ; WX 600 ; N Rcaron ; B 38 0 642 802 ; C -1 ; WX 600 ; N Gcommaaccent ; B 83 -250 645 580 ; C -1 ; WX 600 ; N ucircumflex ; B 101 -15 572 654 ; C -1 ; WX 600 ; N acircumflex ; B 76 -15 581 654 ; C -1 ; WX 600 ; N Amacron ; B 3 0 607 698 ; C -1 ; WX 600 ; N rcaron ; B 60 0 636 669 ; C -1 ; WX 600 ; N ccedilla ; B 106 -151 614 441 ; C -1 ; WX 600 ; N Zdotaccent ; B 86 0 610 753 ; C -1 ; WX 600 ; N Thorn ; B 79 0 606 562 ; C -1 ; WX 600 ; N Omacron ; B 94 -18 628 698 ; C -1 ; WX 600 ; N Racute ; B 38 0 670 805 ; C -1 ; WX 600 ; N Sacute ; B 76 -20 650 805 ; C -1 ; WX 600 ; N dcaron ; B 85 -15 849 629 ; C -1 ; WX 600 ; N Umacron ; B 125 -18 702 698 ; C -1 ; WX 600 ; N uring ; B 101 -15 572 627 ; C -1 ; WX 600 ; N threesuperior ; B 213 240 501 622 ; C -1 ; WX 600 ; N Ograve ; B 94 -18 625 805 ; C -1 ; WX 600 ; N Agrave ; B 3 0 607 805 ; C -1 ; WX 600 ; N Abreve ; B 3 0 607 732 ; C -1 ; WX 600 ; N multiply ; B 103 43 607 470 ; C -1 ; WX 600 ; N uacute ; B 101 -15 602 672 ; C -1 ; WX 600 ; N Tcaron ; B 108 0 665 802 ; C -1 ; WX 600 ; N partialdiff ; B 45 -38 546 710 ; C -1 ; WX 600 ; N ydieresis ; B -4 -157 683 620 ; C -1 ; WX 600 ; N Nacute ; B 7 -13 712 805 ; C -1 ; WX 600 ; N icircumflex ; B 95 0 551 654 ; C -1 ; WX 600 ; N Ecircumflex ; B 53 0 660 787 ; C -1 ; WX 600 ; N adieresis ; B 76 -15 575 620 ; C -1 ; WX 600 ; N edieresis ; B 106 -15 598 620 ; C -1 ; WX 600 ; N cacute ; B 106 -15 612 672 ; C -1 ; WX 600 ; N nacute ; B 26 0 602 672 ; C -1 ; WX 600 ; N umacron ; B 101 -15 600 565 ; C -1 ; WX 600 ; N Ncaron ; B 7 -13 712 802 ; C -1 ; WX 600 ; N Iacute ; B 96 0 640 805 ; C -1 ; WX 600 ; N plusminus ; B 96 44 594 558 ; C -1 ; WX 600 ; N brokenbar ; B 238 -175 469 675 ; C -1 ; WX 600 ; N registered ; B 53 -18 667 580 ; C -1 ; WX 600 ; N Gbreve ; B 83 -18 645 732 ; C -1 ; WX 600 ; N Idotaccent ; B 96 0 623 753 ; C -1 ; WX 600 ; N summation ; B 15 -10 670 706 ; C -1 ; WX 600 ; N Egrave ; B 53 0 660 805 ; C -1 ; WX 600 ; N racute ; B 60 0 636 672 ; C -1 ; WX 600 ; N omacron ; B 102 -15 600 565 ; C -1 ; WX 600 ; N Zacute ; B 86 0 670 805 ; C -1 ; WX 600 ; N Zcaron ; B 86 0 642 802 ; C -1 ; WX 600 ; N greaterequal ; B 98 0 594 710 ; C -1 ; WX 600 ; N Eth ; B 43 0 645 562 ; C -1 ; WX 600 ; N Ccedilla ; B 93 -151 658 580 ; C -1 ; WX 600 ; N lcommaaccent ; B 95 -250 515 629 ; C -1 ; WX 600 ; N tcaron ; B 167 -15 587 717 ; C -1 ; WX 600 ; N eogonek ; B 106 -172 598 441 ; C -1 ; WX 600 ; N Uogonek ; B 124 -172 702 562 ; C -1 ; WX 600 ; N Aacute ; B 3 0 660 805 ; C -1 ; WX 600 ; N Adieresis ; B 3 0 607 753 ; C -1 ; WX 600 ; N egrave ; B 106 -15 598 672 ; C -1 ; WX 600 ; N zacute ; B 99 0 612 672 ; C -1 ; WX 600 ; N iogonek ; B 95 -172 515 657 ; C -1 ; WX 600 ; N Oacute ; B 94 -18 640 805 ; C -1 ; WX 600 ; N oacute ; B 102 -15 612 672 ; C -1 ; WX 600 ; N amacron ; B 76 -15 600 565 ; C -1 ; WX 600 ; N sacute ; B 78 -15 612 672 ; C -1 ; WX 600 ; N idieresis ; B 95 0 545 620 ; C -1 ; WX 600 ; N Ocircumflex ; B 94 -18 625 787 ; C -1 ; WX 600 ; N Ugrave ; B 125 -18 702 805 ; C -1 ; WX 600 ; N Delta ; B 6 0 598 688 ; C -1 ; WX 600 ; N thorn ; B -24 -157 605 629 ; C -1 ; WX 600 ; N twosuperior ; B 230 249 535 622 ; C -1 ; WX 600 ; N Odieresis ; B 94 -18 625 753 ; C -1 ; WX 600 ; N mu ; B 72 -157 572 426 ; C -1 ; WX 600 ; N igrave ; B 95 0 515 672 ; C -1 ; WX 600 ; N ohungarumlaut ; B 102 -15 723 672 ; C -1 ; WX 600 ; N Eogonek ; B 53 -172 660 562 ; C -1 ; WX 600 ; N dcroat ; B 85 -15 704 629 ; C -1 ; WX 600 ; N threequarters ; B 73 -56 659 666 ; C -1 ; WX 600 ; N Scedilla ; B 76 -151 650 580 ; C -1 ; WX 600 ; N lcaron ; B 95 0 667 629 ; C -1 ; WX 600 ; N Kcommaaccent ; B 38 -250 671 562 ; C -1 ; WX 600 ; N Lacute ; B 47 0 607 805 ; C -1 ; WX 600 ; N trademark ; B 75 263 742 562 ; C -1 ; WX 600 ; N edotaccent ; B 106 -15 598 620 ; C -1 ; WX 600 ; N Igrave ; B 96 0 623 805 ; C -1 ; WX 600 ; N Imacron ; B 96 0 628 698 ; C -1 ; WX 600 ; N Lcaron ; B 47 0 632 562 ; C -1 ; WX 600 ; N onehalf ; B 65 -57 669 665 ; C -1 ; WX 600 ; N lessequal ; B 98 0 645 710 ; C -1 ; WX 600 ; N ocircumflex ; B 102 -15 588 654 ; C -1 ; WX 600 ; N ntilde ; B 26 0 629 606 ; C -1 ; WX 600 ; N Uhungarumlaut ; B 125 -18 761 805 ; C -1 ; WX 600 ; N Eacute ; B 53 0 670 805 ; C -1 ; WX 600 ; N emacron ; B 106 -15 600 565 ; C -1 ; WX 600 ; N gbreve ; B 61 -157 657 609 ; C -1 ; WX 600 ; N onequarter ; B 65 -57 674 665 ; C -1 ; WX 600 ; N Scaron ; B 76 -20 672 802 ; C -1 ; WX 600 ; N Scommaaccent ; B 76 -250 650 580 ; C -1 ; WX 600 ; N Ohungarumlaut ; B 94 -18 751 805 ; C -1 ; WX 600 ; N degree ; B 214 269 576 622 ; C -1 ; WX 600 ; N ograve ; B 102 -15 588 672 ; C -1 ; WX 600 ; N Ccaron ; B 93 -18 672 802 ; C -1 ; WX 600 ; N ugrave ; B 101 -15 572 672 ; C -1 ; WX 600 ; N radical ; B 85 -15 765 792 ; C -1 ; WX 600 ; N Dcaron ; B 43 0 645 802 ; C -1 ; WX 600 ; N rcommaaccent ; B 60 -250 636 441 ; C -1 ; WX 600 ; N Ntilde ; B 7 -13 712 729 ; C -1 ; WX 600 ; N otilde ; B 102 -15 629 606 ; C -1 ; WX 600 ; N Rcommaaccent ; B 38 -250 598 562 ; C -1 ; WX 600 ; N Lcommaaccent ; B 47 -250 607 562 ; C -1 ; WX 600 ; N Atilde ; B 3 0 655 729 ; C -1 ; WX 600 ; N Aogonek ; B 3 -172 607 562 ; C -1 ; WX 600 ; N Aring ; B 3 0 607 750 ; C -1 ; WX 600 ; N Otilde ; B 94 -18 655 729 ; C -1 ; WX 600 ; N zdotaccent ; B 99 0 593 620 ; C -1 ; WX 600 ; N Ecaron ; B 53 0 660 802 ; C -1 ; WX 600 ; N Iogonek ; B 96 -172 623 562 ; C -1 ; WX 600 ; N kcommaaccent ; B 58 -250 633 629 ; C -1 ; WX 600 ; N minus ; B 129 232 580 283 ; C -1 ; WX 600 ; N Icircumflex ; B 96 0 623 787 ; C -1 ; WX 600 ; N ncaron ; B 26 0 614 669 ; C -1 ; WX 600 ; N tcommaaccent ; B 165 -250 561 561 ; C -1 ; WX 600 ; N logicalnot ; B 155 108 591 369 ; C -1 ; WX 600 ; N odieresis ; B 102 -15 588 620 ; C -1 ; WX 600 ; N udieresis ; B 101 -15 575 620 ; C -1 ; WX 600 ; N notequal ; B 43 -16 621 529 ; C -1 ; WX 600 ; N gcommaaccent ; B 61 -157 657 708 ; C -1 ; WX 600 ; N eth ; B 102 -15 639 629 ; C -1 ; WX 600 ; N zcaron ; B 99 0 624 669 ; C -1 ; WX 600 ; N ncommaaccent ; B 26 -250 585 441 ; C -1 ; WX 600 ; N onesuperior ; B 231 249 491 622 ; C -1 ; WX 600 ; N imacron ; B 95 0 543 565 ; C -1 ; WX 600 ; N Euro ; B 0 0 0 0 ; EndCharMetrics EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/pdfcorefonts/Courier.afm ================================================ StartFontMetrics 4.1 Comment Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Thu May 1 17:27:09 1997 Comment UniqueID 43050 Comment VMusage 39754 50779 FontName Courier FullName Courier FamilyName Courier Weight Medium ItalicAngle 0 IsFixedPitch true CharacterSet ExtendedRoman FontBBox -23 -250 715 805 UnderlinePosition -100 UnderlineThickness 50 Version 003.000 Notice Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. EncodingScheme AdobeStandardEncoding CapHeight 562 XHeight 426 Ascender 629 Descender -157 StdHW 51 StdVW 51 StartCharMetrics 315 C 32 ; WX 600 ; N space ; B 0 0 0 0 ; C 33 ; WX 600 ; N exclam ; B 236 -15 364 572 ; C 34 ; WX 600 ; N quotedbl ; B 187 328 413 562 ; C 35 ; WX 600 ; N numbersign ; B 93 -32 507 639 ; C 36 ; WX 600 ; N dollar ; B 105 -126 496 662 ; C 37 ; WX 600 ; N percent ; B 81 -15 518 622 ; C 38 ; WX 600 ; N ampersand ; B 63 -15 538 543 ; C 39 ; WX 600 ; N quoteright ; B 213 328 376 562 ; C 40 ; WX 600 ; N parenleft ; B 269 -108 440 622 ; C 41 ; WX 600 ; N parenright ; B 160 -108 331 622 ; C 42 ; WX 600 ; N asterisk ; B 116 257 484 607 ; C 43 ; WX 600 ; N plus ; B 80 44 520 470 ; C 44 ; WX 600 ; N comma ; B 181 -112 344 122 ; C 45 ; WX 600 ; N hyphen ; B 103 231 497 285 ; C 46 ; WX 600 ; N period ; B 229 -15 371 109 ; C 47 ; WX 600 ; N slash ; B 125 -80 475 629 ; C 48 ; WX 600 ; N zero ; B 106 -15 494 622 ; C 49 ; WX 600 ; N one ; B 96 0 505 622 ; C 50 ; WX 600 ; N two ; B 70 0 471 622 ; C 51 ; WX 600 ; N three ; B 75 -15 466 622 ; C 52 ; WX 600 ; N four ; B 78 0 500 622 ; C 53 ; WX 600 ; N five ; B 92 -15 497 607 ; C 54 ; WX 600 ; N six ; B 111 -15 497 622 ; C 55 ; WX 600 ; N seven ; B 82 0 483 607 ; C 56 ; WX 600 ; N eight ; B 102 -15 498 622 ; C 57 ; WX 600 ; N nine ; B 96 -15 489 622 ; C 58 ; WX 600 ; N colon ; B 229 -15 371 385 ; C 59 ; WX 600 ; N semicolon ; B 181 -112 371 385 ; C 60 ; WX 600 ; N less ; B 41 42 519 472 ; C 61 ; WX 600 ; N equal ; B 80 138 520 376 ; C 62 ; WX 600 ; N greater ; B 66 42 544 472 ; C 63 ; WX 600 ; N question ; B 129 -15 492 572 ; C 64 ; WX 600 ; N at ; B 77 -15 533 622 ; C 65 ; WX 600 ; N A ; B 3 0 597 562 ; C 66 ; WX 600 ; N B ; B 43 0 559 562 ; C 67 ; WX 600 ; N C ; B 41 -18 540 580 ; C 68 ; WX 600 ; N D ; B 43 0 574 562 ; C 69 ; WX 600 ; N E ; B 53 0 550 562 ; C 70 ; WX 600 ; N F ; B 53 0 545 562 ; C 71 ; WX 600 ; N G ; B 31 -18 575 580 ; C 72 ; WX 600 ; N H ; B 32 0 568 562 ; C 73 ; WX 600 ; N I ; B 96 0 504 562 ; C 74 ; WX 600 ; N J ; B 34 -18 566 562 ; C 75 ; WX 600 ; N K ; B 38 0 582 562 ; C 76 ; WX 600 ; N L ; B 47 0 554 562 ; C 77 ; WX 600 ; N M ; B 4 0 596 562 ; C 78 ; WX 600 ; N N ; B 7 -13 593 562 ; C 79 ; WX 600 ; N O ; B 43 -18 557 580 ; C 80 ; WX 600 ; N P ; B 79 0 558 562 ; C 81 ; WX 600 ; N Q ; B 43 -138 557 580 ; C 82 ; WX 600 ; N R ; B 38 0 588 562 ; C 83 ; WX 600 ; N S ; B 72 -20 529 580 ; C 84 ; WX 600 ; N T ; B 38 0 563 562 ; C 85 ; WX 600 ; N U ; B 17 -18 583 562 ; C 86 ; WX 600 ; N V ; B -4 -13 604 562 ; C 87 ; WX 600 ; N W ; B -3 -13 603 562 ; C 88 ; WX 600 ; N X ; B 23 0 577 562 ; C 89 ; WX 600 ; N Y ; B 24 0 576 562 ; C 90 ; WX 600 ; N Z ; B 86 0 514 562 ; C 91 ; WX 600 ; N bracketleft ; B 269 -108 442 622 ; C 92 ; WX 600 ; N backslash ; B 118 -80 482 629 ; C 93 ; WX 600 ; N bracketright ; B 158 -108 331 622 ; C 94 ; WX 600 ; N asciicircum ; B 94 354 506 622 ; C 95 ; WX 600 ; N underscore ; B 0 -125 600 -75 ; C 96 ; WX 600 ; N quoteleft ; B 224 328 387 562 ; C 97 ; WX 600 ; N a ; B 53 -15 559 441 ; C 98 ; WX 600 ; N b ; B 14 -15 575 629 ; C 99 ; WX 600 ; N c ; B 66 -15 529 441 ; C 100 ; WX 600 ; N d ; B 45 -15 591 629 ; C 101 ; WX 600 ; N e ; B 66 -15 548 441 ; C 102 ; WX 600 ; N f ; B 114 0 531 629 ; L i fi ; L l fl ; C 103 ; WX 600 ; N g ; B 45 -157 566 441 ; C 104 ; WX 600 ; N h ; B 18 0 582 629 ; C 105 ; WX 600 ; N i ; B 95 0 505 657 ; C 106 ; WX 600 ; N j ; B 82 -157 410 657 ; C 107 ; WX 600 ; N k ; B 43 0 580 629 ; C 108 ; WX 600 ; N l ; B 95 0 505 629 ; C 109 ; WX 600 ; N m ; B -5 0 605 441 ; C 110 ; WX 600 ; N n ; B 26 0 575 441 ; C 111 ; WX 600 ; N o ; B 62 -15 538 441 ; C 112 ; WX 600 ; N p ; B 9 -157 555 441 ; C 113 ; WX 600 ; N q ; B 45 -157 591 441 ; C 114 ; WX 600 ; N r ; B 60 0 559 441 ; C 115 ; WX 600 ; N s ; B 80 -15 513 441 ; C 116 ; WX 600 ; N t ; B 87 -15 530 561 ; C 117 ; WX 600 ; N u ; B 21 -15 562 426 ; C 118 ; WX 600 ; N v ; B 10 -10 590 426 ; C 119 ; WX 600 ; N w ; B -4 -10 604 426 ; C 120 ; WX 600 ; N x ; B 20 0 580 426 ; C 121 ; WX 600 ; N y ; B 7 -157 592 426 ; C 122 ; WX 600 ; N z ; B 99 0 502 426 ; C 123 ; WX 600 ; N braceleft ; B 182 -108 437 622 ; C 124 ; WX 600 ; N bar ; B 275 -250 326 750 ; C 125 ; WX 600 ; N braceright ; B 163 -108 418 622 ; C 126 ; WX 600 ; N asciitilde ; B 63 197 540 320 ; C 161 ; WX 600 ; N exclamdown ; B 236 -157 364 430 ; C 162 ; WX 600 ; N cent ; B 96 -49 500 614 ; C 163 ; WX 600 ; N sterling ; B 84 -21 521 611 ; C 164 ; WX 600 ; N fraction ; B 92 -57 509 665 ; C 165 ; WX 600 ; N yen ; B 26 0 574 562 ; C 166 ; WX 600 ; N florin ; B 4 -143 539 622 ; C 167 ; WX 600 ; N section ; B 113 -78 488 580 ; C 168 ; WX 600 ; N currency ; B 73 58 527 506 ; C 169 ; WX 600 ; N quotesingle ; B 259 328 341 562 ; C 170 ; WX 600 ; N quotedblleft ; B 143 328 471 562 ; C 171 ; WX 600 ; N guillemotleft ; B 37 70 563 446 ; C 172 ; WX 600 ; N guilsinglleft ; B 149 70 451 446 ; C 173 ; WX 600 ; N guilsinglright ; B 149 70 451 446 ; C 174 ; WX 600 ; N fi ; B 3 0 597 629 ; C 175 ; WX 600 ; N fl ; B 3 0 597 629 ; C 177 ; WX 600 ; N endash ; B 75 231 525 285 ; C 178 ; WX 600 ; N dagger ; B 141 -78 459 580 ; C 179 ; WX 600 ; N daggerdbl ; B 141 -78 459 580 ; C 180 ; WX 600 ; N periodcentered ; B 222 189 378 327 ; C 182 ; WX 600 ; N paragraph ; B 50 -78 511 562 ; C 183 ; WX 600 ; N bullet ; B 172 130 428 383 ; C 184 ; WX 600 ; N quotesinglbase ; B 213 -134 376 100 ; C 185 ; WX 600 ; N quotedblbase ; B 143 -134 457 100 ; C 186 ; WX 600 ; N quotedblright ; B 143 328 457 562 ; C 187 ; WX 600 ; N guillemotright ; B 37 70 563 446 ; C 188 ; WX 600 ; N ellipsis ; B 37 -15 563 111 ; C 189 ; WX 600 ; N perthousand ; B 3 -15 600 622 ; C 191 ; WX 600 ; N questiondown ; B 108 -157 471 430 ; C 193 ; WX 600 ; N grave ; B 151 497 378 672 ; C 194 ; WX 600 ; N acute ; B 242 497 469 672 ; C 195 ; WX 600 ; N circumflex ; B 124 477 476 654 ; C 196 ; WX 600 ; N tilde ; B 105 489 503 606 ; C 197 ; WX 600 ; N macron ; B 120 525 480 565 ; C 198 ; WX 600 ; N breve ; B 153 501 447 609 ; C 199 ; WX 600 ; N dotaccent ; B 249 537 352 640 ; C 200 ; WX 600 ; N dieresis ; B 148 537 453 640 ; C 202 ; WX 600 ; N ring ; B 218 463 382 627 ; C 203 ; WX 600 ; N cedilla ; B 224 -151 362 10 ; C 205 ; WX 600 ; N hungarumlaut ; B 133 497 540 672 ; C 206 ; WX 600 ; N ogonek ; B 211 -172 407 4 ; C 207 ; WX 600 ; N caron ; B 124 492 476 669 ; C 208 ; WX 600 ; N emdash ; B 0 231 600 285 ; C 225 ; WX 600 ; N AE ; B 3 0 550 562 ; C 227 ; WX 600 ; N ordfeminine ; B 156 249 442 580 ; C 232 ; WX 600 ; N Lslash ; B 47 0 554 562 ; C 233 ; WX 600 ; N Oslash ; B 43 -80 557 629 ; C 234 ; WX 600 ; N OE ; B 7 0 567 562 ; C 235 ; WX 600 ; N ordmasculine ; B 157 249 443 580 ; C 241 ; WX 600 ; N ae ; B 19 -15 570 441 ; C 245 ; WX 600 ; N dotlessi ; B 95 0 505 426 ; C 248 ; WX 600 ; N lslash ; B 95 0 505 629 ; C 249 ; WX 600 ; N oslash ; B 62 -80 538 506 ; C 250 ; WX 600 ; N oe ; B 19 -15 559 441 ; C 251 ; WX 600 ; N germandbls ; B 48 -15 588 629 ; C -1 ; WX 600 ; N Idieresis ; B 96 0 504 753 ; C -1 ; WX 600 ; N eacute ; B 66 -15 548 672 ; C -1 ; WX 600 ; N abreve ; B 53 -15 559 609 ; C -1 ; WX 600 ; N uhungarumlaut ; B 21 -15 580 672 ; C -1 ; WX 600 ; N ecaron ; B 66 -15 548 669 ; C -1 ; WX 600 ; N Ydieresis ; B 24 0 576 753 ; C -1 ; WX 600 ; N divide ; B 87 48 513 467 ; C -1 ; WX 600 ; N Yacute ; B 24 0 576 805 ; C -1 ; WX 600 ; N Acircumflex ; B 3 0 597 787 ; C -1 ; WX 600 ; N aacute ; B 53 -15 559 672 ; C -1 ; WX 600 ; N Ucircumflex ; B 17 -18 583 787 ; C -1 ; WX 600 ; N yacute ; B 7 -157 592 672 ; C -1 ; WX 600 ; N scommaaccent ; B 80 -250 513 441 ; C -1 ; WX 600 ; N ecircumflex ; B 66 -15 548 654 ; C -1 ; WX 600 ; N Uring ; B 17 -18 583 760 ; C -1 ; WX 600 ; N Udieresis ; B 17 -18 583 753 ; C -1 ; WX 600 ; N aogonek ; B 53 -172 587 441 ; C -1 ; WX 600 ; N Uacute ; B 17 -18 583 805 ; C -1 ; WX 600 ; N uogonek ; B 21 -172 590 426 ; C -1 ; WX 600 ; N Edieresis ; B 53 0 550 753 ; C -1 ; WX 600 ; N Dcroat ; B 30 0 574 562 ; C -1 ; WX 600 ; N commaaccent ; B 198 -250 335 -58 ; C -1 ; WX 600 ; N copyright ; B 0 -18 600 580 ; C -1 ; WX 600 ; N Emacron ; B 53 0 550 698 ; C -1 ; WX 600 ; N ccaron ; B 66 -15 529 669 ; C -1 ; WX 600 ; N aring ; B 53 -15 559 627 ; C -1 ; WX 600 ; N Ncommaaccent ; B 7 -250 593 562 ; C -1 ; WX 600 ; N lacute ; B 95 0 505 805 ; C -1 ; WX 600 ; N agrave ; B 53 -15 559 672 ; C -1 ; WX 600 ; N Tcommaaccent ; B 38 -250 563 562 ; C -1 ; WX 600 ; N Cacute ; B 41 -18 540 805 ; C -1 ; WX 600 ; N atilde ; B 53 -15 559 606 ; C -1 ; WX 600 ; N Edotaccent ; B 53 0 550 753 ; C -1 ; WX 600 ; N scaron ; B 80 -15 513 669 ; C -1 ; WX 600 ; N scedilla ; B 80 -151 513 441 ; C -1 ; WX 600 ; N iacute ; B 95 0 505 672 ; C -1 ; WX 600 ; N lozenge ; B 18 0 443 706 ; C -1 ; WX 600 ; N Rcaron ; B 38 0 588 802 ; C -1 ; WX 600 ; N Gcommaaccent ; B 31 -250 575 580 ; C -1 ; WX 600 ; N ucircumflex ; B 21 -15 562 654 ; C -1 ; WX 600 ; N acircumflex ; B 53 -15 559 654 ; C -1 ; WX 600 ; N Amacron ; B 3 0 597 698 ; C -1 ; WX 600 ; N rcaron ; B 60 0 559 669 ; C -1 ; WX 600 ; N ccedilla ; B 66 -151 529 441 ; C -1 ; WX 600 ; N Zdotaccent ; B 86 0 514 753 ; C -1 ; WX 600 ; N Thorn ; B 79 0 538 562 ; C -1 ; WX 600 ; N Omacron ; B 43 -18 557 698 ; C -1 ; WX 600 ; N Racute ; B 38 0 588 805 ; C -1 ; WX 600 ; N Sacute ; B 72 -20 529 805 ; C -1 ; WX 600 ; N dcaron ; B 45 -15 715 629 ; C -1 ; WX 600 ; N Umacron ; B 17 -18 583 698 ; C -1 ; WX 600 ; N uring ; B 21 -15 562 627 ; C -1 ; WX 600 ; N threesuperior ; B 155 240 406 622 ; C -1 ; WX 600 ; N Ograve ; B 43 -18 557 805 ; C -1 ; WX 600 ; N Agrave ; B 3 0 597 805 ; C -1 ; WX 600 ; N Abreve ; B 3 0 597 732 ; C -1 ; WX 600 ; N multiply ; B 87 43 515 470 ; C -1 ; WX 600 ; N uacute ; B 21 -15 562 672 ; C -1 ; WX 600 ; N Tcaron ; B 38 0 563 802 ; C -1 ; WX 600 ; N partialdiff ; B 17 -38 459 710 ; C -1 ; WX 600 ; N ydieresis ; B 7 -157 592 620 ; C -1 ; WX 600 ; N Nacute ; B 7 -13 593 805 ; C -1 ; WX 600 ; N icircumflex ; B 94 0 505 654 ; C -1 ; WX 600 ; N Ecircumflex ; B 53 0 550 787 ; C -1 ; WX 600 ; N adieresis ; B 53 -15 559 620 ; C -1 ; WX 600 ; N edieresis ; B 66 -15 548 620 ; C -1 ; WX 600 ; N cacute ; B 66 -15 529 672 ; C -1 ; WX 600 ; N nacute ; B 26 0 575 672 ; C -1 ; WX 600 ; N umacron ; B 21 -15 562 565 ; C -1 ; WX 600 ; N Ncaron ; B 7 -13 593 802 ; C -1 ; WX 600 ; N Iacute ; B 96 0 504 805 ; C -1 ; WX 600 ; N plusminus ; B 87 44 513 558 ; C -1 ; WX 600 ; N brokenbar ; B 275 -175 326 675 ; C -1 ; WX 600 ; N registered ; B 0 -18 600 580 ; C -1 ; WX 600 ; N Gbreve ; B 31 -18 575 732 ; C -1 ; WX 600 ; N Idotaccent ; B 96 0 504 753 ; C -1 ; WX 600 ; N summation ; B 15 -10 585 706 ; C -1 ; WX 600 ; N Egrave ; B 53 0 550 805 ; C -1 ; WX 600 ; N racute ; B 60 0 559 672 ; C -1 ; WX 600 ; N omacron ; B 62 -15 538 565 ; C -1 ; WX 600 ; N Zacute ; B 86 0 514 805 ; C -1 ; WX 600 ; N Zcaron ; B 86 0 514 802 ; C -1 ; WX 600 ; N greaterequal ; B 98 0 502 710 ; C -1 ; WX 600 ; N Eth ; B 30 0 574 562 ; C -1 ; WX 600 ; N Ccedilla ; B 41 -151 540 580 ; C -1 ; WX 600 ; N lcommaaccent ; B 95 -250 505 629 ; C -1 ; WX 600 ; N tcaron ; B 87 -15 530 717 ; C -1 ; WX 600 ; N eogonek ; B 66 -172 548 441 ; C -1 ; WX 600 ; N Uogonek ; B 17 -172 583 562 ; C -1 ; WX 600 ; N Aacute ; B 3 0 597 805 ; C -1 ; WX 600 ; N Adieresis ; B 3 0 597 753 ; C -1 ; WX 600 ; N egrave ; B 66 -15 548 672 ; C -1 ; WX 600 ; N zacute ; B 99 0 502 672 ; C -1 ; WX 600 ; N iogonek ; B 95 -172 505 657 ; C -1 ; WX 600 ; N Oacute ; B 43 -18 557 805 ; C -1 ; WX 600 ; N oacute ; B 62 -15 538 672 ; C -1 ; WX 600 ; N amacron ; B 53 -15 559 565 ; C -1 ; WX 600 ; N sacute ; B 80 -15 513 672 ; C -1 ; WX 600 ; N idieresis ; B 95 0 505 620 ; C -1 ; WX 600 ; N Ocircumflex ; B 43 -18 557 787 ; C -1 ; WX 600 ; N Ugrave ; B 17 -18 583 805 ; C -1 ; WX 600 ; N Delta ; B 6 0 598 688 ; C -1 ; WX 600 ; N thorn ; B -6 -157 555 629 ; C -1 ; WX 600 ; N twosuperior ; B 177 249 424 622 ; C -1 ; WX 600 ; N Odieresis ; B 43 -18 557 753 ; C -1 ; WX 600 ; N mu ; B 21 -157 562 426 ; C -1 ; WX 600 ; N igrave ; B 95 0 505 672 ; C -1 ; WX 600 ; N ohungarumlaut ; B 62 -15 580 672 ; C -1 ; WX 600 ; N Eogonek ; B 53 -172 561 562 ; C -1 ; WX 600 ; N dcroat ; B 45 -15 591 629 ; C -1 ; WX 600 ; N threequarters ; B 8 -56 593 666 ; C -1 ; WX 600 ; N Scedilla ; B 72 -151 529 580 ; C -1 ; WX 600 ; N lcaron ; B 95 0 533 629 ; C -1 ; WX 600 ; N Kcommaaccent ; B 38 -250 582 562 ; C -1 ; WX 600 ; N Lacute ; B 47 0 554 805 ; C -1 ; WX 600 ; N trademark ; B -23 263 623 562 ; C -1 ; WX 600 ; N edotaccent ; B 66 -15 548 620 ; C -1 ; WX 600 ; N Igrave ; B 96 0 504 805 ; C -1 ; WX 600 ; N Imacron ; B 96 0 504 698 ; C -1 ; WX 600 ; N Lcaron ; B 47 0 554 562 ; C -1 ; WX 600 ; N onehalf ; B 0 -57 611 665 ; C -1 ; WX 600 ; N lessequal ; B 98 0 502 710 ; C -1 ; WX 600 ; N ocircumflex ; B 62 -15 538 654 ; C -1 ; WX 600 ; N ntilde ; B 26 0 575 606 ; C -1 ; WX 600 ; N Uhungarumlaut ; B 17 -18 590 805 ; C -1 ; WX 600 ; N Eacute ; B 53 0 550 805 ; C -1 ; WX 600 ; N emacron ; B 66 -15 548 565 ; C -1 ; WX 600 ; N gbreve ; B 45 -157 566 609 ; C -1 ; WX 600 ; N onequarter ; B 0 -57 600 665 ; C -1 ; WX 600 ; N Scaron ; B 72 -20 529 802 ; C -1 ; WX 600 ; N Scommaaccent ; B 72 -250 529 580 ; C -1 ; WX 600 ; N Ohungarumlaut ; B 43 -18 580 805 ; C -1 ; WX 600 ; N degree ; B 123 269 477 622 ; C -1 ; WX 600 ; N ograve ; B 62 -15 538 672 ; C -1 ; WX 600 ; N Ccaron ; B 41 -18 540 802 ; C -1 ; WX 600 ; N ugrave ; B 21 -15 562 672 ; C -1 ; WX 600 ; N radical ; B 3 -15 597 792 ; C -1 ; WX 600 ; N Dcaron ; B 43 0 574 802 ; C -1 ; WX 600 ; N rcommaaccent ; B 60 -250 559 441 ; C -1 ; WX 600 ; N Ntilde ; B 7 -13 593 729 ; C -1 ; WX 600 ; N otilde ; B 62 -15 538 606 ; C -1 ; WX 600 ; N Rcommaaccent ; B 38 -250 588 562 ; C -1 ; WX 600 ; N Lcommaaccent ; B 47 -250 554 562 ; C -1 ; WX 600 ; N Atilde ; B 3 0 597 729 ; C -1 ; WX 600 ; N Aogonek ; B 3 -172 608 562 ; C -1 ; WX 600 ; N Aring ; B 3 0 597 750 ; C -1 ; WX 600 ; N Otilde ; B 43 -18 557 729 ; C -1 ; WX 600 ; N zdotaccent ; B 99 0 502 620 ; C -1 ; WX 600 ; N Ecaron ; B 53 0 550 802 ; C -1 ; WX 600 ; N Iogonek ; B 96 -172 504 562 ; C -1 ; WX 600 ; N kcommaaccent ; B 43 -250 580 629 ; C -1 ; WX 600 ; N minus ; B 80 232 520 283 ; C -1 ; WX 600 ; N Icircumflex ; B 96 0 504 787 ; C -1 ; WX 600 ; N ncaron ; B 26 0 575 669 ; C -1 ; WX 600 ; N tcommaaccent ; B 87 -250 530 561 ; C -1 ; WX 600 ; N logicalnot ; B 87 108 513 369 ; C -1 ; WX 600 ; N odieresis ; B 62 -15 538 620 ; C -1 ; WX 600 ; N udieresis ; B 21 -15 562 620 ; C -1 ; WX 600 ; N notequal ; B 15 -16 540 529 ; C -1 ; WX 600 ; N gcommaaccent ; B 45 -157 566 708 ; C -1 ; WX 600 ; N eth ; B 62 -15 538 629 ; C -1 ; WX 600 ; N zcaron ; B 99 0 502 669 ; C -1 ; WX 600 ; N ncommaaccent ; B 26 -250 575 441 ; C -1 ; WX 600 ; N onesuperior ; B 172 249 428 622 ; C -1 ; WX 600 ; N imacron ; B 95 0 505 565 ; C -1 ; WX 600 ; N Euro ; B 0 0 0 0 ; EndCharMetrics EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/pdfcorefonts/Helvetica-Bold.afm ================================================ StartFontMetrics 4.1 Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Thu May 1 12:43:52 1997 Comment UniqueID 43052 Comment VMusage 37169 48194 FontName Helvetica-Bold FullName Helvetica Bold FamilyName Helvetica Weight Bold ItalicAngle 0 IsFixedPitch false CharacterSet ExtendedRoman FontBBox -170 -228 1003 962 UnderlinePosition -100 UnderlineThickness 50 Version 002.000 Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 718 XHeight 532 Ascender 718 Descender -207 StdHW 118 StdVW 140 StartCharMetrics 315 C 32 ; WX 278 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 90 0 244 718 ; C 34 ; WX 474 ; N quotedbl ; B 98 447 376 718 ; C 35 ; WX 556 ; N numbersign ; B 18 0 538 698 ; C 36 ; WX 556 ; N dollar ; B 30 -115 523 775 ; C 37 ; WX 889 ; N percent ; B 28 -19 861 710 ; C 38 ; WX 722 ; N ampersand ; B 54 -19 701 718 ; C 39 ; WX 278 ; N quoteright ; B 69 445 209 718 ; C 40 ; WX 333 ; N parenleft ; B 35 -208 314 734 ; C 41 ; WX 333 ; N parenright ; B 19 -208 298 734 ; C 42 ; WX 389 ; N asterisk ; B 27 387 362 718 ; C 43 ; WX 584 ; N plus ; B 40 0 544 506 ; C 44 ; WX 278 ; N comma ; B 64 -168 214 146 ; C 45 ; WX 333 ; N hyphen ; B 27 215 306 345 ; C 46 ; WX 278 ; N period ; B 64 0 214 146 ; C 47 ; WX 278 ; N slash ; B -33 -19 311 737 ; C 48 ; WX 556 ; N zero ; B 32 -19 524 710 ; C 49 ; WX 556 ; N one ; B 69 0 378 710 ; C 50 ; WX 556 ; N two ; B 26 0 511 710 ; C 51 ; WX 556 ; N three ; B 27 -19 516 710 ; C 52 ; WX 556 ; N four ; B 27 0 526 710 ; C 53 ; WX 556 ; N five ; B 27 -19 516 698 ; C 54 ; WX 556 ; N six ; B 31 -19 520 710 ; C 55 ; WX 556 ; N seven ; B 25 0 528 698 ; C 56 ; WX 556 ; N eight ; B 32 -19 524 710 ; C 57 ; WX 556 ; N nine ; B 30 -19 522 710 ; C 58 ; WX 333 ; N colon ; B 92 0 242 512 ; C 59 ; WX 333 ; N semicolon ; B 92 -168 242 512 ; C 60 ; WX 584 ; N less ; B 38 -8 546 514 ; C 61 ; WX 584 ; N equal ; B 40 87 544 419 ; C 62 ; WX 584 ; N greater ; B 38 -8 546 514 ; C 63 ; WX 611 ; N question ; B 60 0 556 727 ; C 64 ; WX 975 ; N at ; B 118 -19 856 737 ; C 65 ; WX 722 ; N A ; B 20 0 702 718 ; C 66 ; WX 722 ; N B ; B 76 0 669 718 ; C 67 ; WX 722 ; N C ; B 44 -19 684 737 ; C 68 ; WX 722 ; N D ; B 76 0 685 718 ; C 69 ; WX 667 ; N E ; B 76 0 621 718 ; C 70 ; WX 611 ; N F ; B 76 0 587 718 ; C 71 ; WX 778 ; N G ; B 44 -19 713 737 ; C 72 ; WX 722 ; N H ; B 71 0 651 718 ; C 73 ; WX 278 ; N I ; B 64 0 214 718 ; C 74 ; WX 556 ; N J ; B 22 -18 484 718 ; C 75 ; WX 722 ; N K ; B 87 0 722 718 ; C 76 ; WX 611 ; N L ; B 76 0 583 718 ; C 77 ; WX 833 ; N M ; B 69 0 765 718 ; C 78 ; WX 722 ; N N ; B 69 0 654 718 ; C 79 ; WX 778 ; N O ; B 44 -19 734 737 ; C 80 ; WX 667 ; N P ; B 76 0 627 718 ; C 81 ; WX 778 ; N Q ; B 44 -52 737 737 ; C 82 ; WX 722 ; N R ; B 76 0 677 718 ; C 83 ; WX 667 ; N S ; B 39 -19 629 737 ; C 84 ; WX 611 ; N T ; B 14 0 598 718 ; C 85 ; WX 722 ; N U ; B 72 -19 651 718 ; C 86 ; WX 667 ; N V ; B 19 0 648 718 ; C 87 ; WX 944 ; N W ; B 16 0 929 718 ; C 88 ; WX 667 ; N X ; B 14 0 653 718 ; C 89 ; WX 667 ; N Y ; B 15 0 653 718 ; C 90 ; WX 611 ; N Z ; B 25 0 586 718 ; C 91 ; WX 333 ; N bracketleft ; B 63 -196 309 722 ; C 92 ; WX 278 ; N backslash ; B -33 -19 311 737 ; C 93 ; WX 333 ; N bracketright ; B 24 -196 270 722 ; C 94 ; WX 584 ; N asciicircum ; B 62 323 522 698 ; C 95 ; WX 556 ; N underscore ; B 0 -125 556 -75 ; C 96 ; WX 278 ; N quoteleft ; B 69 454 209 727 ; C 97 ; WX 556 ; N a ; B 29 -14 527 546 ; C 98 ; WX 611 ; N b ; B 61 -14 578 718 ; C 99 ; WX 556 ; N c ; B 34 -14 524 546 ; C 100 ; WX 611 ; N d ; B 34 -14 551 718 ; C 101 ; WX 556 ; N e ; B 23 -14 528 546 ; C 102 ; WX 333 ; N f ; B 10 0 318 727 ; L i fi ; L l fl ; C 103 ; WX 611 ; N g ; B 40 -217 553 546 ; C 104 ; WX 611 ; N h ; B 65 0 546 718 ; C 105 ; WX 278 ; N i ; B 69 0 209 725 ; C 106 ; WX 278 ; N j ; B 3 -214 209 725 ; C 107 ; WX 556 ; N k ; B 69 0 562 718 ; C 108 ; WX 278 ; N l ; B 69 0 209 718 ; C 109 ; WX 889 ; N m ; B 64 0 826 546 ; C 110 ; WX 611 ; N n ; B 65 0 546 546 ; C 111 ; WX 611 ; N o ; B 34 -14 578 546 ; C 112 ; WX 611 ; N p ; B 62 -207 578 546 ; C 113 ; WX 611 ; N q ; B 34 -207 552 546 ; C 114 ; WX 389 ; N r ; B 64 0 373 546 ; C 115 ; WX 556 ; N s ; B 30 -14 519 546 ; C 116 ; WX 333 ; N t ; B 10 -6 309 676 ; C 117 ; WX 611 ; N u ; B 66 -14 545 532 ; C 118 ; WX 556 ; N v ; B 13 0 543 532 ; C 119 ; WX 778 ; N w ; B 10 0 769 532 ; C 120 ; WX 556 ; N x ; B 15 0 541 532 ; C 121 ; WX 556 ; N y ; B 10 -214 539 532 ; C 122 ; WX 500 ; N z ; B 20 0 480 532 ; C 123 ; WX 389 ; N braceleft ; B 48 -196 365 722 ; C 124 ; WX 280 ; N bar ; B 84 -225 196 775 ; C 125 ; WX 389 ; N braceright ; B 24 -196 341 722 ; C 126 ; WX 584 ; N asciitilde ; B 61 163 523 343 ; C 161 ; WX 333 ; N exclamdown ; B 90 -186 244 532 ; C 162 ; WX 556 ; N cent ; B 34 -118 524 628 ; C 163 ; WX 556 ; N sterling ; B 28 -16 541 718 ; C 164 ; WX 167 ; N fraction ; B -170 -19 336 710 ; C 165 ; WX 556 ; N yen ; B -9 0 565 698 ; C 166 ; WX 556 ; N florin ; B -10 -210 516 737 ; C 167 ; WX 556 ; N section ; B 34 -184 522 727 ; C 168 ; WX 556 ; N currency ; B -3 76 559 636 ; C 169 ; WX 238 ; N quotesingle ; B 70 447 168 718 ; C 170 ; WX 500 ; N quotedblleft ; B 64 454 436 727 ; C 171 ; WX 556 ; N guillemotleft ; B 88 76 468 484 ; C 172 ; WX 333 ; N guilsinglleft ; B 83 76 250 484 ; C 173 ; WX 333 ; N guilsinglright ; B 83 76 250 484 ; C 174 ; WX 611 ; N fi ; B 10 0 542 727 ; C 175 ; WX 611 ; N fl ; B 10 0 542 727 ; C 177 ; WX 556 ; N endash ; B 0 227 556 333 ; C 178 ; WX 556 ; N dagger ; B 36 -171 520 718 ; C 179 ; WX 556 ; N daggerdbl ; B 36 -171 520 718 ; C 180 ; WX 278 ; N periodcentered ; B 58 172 220 334 ; C 182 ; WX 556 ; N paragraph ; B -8 -191 539 700 ; C 183 ; WX 350 ; N bullet ; B 10 194 340 524 ; C 184 ; WX 278 ; N quotesinglbase ; B 69 -146 209 127 ; C 185 ; WX 500 ; N quotedblbase ; B 64 -146 436 127 ; C 186 ; WX 500 ; N quotedblright ; B 64 445 436 718 ; C 187 ; WX 556 ; N guillemotright ; B 88 76 468 484 ; C 188 ; WX 1000 ; N ellipsis ; B 92 0 908 146 ; C 189 ; WX 1000 ; N perthousand ; B -3 -19 1003 710 ; C 191 ; WX 611 ; N questiondown ; B 55 -195 551 532 ; C 193 ; WX 333 ; N grave ; B -23 604 225 750 ; C 194 ; WX 333 ; N acute ; B 108 604 356 750 ; C 195 ; WX 333 ; N circumflex ; B -10 604 343 750 ; C 196 ; WX 333 ; N tilde ; B -17 610 350 737 ; C 197 ; WX 333 ; N macron ; B -6 604 339 678 ; C 198 ; WX 333 ; N breve ; B -2 604 335 750 ; C 199 ; WX 333 ; N dotaccent ; B 104 614 230 729 ; C 200 ; WX 333 ; N dieresis ; B 6 614 327 729 ; C 202 ; WX 333 ; N ring ; B 59 568 275 776 ; C 203 ; WX 333 ; N cedilla ; B 6 -228 245 0 ; C 205 ; WX 333 ; N hungarumlaut ; B 9 604 486 750 ; C 206 ; WX 333 ; N ogonek ; B 71 -228 304 0 ; C 207 ; WX 333 ; N caron ; B -10 604 343 750 ; C 208 ; WX 1000 ; N emdash ; B 0 227 1000 333 ; C 225 ; WX 1000 ; N AE ; B 5 0 954 718 ; C 227 ; WX 370 ; N ordfeminine ; B 22 401 347 737 ; C 232 ; WX 611 ; N Lslash ; B -20 0 583 718 ; C 233 ; WX 778 ; N Oslash ; B 33 -27 744 745 ; C 234 ; WX 1000 ; N OE ; B 37 -19 961 737 ; C 235 ; WX 365 ; N ordmasculine ; B 6 401 360 737 ; C 241 ; WX 889 ; N ae ; B 29 -14 858 546 ; C 245 ; WX 278 ; N dotlessi ; B 69 0 209 532 ; C 248 ; WX 278 ; N lslash ; B -18 0 296 718 ; C 249 ; WX 611 ; N oslash ; B 22 -29 589 560 ; C 250 ; WX 944 ; N oe ; B 34 -14 912 546 ; C 251 ; WX 611 ; N germandbls ; B 69 -14 579 731 ; C -1 ; WX 278 ; N Idieresis ; B -21 0 300 915 ; C -1 ; WX 556 ; N eacute ; B 23 -14 528 750 ; C -1 ; WX 556 ; N abreve ; B 29 -14 527 750 ; C -1 ; WX 611 ; N uhungarumlaut ; B 66 -14 625 750 ; C -1 ; WX 556 ; N ecaron ; B 23 -14 528 750 ; C -1 ; WX 667 ; N Ydieresis ; B 15 0 653 915 ; C -1 ; WX 584 ; N divide ; B 40 -42 544 548 ; C -1 ; WX 667 ; N Yacute ; B 15 0 653 936 ; C -1 ; WX 722 ; N Acircumflex ; B 20 0 702 936 ; C -1 ; WX 556 ; N aacute ; B 29 -14 527 750 ; C -1 ; WX 722 ; N Ucircumflex ; B 72 -19 651 936 ; C -1 ; WX 556 ; N yacute ; B 10 -214 539 750 ; C -1 ; WX 556 ; N scommaaccent ; B 30 -228 519 546 ; C -1 ; WX 556 ; N ecircumflex ; B 23 -14 528 750 ; C -1 ; WX 722 ; N Uring ; B 72 -19 651 962 ; C -1 ; WX 722 ; N Udieresis ; B 72 -19 651 915 ; C -1 ; WX 556 ; N aogonek ; B 29 -224 545 546 ; C -1 ; WX 722 ; N Uacute ; B 72 -19 651 936 ; C -1 ; WX 611 ; N uogonek ; B 66 -228 545 532 ; C -1 ; WX 667 ; N Edieresis ; B 76 0 621 915 ; C -1 ; WX 722 ; N Dcroat ; B -5 0 685 718 ; C -1 ; WX 250 ; N commaaccent ; B 64 -228 199 -50 ; C -1 ; WX 737 ; N copyright ; B -11 -19 749 737 ; C -1 ; WX 667 ; N Emacron ; B 76 0 621 864 ; C -1 ; WX 556 ; N ccaron ; B 34 -14 524 750 ; C -1 ; WX 556 ; N aring ; B 29 -14 527 776 ; C -1 ; WX 722 ; N Ncommaaccent ; B 69 -228 654 718 ; C -1 ; WX 278 ; N lacute ; B 69 0 329 936 ; C -1 ; WX 556 ; N agrave ; B 29 -14 527 750 ; C -1 ; WX 611 ; N Tcommaaccent ; B 14 -228 598 718 ; C -1 ; WX 722 ; N Cacute ; B 44 -19 684 936 ; C -1 ; WX 556 ; N atilde ; B 29 -14 527 737 ; C -1 ; WX 667 ; N Edotaccent ; B 76 0 621 915 ; C -1 ; WX 556 ; N scaron ; B 30 -14 519 750 ; C -1 ; WX 556 ; N scedilla ; B 30 -228 519 546 ; C -1 ; WX 278 ; N iacute ; B 69 0 329 750 ; C -1 ; WX 494 ; N lozenge ; B 10 0 484 745 ; C -1 ; WX 722 ; N Rcaron ; B 76 0 677 936 ; C -1 ; WX 778 ; N Gcommaaccent ; B 44 -228 713 737 ; C -1 ; WX 611 ; N ucircumflex ; B 66 -14 545 750 ; C -1 ; WX 556 ; N acircumflex ; B 29 -14 527 750 ; C -1 ; WX 722 ; N Amacron ; B 20 0 702 864 ; C -1 ; WX 389 ; N rcaron ; B 18 0 373 750 ; C -1 ; WX 556 ; N ccedilla ; B 34 -228 524 546 ; C -1 ; WX 611 ; N Zdotaccent ; B 25 0 586 915 ; C -1 ; WX 667 ; N Thorn ; B 76 0 627 718 ; C -1 ; WX 778 ; N Omacron ; B 44 -19 734 864 ; C -1 ; WX 722 ; N Racute ; B 76 0 677 936 ; C -1 ; WX 667 ; N Sacute ; B 39 -19 629 936 ; C -1 ; WX 743 ; N dcaron ; B 34 -14 750 718 ; C -1 ; WX 722 ; N Umacron ; B 72 -19 651 864 ; C -1 ; WX 611 ; N uring ; B 66 -14 545 776 ; C -1 ; WX 333 ; N threesuperior ; B 8 271 326 710 ; C -1 ; WX 778 ; N Ograve ; B 44 -19 734 936 ; C -1 ; WX 722 ; N Agrave ; B 20 0 702 936 ; C -1 ; WX 722 ; N Abreve ; B 20 0 702 936 ; C -1 ; WX 584 ; N multiply ; B 40 1 545 505 ; C -1 ; WX 611 ; N uacute ; B 66 -14 545 750 ; C -1 ; WX 611 ; N Tcaron ; B 14 0 598 936 ; C -1 ; WX 494 ; N partialdiff ; B 11 -21 494 750 ; C -1 ; WX 556 ; N ydieresis ; B 10 -214 539 729 ; C -1 ; WX 722 ; N Nacute ; B 69 0 654 936 ; C -1 ; WX 278 ; N icircumflex ; B -37 0 316 750 ; C -1 ; WX 667 ; N Ecircumflex ; B 76 0 621 936 ; C -1 ; WX 556 ; N adieresis ; B 29 -14 527 729 ; C -1 ; WX 556 ; N edieresis ; B 23 -14 528 729 ; C -1 ; WX 556 ; N cacute ; B 34 -14 524 750 ; C -1 ; WX 611 ; N nacute ; B 65 0 546 750 ; C -1 ; WX 611 ; N umacron ; B 66 -14 545 678 ; C -1 ; WX 722 ; N Ncaron ; B 69 0 654 936 ; C -1 ; WX 278 ; N Iacute ; B 64 0 329 936 ; C -1 ; WX 584 ; N plusminus ; B 40 0 544 506 ; C -1 ; WX 280 ; N brokenbar ; B 84 -150 196 700 ; C -1 ; WX 737 ; N registered ; B -11 -19 748 737 ; C -1 ; WX 778 ; N Gbreve ; B 44 -19 713 936 ; C -1 ; WX 278 ; N Idotaccent ; B 64 0 214 915 ; C -1 ; WX 600 ; N summation ; B 14 -10 585 706 ; C -1 ; WX 667 ; N Egrave ; B 76 0 621 936 ; C -1 ; WX 389 ; N racute ; B 64 0 384 750 ; C -1 ; WX 611 ; N omacron ; B 34 -14 578 678 ; C -1 ; WX 611 ; N Zacute ; B 25 0 586 936 ; C -1 ; WX 611 ; N Zcaron ; B 25 0 586 936 ; C -1 ; WX 549 ; N greaterequal ; B 26 0 523 704 ; C -1 ; WX 722 ; N Eth ; B -5 0 685 718 ; C -1 ; WX 722 ; N Ccedilla ; B 44 -228 684 737 ; C -1 ; WX 278 ; N lcommaaccent ; B 69 -228 213 718 ; C -1 ; WX 389 ; N tcaron ; B 10 -6 421 878 ; C -1 ; WX 556 ; N eogonek ; B 23 -228 528 546 ; C -1 ; WX 722 ; N Uogonek ; B 72 -228 651 718 ; C -1 ; WX 722 ; N Aacute ; B 20 0 702 936 ; C -1 ; WX 722 ; N Adieresis ; B 20 0 702 915 ; C -1 ; WX 556 ; N egrave ; B 23 -14 528 750 ; C -1 ; WX 500 ; N zacute ; B 20 0 480 750 ; C -1 ; WX 278 ; N iogonek ; B 16 -224 249 725 ; C -1 ; WX 778 ; N Oacute ; B 44 -19 734 936 ; C -1 ; WX 611 ; N oacute ; B 34 -14 578 750 ; C -1 ; WX 556 ; N amacron ; B 29 -14 527 678 ; C -1 ; WX 556 ; N sacute ; B 30 -14 519 750 ; C -1 ; WX 278 ; N idieresis ; B -21 0 300 729 ; C -1 ; WX 778 ; N Ocircumflex ; B 44 -19 734 936 ; C -1 ; WX 722 ; N Ugrave ; B 72 -19 651 936 ; C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; C -1 ; WX 611 ; N thorn ; B 62 -208 578 718 ; C -1 ; WX 333 ; N twosuperior ; B 9 283 324 710 ; C -1 ; WX 778 ; N Odieresis ; B 44 -19 734 915 ; C -1 ; WX 611 ; N mu ; B 66 -207 545 532 ; C -1 ; WX 278 ; N igrave ; B -50 0 209 750 ; C -1 ; WX 611 ; N ohungarumlaut ; B 34 -14 625 750 ; C -1 ; WX 667 ; N Eogonek ; B 76 -224 639 718 ; C -1 ; WX 611 ; N dcroat ; B 34 -14 650 718 ; C -1 ; WX 834 ; N threequarters ; B 16 -19 799 710 ; C -1 ; WX 667 ; N Scedilla ; B 39 -228 629 737 ; C -1 ; WX 400 ; N lcaron ; B 69 0 408 718 ; C -1 ; WX 722 ; N Kcommaaccent ; B 87 -228 722 718 ; C -1 ; WX 611 ; N Lacute ; B 76 0 583 936 ; C -1 ; WX 1000 ; N trademark ; B 44 306 956 718 ; C -1 ; WX 556 ; N edotaccent ; B 23 -14 528 729 ; C -1 ; WX 278 ; N Igrave ; B -50 0 214 936 ; C -1 ; WX 278 ; N Imacron ; B -33 0 312 864 ; C -1 ; WX 611 ; N Lcaron ; B 76 0 583 718 ; C -1 ; WX 834 ; N onehalf ; B 26 -19 794 710 ; C -1 ; WX 549 ; N lessequal ; B 29 0 526 704 ; C -1 ; WX 611 ; N ocircumflex ; B 34 -14 578 750 ; C -1 ; WX 611 ; N ntilde ; B 65 0 546 737 ; C -1 ; WX 722 ; N Uhungarumlaut ; B 72 -19 681 936 ; C -1 ; WX 667 ; N Eacute ; B 76 0 621 936 ; C -1 ; WX 556 ; N emacron ; B 23 -14 528 678 ; C -1 ; WX 611 ; N gbreve ; B 40 -217 553 750 ; C -1 ; WX 834 ; N onequarter ; B 26 -19 766 710 ; C -1 ; WX 667 ; N Scaron ; B 39 -19 629 936 ; C -1 ; WX 667 ; N Scommaaccent ; B 39 -228 629 737 ; C -1 ; WX 778 ; N Ohungarumlaut ; B 44 -19 734 936 ; C -1 ; WX 400 ; N degree ; B 57 426 343 712 ; C -1 ; WX 611 ; N ograve ; B 34 -14 578 750 ; C -1 ; WX 722 ; N Ccaron ; B 44 -19 684 936 ; C -1 ; WX 611 ; N ugrave ; B 66 -14 545 750 ; C -1 ; WX 549 ; N radical ; B 10 -46 512 850 ; C -1 ; WX 722 ; N Dcaron ; B 76 0 685 936 ; C -1 ; WX 389 ; N rcommaaccent ; B 64 -228 373 546 ; C -1 ; WX 722 ; N Ntilde ; B 69 0 654 923 ; C -1 ; WX 611 ; N otilde ; B 34 -14 578 737 ; C -1 ; WX 722 ; N Rcommaaccent ; B 76 -228 677 718 ; C -1 ; WX 611 ; N Lcommaaccent ; B 76 -228 583 718 ; C -1 ; WX 722 ; N Atilde ; B 20 0 702 923 ; C -1 ; WX 722 ; N Aogonek ; B 20 -224 742 718 ; C -1 ; WX 722 ; N Aring ; B 20 0 702 962 ; C -1 ; WX 778 ; N Otilde ; B 44 -19 734 923 ; C -1 ; WX 500 ; N zdotaccent ; B 20 0 480 729 ; C -1 ; WX 667 ; N Ecaron ; B 76 0 621 936 ; C -1 ; WX 278 ; N Iogonek ; B -11 -228 222 718 ; C -1 ; WX 556 ; N kcommaaccent ; B 69 -228 562 718 ; C -1 ; WX 584 ; N minus ; B 40 197 544 309 ; C -1 ; WX 278 ; N Icircumflex ; B -37 0 316 936 ; C -1 ; WX 611 ; N ncaron ; B 65 0 546 750 ; C -1 ; WX 333 ; N tcommaaccent ; B 10 -228 309 676 ; C -1 ; WX 584 ; N logicalnot ; B 40 108 544 419 ; C -1 ; WX 611 ; N odieresis ; B 34 -14 578 729 ; C -1 ; WX 611 ; N udieresis ; B 66 -14 545 729 ; C -1 ; WX 549 ; N notequal ; B 15 -49 540 570 ; C -1 ; WX 611 ; N gcommaaccent ; B 40 -217 553 850 ; C -1 ; WX 611 ; N eth ; B 34 -14 578 737 ; C -1 ; WX 500 ; N zcaron ; B 20 0 480 750 ; C -1 ; WX 611 ; N ncommaaccent ; B 65 -228 546 546 ; C -1 ; WX 333 ; N onesuperior ; B 26 283 237 710 ; C -1 ; WX 278 ; N imacron ; B -8 0 285 678 ; C -1 ; WX 556 ; N Euro ; B 0 0 0 0 ; EndCharMetrics StartKernData StartKernPairs 2481 KPX A C -40 KPX A Cacute -40 KPX A Ccaron -40 KPX A Ccedilla -40 KPX A G -50 KPX A Gbreve -50 KPX A Gcommaaccent -50 KPX A O -40 KPX A Oacute -40 KPX A Ocircumflex -40 KPX A Odieresis -40 KPX A Ograve -40 KPX A Ohungarumlaut -40 KPX A Omacron -40 KPX A Oslash -40 KPX A Otilde -40 KPX A Q -40 KPX A T -90 KPX A Tcaron -90 KPX A Tcommaaccent -90 KPX A U -50 KPX A Uacute -50 KPX A Ucircumflex -50 KPX A Udieresis -50 KPX A Ugrave -50 KPX A Uhungarumlaut -50 KPX A Umacron -50 KPX A Uogonek -50 KPX A Uring -50 KPX A V -80 KPX A W -60 KPX A Y -110 KPX A Yacute -110 KPX A Ydieresis -110 KPX A u -30 KPX A uacute -30 KPX A ucircumflex -30 KPX A udieresis -30 KPX A ugrave -30 KPX A uhungarumlaut -30 KPX A umacron -30 KPX A uogonek -30 KPX A uring -30 KPX A v -40 KPX A w -30 KPX A y -30 KPX A yacute -30 KPX A ydieresis -30 KPX Aacute C -40 KPX Aacute Cacute -40 KPX Aacute Ccaron -40 KPX Aacute Ccedilla -40 KPX Aacute G -50 KPX Aacute Gbreve -50 KPX Aacute Gcommaaccent -50 KPX Aacute O -40 KPX Aacute Oacute -40 KPX Aacute Ocircumflex -40 KPX Aacute Odieresis -40 KPX Aacute Ograve -40 KPX Aacute Ohungarumlaut -40 KPX Aacute Omacron -40 KPX Aacute Oslash -40 KPX Aacute Otilde -40 KPX Aacute Q -40 KPX Aacute T -90 KPX Aacute Tcaron -90 KPX Aacute Tcommaaccent -90 KPX Aacute U -50 KPX Aacute Uacute -50 KPX Aacute Ucircumflex -50 KPX Aacute Udieresis -50 KPX Aacute Ugrave -50 KPX Aacute Uhungarumlaut -50 KPX Aacute Umacron -50 KPX Aacute Uogonek -50 KPX Aacute Uring -50 KPX Aacute V -80 KPX Aacute W -60 KPX Aacute Y -110 KPX Aacute Yacute -110 KPX Aacute Ydieresis -110 KPX Aacute u -30 KPX Aacute uacute -30 KPX Aacute ucircumflex -30 KPX Aacute udieresis -30 KPX Aacute ugrave -30 KPX Aacute uhungarumlaut -30 KPX Aacute umacron -30 KPX Aacute uogonek -30 KPX Aacute uring -30 KPX Aacute v -40 KPX Aacute w -30 KPX Aacute y -30 KPX Aacute yacute -30 KPX Aacute ydieresis -30 KPX Abreve C -40 KPX Abreve Cacute -40 KPX Abreve Ccaron -40 KPX Abreve Ccedilla -40 KPX Abreve G -50 KPX Abreve Gbreve -50 KPX Abreve Gcommaaccent -50 KPX Abreve O -40 KPX Abreve Oacute -40 KPX Abreve Ocircumflex -40 KPX Abreve Odieresis -40 KPX Abreve Ograve -40 KPX Abreve Ohungarumlaut -40 KPX Abreve Omacron -40 KPX Abreve Oslash -40 KPX Abreve Otilde -40 KPX Abreve Q -40 KPX Abreve T -90 KPX Abreve Tcaron -90 KPX Abreve Tcommaaccent -90 KPX Abreve U -50 KPX Abreve Uacute -50 KPX Abreve Ucircumflex -50 KPX Abreve Udieresis -50 KPX Abreve Ugrave -50 KPX Abreve Uhungarumlaut -50 KPX Abreve Umacron -50 KPX Abreve Uogonek -50 KPX Abreve Uring -50 KPX Abreve V -80 KPX Abreve W -60 KPX Abreve Y -110 KPX Abreve Yacute -110 KPX Abreve Ydieresis -110 KPX Abreve u -30 KPX Abreve uacute -30 KPX Abreve ucircumflex -30 KPX Abreve udieresis -30 KPX Abreve ugrave -30 KPX Abreve uhungarumlaut -30 KPX Abreve umacron -30 KPX Abreve uogonek -30 KPX Abreve uring -30 KPX Abreve v -40 KPX Abreve w -30 KPX Abreve y -30 KPX Abreve yacute -30 KPX Abreve ydieresis -30 KPX Acircumflex C -40 KPX Acircumflex Cacute -40 KPX Acircumflex Ccaron -40 KPX Acircumflex Ccedilla -40 KPX Acircumflex G -50 KPX Acircumflex Gbreve -50 KPX Acircumflex Gcommaaccent -50 KPX Acircumflex O -40 KPX Acircumflex Oacute -40 KPX Acircumflex Ocircumflex -40 KPX Acircumflex Odieresis -40 KPX Acircumflex Ograve -40 KPX Acircumflex Ohungarumlaut -40 KPX Acircumflex Omacron -40 KPX Acircumflex Oslash -40 KPX Acircumflex Otilde -40 KPX Acircumflex Q -40 KPX Acircumflex T -90 KPX Acircumflex Tcaron -90 KPX Acircumflex Tcommaaccent -90 KPX Acircumflex U -50 KPX Acircumflex Uacute -50 KPX Acircumflex Ucircumflex -50 KPX Acircumflex Udieresis -50 KPX Acircumflex Ugrave -50 KPX Acircumflex Uhungarumlaut -50 KPX Acircumflex Umacron -50 KPX Acircumflex Uogonek -50 KPX Acircumflex Uring -50 KPX Acircumflex V -80 KPX Acircumflex W -60 KPX Acircumflex Y -110 KPX Acircumflex Yacute -110 KPX Acircumflex Ydieresis -110 KPX Acircumflex u -30 KPX Acircumflex uacute -30 KPX Acircumflex ucircumflex -30 KPX Acircumflex udieresis -30 KPX Acircumflex ugrave -30 KPX Acircumflex uhungarumlaut -30 KPX Acircumflex umacron -30 KPX Acircumflex uogonek -30 KPX Acircumflex uring -30 KPX Acircumflex v -40 KPX Acircumflex w -30 KPX Acircumflex y -30 KPX Acircumflex yacute -30 KPX Acircumflex ydieresis -30 KPX Adieresis C -40 KPX Adieresis Cacute -40 KPX Adieresis Ccaron -40 KPX Adieresis Ccedilla -40 KPX Adieresis G -50 KPX Adieresis Gbreve -50 KPX Adieresis Gcommaaccent -50 KPX Adieresis O -40 KPX Adieresis Oacute -40 KPX Adieresis Ocircumflex -40 KPX Adieresis Odieresis -40 KPX Adieresis Ograve -40 KPX Adieresis Ohungarumlaut -40 KPX Adieresis Omacron -40 KPX Adieresis Oslash -40 KPX Adieresis Otilde -40 KPX Adieresis Q -40 KPX Adieresis T -90 KPX Adieresis Tcaron -90 KPX Adieresis Tcommaaccent -90 KPX Adieresis U -50 KPX Adieresis Uacute -50 KPX Adieresis Ucircumflex -50 KPX Adieresis Udieresis -50 KPX Adieresis Ugrave -50 KPX Adieresis Uhungarumlaut -50 KPX Adieresis Umacron -50 KPX Adieresis Uogonek -50 KPX Adieresis Uring -50 KPX Adieresis V -80 KPX Adieresis W -60 KPX Adieresis Y -110 KPX Adieresis Yacute -110 KPX Adieresis Ydieresis -110 KPX Adieresis u -30 KPX Adieresis uacute -30 KPX Adieresis ucircumflex -30 KPX Adieresis udieresis -30 KPX Adieresis ugrave -30 KPX Adieresis uhungarumlaut -30 KPX Adieresis umacron -30 KPX Adieresis uogonek -30 KPX Adieresis uring -30 KPX Adieresis v -40 KPX Adieresis w -30 KPX Adieresis y -30 KPX Adieresis yacute -30 KPX Adieresis ydieresis -30 KPX Agrave C -40 KPX Agrave Cacute -40 KPX Agrave Ccaron -40 KPX Agrave Ccedilla -40 KPX Agrave G -50 KPX Agrave Gbreve -50 KPX Agrave Gcommaaccent -50 KPX Agrave O -40 KPX Agrave Oacute -40 KPX Agrave Ocircumflex -40 KPX Agrave Odieresis -40 KPX Agrave Ograve -40 KPX Agrave Ohungarumlaut -40 KPX Agrave Omacron -40 KPX Agrave Oslash -40 KPX Agrave Otilde -40 KPX Agrave Q -40 KPX Agrave T -90 KPX Agrave Tcaron -90 KPX Agrave Tcommaaccent -90 KPX Agrave U -50 KPX Agrave Uacute -50 KPX Agrave Ucircumflex -50 KPX Agrave Udieresis -50 KPX Agrave Ugrave -50 KPX Agrave Uhungarumlaut -50 KPX Agrave Umacron -50 KPX Agrave Uogonek -50 KPX Agrave Uring -50 KPX Agrave V -80 KPX Agrave W -60 KPX Agrave Y -110 KPX Agrave Yacute -110 KPX Agrave Ydieresis -110 KPX Agrave u -30 KPX Agrave uacute -30 KPX Agrave ucircumflex -30 KPX Agrave udieresis -30 KPX Agrave ugrave -30 KPX Agrave uhungarumlaut -30 KPX Agrave umacron -30 KPX Agrave uogonek -30 KPX Agrave uring -30 KPX Agrave v -40 KPX Agrave w -30 KPX Agrave y -30 KPX Agrave yacute -30 KPX Agrave ydieresis -30 KPX Amacron C -40 KPX Amacron Cacute -40 KPX Amacron Ccaron -40 KPX Amacron Ccedilla -40 KPX Amacron G -50 KPX Amacron Gbreve -50 KPX Amacron Gcommaaccent -50 KPX Amacron O -40 KPX Amacron Oacute -40 KPX Amacron Ocircumflex -40 KPX Amacron Odieresis -40 KPX Amacron Ograve -40 KPX Amacron Ohungarumlaut -40 KPX Amacron Omacron -40 KPX Amacron Oslash -40 KPX Amacron Otilde -40 KPX Amacron Q -40 KPX Amacron T -90 KPX Amacron Tcaron -90 KPX Amacron Tcommaaccent -90 KPX Amacron U -50 KPX Amacron Uacute -50 KPX Amacron Ucircumflex -50 KPX Amacron Udieresis -50 KPX Amacron Ugrave -50 KPX Amacron Uhungarumlaut -50 KPX Amacron Umacron -50 KPX Amacron Uogonek -50 KPX Amacron Uring -50 KPX Amacron V -80 KPX Amacron W -60 KPX Amacron Y -110 KPX Amacron Yacute -110 KPX Amacron Ydieresis -110 KPX Amacron u -30 KPX Amacron uacute -30 KPX Amacron ucircumflex -30 KPX Amacron udieresis -30 KPX Amacron ugrave -30 KPX Amacron uhungarumlaut -30 KPX Amacron umacron -30 KPX Amacron uogonek -30 KPX Amacron uring -30 KPX Amacron v -40 KPX Amacron w -30 KPX Amacron y -30 KPX Amacron yacute -30 KPX Amacron ydieresis -30 KPX Aogonek C -40 KPX Aogonek Cacute -40 KPX Aogonek Ccaron -40 KPX Aogonek Ccedilla -40 KPX Aogonek G -50 KPX Aogonek Gbreve -50 KPX Aogonek Gcommaaccent -50 KPX Aogonek O -40 KPX Aogonek Oacute -40 KPX Aogonek Ocircumflex -40 KPX Aogonek Odieresis -40 KPX Aogonek Ograve -40 KPX Aogonek Ohungarumlaut -40 KPX Aogonek Omacron -40 KPX Aogonek Oslash -40 KPX Aogonek Otilde -40 KPX Aogonek Q -40 KPX Aogonek T -90 KPX Aogonek Tcaron -90 KPX Aogonek Tcommaaccent -90 KPX Aogonek U -50 KPX Aogonek Uacute -50 KPX Aogonek Ucircumflex -50 KPX Aogonek Udieresis -50 KPX Aogonek Ugrave -50 KPX Aogonek Uhungarumlaut -50 KPX Aogonek Umacron -50 KPX Aogonek Uogonek -50 KPX Aogonek Uring -50 KPX Aogonek V -80 KPX Aogonek W -60 KPX Aogonek Y -110 KPX Aogonek Yacute -110 KPX Aogonek Ydieresis -110 KPX Aogonek u -30 KPX Aogonek uacute -30 KPX Aogonek ucircumflex -30 KPX Aogonek udieresis -30 KPX Aogonek ugrave -30 KPX Aogonek uhungarumlaut -30 KPX Aogonek umacron -30 KPX Aogonek uogonek -30 KPX Aogonek uring -30 KPX Aogonek v -40 KPX Aogonek w -30 KPX Aogonek y -30 KPX Aogonek yacute -30 KPX Aogonek ydieresis -30 KPX Aring C -40 KPX Aring Cacute -40 KPX Aring Ccaron -40 KPX Aring Ccedilla -40 KPX Aring G -50 KPX Aring Gbreve -50 KPX Aring Gcommaaccent -50 KPX Aring O -40 KPX Aring Oacute -40 KPX Aring Ocircumflex -40 KPX Aring Odieresis -40 KPX Aring Ograve -40 KPX Aring Ohungarumlaut -40 KPX Aring Omacron -40 KPX Aring Oslash -40 KPX Aring Otilde -40 KPX Aring Q -40 KPX Aring T -90 KPX Aring Tcaron -90 KPX Aring Tcommaaccent -90 KPX Aring U -50 KPX Aring Uacute -50 KPX Aring Ucircumflex -50 KPX Aring Udieresis -50 KPX Aring Ugrave -50 KPX Aring Uhungarumlaut -50 KPX Aring Umacron -50 KPX Aring Uogonek -50 KPX Aring Uring -50 KPX Aring V -80 KPX Aring W -60 KPX Aring Y -110 KPX Aring Yacute -110 KPX Aring Ydieresis -110 KPX Aring u -30 KPX Aring uacute -30 KPX Aring ucircumflex -30 KPX Aring udieresis -30 KPX Aring ugrave -30 KPX Aring uhungarumlaut -30 KPX Aring umacron -30 KPX Aring uogonek -30 KPX Aring uring -30 KPX Aring v -40 KPX Aring w -30 KPX Aring y -30 KPX Aring yacute -30 KPX Aring ydieresis -30 KPX Atilde C -40 KPX Atilde Cacute -40 KPX Atilde Ccaron -40 KPX Atilde Ccedilla -40 KPX Atilde G -50 KPX Atilde Gbreve -50 KPX Atilde Gcommaaccent -50 KPX Atilde O -40 KPX Atilde Oacute -40 KPX Atilde Ocircumflex -40 KPX Atilde Odieresis -40 KPX Atilde Ograve -40 KPX Atilde Ohungarumlaut -40 KPX Atilde Omacron -40 KPX Atilde Oslash -40 KPX Atilde Otilde -40 KPX Atilde Q -40 KPX Atilde T -90 KPX Atilde Tcaron -90 KPX Atilde Tcommaaccent -90 KPX Atilde U -50 KPX Atilde Uacute -50 KPX Atilde Ucircumflex -50 KPX Atilde Udieresis -50 KPX Atilde Ugrave -50 KPX Atilde Uhungarumlaut -50 KPX Atilde Umacron -50 KPX Atilde Uogonek -50 KPX Atilde Uring -50 KPX Atilde V -80 KPX Atilde W -60 KPX Atilde Y -110 KPX Atilde Yacute -110 KPX Atilde Ydieresis -110 KPX Atilde u -30 KPX Atilde uacute -30 KPX Atilde ucircumflex -30 KPX Atilde udieresis -30 KPX Atilde ugrave -30 KPX Atilde uhungarumlaut -30 KPX Atilde umacron -30 KPX Atilde uogonek -30 KPX Atilde uring -30 KPX Atilde v -40 KPX Atilde w -30 KPX Atilde y -30 KPX Atilde yacute -30 KPX Atilde ydieresis -30 KPX B A -30 KPX B Aacute -30 KPX B Abreve -30 KPX B Acircumflex -30 KPX B Adieresis -30 KPX B Agrave -30 KPX B Amacron -30 KPX B Aogonek -30 KPX B Aring -30 KPX B Atilde -30 KPX B U -10 KPX B Uacute -10 KPX B Ucircumflex -10 KPX B Udieresis -10 KPX B Ugrave -10 KPX B Uhungarumlaut -10 KPX B Umacron -10 KPX B Uogonek -10 KPX B Uring -10 KPX D A -40 KPX D Aacute -40 KPX D Abreve -40 KPX D Acircumflex -40 KPX D Adieresis -40 KPX D Agrave -40 KPX D Amacron -40 KPX D Aogonek -40 KPX D Aring -40 KPX D Atilde -40 KPX D V -40 KPX D W -40 KPX D Y -70 KPX D Yacute -70 KPX D Ydieresis -70 KPX D comma -30 KPX D period -30 KPX Dcaron A -40 KPX Dcaron Aacute -40 KPX Dcaron Abreve -40 KPX Dcaron Acircumflex -40 KPX Dcaron Adieresis -40 KPX Dcaron Agrave -40 KPX Dcaron Amacron -40 KPX Dcaron Aogonek -40 KPX Dcaron Aring -40 KPX Dcaron Atilde -40 KPX Dcaron V -40 KPX Dcaron W -40 KPX Dcaron Y -70 KPX Dcaron Yacute -70 KPX Dcaron Ydieresis -70 KPX Dcaron comma -30 KPX Dcaron period -30 KPX Dcroat A -40 KPX Dcroat Aacute -40 KPX Dcroat Abreve -40 KPX Dcroat Acircumflex -40 KPX Dcroat Adieresis -40 KPX Dcroat Agrave -40 KPX Dcroat Amacron -40 KPX Dcroat Aogonek -40 KPX Dcroat Aring -40 KPX Dcroat Atilde -40 KPX Dcroat V -40 KPX Dcroat W -40 KPX Dcroat Y -70 KPX Dcroat Yacute -70 KPX Dcroat Ydieresis -70 KPX Dcroat comma -30 KPX Dcroat period -30 KPX F A -80 KPX F Aacute -80 KPX F Abreve -80 KPX F Acircumflex -80 KPX F Adieresis -80 KPX F Agrave -80 KPX F Amacron -80 KPX F Aogonek -80 KPX F Aring -80 KPX F Atilde -80 KPX F a -20 KPX F aacute -20 KPX F abreve -20 KPX F acircumflex -20 KPX F adieresis -20 KPX F agrave -20 KPX F amacron -20 KPX F aogonek -20 KPX F aring -20 KPX F atilde -20 KPX F comma -100 KPX F period -100 KPX J A -20 KPX J Aacute -20 KPX J Abreve -20 KPX J Acircumflex -20 KPX J Adieresis -20 KPX J Agrave -20 KPX J Amacron -20 KPX J Aogonek -20 KPX J Aring -20 KPX J Atilde -20 KPX J comma -20 KPX J period -20 KPX J u -20 KPX J uacute -20 KPX J ucircumflex -20 KPX J udieresis -20 KPX J ugrave -20 KPX J uhungarumlaut -20 KPX J umacron -20 KPX J uogonek -20 KPX J uring -20 KPX K O -30 KPX K Oacute -30 KPX K Ocircumflex -30 KPX K Odieresis -30 KPX K Ograve -30 KPX K Ohungarumlaut -30 KPX K Omacron -30 KPX K Oslash -30 KPX K Otilde -30 KPX K e -15 KPX K eacute -15 KPX K ecaron -15 KPX K ecircumflex -15 KPX K edieresis -15 KPX K edotaccent -15 KPX K egrave -15 KPX K emacron -15 KPX K eogonek -15 KPX K o -35 KPX K oacute -35 KPX K ocircumflex -35 KPX K odieresis -35 KPX K ograve -35 KPX K ohungarumlaut -35 KPX K omacron -35 KPX K oslash -35 KPX K otilde -35 KPX K u -30 KPX K uacute -30 KPX K ucircumflex -30 KPX K udieresis -30 KPX K ugrave -30 KPX K uhungarumlaut -30 KPX K umacron -30 KPX K uogonek -30 KPX K uring -30 KPX K y -40 KPX K yacute -40 KPX K ydieresis -40 KPX Kcommaaccent O -30 KPX Kcommaaccent Oacute -30 KPX Kcommaaccent Ocircumflex -30 KPX Kcommaaccent Odieresis -30 KPX Kcommaaccent Ograve -30 KPX Kcommaaccent Ohungarumlaut -30 KPX Kcommaaccent Omacron -30 KPX Kcommaaccent Oslash -30 KPX Kcommaaccent Otilde -30 KPX Kcommaaccent e -15 KPX Kcommaaccent eacute -15 KPX Kcommaaccent ecaron -15 KPX Kcommaaccent ecircumflex -15 KPX Kcommaaccent edieresis -15 KPX Kcommaaccent edotaccent -15 KPX Kcommaaccent egrave -15 KPX Kcommaaccent emacron -15 KPX Kcommaaccent eogonek -15 KPX Kcommaaccent o -35 KPX Kcommaaccent oacute -35 KPX Kcommaaccent ocircumflex -35 KPX Kcommaaccent odieresis -35 KPX Kcommaaccent ograve -35 KPX Kcommaaccent ohungarumlaut -35 KPX Kcommaaccent omacron -35 KPX Kcommaaccent oslash -35 KPX Kcommaaccent otilde -35 KPX Kcommaaccent u -30 KPX Kcommaaccent uacute -30 KPX Kcommaaccent ucircumflex -30 KPX Kcommaaccent udieresis -30 KPX Kcommaaccent ugrave -30 KPX Kcommaaccent uhungarumlaut -30 KPX Kcommaaccent umacron -30 KPX Kcommaaccent uogonek -30 KPX Kcommaaccent uring -30 KPX Kcommaaccent y -40 KPX Kcommaaccent yacute -40 KPX Kcommaaccent ydieresis -40 KPX L T -90 KPX L Tcaron -90 KPX L Tcommaaccent -90 KPX L V -110 KPX L W -80 KPX L Y -120 KPX L Yacute -120 KPX L Ydieresis -120 KPX L quotedblright -140 KPX L quoteright -140 KPX L y -30 KPX L yacute -30 KPX L ydieresis -30 KPX Lacute T -90 KPX Lacute Tcaron -90 KPX Lacute Tcommaaccent -90 KPX Lacute V -110 KPX Lacute W -80 KPX Lacute Y -120 KPX Lacute Yacute -120 KPX Lacute Ydieresis -120 KPX Lacute quotedblright -140 KPX Lacute quoteright -140 KPX Lacute y -30 KPX Lacute yacute -30 KPX Lacute ydieresis -30 KPX Lcommaaccent T -90 KPX Lcommaaccent Tcaron -90 KPX Lcommaaccent Tcommaaccent -90 KPX Lcommaaccent V -110 KPX Lcommaaccent W -80 KPX Lcommaaccent Y -120 KPX Lcommaaccent Yacute -120 KPX Lcommaaccent Ydieresis -120 KPX Lcommaaccent quotedblright -140 KPX Lcommaaccent quoteright -140 KPX Lcommaaccent y -30 KPX Lcommaaccent yacute -30 KPX Lcommaaccent ydieresis -30 KPX Lslash T -90 KPX Lslash Tcaron -90 KPX Lslash Tcommaaccent -90 KPX Lslash V -110 KPX Lslash W -80 KPX Lslash Y -120 KPX Lslash Yacute -120 KPX Lslash Ydieresis -120 KPX Lslash quotedblright -140 KPX Lslash quoteright -140 KPX Lslash y -30 KPX Lslash yacute -30 KPX Lslash ydieresis -30 KPX O A -50 KPX O Aacute -50 KPX O Abreve -50 KPX O Acircumflex -50 KPX O Adieresis -50 KPX O Agrave -50 KPX O Amacron -50 KPX O Aogonek -50 KPX O Aring -50 KPX O Atilde -50 KPX O T -40 KPX O Tcaron -40 KPX O Tcommaaccent -40 KPX O V -50 KPX O W -50 KPX O X -50 KPX O Y -70 KPX O Yacute -70 KPX O Ydieresis -70 KPX O comma -40 KPX O period -40 KPX Oacute A -50 KPX Oacute Aacute -50 KPX Oacute Abreve -50 KPX Oacute Acircumflex -50 KPX Oacute Adieresis -50 KPX Oacute Agrave -50 KPX Oacute Amacron -50 KPX Oacute Aogonek -50 KPX Oacute Aring -50 KPX Oacute Atilde -50 KPX Oacute T -40 KPX Oacute Tcaron -40 KPX Oacute Tcommaaccent -40 KPX Oacute V -50 KPX Oacute W -50 KPX Oacute X -50 KPX Oacute Y -70 KPX Oacute Yacute -70 KPX Oacute Ydieresis -70 KPX Oacute comma -40 KPX Oacute period -40 KPX Ocircumflex A -50 KPX Ocircumflex Aacute -50 KPX Ocircumflex Abreve -50 KPX Ocircumflex Acircumflex -50 KPX Ocircumflex Adieresis -50 KPX Ocircumflex Agrave -50 KPX Ocircumflex Amacron -50 KPX Ocircumflex Aogonek -50 KPX Ocircumflex Aring -50 KPX Ocircumflex Atilde -50 KPX Ocircumflex T -40 KPX Ocircumflex Tcaron -40 KPX Ocircumflex Tcommaaccent -40 KPX Ocircumflex V -50 KPX Ocircumflex W -50 KPX Ocircumflex X -50 KPX Ocircumflex Y -70 KPX Ocircumflex Yacute -70 KPX Ocircumflex Ydieresis -70 KPX Ocircumflex comma -40 KPX Ocircumflex period -40 KPX Odieresis A -50 KPX Odieresis Aacute -50 KPX Odieresis Abreve -50 KPX Odieresis Acircumflex -50 KPX Odieresis Adieresis -50 KPX Odieresis Agrave -50 KPX Odieresis Amacron -50 KPX Odieresis Aogonek -50 KPX Odieresis Aring -50 KPX Odieresis Atilde -50 KPX Odieresis T -40 KPX Odieresis Tcaron -40 KPX Odieresis Tcommaaccent -40 KPX Odieresis V -50 KPX Odieresis W -50 KPX Odieresis X -50 KPX Odieresis Y -70 KPX Odieresis Yacute -70 KPX Odieresis Ydieresis -70 KPX Odieresis comma -40 KPX Odieresis period -40 KPX Ograve A -50 KPX Ograve Aacute -50 KPX Ograve Abreve -50 KPX Ograve Acircumflex -50 KPX Ograve Adieresis -50 KPX Ograve Agrave -50 KPX Ograve Amacron -50 KPX Ograve Aogonek -50 KPX Ograve Aring -50 KPX Ograve Atilde -50 KPX Ograve T -40 KPX Ograve Tcaron -40 KPX Ograve Tcommaaccent -40 KPX Ograve V -50 KPX Ograve W -50 KPX Ograve X -50 KPX Ograve Y -70 KPX Ograve Yacute -70 KPX Ograve Ydieresis -70 KPX Ograve comma -40 KPX Ograve period -40 KPX Ohungarumlaut A -50 KPX Ohungarumlaut Aacute -50 KPX Ohungarumlaut Abreve -50 KPX Ohungarumlaut Acircumflex -50 KPX Ohungarumlaut Adieresis -50 KPX Ohungarumlaut Agrave -50 KPX Ohungarumlaut Amacron -50 KPX Ohungarumlaut Aogonek -50 KPX Ohungarumlaut Aring -50 KPX Ohungarumlaut Atilde -50 KPX Ohungarumlaut T -40 KPX Ohungarumlaut Tcaron -40 KPX Ohungarumlaut Tcommaaccent -40 KPX Ohungarumlaut V -50 KPX Ohungarumlaut W -50 KPX Ohungarumlaut X -50 KPX Ohungarumlaut Y -70 KPX Ohungarumlaut Yacute -70 KPX Ohungarumlaut Ydieresis -70 KPX Ohungarumlaut comma -40 KPX Ohungarumlaut period -40 KPX Omacron A -50 KPX Omacron Aacute -50 KPX Omacron Abreve -50 KPX Omacron Acircumflex -50 KPX Omacron Adieresis -50 KPX Omacron Agrave -50 KPX Omacron Amacron -50 KPX Omacron Aogonek -50 KPX Omacron Aring -50 KPX Omacron Atilde -50 KPX Omacron T -40 KPX Omacron Tcaron -40 KPX Omacron Tcommaaccent -40 KPX Omacron V -50 KPX Omacron W -50 KPX Omacron X -50 KPX Omacron Y -70 KPX Omacron Yacute -70 KPX Omacron Ydieresis -70 KPX Omacron comma -40 KPX Omacron period -40 KPX Oslash A -50 KPX Oslash Aacute -50 KPX Oslash Abreve -50 KPX Oslash Acircumflex -50 KPX Oslash Adieresis -50 KPX Oslash Agrave -50 KPX Oslash Amacron -50 KPX Oslash Aogonek -50 KPX Oslash Aring -50 KPX Oslash Atilde -50 KPX Oslash T -40 KPX Oslash Tcaron -40 KPX Oslash Tcommaaccent -40 KPX Oslash V -50 KPX Oslash W -50 KPX Oslash X -50 KPX Oslash Y -70 KPX Oslash Yacute -70 KPX Oslash Ydieresis -70 KPX Oslash comma -40 KPX Oslash period -40 KPX Otilde A -50 KPX Otilde Aacute -50 KPX Otilde Abreve -50 KPX Otilde Acircumflex -50 KPX Otilde Adieresis -50 KPX Otilde Agrave -50 KPX Otilde Amacron -50 KPX Otilde Aogonek -50 KPX Otilde Aring -50 KPX Otilde Atilde -50 KPX Otilde T -40 KPX Otilde Tcaron -40 KPX Otilde Tcommaaccent -40 KPX Otilde V -50 KPX Otilde W -50 KPX Otilde X -50 KPX Otilde Y -70 KPX Otilde Yacute -70 KPX Otilde Ydieresis -70 KPX Otilde comma -40 KPX Otilde period -40 KPX P A -100 KPX P Aacute -100 KPX P Abreve -100 KPX P Acircumflex -100 KPX P Adieresis -100 KPX P Agrave -100 KPX P Amacron -100 KPX P Aogonek -100 KPX P Aring -100 KPX P Atilde -100 KPX P a -30 KPX P aacute -30 KPX P abreve -30 KPX P acircumflex -30 KPX P adieresis -30 KPX P agrave -30 KPX P amacron -30 KPX P aogonek -30 KPX P aring -30 KPX P atilde -30 KPX P comma -120 KPX P e -30 KPX P eacute -30 KPX P ecaron -30 KPX P ecircumflex -30 KPX P edieresis -30 KPX P edotaccent -30 KPX P egrave -30 KPX P emacron -30 KPX P eogonek -30 KPX P o -40 KPX P oacute -40 KPX P ocircumflex -40 KPX P odieresis -40 KPX P ograve -40 KPX P ohungarumlaut -40 KPX P omacron -40 KPX P oslash -40 KPX P otilde -40 KPX P period -120 KPX Q U -10 KPX Q Uacute -10 KPX Q Ucircumflex -10 KPX Q Udieresis -10 KPX Q Ugrave -10 KPX Q Uhungarumlaut -10 KPX Q Umacron -10 KPX Q Uogonek -10 KPX Q Uring -10 KPX Q comma 20 KPX Q period 20 KPX R O -20 KPX R Oacute -20 KPX R Ocircumflex -20 KPX R Odieresis -20 KPX R Ograve -20 KPX R Ohungarumlaut -20 KPX R Omacron -20 KPX R Oslash -20 KPX R Otilde -20 KPX R T -20 KPX R Tcaron -20 KPX R Tcommaaccent -20 KPX R U -20 KPX R Uacute -20 KPX R Ucircumflex -20 KPX R Udieresis -20 KPX R Ugrave -20 KPX R Uhungarumlaut -20 KPX R Umacron -20 KPX R Uogonek -20 KPX R Uring -20 KPX R V -50 KPX R W -40 KPX R Y -50 KPX R Yacute -50 KPX R Ydieresis -50 KPX Racute O -20 KPX Racute Oacute -20 KPX Racute Ocircumflex -20 KPX Racute Odieresis -20 KPX Racute Ograve -20 KPX Racute Ohungarumlaut -20 KPX Racute Omacron -20 KPX Racute Oslash -20 KPX Racute Otilde -20 KPX Racute T -20 KPX Racute Tcaron -20 KPX Racute Tcommaaccent -20 KPX Racute U -20 KPX Racute Uacute -20 KPX Racute Ucircumflex -20 KPX Racute Udieresis -20 KPX Racute Ugrave -20 KPX Racute Uhungarumlaut -20 KPX Racute Umacron -20 KPX Racute Uogonek -20 KPX Racute Uring -20 KPX Racute V -50 KPX Racute W -40 KPX Racute Y -50 KPX Racute Yacute -50 KPX Racute Ydieresis -50 KPX Rcaron O -20 KPX Rcaron Oacute -20 KPX Rcaron Ocircumflex -20 KPX Rcaron Odieresis -20 KPX Rcaron Ograve -20 KPX Rcaron Ohungarumlaut -20 KPX Rcaron Omacron -20 KPX Rcaron Oslash -20 KPX Rcaron Otilde -20 KPX Rcaron T -20 KPX Rcaron Tcaron -20 KPX Rcaron Tcommaaccent -20 KPX Rcaron U -20 KPX Rcaron Uacute -20 KPX Rcaron Ucircumflex -20 KPX Rcaron Udieresis -20 KPX Rcaron Ugrave -20 KPX Rcaron Uhungarumlaut -20 KPX Rcaron Umacron -20 KPX Rcaron Uogonek -20 KPX Rcaron Uring -20 KPX Rcaron V -50 KPX Rcaron W -40 KPX Rcaron Y -50 KPX Rcaron Yacute -50 KPX Rcaron Ydieresis -50 KPX Rcommaaccent O -20 KPX Rcommaaccent Oacute -20 KPX Rcommaaccent Ocircumflex -20 KPX Rcommaaccent Odieresis -20 KPX Rcommaaccent Ograve -20 KPX Rcommaaccent Ohungarumlaut -20 KPX Rcommaaccent Omacron -20 KPX Rcommaaccent Oslash -20 KPX Rcommaaccent Otilde -20 KPX Rcommaaccent T -20 KPX Rcommaaccent Tcaron -20 KPX Rcommaaccent Tcommaaccent -20 KPX Rcommaaccent U -20 KPX Rcommaaccent Uacute -20 KPX Rcommaaccent Ucircumflex -20 KPX Rcommaaccent Udieresis -20 KPX Rcommaaccent Ugrave -20 KPX Rcommaaccent Uhungarumlaut -20 KPX Rcommaaccent Umacron -20 KPX Rcommaaccent Uogonek -20 KPX Rcommaaccent Uring -20 KPX Rcommaaccent V -50 KPX Rcommaaccent W -40 KPX Rcommaaccent Y -50 KPX Rcommaaccent Yacute -50 KPX Rcommaaccent Ydieresis -50 KPX T A -90 KPX T Aacute -90 KPX T Abreve -90 KPX T Acircumflex -90 KPX T Adieresis -90 KPX T Agrave -90 KPX T Amacron -90 KPX T Aogonek -90 KPX T Aring -90 KPX T Atilde -90 KPX T O -40 KPX T Oacute -40 KPX T Ocircumflex -40 KPX T Odieresis -40 KPX T Ograve -40 KPX T Ohungarumlaut -40 KPX T Omacron -40 KPX T Oslash -40 KPX T Otilde -40 KPX T a -80 KPX T aacute -80 KPX T abreve -80 KPX T acircumflex -80 KPX T adieresis -80 KPX T agrave -80 KPX T amacron -80 KPX T aogonek -80 KPX T aring -80 KPX T atilde -80 KPX T colon -40 KPX T comma -80 KPX T e -60 KPX T eacute -60 KPX T ecaron -60 KPX T ecircumflex -60 KPX T edieresis -60 KPX T edotaccent -60 KPX T egrave -60 KPX T emacron -60 KPX T eogonek -60 KPX T hyphen -120 KPX T o -80 KPX T oacute -80 KPX T ocircumflex -80 KPX T odieresis -80 KPX T ograve -80 KPX T ohungarumlaut -80 KPX T omacron -80 KPX T oslash -80 KPX T otilde -80 KPX T period -80 KPX T r -80 KPX T racute -80 KPX T rcommaaccent -80 KPX T semicolon -40 KPX T u -90 KPX T uacute -90 KPX T ucircumflex -90 KPX T udieresis -90 KPX T ugrave -90 KPX T uhungarumlaut -90 KPX T umacron -90 KPX T uogonek -90 KPX T uring -90 KPX T w -60 KPX T y -60 KPX T yacute -60 KPX T ydieresis -60 KPX Tcaron A -90 KPX Tcaron Aacute -90 KPX Tcaron Abreve -90 KPX Tcaron Acircumflex -90 KPX Tcaron Adieresis -90 KPX Tcaron Agrave -90 KPX Tcaron Amacron -90 KPX Tcaron Aogonek -90 KPX Tcaron Aring -90 KPX Tcaron Atilde -90 KPX Tcaron O -40 KPX Tcaron Oacute -40 KPX Tcaron Ocircumflex -40 KPX Tcaron Odieresis -40 KPX Tcaron Ograve -40 KPX Tcaron Ohungarumlaut -40 KPX Tcaron Omacron -40 KPX Tcaron Oslash -40 KPX Tcaron Otilde -40 KPX Tcaron a -80 KPX Tcaron aacute -80 KPX Tcaron abreve -80 KPX Tcaron acircumflex -80 KPX Tcaron adieresis -80 KPX Tcaron agrave -80 KPX Tcaron amacron -80 KPX Tcaron aogonek -80 KPX Tcaron aring -80 KPX Tcaron atilde -80 KPX Tcaron colon -40 KPX Tcaron comma -80 KPX Tcaron e -60 KPX Tcaron eacute -60 KPX Tcaron ecaron -60 KPX Tcaron ecircumflex -60 KPX Tcaron edieresis -60 KPX Tcaron edotaccent -60 KPX Tcaron egrave -60 KPX Tcaron emacron -60 KPX Tcaron eogonek -60 KPX Tcaron hyphen -120 KPX Tcaron o -80 KPX Tcaron oacute -80 KPX Tcaron ocircumflex -80 KPX Tcaron odieresis -80 KPX Tcaron ograve -80 KPX Tcaron ohungarumlaut -80 KPX Tcaron omacron -80 KPX Tcaron oslash -80 KPX Tcaron otilde -80 KPX Tcaron period -80 KPX Tcaron r -80 KPX Tcaron racute -80 KPX Tcaron rcommaaccent -80 KPX Tcaron semicolon -40 KPX Tcaron u -90 KPX Tcaron uacute -90 KPX Tcaron ucircumflex -90 KPX Tcaron udieresis -90 KPX Tcaron ugrave -90 KPX Tcaron uhungarumlaut -90 KPX Tcaron umacron -90 KPX Tcaron uogonek -90 KPX Tcaron uring -90 KPX Tcaron w -60 KPX Tcaron y -60 KPX Tcaron yacute -60 KPX Tcaron ydieresis -60 KPX Tcommaaccent A -90 KPX Tcommaaccent Aacute -90 KPX Tcommaaccent Abreve -90 KPX Tcommaaccent Acircumflex -90 KPX Tcommaaccent Adieresis -90 KPX Tcommaaccent Agrave -90 KPX Tcommaaccent Amacron -90 KPX Tcommaaccent Aogonek -90 KPX Tcommaaccent Aring -90 KPX Tcommaaccent Atilde -90 KPX Tcommaaccent O -40 KPX Tcommaaccent Oacute -40 KPX Tcommaaccent Ocircumflex -40 KPX Tcommaaccent Odieresis -40 KPX Tcommaaccent Ograve -40 KPX Tcommaaccent Ohungarumlaut -40 KPX Tcommaaccent Omacron -40 KPX Tcommaaccent Oslash -40 KPX Tcommaaccent Otilde -40 KPX Tcommaaccent a -80 KPX Tcommaaccent aacute -80 KPX Tcommaaccent abreve -80 KPX Tcommaaccent acircumflex -80 KPX Tcommaaccent adieresis -80 KPX Tcommaaccent agrave -80 KPX Tcommaaccent amacron -80 KPX Tcommaaccent aogonek -80 KPX Tcommaaccent aring -80 KPX Tcommaaccent atilde -80 KPX Tcommaaccent colon -40 KPX Tcommaaccent comma -80 KPX Tcommaaccent e -60 KPX Tcommaaccent eacute -60 KPX Tcommaaccent ecaron -60 KPX Tcommaaccent ecircumflex -60 KPX Tcommaaccent edieresis -60 KPX Tcommaaccent edotaccent -60 KPX Tcommaaccent egrave -60 KPX Tcommaaccent emacron -60 KPX Tcommaaccent eogonek -60 KPX Tcommaaccent hyphen -120 KPX Tcommaaccent o -80 KPX Tcommaaccent oacute -80 KPX Tcommaaccent ocircumflex -80 KPX Tcommaaccent odieresis -80 KPX Tcommaaccent ograve -80 KPX Tcommaaccent ohungarumlaut -80 KPX Tcommaaccent omacron -80 KPX Tcommaaccent oslash -80 KPX Tcommaaccent otilde -80 KPX Tcommaaccent period -80 KPX Tcommaaccent r -80 KPX Tcommaaccent racute -80 KPX Tcommaaccent rcommaaccent -80 KPX Tcommaaccent semicolon -40 KPX Tcommaaccent u -90 KPX Tcommaaccent uacute -90 KPX Tcommaaccent ucircumflex -90 KPX Tcommaaccent udieresis -90 KPX Tcommaaccent ugrave -90 KPX Tcommaaccent uhungarumlaut -90 KPX Tcommaaccent umacron -90 KPX Tcommaaccent uogonek -90 KPX Tcommaaccent uring -90 KPX Tcommaaccent w -60 KPX Tcommaaccent y -60 KPX Tcommaaccent yacute -60 KPX Tcommaaccent ydieresis -60 KPX U A -50 KPX U Aacute -50 KPX U Abreve -50 KPX U Acircumflex -50 KPX U Adieresis -50 KPX U Agrave -50 KPX U Amacron -50 KPX U Aogonek -50 KPX U Aring -50 KPX U Atilde -50 KPX U comma -30 KPX U period -30 KPX Uacute A -50 KPX Uacute Aacute -50 KPX Uacute Abreve -50 KPX Uacute Acircumflex -50 KPX Uacute Adieresis -50 KPX Uacute Agrave -50 KPX Uacute Amacron -50 KPX Uacute Aogonek -50 KPX Uacute Aring -50 KPX Uacute Atilde -50 KPX Uacute comma -30 KPX Uacute period -30 KPX Ucircumflex A -50 KPX Ucircumflex Aacute -50 KPX Ucircumflex Abreve -50 KPX Ucircumflex Acircumflex -50 KPX Ucircumflex Adieresis -50 KPX Ucircumflex Agrave -50 KPX Ucircumflex Amacron -50 KPX Ucircumflex Aogonek -50 KPX Ucircumflex Aring -50 KPX Ucircumflex Atilde -50 KPX Ucircumflex comma -30 KPX Ucircumflex period -30 KPX Udieresis A -50 KPX Udieresis Aacute -50 KPX Udieresis Abreve -50 KPX Udieresis Acircumflex -50 KPX Udieresis Adieresis -50 KPX Udieresis Agrave -50 KPX Udieresis Amacron -50 KPX Udieresis Aogonek -50 KPX Udieresis Aring -50 KPX Udieresis Atilde -50 KPX Udieresis comma -30 KPX Udieresis period -30 KPX Ugrave A -50 KPX Ugrave Aacute -50 KPX Ugrave Abreve -50 KPX Ugrave Acircumflex -50 KPX Ugrave Adieresis -50 KPX Ugrave Agrave -50 KPX Ugrave Amacron -50 KPX Ugrave Aogonek -50 KPX Ugrave Aring -50 KPX Ugrave Atilde -50 KPX Ugrave comma -30 KPX Ugrave period -30 KPX Uhungarumlaut A -50 KPX Uhungarumlaut Aacute -50 KPX Uhungarumlaut Abreve -50 KPX Uhungarumlaut Acircumflex -50 KPX Uhungarumlaut Adieresis -50 KPX Uhungarumlaut Agrave -50 KPX Uhungarumlaut Amacron -50 KPX Uhungarumlaut Aogonek -50 KPX Uhungarumlaut Aring -50 KPX Uhungarumlaut Atilde -50 KPX Uhungarumlaut comma -30 KPX Uhungarumlaut period -30 KPX Umacron A -50 KPX Umacron Aacute -50 KPX Umacron Abreve -50 KPX Umacron Acircumflex -50 KPX Umacron Adieresis -50 KPX Umacron Agrave -50 KPX Umacron Amacron -50 KPX Umacron Aogonek -50 KPX Umacron Aring -50 KPX Umacron Atilde -50 KPX Umacron comma -30 KPX Umacron period -30 KPX Uogonek A -50 KPX Uogonek Aacute -50 KPX Uogonek Abreve -50 KPX Uogonek Acircumflex -50 KPX Uogonek Adieresis -50 KPX Uogonek Agrave -50 KPX Uogonek Amacron -50 KPX Uogonek Aogonek -50 KPX Uogonek Aring -50 KPX Uogonek Atilde -50 KPX Uogonek comma -30 KPX Uogonek period -30 KPX Uring A -50 KPX Uring Aacute -50 KPX Uring Abreve -50 KPX Uring Acircumflex -50 KPX Uring Adieresis -50 KPX Uring Agrave -50 KPX Uring Amacron -50 KPX Uring Aogonek -50 KPX Uring Aring -50 KPX Uring Atilde -50 KPX Uring comma -30 KPX Uring period -30 KPX V A -80 KPX V Aacute -80 KPX V Abreve -80 KPX V Acircumflex -80 KPX V Adieresis -80 KPX V Agrave -80 KPX V Amacron -80 KPX V Aogonek -80 KPX V Aring -80 KPX V Atilde -80 KPX V G -50 KPX V Gbreve -50 KPX V Gcommaaccent -50 KPX V O -50 KPX V Oacute -50 KPX V Ocircumflex -50 KPX V Odieresis -50 KPX V Ograve -50 KPX V Ohungarumlaut -50 KPX V Omacron -50 KPX V Oslash -50 KPX V Otilde -50 KPX V a -60 KPX V aacute -60 KPX V abreve -60 KPX V acircumflex -60 KPX V adieresis -60 KPX V agrave -60 KPX V amacron -60 KPX V aogonek -60 KPX V aring -60 KPX V atilde -60 KPX V colon -40 KPX V comma -120 KPX V e -50 KPX V eacute -50 KPX V ecaron -50 KPX V ecircumflex -50 KPX V edieresis -50 KPX V edotaccent -50 KPX V egrave -50 KPX V emacron -50 KPX V eogonek -50 KPX V hyphen -80 KPX V o -90 KPX V oacute -90 KPX V ocircumflex -90 KPX V odieresis -90 KPX V ograve -90 KPX V ohungarumlaut -90 KPX V omacron -90 KPX V oslash -90 KPX V otilde -90 KPX V period -120 KPX V semicolon -40 KPX V u -60 KPX V uacute -60 KPX V ucircumflex -60 KPX V udieresis -60 KPX V ugrave -60 KPX V uhungarumlaut -60 KPX V umacron -60 KPX V uogonek -60 KPX V uring -60 KPX W A -60 KPX W Aacute -60 KPX W Abreve -60 KPX W Acircumflex -60 KPX W Adieresis -60 KPX W Agrave -60 KPX W Amacron -60 KPX W Aogonek -60 KPX W Aring -60 KPX W Atilde -60 KPX W O -20 KPX W Oacute -20 KPX W Ocircumflex -20 KPX W Odieresis -20 KPX W Ograve -20 KPX W Ohungarumlaut -20 KPX W Omacron -20 KPX W Oslash -20 KPX W Otilde -20 KPX W a -40 KPX W aacute -40 KPX W abreve -40 KPX W acircumflex -40 KPX W adieresis -40 KPX W agrave -40 KPX W amacron -40 KPX W aogonek -40 KPX W aring -40 KPX W atilde -40 KPX W colon -10 KPX W comma -80 KPX W e -35 KPX W eacute -35 KPX W ecaron -35 KPX W ecircumflex -35 KPX W edieresis -35 KPX W edotaccent -35 KPX W egrave -35 KPX W emacron -35 KPX W eogonek -35 KPX W hyphen -40 KPX W o -60 KPX W oacute -60 KPX W ocircumflex -60 KPX W odieresis -60 KPX W ograve -60 KPX W ohungarumlaut -60 KPX W omacron -60 KPX W oslash -60 KPX W otilde -60 KPX W period -80 KPX W semicolon -10 KPX W u -45 KPX W uacute -45 KPX W ucircumflex -45 KPX W udieresis -45 KPX W ugrave -45 KPX W uhungarumlaut -45 KPX W umacron -45 KPX W uogonek -45 KPX W uring -45 KPX W y -20 KPX W yacute -20 KPX W ydieresis -20 KPX Y A -110 KPX Y Aacute -110 KPX Y Abreve -110 KPX Y Acircumflex -110 KPX Y Adieresis -110 KPX Y Agrave -110 KPX Y Amacron -110 KPX Y Aogonek -110 KPX Y Aring -110 KPX Y Atilde -110 KPX Y O -70 KPX Y Oacute -70 KPX Y Ocircumflex -70 KPX Y Odieresis -70 KPX Y Ograve -70 KPX Y Ohungarumlaut -70 KPX Y Omacron -70 KPX Y Oslash -70 KPX Y Otilde -70 KPX Y a -90 KPX Y aacute -90 KPX Y abreve -90 KPX Y acircumflex -90 KPX Y adieresis -90 KPX Y agrave -90 KPX Y amacron -90 KPX Y aogonek -90 KPX Y aring -90 KPX Y atilde -90 KPX Y colon -50 KPX Y comma -100 KPX Y e -80 KPX Y eacute -80 KPX Y ecaron -80 KPX Y ecircumflex -80 KPX Y edieresis -80 KPX Y edotaccent -80 KPX Y egrave -80 KPX Y emacron -80 KPX Y eogonek -80 KPX Y o -100 KPX Y oacute -100 KPX Y ocircumflex -100 KPX Y odieresis -100 KPX Y ograve -100 KPX Y ohungarumlaut -100 KPX Y omacron -100 KPX Y oslash -100 KPX Y otilde -100 KPX Y period -100 KPX Y semicolon -50 KPX Y u -100 KPX Y uacute -100 KPX Y ucircumflex -100 KPX Y udieresis -100 KPX Y ugrave -100 KPX Y uhungarumlaut -100 KPX Y umacron -100 KPX Y uogonek -100 KPX Y uring -100 KPX Yacute A -110 KPX Yacute Aacute -110 KPX Yacute Abreve -110 KPX Yacute Acircumflex -110 KPX Yacute Adieresis -110 KPX Yacute Agrave -110 KPX Yacute Amacron -110 KPX Yacute Aogonek -110 KPX Yacute Aring -110 KPX Yacute Atilde -110 KPX Yacute O -70 KPX Yacute Oacute -70 KPX Yacute Ocircumflex -70 KPX Yacute Odieresis -70 KPX Yacute Ograve -70 KPX Yacute Ohungarumlaut -70 KPX Yacute Omacron -70 KPX Yacute Oslash -70 KPX Yacute Otilde -70 KPX Yacute a -90 KPX Yacute aacute -90 KPX Yacute abreve -90 KPX Yacute acircumflex -90 KPX Yacute adieresis -90 KPX Yacute agrave -90 KPX Yacute amacron -90 KPX Yacute aogonek -90 KPX Yacute aring -90 KPX Yacute atilde -90 KPX Yacute colon -50 KPX Yacute comma -100 KPX Yacute e -80 KPX Yacute eacute -80 KPX Yacute ecaron -80 KPX Yacute ecircumflex -80 KPX Yacute edieresis -80 KPX Yacute edotaccent -80 KPX Yacute egrave -80 KPX Yacute emacron -80 KPX Yacute eogonek -80 KPX Yacute o -100 KPX Yacute oacute -100 KPX Yacute ocircumflex -100 KPX Yacute odieresis -100 KPX Yacute ograve -100 KPX Yacute ohungarumlaut -100 KPX Yacute omacron -100 KPX Yacute oslash -100 KPX Yacute otilde -100 KPX Yacute period -100 KPX Yacute semicolon -50 KPX Yacute u -100 KPX Yacute uacute -100 KPX Yacute ucircumflex -100 KPX Yacute udieresis -100 KPX Yacute ugrave -100 KPX Yacute uhungarumlaut -100 KPX Yacute umacron -100 KPX Yacute uogonek -100 KPX Yacute uring -100 KPX Ydieresis A -110 KPX Ydieresis Aacute -110 KPX Ydieresis Abreve -110 KPX Ydieresis Acircumflex -110 KPX Ydieresis Adieresis -110 KPX Ydieresis Agrave -110 KPX Ydieresis Amacron -110 KPX Ydieresis Aogonek -110 KPX Ydieresis Aring -110 KPX Ydieresis Atilde -110 KPX Ydieresis O -70 KPX Ydieresis Oacute -70 KPX Ydieresis Ocircumflex -70 KPX Ydieresis Odieresis -70 KPX Ydieresis Ograve -70 KPX Ydieresis Ohungarumlaut -70 KPX Ydieresis Omacron -70 KPX Ydieresis Oslash -70 KPX Ydieresis Otilde -70 KPX Ydieresis a -90 KPX Ydieresis aacute -90 KPX Ydieresis abreve -90 KPX Ydieresis acircumflex -90 KPX Ydieresis adieresis -90 KPX Ydieresis agrave -90 KPX Ydieresis amacron -90 KPX Ydieresis aogonek -90 KPX Ydieresis aring -90 KPX Ydieresis atilde -90 KPX Ydieresis colon -50 KPX Ydieresis comma -100 KPX Ydieresis e -80 KPX Ydieresis eacute -80 KPX Ydieresis ecaron -80 KPX Ydieresis ecircumflex -80 KPX Ydieresis edieresis -80 KPX Ydieresis edotaccent -80 KPX Ydieresis egrave -80 KPX Ydieresis emacron -80 KPX Ydieresis eogonek -80 KPX Ydieresis o -100 KPX Ydieresis oacute -100 KPX Ydieresis ocircumflex -100 KPX Ydieresis odieresis -100 KPX Ydieresis ograve -100 KPX Ydieresis ohungarumlaut -100 KPX Ydieresis omacron -100 KPX Ydieresis oslash -100 KPX Ydieresis otilde -100 KPX Ydieresis period -100 KPX Ydieresis semicolon -50 KPX Ydieresis u -100 KPX Ydieresis uacute -100 KPX Ydieresis ucircumflex -100 KPX Ydieresis udieresis -100 KPX Ydieresis ugrave -100 KPX Ydieresis uhungarumlaut -100 KPX Ydieresis umacron -100 KPX Ydieresis uogonek -100 KPX Ydieresis uring -100 KPX a g -10 KPX a gbreve -10 KPX a gcommaaccent -10 KPX a v -15 KPX a w -15 KPX a y -20 KPX a yacute -20 KPX a ydieresis -20 KPX aacute g -10 KPX aacute gbreve -10 KPX aacute gcommaaccent -10 KPX aacute v -15 KPX aacute w -15 KPX aacute y -20 KPX aacute yacute -20 KPX aacute ydieresis -20 KPX abreve g -10 KPX abreve gbreve -10 KPX abreve gcommaaccent -10 KPX abreve v -15 KPX abreve w -15 KPX abreve y -20 KPX abreve yacute -20 KPX abreve ydieresis -20 KPX acircumflex g -10 KPX acircumflex gbreve -10 KPX acircumflex gcommaaccent -10 KPX acircumflex v -15 KPX acircumflex w -15 KPX acircumflex y -20 KPX acircumflex yacute -20 KPX acircumflex ydieresis -20 KPX adieresis g -10 KPX adieresis gbreve -10 KPX adieresis gcommaaccent -10 KPX adieresis v -15 KPX adieresis w -15 KPX adieresis y -20 KPX adieresis yacute -20 KPX adieresis ydieresis -20 KPX agrave g -10 KPX agrave gbreve -10 KPX agrave gcommaaccent -10 KPX agrave v -15 KPX agrave w -15 KPX agrave y -20 KPX agrave yacute -20 KPX agrave ydieresis -20 KPX amacron g -10 KPX amacron gbreve -10 KPX amacron gcommaaccent -10 KPX amacron v -15 KPX amacron w -15 KPX amacron y -20 KPX amacron yacute -20 KPX amacron ydieresis -20 KPX aogonek g -10 KPX aogonek gbreve -10 KPX aogonek gcommaaccent -10 KPX aogonek v -15 KPX aogonek w -15 KPX aogonek y -20 KPX aogonek yacute -20 KPX aogonek ydieresis -20 KPX aring g -10 KPX aring gbreve -10 KPX aring gcommaaccent -10 KPX aring v -15 KPX aring w -15 KPX aring y -20 KPX aring yacute -20 KPX aring ydieresis -20 KPX atilde g -10 KPX atilde gbreve -10 KPX atilde gcommaaccent -10 KPX atilde v -15 KPX atilde w -15 KPX atilde y -20 KPX atilde yacute -20 KPX atilde ydieresis -20 KPX b l -10 KPX b lacute -10 KPX b lcommaaccent -10 KPX b lslash -10 KPX b u -20 KPX b uacute -20 KPX b ucircumflex -20 KPX b udieresis -20 KPX b ugrave -20 KPX b uhungarumlaut -20 KPX b umacron -20 KPX b uogonek -20 KPX b uring -20 KPX b v -20 KPX b y -20 KPX b yacute -20 KPX b ydieresis -20 KPX c h -10 KPX c k -20 KPX c kcommaaccent -20 KPX c l -20 KPX c lacute -20 KPX c lcommaaccent -20 KPX c lslash -20 KPX c y -10 KPX c yacute -10 KPX c ydieresis -10 KPX cacute h -10 KPX cacute k -20 KPX cacute kcommaaccent -20 KPX cacute l -20 KPX cacute lacute -20 KPX cacute lcommaaccent -20 KPX cacute lslash -20 KPX cacute y -10 KPX cacute yacute -10 KPX cacute ydieresis -10 KPX ccaron h -10 KPX ccaron k -20 KPX ccaron kcommaaccent -20 KPX ccaron l -20 KPX ccaron lacute -20 KPX ccaron lcommaaccent -20 KPX ccaron lslash -20 KPX ccaron y -10 KPX ccaron yacute -10 KPX ccaron ydieresis -10 KPX ccedilla h -10 KPX ccedilla k -20 KPX ccedilla kcommaaccent -20 KPX ccedilla l -20 KPX ccedilla lacute -20 KPX ccedilla lcommaaccent -20 KPX ccedilla lslash -20 KPX ccedilla y -10 KPX ccedilla yacute -10 KPX ccedilla ydieresis -10 KPX colon space -40 KPX comma quotedblright -120 KPX comma quoteright -120 KPX comma space -40 KPX d d -10 KPX d dcroat -10 KPX d v -15 KPX d w -15 KPX d y -15 KPX d yacute -15 KPX d ydieresis -15 KPX dcroat d -10 KPX dcroat dcroat -10 KPX dcroat v -15 KPX dcroat w -15 KPX dcroat y -15 KPX dcroat yacute -15 KPX dcroat ydieresis -15 KPX e comma 10 KPX e period 20 KPX e v -15 KPX e w -15 KPX e x -15 KPX e y -15 KPX e yacute -15 KPX e ydieresis -15 KPX eacute comma 10 KPX eacute period 20 KPX eacute v -15 KPX eacute w -15 KPX eacute x -15 KPX eacute y -15 KPX eacute yacute -15 KPX eacute ydieresis -15 KPX ecaron comma 10 KPX ecaron period 20 KPX ecaron v -15 KPX ecaron w -15 KPX ecaron x -15 KPX ecaron y -15 KPX ecaron yacute -15 KPX ecaron ydieresis -15 KPX ecircumflex comma 10 KPX ecircumflex period 20 KPX ecircumflex v -15 KPX ecircumflex w -15 KPX ecircumflex x -15 KPX ecircumflex y -15 KPX ecircumflex yacute -15 KPX ecircumflex ydieresis -15 KPX edieresis comma 10 KPX edieresis period 20 KPX edieresis v -15 KPX edieresis w -15 KPX edieresis x -15 KPX edieresis y -15 KPX edieresis yacute -15 KPX edieresis ydieresis -15 KPX edotaccent comma 10 KPX edotaccent period 20 KPX edotaccent v -15 KPX edotaccent w -15 KPX edotaccent x -15 KPX edotaccent y -15 KPX edotaccent yacute -15 KPX edotaccent ydieresis -15 KPX egrave comma 10 KPX egrave period 20 KPX egrave v -15 KPX egrave w -15 KPX egrave x -15 KPX egrave y -15 KPX egrave yacute -15 KPX egrave ydieresis -15 KPX emacron comma 10 KPX emacron period 20 KPX emacron v -15 KPX emacron w -15 KPX emacron x -15 KPX emacron y -15 KPX emacron yacute -15 KPX emacron ydieresis -15 KPX eogonek comma 10 KPX eogonek period 20 KPX eogonek v -15 KPX eogonek w -15 KPX eogonek x -15 KPX eogonek y -15 KPX eogonek yacute -15 KPX eogonek ydieresis -15 KPX f comma -10 KPX f e -10 KPX f eacute -10 KPX f ecaron -10 KPX f ecircumflex -10 KPX f edieresis -10 KPX f edotaccent -10 KPX f egrave -10 KPX f emacron -10 KPX f eogonek -10 KPX f o -20 KPX f oacute -20 KPX f ocircumflex -20 KPX f odieresis -20 KPX f ograve -20 KPX f ohungarumlaut -20 KPX f omacron -20 KPX f oslash -20 KPX f otilde -20 KPX f period -10 KPX f quotedblright 30 KPX f quoteright 30 KPX g e 10 KPX g eacute 10 KPX g ecaron 10 KPX g ecircumflex 10 KPX g edieresis 10 KPX g edotaccent 10 KPX g egrave 10 KPX g emacron 10 KPX g eogonek 10 KPX g g -10 KPX g gbreve -10 KPX g gcommaaccent -10 KPX gbreve e 10 KPX gbreve eacute 10 KPX gbreve ecaron 10 KPX gbreve ecircumflex 10 KPX gbreve edieresis 10 KPX gbreve edotaccent 10 KPX gbreve egrave 10 KPX gbreve emacron 10 KPX gbreve eogonek 10 KPX gbreve g -10 KPX gbreve gbreve -10 KPX gbreve gcommaaccent -10 KPX gcommaaccent e 10 KPX gcommaaccent eacute 10 KPX gcommaaccent ecaron 10 KPX gcommaaccent ecircumflex 10 KPX gcommaaccent edieresis 10 KPX gcommaaccent edotaccent 10 KPX gcommaaccent egrave 10 KPX gcommaaccent emacron 10 KPX gcommaaccent eogonek 10 KPX gcommaaccent g -10 KPX gcommaaccent gbreve -10 KPX gcommaaccent gcommaaccent -10 KPX h y -20 KPX h yacute -20 KPX h ydieresis -20 KPX k o -15 KPX k oacute -15 KPX k ocircumflex -15 KPX k odieresis -15 KPX k ograve -15 KPX k ohungarumlaut -15 KPX k omacron -15 KPX k oslash -15 KPX k otilde -15 KPX kcommaaccent o -15 KPX kcommaaccent oacute -15 KPX kcommaaccent ocircumflex -15 KPX kcommaaccent odieresis -15 KPX kcommaaccent ograve -15 KPX kcommaaccent ohungarumlaut -15 KPX kcommaaccent omacron -15 KPX kcommaaccent oslash -15 KPX kcommaaccent otilde -15 KPX l w -15 KPX l y -15 KPX l yacute -15 KPX l ydieresis -15 KPX lacute w -15 KPX lacute y -15 KPX lacute yacute -15 KPX lacute ydieresis -15 KPX lcommaaccent w -15 KPX lcommaaccent y -15 KPX lcommaaccent yacute -15 KPX lcommaaccent ydieresis -15 KPX lslash w -15 KPX lslash y -15 KPX lslash yacute -15 KPX lslash ydieresis -15 KPX m u -20 KPX m uacute -20 KPX m ucircumflex -20 KPX m udieresis -20 KPX m ugrave -20 KPX m uhungarumlaut -20 KPX m umacron -20 KPX m uogonek -20 KPX m uring -20 KPX m y -30 KPX m yacute -30 KPX m ydieresis -30 KPX n u -10 KPX n uacute -10 KPX n ucircumflex -10 KPX n udieresis -10 KPX n ugrave -10 KPX n uhungarumlaut -10 KPX n umacron -10 KPX n uogonek -10 KPX n uring -10 KPX n v -40 KPX n y -20 KPX n yacute -20 KPX n ydieresis -20 KPX nacute u -10 KPX nacute uacute -10 KPX nacute ucircumflex -10 KPX nacute udieresis -10 KPX nacute ugrave -10 KPX nacute uhungarumlaut -10 KPX nacute umacron -10 KPX nacute uogonek -10 KPX nacute uring -10 KPX nacute v -40 KPX nacute y -20 KPX nacute yacute -20 KPX nacute ydieresis -20 KPX ncaron u -10 KPX ncaron uacute -10 KPX ncaron ucircumflex -10 KPX ncaron udieresis -10 KPX ncaron ugrave -10 KPX ncaron uhungarumlaut -10 KPX ncaron umacron -10 KPX ncaron uogonek -10 KPX ncaron uring -10 KPX ncaron v -40 KPX ncaron y -20 KPX ncaron yacute -20 KPX ncaron ydieresis -20 KPX ncommaaccent u -10 KPX ncommaaccent uacute -10 KPX ncommaaccent ucircumflex -10 KPX ncommaaccent udieresis -10 KPX ncommaaccent ugrave -10 KPX ncommaaccent uhungarumlaut -10 KPX ncommaaccent umacron -10 KPX ncommaaccent uogonek -10 KPX ncommaaccent uring -10 KPX ncommaaccent v -40 KPX ncommaaccent y -20 KPX ncommaaccent yacute -20 KPX ncommaaccent ydieresis -20 KPX ntilde u -10 KPX ntilde uacute -10 KPX ntilde ucircumflex -10 KPX ntilde udieresis -10 KPX ntilde ugrave -10 KPX ntilde uhungarumlaut -10 KPX ntilde umacron -10 KPX ntilde uogonek -10 KPX ntilde uring -10 KPX ntilde v -40 KPX ntilde y -20 KPX ntilde yacute -20 KPX ntilde ydieresis -20 KPX o v -20 KPX o w -15 KPX o x -30 KPX o y -20 KPX o yacute -20 KPX o ydieresis -20 KPX oacute v -20 KPX oacute w -15 KPX oacute x -30 KPX oacute y -20 KPX oacute yacute -20 KPX oacute ydieresis -20 KPX ocircumflex v -20 KPX ocircumflex w -15 KPX ocircumflex x -30 KPX ocircumflex y -20 KPX ocircumflex yacute -20 KPX ocircumflex ydieresis -20 KPX odieresis v -20 KPX odieresis w -15 KPX odieresis x -30 KPX odieresis y -20 KPX odieresis yacute -20 KPX odieresis ydieresis -20 KPX ograve v -20 KPX ograve w -15 KPX ograve x -30 KPX ograve y -20 KPX ograve yacute -20 KPX ograve ydieresis -20 KPX ohungarumlaut v -20 KPX ohungarumlaut w -15 KPX ohungarumlaut x -30 KPX ohungarumlaut y -20 KPX ohungarumlaut yacute -20 KPX ohungarumlaut ydieresis -20 KPX omacron v -20 KPX omacron w -15 KPX omacron x -30 KPX omacron y -20 KPX omacron yacute -20 KPX omacron ydieresis -20 KPX oslash v -20 KPX oslash w -15 KPX oslash x -30 KPX oslash y -20 KPX oslash yacute -20 KPX oslash ydieresis -20 KPX otilde v -20 KPX otilde w -15 KPX otilde x -30 KPX otilde y -20 KPX otilde yacute -20 KPX otilde ydieresis -20 KPX p y -15 KPX p yacute -15 KPX p ydieresis -15 KPX period quotedblright -120 KPX period quoteright -120 KPX period space -40 KPX quotedblright space -80 KPX quoteleft quoteleft -46 KPX quoteright d -80 KPX quoteright dcroat -80 KPX quoteright l -20 KPX quoteright lacute -20 KPX quoteright lcommaaccent -20 KPX quoteright lslash -20 KPX quoteright quoteright -46 KPX quoteright r -40 KPX quoteright racute -40 KPX quoteright rcaron -40 KPX quoteright rcommaaccent -40 KPX quoteright s -60 KPX quoteright sacute -60 KPX quoteright scaron -60 KPX quoteright scedilla -60 KPX quoteright scommaaccent -60 KPX quoteright space -80 KPX quoteright v -20 KPX r c -20 KPX r cacute -20 KPX r ccaron -20 KPX r ccedilla -20 KPX r comma -60 KPX r d -20 KPX r dcroat -20 KPX r g -15 KPX r gbreve -15 KPX r gcommaaccent -15 KPX r hyphen -20 KPX r o -20 KPX r oacute -20 KPX r ocircumflex -20 KPX r odieresis -20 KPX r ograve -20 KPX r ohungarumlaut -20 KPX r omacron -20 KPX r oslash -20 KPX r otilde -20 KPX r period -60 KPX r q -20 KPX r s -15 KPX r sacute -15 KPX r scaron -15 KPX r scedilla -15 KPX r scommaaccent -15 KPX r t 20 KPX r tcommaaccent 20 KPX r v 10 KPX r y 10 KPX r yacute 10 KPX r ydieresis 10 KPX racute c -20 KPX racute cacute -20 KPX racute ccaron -20 KPX racute ccedilla -20 KPX racute comma -60 KPX racute d -20 KPX racute dcroat -20 KPX racute g -15 KPX racute gbreve -15 KPX racute gcommaaccent -15 KPX racute hyphen -20 KPX racute o -20 KPX racute oacute -20 KPX racute ocircumflex -20 KPX racute odieresis -20 KPX racute ograve -20 KPX racute ohungarumlaut -20 KPX racute omacron -20 KPX racute oslash -20 KPX racute otilde -20 KPX racute period -60 KPX racute q -20 KPX racute s -15 KPX racute sacute -15 KPX racute scaron -15 KPX racute scedilla -15 KPX racute scommaaccent -15 KPX racute t 20 KPX racute tcommaaccent 20 KPX racute v 10 KPX racute y 10 KPX racute yacute 10 KPX racute ydieresis 10 KPX rcaron c -20 KPX rcaron cacute -20 KPX rcaron ccaron -20 KPX rcaron ccedilla -20 KPX rcaron comma -60 KPX rcaron d -20 KPX rcaron dcroat -20 KPX rcaron g -15 KPX rcaron gbreve -15 KPX rcaron gcommaaccent -15 KPX rcaron hyphen -20 KPX rcaron o -20 KPX rcaron oacute -20 KPX rcaron ocircumflex -20 KPX rcaron odieresis -20 KPX rcaron ograve -20 KPX rcaron ohungarumlaut -20 KPX rcaron omacron -20 KPX rcaron oslash -20 KPX rcaron otilde -20 KPX rcaron period -60 KPX rcaron q -20 KPX rcaron s -15 KPX rcaron sacute -15 KPX rcaron scaron -15 KPX rcaron scedilla -15 KPX rcaron scommaaccent -15 KPX rcaron t 20 KPX rcaron tcommaaccent 20 KPX rcaron v 10 KPX rcaron y 10 KPX rcaron yacute 10 KPX rcaron ydieresis 10 KPX rcommaaccent c -20 KPX rcommaaccent cacute -20 KPX rcommaaccent ccaron -20 KPX rcommaaccent ccedilla -20 KPX rcommaaccent comma -60 KPX rcommaaccent d -20 KPX rcommaaccent dcroat -20 KPX rcommaaccent g -15 KPX rcommaaccent gbreve -15 KPX rcommaaccent gcommaaccent -15 KPX rcommaaccent hyphen -20 KPX rcommaaccent o -20 KPX rcommaaccent oacute -20 KPX rcommaaccent ocircumflex -20 KPX rcommaaccent odieresis -20 KPX rcommaaccent ograve -20 KPX rcommaaccent ohungarumlaut -20 KPX rcommaaccent omacron -20 KPX rcommaaccent oslash -20 KPX rcommaaccent otilde -20 KPX rcommaaccent period -60 KPX rcommaaccent q -20 KPX rcommaaccent s -15 KPX rcommaaccent sacute -15 KPX rcommaaccent scaron -15 KPX rcommaaccent scedilla -15 KPX rcommaaccent scommaaccent -15 KPX rcommaaccent t 20 KPX rcommaaccent tcommaaccent 20 KPX rcommaaccent v 10 KPX rcommaaccent y 10 KPX rcommaaccent yacute 10 KPX rcommaaccent ydieresis 10 KPX s w -15 KPX sacute w -15 KPX scaron w -15 KPX scedilla w -15 KPX scommaaccent w -15 KPX semicolon space -40 KPX space T -100 KPX space Tcaron -100 KPX space Tcommaaccent -100 KPX space V -80 KPX space W -80 KPX space Y -120 KPX space Yacute -120 KPX space Ydieresis -120 KPX space quotedblleft -80 KPX space quoteleft -60 KPX v a -20 KPX v aacute -20 KPX v abreve -20 KPX v acircumflex -20 KPX v adieresis -20 KPX v agrave -20 KPX v amacron -20 KPX v aogonek -20 KPX v aring -20 KPX v atilde -20 KPX v comma -80 KPX v o -30 KPX v oacute -30 KPX v ocircumflex -30 KPX v odieresis -30 KPX v ograve -30 KPX v ohungarumlaut -30 KPX v omacron -30 KPX v oslash -30 KPX v otilde -30 KPX v period -80 KPX w comma -40 KPX w o -20 KPX w oacute -20 KPX w ocircumflex -20 KPX w odieresis -20 KPX w ograve -20 KPX w ohungarumlaut -20 KPX w omacron -20 KPX w oslash -20 KPX w otilde -20 KPX w period -40 KPX x e -10 KPX x eacute -10 KPX x ecaron -10 KPX x ecircumflex -10 KPX x edieresis -10 KPX x edotaccent -10 KPX x egrave -10 KPX x emacron -10 KPX x eogonek -10 KPX y a -30 KPX y aacute -30 KPX y abreve -30 KPX y acircumflex -30 KPX y adieresis -30 KPX y agrave -30 KPX y amacron -30 KPX y aogonek -30 KPX y aring -30 KPX y atilde -30 KPX y comma -80 KPX y e -10 KPX y eacute -10 KPX y ecaron -10 KPX y ecircumflex -10 KPX y edieresis -10 KPX y edotaccent -10 KPX y egrave -10 KPX y emacron -10 KPX y eogonek -10 KPX y o -25 KPX y oacute -25 KPX y ocircumflex -25 KPX y odieresis -25 KPX y ograve -25 KPX y ohungarumlaut -25 KPX y omacron -25 KPX y oslash -25 KPX y otilde -25 KPX y period -80 KPX yacute a -30 KPX yacute aacute -30 KPX yacute abreve -30 KPX yacute acircumflex -30 KPX yacute adieresis -30 KPX yacute agrave -30 KPX yacute amacron -30 KPX yacute aogonek -30 KPX yacute aring -30 KPX yacute atilde -30 KPX yacute comma -80 KPX yacute e -10 KPX yacute eacute -10 KPX yacute ecaron -10 KPX yacute ecircumflex -10 KPX yacute edieresis -10 KPX yacute edotaccent -10 KPX yacute egrave -10 KPX yacute emacron -10 KPX yacute eogonek -10 KPX yacute o -25 KPX yacute oacute -25 KPX yacute ocircumflex -25 KPX yacute odieresis -25 KPX yacute ograve -25 KPX yacute ohungarumlaut -25 KPX yacute omacron -25 KPX yacute oslash -25 KPX yacute otilde -25 KPX yacute period -80 KPX ydieresis a -30 KPX ydieresis aacute -30 KPX ydieresis abreve -30 KPX ydieresis acircumflex -30 KPX ydieresis adieresis -30 KPX ydieresis agrave -30 KPX ydieresis amacron -30 KPX ydieresis aogonek -30 KPX ydieresis aring -30 KPX ydieresis atilde -30 KPX ydieresis comma -80 KPX ydieresis e -10 KPX ydieresis eacute -10 KPX ydieresis ecaron -10 KPX ydieresis ecircumflex -10 KPX ydieresis edieresis -10 KPX ydieresis edotaccent -10 KPX ydieresis egrave -10 KPX ydieresis emacron -10 KPX ydieresis eogonek -10 KPX ydieresis o -25 KPX ydieresis oacute -25 KPX ydieresis ocircumflex -25 KPX ydieresis odieresis -25 KPX ydieresis ograve -25 KPX ydieresis ohungarumlaut -25 KPX ydieresis omacron -25 KPX ydieresis oslash -25 KPX ydieresis otilde -25 KPX ydieresis period -80 KPX z e 10 KPX z eacute 10 KPX z ecaron 10 KPX z ecircumflex 10 KPX z edieresis 10 KPX z edotaccent 10 KPX z egrave 10 KPX z emacron 10 KPX z eogonek 10 KPX zacute e 10 KPX zacute eacute 10 KPX zacute ecaron 10 KPX zacute ecircumflex 10 KPX zacute edieresis 10 KPX zacute edotaccent 10 KPX zacute egrave 10 KPX zacute emacron 10 KPX zacute eogonek 10 KPX zcaron e 10 KPX zcaron eacute 10 KPX zcaron ecaron 10 KPX zcaron ecircumflex 10 KPX zcaron edieresis 10 KPX zcaron edotaccent 10 KPX zcaron egrave 10 KPX zcaron emacron 10 KPX zcaron eogonek 10 KPX zdotaccent e 10 KPX zdotaccent eacute 10 KPX zdotaccent ecaron 10 KPX zdotaccent ecircumflex 10 KPX zdotaccent edieresis 10 KPX zdotaccent edotaccent 10 KPX zdotaccent egrave 10 KPX zdotaccent emacron 10 KPX zdotaccent eogonek 10 EndKernPairs EndKernData EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/pdfcorefonts/Helvetica-BoldOblique.afm ================================================ StartFontMetrics 4.1 Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Thu May 1 12:45:12 1997 Comment UniqueID 43053 Comment VMusage 14482 68586 FontName Helvetica-BoldOblique FullName Helvetica Bold Oblique FamilyName Helvetica Weight Bold ItalicAngle -12 IsFixedPitch false CharacterSet ExtendedRoman FontBBox -174 -228 1114 962 UnderlinePosition -100 UnderlineThickness 50 Version 002.000 Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 718 XHeight 532 Ascender 718 Descender -207 StdHW 118 StdVW 140 StartCharMetrics 315 C 32 ; WX 278 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 94 0 397 718 ; C 34 ; WX 474 ; N quotedbl ; B 193 447 529 718 ; C 35 ; WX 556 ; N numbersign ; B 60 0 644 698 ; C 36 ; WX 556 ; N dollar ; B 67 -115 622 775 ; C 37 ; WX 889 ; N percent ; B 136 -19 901 710 ; C 38 ; WX 722 ; N ampersand ; B 89 -19 732 718 ; C 39 ; WX 278 ; N quoteright ; B 167 445 362 718 ; C 40 ; WX 333 ; N parenleft ; B 76 -208 470 734 ; C 41 ; WX 333 ; N parenright ; B -25 -208 369 734 ; C 42 ; WX 389 ; N asterisk ; B 146 387 481 718 ; C 43 ; WX 584 ; N plus ; B 82 0 610 506 ; C 44 ; WX 278 ; N comma ; B 28 -168 245 146 ; C 45 ; WX 333 ; N hyphen ; B 73 215 379 345 ; C 46 ; WX 278 ; N period ; B 64 0 245 146 ; C 47 ; WX 278 ; N slash ; B -37 -19 468 737 ; C 48 ; WX 556 ; N zero ; B 86 -19 617 710 ; C 49 ; WX 556 ; N one ; B 173 0 529 710 ; C 50 ; WX 556 ; N two ; B 26 0 619 710 ; C 51 ; WX 556 ; N three ; B 65 -19 608 710 ; C 52 ; WX 556 ; N four ; B 60 0 598 710 ; C 53 ; WX 556 ; N five ; B 64 -19 636 698 ; C 54 ; WX 556 ; N six ; B 85 -19 619 710 ; C 55 ; WX 556 ; N seven ; B 125 0 676 698 ; C 56 ; WX 556 ; N eight ; B 69 -19 616 710 ; C 57 ; WX 556 ; N nine ; B 78 -19 615 710 ; C 58 ; WX 333 ; N colon ; B 92 0 351 512 ; C 59 ; WX 333 ; N semicolon ; B 56 -168 351 512 ; C 60 ; WX 584 ; N less ; B 82 -8 655 514 ; C 61 ; WX 584 ; N equal ; B 58 87 633 419 ; C 62 ; WX 584 ; N greater ; B 36 -8 609 514 ; C 63 ; WX 611 ; N question ; B 165 0 671 727 ; C 64 ; WX 975 ; N at ; B 186 -19 954 737 ; C 65 ; WX 722 ; N A ; B 20 0 702 718 ; C 66 ; WX 722 ; N B ; B 76 0 764 718 ; C 67 ; WX 722 ; N C ; B 107 -19 789 737 ; C 68 ; WX 722 ; N D ; B 76 0 777 718 ; C 69 ; WX 667 ; N E ; B 76 0 757 718 ; C 70 ; WX 611 ; N F ; B 76 0 740 718 ; C 71 ; WX 778 ; N G ; B 108 -19 817 737 ; C 72 ; WX 722 ; N H ; B 71 0 804 718 ; C 73 ; WX 278 ; N I ; B 64 0 367 718 ; C 74 ; WX 556 ; N J ; B 60 -18 637 718 ; C 75 ; WX 722 ; N K ; B 87 0 858 718 ; C 76 ; WX 611 ; N L ; B 76 0 611 718 ; C 77 ; WX 833 ; N M ; B 69 0 918 718 ; C 78 ; WX 722 ; N N ; B 69 0 807 718 ; C 79 ; WX 778 ; N O ; B 107 -19 823 737 ; C 80 ; WX 667 ; N P ; B 76 0 738 718 ; C 81 ; WX 778 ; N Q ; B 107 -52 823 737 ; C 82 ; WX 722 ; N R ; B 76 0 778 718 ; C 83 ; WX 667 ; N S ; B 81 -19 718 737 ; C 84 ; WX 611 ; N T ; B 140 0 751 718 ; C 85 ; WX 722 ; N U ; B 116 -19 804 718 ; C 86 ; WX 667 ; N V ; B 172 0 801 718 ; C 87 ; WX 944 ; N W ; B 169 0 1082 718 ; C 88 ; WX 667 ; N X ; B 14 0 791 718 ; C 89 ; WX 667 ; N Y ; B 168 0 806 718 ; C 90 ; WX 611 ; N Z ; B 25 0 737 718 ; C 91 ; WX 333 ; N bracketleft ; B 21 -196 462 722 ; C 92 ; WX 278 ; N backslash ; B 124 -19 307 737 ; C 93 ; WX 333 ; N bracketright ; B -18 -196 423 722 ; C 94 ; WX 584 ; N asciicircum ; B 131 323 591 698 ; C 95 ; WX 556 ; N underscore ; B -27 -125 540 -75 ; C 96 ; WX 278 ; N quoteleft ; B 165 454 361 727 ; C 97 ; WX 556 ; N a ; B 55 -14 583 546 ; C 98 ; WX 611 ; N b ; B 61 -14 645 718 ; C 99 ; WX 556 ; N c ; B 79 -14 599 546 ; C 100 ; WX 611 ; N d ; B 82 -14 704 718 ; C 101 ; WX 556 ; N e ; B 70 -14 593 546 ; C 102 ; WX 333 ; N f ; B 87 0 469 727 ; L i fi ; L l fl ; C 103 ; WX 611 ; N g ; B 38 -217 666 546 ; C 104 ; WX 611 ; N h ; B 65 0 629 718 ; C 105 ; WX 278 ; N i ; B 69 0 363 725 ; C 106 ; WX 278 ; N j ; B -42 -214 363 725 ; C 107 ; WX 556 ; N k ; B 69 0 670 718 ; C 108 ; WX 278 ; N l ; B 69 0 362 718 ; C 109 ; WX 889 ; N m ; B 64 0 909 546 ; C 110 ; WX 611 ; N n ; B 65 0 629 546 ; C 111 ; WX 611 ; N o ; B 82 -14 643 546 ; C 112 ; WX 611 ; N p ; B 18 -207 645 546 ; C 113 ; WX 611 ; N q ; B 80 -207 665 546 ; C 114 ; WX 389 ; N r ; B 64 0 489 546 ; C 115 ; WX 556 ; N s ; B 63 -14 584 546 ; C 116 ; WX 333 ; N t ; B 100 -6 422 676 ; C 117 ; WX 611 ; N u ; B 98 -14 658 532 ; C 118 ; WX 556 ; N v ; B 126 0 656 532 ; C 119 ; WX 778 ; N w ; B 123 0 882 532 ; C 120 ; WX 556 ; N x ; B 15 0 648 532 ; C 121 ; WX 556 ; N y ; B 42 -214 652 532 ; C 122 ; WX 500 ; N z ; B 20 0 583 532 ; C 123 ; WX 389 ; N braceleft ; B 94 -196 518 722 ; C 124 ; WX 280 ; N bar ; B 36 -225 361 775 ; C 125 ; WX 389 ; N braceright ; B -18 -196 407 722 ; C 126 ; WX 584 ; N asciitilde ; B 115 163 577 343 ; C 161 ; WX 333 ; N exclamdown ; B 50 -186 353 532 ; C 162 ; WX 556 ; N cent ; B 79 -118 599 628 ; C 163 ; WX 556 ; N sterling ; B 50 -16 635 718 ; C 164 ; WX 167 ; N fraction ; B -174 -19 487 710 ; C 165 ; WX 556 ; N yen ; B 60 0 713 698 ; C 166 ; WX 556 ; N florin ; B -50 -210 669 737 ; C 167 ; WX 556 ; N section ; B 61 -184 598 727 ; C 168 ; WX 556 ; N currency ; B 27 76 680 636 ; C 169 ; WX 238 ; N quotesingle ; B 165 447 321 718 ; C 170 ; WX 500 ; N quotedblleft ; B 160 454 588 727 ; C 171 ; WX 556 ; N guillemotleft ; B 135 76 571 484 ; C 172 ; WX 333 ; N guilsinglleft ; B 130 76 353 484 ; C 173 ; WX 333 ; N guilsinglright ; B 99 76 322 484 ; C 174 ; WX 611 ; N fi ; B 87 0 696 727 ; C 175 ; WX 611 ; N fl ; B 87 0 695 727 ; C 177 ; WX 556 ; N endash ; B 48 227 627 333 ; C 178 ; WX 556 ; N dagger ; B 118 -171 626 718 ; C 179 ; WX 556 ; N daggerdbl ; B 46 -171 628 718 ; C 180 ; WX 278 ; N periodcentered ; B 110 172 276 334 ; C 182 ; WX 556 ; N paragraph ; B 98 -191 688 700 ; C 183 ; WX 350 ; N bullet ; B 83 194 420 524 ; C 184 ; WX 278 ; N quotesinglbase ; B 41 -146 236 127 ; C 185 ; WX 500 ; N quotedblbase ; B 36 -146 463 127 ; C 186 ; WX 500 ; N quotedblright ; B 162 445 589 718 ; C 187 ; WX 556 ; N guillemotright ; B 104 76 540 484 ; C 188 ; WX 1000 ; N ellipsis ; B 92 0 939 146 ; C 189 ; WX 1000 ; N perthousand ; B 76 -19 1038 710 ; C 191 ; WX 611 ; N questiondown ; B 53 -195 559 532 ; C 193 ; WX 333 ; N grave ; B 136 604 353 750 ; C 194 ; WX 333 ; N acute ; B 236 604 515 750 ; C 195 ; WX 333 ; N circumflex ; B 118 604 471 750 ; C 196 ; WX 333 ; N tilde ; B 113 610 507 737 ; C 197 ; WX 333 ; N macron ; B 122 604 483 678 ; C 198 ; WX 333 ; N breve ; B 156 604 494 750 ; C 199 ; WX 333 ; N dotaccent ; B 235 614 385 729 ; C 200 ; WX 333 ; N dieresis ; B 137 614 482 729 ; C 202 ; WX 333 ; N ring ; B 200 568 420 776 ; C 203 ; WX 333 ; N cedilla ; B -37 -228 220 0 ; C 205 ; WX 333 ; N hungarumlaut ; B 137 604 645 750 ; C 206 ; WX 333 ; N ogonek ; B 41 -228 264 0 ; C 207 ; WX 333 ; N caron ; B 149 604 502 750 ; C 208 ; WX 1000 ; N emdash ; B 48 227 1071 333 ; C 225 ; WX 1000 ; N AE ; B 5 0 1100 718 ; C 227 ; WX 370 ; N ordfeminine ; B 125 401 465 737 ; C 232 ; WX 611 ; N Lslash ; B 34 0 611 718 ; C 233 ; WX 778 ; N Oslash ; B 35 -27 894 745 ; C 234 ; WX 1000 ; N OE ; B 99 -19 1114 737 ; C 235 ; WX 365 ; N ordmasculine ; B 123 401 485 737 ; C 241 ; WX 889 ; N ae ; B 56 -14 923 546 ; C 245 ; WX 278 ; N dotlessi ; B 69 0 322 532 ; C 248 ; WX 278 ; N lslash ; B 40 0 407 718 ; C 249 ; WX 611 ; N oslash ; B 22 -29 701 560 ; C 250 ; WX 944 ; N oe ; B 82 -14 977 546 ; C 251 ; WX 611 ; N germandbls ; B 69 -14 657 731 ; C -1 ; WX 278 ; N Idieresis ; B 64 0 494 915 ; C -1 ; WX 556 ; N eacute ; B 70 -14 627 750 ; C -1 ; WX 556 ; N abreve ; B 55 -14 606 750 ; C -1 ; WX 611 ; N uhungarumlaut ; B 98 -14 784 750 ; C -1 ; WX 556 ; N ecaron ; B 70 -14 614 750 ; C -1 ; WX 667 ; N Ydieresis ; B 168 0 806 915 ; C -1 ; WX 584 ; N divide ; B 82 -42 610 548 ; C -1 ; WX 667 ; N Yacute ; B 168 0 806 936 ; C -1 ; WX 722 ; N Acircumflex ; B 20 0 706 936 ; C -1 ; WX 556 ; N aacute ; B 55 -14 627 750 ; C -1 ; WX 722 ; N Ucircumflex ; B 116 -19 804 936 ; C -1 ; WX 556 ; N yacute ; B 42 -214 652 750 ; C -1 ; WX 556 ; N scommaaccent ; B 63 -228 584 546 ; C -1 ; WX 556 ; N ecircumflex ; B 70 -14 593 750 ; C -1 ; WX 722 ; N Uring ; B 116 -19 804 962 ; C -1 ; WX 722 ; N Udieresis ; B 116 -19 804 915 ; C -1 ; WX 556 ; N aogonek ; B 55 -224 583 546 ; C -1 ; WX 722 ; N Uacute ; B 116 -19 804 936 ; C -1 ; WX 611 ; N uogonek ; B 98 -228 658 532 ; C -1 ; WX 667 ; N Edieresis ; B 76 0 757 915 ; C -1 ; WX 722 ; N Dcroat ; B 62 0 777 718 ; C -1 ; WX 250 ; N commaaccent ; B 16 -228 188 -50 ; C -1 ; WX 737 ; N copyright ; B 56 -19 835 737 ; C -1 ; WX 667 ; N Emacron ; B 76 0 757 864 ; C -1 ; WX 556 ; N ccaron ; B 79 -14 614 750 ; C -1 ; WX 556 ; N aring ; B 55 -14 583 776 ; C -1 ; WX 722 ; N Ncommaaccent ; B 69 -228 807 718 ; C -1 ; WX 278 ; N lacute ; B 69 0 528 936 ; C -1 ; WX 556 ; N agrave ; B 55 -14 583 750 ; C -1 ; WX 611 ; N Tcommaaccent ; B 140 -228 751 718 ; C -1 ; WX 722 ; N Cacute ; B 107 -19 789 936 ; C -1 ; WX 556 ; N atilde ; B 55 -14 619 737 ; C -1 ; WX 667 ; N Edotaccent ; B 76 0 757 915 ; C -1 ; WX 556 ; N scaron ; B 63 -14 614 750 ; C -1 ; WX 556 ; N scedilla ; B 63 -228 584 546 ; C -1 ; WX 278 ; N iacute ; B 69 0 488 750 ; C -1 ; WX 494 ; N lozenge ; B 90 0 564 745 ; C -1 ; WX 722 ; N Rcaron ; B 76 0 778 936 ; C -1 ; WX 778 ; N Gcommaaccent ; B 108 -228 817 737 ; C -1 ; WX 611 ; N ucircumflex ; B 98 -14 658 750 ; C -1 ; WX 556 ; N acircumflex ; B 55 -14 583 750 ; C -1 ; WX 722 ; N Amacron ; B 20 0 718 864 ; C -1 ; WX 389 ; N rcaron ; B 64 0 530 750 ; C -1 ; WX 556 ; N ccedilla ; B 79 -228 599 546 ; C -1 ; WX 611 ; N Zdotaccent ; B 25 0 737 915 ; C -1 ; WX 667 ; N Thorn ; B 76 0 716 718 ; C -1 ; WX 778 ; N Omacron ; B 107 -19 823 864 ; C -1 ; WX 722 ; N Racute ; B 76 0 778 936 ; C -1 ; WX 667 ; N Sacute ; B 81 -19 722 936 ; C -1 ; WX 743 ; N dcaron ; B 82 -14 903 718 ; C -1 ; WX 722 ; N Umacron ; B 116 -19 804 864 ; C -1 ; WX 611 ; N uring ; B 98 -14 658 776 ; C -1 ; WX 333 ; N threesuperior ; B 91 271 441 710 ; C -1 ; WX 778 ; N Ograve ; B 107 -19 823 936 ; C -1 ; WX 722 ; N Agrave ; B 20 0 702 936 ; C -1 ; WX 722 ; N Abreve ; B 20 0 729 936 ; C -1 ; WX 584 ; N multiply ; B 57 1 635 505 ; C -1 ; WX 611 ; N uacute ; B 98 -14 658 750 ; C -1 ; WX 611 ; N Tcaron ; B 140 0 751 936 ; C -1 ; WX 494 ; N partialdiff ; B 43 -21 585 750 ; C -1 ; WX 556 ; N ydieresis ; B 42 -214 652 729 ; C -1 ; WX 722 ; N Nacute ; B 69 0 807 936 ; C -1 ; WX 278 ; N icircumflex ; B 69 0 444 750 ; C -1 ; WX 667 ; N Ecircumflex ; B 76 0 757 936 ; C -1 ; WX 556 ; N adieresis ; B 55 -14 594 729 ; C -1 ; WX 556 ; N edieresis ; B 70 -14 594 729 ; C -1 ; WX 556 ; N cacute ; B 79 -14 627 750 ; C -1 ; WX 611 ; N nacute ; B 65 0 654 750 ; C -1 ; WX 611 ; N umacron ; B 98 -14 658 678 ; C -1 ; WX 722 ; N Ncaron ; B 69 0 807 936 ; C -1 ; WX 278 ; N Iacute ; B 64 0 528 936 ; C -1 ; WX 584 ; N plusminus ; B 40 0 625 506 ; C -1 ; WX 280 ; N brokenbar ; B 52 -150 345 700 ; C -1 ; WX 737 ; N registered ; B 55 -19 834 737 ; C -1 ; WX 778 ; N Gbreve ; B 108 -19 817 936 ; C -1 ; WX 278 ; N Idotaccent ; B 64 0 397 915 ; C -1 ; WX 600 ; N summation ; B 14 -10 670 706 ; C -1 ; WX 667 ; N Egrave ; B 76 0 757 936 ; C -1 ; WX 389 ; N racute ; B 64 0 543 750 ; C -1 ; WX 611 ; N omacron ; B 82 -14 643 678 ; C -1 ; WX 611 ; N Zacute ; B 25 0 737 936 ; C -1 ; WX 611 ; N Zcaron ; B 25 0 737 936 ; C -1 ; WX 549 ; N greaterequal ; B 26 0 629 704 ; C -1 ; WX 722 ; N Eth ; B 62 0 777 718 ; C -1 ; WX 722 ; N Ccedilla ; B 107 -228 789 737 ; C -1 ; WX 278 ; N lcommaaccent ; B 30 -228 362 718 ; C -1 ; WX 389 ; N tcaron ; B 100 -6 608 878 ; C -1 ; WX 556 ; N eogonek ; B 70 -228 593 546 ; C -1 ; WX 722 ; N Uogonek ; B 116 -228 804 718 ; C -1 ; WX 722 ; N Aacute ; B 20 0 750 936 ; C -1 ; WX 722 ; N Adieresis ; B 20 0 716 915 ; C -1 ; WX 556 ; N egrave ; B 70 -14 593 750 ; C -1 ; WX 500 ; N zacute ; B 20 0 599 750 ; C -1 ; WX 278 ; N iogonek ; B -14 -224 363 725 ; C -1 ; WX 778 ; N Oacute ; B 107 -19 823 936 ; C -1 ; WX 611 ; N oacute ; B 82 -14 654 750 ; C -1 ; WX 556 ; N amacron ; B 55 -14 595 678 ; C -1 ; WX 556 ; N sacute ; B 63 -14 627 750 ; C -1 ; WX 278 ; N idieresis ; B 69 0 455 729 ; C -1 ; WX 778 ; N Ocircumflex ; B 107 -19 823 936 ; C -1 ; WX 722 ; N Ugrave ; B 116 -19 804 936 ; C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; C -1 ; WX 611 ; N thorn ; B 18 -208 645 718 ; C -1 ; WX 333 ; N twosuperior ; B 69 283 449 710 ; C -1 ; WX 778 ; N Odieresis ; B 107 -19 823 915 ; C -1 ; WX 611 ; N mu ; B 22 -207 658 532 ; C -1 ; WX 278 ; N igrave ; B 69 0 326 750 ; C -1 ; WX 611 ; N ohungarumlaut ; B 82 -14 784 750 ; C -1 ; WX 667 ; N Eogonek ; B 76 -224 757 718 ; C -1 ; WX 611 ; N dcroat ; B 82 -14 789 718 ; C -1 ; WX 834 ; N threequarters ; B 99 -19 839 710 ; C -1 ; WX 667 ; N Scedilla ; B 81 -228 718 737 ; C -1 ; WX 400 ; N lcaron ; B 69 0 561 718 ; C -1 ; WX 722 ; N Kcommaaccent ; B 87 -228 858 718 ; C -1 ; WX 611 ; N Lacute ; B 76 0 611 936 ; C -1 ; WX 1000 ; N trademark ; B 179 306 1109 718 ; C -1 ; WX 556 ; N edotaccent ; B 70 -14 593 729 ; C -1 ; WX 278 ; N Igrave ; B 64 0 367 936 ; C -1 ; WX 278 ; N Imacron ; B 64 0 496 864 ; C -1 ; WX 611 ; N Lcaron ; B 76 0 643 718 ; C -1 ; WX 834 ; N onehalf ; B 132 -19 858 710 ; C -1 ; WX 549 ; N lessequal ; B 29 0 676 704 ; C -1 ; WX 611 ; N ocircumflex ; B 82 -14 643 750 ; C -1 ; WX 611 ; N ntilde ; B 65 0 646 737 ; C -1 ; WX 722 ; N Uhungarumlaut ; B 116 -19 880 936 ; C -1 ; WX 667 ; N Eacute ; B 76 0 757 936 ; C -1 ; WX 556 ; N emacron ; B 70 -14 595 678 ; C -1 ; WX 611 ; N gbreve ; B 38 -217 666 750 ; C -1 ; WX 834 ; N onequarter ; B 132 -19 806 710 ; C -1 ; WX 667 ; N Scaron ; B 81 -19 718 936 ; C -1 ; WX 667 ; N Scommaaccent ; B 81 -228 718 737 ; C -1 ; WX 778 ; N Ohungarumlaut ; B 107 -19 908 936 ; C -1 ; WX 400 ; N degree ; B 175 426 467 712 ; C -1 ; WX 611 ; N ograve ; B 82 -14 643 750 ; C -1 ; WX 722 ; N Ccaron ; B 107 -19 789 936 ; C -1 ; WX 611 ; N ugrave ; B 98 -14 658 750 ; C -1 ; WX 549 ; N radical ; B 112 -46 689 850 ; C -1 ; WX 722 ; N Dcaron ; B 76 0 777 936 ; C -1 ; WX 389 ; N rcommaaccent ; B 26 -228 489 546 ; C -1 ; WX 722 ; N Ntilde ; B 69 0 807 923 ; C -1 ; WX 611 ; N otilde ; B 82 -14 646 737 ; C -1 ; WX 722 ; N Rcommaaccent ; B 76 -228 778 718 ; C -1 ; WX 611 ; N Lcommaaccent ; B 76 -228 611 718 ; C -1 ; WX 722 ; N Atilde ; B 20 0 741 923 ; C -1 ; WX 722 ; N Aogonek ; B 20 -224 702 718 ; C -1 ; WX 722 ; N Aring ; B 20 0 702 962 ; C -1 ; WX 778 ; N Otilde ; B 107 -19 823 923 ; C -1 ; WX 500 ; N zdotaccent ; B 20 0 583 729 ; C -1 ; WX 667 ; N Ecaron ; B 76 0 757 936 ; C -1 ; WX 278 ; N Iogonek ; B -41 -228 367 718 ; C -1 ; WX 556 ; N kcommaaccent ; B 69 -228 670 718 ; C -1 ; WX 584 ; N minus ; B 82 197 610 309 ; C -1 ; WX 278 ; N Icircumflex ; B 64 0 484 936 ; C -1 ; WX 611 ; N ncaron ; B 65 0 641 750 ; C -1 ; WX 333 ; N tcommaaccent ; B 58 -228 422 676 ; C -1 ; WX 584 ; N logicalnot ; B 105 108 633 419 ; C -1 ; WX 611 ; N odieresis ; B 82 -14 643 729 ; C -1 ; WX 611 ; N udieresis ; B 98 -14 658 729 ; C -1 ; WX 549 ; N notequal ; B 32 -49 630 570 ; C -1 ; WX 611 ; N gcommaaccent ; B 38 -217 666 850 ; C -1 ; WX 611 ; N eth ; B 82 -14 670 737 ; C -1 ; WX 500 ; N zcaron ; B 20 0 586 750 ; C -1 ; WX 611 ; N ncommaaccent ; B 65 -228 629 546 ; C -1 ; WX 333 ; N onesuperior ; B 148 283 388 710 ; C -1 ; WX 278 ; N imacron ; B 69 0 429 678 ; C -1 ; WX 556 ; N Euro ; B 0 0 0 0 ; EndCharMetrics StartKernData StartKernPairs 2481 KPX A C -40 KPX A Cacute -40 KPX A Ccaron -40 KPX A Ccedilla -40 KPX A G -50 KPX A Gbreve -50 KPX A Gcommaaccent -50 KPX A O -40 KPX A Oacute -40 KPX A Ocircumflex -40 KPX A Odieresis -40 KPX A Ograve -40 KPX A Ohungarumlaut -40 KPX A Omacron -40 KPX A Oslash -40 KPX A Otilde -40 KPX A Q -40 KPX A T -90 KPX A Tcaron -90 KPX A Tcommaaccent -90 KPX A U -50 KPX A Uacute -50 KPX A Ucircumflex -50 KPX A Udieresis -50 KPX A Ugrave -50 KPX A Uhungarumlaut -50 KPX A Umacron -50 KPX A Uogonek -50 KPX A Uring -50 KPX A V -80 KPX A W -60 KPX A Y -110 KPX A Yacute -110 KPX A Ydieresis -110 KPX A u -30 KPX A uacute -30 KPX A ucircumflex -30 KPX A udieresis -30 KPX A ugrave -30 KPX A uhungarumlaut -30 KPX A umacron -30 KPX A uogonek -30 KPX A uring -30 KPX A v -40 KPX A w -30 KPX A y -30 KPX A yacute -30 KPX A ydieresis -30 KPX Aacute C -40 KPX Aacute Cacute -40 KPX Aacute Ccaron -40 KPX Aacute Ccedilla -40 KPX Aacute G -50 KPX Aacute Gbreve -50 KPX Aacute Gcommaaccent -50 KPX Aacute O -40 KPX Aacute Oacute -40 KPX Aacute Ocircumflex -40 KPX Aacute Odieresis -40 KPX Aacute Ograve -40 KPX Aacute Ohungarumlaut -40 KPX Aacute Omacron -40 KPX Aacute Oslash -40 KPX Aacute Otilde -40 KPX Aacute Q -40 KPX Aacute T -90 KPX Aacute Tcaron -90 KPX Aacute Tcommaaccent -90 KPX Aacute U -50 KPX Aacute Uacute -50 KPX Aacute Ucircumflex -50 KPX Aacute Udieresis -50 KPX Aacute Ugrave -50 KPX Aacute Uhungarumlaut -50 KPX Aacute Umacron -50 KPX Aacute Uogonek -50 KPX Aacute Uring -50 KPX Aacute V -80 KPX Aacute W -60 KPX Aacute Y -110 KPX Aacute Yacute -110 KPX Aacute Ydieresis -110 KPX Aacute u -30 KPX Aacute uacute -30 KPX Aacute ucircumflex -30 KPX Aacute udieresis -30 KPX Aacute ugrave -30 KPX Aacute uhungarumlaut -30 KPX Aacute umacron -30 KPX Aacute uogonek -30 KPX Aacute uring -30 KPX Aacute v -40 KPX Aacute w -30 KPX Aacute y -30 KPX Aacute yacute -30 KPX Aacute ydieresis -30 KPX Abreve C -40 KPX Abreve Cacute -40 KPX Abreve Ccaron -40 KPX Abreve Ccedilla -40 KPX Abreve G -50 KPX Abreve Gbreve -50 KPX Abreve Gcommaaccent -50 KPX Abreve O -40 KPX Abreve Oacute -40 KPX Abreve Ocircumflex -40 KPX Abreve Odieresis -40 KPX Abreve Ograve -40 KPX Abreve Ohungarumlaut -40 KPX Abreve Omacron -40 KPX Abreve Oslash -40 KPX Abreve Otilde -40 KPX Abreve Q -40 KPX Abreve T -90 KPX Abreve Tcaron -90 KPX Abreve Tcommaaccent -90 KPX Abreve U -50 KPX Abreve Uacute -50 KPX Abreve Ucircumflex -50 KPX Abreve Udieresis -50 KPX Abreve Ugrave -50 KPX Abreve Uhungarumlaut -50 KPX Abreve Umacron -50 KPX Abreve Uogonek -50 KPX Abreve Uring -50 KPX Abreve V -80 KPX Abreve W -60 KPX Abreve Y -110 KPX Abreve Yacute -110 KPX Abreve Ydieresis -110 KPX Abreve u -30 KPX Abreve uacute -30 KPX Abreve ucircumflex -30 KPX Abreve udieresis -30 KPX Abreve ugrave -30 KPX Abreve uhungarumlaut -30 KPX Abreve umacron -30 KPX Abreve uogonek -30 KPX Abreve uring -30 KPX Abreve v -40 KPX Abreve w -30 KPX Abreve y -30 KPX Abreve yacute -30 KPX Abreve ydieresis -30 KPX Acircumflex C -40 KPX Acircumflex Cacute -40 KPX Acircumflex Ccaron -40 KPX Acircumflex Ccedilla -40 KPX Acircumflex G -50 KPX Acircumflex Gbreve -50 KPX Acircumflex Gcommaaccent -50 KPX Acircumflex O -40 KPX Acircumflex Oacute -40 KPX Acircumflex Ocircumflex -40 KPX Acircumflex Odieresis -40 KPX Acircumflex Ograve -40 KPX Acircumflex Ohungarumlaut -40 KPX Acircumflex Omacron -40 KPX Acircumflex Oslash -40 KPX Acircumflex Otilde -40 KPX Acircumflex Q -40 KPX Acircumflex T -90 KPX Acircumflex Tcaron -90 KPX Acircumflex Tcommaaccent -90 KPX Acircumflex U -50 KPX Acircumflex Uacute -50 KPX Acircumflex Ucircumflex -50 KPX Acircumflex Udieresis -50 KPX Acircumflex Ugrave -50 KPX Acircumflex Uhungarumlaut -50 KPX Acircumflex Umacron -50 KPX Acircumflex Uogonek -50 KPX Acircumflex Uring -50 KPX Acircumflex V -80 KPX Acircumflex W -60 KPX Acircumflex Y -110 KPX Acircumflex Yacute -110 KPX Acircumflex Ydieresis -110 KPX Acircumflex u -30 KPX Acircumflex uacute -30 KPX Acircumflex ucircumflex -30 KPX Acircumflex udieresis -30 KPX Acircumflex ugrave -30 KPX Acircumflex uhungarumlaut -30 KPX Acircumflex umacron -30 KPX Acircumflex uogonek -30 KPX Acircumflex uring -30 KPX Acircumflex v -40 KPX Acircumflex w -30 KPX Acircumflex y -30 KPX Acircumflex yacute -30 KPX Acircumflex ydieresis -30 KPX Adieresis C -40 KPX Adieresis Cacute -40 KPX Adieresis Ccaron -40 KPX Adieresis Ccedilla -40 KPX Adieresis G -50 KPX Adieresis Gbreve -50 KPX Adieresis Gcommaaccent -50 KPX Adieresis O -40 KPX Adieresis Oacute -40 KPX Adieresis Ocircumflex -40 KPX Adieresis Odieresis -40 KPX Adieresis Ograve -40 KPX Adieresis Ohungarumlaut -40 KPX Adieresis Omacron -40 KPX Adieresis Oslash -40 KPX Adieresis Otilde -40 KPX Adieresis Q -40 KPX Adieresis T -90 KPX Adieresis Tcaron -90 KPX Adieresis Tcommaaccent -90 KPX Adieresis U -50 KPX Adieresis Uacute -50 KPX Adieresis Ucircumflex -50 KPX Adieresis Udieresis -50 KPX Adieresis Ugrave -50 KPX Adieresis Uhungarumlaut -50 KPX Adieresis Umacron -50 KPX Adieresis Uogonek -50 KPX Adieresis Uring -50 KPX Adieresis V -80 KPX Adieresis W -60 KPX Adieresis Y -110 KPX Adieresis Yacute -110 KPX Adieresis Ydieresis -110 KPX Adieresis u -30 KPX Adieresis uacute -30 KPX Adieresis ucircumflex -30 KPX Adieresis udieresis -30 KPX Adieresis ugrave -30 KPX Adieresis uhungarumlaut -30 KPX Adieresis umacron -30 KPX Adieresis uogonek -30 KPX Adieresis uring -30 KPX Adieresis v -40 KPX Adieresis w -30 KPX Adieresis y -30 KPX Adieresis yacute -30 KPX Adieresis ydieresis -30 KPX Agrave C -40 KPX Agrave Cacute -40 KPX Agrave Ccaron -40 KPX Agrave Ccedilla -40 KPX Agrave G -50 KPX Agrave Gbreve -50 KPX Agrave Gcommaaccent -50 KPX Agrave O -40 KPX Agrave Oacute -40 KPX Agrave Ocircumflex -40 KPX Agrave Odieresis -40 KPX Agrave Ograve -40 KPX Agrave Ohungarumlaut -40 KPX Agrave Omacron -40 KPX Agrave Oslash -40 KPX Agrave Otilde -40 KPX Agrave Q -40 KPX Agrave T -90 KPX Agrave Tcaron -90 KPX Agrave Tcommaaccent -90 KPX Agrave U -50 KPX Agrave Uacute -50 KPX Agrave Ucircumflex -50 KPX Agrave Udieresis -50 KPX Agrave Ugrave -50 KPX Agrave Uhungarumlaut -50 KPX Agrave Umacron -50 KPX Agrave Uogonek -50 KPX Agrave Uring -50 KPX Agrave V -80 KPX Agrave W -60 KPX Agrave Y -110 KPX Agrave Yacute -110 KPX Agrave Ydieresis -110 KPX Agrave u -30 KPX Agrave uacute -30 KPX Agrave ucircumflex -30 KPX Agrave udieresis -30 KPX Agrave ugrave -30 KPX Agrave uhungarumlaut -30 KPX Agrave umacron -30 KPX Agrave uogonek -30 KPX Agrave uring -30 KPX Agrave v -40 KPX Agrave w -30 KPX Agrave y -30 KPX Agrave yacute -30 KPX Agrave ydieresis -30 KPX Amacron C -40 KPX Amacron Cacute -40 KPX Amacron Ccaron -40 KPX Amacron Ccedilla -40 KPX Amacron G -50 KPX Amacron Gbreve -50 KPX Amacron Gcommaaccent -50 KPX Amacron O -40 KPX Amacron Oacute -40 KPX Amacron Ocircumflex -40 KPX Amacron Odieresis -40 KPX Amacron Ograve -40 KPX Amacron Ohungarumlaut -40 KPX Amacron Omacron -40 KPX Amacron Oslash -40 KPX Amacron Otilde -40 KPX Amacron Q -40 KPX Amacron T -90 KPX Amacron Tcaron -90 KPX Amacron Tcommaaccent -90 KPX Amacron U -50 KPX Amacron Uacute -50 KPX Amacron Ucircumflex -50 KPX Amacron Udieresis -50 KPX Amacron Ugrave -50 KPX Amacron Uhungarumlaut -50 KPX Amacron Umacron -50 KPX Amacron Uogonek -50 KPX Amacron Uring -50 KPX Amacron V -80 KPX Amacron W -60 KPX Amacron Y -110 KPX Amacron Yacute -110 KPX Amacron Ydieresis -110 KPX Amacron u -30 KPX Amacron uacute -30 KPX Amacron ucircumflex -30 KPX Amacron udieresis -30 KPX Amacron ugrave -30 KPX Amacron uhungarumlaut -30 KPX Amacron umacron -30 KPX Amacron uogonek -30 KPX Amacron uring -30 KPX Amacron v -40 KPX Amacron w -30 KPX Amacron y -30 KPX Amacron yacute -30 KPX Amacron ydieresis -30 KPX Aogonek C -40 KPX Aogonek Cacute -40 KPX Aogonek Ccaron -40 KPX Aogonek Ccedilla -40 KPX Aogonek G -50 KPX Aogonek Gbreve -50 KPX Aogonek Gcommaaccent -50 KPX Aogonek O -40 KPX Aogonek Oacute -40 KPX Aogonek Ocircumflex -40 KPX Aogonek Odieresis -40 KPX Aogonek Ograve -40 KPX Aogonek Ohungarumlaut -40 KPX Aogonek Omacron -40 KPX Aogonek Oslash -40 KPX Aogonek Otilde -40 KPX Aogonek Q -40 KPX Aogonek T -90 KPX Aogonek Tcaron -90 KPX Aogonek Tcommaaccent -90 KPX Aogonek U -50 KPX Aogonek Uacute -50 KPX Aogonek Ucircumflex -50 KPX Aogonek Udieresis -50 KPX Aogonek Ugrave -50 KPX Aogonek Uhungarumlaut -50 KPX Aogonek Umacron -50 KPX Aogonek Uogonek -50 KPX Aogonek Uring -50 KPX Aogonek V -80 KPX Aogonek W -60 KPX Aogonek Y -110 KPX Aogonek Yacute -110 KPX Aogonek Ydieresis -110 KPX Aogonek u -30 KPX Aogonek uacute -30 KPX Aogonek ucircumflex -30 KPX Aogonek udieresis -30 KPX Aogonek ugrave -30 KPX Aogonek uhungarumlaut -30 KPX Aogonek umacron -30 KPX Aogonek uogonek -30 KPX Aogonek uring -30 KPX Aogonek v -40 KPX Aogonek w -30 KPX Aogonek y -30 KPX Aogonek yacute -30 KPX Aogonek ydieresis -30 KPX Aring C -40 KPX Aring Cacute -40 KPX Aring Ccaron -40 KPX Aring Ccedilla -40 KPX Aring G -50 KPX Aring Gbreve -50 KPX Aring Gcommaaccent -50 KPX Aring O -40 KPX Aring Oacute -40 KPX Aring Ocircumflex -40 KPX Aring Odieresis -40 KPX Aring Ograve -40 KPX Aring Ohungarumlaut -40 KPX Aring Omacron -40 KPX Aring Oslash -40 KPX Aring Otilde -40 KPX Aring Q -40 KPX Aring T -90 KPX Aring Tcaron -90 KPX Aring Tcommaaccent -90 KPX Aring U -50 KPX Aring Uacute -50 KPX Aring Ucircumflex -50 KPX Aring Udieresis -50 KPX Aring Ugrave -50 KPX Aring Uhungarumlaut -50 KPX Aring Umacron -50 KPX Aring Uogonek -50 KPX Aring Uring -50 KPX Aring V -80 KPX Aring W -60 KPX Aring Y -110 KPX Aring Yacute -110 KPX Aring Ydieresis -110 KPX Aring u -30 KPX Aring uacute -30 KPX Aring ucircumflex -30 KPX Aring udieresis -30 KPX Aring ugrave -30 KPX Aring uhungarumlaut -30 KPX Aring umacron -30 KPX Aring uogonek -30 KPX Aring uring -30 KPX Aring v -40 KPX Aring w -30 KPX Aring y -30 KPX Aring yacute -30 KPX Aring ydieresis -30 KPX Atilde C -40 KPX Atilde Cacute -40 KPX Atilde Ccaron -40 KPX Atilde Ccedilla -40 KPX Atilde G -50 KPX Atilde Gbreve -50 KPX Atilde Gcommaaccent -50 KPX Atilde O -40 KPX Atilde Oacute -40 KPX Atilde Ocircumflex -40 KPX Atilde Odieresis -40 KPX Atilde Ograve -40 KPX Atilde Ohungarumlaut -40 KPX Atilde Omacron -40 KPX Atilde Oslash -40 KPX Atilde Otilde -40 KPX Atilde Q -40 KPX Atilde T -90 KPX Atilde Tcaron -90 KPX Atilde Tcommaaccent -90 KPX Atilde U -50 KPX Atilde Uacute -50 KPX Atilde Ucircumflex -50 KPX Atilde Udieresis -50 KPX Atilde Ugrave -50 KPX Atilde Uhungarumlaut -50 KPX Atilde Umacron -50 KPX Atilde Uogonek -50 KPX Atilde Uring -50 KPX Atilde V -80 KPX Atilde W -60 KPX Atilde Y -110 KPX Atilde Yacute -110 KPX Atilde Ydieresis -110 KPX Atilde u -30 KPX Atilde uacute -30 KPX Atilde ucircumflex -30 KPX Atilde udieresis -30 KPX Atilde ugrave -30 KPX Atilde uhungarumlaut -30 KPX Atilde umacron -30 KPX Atilde uogonek -30 KPX Atilde uring -30 KPX Atilde v -40 KPX Atilde w -30 KPX Atilde y -30 KPX Atilde yacute -30 KPX Atilde ydieresis -30 KPX B A -30 KPX B Aacute -30 KPX B Abreve -30 KPX B Acircumflex -30 KPX B Adieresis -30 KPX B Agrave -30 KPX B Amacron -30 KPX B Aogonek -30 KPX B Aring -30 KPX B Atilde -30 KPX B U -10 KPX B Uacute -10 KPX B Ucircumflex -10 KPX B Udieresis -10 KPX B Ugrave -10 KPX B Uhungarumlaut -10 KPX B Umacron -10 KPX B Uogonek -10 KPX B Uring -10 KPX D A -40 KPX D Aacute -40 KPX D Abreve -40 KPX D Acircumflex -40 KPX D Adieresis -40 KPX D Agrave -40 KPX D Amacron -40 KPX D Aogonek -40 KPX D Aring -40 KPX D Atilde -40 KPX D V -40 KPX D W -40 KPX D Y -70 KPX D Yacute -70 KPX D Ydieresis -70 KPX D comma -30 KPX D period -30 KPX Dcaron A -40 KPX Dcaron Aacute -40 KPX Dcaron Abreve -40 KPX Dcaron Acircumflex -40 KPX Dcaron Adieresis -40 KPX Dcaron Agrave -40 KPX Dcaron Amacron -40 KPX Dcaron Aogonek -40 KPX Dcaron Aring -40 KPX Dcaron Atilde -40 KPX Dcaron V -40 KPX Dcaron W -40 KPX Dcaron Y -70 KPX Dcaron Yacute -70 KPX Dcaron Ydieresis -70 KPX Dcaron comma -30 KPX Dcaron period -30 KPX Dcroat A -40 KPX Dcroat Aacute -40 KPX Dcroat Abreve -40 KPX Dcroat Acircumflex -40 KPX Dcroat Adieresis -40 KPX Dcroat Agrave -40 KPX Dcroat Amacron -40 KPX Dcroat Aogonek -40 KPX Dcroat Aring -40 KPX Dcroat Atilde -40 KPX Dcroat V -40 KPX Dcroat W -40 KPX Dcroat Y -70 KPX Dcroat Yacute -70 KPX Dcroat Ydieresis -70 KPX Dcroat comma -30 KPX Dcroat period -30 KPX F A -80 KPX F Aacute -80 KPX F Abreve -80 KPX F Acircumflex -80 KPX F Adieresis -80 KPX F Agrave -80 KPX F Amacron -80 KPX F Aogonek -80 KPX F Aring -80 KPX F Atilde -80 KPX F a -20 KPX F aacute -20 KPX F abreve -20 KPX F acircumflex -20 KPX F adieresis -20 KPX F agrave -20 KPX F amacron -20 KPX F aogonek -20 KPX F aring -20 KPX F atilde -20 KPX F comma -100 KPX F period -100 KPX J A -20 KPX J Aacute -20 KPX J Abreve -20 KPX J Acircumflex -20 KPX J Adieresis -20 KPX J Agrave -20 KPX J Amacron -20 KPX J Aogonek -20 KPX J Aring -20 KPX J Atilde -20 KPX J comma -20 KPX J period -20 KPX J u -20 KPX J uacute -20 KPX J ucircumflex -20 KPX J udieresis -20 KPX J ugrave -20 KPX J uhungarumlaut -20 KPX J umacron -20 KPX J uogonek -20 KPX J uring -20 KPX K O -30 KPX K Oacute -30 KPX K Ocircumflex -30 KPX K Odieresis -30 KPX K Ograve -30 KPX K Ohungarumlaut -30 KPX K Omacron -30 KPX K Oslash -30 KPX K Otilde -30 KPX K e -15 KPX K eacute -15 KPX K ecaron -15 KPX K ecircumflex -15 KPX K edieresis -15 KPX K edotaccent -15 KPX K egrave -15 KPX K emacron -15 KPX K eogonek -15 KPX K o -35 KPX K oacute -35 KPX K ocircumflex -35 KPX K odieresis -35 KPX K ograve -35 KPX K ohungarumlaut -35 KPX K omacron -35 KPX K oslash -35 KPX K otilde -35 KPX K u -30 KPX K uacute -30 KPX K ucircumflex -30 KPX K udieresis -30 KPX K ugrave -30 KPX K uhungarumlaut -30 KPX K umacron -30 KPX K uogonek -30 KPX K uring -30 KPX K y -40 KPX K yacute -40 KPX K ydieresis -40 KPX Kcommaaccent O -30 KPX Kcommaaccent Oacute -30 KPX Kcommaaccent Ocircumflex -30 KPX Kcommaaccent Odieresis -30 KPX Kcommaaccent Ograve -30 KPX Kcommaaccent Ohungarumlaut -30 KPX Kcommaaccent Omacron -30 KPX Kcommaaccent Oslash -30 KPX Kcommaaccent Otilde -30 KPX Kcommaaccent e -15 KPX Kcommaaccent eacute -15 KPX Kcommaaccent ecaron -15 KPX Kcommaaccent ecircumflex -15 KPX Kcommaaccent edieresis -15 KPX Kcommaaccent edotaccent -15 KPX Kcommaaccent egrave -15 KPX Kcommaaccent emacron -15 KPX Kcommaaccent eogonek -15 KPX Kcommaaccent o -35 KPX Kcommaaccent oacute -35 KPX Kcommaaccent ocircumflex -35 KPX Kcommaaccent odieresis -35 KPX Kcommaaccent ograve -35 KPX Kcommaaccent ohungarumlaut -35 KPX Kcommaaccent omacron -35 KPX Kcommaaccent oslash -35 KPX Kcommaaccent otilde -35 KPX Kcommaaccent u -30 KPX Kcommaaccent uacute -30 KPX Kcommaaccent ucircumflex -30 KPX Kcommaaccent udieresis -30 KPX Kcommaaccent ugrave -30 KPX Kcommaaccent uhungarumlaut -30 KPX Kcommaaccent umacron -30 KPX Kcommaaccent uogonek -30 KPX Kcommaaccent uring -30 KPX Kcommaaccent y -40 KPX Kcommaaccent yacute -40 KPX Kcommaaccent ydieresis -40 KPX L T -90 KPX L Tcaron -90 KPX L Tcommaaccent -90 KPX L V -110 KPX L W -80 KPX L Y -120 KPX L Yacute -120 KPX L Ydieresis -120 KPX L quotedblright -140 KPX L quoteright -140 KPX L y -30 KPX L yacute -30 KPX L ydieresis -30 KPX Lacute T -90 KPX Lacute Tcaron -90 KPX Lacute Tcommaaccent -90 KPX Lacute V -110 KPX Lacute W -80 KPX Lacute Y -120 KPX Lacute Yacute -120 KPX Lacute Ydieresis -120 KPX Lacute quotedblright -140 KPX Lacute quoteright -140 KPX Lacute y -30 KPX Lacute yacute -30 KPX Lacute ydieresis -30 KPX Lcommaaccent T -90 KPX Lcommaaccent Tcaron -90 KPX Lcommaaccent Tcommaaccent -90 KPX Lcommaaccent V -110 KPX Lcommaaccent W -80 KPX Lcommaaccent Y -120 KPX Lcommaaccent Yacute -120 KPX Lcommaaccent Ydieresis -120 KPX Lcommaaccent quotedblright -140 KPX Lcommaaccent quoteright -140 KPX Lcommaaccent y -30 KPX Lcommaaccent yacute -30 KPX Lcommaaccent ydieresis -30 KPX Lslash T -90 KPX Lslash Tcaron -90 KPX Lslash Tcommaaccent -90 KPX Lslash V -110 KPX Lslash W -80 KPX Lslash Y -120 KPX Lslash Yacute -120 KPX Lslash Ydieresis -120 KPX Lslash quotedblright -140 KPX Lslash quoteright -140 KPX Lslash y -30 KPX Lslash yacute -30 KPX Lslash ydieresis -30 KPX O A -50 KPX O Aacute -50 KPX O Abreve -50 KPX O Acircumflex -50 KPX O Adieresis -50 KPX O Agrave -50 KPX O Amacron -50 KPX O Aogonek -50 KPX O Aring -50 KPX O Atilde -50 KPX O T -40 KPX O Tcaron -40 KPX O Tcommaaccent -40 KPX O V -50 KPX O W -50 KPX O X -50 KPX O Y -70 KPX O Yacute -70 KPX O Ydieresis -70 KPX O comma -40 KPX O period -40 KPX Oacute A -50 KPX Oacute Aacute -50 KPX Oacute Abreve -50 KPX Oacute Acircumflex -50 KPX Oacute Adieresis -50 KPX Oacute Agrave -50 KPX Oacute Amacron -50 KPX Oacute Aogonek -50 KPX Oacute Aring -50 KPX Oacute Atilde -50 KPX Oacute T -40 KPX Oacute Tcaron -40 KPX Oacute Tcommaaccent -40 KPX Oacute V -50 KPX Oacute W -50 KPX Oacute X -50 KPX Oacute Y -70 KPX Oacute Yacute -70 KPX Oacute Ydieresis -70 KPX Oacute comma -40 KPX Oacute period -40 KPX Ocircumflex A -50 KPX Ocircumflex Aacute -50 KPX Ocircumflex Abreve -50 KPX Ocircumflex Acircumflex -50 KPX Ocircumflex Adieresis -50 KPX Ocircumflex Agrave -50 KPX Ocircumflex Amacron -50 KPX Ocircumflex Aogonek -50 KPX Ocircumflex Aring -50 KPX Ocircumflex Atilde -50 KPX Ocircumflex T -40 KPX Ocircumflex Tcaron -40 KPX Ocircumflex Tcommaaccent -40 KPX Ocircumflex V -50 KPX Ocircumflex W -50 KPX Ocircumflex X -50 KPX Ocircumflex Y -70 KPX Ocircumflex Yacute -70 KPX Ocircumflex Ydieresis -70 KPX Ocircumflex comma -40 KPX Ocircumflex period -40 KPX Odieresis A -50 KPX Odieresis Aacute -50 KPX Odieresis Abreve -50 KPX Odieresis Acircumflex -50 KPX Odieresis Adieresis -50 KPX Odieresis Agrave -50 KPX Odieresis Amacron -50 KPX Odieresis Aogonek -50 KPX Odieresis Aring -50 KPX Odieresis Atilde -50 KPX Odieresis T -40 KPX Odieresis Tcaron -40 KPX Odieresis Tcommaaccent -40 KPX Odieresis V -50 KPX Odieresis W -50 KPX Odieresis X -50 KPX Odieresis Y -70 KPX Odieresis Yacute -70 KPX Odieresis Ydieresis -70 KPX Odieresis comma -40 KPX Odieresis period -40 KPX Ograve A -50 KPX Ograve Aacute -50 KPX Ograve Abreve -50 KPX Ograve Acircumflex -50 KPX Ograve Adieresis -50 KPX Ograve Agrave -50 KPX Ograve Amacron -50 KPX Ograve Aogonek -50 KPX Ograve Aring -50 KPX Ograve Atilde -50 KPX Ograve T -40 KPX Ograve Tcaron -40 KPX Ograve Tcommaaccent -40 KPX Ograve V -50 KPX Ograve W -50 KPX Ograve X -50 KPX Ograve Y -70 KPX Ograve Yacute -70 KPX Ograve Ydieresis -70 KPX Ograve comma -40 KPX Ograve period -40 KPX Ohungarumlaut A -50 KPX Ohungarumlaut Aacute -50 KPX Ohungarumlaut Abreve -50 KPX Ohungarumlaut Acircumflex -50 KPX Ohungarumlaut Adieresis -50 KPX Ohungarumlaut Agrave -50 KPX Ohungarumlaut Amacron -50 KPX Ohungarumlaut Aogonek -50 KPX Ohungarumlaut Aring -50 KPX Ohungarumlaut Atilde -50 KPX Ohungarumlaut T -40 KPX Ohungarumlaut Tcaron -40 KPX Ohungarumlaut Tcommaaccent -40 KPX Ohungarumlaut V -50 KPX Ohungarumlaut W -50 KPX Ohungarumlaut X -50 KPX Ohungarumlaut Y -70 KPX Ohungarumlaut Yacute -70 KPX Ohungarumlaut Ydieresis -70 KPX Ohungarumlaut comma -40 KPX Ohungarumlaut period -40 KPX Omacron A -50 KPX Omacron Aacute -50 KPX Omacron Abreve -50 KPX Omacron Acircumflex -50 KPX Omacron Adieresis -50 KPX Omacron Agrave -50 KPX Omacron Amacron -50 KPX Omacron Aogonek -50 KPX Omacron Aring -50 KPX Omacron Atilde -50 KPX Omacron T -40 KPX Omacron Tcaron -40 KPX Omacron Tcommaaccent -40 KPX Omacron V -50 KPX Omacron W -50 KPX Omacron X -50 KPX Omacron Y -70 KPX Omacron Yacute -70 KPX Omacron Ydieresis -70 KPX Omacron comma -40 KPX Omacron period -40 KPX Oslash A -50 KPX Oslash Aacute -50 KPX Oslash Abreve -50 KPX Oslash Acircumflex -50 KPX Oslash Adieresis -50 KPX Oslash Agrave -50 KPX Oslash Amacron -50 KPX Oslash Aogonek -50 KPX Oslash Aring -50 KPX Oslash Atilde -50 KPX Oslash T -40 KPX Oslash Tcaron -40 KPX Oslash Tcommaaccent -40 KPX Oslash V -50 KPX Oslash W -50 KPX Oslash X -50 KPX Oslash Y -70 KPX Oslash Yacute -70 KPX Oslash Ydieresis -70 KPX Oslash comma -40 KPX Oslash period -40 KPX Otilde A -50 KPX Otilde Aacute -50 KPX Otilde Abreve -50 KPX Otilde Acircumflex -50 KPX Otilde Adieresis -50 KPX Otilde Agrave -50 KPX Otilde Amacron -50 KPX Otilde Aogonek -50 KPX Otilde Aring -50 KPX Otilde Atilde -50 KPX Otilde T -40 KPX Otilde Tcaron -40 KPX Otilde Tcommaaccent -40 KPX Otilde V -50 KPX Otilde W -50 KPX Otilde X -50 KPX Otilde Y -70 KPX Otilde Yacute -70 KPX Otilde Ydieresis -70 KPX Otilde comma -40 KPX Otilde period -40 KPX P A -100 KPX P Aacute -100 KPX P Abreve -100 KPX P Acircumflex -100 KPX P Adieresis -100 KPX P Agrave -100 KPX P Amacron -100 KPX P Aogonek -100 KPX P Aring -100 KPX P Atilde -100 KPX P a -30 KPX P aacute -30 KPX P abreve -30 KPX P acircumflex -30 KPX P adieresis -30 KPX P agrave -30 KPX P amacron -30 KPX P aogonek -30 KPX P aring -30 KPX P atilde -30 KPX P comma -120 KPX P e -30 KPX P eacute -30 KPX P ecaron -30 KPX P ecircumflex -30 KPX P edieresis -30 KPX P edotaccent -30 KPX P egrave -30 KPX P emacron -30 KPX P eogonek -30 KPX P o -40 KPX P oacute -40 KPX P ocircumflex -40 KPX P odieresis -40 KPX P ograve -40 KPX P ohungarumlaut -40 KPX P omacron -40 KPX P oslash -40 KPX P otilde -40 KPX P period -120 KPX Q U -10 KPX Q Uacute -10 KPX Q Ucircumflex -10 KPX Q Udieresis -10 KPX Q Ugrave -10 KPX Q Uhungarumlaut -10 KPX Q Umacron -10 KPX Q Uogonek -10 KPX Q Uring -10 KPX Q comma 20 KPX Q period 20 KPX R O -20 KPX R Oacute -20 KPX R Ocircumflex -20 KPX R Odieresis -20 KPX R Ograve -20 KPX R Ohungarumlaut -20 KPX R Omacron -20 KPX R Oslash -20 KPX R Otilde -20 KPX R T -20 KPX R Tcaron -20 KPX R Tcommaaccent -20 KPX R U -20 KPX R Uacute -20 KPX R Ucircumflex -20 KPX R Udieresis -20 KPX R Ugrave -20 KPX R Uhungarumlaut -20 KPX R Umacron -20 KPX R Uogonek -20 KPX R Uring -20 KPX R V -50 KPX R W -40 KPX R Y -50 KPX R Yacute -50 KPX R Ydieresis -50 KPX Racute O -20 KPX Racute Oacute -20 KPX Racute Ocircumflex -20 KPX Racute Odieresis -20 KPX Racute Ograve -20 KPX Racute Ohungarumlaut -20 KPX Racute Omacron -20 KPX Racute Oslash -20 KPX Racute Otilde -20 KPX Racute T -20 KPX Racute Tcaron -20 KPX Racute Tcommaaccent -20 KPX Racute U -20 KPX Racute Uacute -20 KPX Racute Ucircumflex -20 KPX Racute Udieresis -20 KPX Racute Ugrave -20 KPX Racute Uhungarumlaut -20 KPX Racute Umacron -20 KPX Racute Uogonek -20 KPX Racute Uring -20 KPX Racute V -50 KPX Racute W -40 KPX Racute Y -50 KPX Racute Yacute -50 KPX Racute Ydieresis -50 KPX Rcaron O -20 KPX Rcaron Oacute -20 KPX Rcaron Ocircumflex -20 KPX Rcaron Odieresis -20 KPX Rcaron Ograve -20 KPX Rcaron Ohungarumlaut -20 KPX Rcaron Omacron -20 KPX Rcaron Oslash -20 KPX Rcaron Otilde -20 KPX Rcaron T -20 KPX Rcaron Tcaron -20 KPX Rcaron Tcommaaccent -20 KPX Rcaron U -20 KPX Rcaron Uacute -20 KPX Rcaron Ucircumflex -20 KPX Rcaron Udieresis -20 KPX Rcaron Ugrave -20 KPX Rcaron Uhungarumlaut -20 KPX Rcaron Umacron -20 KPX Rcaron Uogonek -20 KPX Rcaron Uring -20 KPX Rcaron V -50 KPX Rcaron W -40 KPX Rcaron Y -50 KPX Rcaron Yacute -50 KPX Rcaron Ydieresis -50 KPX Rcommaaccent O -20 KPX Rcommaaccent Oacute -20 KPX Rcommaaccent Ocircumflex -20 KPX Rcommaaccent Odieresis -20 KPX Rcommaaccent Ograve -20 KPX Rcommaaccent Ohungarumlaut -20 KPX Rcommaaccent Omacron -20 KPX Rcommaaccent Oslash -20 KPX Rcommaaccent Otilde -20 KPX Rcommaaccent T -20 KPX Rcommaaccent Tcaron -20 KPX Rcommaaccent Tcommaaccent -20 KPX Rcommaaccent U -20 KPX Rcommaaccent Uacute -20 KPX Rcommaaccent Ucircumflex -20 KPX Rcommaaccent Udieresis -20 KPX Rcommaaccent Ugrave -20 KPX Rcommaaccent Uhungarumlaut -20 KPX Rcommaaccent Umacron -20 KPX Rcommaaccent Uogonek -20 KPX Rcommaaccent Uring -20 KPX Rcommaaccent V -50 KPX Rcommaaccent W -40 KPX Rcommaaccent Y -50 KPX Rcommaaccent Yacute -50 KPX Rcommaaccent Ydieresis -50 KPX T A -90 KPX T Aacute -90 KPX T Abreve -90 KPX T Acircumflex -90 KPX T Adieresis -90 KPX T Agrave -90 KPX T Amacron -90 KPX T Aogonek -90 KPX T Aring -90 KPX T Atilde -90 KPX T O -40 KPX T Oacute -40 KPX T Ocircumflex -40 KPX T Odieresis -40 KPX T Ograve -40 KPX T Ohungarumlaut -40 KPX T Omacron -40 KPX T Oslash -40 KPX T Otilde -40 KPX T a -80 KPX T aacute -80 KPX T abreve -80 KPX T acircumflex -80 KPX T adieresis -80 KPX T agrave -80 KPX T amacron -80 KPX T aogonek -80 KPX T aring -80 KPX T atilde -80 KPX T colon -40 KPX T comma -80 KPX T e -60 KPX T eacute -60 KPX T ecaron -60 KPX T ecircumflex -60 KPX T edieresis -60 KPX T edotaccent -60 KPX T egrave -60 KPX T emacron -60 KPX T eogonek -60 KPX T hyphen -120 KPX T o -80 KPX T oacute -80 KPX T ocircumflex -80 KPX T odieresis -80 KPX T ograve -80 KPX T ohungarumlaut -80 KPX T omacron -80 KPX T oslash -80 KPX T otilde -80 KPX T period -80 KPX T r -80 KPX T racute -80 KPX T rcommaaccent -80 KPX T semicolon -40 KPX T u -90 KPX T uacute -90 KPX T ucircumflex -90 KPX T udieresis -90 KPX T ugrave -90 KPX T uhungarumlaut -90 KPX T umacron -90 KPX T uogonek -90 KPX T uring -90 KPX T w -60 KPX T y -60 KPX T yacute -60 KPX T ydieresis -60 KPX Tcaron A -90 KPX Tcaron Aacute -90 KPX Tcaron Abreve -90 KPX Tcaron Acircumflex -90 KPX Tcaron Adieresis -90 KPX Tcaron Agrave -90 KPX Tcaron Amacron -90 KPX Tcaron Aogonek -90 KPX Tcaron Aring -90 KPX Tcaron Atilde -90 KPX Tcaron O -40 KPX Tcaron Oacute -40 KPX Tcaron Ocircumflex -40 KPX Tcaron Odieresis -40 KPX Tcaron Ograve -40 KPX Tcaron Ohungarumlaut -40 KPX Tcaron Omacron -40 KPX Tcaron Oslash -40 KPX Tcaron Otilde -40 KPX Tcaron a -80 KPX Tcaron aacute -80 KPX Tcaron abreve -80 KPX Tcaron acircumflex -80 KPX Tcaron adieresis -80 KPX Tcaron agrave -80 KPX Tcaron amacron -80 KPX Tcaron aogonek -80 KPX Tcaron aring -80 KPX Tcaron atilde -80 KPX Tcaron colon -40 KPX Tcaron comma -80 KPX Tcaron e -60 KPX Tcaron eacute -60 KPX Tcaron ecaron -60 KPX Tcaron ecircumflex -60 KPX Tcaron edieresis -60 KPX Tcaron edotaccent -60 KPX Tcaron egrave -60 KPX Tcaron emacron -60 KPX Tcaron eogonek -60 KPX Tcaron hyphen -120 KPX Tcaron o -80 KPX Tcaron oacute -80 KPX Tcaron ocircumflex -80 KPX Tcaron odieresis -80 KPX Tcaron ograve -80 KPX Tcaron ohungarumlaut -80 KPX Tcaron omacron -80 KPX Tcaron oslash -80 KPX Tcaron otilde -80 KPX Tcaron period -80 KPX Tcaron r -80 KPX Tcaron racute -80 KPX Tcaron rcommaaccent -80 KPX Tcaron semicolon -40 KPX Tcaron u -90 KPX Tcaron uacute -90 KPX Tcaron ucircumflex -90 KPX Tcaron udieresis -90 KPX Tcaron ugrave -90 KPX Tcaron uhungarumlaut -90 KPX Tcaron umacron -90 KPX Tcaron uogonek -90 KPX Tcaron uring -90 KPX Tcaron w -60 KPX Tcaron y -60 KPX Tcaron yacute -60 KPX Tcaron ydieresis -60 KPX Tcommaaccent A -90 KPX Tcommaaccent Aacute -90 KPX Tcommaaccent Abreve -90 KPX Tcommaaccent Acircumflex -90 KPX Tcommaaccent Adieresis -90 KPX Tcommaaccent Agrave -90 KPX Tcommaaccent Amacron -90 KPX Tcommaaccent Aogonek -90 KPX Tcommaaccent Aring -90 KPX Tcommaaccent Atilde -90 KPX Tcommaaccent O -40 KPX Tcommaaccent Oacute -40 KPX Tcommaaccent Ocircumflex -40 KPX Tcommaaccent Odieresis -40 KPX Tcommaaccent Ograve -40 KPX Tcommaaccent Ohungarumlaut -40 KPX Tcommaaccent Omacron -40 KPX Tcommaaccent Oslash -40 KPX Tcommaaccent Otilde -40 KPX Tcommaaccent a -80 KPX Tcommaaccent aacute -80 KPX Tcommaaccent abreve -80 KPX Tcommaaccent acircumflex -80 KPX Tcommaaccent adieresis -80 KPX Tcommaaccent agrave -80 KPX Tcommaaccent amacron -80 KPX Tcommaaccent aogonek -80 KPX Tcommaaccent aring -80 KPX Tcommaaccent atilde -80 KPX Tcommaaccent colon -40 KPX Tcommaaccent comma -80 KPX Tcommaaccent e -60 KPX Tcommaaccent eacute -60 KPX Tcommaaccent ecaron -60 KPX Tcommaaccent ecircumflex -60 KPX Tcommaaccent edieresis -60 KPX Tcommaaccent edotaccent -60 KPX Tcommaaccent egrave -60 KPX Tcommaaccent emacron -60 KPX Tcommaaccent eogonek -60 KPX Tcommaaccent hyphen -120 KPX Tcommaaccent o -80 KPX Tcommaaccent oacute -80 KPX Tcommaaccent ocircumflex -80 KPX Tcommaaccent odieresis -80 KPX Tcommaaccent ograve -80 KPX Tcommaaccent ohungarumlaut -80 KPX Tcommaaccent omacron -80 KPX Tcommaaccent oslash -80 KPX Tcommaaccent otilde -80 KPX Tcommaaccent period -80 KPX Tcommaaccent r -80 KPX Tcommaaccent racute -80 KPX Tcommaaccent rcommaaccent -80 KPX Tcommaaccent semicolon -40 KPX Tcommaaccent u -90 KPX Tcommaaccent uacute -90 KPX Tcommaaccent ucircumflex -90 KPX Tcommaaccent udieresis -90 KPX Tcommaaccent ugrave -90 KPX Tcommaaccent uhungarumlaut -90 KPX Tcommaaccent umacron -90 KPX Tcommaaccent uogonek -90 KPX Tcommaaccent uring -90 KPX Tcommaaccent w -60 KPX Tcommaaccent y -60 KPX Tcommaaccent yacute -60 KPX Tcommaaccent ydieresis -60 KPX U A -50 KPX U Aacute -50 KPX U Abreve -50 KPX U Acircumflex -50 KPX U Adieresis -50 KPX U Agrave -50 KPX U Amacron -50 KPX U Aogonek -50 KPX U Aring -50 KPX U Atilde -50 KPX U comma -30 KPX U period -30 KPX Uacute A -50 KPX Uacute Aacute -50 KPX Uacute Abreve -50 KPX Uacute Acircumflex -50 KPX Uacute Adieresis -50 KPX Uacute Agrave -50 KPX Uacute Amacron -50 KPX Uacute Aogonek -50 KPX Uacute Aring -50 KPX Uacute Atilde -50 KPX Uacute comma -30 KPX Uacute period -30 KPX Ucircumflex A -50 KPX Ucircumflex Aacute -50 KPX Ucircumflex Abreve -50 KPX Ucircumflex Acircumflex -50 KPX Ucircumflex Adieresis -50 KPX Ucircumflex Agrave -50 KPX Ucircumflex Amacron -50 KPX Ucircumflex Aogonek -50 KPX Ucircumflex Aring -50 KPX Ucircumflex Atilde -50 KPX Ucircumflex comma -30 KPX Ucircumflex period -30 KPX Udieresis A -50 KPX Udieresis Aacute -50 KPX Udieresis Abreve -50 KPX Udieresis Acircumflex -50 KPX Udieresis Adieresis -50 KPX Udieresis Agrave -50 KPX Udieresis Amacron -50 KPX Udieresis Aogonek -50 KPX Udieresis Aring -50 KPX Udieresis Atilde -50 KPX Udieresis comma -30 KPX Udieresis period -30 KPX Ugrave A -50 KPX Ugrave Aacute -50 KPX Ugrave Abreve -50 KPX Ugrave Acircumflex -50 KPX Ugrave Adieresis -50 KPX Ugrave Agrave -50 KPX Ugrave Amacron -50 KPX Ugrave Aogonek -50 KPX Ugrave Aring -50 KPX Ugrave Atilde -50 KPX Ugrave comma -30 KPX Ugrave period -30 KPX Uhungarumlaut A -50 KPX Uhungarumlaut Aacute -50 KPX Uhungarumlaut Abreve -50 KPX Uhungarumlaut Acircumflex -50 KPX Uhungarumlaut Adieresis -50 KPX Uhungarumlaut Agrave -50 KPX Uhungarumlaut Amacron -50 KPX Uhungarumlaut Aogonek -50 KPX Uhungarumlaut Aring -50 KPX Uhungarumlaut Atilde -50 KPX Uhungarumlaut comma -30 KPX Uhungarumlaut period -30 KPX Umacron A -50 KPX Umacron Aacute -50 KPX Umacron Abreve -50 KPX Umacron Acircumflex -50 KPX Umacron Adieresis -50 KPX Umacron Agrave -50 KPX Umacron Amacron -50 KPX Umacron Aogonek -50 KPX Umacron Aring -50 KPX Umacron Atilde -50 KPX Umacron comma -30 KPX Umacron period -30 KPX Uogonek A -50 KPX Uogonek Aacute -50 KPX Uogonek Abreve -50 KPX Uogonek Acircumflex -50 KPX Uogonek Adieresis -50 KPX Uogonek Agrave -50 KPX Uogonek Amacron -50 KPX Uogonek Aogonek -50 KPX Uogonek Aring -50 KPX Uogonek Atilde -50 KPX Uogonek comma -30 KPX Uogonek period -30 KPX Uring A -50 KPX Uring Aacute -50 KPX Uring Abreve -50 KPX Uring Acircumflex -50 KPX Uring Adieresis -50 KPX Uring Agrave -50 KPX Uring Amacron -50 KPX Uring Aogonek -50 KPX Uring Aring -50 KPX Uring Atilde -50 KPX Uring comma -30 KPX Uring period -30 KPX V A -80 KPX V Aacute -80 KPX V Abreve -80 KPX V Acircumflex -80 KPX V Adieresis -80 KPX V Agrave -80 KPX V Amacron -80 KPX V Aogonek -80 KPX V Aring -80 KPX V Atilde -80 KPX V G -50 KPX V Gbreve -50 KPX V Gcommaaccent -50 KPX V O -50 KPX V Oacute -50 KPX V Ocircumflex -50 KPX V Odieresis -50 KPX V Ograve -50 KPX V Ohungarumlaut -50 KPX V Omacron -50 KPX V Oslash -50 KPX V Otilde -50 KPX V a -60 KPX V aacute -60 KPX V abreve -60 KPX V acircumflex -60 KPX V adieresis -60 KPX V agrave -60 KPX V amacron -60 KPX V aogonek -60 KPX V aring -60 KPX V atilde -60 KPX V colon -40 KPX V comma -120 KPX V e -50 KPX V eacute -50 KPX V ecaron -50 KPX V ecircumflex -50 KPX V edieresis -50 KPX V edotaccent -50 KPX V egrave -50 KPX V emacron -50 KPX V eogonek -50 KPX V hyphen -80 KPX V o -90 KPX V oacute -90 KPX V ocircumflex -90 KPX V odieresis -90 KPX V ograve -90 KPX V ohungarumlaut -90 KPX V omacron -90 KPX V oslash -90 KPX V otilde -90 KPX V period -120 KPX V semicolon -40 KPX V u -60 KPX V uacute -60 KPX V ucircumflex -60 KPX V udieresis -60 KPX V ugrave -60 KPX V uhungarumlaut -60 KPX V umacron -60 KPX V uogonek -60 KPX V uring -60 KPX W A -60 KPX W Aacute -60 KPX W Abreve -60 KPX W Acircumflex -60 KPX W Adieresis -60 KPX W Agrave -60 KPX W Amacron -60 KPX W Aogonek -60 KPX W Aring -60 KPX W Atilde -60 KPX W O -20 KPX W Oacute -20 KPX W Ocircumflex -20 KPX W Odieresis -20 KPX W Ograve -20 KPX W Ohungarumlaut -20 KPX W Omacron -20 KPX W Oslash -20 KPX W Otilde -20 KPX W a -40 KPX W aacute -40 KPX W abreve -40 KPX W acircumflex -40 KPX W adieresis -40 KPX W agrave -40 KPX W amacron -40 KPX W aogonek -40 KPX W aring -40 KPX W atilde -40 KPX W colon -10 KPX W comma -80 KPX W e -35 KPX W eacute -35 KPX W ecaron -35 KPX W ecircumflex -35 KPX W edieresis -35 KPX W edotaccent -35 KPX W egrave -35 KPX W emacron -35 KPX W eogonek -35 KPX W hyphen -40 KPX W o -60 KPX W oacute -60 KPX W ocircumflex -60 KPX W odieresis -60 KPX W ograve -60 KPX W ohungarumlaut -60 KPX W omacron -60 KPX W oslash -60 KPX W otilde -60 KPX W period -80 KPX W semicolon -10 KPX W u -45 KPX W uacute -45 KPX W ucircumflex -45 KPX W udieresis -45 KPX W ugrave -45 KPX W uhungarumlaut -45 KPX W umacron -45 KPX W uogonek -45 KPX W uring -45 KPX W y -20 KPX W yacute -20 KPX W ydieresis -20 KPX Y A -110 KPX Y Aacute -110 KPX Y Abreve -110 KPX Y Acircumflex -110 KPX Y Adieresis -110 KPX Y Agrave -110 KPX Y Amacron -110 KPX Y Aogonek -110 KPX Y Aring -110 KPX Y Atilde -110 KPX Y O -70 KPX Y Oacute -70 KPX Y Ocircumflex -70 KPX Y Odieresis -70 KPX Y Ograve -70 KPX Y Ohungarumlaut -70 KPX Y Omacron -70 KPX Y Oslash -70 KPX Y Otilde -70 KPX Y a -90 KPX Y aacute -90 KPX Y abreve -90 KPX Y acircumflex -90 KPX Y adieresis -90 KPX Y agrave -90 KPX Y amacron -90 KPX Y aogonek -90 KPX Y aring -90 KPX Y atilde -90 KPX Y colon -50 KPX Y comma -100 KPX Y e -80 KPX Y eacute -80 KPX Y ecaron -80 KPX Y ecircumflex -80 KPX Y edieresis -80 KPX Y edotaccent -80 KPX Y egrave -80 KPX Y emacron -80 KPX Y eogonek -80 KPX Y o -100 KPX Y oacute -100 KPX Y ocircumflex -100 KPX Y odieresis -100 KPX Y ograve -100 KPX Y ohungarumlaut -100 KPX Y omacron -100 KPX Y oslash -100 KPX Y otilde -100 KPX Y period -100 KPX Y semicolon -50 KPX Y u -100 KPX Y uacute -100 KPX Y ucircumflex -100 KPX Y udieresis -100 KPX Y ugrave -100 KPX Y uhungarumlaut -100 KPX Y umacron -100 KPX Y uogonek -100 KPX Y uring -100 KPX Yacute A -110 KPX Yacute Aacute -110 KPX Yacute Abreve -110 KPX Yacute Acircumflex -110 KPX Yacute Adieresis -110 KPX Yacute Agrave -110 KPX Yacute Amacron -110 KPX Yacute Aogonek -110 KPX Yacute Aring -110 KPX Yacute Atilde -110 KPX Yacute O -70 KPX Yacute Oacute -70 KPX Yacute Ocircumflex -70 KPX Yacute Odieresis -70 KPX Yacute Ograve -70 KPX Yacute Ohungarumlaut -70 KPX Yacute Omacron -70 KPX Yacute Oslash -70 KPX Yacute Otilde -70 KPX Yacute a -90 KPX Yacute aacute -90 KPX Yacute abreve -90 KPX Yacute acircumflex -90 KPX Yacute adieresis -90 KPX Yacute agrave -90 KPX Yacute amacron -90 KPX Yacute aogonek -90 KPX Yacute aring -90 KPX Yacute atilde -90 KPX Yacute colon -50 KPX Yacute comma -100 KPX Yacute e -80 KPX Yacute eacute -80 KPX Yacute ecaron -80 KPX Yacute ecircumflex -80 KPX Yacute edieresis -80 KPX Yacute edotaccent -80 KPX Yacute egrave -80 KPX Yacute emacron -80 KPX Yacute eogonek -80 KPX Yacute o -100 KPX Yacute oacute -100 KPX Yacute ocircumflex -100 KPX Yacute odieresis -100 KPX Yacute ograve -100 KPX Yacute ohungarumlaut -100 KPX Yacute omacron -100 KPX Yacute oslash -100 KPX Yacute otilde -100 KPX Yacute period -100 KPX Yacute semicolon -50 KPX Yacute u -100 KPX Yacute uacute -100 KPX Yacute ucircumflex -100 KPX Yacute udieresis -100 KPX Yacute ugrave -100 KPX Yacute uhungarumlaut -100 KPX Yacute umacron -100 KPX Yacute uogonek -100 KPX Yacute uring -100 KPX Ydieresis A -110 KPX Ydieresis Aacute -110 KPX Ydieresis Abreve -110 KPX Ydieresis Acircumflex -110 KPX Ydieresis Adieresis -110 KPX Ydieresis Agrave -110 KPX Ydieresis Amacron -110 KPX Ydieresis Aogonek -110 KPX Ydieresis Aring -110 KPX Ydieresis Atilde -110 KPX Ydieresis O -70 KPX Ydieresis Oacute -70 KPX Ydieresis Ocircumflex -70 KPX Ydieresis Odieresis -70 KPX Ydieresis Ograve -70 KPX Ydieresis Ohungarumlaut -70 KPX Ydieresis Omacron -70 KPX Ydieresis Oslash -70 KPX Ydieresis Otilde -70 KPX Ydieresis a -90 KPX Ydieresis aacute -90 KPX Ydieresis abreve -90 KPX Ydieresis acircumflex -90 KPX Ydieresis adieresis -90 KPX Ydieresis agrave -90 KPX Ydieresis amacron -90 KPX Ydieresis aogonek -90 KPX Ydieresis aring -90 KPX Ydieresis atilde -90 KPX Ydieresis colon -50 KPX Ydieresis comma -100 KPX Ydieresis e -80 KPX Ydieresis eacute -80 KPX Ydieresis ecaron -80 KPX Ydieresis ecircumflex -80 KPX Ydieresis edieresis -80 KPX Ydieresis edotaccent -80 KPX Ydieresis egrave -80 KPX Ydieresis emacron -80 KPX Ydieresis eogonek -80 KPX Ydieresis o -100 KPX Ydieresis oacute -100 KPX Ydieresis ocircumflex -100 KPX Ydieresis odieresis -100 KPX Ydieresis ograve -100 KPX Ydieresis ohungarumlaut -100 KPX Ydieresis omacron -100 KPX Ydieresis oslash -100 KPX Ydieresis otilde -100 KPX Ydieresis period -100 KPX Ydieresis semicolon -50 KPX Ydieresis u -100 KPX Ydieresis uacute -100 KPX Ydieresis ucircumflex -100 KPX Ydieresis udieresis -100 KPX Ydieresis ugrave -100 KPX Ydieresis uhungarumlaut -100 KPX Ydieresis umacron -100 KPX Ydieresis uogonek -100 KPX Ydieresis uring -100 KPX a g -10 KPX a gbreve -10 KPX a gcommaaccent -10 KPX a v -15 KPX a w -15 KPX a y -20 KPX a yacute -20 KPX a ydieresis -20 KPX aacute g -10 KPX aacute gbreve -10 KPX aacute gcommaaccent -10 KPX aacute v -15 KPX aacute w -15 KPX aacute y -20 KPX aacute yacute -20 KPX aacute ydieresis -20 KPX abreve g -10 KPX abreve gbreve -10 KPX abreve gcommaaccent -10 KPX abreve v -15 KPX abreve w -15 KPX abreve y -20 KPX abreve yacute -20 KPX abreve ydieresis -20 KPX acircumflex g -10 KPX acircumflex gbreve -10 KPX acircumflex gcommaaccent -10 KPX acircumflex v -15 KPX acircumflex w -15 KPX acircumflex y -20 KPX acircumflex yacute -20 KPX acircumflex ydieresis -20 KPX adieresis g -10 KPX adieresis gbreve -10 KPX adieresis gcommaaccent -10 KPX adieresis v -15 KPX adieresis w -15 KPX adieresis y -20 KPX adieresis yacute -20 KPX adieresis ydieresis -20 KPX agrave g -10 KPX agrave gbreve -10 KPX agrave gcommaaccent -10 KPX agrave v -15 KPX agrave w -15 KPX agrave y -20 KPX agrave yacute -20 KPX agrave ydieresis -20 KPX amacron g -10 KPX amacron gbreve -10 KPX amacron gcommaaccent -10 KPX amacron v -15 KPX amacron w -15 KPX amacron y -20 KPX amacron yacute -20 KPX amacron ydieresis -20 KPX aogonek g -10 KPX aogonek gbreve -10 KPX aogonek gcommaaccent -10 KPX aogonek v -15 KPX aogonek w -15 KPX aogonek y -20 KPX aogonek yacute -20 KPX aogonek ydieresis -20 KPX aring g -10 KPX aring gbreve -10 KPX aring gcommaaccent -10 KPX aring v -15 KPX aring w -15 KPX aring y -20 KPX aring yacute -20 KPX aring ydieresis -20 KPX atilde g -10 KPX atilde gbreve -10 KPX atilde gcommaaccent -10 KPX atilde v -15 KPX atilde w -15 KPX atilde y -20 KPX atilde yacute -20 KPX atilde ydieresis -20 KPX b l -10 KPX b lacute -10 KPX b lcommaaccent -10 KPX b lslash -10 KPX b u -20 KPX b uacute -20 KPX b ucircumflex -20 KPX b udieresis -20 KPX b ugrave -20 KPX b uhungarumlaut -20 KPX b umacron -20 KPX b uogonek -20 KPX b uring -20 KPX b v -20 KPX b y -20 KPX b yacute -20 KPX b ydieresis -20 KPX c h -10 KPX c k -20 KPX c kcommaaccent -20 KPX c l -20 KPX c lacute -20 KPX c lcommaaccent -20 KPX c lslash -20 KPX c y -10 KPX c yacute -10 KPX c ydieresis -10 KPX cacute h -10 KPX cacute k -20 KPX cacute kcommaaccent -20 KPX cacute l -20 KPX cacute lacute -20 KPX cacute lcommaaccent -20 KPX cacute lslash -20 KPX cacute y -10 KPX cacute yacute -10 KPX cacute ydieresis -10 KPX ccaron h -10 KPX ccaron k -20 KPX ccaron kcommaaccent -20 KPX ccaron l -20 KPX ccaron lacute -20 KPX ccaron lcommaaccent -20 KPX ccaron lslash -20 KPX ccaron y -10 KPX ccaron yacute -10 KPX ccaron ydieresis -10 KPX ccedilla h -10 KPX ccedilla k -20 KPX ccedilla kcommaaccent -20 KPX ccedilla l -20 KPX ccedilla lacute -20 KPX ccedilla lcommaaccent -20 KPX ccedilla lslash -20 KPX ccedilla y -10 KPX ccedilla yacute -10 KPX ccedilla ydieresis -10 KPX colon space -40 KPX comma quotedblright -120 KPX comma quoteright -120 KPX comma space -40 KPX d d -10 KPX d dcroat -10 KPX d v -15 KPX d w -15 KPX d y -15 KPX d yacute -15 KPX d ydieresis -15 KPX dcroat d -10 KPX dcroat dcroat -10 KPX dcroat v -15 KPX dcroat w -15 KPX dcroat y -15 KPX dcroat yacute -15 KPX dcroat ydieresis -15 KPX e comma 10 KPX e period 20 KPX e v -15 KPX e w -15 KPX e x -15 KPX e y -15 KPX e yacute -15 KPX e ydieresis -15 KPX eacute comma 10 KPX eacute period 20 KPX eacute v -15 KPX eacute w -15 KPX eacute x -15 KPX eacute y -15 KPX eacute yacute -15 KPX eacute ydieresis -15 KPX ecaron comma 10 KPX ecaron period 20 KPX ecaron v -15 KPX ecaron w -15 KPX ecaron x -15 KPX ecaron y -15 KPX ecaron yacute -15 KPX ecaron ydieresis -15 KPX ecircumflex comma 10 KPX ecircumflex period 20 KPX ecircumflex v -15 KPX ecircumflex w -15 KPX ecircumflex x -15 KPX ecircumflex y -15 KPX ecircumflex yacute -15 KPX ecircumflex ydieresis -15 KPX edieresis comma 10 KPX edieresis period 20 KPX edieresis v -15 KPX edieresis w -15 KPX edieresis x -15 KPX edieresis y -15 KPX edieresis yacute -15 KPX edieresis ydieresis -15 KPX edotaccent comma 10 KPX edotaccent period 20 KPX edotaccent v -15 KPX edotaccent w -15 KPX edotaccent x -15 KPX edotaccent y -15 KPX edotaccent yacute -15 KPX edotaccent ydieresis -15 KPX egrave comma 10 KPX egrave period 20 KPX egrave v -15 KPX egrave w -15 KPX egrave x -15 KPX egrave y -15 KPX egrave yacute -15 KPX egrave ydieresis -15 KPX emacron comma 10 KPX emacron period 20 KPX emacron v -15 KPX emacron w -15 KPX emacron x -15 KPX emacron y -15 KPX emacron yacute -15 KPX emacron ydieresis -15 KPX eogonek comma 10 KPX eogonek period 20 KPX eogonek v -15 KPX eogonek w -15 KPX eogonek x -15 KPX eogonek y -15 KPX eogonek yacute -15 KPX eogonek ydieresis -15 KPX f comma -10 KPX f e -10 KPX f eacute -10 KPX f ecaron -10 KPX f ecircumflex -10 KPX f edieresis -10 KPX f edotaccent -10 KPX f egrave -10 KPX f emacron -10 KPX f eogonek -10 KPX f o -20 KPX f oacute -20 KPX f ocircumflex -20 KPX f odieresis -20 KPX f ograve -20 KPX f ohungarumlaut -20 KPX f omacron -20 KPX f oslash -20 KPX f otilde -20 KPX f period -10 KPX f quotedblright 30 KPX f quoteright 30 KPX g e 10 KPX g eacute 10 KPX g ecaron 10 KPX g ecircumflex 10 KPX g edieresis 10 KPX g edotaccent 10 KPX g egrave 10 KPX g emacron 10 KPX g eogonek 10 KPX g g -10 KPX g gbreve -10 KPX g gcommaaccent -10 KPX gbreve e 10 KPX gbreve eacute 10 KPX gbreve ecaron 10 KPX gbreve ecircumflex 10 KPX gbreve edieresis 10 KPX gbreve edotaccent 10 KPX gbreve egrave 10 KPX gbreve emacron 10 KPX gbreve eogonek 10 KPX gbreve g -10 KPX gbreve gbreve -10 KPX gbreve gcommaaccent -10 KPX gcommaaccent e 10 KPX gcommaaccent eacute 10 KPX gcommaaccent ecaron 10 KPX gcommaaccent ecircumflex 10 KPX gcommaaccent edieresis 10 KPX gcommaaccent edotaccent 10 KPX gcommaaccent egrave 10 KPX gcommaaccent emacron 10 KPX gcommaaccent eogonek 10 KPX gcommaaccent g -10 KPX gcommaaccent gbreve -10 KPX gcommaaccent gcommaaccent -10 KPX h y -20 KPX h yacute -20 KPX h ydieresis -20 KPX k o -15 KPX k oacute -15 KPX k ocircumflex -15 KPX k odieresis -15 KPX k ograve -15 KPX k ohungarumlaut -15 KPX k omacron -15 KPX k oslash -15 KPX k otilde -15 KPX kcommaaccent o -15 KPX kcommaaccent oacute -15 KPX kcommaaccent ocircumflex -15 KPX kcommaaccent odieresis -15 KPX kcommaaccent ograve -15 KPX kcommaaccent ohungarumlaut -15 KPX kcommaaccent omacron -15 KPX kcommaaccent oslash -15 KPX kcommaaccent otilde -15 KPX l w -15 KPX l y -15 KPX l yacute -15 KPX l ydieresis -15 KPX lacute w -15 KPX lacute y -15 KPX lacute yacute -15 KPX lacute ydieresis -15 KPX lcommaaccent w -15 KPX lcommaaccent y -15 KPX lcommaaccent yacute -15 KPX lcommaaccent ydieresis -15 KPX lslash w -15 KPX lslash y -15 KPX lslash yacute -15 KPX lslash ydieresis -15 KPX m u -20 KPX m uacute -20 KPX m ucircumflex -20 KPX m udieresis -20 KPX m ugrave -20 KPX m uhungarumlaut -20 KPX m umacron -20 KPX m uogonek -20 KPX m uring -20 KPX m y -30 KPX m yacute -30 KPX m ydieresis -30 KPX n u -10 KPX n uacute -10 KPX n ucircumflex -10 KPX n udieresis -10 KPX n ugrave -10 KPX n uhungarumlaut -10 KPX n umacron -10 KPX n uogonek -10 KPX n uring -10 KPX n v -40 KPX n y -20 KPX n yacute -20 KPX n ydieresis -20 KPX nacute u -10 KPX nacute uacute -10 KPX nacute ucircumflex -10 KPX nacute udieresis -10 KPX nacute ugrave -10 KPX nacute uhungarumlaut -10 KPX nacute umacron -10 KPX nacute uogonek -10 KPX nacute uring -10 KPX nacute v -40 KPX nacute y -20 KPX nacute yacute -20 KPX nacute ydieresis -20 KPX ncaron u -10 KPX ncaron uacute -10 KPX ncaron ucircumflex -10 KPX ncaron udieresis -10 KPX ncaron ugrave -10 KPX ncaron uhungarumlaut -10 KPX ncaron umacron -10 KPX ncaron uogonek -10 KPX ncaron uring -10 KPX ncaron v -40 KPX ncaron y -20 KPX ncaron yacute -20 KPX ncaron ydieresis -20 KPX ncommaaccent u -10 KPX ncommaaccent uacute -10 KPX ncommaaccent ucircumflex -10 KPX ncommaaccent udieresis -10 KPX ncommaaccent ugrave -10 KPX ncommaaccent uhungarumlaut -10 KPX ncommaaccent umacron -10 KPX ncommaaccent uogonek -10 KPX ncommaaccent uring -10 KPX ncommaaccent v -40 KPX ncommaaccent y -20 KPX ncommaaccent yacute -20 KPX ncommaaccent ydieresis -20 KPX ntilde u -10 KPX ntilde uacute -10 KPX ntilde ucircumflex -10 KPX ntilde udieresis -10 KPX ntilde ugrave -10 KPX ntilde uhungarumlaut -10 KPX ntilde umacron -10 KPX ntilde uogonek -10 KPX ntilde uring -10 KPX ntilde v -40 KPX ntilde y -20 KPX ntilde yacute -20 KPX ntilde ydieresis -20 KPX o v -20 KPX o w -15 KPX o x -30 KPX o y -20 KPX o yacute -20 KPX o ydieresis -20 KPX oacute v -20 KPX oacute w -15 KPX oacute x -30 KPX oacute y -20 KPX oacute yacute -20 KPX oacute ydieresis -20 KPX ocircumflex v -20 KPX ocircumflex w -15 KPX ocircumflex x -30 KPX ocircumflex y -20 KPX ocircumflex yacute -20 KPX ocircumflex ydieresis -20 KPX odieresis v -20 KPX odieresis w -15 KPX odieresis x -30 KPX odieresis y -20 KPX odieresis yacute -20 KPX odieresis ydieresis -20 KPX ograve v -20 KPX ograve w -15 KPX ograve x -30 KPX ograve y -20 KPX ograve yacute -20 KPX ograve ydieresis -20 KPX ohungarumlaut v -20 KPX ohungarumlaut w -15 KPX ohungarumlaut x -30 KPX ohungarumlaut y -20 KPX ohungarumlaut yacute -20 KPX ohungarumlaut ydieresis -20 KPX omacron v -20 KPX omacron w -15 KPX omacron x -30 KPX omacron y -20 KPX omacron yacute -20 KPX omacron ydieresis -20 KPX oslash v -20 KPX oslash w -15 KPX oslash x -30 KPX oslash y -20 KPX oslash yacute -20 KPX oslash ydieresis -20 KPX otilde v -20 KPX otilde w -15 KPX otilde x -30 KPX otilde y -20 KPX otilde yacute -20 KPX otilde ydieresis -20 KPX p y -15 KPX p yacute -15 KPX p ydieresis -15 KPX period quotedblright -120 KPX period quoteright -120 KPX period space -40 KPX quotedblright space -80 KPX quoteleft quoteleft -46 KPX quoteright d -80 KPX quoteright dcroat -80 KPX quoteright l -20 KPX quoteright lacute -20 KPX quoteright lcommaaccent -20 KPX quoteright lslash -20 KPX quoteright quoteright -46 KPX quoteright r -40 KPX quoteright racute -40 KPX quoteright rcaron -40 KPX quoteright rcommaaccent -40 KPX quoteright s -60 KPX quoteright sacute -60 KPX quoteright scaron -60 KPX quoteright scedilla -60 KPX quoteright scommaaccent -60 KPX quoteright space -80 KPX quoteright v -20 KPX r c -20 KPX r cacute -20 KPX r ccaron -20 KPX r ccedilla -20 KPX r comma -60 KPX r d -20 KPX r dcroat -20 KPX r g -15 KPX r gbreve -15 KPX r gcommaaccent -15 KPX r hyphen -20 KPX r o -20 KPX r oacute -20 KPX r ocircumflex -20 KPX r odieresis -20 KPX r ograve -20 KPX r ohungarumlaut -20 KPX r omacron -20 KPX r oslash -20 KPX r otilde -20 KPX r period -60 KPX r q -20 KPX r s -15 KPX r sacute -15 KPX r scaron -15 KPX r scedilla -15 KPX r scommaaccent -15 KPX r t 20 KPX r tcommaaccent 20 KPX r v 10 KPX r y 10 KPX r yacute 10 KPX r ydieresis 10 KPX racute c -20 KPX racute cacute -20 KPX racute ccaron -20 KPX racute ccedilla -20 KPX racute comma -60 KPX racute d -20 KPX racute dcroat -20 KPX racute g -15 KPX racute gbreve -15 KPX racute gcommaaccent -15 KPX racute hyphen -20 KPX racute o -20 KPX racute oacute -20 KPX racute ocircumflex -20 KPX racute odieresis -20 KPX racute ograve -20 KPX racute ohungarumlaut -20 KPX racute omacron -20 KPX racute oslash -20 KPX racute otilde -20 KPX racute period -60 KPX racute q -20 KPX racute s -15 KPX racute sacute -15 KPX racute scaron -15 KPX racute scedilla -15 KPX racute scommaaccent -15 KPX racute t 20 KPX racute tcommaaccent 20 KPX racute v 10 KPX racute y 10 KPX racute yacute 10 KPX racute ydieresis 10 KPX rcaron c -20 KPX rcaron cacute -20 KPX rcaron ccaron -20 KPX rcaron ccedilla -20 KPX rcaron comma -60 KPX rcaron d -20 KPX rcaron dcroat -20 KPX rcaron g -15 KPX rcaron gbreve -15 KPX rcaron gcommaaccent -15 KPX rcaron hyphen -20 KPX rcaron o -20 KPX rcaron oacute -20 KPX rcaron ocircumflex -20 KPX rcaron odieresis -20 KPX rcaron ograve -20 KPX rcaron ohungarumlaut -20 KPX rcaron omacron -20 KPX rcaron oslash -20 KPX rcaron otilde -20 KPX rcaron period -60 KPX rcaron q -20 KPX rcaron s -15 KPX rcaron sacute -15 KPX rcaron scaron -15 KPX rcaron scedilla -15 KPX rcaron scommaaccent -15 KPX rcaron t 20 KPX rcaron tcommaaccent 20 KPX rcaron v 10 KPX rcaron y 10 KPX rcaron yacute 10 KPX rcaron ydieresis 10 KPX rcommaaccent c -20 KPX rcommaaccent cacute -20 KPX rcommaaccent ccaron -20 KPX rcommaaccent ccedilla -20 KPX rcommaaccent comma -60 KPX rcommaaccent d -20 KPX rcommaaccent dcroat -20 KPX rcommaaccent g -15 KPX rcommaaccent gbreve -15 KPX rcommaaccent gcommaaccent -15 KPX rcommaaccent hyphen -20 KPX rcommaaccent o -20 KPX rcommaaccent oacute -20 KPX rcommaaccent ocircumflex -20 KPX rcommaaccent odieresis -20 KPX rcommaaccent ograve -20 KPX rcommaaccent ohungarumlaut -20 KPX rcommaaccent omacron -20 KPX rcommaaccent oslash -20 KPX rcommaaccent otilde -20 KPX rcommaaccent period -60 KPX rcommaaccent q -20 KPX rcommaaccent s -15 KPX rcommaaccent sacute -15 KPX rcommaaccent scaron -15 KPX rcommaaccent scedilla -15 KPX rcommaaccent scommaaccent -15 KPX rcommaaccent t 20 KPX rcommaaccent tcommaaccent 20 KPX rcommaaccent v 10 KPX rcommaaccent y 10 KPX rcommaaccent yacute 10 KPX rcommaaccent ydieresis 10 KPX s w -15 KPX sacute w -15 KPX scaron w -15 KPX scedilla w -15 KPX scommaaccent w -15 KPX semicolon space -40 KPX space T -100 KPX space Tcaron -100 KPX space Tcommaaccent -100 KPX space V -80 KPX space W -80 KPX space Y -120 KPX space Yacute -120 KPX space Ydieresis -120 KPX space quotedblleft -80 KPX space quoteleft -60 KPX v a -20 KPX v aacute -20 KPX v abreve -20 KPX v acircumflex -20 KPX v adieresis -20 KPX v agrave -20 KPX v amacron -20 KPX v aogonek -20 KPX v aring -20 KPX v atilde -20 KPX v comma -80 KPX v o -30 KPX v oacute -30 KPX v ocircumflex -30 KPX v odieresis -30 KPX v ograve -30 KPX v ohungarumlaut -30 KPX v omacron -30 KPX v oslash -30 KPX v otilde -30 KPX v period -80 KPX w comma -40 KPX w o -20 KPX w oacute -20 KPX w ocircumflex -20 KPX w odieresis -20 KPX w ograve -20 KPX w ohungarumlaut -20 KPX w omacron -20 KPX w oslash -20 KPX w otilde -20 KPX w period -40 KPX x e -10 KPX x eacute -10 KPX x ecaron -10 KPX x ecircumflex -10 KPX x edieresis -10 KPX x edotaccent -10 KPX x egrave -10 KPX x emacron -10 KPX x eogonek -10 KPX y a -30 KPX y aacute -30 KPX y abreve -30 KPX y acircumflex -30 KPX y adieresis -30 KPX y agrave -30 KPX y amacron -30 KPX y aogonek -30 KPX y aring -30 KPX y atilde -30 KPX y comma -80 KPX y e -10 KPX y eacute -10 KPX y ecaron -10 KPX y ecircumflex -10 KPX y edieresis -10 KPX y edotaccent -10 KPX y egrave -10 KPX y emacron -10 KPX y eogonek -10 KPX y o -25 KPX y oacute -25 KPX y ocircumflex -25 KPX y odieresis -25 KPX y ograve -25 KPX y ohungarumlaut -25 KPX y omacron -25 KPX y oslash -25 KPX y otilde -25 KPX y period -80 KPX yacute a -30 KPX yacute aacute -30 KPX yacute abreve -30 KPX yacute acircumflex -30 KPX yacute adieresis -30 KPX yacute agrave -30 KPX yacute amacron -30 KPX yacute aogonek -30 KPX yacute aring -30 KPX yacute atilde -30 KPX yacute comma -80 KPX yacute e -10 KPX yacute eacute -10 KPX yacute ecaron -10 KPX yacute ecircumflex -10 KPX yacute edieresis -10 KPX yacute edotaccent -10 KPX yacute egrave -10 KPX yacute emacron -10 KPX yacute eogonek -10 KPX yacute o -25 KPX yacute oacute -25 KPX yacute ocircumflex -25 KPX yacute odieresis -25 KPX yacute ograve -25 KPX yacute ohungarumlaut -25 KPX yacute omacron -25 KPX yacute oslash -25 KPX yacute otilde -25 KPX yacute period -80 KPX ydieresis a -30 KPX ydieresis aacute -30 KPX ydieresis abreve -30 KPX ydieresis acircumflex -30 KPX ydieresis adieresis -30 KPX ydieresis agrave -30 KPX ydieresis amacron -30 KPX ydieresis aogonek -30 KPX ydieresis aring -30 KPX ydieresis atilde -30 KPX ydieresis comma -80 KPX ydieresis e -10 KPX ydieresis eacute -10 KPX ydieresis ecaron -10 KPX ydieresis ecircumflex -10 KPX ydieresis edieresis -10 KPX ydieresis edotaccent -10 KPX ydieresis egrave -10 KPX ydieresis emacron -10 KPX ydieresis eogonek -10 KPX ydieresis o -25 KPX ydieresis oacute -25 KPX ydieresis ocircumflex -25 KPX ydieresis odieresis -25 KPX ydieresis ograve -25 KPX ydieresis ohungarumlaut -25 KPX ydieresis omacron -25 KPX ydieresis oslash -25 KPX ydieresis otilde -25 KPX ydieresis period -80 KPX z e 10 KPX z eacute 10 KPX z ecaron 10 KPX z ecircumflex 10 KPX z edieresis 10 KPX z edotaccent 10 KPX z egrave 10 KPX z emacron 10 KPX z eogonek 10 KPX zacute e 10 KPX zacute eacute 10 KPX zacute ecaron 10 KPX zacute ecircumflex 10 KPX zacute edieresis 10 KPX zacute edotaccent 10 KPX zacute egrave 10 KPX zacute emacron 10 KPX zacute eogonek 10 KPX zcaron e 10 KPX zcaron eacute 10 KPX zcaron ecaron 10 KPX zcaron ecircumflex 10 KPX zcaron edieresis 10 KPX zcaron edotaccent 10 KPX zcaron egrave 10 KPX zcaron emacron 10 KPX zcaron eogonek 10 KPX zdotaccent e 10 KPX zdotaccent eacute 10 KPX zdotaccent ecaron 10 KPX zdotaccent ecircumflex 10 KPX zdotaccent edieresis 10 KPX zdotaccent edotaccent 10 KPX zdotaccent egrave 10 KPX zdotaccent emacron 10 KPX zdotaccent eogonek 10 EndKernPairs EndKernData EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/pdfcorefonts/Helvetica-Oblique.afm ================================================ StartFontMetrics 4.1 Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Thu May 1 12:44:31 1997 Comment UniqueID 43055 Comment VMusage 14960 69346 FontName Helvetica-Oblique FullName Helvetica Oblique FamilyName Helvetica Weight Medium ItalicAngle -12 IsFixedPitch false CharacterSet ExtendedRoman FontBBox -170 -225 1116 931 UnderlinePosition -100 UnderlineThickness 50 Version 002.000 Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 718 XHeight 523 Ascender 718 Descender -207 StdHW 76 StdVW 88 StartCharMetrics 315 C 32 ; WX 278 ; N space ; B 0 0 0 0 ; C 33 ; WX 278 ; N exclam ; B 90 0 340 718 ; C 34 ; WX 355 ; N quotedbl ; B 168 463 438 718 ; C 35 ; WX 556 ; N numbersign ; B 73 0 631 688 ; C 36 ; WX 556 ; N dollar ; B 69 -115 617 775 ; C 37 ; WX 889 ; N percent ; B 147 -19 889 703 ; C 38 ; WX 667 ; N ampersand ; B 77 -15 647 718 ; C 39 ; WX 222 ; N quoteright ; B 151 463 310 718 ; C 40 ; WX 333 ; N parenleft ; B 108 -207 454 733 ; C 41 ; WX 333 ; N parenright ; B -9 -207 337 733 ; C 42 ; WX 389 ; N asterisk ; B 165 431 475 718 ; C 43 ; WX 584 ; N plus ; B 85 0 606 505 ; C 44 ; WX 278 ; N comma ; B 56 -147 214 106 ; C 45 ; WX 333 ; N hyphen ; B 93 232 357 322 ; C 46 ; WX 278 ; N period ; B 87 0 214 106 ; C 47 ; WX 278 ; N slash ; B -21 -19 452 737 ; C 48 ; WX 556 ; N zero ; B 93 -19 608 703 ; C 49 ; WX 556 ; N one ; B 207 0 508 703 ; C 50 ; WX 556 ; N two ; B 26 0 617 703 ; C 51 ; WX 556 ; N three ; B 75 -19 610 703 ; C 52 ; WX 556 ; N four ; B 61 0 576 703 ; C 53 ; WX 556 ; N five ; B 68 -19 621 688 ; C 54 ; WX 556 ; N six ; B 91 -19 615 703 ; C 55 ; WX 556 ; N seven ; B 137 0 669 688 ; C 56 ; WX 556 ; N eight ; B 74 -19 607 703 ; C 57 ; WX 556 ; N nine ; B 82 -19 609 703 ; C 58 ; WX 278 ; N colon ; B 87 0 301 516 ; C 59 ; WX 278 ; N semicolon ; B 56 -147 301 516 ; C 60 ; WX 584 ; N less ; B 94 11 641 495 ; C 61 ; WX 584 ; N equal ; B 63 115 628 390 ; C 62 ; WX 584 ; N greater ; B 50 11 597 495 ; C 63 ; WX 556 ; N question ; B 161 0 610 727 ; C 64 ; WX 1015 ; N at ; B 215 -19 965 737 ; C 65 ; WX 667 ; N A ; B 14 0 654 718 ; C 66 ; WX 667 ; N B ; B 74 0 712 718 ; C 67 ; WX 722 ; N C ; B 108 -19 782 737 ; C 68 ; WX 722 ; N D ; B 81 0 764 718 ; C 69 ; WX 667 ; N E ; B 86 0 762 718 ; C 70 ; WX 611 ; N F ; B 86 0 736 718 ; C 71 ; WX 778 ; N G ; B 111 -19 799 737 ; C 72 ; WX 722 ; N H ; B 77 0 799 718 ; C 73 ; WX 278 ; N I ; B 91 0 341 718 ; C 74 ; WX 500 ; N J ; B 47 -19 581 718 ; C 75 ; WX 667 ; N K ; B 76 0 808 718 ; C 76 ; WX 556 ; N L ; B 76 0 555 718 ; C 77 ; WX 833 ; N M ; B 73 0 914 718 ; C 78 ; WX 722 ; N N ; B 76 0 799 718 ; C 79 ; WX 778 ; N O ; B 105 -19 826 737 ; C 80 ; WX 667 ; N P ; B 86 0 737 718 ; C 81 ; WX 778 ; N Q ; B 105 -56 826 737 ; C 82 ; WX 722 ; N R ; B 88 0 773 718 ; C 83 ; WX 667 ; N S ; B 90 -19 713 737 ; C 84 ; WX 611 ; N T ; B 148 0 750 718 ; C 85 ; WX 722 ; N U ; B 123 -19 797 718 ; C 86 ; WX 667 ; N V ; B 173 0 800 718 ; C 87 ; WX 944 ; N W ; B 169 0 1081 718 ; C 88 ; WX 667 ; N X ; B 19 0 790 718 ; C 89 ; WX 667 ; N Y ; B 167 0 806 718 ; C 90 ; WX 611 ; N Z ; B 23 0 741 718 ; C 91 ; WX 278 ; N bracketleft ; B 21 -196 403 722 ; C 92 ; WX 278 ; N backslash ; B 140 -19 291 737 ; C 93 ; WX 278 ; N bracketright ; B -14 -196 368 722 ; C 94 ; WX 469 ; N asciicircum ; B 42 264 539 688 ; C 95 ; WX 556 ; N underscore ; B -27 -125 540 -75 ; C 96 ; WX 222 ; N quoteleft ; B 165 470 323 725 ; C 97 ; WX 556 ; N a ; B 61 -15 559 538 ; C 98 ; WX 556 ; N b ; B 58 -15 584 718 ; C 99 ; WX 500 ; N c ; B 74 -15 553 538 ; C 100 ; WX 556 ; N d ; B 84 -15 652 718 ; C 101 ; WX 556 ; N e ; B 84 -15 578 538 ; C 102 ; WX 278 ; N f ; B 86 0 416 728 ; L i fi ; L l fl ; C 103 ; WX 556 ; N g ; B 42 -220 610 538 ; C 104 ; WX 556 ; N h ; B 65 0 573 718 ; C 105 ; WX 222 ; N i ; B 67 0 308 718 ; C 106 ; WX 222 ; N j ; B -60 -210 308 718 ; C 107 ; WX 500 ; N k ; B 67 0 600 718 ; C 108 ; WX 222 ; N l ; B 67 0 308 718 ; C 109 ; WX 833 ; N m ; B 65 0 852 538 ; C 110 ; WX 556 ; N n ; B 65 0 573 538 ; C 111 ; WX 556 ; N o ; B 83 -14 585 538 ; C 112 ; WX 556 ; N p ; B 14 -207 584 538 ; C 113 ; WX 556 ; N q ; B 84 -207 605 538 ; C 114 ; WX 333 ; N r ; B 77 0 446 538 ; C 115 ; WX 500 ; N s ; B 63 -15 529 538 ; C 116 ; WX 278 ; N t ; B 102 -7 368 669 ; C 117 ; WX 556 ; N u ; B 94 -15 600 523 ; C 118 ; WX 500 ; N v ; B 119 0 603 523 ; C 119 ; WX 722 ; N w ; B 125 0 820 523 ; C 120 ; WX 500 ; N x ; B 11 0 594 523 ; C 121 ; WX 500 ; N y ; B 15 -214 600 523 ; C 122 ; WX 500 ; N z ; B 31 0 571 523 ; C 123 ; WX 334 ; N braceleft ; B 92 -196 445 722 ; C 124 ; WX 260 ; N bar ; B 46 -225 332 775 ; C 125 ; WX 334 ; N braceright ; B 0 -196 354 722 ; C 126 ; WX 584 ; N asciitilde ; B 111 180 580 326 ; C 161 ; WX 333 ; N exclamdown ; B 77 -195 326 523 ; C 162 ; WX 556 ; N cent ; B 95 -115 584 623 ; C 163 ; WX 556 ; N sterling ; B 49 -16 634 718 ; C 164 ; WX 167 ; N fraction ; B -170 -19 482 703 ; C 165 ; WX 556 ; N yen ; B 81 0 699 688 ; C 166 ; WX 556 ; N florin ; B -52 -207 654 737 ; C 167 ; WX 556 ; N section ; B 76 -191 584 737 ; C 168 ; WX 556 ; N currency ; B 60 99 646 603 ; C 169 ; WX 191 ; N quotesingle ; B 157 463 285 718 ; C 170 ; WX 333 ; N quotedblleft ; B 138 470 461 725 ; C 171 ; WX 556 ; N guillemotleft ; B 146 108 554 446 ; C 172 ; WX 333 ; N guilsinglleft ; B 137 108 340 446 ; C 173 ; WX 333 ; N guilsinglright ; B 111 108 314 446 ; C 174 ; WX 500 ; N fi ; B 86 0 587 728 ; C 175 ; WX 500 ; N fl ; B 86 0 585 728 ; C 177 ; WX 556 ; N endash ; B 51 240 623 313 ; C 178 ; WX 556 ; N dagger ; B 135 -159 622 718 ; C 179 ; WX 556 ; N daggerdbl ; B 52 -159 623 718 ; C 180 ; WX 278 ; N periodcentered ; B 129 190 257 315 ; C 182 ; WX 537 ; N paragraph ; B 126 -173 650 718 ; C 183 ; WX 350 ; N bullet ; B 91 202 413 517 ; C 184 ; WX 222 ; N quotesinglbase ; B 21 -149 180 106 ; C 185 ; WX 333 ; N quotedblbase ; B -6 -149 318 106 ; C 186 ; WX 333 ; N quotedblright ; B 124 463 448 718 ; C 187 ; WX 556 ; N guillemotright ; B 120 108 528 446 ; C 188 ; WX 1000 ; N ellipsis ; B 115 0 908 106 ; C 189 ; WX 1000 ; N perthousand ; B 88 -19 1029 703 ; C 191 ; WX 611 ; N questiondown ; B 85 -201 534 525 ; C 193 ; WX 333 ; N grave ; B 170 593 337 734 ; C 194 ; WX 333 ; N acute ; B 248 593 475 734 ; C 195 ; WX 333 ; N circumflex ; B 147 593 438 734 ; C 196 ; WX 333 ; N tilde ; B 125 606 490 722 ; C 197 ; WX 333 ; N macron ; B 143 627 468 684 ; C 198 ; WX 333 ; N breve ; B 167 595 476 731 ; C 199 ; WX 333 ; N dotaccent ; B 249 604 362 706 ; C 200 ; WX 333 ; N dieresis ; B 168 604 443 706 ; C 202 ; WX 333 ; N ring ; B 214 572 402 756 ; C 203 ; WX 333 ; N cedilla ; B 2 -225 232 0 ; C 205 ; WX 333 ; N hungarumlaut ; B 157 593 565 734 ; C 206 ; WX 333 ; N ogonek ; B 43 -225 249 0 ; C 207 ; WX 333 ; N caron ; B 177 593 468 734 ; C 208 ; WX 1000 ; N emdash ; B 51 240 1067 313 ; C 225 ; WX 1000 ; N AE ; B 8 0 1097 718 ; C 227 ; WX 370 ; N ordfeminine ; B 127 405 449 737 ; C 232 ; WX 556 ; N Lslash ; B 41 0 555 718 ; C 233 ; WX 778 ; N Oslash ; B 43 -19 890 737 ; C 234 ; WX 1000 ; N OE ; B 98 -19 1116 737 ; C 235 ; WX 365 ; N ordmasculine ; B 141 405 468 737 ; C 241 ; WX 889 ; N ae ; B 61 -15 909 538 ; C 245 ; WX 278 ; N dotlessi ; B 95 0 294 523 ; C 248 ; WX 222 ; N lslash ; B 41 0 347 718 ; C 249 ; WX 611 ; N oslash ; B 29 -22 647 545 ; C 250 ; WX 944 ; N oe ; B 83 -15 964 538 ; C 251 ; WX 611 ; N germandbls ; B 67 -15 658 728 ; C -1 ; WX 278 ; N Idieresis ; B 91 0 458 901 ; C -1 ; WX 556 ; N eacute ; B 84 -15 587 734 ; C -1 ; WX 556 ; N abreve ; B 61 -15 578 731 ; C -1 ; WX 556 ; N uhungarumlaut ; B 94 -15 677 734 ; C -1 ; WX 556 ; N ecaron ; B 84 -15 580 734 ; C -1 ; WX 667 ; N Ydieresis ; B 167 0 806 901 ; C -1 ; WX 584 ; N divide ; B 85 -19 606 524 ; C -1 ; WX 667 ; N Yacute ; B 167 0 806 929 ; C -1 ; WX 667 ; N Acircumflex ; B 14 0 654 929 ; C -1 ; WX 556 ; N aacute ; B 61 -15 587 734 ; C -1 ; WX 722 ; N Ucircumflex ; B 123 -19 797 929 ; C -1 ; WX 500 ; N yacute ; B 15 -214 600 734 ; C -1 ; WX 500 ; N scommaaccent ; B 63 -225 529 538 ; C -1 ; WX 556 ; N ecircumflex ; B 84 -15 578 734 ; C -1 ; WX 722 ; N Uring ; B 123 -19 797 931 ; C -1 ; WX 722 ; N Udieresis ; B 123 -19 797 901 ; C -1 ; WX 556 ; N aogonek ; B 61 -220 559 538 ; C -1 ; WX 722 ; N Uacute ; B 123 -19 797 929 ; C -1 ; WX 556 ; N uogonek ; B 94 -225 600 523 ; C -1 ; WX 667 ; N Edieresis ; B 86 0 762 901 ; C -1 ; WX 722 ; N Dcroat ; B 69 0 764 718 ; C -1 ; WX 250 ; N commaaccent ; B 39 -225 172 -40 ; C -1 ; WX 737 ; N copyright ; B 54 -19 837 737 ; C -1 ; WX 667 ; N Emacron ; B 86 0 762 879 ; C -1 ; WX 500 ; N ccaron ; B 74 -15 553 734 ; C -1 ; WX 556 ; N aring ; B 61 -15 559 756 ; C -1 ; WX 722 ; N Ncommaaccent ; B 76 -225 799 718 ; C -1 ; WX 222 ; N lacute ; B 67 0 461 929 ; C -1 ; WX 556 ; N agrave ; B 61 -15 559 734 ; C -1 ; WX 611 ; N Tcommaaccent ; B 148 -225 750 718 ; C -1 ; WX 722 ; N Cacute ; B 108 -19 782 929 ; C -1 ; WX 556 ; N atilde ; B 61 -15 592 722 ; C -1 ; WX 667 ; N Edotaccent ; B 86 0 762 901 ; C -1 ; WX 500 ; N scaron ; B 63 -15 552 734 ; C -1 ; WX 500 ; N scedilla ; B 63 -225 529 538 ; C -1 ; WX 278 ; N iacute ; B 95 0 448 734 ; C -1 ; WX 471 ; N lozenge ; B 88 0 540 728 ; C -1 ; WX 722 ; N Rcaron ; B 88 0 773 929 ; C -1 ; WX 778 ; N Gcommaaccent ; B 111 -225 799 737 ; C -1 ; WX 556 ; N ucircumflex ; B 94 -15 600 734 ; C -1 ; WX 556 ; N acircumflex ; B 61 -15 559 734 ; C -1 ; WX 667 ; N Amacron ; B 14 0 677 879 ; C -1 ; WX 333 ; N rcaron ; B 77 0 508 734 ; C -1 ; WX 500 ; N ccedilla ; B 74 -225 553 538 ; C -1 ; WX 611 ; N Zdotaccent ; B 23 0 741 901 ; C -1 ; WX 667 ; N Thorn ; B 86 0 712 718 ; C -1 ; WX 778 ; N Omacron ; B 105 -19 826 879 ; C -1 ; WX 722 ; N Racute ; B 88 0 773 929 ; C -1 ; WX 667 ; N Sacute ; B 90 -19 713 929 ; C -1 ; WX 643 ; N dcaron ; B 84 -15 808 718 ; C -1 ; WX 722 ; N Umacron ; B 123 -19 797 879 ; C -1 ; WX 556 ; N uring ; B 94 -15 600 756 ; C -1 ; WX 333 ; N threesuperior ; B 90 270 436 703 ; C -1 ; WX 778 ; N Ograve ; B 105 -19 826 929 ; C -1 ; WX 667 ; N Agrave ; B 14 0 654 929 ; C -1 ; WX 667 ; N Abreve ; B 14 0 685 926 ; C -1 ; WX 584 ; N multiply ; B 50 0 642 506 ; C -1 ; WX 556 ; N uacute ; B 94 -15 600 734 ; C -1 ; WX 611 ; N Tcaron ; B 148 0 750 929 ; C -1 ; WX 476 ; N partialdiff ; B 41 -38 550 714 ; C -1 ; WX 500 ; N ydieresis ; B 15 -214 600 706 ; C -1 ; WX 722 ; N Nacute ; B 76 0 799 929 ; C -1 ; WX 278 ; N icircumflex ; B 95 0 411 734 ; C -1 ; WX 667 ; N Ecircumflex ; B 86 0 762 929 ; C -1 ; WX 556 ; N adieresis ; B 61 -15 559 706 ; C -1 ; WX 556 ; N edieresis ; B 84 -15 578 706 ; C -1 ; WX 500 ; N cacute ; B 74 -15 559 734 ; C -1 ; WX 556 ; N nacute ; B 65 0 587 734 ; C -1 ; WX 556 ; N umacron ; B 94 -15 600 684 ; C -1 ; WX 722 ; N Ncaron ; B 76 0 799 929 ; C -1 ; WX 278 ; N Iacute ; B 91 0 489 929 ; C -1 ; WX 584 ; N plusminus ; B 39 0 618 506 ; C -1 ; WX 260 ; N brokenbar ; B 62 -150 316 700 ; C -1 ; WX 737 ; N registered ; B 54 -19 837 737 ; C -1 ; WX 778 ; N Gbreve ; B 111 -19 799 926 ; C -1 ; WX 278 ; N Idotaccent ; B 91 0 377 901 ; C -1 ; WX 600 ; N summation ; B 15 -10 671 706 ; C -1 ; WX 667 ; N Egrave ; B 86 0 762 929 ; C -1 ; WX 333 ; N racute ; B 77 0 475 734 ; C -1 ; WX 556 ; N omacron ; B 83 -14 585 684 ; C -1 ; WX 611 ; N Zacute ; B 23 0 741 929 ; C -1 ; WX 611 ; N Zcaron ; B 23 0 741 929 ; C -1 ; WX 549 ; N greaterequal ; B 26 0 620 674 ; C -1 ; WX 722 ; N Eth ; B 69 0 764 718 ; C -1 ; WX 722 ; N Ccedilla ; B 108 -225 782 737 ; C -1 ; WX 222 ; N lcommaaccent ; B 25 -225 308 718 ; C -1 ; WX 317 ; N tcaron ; B 102 -7 501 808 ; C -1 ; WX 556 ; N eogonek ; B 84 -225 578 538 ; C -1 ; WX 722 ; N Uogonek ; B 123 -225 797 718 ; C -1 ; WX 667 ; N Aacute ; B 14 0 683 929 ; C -1 ; WX 667 ; N Adieresis ; B 14 0 654 901 ; C -1 ; WX 556 ; N egrave ; B 84 -15 578 734 ; C -1 ; WX 500 ; N zacute ; B 31 0 571 734 ; C -1 ; WX 222 ; N iogonek ; B -61 -225 308 718 ; C -1 ; WX 778 ; N Oacute ; B 105 -19 826 929 ; C -1 ; WX 556 ; N oacute ; B 83 -14 587 734 ; C -1 ; WX 556 ; N amacron ; B 61 -15 580 684 ; C -1 ; WX 500 ; N sacute ; B 63 -15 559 734 ; C -1 ; WX 278 ; N idieresis ; B 95 0 416 706 ; C -1 ; WX 778 ; N Ocircumflex ; B 105 -19 826 929 ; C -1 ; WX 722 ; N Ugrave ; B 123 -19 797 929 ; C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; C -1 ; WX 556 ; N thorn ; B 14 -207 584 718 ; C -1 ; WX 333 ; N twosuperior ; B 64 281 449 703 ; C -1 ; WX 778 ; N Odieresis ; B 105 -19 826 901 ; C -1 ; WX 556 ; N mu ; B 24 -207 600 523 ; C -1 ; WX 278 ; N igrave ; B 95 0 310 734 ; C -1 ; WX 556 ; N ohungarumlaut ; B 83 -14 677 734 ; C -1 ; WX 667 ; N Eogonek ; B 86 -220 762 718 ; C -1 ; WX 556 ; N dcroat ; B 84 -15 689 718 ; C -1 ; WX 834 ; N threequarters ; B 130 -19 861 703 ; C -1 ; WX 667 ; N Scedilla ; B 90 -225 713 737 ; C -1 ; WX 299 ; N lcaron ; B 67 0 464 718 ; C -1 ; WX 667 ; N Kcommaaccent ; B 76 -225 808 718 ; C -1 ; WX 556 ; N Lacute ; B 76 0 555 929 ; C -1 ; WX 1000 ; N trademark ; B 186 306 1056 718 ; C -1 ; WX 556 ; N edotaccent ; B 84 -15 578 706 ; C -1 ; WX 278 ; N Igrave ; B 91 0 351 929 ; C -1 ; WX 278 ; N Imacron ; B 91 0 483 879 ; C -1 ; WX 556 ; N Lcaron ; B 76 0 570 718 ; C -1 ; WX 834 ; N onehalf ; B 114 -19 839 703 ; C -1 ; WX 549 ; N lessequal ; B 26 0 666 674 ; C -1 ; WX 556 ; N ocircumflex ; B 83 -14 585 734 ; C -1 ; WX 556 ; N ntilde ; B 65 0 592 722 ; C -1 ; WX 722 ; N Uhungarumlaut ; B 123 -19 801 929 ; C -1 ; WX 667 ; N Eacute ; B 86 0 762 929 ; C -1 ; WX 556 ; N emacron ; B 84 -15 580 684 ; C -1 ; WX 556 ; N gbreve ; B 42 -220 610 731 ; C -1 ; WX 834 ; N onequarter ; B 150 -19 802 703 ; C -1 ; WX 667 ; N Scaron ; B 90 -19 713 929 ; C -1 ; WX 667 ; N Scommaaccent ; B 90 -225 713 737 ; C -1 ; WX 778 ; N Ohungarumlaut ; B 105 -19 829 929 ; C -1 ; WX 400 ; N degree ; B 169 411 468 703 ; C -1 ; WX 556 ; N ograve ; B 83 -14 585 734 ; C -1 ; WX 722 ; N Ccaron ; B 108 -19 782 929 ; C -1 ; WX 556 ; N ugrave ; B 94 -15 600 734 ; C -1 ; WX 453 ; N radical ; B 79 -80 617 762 ; C -1 ; WX 722 ; N Dcaron ; B 81 0 764 929 ; C -1 ; WX 333 ; N rcommaaccent ; B 30 -225 446 538 ; C -1 ; WX 722 ; N Ntilde ; B 76 0 799 917 ; C -1 ; WX 556 ; N otilde ; B 83 -14 602 722 ; C -1 ; WX 722 ; N Rcommaaccent ; B 88 -225 773 718 ; C -1 ; WX 556 ; N Lcommaaccent ; B 76 -225 555 718 ; C -1 ; WX 667 ; N Atilde ; B 14 0 699 917 ; C -1 ; WX 667 ; N Aogonek ; B 14 -225 654 718 ; C -1 ; WX 667 ; N Aring ; B 14 0 654 931 ; C -1 ; WX 778 ; N Otilde ; B 105 -19 826 917 ; C -1 ; WX 500 ; N zdotaccent ; B 31 0 571 706 ; C -1 ; WX 667 ; N Ecaron ; B 86 0 762 929 ; C -1 ; WX 278 ; N Iogonek ; B -33 -225 341 718 ; C -1 ; WX 500 ; N kcommaaccent ; B 67 -225 600 718 ; C -1 ; WX 584 ; N minus ; B 85 216 606 289 ; C -1 ; WX 278 ; N Icircumflex ; B 91 0 452 929 ; C -1 ; WX 556 ; N ncaron ; B 65 0 580 734 ; C -1 ; WX 278 ; N tcommaaccent ; B 63 -225 368 669 ; C -1 ; WX 584 ; N logicalnot ; B 106 108 628 390 ; C -1 ; WX 556 ; N odieresis ; B 83 -14 585 706 ; C -1 ; WX 556 ; N udieresis ; B 94 -15 600 706 ; C -1 ; WX 549 ; N notequal ; B 34 -35 623 551 ; C -1 ; WX 556 ; N gcommaaccent ; B 42 -220 610 822 ; C -1 ; WX 556 ; N eth ; B 81 -15 617 737 ; C -1 ; WX 500 ; N zcaron ; B 31 0 571 734 ; C -1 ; WX 556 ; N ncommaaccent ; B 65 -225 573 538 ; C -1 ; WX 333 ; N onesuperior ; B 166 281 371 703 ; C -1 ; WX 278 ; N imacron ; B 95 0 417 684 ; C -1 ; WX 556 ; N Euro ; B 0 0 0 0 ; EndCharMetrics StartKernData StartKernPairs 2705 KPX A C -30 KPX A Cacute -30 KPX A Ccaron -30 KPX A Ccedilla -30 KPX A G -30 KPX A Gbreve -30 KPX A Gcommaaccent -30 KPX A O -30 KPX A Oacute -30 KPX A Ocircumflex -30 KPX A Odieresis -30 KPX A Ograve -30 KPX A Ohungarumlaut -30 KPX A Omacron -30 KPX A Oslash -30 KPX A Otilde -30 KPX A Q -30 KPX A T -120 KPX A Tcaron -120 KPX A Tcommaaccent -120 KPX A U -50 KPX A Uacute -50 KPX A Ucircumflex -50 KPX A Udieresis -50 KPX A Ugrave -50 KPX A Uhungarumlaut -50 KPX A Umacron -50 KPX A Uogonek -50 KPX A Uring -50 KPX A V -70 KPX A W -50 KPX A Y -100 KPX A Yacute -100 KPX A Ydieresis -100 KPX A u -30 KPX A uacute -30 KPX A ucircumflex -30 KPX A udieresis -30 KPX A ugrave -30 KPX A uhungarumlaut -30 KPX A umacron -30 KPX A uogonek -30 KPX A uring -30 KPX A v -40 KPX A w -40 KPX A y -40 KPX A yacute -40 KPX A ydieresis -40 KPX Aacute C -30 KPX Aacute Cacute -30 KPX Aacute Ccaron -30 KPX Aacute Ccedilla -30 KPX Aacute G -30 KPX Aacute Gbreve -30 KPX Aacute Gcommaaccent -30 KPX Aacute O -30 KPX Aacute Oacute -30 KPX Aacute Ocircumflex -30 KPX Aacute Odieresis -30 KPX Aacute Ograve -30 KPX Aacute Ohungarumlaut -30 KPX Aacute Omacron -30 KPX Aacute Oslash -30 KPX Aacute Otilde -30 KPX Aacute Q -30 KPX Aacute T -120 KPX Aacute Tcaron -120 KPX Aacute Tcommaaccent -120 KPX Aacute U -50 KPX Aacute Uacute -50 KPX Aacute Ucircumflex -50 KPX Aacute Udieresis -50 KPX Aacute Ugrave -50 KPX Aacute Uhungarumlaut -50 KPX Aacute Umacron -50 KPX Aacute Uogonek -50 KPX Aacute Uring -50 KPX Aacute V -70 KPX Aacute W -50 KPX Aacute Y -100 KPX Aacute Yacute -100 KPX Aacute Ydieresis -100 KPX Aacute u -30 KPX Aacute uacute -30 KPX Aacute ucircumflex -30 KPX Aacute udieresis -30 KPX Aacute ugrave -30 KPX Aacute uhungarumlaut -30 KPX Aacute umacron -30 KPX Aacute uogonek -30 KPX Aacute uring -30 KPX Aacute v -40 KPX Aacute w -40 KPX Aacute y -40 KPX Aacute yacute -40 KPX Aacute ydieresis -40 KPX Abreve C -30 KPX Abreve Cacute -30 KPX Abreve Ccaron -30 KPX Abreve Ccedilla -30 KPX Abreve G -30 KPX Abreve Gbreve -30 KPX Abreve Gcommaaccent -30 KPX Abreve O -30 KPX Abreve Oacute -30 KPX Abreve Ocircumflex -30 KPX Abreve Odieresis -30 KPX Abreve Ograve -30 KPX Abreve Ohungarumlaut -30 KPX Abreve Omacron -30 KPX Abreve Oslash -30 KPX Abreve Otilde -30 KPX Abreve Q -30 KPX Abreve T -120 KPX Abreve Tcaron -120 KPX Abreve Tcommaaccent -120 KPX Abreve U -50 KPX Abreve Uacute -50 KPX Abreve Ucircumflex -50 KPX Abreve Udieresis -50 KPX Abreve Ugrave -50 KPX Abreve Uhungarumlaut -50 KPX Abreve Umacron -50 KPX Abreve Uogonek -50 KPX Abreve Uring -50 KPX Abreve V -70 KPX Abreve W -50 KPX Abreve Y -100 KPX Abreve Yacute -100 KPX Abreve Ydieresis -100 KPX Abreve u -30 KPX Abreve uacute -30 KPX Abreve ucircumflex -30 KPX Abreve udieresis -30 KPX Abreve ugrave -30 KPX Abreve uhungarumlaut -30 KPX Abreve umacron -30 KPX Abreve uogonek -30 KPX Abreve uring -30 KPX Abreve v -40 KPX Abreve w -40 KPX Abreve y -40 KPX Abreve yacute -40 KPX Abreve ydieresis -40 KPX Acircumflex C -30 KPX Acircumflex Cacute -30 KPX Acircumflex Ccaron -30 KPX Acircumflex Ccedilla -30 KPX Acircumflex G -30 KPX Acircumflex Gbreve -30 KPX Acircumflex Gcommaaccent -30 KPX Acircumflex O -30 KPX Acircumflex Oacute -30 KPX Acircumflex Ocircumflex -30 KPX Acircumflex Odieresis -30 KPX Acircumflex Ograve -30 KPX Acircumflex Ohungarumlaut -30 KPX Acircumflex Omacron -30 KPX Acircumflex Oslash -30 KPX Acircumflex Otilde -30 KPX Acircumflex Q -30 KPX Acircumflex T -120 KPX Acircumflex Tcaron -120 KPX Acircumflex Tcommaaccent -120 KPX Acircumflex U -50 KPX Acircumflex Uacute -50 KPX Acircumflex Ucircumflex -50 KPX Acircumflex Udieresis -50 KPX Acircumflex Ugrave -50 KPX Acircumflex Uhungarumlaut -50 KPX Acircumflex Umacron -50 KPX Acircumflex Uogonek -50 KPX Acircumflex Uring -50 KPX Acircumflex V -70 KPX Acircumflex W -50 KPX Acircumflex Y -100 KPX Acircumflex Yacute -100 KPX Acircumflex Ydieresis -100 KPX Acircumflex u -30 KPX Acircumflex uacute -30 KPX Acircumflex ucircumflex -30 KPX Acircumflex udieresis -30 KPX Acircumflex ugrave -30 KPX Acircumflex uhungarumlaut -30 KPX Acircumflex umacron -30 KPX Acircumflex uogonek -30 KPX Acircumflex uring -30 KPX Acircumflex v -40 KPX Acircumflex w -40 KPX Acircumflex y -40 KPX Acircumflex yacute -40 KPX Acircumflex ydieresis -40 KPX Adieresis C -30 KPX Adieresis Cacute -30 KPX Adieresis Ccaron -30 KPX Adieresis Ccedilla -30 KPX Adieresis G -30 KPX Adieresis Gbreve -30 KPX Adieresis Gcommaaccent -30 KPX Adieresis O -30 KPX Adieresis Oacute -30 KPX Adieresis Ocircumflex -30 KPX Adieresis Odieresis -30 KPX Adieresis Ograve -30 KPX Adieresis Ohungarumlaut -30 KPX Adieresis Omacron -30 KPX Adieresis Oslash -30 KPX Adieresis Otilde -30 KPX Adieresis Q -30 KPX Adieresis T -120 KPX Adieresis Tcaron -120 KPX Adieresis Tcommaaccent -120 KPX Adieresis U -50 KPX Adieresis Uacute -50 KPX Adieresis Ucircumflex -50 KPX Adieresis Udieresis -50 KPX Adieresis Ugrave -50 KPX Adieresis Uhungarumlaut -50 KPX Adieresis Umacron -50 KPX Adieresis Uogonek -50 KPX Adieresis Uring -50 KPX Adieresis V -70 KPX Adieresis W -50 KPX Adieresis Y -100 KPX Adieresis Yacute -100 KPX Adieresis Ydieresis -100 KPX Adieresis u -30 KPX Adieresis uacute -30 KPX Adieresis ucircumflex -30 KPX Adieresis udieresis -30 KPX Adieresis ugrave -30 KPX Adieresis uhungarumlaut -30 KPX Adieresis umacron -30 KPX Adieresis uogonek -30 KPX Adieresis uring -30 KPX Adieresis v -40 KPX Adieresis w -40 KPX Adieresis y -40 KPX Adieresis yacute -40 KPX Adieresis ydieresis -40 KPX Agrave C -30 KPX Agrave Cacute -30 KPX Agrave Ccaron -30 KPX Agrave Ccedilla -30 KPX Agrave G -30 KPX Agrave Gbreve -30 KPX Agrave Gcommaaccent -30 KPX Agrave O -30 KPX Agrave Oacute -30 KPX Agrave Ocircumflex -30 KPX Agrave Odieresis -30 KPX Agrave Ograve -30 KPX Agrave Ohungarumlaut -30 KPX Agrave Omacron -30 KPX Agrave Oslash -30 KPX Agrave Otilde -30 KPX Agrave Q -30 KPX Agrave T -120 KPX Agrave Tcaron -120 KPX Agrave Tcommaaccent -120 KPX Agrave U -50 KPX Agrave Uacute -50 KPX Agrave Ucircumflex -50 KPX Agrave Udieresis -50 KPX Agrave Ugrave -50 KPX Agrave Uhungarumlaut -50 KPX Agrave Umacron -50 KPX Agrave Uogonek -50 KPX Agrave Uring -50 KPX Agrave V -70 KPX Agrave W -50 KPX Agrave Y -100 KPX Agrave Yacute -100 KPX Agrave Ydieresis -100 KPX Agrave u -30 KPX Agrave uacute -30 KPX Agrave ucircumflex -30 KPX Agrave udieresis -30 KPX Agrave ugrave -30 KPX Agrave uhungarumlaut -30 KPX Agrave umacron -30 KPX Agrave uogonek -30 KPX Agrave uring -30 KPX Agrave v -40 KPX Agrave w -40 KPX Agrave y -40 KPX Agrave yacute -40 KPX Agrave ydieresis -40 KPX Amacron C -30 KPX Amacron Cacute -30 KPX Amacron Ccaron -30 KPX Amacron Ccedilla -30 KPX Amacron G -30 KPX Amacron Gbreve -30 KPX Amacron Gcommaaccent -30 KPX Amacron O -30 KPX Amacron Oacute -30 KPX Amacron Ocircumflex -30 KPX Amacron Odieresis -30 KPX Amacron Ograve -30 KPX Amacron Ohungarumlaut -30 KPX Amacron Omacron -30 KPX Amacron Oslash -30 KPX Amacron Otilde -30 KPX Amacron Q -30 KPX Amacron T -120 KPX Amacron Tcaron -120 KPX Amacron Tcommaaccent -120 KPX Amacron U -50 KPX Amacron Uacute -50 KPX Amacron Ucircumflex -50 KPX Amacron Udieresis -50 KPX Amacron Ugrave -50 KPX Amacron Uhungarumlaut -50 KPX Amacron Umacron -50 KPX Amacron Uogonek -50 KPX Amacron Uring -50 KPX Amacron V -70 KPX Amacron W -50 KPX Amacron Y -100 KPX Amacron Yacute -100 KPX Amacron Ydieresis -100 KPX Amacron u -30 KPX Amacron uacute -30 KPX Amacron ucircumflex -30 KPX Amacron udieresis -30 KPX Amacron ugrave -30 KPX Amacron uhungarumlaut -30 KPX Amacron umacron -30 KPX Amacron uogonek -30 KPX Amacron uring -30 KPX Amacron v -40 KPX Amacron w -40 KPX Amacron y -40 KPX Amacron yacute -40 KPX Amacron ydieresis -40 KPX Aogonek C -30 KPX Aogonek Cacute -30 KPX Aogonek Ccaron -30 KPX Aogonek Ccedilla -30 KPX Aogonek G -30 KPX Aogonek Gbreve -30 KPX Aogonek Gcommaaccent -30 KPX Aogonek O -30 KPX Aogonek Oacute -30 KPX Aogonek Ocircumflex -30 KPX Aogonek Odieresis -30 KPX Aogonek Ograve -30 KPX Aogonek Ohungarumlaut -30 KPX Aogonek Omacron -30 KPX Aogonek Oslash -30 KPX Aogonek Otilde -30 KPX Aogonek Q -30 KPX Aogonek T -120 KPX Aogonek Tcaron -120 KPX Aogonek Tcommaaccent -120 KPX Aogonek U -50 KPX Aogonek Uacute -50 KPX Aogonek Ucircumflex -50 KPX Aogonek Udieresis -50 KPX Aogonek Ugrave -50 KPX Aogonek Uhungarumlaut -50 KPX Aogonek Umacron -50 KPX Aogonek Uogonek -50 KPX Aogonek Uring -50 KPX Aogonek V -70 KPX Aogonek W -50 KPX Aogonek Y -100 KPX Aogonek Yacute -100 KPX Aogonek Ydieresis -100 KPX Aogonek u -30 KPX Aogonek uacute -30 KPX Aogonek ucircumflex -30 KPX Aogonek udieresis -30 KPX Aogonek ugrave -30 KPX Aogonek uhungarumlaut -30 KPX Aogonek umacron -30 KPX Aogonek uogonek -30 KPX Aogonek uring -30 KPX Aogonek v -40 KPX Aogonek w -40 KPX Aogonek y -40 KPX Aogonek yacute -40 KPX Aogonek ydieresis -40 KPX Aring C -30 KPX Aring Cacute -30 KPX Aring Ccaron -30 KPX Aring Ccedilla -30 KPX Aring G -30 KPX Aring Gbreve -30 KPX Aring Gcommaaccent -30 KPX Aring O -30 KPX Aring Oacute -30 KPX Aring Ocircumflex -30 KPX Aring Odieresis -30 KPX Aring Ograve -30 KPX Aring Ohungarumlaut -30 KPX Aring Omacron -30 KPX Aring Oslash -30 KPX Aring Otilde -30 KPX Aring Q -30 KPX Aring T -120 KPX Aring Tcaron -120 KPX Aring Tcommaaccent -120 KPX Aring U -50 KPX Aring Uacute -50 KPX Aring Ucircumflex -50 KPX Aring Udieresis -50 KPX Aring Ugrave -50 KPX Aring Uhungarumlaut -50 KPX Aring Umacron -50 KPX Aring Uogonek -50 KPX Aring Uring -50 KPX Aring V -70 KPX Aring W -50 KPX Aring Y -100 KPX Aring Yacute -100 KPX Aring Ydieresis -100 KPX Aring u -30 KPX Aring uacute -30 KPX Aring ucircumflex -30 KPX Aring udieresis -30 KPX Aring ugrave -30 KPX Aring uhungarumlaut -30 KPX Aring umacron -30 KPX Aring uogonek -30 KPX Aring uring -30 KPX Aring v -40 KPX Aring w -40 KPX Aring y -40 KPX Aring yacute -40 KPX Aring ydieresis -40 KPX Atilde C -30 KPX Atilde Cacute -30 KPX Atilde Ccaron -30 KPX Atilde Ccedilla -30 KPX Atilde G -30 KPX Atilde Gbreve -30 KPX Atilde Gcommaaccent -30 KPX Atilde O -30 KPX Atilde Oacute -30 KPX Atilde Ocircumflex -30 KPX Atilde Odieresis -30 KPX Atilde Ograve -30 KPX Atilde Ohungarumlaut -30 KPX Atilde Omacron -30 KPX Atilde Oslash -30 KPX Atilde Otilde -30 KPX Atilde Q -30 KPX Atilde T -120 KPX Atilde Tcaron -120 KPX Atilde Tcommaaccent -120 KPX Atilde U -50 KPX Atilde Uacute -50 KPX Atilde Ucircumflex -50 KPX Atilde Udieresis -50 KPX Atilde Ugrave -50 KPX Atilde Uhungarumlaut -50 KPX Atilde Umacron -50 KPX Atilde Uogonek -50 KPX Atilde Uring -50 KPX Atilde V -70 KPX Atilde W -50 KPX Atilde Y -100 KPX Atilde Yacute -100 KPX Atilde Ydieresis -100 KPX Atilde u -30 KPX Atilde uacute -30 KPX Atilde ucircumflex -30 KPX Atilde udieresis -30 KPX Atilde ugrave -30 KPX Atilde uhungarumlaut -30 KPX Atilde umacron -30 KPX Atilde uogonek -30 KPX Atilde uring -30 KPX Atilde v -40 KPX Atilde w -40 KPX Atilde y -40 KPX Atilde yacute -40 KPX Atilde ydieresis -40 KPX B U -10 KPX B Uacute -10 KPX B Ucircumflex -10 KPX B Udieresis -10 KPX B Ugrave -10 KPX B Uhungarumlaut -10 KPX B Umacron -10 KPX B Uogonek -10 KPX B Uring -10 KPX B comma -20 KPX B period -20 KPX C comma -30 KPX C period -30 KPX Cacute comma -30 KPX Cacute period -30 KPX Ccaron comma -30 KPX Ccaron period -30 KPX Ccedilla comma -30 KPX Ccedilla period -30 KPX D A -40 KPX D Aacute -40 KPX D Abreve -40 KPX D Acircumflex -40 KPX D Adieresis -40 KPX D Agrave -40 KPX D Amacron -40 KPX D Aogonek -40 KPX D Aring -40 KPX D Atilde -40 KPX D V -70 KPX D W -40 KPX D Y -90 KPX D Yacute -90 KPX D Ydieresis -90 KPX D comma -70 KPX D period -70 KPX Dcaron A -40 KPX Dcaron Aacute -40 KPX Dcaron Abreve -40 KPX Dcaron Acircumflex -40 KPX Dcaron Adieresis -40 KPX Dcaron Agrave -40 KPX Dcaron Amacron -40 KPX Dcaron Aogonek -40 KPX Dcaron Aring -40 KPX Dcaron Atilde -40 KPX Dcaron V -70 KPX Dcaron W -40 KPX Dcaron Y -90 KPX Dcaron Yacute -90 KPX Dcaron Ydieresis -90 KPX Dcaron comma -70 KPX Dcaron period -70 KPX Dcroat A -40 KPX Dcroat Aacute -40 KPX Dcroat Abreve -40 KPX Dcroat Acircumflex -40 KPX Dcroat Adieresis -40 KPX Dcroat Agrave -40 KPX Dcroat Amacron -40 KPX Dcroat Aogonek -40 KPX Dcroat Aring -40 KPX Dcroat Atilde -40 KPX Dcroat V -70 KPX Dcroat W -40 KPX Dcroat Y -90 KPX Dcroat Yacute -90 KPX Dcroat Ydieresis -90 KPX Dcroat comma -70 KPX Dcroat period -70 KPX F A -80 KPX F Aacute -80 KPX F Abreve -80 KPX F Acircumflex -80 KPX F Adieresis -80 KPX F Agrave -80 KPX F Amacron -80 KPX F Aogonek -80 KPX F Aring -80 KPX F Atilde -80 KPX F a -50 KPX F aacute -50 KPX F abreve -50 KPX F acircumflex -50 KPX F adieresis -50 KPX F agrave -50 KPX F amacron -50 KPX F aogonek -50 KPX F aring -50 KPX F atilde -50 KPX F comma -150 KPX F e -30 KPX F eacute -30 KPX F ecaron -30 KPX F ecircumflex -30 KPX F edieresis -30 KPX F edotaccent -30 KPX F egrave -30 KPX F emacron -30 KPX F eogonek -30 KPX F o -30 KPX F oacute -30 KPX F ocircumflex -30 KPX F odieresis -30 KPX F ograve -30 KPX F ohungarumlaut -30 KPX F omacron -30 KPX F oslash -30 KPX F otilde -30 KPX F period -150 KPX F r -45 KPX F racute -45 KPX F rcaron -45 KPX F rcommaaccent -45 KPX J A -20 KPX J Aacute -20 KPX J Abreve -20 KPX J Acircumflex -20 KPX J Adieresis -20 KPX J Agrave -20 KPX J Amacron -20 KPX J Aogonek -20 KPX J Aring -20 KPX J Atilde -20 KPX J a -20 KPX J aacute -20 KPX J abreve -20 KPX J acircumflex -20 KPX J adieresis -20 KPX J agrave -20 KPX J amacron -20 KPX J aogonek -20 KPX J aring -20 KPX J atilde -20 KPX J comma -30 KPX J period -30 KPX J u -20 KPX J uacute -20 KPX J ucircumflex -20 KPX J udieresis -20 KPX J ugrave -20 KPX J uhungarumlaut -20 KPX J umacron -20 KPX J uogonek -20 KPX J uring -20 KPX K O -50 KPX K Oacute -50 KPX K Ocircumflex -50 KPX K Odieresis -50 KPX K Ograve -50 KPX K Ohungarumlaut -50 KPX K Omacron -50 KPX K Oslash -50 KPX K Otilde -50 KPX K e -40 KPX K eacute -40 KPX K ecaron -40 KPX K ecircumflex -40 KPX K edieresis -40 KPX K edotaccent -40 KPX K egrave -40 KPX K emacron -40 KPX K eogonek -40 KPX K o -40 KPX K oacute -40 KPX K ocircumflex -40 KPX K odieresis -40 KPX K ograve -40 KPX K ohungarumlaut -40 KPX K omacron -40 KPX K oslash -40 KPX K otilde -40 KPX K u -30 KPX K uacute -30 KPX K ucircumflex -30 KPX K udieresis -30 KPX K ugrave -30 KPX K uhungarumlaut -30 KPX K umacron -30 KPX K uogonek -30 KPX K uring -30 KPX K y -50 KPX K yacute -50 KPX K ydieresis -50 KPX Kcommaaccent O -50 KPX Kcommaaccent Oacute -50 KPX Kcommaaccent Ocircumflex -50 KPX Kcommaaccent Odieresis -50 KPX Kcommaaccent Ograve -50 KPX Kcommaaccent Ohungarumlaut -50 KPX Kcommaaccent Omacron -50 KPX Kcommaaccent Oslash -50 KPX Kcommaaccent Otilde -50 KPX Kcommaaccent e -40 KPX Kcommaaccent eacute -40 KPX Kcommaaccent ecaron -40 KPX Kcommaaccent ecircumflex -40 KPX Kcommaaccent edieresis -40 KPX Kcommaaccent edotaccent -40 KPX Kcommaaccent egrave -40 KPX Kcommaaccent emacron -40 KPX Kcommaaccent eogonek -40 KPX Kcommaaccent o -40 KPX Kcommaaccent oacute -40 KPX Kcommaaccent ocircumflex -40 KPX Kcommaaccent odieresis -40 KPX Kcommaaccent ograve -40 KPX Kcommaaccent ohungarumlaut -40 KPX Kcommaaccent omacron -40 KPX Kcommaaccent oslash -40 KPX Kcommaaccent otilde -40 KPX Kcommaaccent u -30 KPX Kcommaaccent uacute -30 KPX Kcommaaccent ucircumflex -30 KPX Kcommaaccent udieresis -30 KPX Kcommaaccent ugrave -30 KPX Kcommaaccent uhungarumlaut -30 KPX Kcommaaccent umacron -30 KPX Kcommaaccent uogonek -30 KPX Kcommaaccent uring -30 KPX Kcommaaccent y -50 KPX Kcommaaccent yacute -50 KPX Kcommaaccent ydieresis -50 KPX L T -110 KPX L Tcaron -110 KPX L Tcommaaccent -110 KPX L V -110 KPX L W -70 KPX L Y -140 KPX L Yacute -140 KPX L Ydieresis -140 KPX L quotedblright -140 KPX L quoteright -160 KPX L y -30 KPX L yacute -30 KPX L ydieresis -30 KPX Lacute T -110 KPX Lacute Tcaron -110 KPX Lacute Tcommaaccent -110 KPX Lacute V -110 KPX Lacute W -70 KPX Lacute Y -140 KPX Lacute Yacute -140 KPX Lacute Ydieresis -140 KPX Lacute quotedblright -140 KPX Lacute quoteright -160 KPX Lacute y -30 KPX Lacute yacute -30 KPX Lacute ydieresis -30 KPX Lcaron T -110 KPX Lcaron Tcaron -110 KPX Lcaron Tcommaaccent -110 KPX Lcaron V -110 KPX Lcaron W -70 KPX Lcaron Y -140 KPX Lcaron Yacute -140 KPX Lcaron Ydieresis -140 KPX Lcaron quotedblright -140 KPX Lcaron quoteright -160 KPX Lcaron y -30 KPX Lcaron yacute -30 KPX Lcaron ydieresis -30 KPX Lcommaaccent T -110 KPX Lcommaaccent Tcaron -110 KPX Lcommaaccent Tcommaaccent -110 KPX Lcommaaccent V -110 KPX Lcommaaccent W -70 KPX Lcommaaccent Y -140 KPX Lcommaaccent Yacute -140 KPX Lcommaaccent Ydieresis -140 KPX Lcommaaccent quotedblright -140 KPX Lcommaaccent quoteright -160 KPX Lcommaaccent y -30 KPX Lcommaaccent yacute -30 KPX Lcommaaccent ydieresis -30 KPX Lslash T -110 KPX Lslash Tcaron -110 KPX Lslash Tcommaaccent -110 KPX Lslash V -110 KPX Lslash W -70 KPX Lslash Y -140 KPX Lslash Yacute -140 KPX Lslash Ydieresis -140 KPX Lslash quotedblright -140 KPX Lslash quoteright -160 KPX Lslash y -30 KPX Lslash yacute -30 KPX Lslash ydieresis -30 KPX O A -20 KPX O Aacute -20 KPX O Abreve -20 KPX O Acircumflex -20 KPX O Adieresis -20 KPX O Agrave -20 KPX O Amacron -20 KPX O Aogonek -20 KPX O Aring -20 KPX O Atilde -20 KPX O T -40 KPX O Tcaron -40 KPX O Tcommaaccent -40 KPX O V -50 KPX O W -30 KPX O X -60 KPX O Y -70 KPX O Yacute -70 KPX O Ydieresis -70 KPX O comma -40 KPX O period -40 KPX Oacute A -20 KPX Oacute Aacute -20 KPX Oacute Abreve -20 KPX Oacute Acircumflex -20 KPX Oacute Adieresis -20 KPX Oacute Agrave -20 KPX Oacute Amacron -20 KPX Oacute Aogonek -20 KPX Oacute Aring -20 KPX Oacute Atilde -20 KPX Oacute T -40 KPX Oacute Tcaron -40 KPX Oacute Tcommaaccent -40 KPX Oacute V -50 KPX Oacute W -30 KPX Oacute X -60 KPX Oacute Y -70 KPX Oacute Yacute -70 KPX Oacute Ydieresis -70 KPX Oacute comma -40 KPX Oacute period -40 KPX Ocircumflex A -20 KPX Ocircumflex Aacute -20 KPX Ocircumflex Abreve -20 KPX Ocircumflex Acircumflex -20 KPX Ocircumflex Adieresis -20 KPX Ocircumflex Agrave -20 KPX Ocircumflex Amacron -20 KPX Ocircumflex Aogonek -20 KPX Ocircumflex Aring -20 KPX Ocircumflex Atilde -20 KPX Ocircumflex T -40 KPX Ocircumflex Tcaron -40 KPX Ocircumflex Tcommaaccent -40 KPX Ocircumflex V -50 KPX Ocircumflex W -30 KPX Ocircumflex X -60 KPX Ocircumflex Y -70 KPX Ocircumflex Yacute -70 KPX Ocircumflex Ydieresis -70 KPX Ocircumflex comma -40 KPX Ocircumflex period -40 KPX Odieresis A -20 KPX Odieresis Aacute -20 KPX Odieresis Abreve -20 KPX Odieresis Acircumflex -20 KPX Odieresis Adieresis -20 KPX Odieresis Agrave -20 KPX Odieresis Amacron -20 KPX Odieresis Aogonek -20 KPX Odieresis Aring -20 KPX Odieresis Atilde -20 KPX Odieresis T -40 KPX Odieresis Tcaron -40 KPX Odieresis Tcommaaccent -40 KPX Odieresis V -50 KPX Odieresis W -30 KPX Odieresis X -60 KPX Odieresis Y -70 KPX Odieresis Yacute -70 KPX Odieresis Ydieresis -70 KPX Odieresis comma -40 KPX Odieresis period -40 KPX Ograve A -20 KPX Ograve Aacute -20 KPX Ograve Abreve -20 KPX Ograve Acircumflex -20 KPX Ograve Adieresis -20 KPX Ograve Agrave -20 KPX Ograve Amacron -20 KPX Ograve Aogonek -20 KPX Ograve Aring -20 KPX Ograve Atilde -20 KPX Ograve T -40 KPX Ograve Tcaron -40 KPX Ograve Tcommaaccent -40 KPX Ograve V -50 KPX Ograve W -30 KPX Ograve X -60 KPX Ograve Y -70 KPX Ograve Yacute -70 KPX Ograve Ydieresis -70 KPX Ograve comma -40 KPX Ograve period -40 KPX Ohungarumlaut A -20 KPX Ohungarumlaut Aacute -20 KPX Ohungarumlaut Abreve -20 KPX Ohungarumlaut Acircumflex -20 KPX Ohungarumlaut Adieresis -20 KPX Ohungarumlaut Agrave -20 KPX Ohungarumlaut Amacron -20 KPX Ohungarumlaut Aogonek -20 KPX Ohungarumlaut Aring -20 KPX Ohungarumlaut Atilde -20 KPX Ohungarumlaut T -40 KPX Ohungarumlaut Tcaron -40 KPX Ohungarumlaut Tcommaaccent -40 KPX Ohungarumlaut V -50 KPX Ohungarumlaut W -30 KPX Ohungarumlaut X -60 KPX Ohungarumlaut Y -70 KPX Ohungarumlaut Yacute -70 KPX Ohungarumlaut Ydieresis -70 KPX Ohungarumlaut comma -40 KPX Ohungarumlaut period -40 KPX Omacron A -20 KPX Omacron Aacute -20 KPX Omacron Abreve -20 KPX Omacron Acircumflex -20 KPX Omacron Adieresis -20 KPX Omacron Agrave -20 KPX Omacron Amacron -20 KPX Omacron Aogonek -20 KPX Omacron Aring -20 KPX Omacron Atilde -20 KPX Omacron T -40 KPX Omacron Tcaron -40 KPX Omacron Tcommaaccent -40 KPX Omacron V -50 KPX Omacron W -30 KPX Omacron X -60 KPX Omacron Y -70 KPX Omacron Yacute -70 KPX Omacron Ydieresis -70 KPX Omacron comma -40 KPX Omacron period -40 KPX Oslash A -20 KPX Oslash Aacute -20 KPX Oslash Abreve -20 KPX Oslash Acircumflex -20 KPX Oslash Adieresis -20 KPX Oslash Agrave -20 KPX Oslash Amacron -20 KPX Oslash Aogonek -20 KPX Oslash Aring -20 KPX Oslash Atilde -20 KPX Oslash T -40 KPX Oslash Tcaron -40 KPX Oslash Tcommaaccent -40 KPX Oslash V -50 KPX Oslash W -30 KPX Oslash X -60 KPX Oslash Y -70 KPX Oslash Yacute -70 KPX Oslash Ydieresis -70 KPX Oslash comma -40 KPX Oslash period -40 KPX Otilde A -20 KPX Otilde Aacute -20 KPX Otilde Abreve -20 KPX Otilde Acircumflex -20 KPX Otilde Adieresis -20 KPX Otilde Agrave -20 KPX Otilde Amacron -20 KPX Otilde Aogonek -20 KPX Otilde Aring -20 KPX Otilde Atilde -20 KPX Otilde T -40 KPX Otilde Tcaron -40 KPX Otilde Tcommaaccent -40 KPX Otilde V -50 KPX Otilde W -30 KPX Otilde X -60 KPX Otilde Y -70 KPX Otilde Yacute -70 KPX Otilde Ydieresis -70 KPX Otilde comma -40 KPX Otilde period -40 KPX P A -120 KPX P Aacute -120 KPX P Abreve -120 KPX P Acircumflex -120 KPX P Adieresis -120 KPX P Agrave -120 KPX P Amacron -120 KPX P Aogonek -120 KPX P Aring -120 KPX P Atilde -120 KPX P a -40 KPX P aacute -40 KPX P abreve -40 KPX P acircumflex -40 KPX P adieresis -40 KPX P agrave -40 KPX P amacron -40 KPX P aogonek -40 KPX P aring -40 KPX P atilde -40 KPX P comma -180 KPX P e -50 KPX P eacute -50 KPX P ecaron -50 KPX P ecircumflex -50 KPX P edieresis -50 KPX P edotaccent -50 KPX P egrave -50 KPX P emacron -50 KPX P eogonek -50 KPX P o -50 KPX P oacute -50 KPX P ocircumflex -50 KPX P odieresis -50 KPX P ograve -50 KPX P ohungarumlaut -50 KPX P omacron -50 KPX P oslash -50 KPX P otilde -50 KPX P period -180 KPX Q U -10 KPX Q Uacute -10 KPX Q Ucircumflex -10 KPX Q Udieresis -10 KPX Q Ugrave -10 KPX Q Uhungarumlaut -10 KPX Q Umacron -10 KPX Q Uogonek -10 KPX Q Uring -10 KPX R O -20 KPX R Oacute -20 KPX R Ocircumflex -20 KPX R Odieresis -20 KPX R Ograve -20 KPX R Ohungarumlaut -20 KPX R Omacron -20 KPX R Oslash -20 KPX R Otilde -20 KPX R T -30 KPX R Tcaron -30 KPX R Tcommaaccent -30 KPX R U -40 KPX R Uacute -40 KPX R Ucircumflex -40 KPX R Udieresis -40 KPX R Ugrave -40 KPX R Uhungarumlaut -40 KPX R Umacron -40 KPX R Uogonek -40 KPX R Uring -40 KPX R V -50 KPX R W -30 KPX R Y -50 KPX R Yacute -50 KPX R Ydieresis -50 KPX Racute O -20 KPX Racute Oacute -20 KPX Racute Ocircumflex -20 KPX Racute Odieresis -20 KPX Racute Ograve -20 KPX Racute Ohungarumlaut -20 KPX Racute Omacron -20 KPX Racute Oslash -20 KPX Racute Otilde -20 KPX Racute T -30 KPX Racute Tcaron -30 KPX Racute Tcommaaccent -30 KPX Racute U -40 KPX Racute Uacute -40 KPX Racute Ucircumflex -40 KPX Racute Udieresis -40 KPX Racute Ugrave -40 KPX Racute Uhungarumlaut -40 KPX Racute Umacron -40 KPX Racute Uogonek -40 KPX Racute Uring -40 KPX Racute V -50 KPX Racute W -30 KPX Racute Y -50 KPX Racute Yacute -50 KPX Racute Ydieresis -50 KPX Rcaron O -20 KPX Rcaron Oacute -20 KPX Rcaron Ocircumflex -20 KPX Rcaron Odieresis -20 KPX Rcaron Ograve -20 KPX Rcaron Ohungarumlaut -20 KPX Rcaron Omacron -20 KPX Rcaron Oslash -20 KPX Rcaron Otilde -20 KPX Rcaron T -30 KPX Rcaron Tcaron -30 KPX Rcaron Tcommaaccent -30 KPX Rcaron U -40 KPX Rcaron Uacute -40 KPX Rcaron Ucircumflex -40 KPX Rcaron Udieresis -40 KPX Rcaron Ugrave -40 KPX Rcaron Uhungarumlaut -40 KPX Rcaron Umacron -40 KPX Rcaron Uogonek -40 KPX Rcaron Uring -40 KPX Rcaron V -50 KPX Rcaron W -30 KPX Rcaron Y -50 KPX Rcaron Yacute -50 KPX Rcaron Ydieresis -50 KPX Rcommaaccent O -20 KPX Rcommaaccent Oacute -20 KPX Rcommaaccent Ocircumflex -20 KPX Rcommaaccent Odieresis -20 KPX Rcommaaccent Ograve -20 KPX Rcommaaccent Ohungarumlaut -20 KPX Rcommaaccent Omacron -20 KPX Rcommaaccent Oslash -20 KPX Rcommaaccent Otilde -20 KPX Rcommaaccent T -30 KPX Rcommaaccent Tcaron -30 KPX Rcommaaccent Tcommaaccent -30 KPX Rcommaaccent U -40 KPX Rcommaaccent Uacute -40 KPX Rcommaaccent Ucircumflex -40 KPX Rcommaaccent Udieresis -40 KPX Rcommaaccent Ugrave -40 KPX Rcommaaccent Uhungarumlaut -40 KPX Rcommaaccent Umacron -40 KPX Rcommaaccent Uogonek -40 KPX Rcommaaccent Uring -40 KPX Rcommaaccent V -50 KPX Rcommaaccent W -30 KPX Rcommaaccent Y -50 KPX Rcommaaccent Yacute -50 KPX Rcommaaccent Ydieresis -50 KPX S comma -20 KPX S period -20 KPX Sacute comma -20 KPX Sacute period -20 KPX Scaron comma -20 KPX Scaron period -20 KPX Scedilla comma -20 KPX Scedilla period -20 KPX Scommaaccent comma -20 KPX Scommaaccent period -20 KPX T A -120 KPX T Aacute -120 KPX T Abreve -120 KPX T Acircumflex -120 KPX T Adieresis -120 KPX T Agrave -120 KPX T Amacron -120 KPX T Aogonek -120 KPX T Aring -120 KPX T Atilde -120 KPX T O -40 KPX T Oacute -40 KPX T Ocircumflex -40 KPX T Odieresis -40 KPX T Ograve -40 KPX T Ohungarumlaut -40 KPX T Omacron -40 KPX T Oslash -40 KPX T Otilde -40 KPX T a -120 KPX T aacute -120 KPX T abreve -60 KPX T acircumflex -120 KPX T adieresis -120 KPX T agrave -120 KPX T amacron -60 KPX T aogonek -120 KPX T aring -120 KPX T atilde -60 KPX T colon -20 KPX T comma -120 KPX T e -120 KPX T eacute -120 KPX T ecaron -120 KPX T ecircumflex -120 KPX T edieresis -120 KPX T edotaccent -120 KPX T egrave -60 KPX T emacron -60 KPX T eogonek -120 KPX T hyphen -140 KPX T o -120 KPX T oacute -120 KPX T ocircumflex -120 KPX T odieresis -120 KPX T ograve -120 KPX T ohungarumlaut -120 KPX T omacron -60 KPX T oslash -120 KPX T otilde -60 KPX T period -120 KPX T r -120 KPX T racute -120 KPX T rcaron -120 KPX T rcommaaccent -120 KPX T semicolon -20 KPX T u -120 KPX T uacute -120 KPX T ucircumflex -120 KPX T udieresis -120 KPX T ugrave -120 KPX T uhungarumlaut -120 KPX T umacron -60 KPX T uogonek -120 KPX T uring -120 KPX T w -120 KPX T y -120 KPX T yacute -120 KPX T ydieresis -60 KPX Tcaron A -120 KPX Tcaron Aacute -120 KPX Tcaron Abreve -120 KPX Tcaron Acircumflex -120 KPX Tcaron Adieresis -120 KPX Tcaron Agrave -120 KPX Tcaron Amacron -120 KPX Tcaron Aogonek -120 KPX Tcaron Aring -120 KPX Tcaron Atilde -120 KPX Tcaron O -40 KPX Tcaron Oacute -40 KPX Tcaron Ocircumflex -40 KPX Tcaron Odieresis -40 KPX Tcaron Ograve -40 KPX Tcaron Ohungarumlaut -40 KPX Tcaron Omacron -40 KPX Tcaron Oslash -40 KPX Tcaron Otilde -40 KPX Tcaron a -120 KPX Tcaron aacute -120 KPX Tcaron abreve -60 KPX Tcaron acircumflex -120 KPX Tcaron adieresis -120 KPX Tcaron agrave -120 KPX Tcaron amacron -60 KPX Tcaron aogonek -120 KPX Tcaron aring -120 KPX Tcaron atilde -60 KPX Tcaron colon -20 KPX Tcaron comma -120 KPX Tcaron e -120 KPX Tcaron eacute -120 KPX Tcaron ecaron -120 KPX Tcaron ecircumflex -120 KPX Tcaron edieresis -120 KPX Tcaron edotaccent -120 KPX Tcaron egrave -60 KPX Tcaron emacron -60 KPX Tcaron eogonek -120 KPX Tcaron hyphen -140 KPX Tcaron o -120 KPX Tcaron oacute -120 KPX Tcaron ocircumflex -120 KPX Tcaron odieresis -120 KPX Tcaron ograve -120 KPX Tcaron ohungarumlaut -120 KPX Tcaron omacron -60 KPX Tcaron oslash -120 KPX Tcaron otilde -60 KPX Tcaron period -120 KPX Tcaron r -120 KPX Tcaron racute -120 KPX Tcaron rcaron -120 KPX Tcaron rcommaaccent -120 KPX Tcaron semicolon -20 KPX Tcaron u -120 KPX Tcaron uacute -120 KPX Tcaron ucircumflex -120 KPX Tcaron udieresis -120 KPX Tcaron ugrave -120 KPX Tcaron uhungarumlaut -120 KPX Tcaron umacron -60 KPX Tcaron uogonek -120 KPX Tcaron uring -120 KPX Tcaron w -120 KPX Tcaron y -120 KPX Tcaron yacute -120 KPX Tcaron ydieresis -60 KPX Tcommaaccent A -120 KPX Tcommaaccent Aacute -120 KPX Tcommaaccent Abreve -120 KPX Tcommaaccent Acircumflex -120 KPX Tcommaaccent Adieresis -120 KPX Tcommaaccent Agrave -120 KPX Tcommaaccent Amacron -120 KPX Tcommaaccent Aogonek -120 KPX Tcommaaccent Aring -120 KPX Tcommaaccent Atilde -120 KPX Tcommaaccent O -40 KPX Tcommaaccent Oacute -40 KPX Tcommaaccent Ocircumflex -40 KPX Tcommaaccent Odieresis -40 KPX Tcommaaccent Ograve -40 KPX Tcommaaccent Ohungarumlaut -40 KPX Tcommaaccent Omacron -40 KPX Tcommaaccent Oslash -40 KPX Tcommaaccent Otilde -40 KPX Tcommaaccent a -120 KPX Tcommaaccent aacute -120 KPX Tcommaaccent abreve -60 KPX Tcommaaccent acircumflex -120 KPX Tcommaaccent adieresis -120 KPX Tcommaaccent agrave -120 KPX Tcommaaccent amacron -60 KPX Tcommaaccent aogonek -120 KPX Tcommaaccent aring -120 KPX Tcommaaccent atilde -60 KPX Tcommaaccent colon -20 KPX Tcommaaccent comma -120 KPX Tcommaaccent e -120 KPX Tcommaaccent eacute -120 KPX Tcommaaccent ecaron -120 KPX Tcommaaccent ecircumflex -120 KPX Tcommaaccent edieresis -120 KPX Tcommaaccent edotaccent -120 KPX Tcommaaccent egrave -60 KPX Tcommaaccent emacron -60 KPX Tcommaaccent eogonek -120 KPX Tcommaaccent hyphen -140 KPX Tcommaaccent o -120 KPX Tcommaaccent oacute -120 KPX Tcommaaccent ocircumflex -120 KPX Tcommaaccent odieresis -120 KPX Tcommaaccent ograve -120 KPX Tcommaaccent ohungarumlaut -120 KPX Tcommaaccent omacron -60 KPX Tcommaaccent oslash -120 KPX Tcommaaccent otilde -60 KPX Tcommaaccent period -120 KPX Tcommaaccent r -120 KPX Tcommaaccent racute -120 KPX Tcommaaccent rcaron -120 KPX Tcommaaccent rcommaaccent -120 KPX Tcommaaccent semicolon -20 KPX Tcommaaccent u -120 KPX Tcommaaccent uacute -120 KPX Tcommaaccent ucircumflex -120 KPX Tcommaaccent udieresis -120 KPX Tcommaaccent ugrave -120 KPX Tcommaaccent uhungarumlaut -120 KPX Tcommaaccent umacron -60 KPX Tcommaaccent uogonek -120 KPX Tcommaaccent uring -120 KPX Tcommaaccent w -120 KPX Tcommaaccent y -120 KPX Tcommaaccent yacute -120 KPX Tcommaaccent ydieresis -60 KPX U A -40 KPX U Aacute -40 KPX U Abreve -40 KPX U Acircumflex -40 KPX U Adieresis -40 KPX U Agrave -40 KPX U Amacron -40 KPX U Aogonek -40 KPX U Aring -40 KPX U Atilde -40 KPX U comma -40 KPX U period -40 KPX Uacute A -40 KPX Uacute Aacute -40 KPX Uacute Abreve -40 KPX Uacute Acircumflex -40 KPX Uacute Adieresis -40 KPX Uacute Agrave -40 KPX Uacute Amacron -40 KPX Uacute Aogonek -40 KPX Uacute Aring -40 KPX Uacute Atilde -40 KPX Uacute comma -40 KPX Uacute period -40 KPX Ucircumflex A -40 KPX Ucircumflex Aacute -40 KPX Ucircumflex Abreve -40 KPX Ucircumflex Acircumflex -40 KPX Ucircumflex Adieresis -40 KPX Ucircumflex Agrave -40 KPX Ucircumflex Amacron -40 KPX Ucircumflex Aogonek -40 KPX Ucircumflex Aring -40 KPX Ucircumflex Atilde -40 KPX Ucircumflex comma -40 KPX Ucircumflex period -40 KPX Udieresis A -40 KPX Udieresis Aacute -40 KPX Udieresis Abreve -40 KPX Udieresis Acircumflex -40 KPX Udieresis Adieresis -40 KPX Udieresis Agrave -40 KPX Udieresis Amacron -40 KPX Udieresis Aogonek -40 KPX Udieresis Aring -40 KPX Udieresis Atilde -40 KPX Udieresis comma -40 KPX Udieresis period -40 KPX Ugrave A -40 KPX Ugrave Aacute -40 KPX Ugrave Abreve -40 KPX Ugrave Acircumflex -40 KPX Ugrave Adieresis -40 KPX Ugrave Agrave -40 KPX Ugrave Amacron -40 KPX Ugrave Aogonek -40 KPX Ugrave Aring -40 KPX Ugrave Atilde -40 KPX Ugrave comma -40 KPX Ugrave period -40 KPX Uhungarumlaut A -40 KPX Uhungarumlaut Aacute -40 KPX Uhungarumlaut Abreve -40 KPX Uhungarumlaut Acircumflex -40 KPX Uhungarumlaut Adieresis -40 KPX Uhungarumlaut Agrave -40 KPX Uhungarumlaut Amacron -40 KPX Uhungarumlaut Aogonek -40 KPX Uhungarumlaut Aring -40 KPX Uhungarumlaut Atilde -40 KPX Uhungarumlaut comma -40 KPX Uhungarumlaut period -40 KPX Umacron A -40 KPX Umacron Aacute -40 KPX Umacron Abreve -40 KPX Umacron Acircumflex -40 KPX Umacron Adieresis -40 KPX Umacron Agrave -40 KPX Umacron Amacron -40 KPX Umacron Aogonek -40 KPX Umacron Aring -40 KPX Umacron Atilde -40 KPX Umacron comma -40 KPX Umacron period -40 KPX Uogonek A -40 KPX Uogonek Aacute -40 KPX Uogonek Abreve -40 KPX Uogonek Acircumflex -40 KPX Uogonek Adieresis -40 KPX Uogonek Agrave -40 KPX Uogonek Amacron -40 KPX Uogonek Aogonek -40 KPX Uogonek Aring -40 KPX Uogonek Atilde -40 KPX Uogonek comma -40 KPX Uogonek period -40 KPX Uring A -40 KPX Uring Aacute -40 KPX Uring Abreve -40 KPX Uring Acircumflex -40 KPX Uring Adieresis -40 KPX Uring Agrave -40 KPX Uring Amacron -40 KPX Uring Aogonek -40 KPX Uring Aring -40 KPX Uring Atilde -40 KPX Uring comma -40 KPX Uring period -40 KPX V A -80 KPX V Aacute -80 KPX V Abreve -80 KPX V Acircumflex -80 KPX V Adieresis -80 KPX V Agrave -80 KPX V Amacron -80 KPX V Aogonek -80 KPX V Aring -80 KPX V Atilde -80 KPX V G -40 KPX V Gbreve -40 KPX V Gcommaaccent -40 KPX V O -40 KPX V Oacute -40 KPX V Ocircumflex -40 KPX V Odieresis -40 KPX V Ograve -40 KPX V Ohungarumlaut -40 KPX V Omacron -40 KPX V Oslash -40 KPX V Otilde -40 KPX V a -70 KPX V aacute -70 KPX V abreve -70 KPX V acircumflex -70 KPX V adieresis -70 KPX V agrave -70 KPX V amacron -70 KPX V aogonek -70 KPX V aring -70 KPX V atilde -70 KPX V colon -40 KPX V comma -125 KPX V e -80 KPX V eacute -80 KPX V ecaron -80 KPX V ecircumflex -80 KPX V edieresis -80 KPX V edotaccent -80 KPX V egrave -80 KPX V emacron -80 KPX V eogonek -80 KPX V hyphen -80 KPX V o -80 KPX V oacute -80 KPX V ocircumflex -80 KPX V odieresis -80 KPX V ograve -80 KPX V ohungarumlaut -80 KPX V omacron -80 KPX V oslash -80 KPX V otilde -80 KPX V period -125 KPX V semicolon -40 KPX V u -70 KPX V uacute -70 KPX V ucircumflex -70 KPX V udieresis -70 KPX V ugrave -70 KPX V uhungarumlaut -70 KPX V umacron -70 KPX V uogonek -70 KPX V uring -70 KPX W A -50 KPX W Aacute -50 KPX W Abreve -50 KPX W Acircumflex -50 KPX W Adieresis -50 KPX W Agrave -50 KPX W Amacron -50 KPX W Aogonek -50 KPX W Aring -50 KPX W Atilde -50 KPX W O -20 KPX W Oacute -20 KPX W Ocircumflex -20 KPX W Odieresis -20 KPX W Ograve -20 KPX W Ohungarumlaut -20 KPX W Omacron -20 KPX W Oslash -20 KPX W Otilde -20 KPX W a -40 KPX W aacute -40 KPX W abreve -40 KPX W acircumflex -40 KPX W adieresis -40 KPX W agrave -40 KPX W amacron -40 KPX W aogonek -40 KPX W aring -40 KPX W atilde -40 KPX W comma -80 KPX W e -30 KPX W eacute -30 KPX W ecaron -30 KPX W ecircumflex -30 KPX W edieresis -30 KPX W edotaccent -30 KPX W egrave -30 KPX W emacron -30 KPX W eogonek -30 KPX W hyphen -40 KPX W o -30 KPX W oacute -30 KPX W ocircumflex -30 KPX W odieresis -30 KPX W ograve -30 KPX W ohungarumlaut -30 KPX W omacron -30 KPX W oslash -30 KPX W otilde -30 KPX W period -80 KPX W u -30 KPX W uacute -30 KPX W ucircumflex -30 KPX W udieresis -30 KPX W ugrave -30 KPX W uhungarumlaut -30 KPX W umacron -30 KPX W uogonek -30 KPX W uring -30 KPX W y -20 KPX W yacute -20 KPX W ydieresis -20 KPX Y A -110 KPX Y Aacute -110 KPX Y Abreve -110 KPX Y Acircumflex -110 KPX Y Adieresis -110 KPX Y Agrave -110 KPX Y Amacron -110 KPX Y Aogonek -110 KPX Y Aring -110 KPX Y Atilde -110 KPX Y O -85 KPX Y Oacute -85 KPX Y Ocircumflex -85 KPX Y Odieresis -85 KPX Y Ograve -85 KPX Y Ohungarumlaut -85 KPX Y Omacron -85 KPX Y Oslash -85 KPX Y Otilde -85 KPX Y a -140 KPX Y aacute -140 KPX Y abreve -70 KPX Y acircumflex -140 KPX Y adieresis -140 KPX Y agrave -140 KPX Y amacron -70 KPX Y aogonek -140 KPX Y aring -140 KPX Y atilde -140 KPX Y colon -60 KPX Y comma -140 KPX Y e -140 KPX Y eacute -140 KPX Y ecaron -140 KPX Y ecircumflex -140 KPX Y edieresis -140 KPX Y edotaccent -140 KPX Y egrave -140 KPX Y emacron -70 KPX Y eogonek -140 KPX Y hyphen -140 KPX Y i -20 KPX Y iacute -20 KPX Y iogonek -20 KPX Y o -140 KPX Y oacute -140 KPX Y ocircumflex -140 KPX Y odieresis -140 KPX Y ograve -140 KPX Y ohungarumlaut -140 KPX Y omacron -140 KPX Y oslash -140 KPX Y otilde -140 KPX Y period -140 KPX Y semicolon -60 KPX Y u -110 KPX Y uacute -110 KPX Y ucircumflex -110 KPX Y udieresis -110 KPX Y ugrave -110 KPX Y uhungarumlaut -110 KPX Y umacron -110 KPX Y uogonek -110 KPX Y uring -110 KPX Yacute A -110 KPX Yacute Aacute -110 KPX Yacute Abreve -110 KPX Yacute Acircumflex -110 KPX Yacute Adieresis -110 KPX Yacute Agrave -110 KPX Yacute Amacron -110 KPX Yacute Aogonek -110 KPX Yacute Aring -110 KPX Yacute Atilde -110 KPX Yacute O -85 KPX Yacute Oacute -85 KPX Yacute Ocircumflex -85 KPX Yacute Odieresis -85 KPX Yacute Ograve -85 KPX Yacute Ohungarumlaut -85 KPX Yacute Omacron -85 KPX Yacute Oslash -85 KPX Yacute Otilde -85 KPX Yacute a -140 KPX Yacute aacute -140 KPX Yacute abreve -70 KPX Yacute acircumflex -140 KPX Yacute adieresis -140 KPX Yacute agrave -140 KPX Yacute amacron -70 KPX Yacute aogonek -140 KPX Yacute aring -140 KPX Yacute atilde -70 KPX Yacute colon -60 KPX Yacute comma -140 KPX Yacute e -140 KPX Yacute eacute -140 KPX Yacute ecaron -140 KPX Yacute ecircumflex -140 KPX Yacute edieresis -140 KPX Yacute edotaccent -140 KPX Yacute egrave -140 KPX Yacute emacron -70 KPX Yacute eogonek -140 KPX Yacute hyphen -140 KPX Yacute i -20 KPX Yacute iacute -20 KPX Yacute iogonek -20 KPX Yacute o -140 KPX Yacute oacute -140 KPX Yacute ocircumflex -140 KPX Yacute odieresis -140 KPX Yacute ograve -140 KPX Yacute ohungarumlaut -140 KPX Yacute omacron -70 KPX Yacute oslash -140 KPX Yacute otilde -140 KPX Yacute period -140 KPX Yacute semicolon -60 KPX Yacute u -110 KPX Yacute uacute -110 KPX Yacute ucircumflex -110 KPX Yacute udieresis -110 KPX Yacute ugrave -110 KPX Yacute uhungarumlaut -110 KPX Yacute umacron -110 KPX Yacute uogonek -110 KPX Yacute uring -110 KPX Ydieresis A -110 KPX Ydieresis Aacute -110 KPX Ydieresis Abreve -110 KPX Ydieresis Acircumflex -110 KPX Ydieresis Adieresis -110 KPX Ydieresis Agrave -110 KPX Ydieresis Amacron -110 KPX Ydieresis Aogonek -110 KPX Ydieresis Aring -110 KPX Ydieresis Atilde -110 KPX Ydieresis O -85 KPX Ydieresis Oacute -85 KPX Ydieresis Ocircumflex -85 KPX Ydieresis Odieresis -85 KPX Ydieresis Ograve -85 KPX Ydieresis Ohungarumlaut -85 KPX Ydieresis Omacron -85 KPX Ydieresis Oslash -85 KPX Ydieresis Otilde -85 KPX Ydieresis a -140 KPX Ydieresis aacute -140 KPX Ydieresis abreve -70 KPX Ydieresis acircumflex -140 KPX Ydieresis adieresis -140 KPX Ydieresis agrave -140 KPX Ydieresis amacron -70 KPX Ydieresis aogonek -140 KPX Ydieresis aring -140 KPX Ydieresis atilde -70 KPX Ydieresis colon -60 KPX Ydieresis comma -140 KPX Ydieresis e -140 KPX Ydieresis eacute -140 KPX Ydieresis ecaron -140 KPX Ydieresis ecircumflex -140 KPX Ydieresis edieresis -140 KPX Ydieresis edotaccent -140 KPX Ydieresis egrave -140 KPX Ydieresis emacron -70 KPX Ydieresis eogonek -140 KPX Ydieresis hyphen -140 KPX Ydieresis i -20 KPX Ydieresis iacute -20 KPX Ydieresis iogonek -20 KPX Ydieresis o -140 KPX Ydieresis oacute -140 KPX Ydieresis ocircumflex -140 KPX Ydieresis odieresis -140 KPX Ydieresis ograve -140 KPX Ydieresis ohungarumlaut -140 KPX Ydieresis omacron -140 KPX Ydieresis oslash -140 KPX Ydieresis otilde -140 KPX Ydieresis period -140 KPX Ydieresis semicolon -60 KPX Ydieresis u -110 KPX Ydieresis uacute -110 KPX Ydieresis ucircumflex -110 KPX Ydieresis udieresis -110 KPX Ydieresis ugrave -110 KPX Ydieresis uhungarumlaut -110 KPX Ydieresis umacron -110 KPX Ydieresis uogonek -110 KPX Ydieresis uring -110 KPX a v -20 KPX a w -20 KPX a y -30 KPX a yacute -30 KPX a ydieresis -30 KPX aacute v -20 KPX aacute w -20 KPX aacute y -30 KPX aacute yacute -30 KPX aacute ydieresis -30 KPX abreve v -20 KPX abreve w -20 KPX abreve y -30 KPX abreve yacute -30 KPX abreve ydieresis -30 KPX acircumflex v -20 KPX acircumflex w -20 KPX acircumflex y -30 KPX acircumflex yacute -30 KPX acircumflex ydieresis -30 KPX adieresis v -20 KPX adieresis w -20 KPX adieresis y -30 KPX adieresis yacute -30 KPX adieresis ydieresis -30 KPX agrave v -20 KPX agrave w -20 KPX agrave y -30 KPX agrave yacute -30 KPX agrave ydieresis -30 KPX amacron v -20 KPX amacron w -20 KPX amacron y -30 KPX amacron yacute -30 KPX amacron ydieresis -30 KPX aogonek v -20 KPX aogonek w -20 KPX aogonek y -30 KPX aogonek yacute -30 KPX aogonek ydieresis -30 KPX aring v -20 KPX aring w -20 KPX aring y -30 KPX aring yacute -30 KPX aring ydieresis -30 KPX atilde v -20 KPX atilde w -20 KPX atilde y -30 KPX atilde yacute -30 KPX atilde ydieresis -30 KPX b b -10 KPX b comma -40 KPX b l -20 KPX b lacute -20 KPX b lcommaaccent -20 KPX b lslash -20 KPX b period -40 KPX b u -20 KPX b uacute -20 KPX b ucircumflex -20 KPX b udieresis -20 KPX b ugrave -20 KPX b uhungarumlaut -20 KPX b umacron -20 KPX b uogonek -20 KPX b uring -20 KPX b v -20 KPX b y -20 KPX b yacute -20 KPX b ydieresis -20 KPX c comma -15 KPX c k -20 KPX c kcommaaccent -20 KPX cacute comma -15 KPX cacute k -20 KPX cacute kcommaaccent -20 KPX ccaron comma -15 KPX ccaron k -20 KPX ccaron kcommaaccent -20 KPX ccedilla comma -15 KPX ccedilla k -20 KPX ccedilla kcommaaccent -20 KPX colon space -50 KPX comma quotedblright -100 KPX comma quoteright -100 KPX e comma -15 KPX e period -15 KPX e v -30 KPX e w -20 KPX e x -30 KPX e y -20 KPX e yacute -20 KPX e ydieresis -20 KPX eacute comma -15 KPX eacute period -15 KPX eacute v -30 KPX eacute w -20 KPX eacute x -30 KPX eacute y -20 KPX eacute yacute -20 KPX eacute ydieresis -20 KPX ecaron comma -15 KPX ecaron period -15 KPX ecaron v -30 KPX ecaron w -20 KPX ecaron x -30 KPX ecaron y -20 KPX ecaron yacute -20 KPX ecaron ydieresis -20 KPX ecircumflex comma -15 KPX ecircumflex period -15 KPX ecircumflex v -30 KPX ecircumflex w -20 KPX ecircumflex x -30 KPX ecircumflex y -20 KPX ecircumflex yacute -20 KPX ecircumflex ydieresis -20 KPX edieresis comma -15 KPX edieresis period -15 KPX edieresis v -30 KPX edieresis w -20 KPX edieresis x -30 KPX edieresis y -20 KPX edieresis yacute -20 KPX edieresis ydieresis -20 KPX edotaccent comma -15 KPX edotaccent period -15 KPX edotaccent v -30 KPX edotaccent w -20 KPX edotaccent x -30 KPX edotaccent y -20 KPX edotaccent yacute -20 KPX edotaccent ydieresis -20 KPX egrave comma -15 KPX egrave period -15 KPX egrave v -30 KPX egrave w -20 KPX egrave x -30 KPX egrave y -20 KPX egrave yacute -20 KPX egrave ydieresis -20 KPX emacron comma -15 KPX emacron period -15 KPX emacron v -30 KPX emacron w -20 KPX emacron x -30 KPX emacron y -20 KPX emacron yacute -20 KPX emacron ydieresis -20 KPX eogonek comma -15 KPX eogonek period -15 KPX eogonek v -30 KPX eogonek w -20 KPX eogonek x -30 KPX eogonek y -20 KPX eogonek yacute -20 KPX eogonek ydieresis -20 KPX f a -30 KPX f aacute -30 KPX f abreve -30 KPX f acircumflex -30 KPX f adieresis -30 KPX f agrave -30 KPX f amacron -30 KPX f aogonek -30 KPX f aring -30 KPX f atilde -30 KPX f comma -30 KPX f dotlessi -28 KPX f e -30 KPX f eacute -30 KPX f ecaron -30 KPX f ecircumflex -30 KPX f edieresis -30 KPX f edotaccent -30 KPX f egrave -30 KPX f emacron -30 KPX f eogonek -30 KPX f o -30 KPX f oacute -30 KPX f ocircumflex -30 KPX f odieresis -30 KPX f ograve -30 KPX f ohungarumlaut -30 KPX f omacron -30 KPX f oslash -30 KPX f otilde -30 KPX f period -30 KPX f quotedblright 60 KPX f quoteright 50 KPX g r -10 KPX g racute -10 KPX g rcaron -10 KPX g rcommaaccent -10 KPX gbreve r -10 KPX gbreve racute -10 KPX gbreve rcaron -10 KPX gbreve rcommaaccent -10 KPX gcommaaccent r -10 KPX gcommaaccent racute -10 KPX gcommaaccent rcaron -10 KPX gcommaaccent rcommaaccent -10 KPX h y -30 KPX h yacute -30 KPX h ydieresis -30 KPX k e -20 KPX k eacute -20 KPX k ecaron -20 KPX k ecircumflex -20 KPX k edieresis -20 KPX k edotaccent -20 KPX k egrave -20 KPX k emacron -20 KPX k eogonek -20 KPX k o -20 KPX k oacute -20 KPX k ocircumflex -20 KPX k odieresis -20 KPX k ograve -20 KPX k ohungarumlaut -20 KPX k omacron -20 KPX k oslash -20 KPX k otilde -20 KPX kcommaaccent e -20 KPX kcommaaccent eacute -20 KPX kcommaaccent ecaron -20 KPX kcommaaccent ecircumflex -20 KPX kcommaaccent edieresis -20 KPX kcommaaccent edotaccent -20 KPX kcommaaccent egrave -20 KPX kcommaaccent emacron -20 KPX kcommaaccent eogonek -20 KPX kcommaaccent o -20 KPX kcommaaccent oacute -20 KPX kcommaaccent ocircumflex -20 KPX kcommaaccent odieresis -20 KPX kcommaaccent ograve -20 KPX kcommaaccent ohungarumlaut -20 KPX kcommaaccent omacron -20 KPX kcommaaccent oslash -20 KPX kcommaaccent otilde -20 KPX m u -10 KPX m uacute -10 KPX m ucircumflex -10 KPX m udieresis -10 KPX m ugrave -10 KPX m uhungarumlaut -10 KPX m umacron -10 KPX m uogonek -10 KPX m uring -10 KPX m y -15 KPX m yacute -15 KPX m ydieresis -15 KPX n u -10 KPX n uacute -10 KPX n ucircumflex -10 KPX n udieresis -10 KPX n ugrave -10 KPX n uhungarumlaut -10 KPX n umacron -10 KPX n uogonek -10 KPX n uring -10 KPX n v -20 KPX n y -15 KPX n yacute -15 KPX n ydieresis -15 KPX nacute u -10 KPX nacute uacute -10 KPX nacute ucircumflex -10 KPX nacute udieresis -10 KPX nacute ugrave -10 KPX nacute uhungarumlaut -10 KPX nacute umacron -10 KPX nacute uogonek -10 KPX nacute uring -10 KPX nacute v -20 KPX nacute y -15 KPX nacute yacute -15 KPX nacute ydieresis -15 KPX ncaron u -10 KPX ncaron uacute -10 KPX ncaron ucircumflex -10 KPX ncaron udieresis -10 KPX ncaron ugrave -10 KPX ncaron uhungarumlaut -10 KPX ncaron umacron -10 KPX ncaron uogonek -10 KPX ncaron uring -10 KPX ncaron v -20 KPX ncaron y -15 KPX ncaron yacute -15 KPX ncaron ydieresis -15 KPX ncommaaccent u -10 KPX ncommaaccent uacute -10 KPX ncommaaccent ucircumflex -10 KPX ncommaaccent udieresis -10 KPX ncommaaccent ugrave -10 KPX ncommaaccent uhungarumlaut -10 KPX ncommaaccent umacron -10 KPX ncommaaccent uogonek -10 KPX ncommaaccent uring -10 KPX ncommaaccent v -20 KPX ncommaaccent y -15 KPX ncommaaccent yacute -15 KPX ncommaaccent ydieresis -15 KPX ntilde u -10 KPX ntilde uacute -10 KPX ntilde ucircumflex -10 KPX ntilde udieresis -10 KPX ntilde ugrave -10 KPX ntilde uhungarumlaut -10 KPX ntilde umacron -10 KPX ntilde uogonek -10 KPX ntilde uring -10 KPX ntilde v -20 KPX ntilde y -15 KPX ntilde yacute -15 KPX ntilde ydieresis -15 KPX o comma -40 KPX o period -40 KPX o v -15 KPX o w -15 KPX o x -30 KPX o y -30 KPX o yacute -30 KPX o ydieresis -30 KPX oacute comma -40 KPX oacute period -40 KPX oacute v -15 KPX oacute w -15 KPX oacute x -30 KPX oacute y -30 KPX oacute yacute -30 KPX oacute ydieresis -30 KPX ocircumflex comma -40 KPX ocircumflex period -40 KPX ocircumflex v -15 KPX ocircumflex w -15 KPX ocircumflex x -30 KPX ocircumflex y -30 KPX ocircumflex yacute -30 KPX ocircumflex ydieresis -30 KPX odieresis comma -40 KPX odieresis period -40 KPX odieresis v -15 KPX odieresis w -15 KPX odieresis x -30 KPX odieresis y -30 KPX odieresis yacute -30 KPX odieresis ydieresis -30 KPX ograve comma -40 KPX ograve period -40 KPX ograve v -15 KPX ograve w -15 KPX ograve x -30 KPX ograve y -30 KPX ograve yacute -30 KPX ograve ydieresis -30 KPX ohungarumlaut comma -40 KPX ohungarumlaut period -40 KPX ohungarumlaut v -15 KPX ohungarumlaut w -15 KPX ohungarumlaut x -30 KPX ohungarumlaut y -30 KPX ohungarumlaut yacute -30 KPX ohungarumlaut ydieresis -30 KPX omacron comma -40 KPX omacron period -40 KPX omacron v -15 KPX omacron w -15 KPX omacron x -30 KPX omacron y -30 KPX omacron yacute -30 KPX omacron ydieresis -30 KPX oslash a -55 KPX oslash aacute -55 KPX oslash abreve -55 KPX oslash acircumflex -55 KPX oslash adieresis -55 KPX oslash agrave -55 KPX oslash amacron -55 KPX oslash aogonek -55 KPX oslash aring -55 KPX oslash atilde -55 KPX oslash b -55 KPX oslash c -55 KPX oslash cacute -55 KPX oslash ccaron -55 KPX oslash ccedilla -55 KPX oslash comma -95 KPX oslash d -55 KPX oslash dcroat -55 KPX oslash e -55 KPX oslash eacute -55 KPX oslash ecaron -55 KPX oslash ecircumflex -55 KPX oslash edieresis -55 KPX oslash edotaccent -55 KPX oslash egrave -55 KPX oslash emacron -55 KPX oslash eogonek -55 KPX oslash f -55 KPX oslash g -55 KPX oslash gbreve -55 KPX oslash gcommaaccent -55 KPX oslash h -55 KPX oslash i -55 KPX oslash iacute -55 KPX oslash icircumflex -55 KPX oslash idieresis -55 KPX oslash igrave -55 KPX oslash imacron -55 KPX oslash iogonek -55 KPX oslash j -55 KPX oslash k -55 KPX oslash kcommaaccent -55 KPX oslash l -55 KPX oslash lacute -55 KPX oslash lcommaaccent -55 KPX oslash lslash -55 KPX oslash m -55 KPX oslash n -55 KPX oslash nacute -55 KPX oslash ncaron -55 KPX oslash ncommaaccent -55 KPX oslash ntilde -55 KPX oslash o -55 KPX oslash oacute -55 KPX oslash ocircumflex -55 KPX oslash odieresis -55 KPX oslash ograve -55 KPX oslash ohungarumlaut -55 KPX oslash omacron -55 KPX oslash oslash -55 KPX oslash otilde -55 KPX oslash p -55 KPX oslash period -95 KPX oslash q -55 KPX oslash r -55 KPX oslash racute -55 KPX oslash rcaron -55 KPX oslash rcommaaccent -55 KPX oslash s -55 KPX oslash sacute -55 KPX oslash scaron -55 KPX oslash scedilla -55 KPX oslash scommaaccent -55 KPX oslash t -55 KPX oslash tcommaaccent -55 KPX oslash u -55 KPX oslash uacute -55 KPX oslash ucircumflex -55 KPX oslash udieresis -55 KPX oslash ugrave -55 KPX oslash uhungarumlaut -55 KPX oslash umacron -55 KPX oslash uogonek -55 KPX oslash uring -55 KPX oslash v -70 KPX oslash w -70 KPX oslash x -85 KPX oslash y -70 KPX oslash yacute -70 KPX oslash ydieresis -70 KPX oslash z -55 KPX oslash zacute -55 KPX oslash zcaron -55 KPX oslash zdotaccent -55 KPX otilde comma -40 KPX otilde period -40 KPX otilde v -15 KPX otilde w -15 KPX otilde x -30 KPX otilde y -30 KPX otilde yacute -30 KPX otilde ydieresis -30 KPX p comma -35 KPX p period -35 KPX p y -30 KPX p yacute -30 KPX p ydieresis -30 KPX period quotedblright -100 KPX period quoteright -100 KPX period space -60 KPX quotedblright space -40 KPX quoteleft quoteleft -57 KPX quoteright d -50 KPX quoteright dcroat -50 KPX quoteright quoteright -57 KPX quoteright r -50 KPX quoteright racute -50 KPX quoteright rcaron -50 KPX quoteright rcommaaccent -50 KPX quoteright s -50 KPX quoteright sacute -50 KPX quoteright scaron -50 KPX quoteright scedilla -50 KPX quoteright scommaaccent -50 KPX quoteright space -70 KPX r a -10 KPX r aacute -10 KPX r abreve -10 KPX r acircumflex -10 KPX r adieresis -10 KPX r agrave -10 KPX r amacron -10 KPX r aogonek -10 KPX r aring -10 KPX r atilde -10 KPX r colon 30 KPX r comma -50 KPX r i 15 KPX r iacute 15 KPX r icircumflex 15 KPX r idieresis 15 KPX r igrave 15 KPX r imacron 15 KPX r iogonek 15 KPX r k 15 KPX r kcommaaccent 15 KPX r l 15 KPX r lacute 15 KPX r lcommaaccent 15 KPX r lslash 15 KPX r m 25 KPX r n 25 KPX r nacute 25 KPX r ncaron 25 KPX r ncommaaccent 25 KPX r ntilde 25 KPX r p 30 KPX r period -50 KPX r semicolon 30 KPX r t 40 KPX r tcommaaccent 40 KPX r u 15 KPX r uacute 15 KPX r ucircumflex 15 KPX r udieresis 15 KPX r ugrave 15 KPX r uhungarumlaut 15 KPX r umacron 15 KPX r uogonek 15 KPX r uring 15 KPX r v 30 KPX r y 30 KPX r yacute 30 KPX r ydieresis 30 KPX racute a -10 KPX racute aacute -10 KPX racute abreve -10 KPX racute acircumflex -10 KPX racute adieresis -10 KPX racute agrave -10 KPX racute amacron -10 KPX racute aogonek -10 KPX racute aring -10 KPX racute atilde -10 KPX racute colon 30 KPX racute comma -50 KPX racute i 15 KPX racute iacute 15 KPX racute icircumflex 15 KPX racute idieresis 15 KPX racute igrave 15 KPX racute imacron 15 KPX racute iogonek 15 KPX racute k 15 KPX racute kcommaaccent 15 KPX racute l 15 KPX racute lacute 15 KPX racute lcommaaccent 15 KPX racute lslash 15 KPX racute m 25 KPX racute n 25 KPX racute nacute 25 KPX racute ncaron 25 KPX racute ncommaaccent 25 KPX racute ntilde 25 KPX racute p 30 KPX racute period -50 KPX racute semicolon 30 KPX racute t 40 KPX racute tcommaaccent 40 KPX racute u 15 KPX racute uacute 15 KPX racute ucircumflex 15 KPX racute udieresis 15 KPX racute ugrave 15 KPX racute uhungarumlaut 15 KPX racute umacron 15 KPX racute uogonek 15 KPX racute uring 15 KPX racute v 30 KPX racute y 30 KPX racute yacute 30 KPX racute ydieresis 30 KPX rcaron a -10 KPX rcaron aacute -10 KPX rcaron abreve -10 KPX rcaron acircumflex -10 KPX rcaron adieresis -10 KPX rcaron agrave -10 KPX rcaron amacron -10 KPX rcaron aogonek -10 KPX rcaron aring -10 KPX rcaron atilde -10 KPX rcaron colon 30 KPX rcaron comma -50 KPX rcaron i 15 KPX rcaron iacute 15 KPX rcaron icircumflex 15 KPX rcaron idieresis 15 KPX rcaron igrave 15 KPX rcaron imacron 15 KPX rcaron iogonek 15 KPX rcaron k 15 KPX rcaron kcommaaccent 15 KPX rcaron l 15 KPX rcaron lacute 15 KPX rcaron lcommaaccent 15 KPX rcaron lslash 15 KPX rcaron m 25 KPX rcaron n 25 KPX rcaron nacute 25 KPX rcaron ncaron 25 KPX rcaron ncommaaccent 25 KPX rcaron ntilde 25 KPX rcaron p 30 KPX rcaron period -50 KPX rcaron semicolon 30 KPX rcaron t 40 KPX rcaron tcommaaccent 40 KPX rcaron u 15 KPX rcaron uacute 15 KPX rcaron ucircumflex 15 KPX rcaron udieresis 15 KPX rcaron ugrave 15 KPX rcaron uhungarumlaut 15 KPX rcaron umacron 15 KPX rcaron uogonek 15 KPX rcaron uring 15 KPX rcaron v 30 KPX rcaron y 30 KPX rcaron yacute 30 KPX rcaron ydieresis 30 KPX rcommaaccent a -10 KPX rcommaaccent aacute -10 KPX rcommaaccent abreve -10 KPX rcommaaccent acircumflex -10 KPX rcommaaccent adieresis -10 KPX rcommaaccent agrave -10 KPX rcommaaccent amacron -10 KPX rcommaaccent aogonek -10 KPX rcommaaccent aring -10 KPX rcommaaccent atilde -10 KPX rcommaaccent colon 30 KPX rcommaaccent comma -50 KPX rcommaaccent i 15 KPX rcommaaccent iacute 15 KPX rcommaaccent icircumflex 15 KPX rcommaaccent idieresis 15 KPX rcommaaccent igrave 15 KPX rcommaaccent imacron 15 KPX rcommaaccent iogonek 15 KPX rcommaaccent k 15 KPX rcommaaccent kcommaaccent 15 KPX rcommaaccent l 15 KPX rcommaaccent lacute 15 KPX rcommaaccent lcommaaccent 15 KPX rcommaaccent lslash 15 KPX rcommaaccent m 25 KPX rcommaaccent n 25 KPX rcommaaccent nacute 25 KPX rcommaaccent ncaron 25 KPX rcommaaccent ncommaaccent 25 KPX rcommaaccent ntilde 25 KPX rcommaaccent p 30 KPX rcommaaccent period -50 KPX rcommaaccent semicolon 30 KPX rcommaaccent t 40 KPX rcommaaccent tcommaaccent 40 KPX rcommaaccent u 15 KPX rcommaaccent uacute 15 KPX rcommaaccent ucircumflex 15 KPX rcommaaccent udieresis 15 KPX rcommaaccent ugrave 15 KPX rcommaaccent uhungarumlaut 15 KPX rcommaaccent umacron 15 KPX rcommaaccent uogonek 15 KPX rcommaaccent uring 15 KPX rcommaaccent v 30 KPX rcommaaccent y 30 KPX rcommaaccent yacute 30 KPX rcommaaccent ydieresis 30 KPX s comma -15 KPX s period -15 KPX s w -30 KPX sacute comma -15 KPX sacute period -15 KPX sacute w -30 KPX scaron comma -15 KPX scaron period -15 KPX scaron w -30 KPX scedilla comma -15 KPX scedilla period -15 KPX scedilla w -30 KPX scommaaccent comma -15 KPX scommaaccent period -15 KPX scommaaccent w -30 KPX semicolon space -50 KPX space T -50 KPX space Tcaron -50 KPX space Tcommaaccent -50 KPX space V -50 KPX space W -40 KPX space Y -90 KPX space Yacute -90 KPX space Ydieresis -90 KPX space quotedblleft -30 KPX space quoteleft -60 KPX v a -25 KPX v aacute -25 KPX v abreve -25 KPX v acircumflex -25 KPX v adieresis -25 KPX v agrave -25 KPX v amacron -25 KPX v aogonek -25 KPX v aring -25 KPX v atilde -25 KPX v comma -80 KPX v e -25 KPX v eacute -25 KPX v ecaron -25 KPX v ecircumflex -25 KPX v edieresis -25 KPX v edotaccent -25 KPX v egrave -25 KPX v emacron -25 KPX v eogonek -25 KPX v o -25 KPX v oacute -25 KPX v ocircumflex -25 KPX v odieresis -25 KPX v ograve -25 KPX v ohungarumlaut -25 KPX v omacron -25 KPX v oslash -25 KPX v otilde -25 KPX v period -80 KPX w a -15 KPX w aacute -15 KPX w abreve -15 KPX w acircumflex -15 KPX w adieresis -15 KPX w agrave -15 KPX w amacron -15 KPX w aogonek -15 KPX w aring -15 KPX w atilde -15 KPX w comma -60 KPX w e -10 KPX w eacute -10 KPX w ecaron -10 KPX w ecircumflex -10 KPX w edieresis -10 KPX w edotaccent -10 KPX w egrave -10 KPX w emacron -10 KPX w eogonek -10 KPX w o -10 KPX w oacute -10 KPX w ocircumflex -10 KPX w odieresis -10 KPX w ograve -10 KPX w ohungarumlaut -10 KPX w omacron -10 KPX w oslash -10 KPX w otilde -10 KPX w period -60 KPX x e -30 KPX x eacute -30 KPX x ecaron -30 KPX x ecircumflex -30 KPX x edieresis -30 KPX x edotaccent -30 KPX x egrave -30 KPX x emacron -30 KPX x eogonek -30 KPX y a -20 KPX y aacute -20 KPX y abreve -20 KPX y acircumflex -20 KPX y adieresis -20 KPX y agrave -20 KPX y amacron -20 KPX y aogonek -20 KPX y aring -20 KPX y atilde -20 KPX y comma -100 KPX y e -20 KPX y eacute -20 KPX y ecaron -20 KPX y ecircumflex -20 KPX y edieresis -20 KPX y edotaccent -20 KPX y egrave -20 KPX y emacron -20 KPX y eogonek -20 KPX y o -20 KPX y oacute -20 KPX y ocircumflex -20 KPX y odieresis -20 KPX y ograve -20 KPX y ohungarumlaut -20 KPX y omacron -20 KPX y oslash -20 KPX y otilde -20 KPX y period -100 KPX yacute a -20 KPX yacute aacute -20 KPX yacute abreve -20 KPX yacute acircumflex -20 KPX yacute adieresis -20 KPX yacute agrave -20 KPX yacute amacron -20 KPX yacute aogonek -20 KPX yacute aring -20 KPX yacute atilde -20 KPX yacute comma -100 KPX yacute e -20 KPX yacute eacute -20 KPX yacute ecaron -20 KPX yacute ecircumflex -20 KPX yacute edieresis -20 KPX yacute edotaccent -20 KPX yacute egrave -20 KPX yacute emacron -20 KPX yacute eogonek -20 KPX yacute o -20 KPX yacute oacute -20 KPX yacute ocircumflex -20 KPX yacute odieresis -20 KPX yacute ograve -20 KPX yacute ohungarumlaut -20 KPX yacute omacron -20 KPX yacute oslash -20 KPX yacute otilde -20 KPX yacute period -100 KPX ydieresis a -20 KPX ydieresis aacute -20 KPX ydieresis abreve -20 KPX ydieresis acircumflex -20 KPX ydieresis adieresis -20 KPX ydieresis agrave -20 KPX ydieresis amacron -20 KPX ydieresis aogonek -20 KPX ydieresis aring -20 KPX ydieresis atilde -20 KPX ydieresis comma -100 KPX ydieresis e -20 KPX ydieresis eacute -20 KPX ydieresis ecaron -20 KPX ydieresis ecircumflex -20 KPX ydieresis edieresis -20 KPX ydieresis edotaccent -20 KPX ydieresis egrave -20 KPX ydieresis emacron -20 KPX ydieresis eogonek -20 KPX ydieresis o -20 KPX ydieresis oacute -20 KPX ydieresis ocircumflex -20 KPX ydieresis odieresis -20 KPX ydieresis ograve -20 KPX ydieresis ohungarumlaut -20 KPX ydieresis omacron -20 KPX ydieresis oslash -20 KPX ydieresis otilde -20 KPX ydieresis period -100 KPX z e -15 KPX z eacute -15 KPX z ecaron -15 KPX z ecircumflex -15 KPX z edieresis -15 KPX z edotaccent -15 KPX z egrave -15 KPX z emacron -15 KPX z eogonek -15 KPX z o -15 KPX z oacute -15 KPX z ocircumflex -15 KPX z odieresis -15 KPX z ograve -15 KPX z ohungarumlaut -15 KPX z omacron -15 KPX z oslash -15 KPX z otilde -15 KPX zacute e -15 KPX zacute eacute -15 KPX zacute ecaron -15 KPX zacute ecircumflex -15 KPX zacute edieresis -15 KPX zacute edotaccent -15 KPX zacute egrave -15 KPX zacute emacron -15 KPX zacute eogonek -15 KPX zacute o -15 KPX zacute oacute -15 KPX zacute ocircumflex -15 KPX zacute odieresis -15 KPX zacute ograve -15 KPX zacute ohungarumlaut -15 KPX zacute omacron -15 KPX zacute oslash -15 KPX zacute otilde -15 KPX zcaron e -15 KPX zcaron eacute -15 KPX zcaron ecaron -15 KPX zcaron ecircumflex -15 KPX zcaron edieresis -15 KPX zcaron edotaccent -15 KPX zcaron egrave -15 KPX zcaron emacron -15 KPX zcaron eogonek -15 KPX zcaron o -15 KPX zcaron oacute -15 KPX zcaron ocircumflex -15 KPX zcaron odieresis -15 KPX zcaron ograve -15 KPX zcaron ohungarumlaut -15 KPX zcaron omacron -15 KPX zcaron oslash -15 KPX zcaron otilde -15 KPX zdotaccent e -15 KPX zdotaccent eacute -15 KPX zdotaccent ecaron -15 KPX zdotaccent ecircumflex -15 KPX zdotaccent edieresis -15 KPX zdotaccent edotaccent -15 KPX zdotaccent egrave -15 KPX zdotaccent emacron -15 KPX zdotaccent eogonek -15 KPX zdotaccent o -15 KPX zdotaccent oacute -15 KPX zdotaccent ocircumflex -15 KPX zdotaccent odieresis -15 KPX zdotaccent ograve -15 KPX zdotaccent ohungarumlaut -15 KPX zdotaccent omacron -15 KPX zdotaccent oslash -15 KPX zdotaccent otilde -15 EndKernPairs EndKernData EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/pdfcorefonts/Helvetica.afm ================================================ StartFontMetrics 4.1 Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Thu May 1 12:38:23 1997 Comment UniqueID 43054 Comment VMusage 37069 48094 FontName Helvetica FullName Helvetica FamilyName Helvetica Weight Medium ItalicAngle 0 IsFixedPitch false CharacterSet ExtendedRoman FontBBox -166 -225 1000 931 UnderlinePosition -100 UnderlineThickness 50 Version 002.000 Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 718 XHeight 523 Ascender 718 Descender -207 StdHW 76 StdVW 88 StartCharMetrics 315 C 32 ; WX 278 ; N space ; B 0 0 0 0 ; C 33 ; WX 278 ; N exclam ; B 90 0 187 718 ; C 34 ; WX 355 ; N quotedbl ; B 70 463 285 718 ; C 35 ; WX 556 ; N numbersign ; B 28 0 529 688 ; C 36 ; WX 556 ; N dollar ; B 32 -115 520 775 ; C 37 ; WX 889 ; N percent ; B 39 -19 850 703 ; C 38 ; WX 667 ; N ampersand ; B 44 -15 645 718 ; C 39 ; WX 222 ; N quoteright ; B 53 463 157 718 ; C 40 ; WX 333 ; N parenleft ; B 68 -207 299 733 ; C 41 ; WX 333 ; N parenright ; B 34 -207 265 733 ; C 42 ; WX 389 ; N asterisk ; B 39 431 349 718 ; C 43 ; WX 584 ; N plus ; B 39 0 545 505 ; C 44 ; WX 278 ; N comma ; B 87 -147 191 106 ; C 45 ; WX 333 ; N hyphen ; B 44 232 289 322 ; C 46 ; WX 278 ; N period ; B 87 0 191 106 ; C 47 ; WX 278 ; N slash ; B -17 -19 295 737 ; C 48 ; WX 556 ; N zero ; B 37 -19 519 703 ; C 49 ; WX 556 ; N one ; B 101 0 359 703 ; C 50 ; WX 556 ; N two ; B 26 0 507 703 ; C 51 ; WX 556 ; N three ; B 34 -19 522 703 ; C 52 ; WX 556 ; N four ; B 25 0 523 703 ; C 53 ; WX 556 ; N five ; B 32 -19 514 688 ; C 54 ; WX 556 ; N six ; B 38 -19 518 703 ; C 55 ; WX 556 ; N seven ; B 37 0 523 688 ; C 56 ; WX 556 ; N eight ; B 38 -19 517 703 ; C 57 ; WX 556 ; N nine ; B 42 -19 514 703 ; C 58 ; WX 278 ; N colon ; B 87 0 191 516 ; C 59 ; WX 278 ; N semicolon ; B 87 -147 191 516 ; C 60 ; WX 584 ; N less ; B 48 11 536 495 ; C 61 ; WX 584 ; N equal ; B 39 115 545 390 ; C 62 ; WX 584 ; N greater ; B 48 11 536 495 ; C 63 ; WX 556 ; N question ; B 56 0 492 727 ; C 64 ; WX 1015 ; N at ; B 147 -19 868 737 ; C 65 ; WX 667 ; N A ; B 14 0 654 718 ; C 66 ; WX 667 ; N B ; B 74 0 627 718 ; C 67 ; WX 722 ; N C ; B 44 -19 681 737 ; C 68 ; WX 722 ; N D ; B 81 0 674 718 ; C 69 ; WX 667 ; N E ; B 86 0 616 718 ; C 70 ; WX 611 ; N F ; B 86 0 583 718 ; C 71 ; WX 778 ; N G ; B 48 -19 704 737 ; C 72 ; WX 722 ; N H ; B 77 0 646 718 ; C 73 ; WX 278 ; N I ; B 91 0 188 718 ; C 74 ; WX 500 ; N J ; B 17 -19 428 718 ; C 75 ; WX 667 ; N K ; B 76 0 663 718 ; C 76 ; WX 556 ; N L ; B 76 0 537 718 ; C 77 ; WX 833 ; N M ; B 73 0 761 718 ; C 78 ; WX 722 ; N N ; B 76 0 646 718 ; C 79 ; WX 778 ; N O ; B 39 -19 739 737 ; C 80 ; WX 667 ; N P ; B 86 0 622 718 ; C 81 ; WX 778 ; N Q ; B 39 -56 739 737 ; C 82 ; WX 722 ; N R ; B 88 0 684 718 ; C 83 ; WX 667 ; N S ; B 49 -19 620 737 ; C 84 ; WX 611 ; N T ; B 14 0 597 718 ; C 85 ; WX 722 ; N U ; B 79 -19 644 718 ; C 86 ; WX 667 ; N V ; B 20 0 647 718 ; C 87 ; WX 944 ; N W ; B 16 0 928 718 ; C 88 ; WX 667 ; N X ; B 19 0 648 718 ; C 89 ; WX 667 ; N Y ; B 14 0 653 718 ; C 90 ; WX 611 ; N Z ; B 23 0 588 718 ; C 91 ; WX 278 ; N bracketleft ; B 63 -196 250 722 ; C 92 ; WX 278 ; N backslash ; B -17 -19 295 737 ; C 93 ; WX 278 ; N bracketright ; B 28 -196 215 722 ; C 94 ; WX 469 ; N asciicircum ; B -14 264 483 688 ; C 95 ; WX 556 ; N underscore ; B 0 -125 556 -75 ; C 96 ; WX 222 ; N quoteleft ; B 65 470 169 725 ; C 97 ; WX 556 ; N a ; B 36 -15 530 538 ; C 98 ; WX 556 ; N b ; B 58 -15 517 718 ; C 99 ; WX 500 ; N c ; B 30 -15 477 538 ; C 100 ; WX 556 ; N d ; B 35 -15 499 718 ; C 101 ; WX 556 ; N e ; B 40 -15 516 538 ; C 102 ; WX 278 ; N f ; B 14 0 262 728 ; L i fi ; L l fl ; C 103 ; WX 556 ; N g ; B 40 -220 499 538 ; C 104 ; WX 556 ; N h ; B 65 0 491 718 ; C 105 ; WX 222 ; N i ; B 67 0 155 718 ; C 106 ; WX 222 ; N j ; B -16 -210 155 718 ; C 107 ; WX 500 ; N k ; B 67 0 501 718 ; C 108 ; WX 222 ; N l ; B 67 0 155 718 ; C 109 ; WX 833 ; N m ; B 65 0 769 538 ; C 110 ; WX 556 ; N n ; B 65 0 491 538 ; C 111 ; WX 556 ; N o ; B 35 -14 521 538 ; C 112 ; WX 556 ; N p ; B 58 -207 517 538 ; C 113 ; WX 556 ; N q ; B 35 -207 494 538 ; C 114 ; WX 333 ; N r ; B 77 0 332 538 ; C 115 ; WX 500 ; N s ; B 32 -15 464 538 ; C 116 ; WX 278 ; N t ; B 14 -7 257 669 ; C 117 ; WX 556 ; N u ; B 68 -15 489 523 ; C 118 ; WX 500 ; N v ; B 8 0 492 523 ; C 119 ; WX 722 ; N w ; B 14 0 709 523 ; C 120 ; WX 500 ; N x ; B 11 0 490 523 ; C 121 ; WX 500 ; N y ; B 11 -214 489 523 ; C 122 ; WX 500 ; N z ; B 31 0 469 523 ; C 123 ; WX 334 ; N braceleft ; B 42 -196 292 722 ; C 124 ; WX 260 ; N bar ; B 94 -225 167 775 ; C 125 ; WX 334 ; N braceright ; B 42 -196 292 722 ; C 126 ; WX 584 ; N asciitilde ; B 61 180 523 326 ; C 161 ; WX 333 ; N exclamdown ; B 118 -195 215 523 ; C 162 ; WX 556 ; N cent ; B 51 -115 513 623 ; C 163 ; WX 556 ; N sterling ; B 33 -16 539 718 ; C 164 ; WX 167 ; N fraction ; B -166 -19 333 703 ; C 165 ; WX 556 ; N yen ; B 3 0 553 688 ; C 166 ; WX 556 ; N florin ; B -11 -207 501 737 ; C 167 ; WX 556 ; N section ; B 43 -191 512 737 ; C 168 ; WX 556 ; N currency ; B 28 99 528 603 ; C 169 ; WX 191 ; N quotesingle ; B 59 463 132 718 ; C 170 ; WX 333 ; N quotedblleft ; B 38 470 307 725 ; C 171 ; WX 556 ; N guillemotleft ; B 97 108 459 446 ; C 172 ; WX 333 ; N guilsinglleft ; B 88 108 245 446 ; C 173 ; WX 333 ; N guilsinglright ; B 88 108 245 446 ; C 174 ; WX 500 ; N fi ; B 14 0 434 728 ; C 175 ; WX 500 ; N fl ; B 14 0 432 728 ; C 177 ; WX 556 ; N endash ; B 0 240 556 313 ; C 178 ; WX 556 ; N dagger ; B 43 -159 514 718 ; C 179 ; WX 556 ; N daggerdbl ; B 43 -159 514 718 ; C 180 ; WX 278 ; N periodcentered ; B 77 190 202 315 ; C 182 ; WX 537 ; N paragraph ; B 18 -173 497 718 ; C 183 ; WX 350 ; N bullet ; B 18 202 333 517 ; C 184 ; WX 222 ; N quotesinglbase ; B 53 -149 157 106 ; C 185 ; WX 333 ; N quotedblbase ; B 26 -149 295 106 ; C 186 ; WX 333 ; N quotedblright ; B 26 463 295 718 ; C 187 ; WX 556 ; N guillemotright ; B 97 108 459 446 ; C 188 ; WX 1000 ; N ellipsis ; B 115 0 885 106 ; C 189 ; WX 1000 ; N perthousand ; B 7 -19 994 703 ; C 191 ; WX 611 ; N questiondown ; B 91 -201 527 525 ; C 193 ; WX 333 ; N grave ; B 14 593 211 734 ; C 194 ; WX 333 ; N acute ; B 122 593 319 734 ; C 195 ; WX 333 ; N circumflex ; B 21 593 312 734 ; C 196 ; WX 333 ; N tilde ; B -4 606 337 722 ; C 197 ; WX 333 ; N macron ; B 10 627 323 684 ; C 198 ; WX 333 ; N breve ; B 13 595 321 731 ; C 199 ; WX 333 ; N dotaccent ; B 121 604 212 706 ; C 200 ; WX 333 ; N dieresis ; B 40 604 293 706 ; C 202 ; WX 333 ; N ring ; B 75 572 259 756 ; C 203 ; WX 333 ; N cedilla ; B 45 -225 259 0 ; C 205 ; WX 333 ; N hungarumlaut ; B 31 593 409 734 ; C 206 ; WX 333 ; N ogonek ; B 73 -225 287 0 ; C 207 ; WX 333 ; N caron ; B 21 593 312 734 ; C 208 ; WX 1000 ; N emdash ; B 0 240 1000 313 ; C 225 ; WX 1000 ; N AE ; B 8 0 951 718 ; C 227 ; WX 370 ; N ordfeminine ; B 24 405 346 737 ; C 232 ; WX 556 ; N Lslash ; B -20 0 537 718 ; C 233 ; WX 778 ; N Oslash ; B 39 -19 740 737 ; C 234 ; WX 1000 ; N OE ; B 36 -19 965 737 ; C 235 ; WX 365 ; N ordmasculine ; B 25 405 341 737 ; C 241 ; WX 889 ; N ae ; B 36 -15 847 538 ; C 245 ; WX 278 ; N dotlessi ; B 95 0 183 523 ; C 248 ; WX 222 ; N lslash ; B -20 0 242 718 ; C 249 ; WX 611 ; N oslash ; B 28 -22 537 545 ; C 250 ; WX 944 ; N oe ; B 35 -15 902 538 ; C 251 ; WX 611 ; N germandbls ; B 67 -15 571 728 ; C -1 ; WX 278 ; N Idieresis ; B 13 0 266 901 ; C -1 ; WX 556 ; N eacute ; B 40 -15 516 734 ; C -1 ; WX 556 ; N abreve ; B 36 -15 530 731 ; C -1 ; WX 556 ; N uhungarumlaut ; B 68 -15 521 734 ; C -1 ; WX 556 ; N ecaron ; B 40 -15 516 734 ; C -1 ; WX 667 ; N Ydieresis ; B 14 0 653 901 ; C -1 ; WX 584 ; N divide ; B 39 -19 545 524 ; C -1 ; WX 667 ; N Yacute ; B 14 0 653 929 ; C -1 ; WX 667 ; N Acircumflex ; B 14 0 654 929 ; C -1 ; WX 556 ; N aacute ; B 36 -15 530 734 ; C -1 ; WX 722 ; N Ucircumflex ; B 79 -19 644 929 ; C -1 ; WX 500 ; N yacute ; B 11 -214 489 734 ; C -1 ; WX 500 ; N scommaaccent ; B 32 -225 464 538 ; C -1 ; WX 556 ; N ecircumflex ; B 40 -15 516 734 ; C -1 ; WX 722 ; N Uring ; B 79 -19 644 931 ; C -1 ; WX 722 ; N Udieresis ; B 79 -19 644 901 ; C -1 ; WX 556 ; N aogonek ; B 36 -220 547 538 ; C -1 ; WX 722 ; N Uacute ; B 79 -19 644 929 ; C -1 ; WX 556 ; N uogonek ; B 68 -225 519 523 ; C -1 ; WX 667 ; N Edieresis ; B 86 0 616 901 ; C -1 ; WX 722 ; N Dcroat ; B 0 0 674 718 ; C -1 ; WX 250 ; N commaaccent ; B 87 -225 181 -40 ; C -1 ; WX 737 ; N copyright ; B -14 -19 752 737 ; C -1 ; WX 667 ; N Emacron ; B 86 0 616 879 ; C -1 ; WX 500 ; N ccaron ; B 30 -15 477 734 ; C -1 ; WX 556 ; N aring ; B 36 -15 530 756 ; C -1 ; WX 722 ; N Ncommaaccent ; B 76 -225 646 718 ; C -1 ; WX 222 ; N lacute ; B 67 0 264 929 ; C -1 ; WX 556 ; N agrave ; B 36 -15 530 734 ; C -1 ; WX 611 ; N Tcommaaccent ; B 14 -225 597 718 ; C -1 ; WX 722 ; N Cacute ; B 44 -19 681 929 ; C -1 ; WX 556 ; N atilde ; B 36 -15 530 722 ; C -1 ; WX 667 ; N Edotaccent ; B 86 0 616 901 ; C -1 ; WX 500 ; N scaron ; B 32 -15 464 734 ; C -1 ; WX 500 ; N scedilla ; B 32 -225 464 538 ; C -1 ; WX 278 ; N iacute ; B 95 0 292 734 ; C -1 ; WX 471 ; N lozenge ; B 10 0 462 728 ; C -1 ; WX 722 ; N Rcaron ; B 88 0 684 929 ; C -1 ; WX 778 ; N Gcommaaccent ; B 48 -225 704 737 ; C -1 ; WX 556 ; N ucircumflex ; B 68 -15 489 734 ; C -1 ; WX 556 ; N acircumflex ; B 36 -15 530 734 ; C -1 ; WX 667 ; N Amacron ; B 14 0 654 879 ; C -1 ; WX 333 ; N rcaron ; B 61 0 352 734 ; C -1 ; WX 500 ; N ccedilla ; B 30 -225 477 538 ; C -1 ; WX 611 ; N Zdotaccent ; B 23 0 588 901 ; C -1 ; WX 667 ; N Thorn ; B 86 0 622 718 ; C -1 ; WX 778 ; N Omacron ; B 39 -19 739 879 ; C -1 ; WX 722 ; N Racute ; B 88 0 684 929 ; C -1 ; WX 667 ; N Sacute ; B 49 -19 620 929 ; C -1 ; WX 643 ; N dcaron ; B 35 -15 655 718 ; C -1 ; WX 722 ; N Umacron ; B 79 -19 644 879 ; C -1 ; WX 556 ; N uring ; B 68 -15 489 756 ; C -1 ; WX 333 ; N threesuperior ; B 5 270 325 703 ; C -1 ; WX 778 ; N Ograve ; B 39 -19 739 929 ; C -1 ; WX 667 ; N Agrave ; B 14 0 654 929 ; C -1 ; WX 667 ; N Abreve ; B 14 0 654 926 ; C -1 ; WX 584 ; N multiply ; B 39 0 545 506 ; C -1 ; WX 556 ; N uacute ; B 68 -15 489 734 ; C -1 ; WX 611 ; N Tcaron ; B 14 0 597 929 ; C -1 ; WX 476 ; N partialdiff ; B 13 -38 463 714 ; C -1 ; WX 500 ; N ydieresis ; B 11 -214 489 706 ; C -1 ; WX 722 ; N Nacute ; B 76 0 646 929 ; C -1 ; WX 278 ; N icircumflex ; B -6 0 285 734 ; C -1 ; WX 667 ; N Ecircumflex ; B 86 0 616 929 ; C -1 ; WX 556 ; N adieresis ; B 36 -15 530 706 ; C -1 ; WX 556 ; N edieresis ; B 40 -15 516 706 ; C -1 ; WX 500 ; N cacute ; B 30 -15 477 734 ; C -1 ; WX 556 ; N nacute ; B 65 0 491 734 ; C -1 ; WX 556 ; N umacron ; B 68 -15 489 684 ; C -1 ; WX 722 ; N Ncaron ; B 76 0 646 929 ; C -1 ; WX 278 ; N Iacute ; B 91 0 292 929 ; C -1 ; WX 584 ; N plusminus ; B 39 0 545 506 ; C -1 ; WX 260 ; N brokenbar ; B 94 -150 167 700 ; C -1 ; WX 737 ; N registered ; B -14 -19 752 737 ; C -1 ; WX 778 ; N Gbreve ; B 48 -19 704 926 ; C -1 ; WX 278 ; N Idotaccent ; B 91 0 188 901 ; C -1 ; WX 600 ; N summation ; B 15 -10 586 706 ; C -1 ; WX 667 ; N Egrave ; B 86 0 616 929 ; C -1 ; WX 333 ; N racute ; B 77 0 332 734 ; C -1 ; WX 556 ; N omacron ; B 35 -14 521 684 ; C -1 ; WX 611 ; N Zacute ; B 23 0 588 929 ; C -1 ; WX 611 ; N Zcaron ; B 23 0 588 929 ; C -1 ; WX 549 ; N greaterequal ; B 26 0 523 674 ; C -1 ; WX 722 ; N Eth ; B 0 0 674 718 ; C -1 ; WX 722 ; N Ccedilla ; B 44 -225 681 737 ; C -1 ; WX 222 ; N lcommaaccent ; B 67 -225 167 718 ; C -1 ; WX 317 ; N tcaron ; B 14 -7 329 808 ; C -1 ; WX 556 ; N eogonek ; B 40 -225 516 538 ; C -1 ; WX 722 ; N Uogonek ; B 79 -225 644 718 ; C -1 ; WX 667 ; N Aacute ; B 14 0 654 929 ; C -1 ; WX 667 ; N Adieresis ; B 14 0 654 901 ; C -1 ; WX 556 ; N egrave ; B 40 -15 516 734 ; C -1 ; WX 500 ; N zacute ; B 31 0 469 734 ; C -1 ; WX 222 ; N iogonek ; B -31 -225 183 718 ; C -1 ; WX 778 ; N Oacute ; B 39 -19 739 929 ; C -1 ; WX 556 ; N oacute ; B 35 -14 521 734 ; C -1 ; WX 556 ; N amacron ; B 36 -15 530 684 ; C -1 ; WX 500 ; N sacute ; B 32 -15 464 734 ; C -1 ; WX 278 ; N idieresis ; B 13 0 266 706 ; C -1 ; WX 778 ; N Ocircumflex ; B 39 -19 739 929 ; C -1 ; WX 722 ; N Ugrave ; B 79 -19 644 929 ; C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; C -1 ; WX 556 ; N thorn ; B 58 -207 517 718 ; C -1 ; WX 333 ; N twosuperior ; B 4 281 323 703 ; C -1 ; WX 778 ; N Odieresis ; B 39 -19 739 901 ; C -1 ; WX 556 ; N mu ; B 68 -207 489 523 ; C -1 ; WX 278 ; N igrave ; B -13 0 184 734 ; C -1 ; WX 556 ; N ohungarumlaut ; B 35 -14 521 734 ; C -1 ; WX 667 ; N Eogonek ; B 86 -220 633 718 ; C -1 ; WX 556 ; N dcroat ; B 35 -15 550 718 ; C -1 ; WX 834 ; N threequarters ; B 45 -19 810 703 ; C -1 ; WX 667 ; N Scedilla ; B 49 -225 620 737 ; C -1 ; WX 299 ; N lcaron ; B 67 0 311 718 ; C -1 ; WX 667 ; N Kcommaaccent ; B 76 -225 663 718 ; C -1 ; WX 556 ; N Lacute ; B 76 0 537 929 ; C -1 ; WX 1000 ; N trademark ; B 46 306 903 718 ; C -1 ; WX 556 ; N edotaccent ; B 40 -15 516 706 ; C -1 ; WX 278 ; N Igrave ; B -13 0 188 929 ; C -1 ; WX 278 ; N Imacron ; B -17 0 296 879 ; C -1 ; WX 556 ; N Lcaron ; B 76 0 537 718 ; C -1 ; WX 834 ; N onehalf ; B 43 -19 773 703 ; C -1 ; WX 549 ; N lessequal ; B 26 0 523 674 ; C -1 ; WX 556 ; N ocircumflex ; B 35 -14 521 734 ; C -1 ; WX 556 ; N ntilde ; B 65 0 491 722 ; C -1 ; WX 722 ; N Uhungarumlaut ; B 79 -19 644 929 ; C -1 ; WX 667 ; N Eacute ; B 86 0 616 929 ; C -1 ; WX 556 ; N emacron ; B 40 -15 516 684 ; C -1 ; WX 556 ; N gbreve ; B 40 -220 499 731 ; C -1 ; WX 834 ; N onequarter ; B 73 -19 756 703 ; C -1 ; WX 667 ; N Scaron ; B 49 -19 620 929 ; C -1 ; WX 667 ; N Scommaaccent ; B 49 -225 620 737 ; C -1 ; WX 778 ; N Ohungarumlaut ; B 39 -19 739 929 ; C -1 ; WX 400 ; N degree ; B 54 411 346 703 ; C -1 ; WX 556 ; N ograve ; B 35 -14 521 734 ; C -1 ; WX 722 ; N Ccaron ; B 44 -19 681 929 ; C -1 ; WX 556 ; N ugrave ; B 68 -15 489 734 ; C -1 ; WX 453 ; N radical ; B -4 -80 458 762 ; C -1 ; WX 722 ; N Dcaron ; B 81 0 674 929 ; C -1 ; WX 333 ; N rcommaaccent ; B 77 -225 332 538 ; C -1 ; WX 722 ; N Ntilde ; B 76 0 646 917 ; C -1 ; WX 556 ; N otilde ; B 35 -14 521 722 ; C -1 ; WX 722 ; N Rcommaaccent ; B 88 -225 684 718 ; C -1 ; WX 556 ; N Lcommaaccent ; B 76 -225 537 718 ; C -1 ; WX 667 ; N Atilde ; B 14 0 654 917 ; C -1 ; WX 667 ; N Aogonek ; B 14 -225 654 718 ; C -1 ; WX 667 ; N Aring ; B 14 0 654 931 ; C -1 ; WX 778 ; N Otilde ; B 39 -19 739 917 ; C -1 ; WX 500 ; N zdotaccent ; B 31 0 469 706 ; C -1 ; WX 667 ; N Ecaron ; B 86 0 616 929 ; C -1 ; WX 278 ; N Iogonek ; B -3 -225 211 718 ; C -1 ; WX 500 ; N kcommaaccent ; B 67 -225 501 718 ; C -1 ; WX 584 ; N minus ; B 39 216 545 289 ; C -1 ; WX 278 ; N Icircumflex ; B -6 0 285 929 ; C -1 ; WX 556 ; N ncaron ; B 65 0 491 734 ; C -1 ; WX 278 ; N tcommaaccent ; B 14 -225 257 669 ; C -1 ; WX 584 ; N logicalnot ; B 39 108 545 390 ; C -1 ; WX 556 ; N odieresis ; B 35 -14 521 706 ; C -1 ; WX 556 ; N udieresis ; B 68 -15 489 706 ; C -1 ; WX 549 ; N notequal ; B 12 -35 537 551 ; C -1 ; WX 556 ; N gcommaaccent ; B 40 -220 499 822 ; C -1 ; WX 556 ; N eth ; B 35 -15 522 737 ; C -1 ; WX 500 ; N zcaron ; B 31 0 469 734 ; C -1 ; WX 556 ; N ncommaaccent ; B 65 -225 491 538 ; C -1 ; WX 333 ; N onesuperior ; B 43 281 222 703 ; C -1 ; WX 278 ; N imacron ; B 5 0 272 684 ; C -1 ; WX 556 ; N Euro ; B 0 0 0 0 ; EndCharMetrics StartKernData StartKernPairs 2705 KPX A C -30 KPX A Cacute -30 KPX A Ccaron -30 KPX A Ccedilla -30 KPX A G -30 KPX A Gbreve -30 KPX A Gcommaaccent -30 KPX A O -30 KPX A Oacute -30 KPX A Ocircumflex -30 KPX A Odieresis -30 KPX A Ograve -30 KPX A Ohungarumlaut -30 KPX A Omacron -30 KPX A Oslash -30 KPX A Otilde -30 KPX A Q -30 KPX A T -120 KPX A Tcaron -120 KPX A Tcommaaccent -120 KPX A U -50 KPX A Uacute -50 KPX A Ucircumflex -50 KPX A Udieresis -50 KPX A Ugrave -50 KPX A Uhungarumlaut -50 KPX A Umacron -50 KPX A Uogonek -50 KPX A Uring -50 KPX A V -70 KPX A W -50 KPX A Y -100 KPX A Yacute -100 KPX A Ydieresis -100 KPX A u -30 KPX A uacute -30 KPX A ucircumflex -30 KPX A udieresis -30 KPX A ugrave -30 KPX A uhungarumlaut -30 KPX A umacron -30 KPX A uogonek -30 KPX A uring -30 KPX A v -40 KPX A w -40 KPX A y -40 KPX A yacute -40 KPX A ydieresis -40 KPX Aacute C -30 KPX Aacute Cacute -30 KPX Aacute Ccaron -30 KPX Aacute Ccedilla -30 KPX Aacute G -30 KPX Aacute Gbreve -30 KPX Aacute Gcommaaccent -30 KPX Aacute O -30 KPX Aacute Oacute -30 KPX Aacute Ocircumflex -30 KPX Aacute Odieresis -30 KPX Aacute Ograve -30 KPX Aacute Ohungarumlaut -30 KPX Aacute Omacron -30 KPX Aacute Oslash -30 KPX Aacute Otilde -30 KPX Aacute Q -30 KPX Aacute T -120 KPX Aacute Tcaron -120 KPX Aacute Tcommaaccent -120 KPX Aacute U -50 KPX Aacute Uacute -50 KPX Aacute Ucircumflex -50 KPX Aacute Udieresis -50 KPX Aacute Ugrave -50 KPX Aacute Uhungarumlaut -50 KPX Aacute Umacron -50 KPX Aacute Uogonek -50 KPX Aacute Uring -50 KPX Aacute V -70 KPX Aacute W -50 KPX Aacute Y -100 KPX Aacute Yacute -100 KPX Aacute Ydieresis -100 KPX Aacute u -30 KPX Aacute uacute -30 KPX Aacute ucircumflex -30 KPX Aacute udieresis -30 KPX Aacute ugrave -30 KPX Aacute uhungarumlaut -30 KPX Aacute umacron -30 KPX Aacute uogonek -30 KPX Aacute uring -30 KPX Aacute v -40 KPX Aacute w -40 KPX Aacute y -40 KPX Aacute yacute -40 KPX Aacute ydieresis -40 KPX Abreve C -30 KPX Abreve Cacute -30 KPX Abreve Ccaron -30 KPX Abreve Ccedilla -30 KPX Abreve G -30 KPX Abreve Gbreve -30 KPX Abreve Gcommaaccent -30 KPX Abreve O -30 KPX Abreve Oacute -30 KPX Abreve Ocircumflex -30 KPX Abreve Odieresis -30 KPX Abreve Ograve -30 KPX Abreve Ohungarumlaut -30 KPX Abreve Omacron -30 KPX Abreve Oslash -30 KPX Abreve Otilde -30 KPX Abreve Q -30 KPX Abreve T -120 KPX Abreve Tcaron -120 KPX Abreve Tcommaaccent -120 KPX Abreve U -50 KPX Abreve Uacute -50 KPX Abreve Ucircumflex -50 KPX Abreve Udieresis -50 KPX Abreve Ugrave -50 KPX Abreve Uhungarumlaut -50 KPX Abreve Umacron -50 KPX Abreve Uogonek -50 KPX Abreve Uring -50 KPX Abreve V -70 KPX Abreve W -50 KPX Abreve Y -100 KPX Abreve Yacute -100 KPX Abreve Ydieresis -100 KPX Abreve u -30 KPX Abreve uacute -30 KPX Abreve ucircumflex -30 KPX Abreve udieresis -30 KPX Abreve ugrave -30 KPX Abreve uhungarumlaut -30 KPX Abreve umacron -30 KPX Abreve uogonek -30 KPX Abreve uring -30 KPX Abreve v -40 KPX Abreve w -40 KPX Abreve y -40 KPX Abreve yacute -40 KPX Abreve ydieresis -40 KPX Acircumflex C -30 KPX Acircumflex Cacute -30 KPX Acircumflex Ccaron -30 KPX Acircumflex Ccedilla -30 KPX Acircumflex G -30 KPX Acircumflex Gbreve -30 KPX Acircumflex Gcommaaccent -30 KPX Acircumflex O -30 KPX Acircumflex Oacute -30 KPX Acircumflex Ocircumflex -30 KPX Acircumflex Odieresis -30 KPX Acircumflex Ograve -30 KPX Acircumflex Ohungarumlaut -30 KPX Acircumflex Omacron -30 KPX Acircumflex Oslash -30 KPX Acircumflex Otilde -30 KPX Acircumflex Q -30 KPX Acircumflex T -120 KPX Acircumflex Tcaron -120 KPX Acircumflex Tcommaaccent -120 KPX Acircumflex U -50 KPX Acircumflex Uacute -50 KPX Acircumflex Ucircumflex -50 KPX Acircumflex Udieresis -50 KPX Acircumflex Ugrave -50 KPX Acircumflex Uhungarumlaut -50 KPX Acircumflex Umacron -50 KPX Acircumflex Uogonek -50 KPX Acircumflex Uring -50 KPX Acircumflex V -70 KPX Acircumflex W -50 KPX Acircumflex Y -100 KPX Acircumflex Yacute -100 KPX Acircumflex Ydieresis -100 KPX Acircumflex u -30 KPX Acircumflex uacute -30 KPX Acircumflex ucircumflex -30 KPX Acircumflex udieresis -30 KPX Acircumflex ugrave -30 KPX Acircumflex uhungarumlaut -30 KPX Acircumflex umacron -30 KPX Acircumflex uogonek -30 KPX Acircumflex uring -30 KPX Acircumflex v -40 KPX Acircumflex w -40 KPX Acircumflex y -40 KPX Acircumflex yacute -40 KPX Acircumflex ydieresis -40 KPX Adieresis C -30 KPX Adieresis Cacute -30 KPX Adieresis Ccaron -30 KPX Adieresis Ccedilla -30 KPX Adieresis G -30 KPX Adieresis Gbreve -30 KPX Adieresis Gcommaaccent -30 KPX Adieresis O -30 KPX Adieresis Oacute -30 KPX Adieresis Ocircumflex -30 KPX Adieresis Odieresis -30 KPX Adieresis Ograve -30 KPX Adieresis Ohungarumlaut -30 KPX Adieresis Omacron -30 KPX Adieresis Oslash -30 KPX Adieresis Otilde -30 KPX Adieresis Q -30 KPX Adieresis T -120 KPX Adieresis Tcaron -120 KPX Adieresis Tcommaaccent -120 KPX Adieresis U -50 KPX Adieresis Uacute -50 KPX Adieresis Ucircumflex -50 KPX Adieresis Udieresis -50 KPX Adieresis Ugrave -50 KPX Adieresis Uhungarumlaut -50 KPX Adieresis Umacron -50 KPX Adieresis Uogonek -50 KPX Adieresis Uring -50 KPX Adieresis V -70 KPX Adieresis W -50 KPX Adieresis Y -100 KPX Adieresis Yacute -100 KPX Adieresis Ydieresis -100 KPX Adieresis u -30 KPX Adieresis uacute -30 KPX Adieresis ucircumflex -30 KPX Adieresis udieresis -30 KPX Adieresis ugrave -30 KPX Adieresis uhungarumlaut -30 KPX Adieresis umacron -30 KPX Adieresis uogonek -30 KPX Adieresis uring -30 KPX Adieresis v -40 KPX Adieresis w -40 KPX Adieresis y -40 KPX Adieresis yacute -40 KPX Adieresis ydieresis -40 KPX Agrave C -30 KPX Agrave Cacute -30 KPX Agrave Ccaron -30 KPX Agrave Ccedilla -30 KPX Agrave G -30 KPX Agrave Gbreve -30 KPX Agrave Gcommaaccent -30 KPX Agrave O -30 KPX Agrave Oacute -30 KPX Agrave Ocircumflex -30 KPX Agrave Odieresis -30 KPX Agrave Ograve -30 KPX Agrave Ohungarumlaut -30 KPX Agrave Omacron -30 KPX Agrave Oslash -30 KPX Agrave Otilde -30 KPX Agrave Q -30 KPX Agrave T -120 KPX Agrave Tcaron -120 KPX Agrave Tcommaaccent -120 KPX Agrave U -50 KPX Agrave Uacute -50 KPX Agrave Ucircumflex -50 KPX Agrave Udieresis -50 KPX Agrave Ugrave -50 KPX Agrave Uhungarumlaut -50 KPX Agrave Umacron -50 KPX Agrave Uogonek -50 KPX Agrave Uring -50 KPX Agrave V -70 KPX Agrave W -50 KPX Agrave Y -100 KPX Agrave Yacute -100 KPX Agrave Ydieresis -100 KPX Agrave u -30 KPX Agrave uacute -30 KPX Agrave ucircumflex -30 KPX Agrave udieresis -30 KPX Agrave ugrave -30 KPX Agrave uhungarumlaut -30 KPX Agrave umacron -30 KPX Agrave uogonek -30 KPX Agrave uring -30 KPX Agrave v -40 KPX Agrave w -40 KPX Agrave y -40 KPX Agrave yacute -40 KPX Agrave ydieresis -40 KPX Amacron C -30 KPX Amacron Cacute -30 KPX Amacron Ccaron -30 KPX Amacron Ccedilla -30 KPX Amacron G -30 KPX Amacron Gbreve -30 KPX Amacron Gcommaaccent -30 KPX Amacron O -30 KPX Amacron Oacute -30 KPX Amacron Ocircumflex -30 KPX Amacron Odieresis -30 KPX Amacron Ograve -30 KPX Amacron Ohungarumlaut -30 KPX Amacron Omacron -30 KPX Amacron Oslash -30 KPX Amacron Otilde -30 KPX Amacron Q -30 KPX Amacron T -120 KPX Amacron Tcaron -120 KPX Amacron Tcommaaccent -120 KPX Amacron U -50 KPX Amacron Uacute -50 KPX Amacron Ucircumflex -50 KPX Amacron Udieresis -50 KPX Amacron Ugrave -50 KPX Amacron Uhungarumlaut -50 KPX Amacron Umacron -50 KPX Amacron Uogonek -50 KPX Amacron Uring -50 KPX Amacron V -70 KPX Amacron W -50 KPX Amacron Y -100 KPX Amacron Yacute -100 KPX Amacron Ydieresis -100 KPX Amacron u -30 KPX Amacron uacute -30 KPX Amacron ucircumflex -30 KPX Amacron udieresis -30 KPX Amacron ugrave -30 KPX Amacron uhungarumlaut -30 KPX Amacron umacron -30 KPX Amacron uogonek -30 KPX Amacron uring -30 KPX Amacron v -40 KPX Amacron w -40 KPX Amacron y -40 KPX Amacron yacute -40 KPX Amacron ydieresis -40 KPX Aogonek C -30 KPX Aogonek Cacute -30 KPX Aogonek Ccaron -30 KPX Aogonek Ccedilla -30 KPX Aogonek G -30 KPX Aogonek Gbreve -30 KPX Aogonek Gcommaaccent -30 KPX Aogonek O -30 KPX Aogonek Oacute -30 KPX Aogonek Ocircumflex -30 KPX Aogonek Odieresis -30 KPX Aogonek Ograve -30 KPX Aogonek Ohungarumlaut -30 KPX Aogonek Omacron -30 KPX Aogonek Oslash -30 KPX Aogonek Otilde -30 KPX Aogonek Q -30 KPX Aogonek T -120 KPX Aogonek Tcaron -120 KPX Aogonek Tcommaaccent -120 KPX Aogonek U -50 KPX Aogonek Uacute -50 KPX Aogonek Ucircumflex -50 KPX Aogonek Udieresis -50 KPX Aogonek Ugrave -50 KPX Aogonek Uhungarumlaut -50 KPX Aogonek Umacron -50 KPX Aogonek Uogonek -50 KPX Aogonek Uring -50 KPX Aogonek V -70 KPX Aogonek W -50 KPX Aogonek Y -100 KPX Aogonek Yacute -100 KPX Aogonek Ydieresis -100 KPX Aogonek u -30 KPX Aogonek uacute -30 KPX Aogonek ucircumflex -30 KPX Aogonek udieresis -30 KPX Aogonek ugrave -30 KPX Aogonek uhungarumlaut -30 KPX Aogonek umacron -30 KPX Aogonek uogonek -30 KPX Aogonek uring -30 KPX Aogonek v -40 KPX Aogonek w -40 KPX Aogonek y -40 KPX Aogonek yacute -40 KPX Aogonek ydieresis -40 KPX Aring C -30 KPX Aring Cacute -30 KPX Aring Ccaron -30 KPX Aring Ccedilla -30 KPX Aring G -30 KPX Aring Gbreve -30 KPX Aring Gcommaaccent -30 KPX Aring O -30 KPX Aring Oacute -30 KPX Aring Ocircumflex -30 KPX Aring Odieresis -30 KPX Aring Ograve -30 KPX Aring Ohungarumlaut -30 KPX Aring Omacron -30 KPX Aring Oslash -30 KPX Aring Otilde -30 KPX Aring Q -30 KPX Aring T -120 KPX Aring Tcaron -120 KPX Aring Tcommaaccent -120 KPX Aring U -50 KPX Aring Uacute -50 KPX Aring Ucircumflex -50 KPX Aring Udieresis -50 KPX Aring Ugrave -50 KPX Aring Uhungarumlaut -50 KPX Aring Umacron -50 KPX Aring Uogonek -50 KPX Aring Uring -50 KPX Aring V -70 KPX Aring W -50 KPX Aring Y -100 KPX Aring Yacute -100 KPX Aring Ydieresis -100 KPX Aring u -30 KPX Aring uacute -30 KPX Aring ucircumflex -30 KPX Aring udieresis -30 KPX Aring ugrave -30 KPX Aring uhungarumlaut -30 KPX Aring umacron -30 KPX Aring uogonek -30 KPX Aring uring -30 KPX Aring v -40 KPX Aring w -40 KPX Aring y -40 KPX Aring yacute -40 KPX Aring ydieresis -40 KPX Atilde C -30 KPX Atilde Cacute -30 KPX Atilde Ccaron -30 KPX Atilde Ccedilla -30 KPX Atilde G -30 KPX Atilde Gbreve -30 KPX Atilde Gcommaaccent -30 KPX Atilde O -30 KPX Atilde Oacute -30 KPX Atilde Ocircumflex -30 KPX Atilde Odieresis -30 KPX Atilde Ograve -30 KPX Atilde Ohungarumlaut -30 KPX Atilde Omacron -30 KPX Atilde Oslash -30 KPX Atilde Otilde -30 KPX Atilde Q -30 KPX Atilde T -120 KPX Atilde Tcaron -120 KPX Atilde Tcommaaccent -120 KPX Atilde U -50 KPX Atilde Uacute -50 KPX Atilde Ucircumflex -50 KPX Atilde Udieresis -50 KPX Atilde Ugrave -50 KPX Atilde Uhungarumlaut -50 KPX Atilde Umacron -50 KPX Atilde Uogonek -50 KPX Atilde Uring -50 KPX Atilde V -70 KPX Atilde W -50 KPX Atilde Y -100 KPX Atilde Yacute -100 KPX Atilde Ydieresis -100 KPX Atilde u -30 KPX Atilde uacute -30 KPX Atilde ucircumflex -30 KPX Atilde udieresis -30 KPX Atilde ugrave -30 KPX Atilde uhungarumlaut -30 KPX Atilde umacron -30 KPX Atilde uogonek -30 KPX Atilde uring -30 KPX Atilde v -40 KPX Atilde w -40 KPX Atilde y -40 KPX Atilde yacute -40 KPX Atilde ydieresis -40 KPX B U -10 KPX B Uacute -10 KPX B Ucircumflex -10 KPX B Udieresis -10 KPX B Ugrave -10 KPX B Uhungarumlaut -10 KPX B Umacron -10 KPX B Uogonek -10 KPX B Uring -10 KPX B comma -20 KPX B period -20 KPX C comma -30 KPX C period -30 KPX Cacute comma -30 KPX Cacute period -30 KPX Ccaron comma -30 KPX Ccaron period -30 KPX Ccedilla comma -30 KPX Ccedilla period -30 KPX D A -40 KPX D Aacute -40 KPX D Abreve -40 KPX D Acircumflex -40 KPX D Adieresis -40 KPX D Agrave -40 KPX D Amacron -40 KPX D Aogonek -40 KPX D Aring -40 KPX D Atilde -40 KPX D V -70 KPX D W -40 KPX D Y -90 KPX D Yacute -90 KPX D Ydieresis -90 KPX D comma -70 KPX D period -70 KPX Dcaron A -40 KPX Dcaron Aacute -40 KPX Dcaron Abreve -40 KPX Dcaron Acircumflex -40 KPX Dcaron Adieresis -40 KPX Dcaron Agrave -40 KPX Dcaron Amacron -40 KPX Dcaron Aogonek -40 KPX Dcaron Aring -40 KPX Dcaron Atilde -40 KPX Dcaron V -70 KPX Dcaron W -40 KPX Dcaron Y -90 KPX Dcaron Yacute -90 KPX Dcaron Ydieresis -90 KPX Dcaron comma -70 KPX Dcaron period -70 KPX Dcroat A -40 KPX Dcroat Aacute -40 KPX Dcroat Abreve -40 KPX Dcroat Acircumflex -40 KPX Dcroat Adieresis -40 KPX Dcroat Agrave -40 KPX Dcroat Amacron -40 KPX Dcroat Aogonek -40 KPX Dcroat Aring -40 KPX Dcroat Atilde -40 KPX Dcroat V -70 KPX Dcroat W -40 KPX Dcroat Y -90 KPX Dcroat Yacute -90 KPX Dcroat Ydieresis -90 KPX Dcroat comma -70 KPX Dcroat period -70 KPX F A -80 KPX F Aacute -80 KPX F Abreve -80 KPX F Acircumflex -80 KPX F Adieresis -80 KPX F Agrave -80 KPX F Amacron -80 KPX F Aogonek -80 KPX F Aring -80 KPX F Atilde -80 KPX F a -50 KPX F aacute -50 KPX F abreve -50 KPX F acircumflex -50 KPX F adieresis -50 KPX F agrave -50 KPX F amacron -50 KPX F aogonek -50 KPX F aring -50 KPX F atilde -50 KPX F comma -150 KPX F e -30 KPX F eacute -30 KPX F ecaron -30 KPX F ecircumflex -30 KPX F edieresis -30 KPX F edotaccent -30 KPX F egrave -30 KPX F emacron -30 KPX F eogonek -30 KPX F o -30 KPX F oacute -30 KPX F ocircumflex -30 KPX F odieresis -30 KPX F ograve -30 KPX F ohungarumlaut -30 KPX F omacron -30 KPX F oslash -30 KPX F otilde -30 KPX F period -150 KPX F r -45 KPX F racute -45 KPX F rcaron -45 KPX F rcommaaccent -45 KPX J A -20 KPX J Aacute -20 KPX J Abreve -20 KPX J Acircumflex -20 KPX J Adieresis -20 KPX J Agrave -20 KPX J Amacron -20 KPX J Aogonek -20 KPX J Aring -20 KPX J Atilde -20 KPX J a -20 KPX J aacute -20 KPX J abreve -20 KPX J acircumflex -20 KPX J adieresis -20 KPX J agrave -20 KPX J amacron -20 KPX J aogonek -20 KPX J aring -20 KPX J atilde -20 KPX J comma -30 KPX J period -30 KPX J u -20 KPX J uacute -20 KPX J ucircumflex -20 KPX J udieresis -20 KPX J ugrave -20 KPX J uhungarumlaut -20 KPX J umacron -20 KPX J uogonek -20 KPX J uring -20 KPX K O -50 KPX K Oacute -50 KPX K Ocircumflex -50 KPX K Odieresis -50 KPX K Ograve -50 KPX K Ohungarumlaut -50 KPX K Omacron -50 KPX K Oslash -50 KPX K Otilde -50 KPX K e -40 KPX K eacute -40 KPX K ecaron -40 KPX K ecircumflex -40 KPX K edieresis -40 KPX K edotaccent -40 KPX K egrave -40 KPX K emacron -40 KPX K eogonek -40 KPX K o -40 KPX K oacute -40 KPX K ocircumflex -40 KPX K odieresis -40 KPX K ograve -40 KPX K ohungarumlaut -40 KPX K omacron -40 KPX K oslash -40 KPX K otilde -40 KPX K u -30 KPX K uacute -30 KPX K ucircumflex -30 KPX K udieresis -30 KPX K ugrave -30 KPX K uhungarumlaut -30 KPX K umacron -30 KPX K uogonek -30 KPX K uring -30 KPX K y -50 KPX K yacute -50 KPX K ydieresis -50 KPX Kcommaaccent O -50 KPX Kcommaaccent Oacute -50 KPX Kcommaaccent Ocircumflex -50 KPX Kcommaaccent Odieresis -50 KPX Kcommaaccent Ograve -50 KPX Kcommaaccent Ohungarumlaut -50 KPX Kcommaaccent Omacron -50 KPX Kcommaaccent Oslash -50 KPX Kcommaaccent Otilde -50 KPX Kcommaaccent e -40 KPX Kcommaaccent eacute -40 KPX Kcommaaccent ecaron -40 KPX Kcommaaccent ecircumflex -40 KPX Kcommaaccent edieresis -40 KPX Kcommaaccent edotaccent -40 KPX Kcommaaccent egrave -40 KPX Kcommaaccent emacron -40 KPX Kcommaaccent eogonek -40 KPX Kcommaaccent o -40 KPX Kcommaaccent oacute -40 KPX Kcommaaccent ocircumflex -40 KPX Kcommaaccent odieresis -40 KPX Kcommaaccent ograve -40 KPX Kcommaaccent ohungarumlaut -40 KPX Kcommaaccent omacron -40 KPX Kcommaaccent oslash -40 KPX Kcommaaccent otilde -40 KPX Kcommaaccent u -30 KPX Kcommaaccent uacute -30 KPX Kcommaaccent ucircumflex -30 KPX Kcommaaccent udieresis -30 KPX Kcommaaccent ugrave -30 KPX Kcommaaccent uhungarumlaut -30 KPX Kcommaaccent umacron -30 KPX Kcommaaccent uogonek -30 KPX Kcommaaccent uring -30 KPX Kcommaaccent y -50 KPX Kcommaaccent yacute -50 KPX Kcommaaccent ydieresis -50 KPX L T -110 KPX L Tcaron -110 KPX L Tcommaaccent -110 KPX L V -110 KPX L W -70 KPX L Y -140 KPX L Yacute -140 KPX L Ydieresis -140 KPX L quotedblright -140 KPX L quoteright -160 KPX L y -30 KPX L yacute -30 KPX L ydieresis -30 KPX Lacute T -110 KPX Lacute Tcaron -110 KPX Lacute Tcommaaccent -110 KPX Lacute V -110 KPX Lacute W -70 KPX Lacute Y -140 KPX Lacute Yacute -140 KPX Lacute Ydieresis -140 KPX Lacute quotedblright -140 KPX Lacute quoteright -160 KPX Lacute y -30 KPX Lacute yacute -30 KPX Lacute ydieresis -30 KPX Lcaron T -110 KPX Lcaron Tcaron -110 KPX Lcaron Tcommaaccent -110 KPX Lcaron V -110 KPX Lcaron W -70 KPX Lcaron Y -140 KPX Lcaron Yacute -140 KPX Lcaron Ydieresis -140 KPX Lcaron quotedblright -140 KPX Lcaron quoteright -160 KPX Lcaron y -30 KPX Lcaron yacute -30 KPX Lcaron ydieresis -30 KPX Lcommaaccent T -110 KPX Lcommaaccent Tcaron -110 KPX Lcommaaccent Tcommaaccent -110 KPX Lcommaaccent V -110 KPX Lcommaaccent W -70 KPX Lcommaaccent Y -140 KPX Lcommaaccent Yacute -140 KPX Lcommaaccent Ydieresis -140 KPX Lcommaaccent quotedblright -140 KPX Lcommaaccent quoteright -160 KPX Lcommaaccent y -30 KPX Lcommaaccent yacute -30 KPX Lcommaaccent ydieresis -30 KPX Lslash T -110 KPX Lslash Tcaron -110 KPX Lslash Tcommaaccent -110 KPX Lslash V -110 KPX Lslash W -70 KPX Lslash Y -140 KPX Lslash Yacute -140 KPX Lslash Ydieresis -140 KPX Lslash quotedblright -140 KPX Lslash quoteright -160 KPX Lslash y -30 KPX Lslash yacute -30 KPX Lslash ydieresis -30 KPX O A -20 KPX O Aacute -20 KPX O Abreve -20 KPX O Acircumflex -20 KPX O Adieresis -20 KPX O Agrave -20 KPX O Amacron -20 KPX O Aogonek -20 KPX O Aring -20 KPX O Atilde -20 KPX O T -40 KPX O Tcaron -40 KPX O Tcommaaccent -40 KPX O V -50 KPX O W -30 KPX O X -60 KPX O Y -70 KPX O Yacute -70 KPX O Ydieresis -70 KPX O comma -40 KPX O period -40 KPX Oacute A -20 KPX Oacute Aacute -20 KPX Oacute Abreve -20 KPX Oacute Acircumflex -20 KPX Oacute Adieresis -20 KPX Oacute Agrave -20 KPX Oacute Amacron -20 KPX Oacute Aogonek -20 KPX Oacute Aring -20 KPX Oacute Atilde -20 KPX Oacute T -40 KPX Oacute Tcaron -40 KPX Oacute Tcommaaccent -40 KPX Oacute V -50 KPX Oacute W -30 KPX Oacute X -60 KPX Oacute Y -70 KPX Oacute Yacute -70 KPX Oacute Ydieresis -70 KPX Oacute comma -40 KPX Oacute period -40 KPX Ocircumflex A -20 KPX Ocircumflex Aacute -20 KPX Ocircumflex Abreve -20 KPX Ocircumflex Acircumflex -20 KPX Ocircumflex Adieresis -20 KPX Ocircumflex Agrave -20 KPX Ocircumflex Amacron -20 KPX Ocircumflex Aogonek -20 KPX Ocircumflex Aring -20 KPX Ocircumflex Atilde -20 KPX Ocircumflex T -40 KPX Ocircumflex Tcaron -40 KPX Ocircumflex Tcommaaccent -40 KPX Ocircumflex V -50 KPX Ocircumflex W -30 KPX Ocircumflex X -60 KPX Ocircumflex Y -70 KPX Ocircumflex Yacute -70 KPX Ocircumflex Ydieresis -70 KPX Ocircumflex comma -40 KPX Ocircumflex period -40 KPX Odieresis A -20 KPX Odieresis Aacute -20 KPX Odieresis Abreve -20 KPX Odieresis Acircumflex -20 KPX Odieresis Adieresis -20 KPX Odieresis Agrave -20 KPX Odieresis Amacron -20 KPX Odieresis Aogonek -20 KPX Odieresis Aring -20 KPX Odieresis Atilde -20 KPX Odieresis T -40 KPX Odieresis Tcaron -40 KPX Odieresis Tcommaaccent -40 KPX Odieresis V -50 KPX Odieresis W -30 KPX Odieresis X -60 KPX Odieresis Y -70 KPX Odieresis Yacute -70 KPX Odieresis Ydieresis -70 KPX Odieresis comma -40 KPX Odieresis period -40 KPX Ograve A -20 KPX Ograve Aacute -20 KPX Ograve Abreve -20 KPX Ograve Acircumflex -20 KPX Ograve Adieresis -20 KPX Ograve Agrave -20 KPX Ograve Amacron -20 KPX Ograve Aogonek -20 KPX Ograve Aring -20 KPX Ograve Atilde -20 KPX Ograve T -40 KPX Ograve Tcaron -40 KPX Ograve Tcommaaccent -40 KPX Ograve V -50 KPX Ograve W -30 KPX Ograve X -60 KPX Ograve Y -70 KPX Ograve Yacute -70 KPX Ograve Ydieresis -70 KPX Ograve comma -40 KPX Ograve period -40 KPX Ohungarumlaut A -20 KPX Ohungarumlaut Aacute -20 KPX Ohungarumlaut Abreve -20 KPX Ohungarumlaut Acircumflex -20 KPX Ohungarumlaut Adieresis -20 KPX Ohungarumlaut Agrave -20 KPX Ohungarumlaut Amacron -20 KPX Ohungarumlaut Aogonek -20 KPX Ohungarumlaut Aring -20 KPX Ohungarumlaut Atilde -20 KPX Ohungarumlaut T -40 KPX Ohungarumlaut Tcaron -40 KPX Ohungarumlaut Tcommaaccent -40 KPX Ohungarumlaut V -50 KPX Ohungarumlaut W -30 KPX Ohungarumlaut X -60 KPX Ohungarumlaut Y -70 KPX Ohungarumlaut Yacute -70 KPX Ohungarumlaut Ydieresis -70 KPX Ohungarumlaut comma -40 KPX Ohungarumlaut period -40 KPX Omacron A -20 KPX Omacron Aacute -20 KPX Omacron Abreve -20 KPX Omacron Acircumflex -20 KPX Omacron Adieresis -20 KPX Omacron Agrave -20 KPX Omacron Amacron -20 KPX Omacron Aogonek -20 KPX Omacron Aring -20 KPX Omacron Atilde -20 KPX Omacron T -40 KPX Omacron Tcaron -40 KPX Omacron Tcommaaccent -40 KPX Omacron V -50 KPX Omacron W -30 KPX Omacron X -60 KPX Omacron Y -70 KPX Omacron Yacute -70 KPX Omacron Ydieresis -70 KPX Omacron comma -40 KPX Omacron period -40 KPX Oslash A -20 KPX Oslash Aacute -20 KPX Oslash Abreve -20 KPX Oslash Acircumflex -20 KPX Oslash Adieresis -20 KPX Oslash Agrave -20 KPX Oslash Amacron -20 KPX Oslash Aogonek -20 KPX Oslash Aring -20 KPX Oslash Atilde -20 KPX Oslash T -40 KPX Oslash Tcaron -40 KPX Oslash Tcommaaccent -40 KPX Oslash V -50 KPX Oslash W -30 KPX Oslash X -60 KPX Oslash Y -70 KPX Oslash Yacute -70 KPX Oslash Ydieresis -70 KPX Oslash comma -40 KPX Oslash period -40 KPX Otilde A -20 KPX Otilde Aacute -20 KPX Otilde Abreve -20 KPX Otilde Acircumflex -20 KPX Otilde Adieresis -20 KPX Otilde Agrave -20 KPX Otilde Amacron -20 KPX Otilde Aogonek -20 KPX Otilde Aring -20 KPX Otilde Atilde -20 KPX Otilde T -40 KPX Otilde Tcaron -40 KPX Otilde Tcommaaccent -40 KPX Otilde V -50 KPX Otilde W -30 KPX Otilde X -60 KPX Otilde Y -70 KPX Otilde Yacute -70 KPX Otilde Ydieresis -70 KPX Otilde comma -40 KPX Otilde period -40 KPX P A -120 KPX P Aacute -120 KPX P Abreve -120 KPX P Acircumflex -120 KPX P Adieresis -120 KPX P Agrave -120 KPX P Amacron -120 KPX P Aogonek -120 KPX P Aring -120 KPX P Atilde -120 KPX P a -40 KPX P aacute -40 KPX P abreve -40 KPX P acircumflex -40 KPX P adieresis -40 KPX P agrave -40 KPX P amacron -40 KPX P aogonek -40 KPX P aring -40 KPX P atilde -40 KPX P comma -180 KPX P e -50 KPX P eacute -50 KPX P ecaron -50 KPX P ecircumflex -50 KPX P edieresis -50 KPX P edotaccent -50 KPX P egrave -50 KPX P emacron -50 KPX P eogonek -50 KPX P o -50 KPX P oacute -50 KPX P ocircumflex -50 KPX P odieresis -50 KPX P ograve -50 KPX P ohungarumlaut -50 KPX P omacron -50 KPX P oslash -50 KPX P otilde -50 KPX P period -180 KPX Q U -10 KPX Q Uacute -10 KPX Q Ucircumflex -10 KPX Q Udieresis -10 KPX Q Ugrave -10 KPX Q Uhungarumlaut -10 KPX Q Umacron -10 KPX Q Uogonek -10 KPX Q Uring -10 KPX R O -20 KPX R Oacute -20 KPX R Ocircumflex -20 KPX R Odieresis -20 KPX R Ograve -20 KPX R Ohungarumlaut -20 KPX R Omacron -20 KPX R Oslash -20 KPX R Otilde -20 KPX R T -30 KPX R Tcaron -30 KPX R Tcommaaccent -30 KPX R U -40 KPX R Uacute -40 KPX R Ucircumflex -40 KPX R Udieresis -40 KPX R Ugrave -40 KPX R Uhungarumlaut -40 KPX R Umacron -40 KPX R Uogonek -40 KPX R Uring -40 KPX R V -50 KPX R W -30 KPX R Y -50 KPX R Yacute -50 KPX R Ydieresis -50 KPX Racute O -20 KPX Racute Oacute -20 KPX Racute Ocircumflex -20 KPX Racute Odieresis -20 KPX Racute Ograve -20 KPX Racute Ohungarumlaut -20 KPX Racute Omacron -20 KPX Racute Oslash -20 KPX Racute Otilde -20 KPX Racute T -30 KPX Racute Tcaron -30 KPX Racute Tcommaaccent -30 KPX Racute U -40 KPX Racute Uacute -40 KPX Racute Ucircumflex -40 KPX Racute Udieresis -40 KPX Racute Ugrave -40 KPX Racute Uhungarumlaut -40 KPX Racute Umacron -40 KPX Racute Uogonek -40 KPX Racute Uring -40 KPX Racute V -50 KPX Racute W -30 KPX Racute Y -50 KPX Racute Yacute -50 KPX Racute Ydieresis -50 KPX Rcaron O -20 KPX Rcaron Oacute -20 KPX Rcaron Ocircumflex -20 KPX Rcaron Odieresis -20 KPX Rcaron Ograve -20 KPX Rcaron Ohungarumlaut -20 KPX Rcaron Omacron -20 KPX Rcaron Oslash -20 KPX Rcaron Otilde -20 KPX Rcaron T -30 KPX Rcaron Tcaron -30 KPX Rcaron Tcommaaccent -30 KPX Rcaron U -40 KPX Rcaron Uacute -40 KPX Rcaron Ucircumflex -40 KPX Rcaron Udieresis -40 KPX Rcaron Ugrave -40 KPX Rcaron Uhungarumlaut -40 KPX Rcaron Umacron -40 KPX Rcaron Uogonek -40 KPX Rcaron Uring -40 KPX Rcaron V -50 KPX Rcaron W -30 KPX Rcaron Y -50 KPX Rcaron Yacute -50 KPX Rcaron Ydieresis -50 KPX Rcommaaccent O -20 KPX Rcommaaccent Oacute -20 KPX Rcommaaccent Ocircumflex -20 KPX Rcommaaccent Odieresis -20 KPX Rcommaaccent Ograve -20 KPX Rcommaaccent Ohungarumlaut -20 KPX Rcommaaccent Omacron -20 KPX Rcommaaccent Oslash -20 KPX Rcommaaccent Otilde -20 KPX Rcommaaccent T -30 KPX Rcommaaccent Tcaron -30 KPX Rcommaaccent Tcommaaccent -30 KPX Rcommaaccent U -40 KPX Rcommaaccent Uacute -40 KPX Rcommaaccent Ucircumflex -40 KPX Rcommaaccent Udieresis -40 KPX Rcommaaccent Ugrave -40 KPX Rcommaaccent Uhungarumlaut -40 KPX Rcommaaccent Umacron -40 KPX Rcommaaccent Uogonek -40 KPX Rcommaaccent Uring -40 KPX Rcommaaccent V -50 KPX Rcommaaccent W -30 KPX Rcommaaccent Y -50 KPX Rcommaaccent Yacute -50 KPX Rcommaaccent Ydieresis -50 KPX S comma -20 KPX S period -20 KPX Sacute comma -20 KPX Sacute period -20 KPX Scaron comma -20 KPX Scaron period -20 KPX Scedilla comma -20 KPX Scedilla period -20 KPX Scommaaccent comma -20 KPX Scommaaccent period -20 KPX T A -120 KPX T Aacute -120 KPX T Abreve -120 KPX T Acircumflex -120 KPX T Adieresis -120 KPX T Agrave -120 KPX T Amacron -120 KPX T Aogonek -120 KPX T Aring -120 KPX T Atilde -120 KPX T O -40 KPX T Oacute -40 KPX T Ocircumflex -40 KPX T Odieresis -40 KPX T Ograve -40 KPX T Ohungarumlaut -40 KPX T Omacron -40 KPX T Oslash -40 KPX T Otilde -40 KPX T a -120 KPX T aacute -120 KPX T abreve -60 KPX T acircumflex -120 KPX T adieresis -120 KPX T agrave -120 KPX T amacron -60 KPX T aogonek -120 KPX T aring -120 KPX T atilde -60 KPX T colon -20 KPX T comma -120 KPX T e -120 KPX T eacute -120 KPX T ecaron -120 KPX T ecircumflex -120 KPX T edieresis -120 KPX T edotaccent -120 KPX T egrave -60 KPX T emacron -60 KPX T eogonek -120 KPX T hyphen -140 KPX T o -120 KPX T oacute -120 KPX T ocircumflex -120 KPX T odieresis -120 KPX T ograve -120 KPX T ohungarumlaut -120 KPX T omacron -60 KPX T oslash -120 KPX T otilde -60 KPX T period -120 KPX T r -120 KPX T racute -120 KPX T rcaron -120 KPX T rcommaaccent -120 KPX T semicolon -20 KPX T u -120 KPX T uacute -120 KPX T ucircumflex -120 KPX T udieresis -120 KPX T ugrave -120 KPX T uhungarumlaut -120 KPX T umacron -60 KPX T uogonek -120 KPX T uring -120 KPX T w -120 KPX T y -120 KPX T yacute -120 KPX T ydieresis -60 KPX Tcaron A -120 KPX Tcaron Aacute -120 KPX Tcaron Abreve -120 KPX Tcaron Acircumflex -120 KPX Tcaron Adieresis -120 KPX Tcaron Agrave -120 KPX Tcaron Amacron -120 KPX Tcaron Aogonek -120 KPX Tcaron Aring -120 KPX Tcaron Atilde -120 KPX Tcaron O -40 KPX Tcaron Oacute -40 KPX Tcaron Ocircumflex -40 KPX Tcaron Odieresis -40 KPX Tcaron Ograve -40 KPX Tcaron Ohungarumlaut -40 KPX Tcaron Omacron -40 KPX Tcaron Oslash -40 KPX Tcaron Otilde -40 KPX Tcaron a -120 KPX Tcaron aacute -120 KPX Tcaron abreve -60 KPX Tcaron acircumflex -120 KPX Tcaron adieresis -120 KPX Tcaron agrave -120 KPX Tcaron amacron -60 KPX Tcaron aogonek -120 KPX Tcaron aring -120 KPX Tcaron atilde -60 KPX Tcaron colon -20 KPX Tcaron comma -120 KPX Tcaron e -120 KPX Tcaron eacute -120 KPX Tcaron ecaron -120 KPX Tcaron ecircumflex -120 KPX Tcaron edieresis -120 KPX Tcaron edotaccent -120 KPX Tcaron egrave -60 KPX Tcaron emacron -60 KPX Tcaron eogonek -120 KPX Tcaron hyphen -140 KPX Tcaron o -120 KPX Tcaron oacute -120 KPX Tcaron ocircumflex -120 KPX Tcaron odieresis -120 KPX Tcaron ograve -120 KPX Tcaron ohungarumlaut -120 KPX Tcaron omacron -60 KPX Tcaron oslash -120 KPX Tcaron otilde -60 KPX Tcaron period -120 KPX Tcaron r -120 KPX Tcaron racute -120 KPX Tcaron rcaron -120 KPX Tcaron rcommaaccent -120 KPX Tcaron semicolon -20 KPX Tcaron u -120 KPX Tcaron uacute -120 KPX Tcaron ucircumflex -120 KPX Tcaron udieresis -120 KPX Tcaron ugrave -120 KPX Tcaron uhungarumlaut -120 KPX Tcaron umacron -60 KPX Tcaron uogonek -120 KPX Tcaron uring -120 KPX Tcaron w -120 KPX Tcaron y -120 KPX Tcaron yacute -120 KPX Tcaron ydieresis -60 KPX Tcommaaccent A -120 KPX Tcommaaccent Aacute -120 KPX Tcommaaccent Abreve -120 KPX Tcommaaccent Acircumflex -120 KPX Tcommaaccent Adieresis -120 KPX Tcommaaccent Agrave -120 KPX Tcommaaccent Amacron -120 KPX Tcommaaccent Aogonek -120 KPX Tcommaaccent Aring -120 KPX Tcommaaccent Atilde -120 KPX Tcommaaccent O -40 KPX Tcommaaccent Oacute -40 KPX Tcommaaccent Ocircumflex -40 KPX Tcommaaccent Odieresis -40 KPX Tcommaaccent Ograve -40 KPX Tcommaaccent Ohungarumlaut -40 KPX Tcommaaccent Omacron -40 KPX Tcommaaccent Oslash -40 KPX Tcommaaccent Otilde -40 KPX Tcommaaccent a -120 KPX Tcommaaccent aacute -120 KPX Tcommaaccent abreve -60 KPX Tcommaaccent acircumflex -120 KPX Tcommaaccent adieresis -120 KPX Tcommaaccent agrave -120 KPX Tcommaaccent amacron -60 KPX Tcommaaccent aogonek -120 KPX Tcommaaccent aring -120 KPX Tcommaaccent atilde -60 KPX Tcommaaccent colon -20 KPX Tcommaaccent comma -120 KPX Tcommaaccent e -120 KPX Tcommaaccent eacute -120 KPX Tcommaaccent ecaron -120 KPX Tcommaaccent ecircumflex -120 KPX Tcommaaccent edieresis -120 KPX Tcommaaccent edotaccent -120 KPX Tcommaaccent egrave -60 KPX Tcommaaccent emacron -60 KPX Tcommaaccent eogonek -120 KPX Tcommaaccent hyphen -140 KPX Tcommaaccent o -120 KPX Tcommaaccent oacute -120 KPX Tcommaaccent ocircumflex -120 KPX Tcommaaccent odieresis -120 KPX Tcommaaccent ograve -120 KPX Tcommaaccent ohungarumlaut -120 KPX Tcommaaccent omacron -60 KPX Tcommaaccent oslash -120 KPX Tcommaaccent otilde -60 KPX Tcommaaccent period -120 KPX Tcommaaccent r -120 KPX Tcommaaccent racute -120 KPX Tcommaaccent rcaron -120 KPX Tcommaaccent rcommaaccent -120 KPX Tcommaaccent semicolon -20 KPX Tcommaaccent u -120 KPX Tcommaaccent uacute -120 KPX Tcommaaccent ucircumflex -120 KPX Tcommaaccent udieresis -120 KPX Tcommaaccent ugrave -120 KPX Tcommaaccent uhungarumlaut -120 KPX Tcommaaccent umacron -60 KPX Tcommaaccent uogonek -120 KPX Tcommaaccent uring -120 KPX Tcommaaccent w -120 KPX Tcommaaccent y -120 KPX Tcommaaccent yacute -120 KPX Tcommaaccent ydieresis -60 KPX U A -40 KPX U Aacute -40 KPX U Abreve -40 KPX U Acircumflex -40 KPX U Adieresis -40 KPX U Agrave -40 KPX U Amacron -40 KPX U Aogonek -40 KPX U Aring -40 KPX U Atilde -40 KPX U comma -40 KPX U period -40 KPX Uacute A -40 KPX Uacute Aacute -40 KPX Uacute Abreve -40 KPX Uacute Acircumflex -40 KPX Uacute Adieresis -40 KPX Uacute Agrave -40 KPX Uacute Amacron -40 KPX Uacute Aogonek -40 KPX Uacute Aring -40 KPX Uacute Atilde -40 KPX Uacute comma -40 KPX Uacute period -40 KPX Ucircumflex A -40 KPX Ucircumflex Aacute -40 KPX Ucircumflex Abreve -40 KPX Ucircumflex Acircumflex -40 KPX Ucircumflex Adieresis -40 KPX Ucircumflex Agrave -40 KPX Ucircumflex Amacron -40 KPX Ucircumflex Aogonek -40 KPX Ucircumflex Aring -40 KPX Ucircumflex Atilde -40 KPX Ucircumflex comma -40 KPX Ucircumflex period -40 KPX Udieresis A -40 KPX Udieresis Aacute -40 KPX Udieresis Abreve -40 KPX Udieresis Acircumflex -40 KPX Udieresis Adieresis -40 KPX Udieresis Agrave -40 KPX Udieresis Amacron -40 KPX Udieresis Aogonek -40 KPX Udieresis Aring -40 KPX Udieresis Atilde -40 KPX Udieresis comma -40 KPX Udieresis period -40 KPX Ugrave A -40 KPX Ugrave Aacute -40 KPX Ugrave Abreve -40 KPX Ugrave Acircumflex -40 KPX Ugrave Adieresis -40 KPX Ugrave Agrave -40 KPX Ugrave Amacron -40 KPX Ugrave Aogonek -40 KPX Ugrave Aring -40 KPX Ugrave Atilde -40 KPX Ugrave comma -40 KPX Ugrave period -40 KPX Uhungarumlaut A -40 KPX Uhungarumlaut Aacute -40 KPX Uhungarumlaut Abreve -40 KPX Uhungarumlaut Acircumflex -40 KPX Uhungarumlaut Adieresis -40 KPX Uhungarumlaut Agrave -40 KPX Uhungarumlaut Amacron -40 KPX Uhungarumlaut Aogonek -40 KPX Uhungarumlaut Aring -40 KPX Uhungarumlaut Atilde -40 KPX Uhungarumlaut comma -40 KPX Uhungarumlaut period -40 KPX Umacron A -40 KPX Umacron Aacute -40 KPX Umacron Abreve -40 KPX Umacron Acircumflex -40 KPX Umacron Adieresis -40 KPX Umacron Agrave -40 KPX Umacron Amacron -40 KPX Umacron Aogonek -40 KPX Umacron Aring -40 KPX Umacron Atilde -40 KPX Umacron comma -40 KPX Umacron period -40 KPX Uogonek A -40 KPX Uogonek Aacute -40 KPX Uogonek Abreve -40 KPX Uogonek Acircumflex -40 KPX Uogonek Adieresis -40 KPX Uogonek Agrave -40 KPX Uogonek Amacron -40 KPX Uogonek Aogonek -40 KPX Uogonek Aring -40 KPX Uogonek Atilde -40 KPX Uogonek comma -40 KPX Uogonek period -40 KPX Uring A -40 KPX Uring Aacute -40 KPX Uring Abreve -40 KPX Uring Acircumflex -40 KPX Uring Adieresis -40 KPX Uring Agrave -40 KPX Uring Amacron -40 KPX Uring Aogonek -40 KPX Uring Aring -40 KPX Uring Atilde -40 KPX Uring comma -40 KPX Uring period -40 KPX V A -80 KPX V Aacute -80 KPX V Abreve -80 KPX V Acircumflex -80 KPX V Adieresis -80 KPX V Agrave -80 KPX V Amacron -80 KPX V Aogonek -80 KPX V Aring -80 KPX V Atilde -80 KPX V G -40 KPX V Gbreve -40 KPX V Gcommaaccent -40 KPX V O -40 KPX V Oacute -40 KPX V Ocircumflex -40 KPX V Odieresis -40 KPX V Ograve -40 KPX V Ohungarumlaut -40 KPX V Omacron -40 KPX V Oslash -40 KPX V Otilde -40 KPX V a -70 KPX V aacute -70 KPX V abreve -70 KPX V acircumflex -70 KPX V adieresis -70 KPX V agrave -70 KPX V amacron -70 KPX V aogonek -70 KPX V aring -70 KPX V atilde -70 KPX V colon -40 KPX V comma -125 KPX V e -80 KPX V eacute -80 KPX V ecaron -80 KPX V ecircumflex -80 KPX V edieresis -80 KPX V edotaccent -80 KPX V egrave -80 KPX V emacron -80 KPX V eogonek -80 KPX V hyphen -80 KPX V o -80 KPX V oacute -80 KPX V ocircumflex -80 KPX V odieresis -80 KPX V ograve -80 KPX V ohungarumlaut -80 KPX V omacron -80 KPX V oslash -80 KPX V otilde -80 KPX V period -125 KPX V semicolon -40 KPX V u -70 KPX V uacute -70 KPX V ucircumflex -70 KPX V udieresis -70 KPX V ugrave -70 KPX V uhungarumlaut -70 KPX V umacron -70 KPX V uogonek -70 KPX V uring -70 KPX W A -50 KPX W Aacute -50 KPX W Abreve -50 KPX W Acircumflex -50 KPX W Adieresis -50 KPX W Agrave -50 KPX W Amacron -50 KPX W Aogonek -50 KPX W Aring -50 KPX W Atilde -50 KPX W O -20 KPX W Oacute -20 KPX W Ocircumflex -20 KPX W Odieresis -20 KPX W Ograve -20 KPX W Ohungarumlaut -20 KPX W Omacron -20 KPX W Oslash -20 KPX W Otilde -20 KPX W a -40 KPX W aacute -40 KPX W abreve -40 KPX W acircumflex -40 KPX W adieresis -40 KPX W agrave -40 KPX W amacron -40 KPX W aogonek -40 KPX W aring -40 KPX W atilde -40 KPX W comma -80 KPX W e -30 KPX W eacute -30 KPX W ecaron -30 KPX W ecircumflex -30 KPX W edieresis -30 KPX W edotaccent -30 KPX W egrave -30 KPX W emacron -30 KPX W eogonek -30 KPX W hyphen -40 KPX W o -30 KPX W oacute -30 KPX W ocircumflex -30 KPX W odieresis -30 KPX W ograve -30 KPX W ohungarumlaut -30 KPX W omacron -30 KPX W oslash -30 KPX W otilde -30 KPX W period -80 KPX W u -30 KPX W uacute -30 KPX W ucircumflex -30 KPX W udieresis -30 KPX W ugrave -30 KPX W uhungarumlaut -30 KPX W umacron -30 KPX W uogonek -30 KPX W uring -30 KPX W y -20 KPX W yacute -20 KPX W ydieresis -20 KPX Y A -110 KPX Y Aacute -110 KPX Y Abreve -110 KPX Y Acircumflex -110 KPX Y Adieresis -110 KPX Y Agrave -110 KPX Y Amacron -110 KPX Y Aogonek -110 KPX Y Aring -110 KPX Y Atilde -110 KPX Y O -85 KPX Y Oacute -85 KPX Y Ocircumflex -85 KPX Y Odieresis -85 KPX Y Ograve -85 KPX Y Ohungarumlaut -85 KPX Y Omacron -85 KPX Y Oslash -85 KPX Y Otilde -85 KPX Y a -140 KPX Y aacute -140 KPX Y abreve -70 KPX Y acircumflex -140 KPX Y adieresis -140 KPX Y agrave -140 KPX Y amacron -70 KPX Y aogonek -140 KPX Y aring -140 KPX Y atilde -140 KPX Y colon -60 KPX Y comma -140 KPX Y e -140 KPX Y eacute -140 KPX Y ecaron -140 KPX Y ecircumflex -140 KPX Y edieresis -140 KPX Y edotaccent -140 KPX Y egrave -140 KPX Y emacron -70 KPX Y eogonek -140 KPX Y hyphen -140 KPX Y i -20 KPX Y iacute -20 KPX Y iogonek -20 KPX Y o -140 KPX Y oacute -140 KPX Y ocircumflex -140 KPX Y odieresis -140 KPX Y ograve -140 KPX Y ohungarumlaut -140 KPX Y omacron -140 KPX Y oslash -140 KPX Y otilde -140 KPX Y period -140 KPX Y semicolon -60 KPX Y u -110 KPX Y uacute -110 KPX Y ucircumflex -110 KPX Y udieresis -110 KPX Y ugrave -110 KPX Y uhungarumlaut -110 KPX Y umacron -110 KPX Y uogonek -110 KPX Y uring -110 KPX Yacute A -110 KPX Yacute Aacute -110 KPX Yacute Abreve -110 KPX Yacute Acircumflex -110 KPX Yacute Adieresis -110 KPX Yacute Agrave -110 KPX Yacute Amacron -110 KPX Yacute Aogonek -110 KPX Yacute Aring -110 KPX Yacute Atilde -110 KPX Yacute O -85 KPX Yacute Oacute -85 KPX Yacute Ocircumflex -85 KPX Yacute Odieresis -85 KPX Yacute Ograve -85 KPX Yacute Ohungarumlaut -85 KPX Yacute Omacron -85 KPX Yacute Oslash -85 KPX Yacute Otilde -85 KPX Yacute a -140 KPX Yacute aacute -140 KPX Yacute abreve -70 KPX Yacute acircumflex -140 KPX Yacute adieresis -140 KPX Yacute agrave -140 KPX Yacute amacron -70 KPX Yacute aogonek -140 KPX Yacute aring -140 KPX Yacute atilde -70 KPX Yacute colon -60 KPX Yacute comma -140 KPX Yacute e -140 KPX Yacute eacute -140 KPX Yacute ecaron -140 KPX Yacute ecircumflex -140 KPX Yacute edieresis -140 KPX Yacute edotaccent -140 KPX Yacute egrave -140 KPX Yacute emacron -70 KPX Yacute eogonek -140 KPX Yacute hyphen -140 KPX Yacute i -20 KPX Yacute iacute -20 KPX Yacute iogonek -20 KPX Yacute o -140 KPX Yacute oacute -140 KPX Yacute ocircumflex -140 KPX Yacute odieresis -140 KPX Yacute ograve -140 KPX Yacute ohungarumlaut -140 KPX Yacute omacron -70 KPX Yacute oslash -140 KPX Yacute otilde -140 KPX Yacute period -140 KPX Yacute semicolon -60 KPX Yacute u -110 KPX Yacute uacute -110 KPX Yacute ucircumflex -110 KPX Yacute udieresis -110 KPX Yacute ugrave -110 KPX Yacute uhungarumlaut -110 KPX Yacute umacron -110 KPX Yacute uogonek -110 KPX Yacute uring -110 KPX Ydieresis A -110 KPX Ydieresis Aacute -110 KPX Ydieresis Abreve -110 KPX Ydieresis Acircumflex -110 KPX Ydieresis Adieresis -110 KPX Ydieresis Agrave -110 KPX Ydieresis Amacron -110 KPX Ydieresis Aogonek -110 KPX Ydieresis Aring -110 KPX Ydieresis Atilde -110 KPX Ydieresis O -85 KPX Ydieresis Oacute -85 KPX Ydieresis Ocircumflex -85 KPX Ydieresis Odieresis -85 KPX Ydieresis Ograve -85 KPX Ydieresis Ohungarumlaut -85 KPX Ydieresis Omacron -85 KPX Ydieresis Oslash -85 KPX Ydieresis Otilde -85 KPX Ydieresis a -140 KPX Ydieresis aacute -140 KPX Ydieresis abreve -70 KPX Ydieresis acircumflex -140 KPX Ydieresis adieresis -140 KPX Ydieresis agrave -140 KPX Ydieresis amacron -70 KPX Ydieresis aogonek -140 KPX Ydieresis aring -140 KPX Ydieresis atilde -70 KPX Ydieresis colon -60 KPX Ydieresis comma -140 KPX Ydieresis e -140 KPX Ydieresis eacute -140 KPX Ydieresis ecaron -140 KPX Ydieresis ecircumflex -140 KPX Ydieresis edieresis -140 KPX Ydieresis edotaccent -140 KPX Ydieresis egrave -140 KPX Ydieresis emacron -70 KPX Ydieresis eogonek -140 KPX Ydieresis hyphen -140 KPX Ydieresis i -20 KPX Ydieresis iacute -20 KPX Ydieresis iogonek -20 KPX Ydieresis o -140 KPX Ydieresis oacute -140 KPX Ydieresis ocircumflex -140 KPX Ydieresis odieresis -140 KPX Ydieresis ograve -140 KPX Ydieresis ohungarumlaut -140 KPX Ydieresis omacron -140 KPX Ydieresis oslash -140 KPX Ydieresis otilde -140 KPX Ydieresis period -140 KPX Ydieresis semicolon -60 KPX Ydieresis u -110 KPX Ydieresis uacute -110 KPX Ydieresis ucircumflex -110 KPX Ydieresis udieresis -110 KPX Ydieresis ugrave -110 KPX Ydieresis uhungarumlaut -110 KPX Ydieresis umacron -110 KPX Ydieresis uogonek -110 KPX Ydieresis uring -110 KPX a v -20 KPX a w -20 KPX a y -30 KPX a yacute -30 KPX a ydieresis -30 KPX aacute v -20 KPX aacute w -20 KPX aacute y -30 KPX aacute yacute -30 KPX aacute ydieresis -30 KPX abreve v -20 KPX abreve w -20 KPX abreve y -30 KPX abreve yacute -30 KPX abreve ydieresis -30 KPX acircumflex v -20 KPX acircumflex w -20 KPX acircumflex y -30 KPX acircumflex yacute -30 KPX acircumflex ydieresis -30 KPX adieresis v -20 KPX adieresis w -20 KPX adieresis y -30 KPX adieresis yacute -30 KPX adieresis ydieresis -30 KPX agrave v -20 KPX agrave w -20 KPX agrave y -30 KPX agrave yacute -30 KPX agrave ydieresis -30 KPX amacron v -20 KPX amacron w -20 KPX amacron y -30 KPX amacron yacute -30 KPX amacron ydieresis -30 KPX aogonek v -20 KPX aogonek w -20 KPX aogonek y -30 KPX aogonek yacute -30 KPX aogonek ydieresis -30 KPX aring v -20 KPX aring w -20 KPX aring y -30 KPX aring yacute -30 KPX aring ydieresis -30 KPX atilde v -20 KPX atilde w -20 KPX atilde y -30 KPX atilde yacute -30 KPX atilde ydieresis -30 KPX b b -10 KPX b comma -40 KPX b l -20 KPX b lacute -20 KPX b lcommaaccent -20 KPX b lslash -20 KPX b period -40 KPX b u -20 KPX b uacute -20 KPX b ucircumflex -20 KPX b udieresis -20 KPX b ugrave -20 KPX b uhungarumlaut -20 KPX b umacron -20 KPX b uogonek -20 KPX b uring -20 KPX b v -20 KPX b y -20 KPX b yacute -20 KPX b ydieresis -20 KPX c comma -15 KPX c k -20 KPX c kcommaaccent -20 KPX cacute comma -15 KPX cacute k -20 KPX cacute kcommaaccent -20 KPX ccaron comma -15 KPX ccaron k -20 KPX ccaron kcommaaccent -20 KPX ccedilla comma -15 KPX ccedilla k -20 KPX ccedilla kcommaaccent -20 KPX colon space -50 KPX comma quotedblright -100 KPX comma quoteright -100 KPX e comma -15 KPX e period -15 KPX e v -30 KPX e w -20 KPX e x -30 KPX e y -20 KPX e yacute -20 KPX e ydieresis -20 KPX eacute comma -15 KPX eacute period -15 KPX eacute v -30 KPX eacute w -20 KPX eacute x -30 KPX eacute y -20 KPX eacute yacute -20 KPX eacute ydieresis -20 KPX ecaron comma -15 KPX ecaron period -15 KPX ecaron v -30 KPX ecaron w -20 KPX ecaron x -30 KPX ecaron y -20 KPX ecaron yacute -20 KPX ecaron ydieresis -20 KPX ecircumflex comma -15 KPX ecircumflex period -15 KPX ecircumflex v -30 KPX ecircumflex w -20 KPX ecircumflex x -30 KPX ecircumflex y -20 KPX ecircumflex yacute -20 KPX ecircumflex ydieresis -20 KPX edieresis comma -15 KPX edieresis period -15 KPX edieresis v -30 KPX edieresis w -20 KPX edieresis x -30 KPX edieresis y -20 KPX edieresis yacute -20 KPX edieresis ydieresis -20 KPX edotaccent comma -15 KPX edotaccent period -15 KPX edotaccent v -30 KPX edotaccent w -20 KPX edotaccent x -30 KPX edotaccent y -20 KPX edotaccent yacute -20 KPX edotaccent ydieresis -20 KPX egrave comma -15 KPX egrave period -15 KPX egrave v -30 KPX egrave w -20 KPX egrave x -30 KPX egrave y -20 KPX egrave yacute -20 KPX egrave ydieresis -20 KPX emacron comma -15 KPX emacron period -15 KPX emacron v -30 KPX emacron w -20 KPX emacron x -30 KPX emacron y -20 KPX emacron yacute -20 KPX emacron ydieresis -20 KPX eogonek comma -15 KPX eogonek period -15 KPX eogonek v -30 KPX eogonek w -20 KPX eogonek x -30 KPX eogonek y -20 KPX eogonek yacute -20 KPX eogonek ydieresis -20 KPX f a -30 KPX f aacute -30 KPX f abreve -30 KPX f acircumflex -30 KPX f adieresis -30 KPX f agrave -30 KPX f amacron -30 KPX f aogonek -30 KPX f aring -30 KPX f atilde -30 KPX f comma -30 KPX f dotlessi -28 KPX f e -30 KPX f eacute -30 KPX f ecaron -30 KPX f ecircumflex -30 KPX f edieresis -30 KPX f edotaccent -30 KPX f egrave -30 KPX f emacron -30 KPX f eogonek -30 KPX f o -30 KPX f oacute -30 KPX f ocircumflex -30 KPX f odieresis -30 KPX f ograve -30 KPX f ohungarumlaut -30 KPX f omacron -30 KPX f oslash -30 KPX f otilde -30 KPX f period -30 KPX f quotedblright 60 KPX f quoteright 50 KPX g r -10 KPX g racute -10 KPX g rcaron -10 KPX g rcommaaccent -10 KPX gbreve r -10 KPX gbreve racute -10 KPX gbreve rcaron -10 KPX gbreve rcommaaccent -10 KPX gcommaaccent r -10 KPX gcommaaccent racute -10 KPX gcommaaccent rcaron -10 KPX gcommaaccent rcommaaccent -10 KPX h y -30 KPX h yacute -30 KPX h ydieresis -30 KPX k e -20 KPX k eacute -20 KPX k ecaron -20 KPX k ecircumflex -20 KPX k edieresis -20 KPX k edotaccent -20 KPX k egrave -20 KPX k emacron -20 KPX k eogonek -20 KPX k o -20 KPX k oacute -20 KPX k ocircumflex -20 KPX k odieresis -20 KPX k ograve -20 KPX k ohungarumlaut -20 KPX k omacron -20 KPX k oslash -20 KPX k otilde -20 KPX kcommaaccent e -20 KPX kcommaaccent eacute -20 KPX kcommaaccent ecaron -20 KPX kcommaaccent ecircumflex -20 KPX kcommaaccent edieresis -20 KPX kcommaaccent edotaccent -20 KPX kcommaaccent egrave -20 KPX kcommaaccent emacron -20 KPX kcommaaccent eogonek -20 KPX kcommaaccent o -20 KPX kcommaaccent oacute -20 KPX kcommaaccent ocircumflex -20 KPX kcommaaccent odieresis -20 KPX kcommaaccent ograve -20 KPX kcommaaccent ohungarumlaut -20 KPX kcommaaccent omacron -20 KPX kcommaaccent oslash -20 KPX kcommaaccent otilde -20 KPX m u -10 KPX m uacute -10 KPX m ucircumflex -10 KPX m udieresis -10 KPX m ugrave -10 KPX m uhungarumlaut -10 KPX m umacron -10 KPX m uogonek -10 KPX m uring -10 KPX m y -15 KPX m yacute -15 KPX m ydieresis -15 KPX n u -10 KPX n uacute -10 KPX n ucircumflex -10 KPX n udieresis -10 KPX n ugrave -10 KPX n uhungarumlaut -10 KPX n umacron -10 KPX n uogonek -10 KPX n uring -10 KPX n v -20 KPX n y -15 KPX n yacute -15 KPX n ydieresis -15 KPX nacute u -10 KPX nacute uacute -10 KPX nacute ucircumflex -10 KPX nacute udieresis -10 KPX nacute ugrave -10 KPX nacute uhungarumlaut -10 KPX nacute umacron -10 KPX nacute uogonek -10 KPX nacute uring -10 KPX nacute v -20 KPX nacute y -15 KPX nacute yacute -15 KPX nacute ydieresis -15 KPX ncaron u -10 KPX ncaron uacute -10 KPX ncaron ucircumflex -10 KPX ncaron udieresis -10 KPX ncaron ugrave -10 KPX ncaron uhungarumlaut -10 KPX ncaron umacron -10 KPX ncaron uogonek -10 KPX ncaron uring -10 KPX ncaron v -20 KPX ncaron y -15 KPX ncaron yacute -15 KPX ncaron ydieresis -15 KPX ncommaaccent u -10 KPX ncommaaccent uacute -10 KPX ncommaaccent ucircumflex -10 KPX ncommaaccent udieresis -10 KPX ncommaaccent ugrave -10 KPX ncommaaccent uhungarumlaut -10 KPX ncommaaccent umacron -10 KPX ncommaaccent uogonek -10 KPX ncommaaccent uring -10 KPX ncommaaccent v -20 KPX ncommaaccent y -15 KPX ncommaaccent yacute -15 KPX ncommaaccent ydieresis -15 KPX ntilde u -10 KPX ntilde uacute -10 KPX ntilde ucircumflex -10 KPX ntilde udieresis -10 KPX ntilde ugrave -10 KPX ntilde uhungarumlaut -10 KPX ntilde umacron -10 KPX ntilde uogonek -10 KPX ntilde uring -10 KPX ntilde v -20 KPX ntilde y -15 KPX ntilde yacute -15 KPX ntilde ydieresis -15 KPX o comma -40 KPX o period -40 KPX o v -15 KPX o w -15 KPX o x -30 KPX o y -30 KPX o yacute -30 KPX o ydieresis -30 KPX oacute comma -40 KPX oacute period -40 KPX oacute v -15 KPX oacute w -15 KPX oacute x -30 KPX oacute y -30 KPX oacute yacute -30 KPX oacute ydieresis -30 KPX ocircumflex comma -40 KPX ocircumflex period -40 KPX ocircumflex v -15 KPX ocircumflex w -15 KPX ocircumflex x -30 KPX ocircumflex y -30 KPX ocircumflex yacute -30 KPX ocircumflex ydieresis -30 KPX odieresis comma -40 KPX odieresis period -40 KPX odieresis v -15 KPX odieresis w -15 KPX odieresis x -30 KPX odieresis y -30 KPX odieresis yacute -30 KPX odieresis ydieresis -30 KPX ograve comma -40 KPX ograve period -40 KPX ograve v -15 KPX ograve w -15 KPX ograve x -30 KPX ograve y -30 KPX ograve yacute -30 KPX ograve ydieresis -30 KPX ohungarumlaut comma -40 KPX ohungarumlaut period -40 KPX ohungarumlaut v -15 KPX ohungarumlaut w -15 KPX ohungarumlaut x -30 KPX ohungarumlaut y -30 KPX ohungarumlaut yacute -30 KPX ohungarumlaut ydieresis -30 KPX omacron comma -40 KPX omacron period -40 KPX omacron v -15 KPX omacron w -15 KPX omacron x -30 KPX omacron y -30 KPX omacron yacute -30 KPX omacron ydieresis -30 KPX oslash a -55 KPX oslash aacute -55 KPX oslash abreve -55 KPX oslash acircumflex -55 KPX oslash adieresis -55 KPX oslash agrave -55 KPX oslash amacron -55 KPX oslash aogonek -55 KPX oslash aring -55 KPX oslash atilde -55 KPX oslash b -55 KPX oslash c -55 KPX oslash cacute -55 KPX oslash ccaron -55 KPX oslash ccedilla -55 KPX oslash comma -95 KPX oslash d -55 KPX oslash dcroat -55 KPX oslash e -55 KPX oslash eacute -55 KPX oslash ecaron -55 KPX oslash ecircumflex -55 KPX oslash edieresis -55 KPX oslash edotaccent -55 KPX oslash egrave -55 KPX oslash emacron -55 KPX oslash eogonek -55 KPX oslash f -55 KPX oslash g -55 KPX oslash gbreve -55 KPX oslash gcommaaccent -55 KPX oslash h -55 KPX oslash i -55 KPX oslash iacute -55 KPX oslash icircumflex -55 KPX oslash idieresis -55 KPX oslash igrave -55 KPX oslash imacron -55 KPX oslash iogonek -55 KPX oslash j -55 KPX oslash k -55 KPX oslash kcommaaccent -55 KPX oslash l -55 KPX oslash lacute -55 KPX oslash lcommaaccent -55 KPX oslash lslash -55 KPX oslash m -55 KPX oslash n -55 KPX oslash nacute -55 KPX oslash ncaron -55 KPX oslash ncommaaccent -55 KPX oslash ntilde -55 KPX oslash o -55 KPX oslash oacute -55 KPX oslash ocircumflex -55 KPX oslash odieresis -55 KPX oslash ograve -55 KPX oslash ohungarumlaut -55 KPX oslash omacron -55 KPX oslash oslash -55 KPX oslash otilde -55 KPX oslash p -55 KPX oslash period -95 KPX oslash q -55 KPX oslash r -55 KPX oslash racute -55 KPX oslash rcaron -55 KPX oslash rcommaaccent -55 KPX oslash s -55 KPX oslash sacute -55 KPX oslash scaron -55 KPX oslash scedilla -55 KPX oslash scommaaccent -55 KPX oslash t -55 KPX oslash tcommaaccent -55 KPX oslash u -55 KPX oslash uacute -55 KPX oslash ucircumflex -55 KPX oslash udieresis -55 KPX oslash ugrave -55 KPX oslash uhungarumlaut -55 KPX oslash umacron -55 KPX oslash uogonek -55 KPX oslash uring -55 KPX oslash v -70 KPX oslash w -70 KPX oslash x -85 KPX oslash y -70 KPX oslash yacute -70 KPX oslash ydieresis -70 KPX oslash z -55 KPX oslash zacute -55 KPX oslash zcaron -55 KPX oslash zdotaccent -55 KPX otilde comma -40 KPX otilde period -40 KPX otilde v -15 KPX otilde w -15 KPX otilde x -30 KPX otilde y -30 KPX otilde yacute -30 KPX otilde ydieresis -30 KPX p comma -35 KPX p period -35 KPX p y -30 KPX p yacute -30 KPX p ydieresis -30 KPX period quotedblright -100 KPX period quoteright -100 KPX period space -60 KPX quotedblright space -40 KPX quoteleft quoteleft -57 KPX quoteright d -50 KPX quoteright dcroat -50 KPX quoteright quoteright -57 KPX quoteright r -50 KPX quoteright racute -50 KPX quoteright rcaron -50 KPX quoteright rcommaaccent -50 KPX quoteright s -50 KPX quoteright sacute -50 KPX quoteright scaron -50 KPX quoteright scedilla -50 KPX quoteright scommaaccent -50 KPX quoteright space -70 KPX r a -10 KPX r aacute -10 KPX r abreve -10 KPX r acircumflex -10 KPX r adieresis -10 KPX r agrave -10 KPX r amacron -10 KPX r aogonek -10 KPX r aring -10 KPX r atilde -10 KPX r colon 30 KPX r comma -50 KPX r i 15 KPX r iacute 15 KPX r icircumflex 15 KPX r idieresis 15 KPX r igrave 15 KPX r imacron 15 KPX r iogonek 15 KPX r k 15 KPX r kcommaaccent 15 KPX r l 15 KPX r lacute 15 KPX r lcommaaccent 15 KPX r lslash 15 KPX r m 25 KPX r n 25 KPX r nacute 25 KPX r ncaron 25 KPX r ncommaaccent 25 KPX r ntilde 25 KPX r p 30 KPX r period -50 KPX r semicolon 30 KPX r t 40 KPX r tcommaaccent 40 KPX r u 15 KPX r uacute 15 KPX r ucircumflex 15 KPX r udieresis 15 KPX r ugrave 15 KPX r uhungarumlaut 15 KPX r umacron 15 KPX r uogonek 15 KPX r uring 15 KPX r v 30 KPX r y 30 KPX r yacute 30 KPX r ydieresis 30 KPX racute a -10 KPX racute aacute -10 KPX racute abreve -10 KPX racute acircumflex -10 KPX racute adieresis -10 KPX racute agrave -10 KPX racute amacron -10 KPX racute aogonek -10 KPX racute aring -10 KPX racute atilde -10 KPX racute colon 30 KPX racute comma -50 KPX racute i 15 KPX racute iacute 15 KPX racute icircumflex 15 KPX racute idieresis 15 KPX racute igrave 15 KPX racute imacron 15 KPX racute iogonek 15 KPX racute k 15 KPX racute kcommaaccent 15 KPX racute l 15 KPX racute lacute 15 KPX racute lcommaaccent 15 KPX racute lslash 15 KPX racute m 25 KPX racute n 25 KPX racute nacute 25 KPX racute ncaron 25 KPX racute ncommaaccent 25 KPX racute ntilde 25 KPX racute p 30 KPX racute period -50 KPX racute semicolon 30 KPX racute t 40 KPX racute tcommaaccent 40 KPX racute u 15 KPX racute uacute 15 KPX racute ucircumflex 15 KPX racute udieresis 15 KPX racute ugrave 15 KPX racute uhungarumlaut 15 KPX racute umacron 15 KPX racute uogonek 15 KPX racute uring 15 KPX racute v 30 KPX racute y 30 KPX racute yacute 30 KPX racute ydieresis 30 KPX rcaron a -10 KPX rcaron aacute -10 KPX rcaron abreve -10 KPX rcaron acircumflex -10 KPX rcaron adieresis -10 KPX rcaron agrave -10 KPX rcaron amacron -10 KPX rcaron aogonek -10 KPX rcaron aring -10 KPX rcaron atilde -10 KPX rcaron colon 30 KPX rcaron comma -50 KPX rcaron i 15 KPX rcaron iacute 15 KPX rcaron icircumflex 15 KPX rcaron idieresis 15 KPX rcaron igrave 15 KPX rcaron imacron 15 KPX rcaron iogonek 15 KPX rcaron k 15 KPX rcaron kcommaaccent 15 KPX rcaron l 15 KPX rcaron lacute 15 KPX rcaron lcommaaccent 15 KPX rcaron lslash 15 KPX rcaron m 25 KPX rcaron n 25 KPX rcaron nacute 25 KPX rcaron ncaron 25 KPX rcaron ncommaaccent 25 KPX rcaron ntilde 25 KPX rcaron p 30 KPX rcaron period -50 KPX rcaron semicolon 30 KPX rcaron t 40 KPX rcaron tcommaaccent 40 KPX rcaron u 15 KPX rcaron uacute 15 KPX rcaron ucircumflex 15 KPX rcaron udieresis 15 KPX rcaron ugrave 15 KPX rcaron uhungarumlaut 15 KPX rcaron umacron 15 KPX rcaron uogonek 15 KPX rcaron uring 15 KPX rcaron v 30 KPX rcaron y 30 KPX rcaron yacute 30 KPX rcaron ydieresis 30 KPX rcommaaccent a -10 KPX rcommaaccent aacute -10 KPX rcommaaccent abreve -10 KPX rcommaaccent acircumflex -10 KPX rcommaaccent adieresis -10 KPX rcommaaccent agrave -10 KPX rcommaaccent amacron -10 KPX rcommaaccent aogonek -10 KPX rcommaaccent aring -10 KPX rcommaaccent atilde -10 KPX rcommaaccent colon 30 KPX rcommaaccent comma -50 KPX rcommaaccent i 15 KPX rcommaaccent iacute 15 KPX rcommaaccent icircumflex 15 KPX rcommaaccent idieresis 15 KPX rcommaaccent igrave 15 KPX rcommaaccent imacron 15 KPX rcommaaccent iogonek 15 KPX rcommaaccent k 15 KPX rcommaaccent kcommaaccent 15 KPX rcommaaccent l 15 KPX rcommaaccent lacute 15 KPX rcommaaccent lcommaaccent 15 KPX rcommaaccent lslash 15 KPX rcommaaccent m 25 KPX rcommaaccent n 25 KPX rcommaaccent nacute 25 KPX rcommaaccent ncaron 25 KPX rcommaaccent ncommaaccent 25 KPX rcommaaccent ntilde 25 KPX rcommaaccent p 30 KPX rcommaaccent period -50 KPX rcommaaccent semicolon 30 KPX rcommaaccent t 40 KPX rcommaaccent tcommaaccent 40 KPX rcommaaccent u 15 KPX rcommaaccent uacute 15 KPX rcommaaccent ucircumflex 15 KPX rcommaaccent udieresis 15 KPX rcommaaccent ugrave 15 KPX rcommaaccent uhungarumlaut 15 KPX rcommaaccent umacron 15 KPX rcommaaccent uogonek 15 KPX rcommaaccent uring 15 KPX rcommaaccent v 30 KPX rcommaaccent y 30 KPX rcommaaccent yacute 30 KPX rcommaaccent ydieresis 30 KPX s comma -15 KPX s period -15 KPX s w -30 KPX sacute comma -15 KPX sacute period -15 KPX sacute w -30 KPX scaron comma -15 KPX scaron period -15 KPX scaron w -30 KPX scedilla comma -15 KPX scedilla period -15 KPX scedilla w -30 KPX scommaaccent comma -15 KPX scommaaccent period -15 KPX scommaaccent w -30 KPX semicolon space -50 KPX space T -50 KPX space Tcaron -50 KPX space Tcommaaccent -50 KPX space V -50 KPX space W -40 KPX space Y -90 KPX space Yacute -90 KPX space Ydieresis -90 KPX space quotedblleft -30 KPX space quoteleft -60 KPX v a -25 KPX v aacute -25 KPX v abreve -25 KPX v acircumflex -25 KPX v adieresis -25 KPX v agrave -25 KPX v amacron -25 KPX v aogonek -25 KPX v aring -25 KPX v atilde -25 KPX v comma -80 KPX v e -25 KPX v eacute -25 KPX v ecaron -25 KPX v ecircumflex -25 KPX v edieresis -25 KPX v edotaccent -25 KPX v egrave -25 KPX v emacron -25 KPX v eogonek -25 KPX v o -25 KPX v oacute -25 KPX v ocircumflex -25 KPX v odieresis -25 KPX v ograve -25 KPX v ohungarumlaut -25 KPX v omacron -25 KPX v oslash -25 KPX v otilde -25 KPX v period -80 KPX w a -15 KPX w aacute -15 KPX w abreve -15 KPX w acircumflex -15 KPX w adieresis -15 KPX w agrave -15 KPX w amacron -15 KPX w aogonek -15 KPX w aring -15 KPX w atilde -15 KPX w comma -60 KPX w e -10 KPX w eacute -10 KPX w ecaron -10 KPX w ecircumflex -10 KPX w edieresis -10 KPX w edotaccent -10 KPX w egrave -10 KPX w emacron -10 KPX w eogonek -10 KPX w o -10 KPX w oacute -10 KPX w ocircumflex -10 KPX w odieresis -10 KPX w ograve -10 KPX w ohungarumlaut -10 KPX w omacron -10 KPX w oslash -10 KPX w otilde -10 KPX w period -60 KPX x e -30 KPX x eacute -30 KPX x ecaron -30 KPX x ecircumflex -30 KPX x edieresis -30 KPX x edotaccent -30 KPX x egrave -30 KPX x emacron -30 KPX x eogonek -30 KPX y a -20 KPX y aacute -20 KPX y abreve -20 KPX y acircumflex -20 KPX y adieresis -20 KPX y agrave -20 KPX y amacron -20 KPX y aogonek -20 KPX y aring -20 KPX y atilde -20 KPX y comma -100 KPX y e -20 KPX y eacute -20 KPX y ecaron -20 KPX y ecircumflex -20 KPX y edieresis -20 KPX y edotaccent -20 KPX y egrave -20 KPX y emacron -20 KPX y eogonek -20 KPX y o -20 KPX y oacute -20 KPX y ocircumflex -20 KPX y odieresis -20 KPX y ograve -20 KPX y ohungarumlaut -20 KPX y omacron -20 KPX y oslash -20 KPX y otilde -20 KPX y period -100 KPX yacute a -20 KPX yacute aacute -20 KPX yacute abreve -20 KPX yacute acircumflex -20 KPX yacute adieresis -20 KPX yacute agrave -20 KPX yacute amacron -20 KPX yacute aogonek -20 KPX yacute aring -20 KPX yacute atilde -20 KPX yacute comma -100 KPX yacute e -20 KPX yacute eacute -20 KPX yacute ecaron -20 KPX yacute ecircumflex -20 KPX yacute edieresis -20 KPX yacute edotaccent -20 KPX yacute egrave -20 KPX yacute emacron -20 KPX yacute eogonek -20 KPX yacute o -20 KPX yacute oacute -20 KPX yacute ocircumflex -20 KPX yacute odieresis -20 KPX yacute ograve -20 KPX yacute ohungarumlaut -20 KPX yacute omacron -20 KPX yacute oslash -20 KPX yacute otilde -20 KPX yacute period -100 KPX ydieresis a -20 KPX ydieresis aacute -20 KPX ydieresis abreve -20 KPX ydieresis acircumflex -20 KPX ydieresis adieresis -20 KPX ydieresis agrave -20 KPX ydieresis amacron -20 KPX ydieresis aogonek -20 KPX ydieresis aring -20 KPX ydieresis atilde -20 KPX ydieresis comma -100 KPX ydieresis e -20 KPX ydieresis eacute -20 KPX ydieresis ecaron -20 KPX ydieresis ecircumflex -20 KPX ydieresis edieresis -20 KPX ydieresis edotaccent -20 KPX ydieresis egrave -20 KPX ydieresis emacron -20 KPX ydieresis eogonek -20 KPX ydieresis o -20 KPX ydieresis oacute -20 KPX ydieresis ocircumflex -20 KPX ydieresis odieresis -20 KPX ydieresis ograve -20 KPX ydieresis ohungarumlaut -20 KPX ydieresis omacron -20 KPX ydieresis oslash -20 KPX ydieresis otilde -20 KPX ydieresis period -100 KPX z e -15 KPX z eacute -15 KPX z ecaron -15 KPX z ecircumflex -15 KPX z edieresis -15 KPX z edotaccent -15 KPX z egrave -15 KPX z emacron -15 KPX z eogonek -15 KPX z o -15 KPX z oacute -15 KPX z ocircumflex -15 KPX z odieresis -15 KPX z ograve -15 KPX z ohungarumlaut -15 KPX z omacron -15 KPX z oslash -15 KPX z otilde -15 KPX zacute e -15 KPX zacute eacute -15 KPX zacute ecaron -15 KPX zacute ecircumflex -15 KPX zacute edieresis -15 KPX zacute edotaccent -15 KPX zacute egrave -15 KPX zacute emacron -15 KPX zacute eogonek -15 KPX zacute o -15 KPX zacute oacute -15 KPX zacute ocircumflex -15 KPX zacute odieresis -15 KPX zacute ograve -15 KPX zacute ohungarumlaut -15 KPX zacute omacron -15 KPX zacute oslash -15 KPX zacute otilde -15 KPX zcaron e -15 KPX zcaron eacute -15 KPX zcaron ecaron -15 KPX zcaron ecircumflex -15 KPX zcaron edieresis -15 KPX zcaron edotaccent -15 KPX zcaron egrave -15 KPX zcaron emacron -15 KPX zcaron eogonek -15 KPX zcaron o -15 KPX zcaron oacute -15 KPX zcaron ocircumflex -15 KPX zcaron odieresis -15 KPX zcaron ograve -15 KPX zcaron ohungarumlaut -15 KPX zcaron omacron -15 KPX zcaron oslash -15 KPX zcaron otilde -15 KPX zdotaccent e -15 KPX zdotaccent eacute -15 KPX zdotaccent ecaron -15 KPX zdotaccent ecircumflex -15 KPX zdotaccent edieresis -15 KPX zdotaccent edotaccent -15 KPX zdotaccent egrave -15 KPX zdotaccent emacron -15 KPX zdotaccent eogonek -15 KPX zdotaccent o -15 KPX zdotaccent oacute -15 KPX zdotaccent ocircumflex -15 KPX zdotaccent odieresis -15 KPX zdotaccent ograve -15 KPX zdotaccent ohungarumlaut -15 KPX zdotaccent omacron -15 KPX zdotaccent oslash -15 KPX zdotaccent otilde -15 EndKernPairs EndKernData EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/pdfcorefonts/Symbol.afm ================================================ StartFontMetrics 4.1 Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All rights reserved. Comment Creation Date: Thu May 1 15:12:25 1997 Comment UniqueID 43064 Comment VMusage 30820 39997 FontName Symbol FullName Symbol FamilyName Symbol Weight Medium ItalicAngle 0 IsFixedPitch false CharacterSet Special FontBBox -180 -293 1090 1010 UnderlinePosition -100 UnderlineThickness 50 Version 001.008 Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All rights reserved. EncodingScheme FontSpecific StdHW 92 StdVW 85 StartCharMetrics 190 C 32 ; WX 250 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 128 -17 240 672 ; C 34 ; WX 713 ; N universal ; B 31 0 681 705 ; C 35 ; WX 500 ; N numbersign ; B 20 -16 481 673 ; C 36 ; WX 549 ; N existential ; B 25 0 478 707 ; C 37 ; WX 833 ; N percent ; B 63 -36 771 655 ; C 38 ; WX 778 ; N ampersand ; B 41 -18 750 661 ; C 39 ; WX 439 ; N suchthat ; B 48 -17 414 500 ; C 40 ; WX 333 ; N parenleft ; B 53 -191 300 673 ; C 41 ; WX 333 ; N parenright ; B 30 -191 277 673 ; C 42 ; WX 500 ; N asteriskmath ; B 65 134 427 551 ; C 43 ; WX 549 ; N plus ; B 10 0 539 533 ; C 44 ; WX 250 ; N comma ; B 56 -152 194 104 ; C 45 ; WX 549 ; N minus ; B 11 233 535 288 ; C 46 ; WX 250 ; N period ; B 69 -17 181 95 ; C 47 ; WX 278 ; N slash ; B 0 -18 254 646 ; C 48 ; WX 500 ; N zero ; B 24 -14 476 685 ; C 49 ; WX 500 ; N one ; B 117 0 390 673 ; C 50 ; WX 500 ; N two ; B 25 0 475 685 ; C 51 ; WX 500 ; N three ; B 43 -14 435 685 ; C 52 ; WX 500 ; N four ; B 15 0 469 685 ; C 53 ; WX 500 ; N five ; B 32 -14 445 690 ; C 54 ; WX 500 ; N six ; B 34 -14 468 685 ; C 55 ; WX 500 ; N seven ; B 24 -16 448 673 ; C 56 ; WX 500 ; N eight ; B 56 -14 445 685 ; C 57 ; WX 500 ; N nine ; B 30 -18 459 685 ; C 58 ; WX 278 ; N colon ; B 81 -17 193 460 ; C 59 ; WX 278 ; N semicolon ; B 83 -152 221 460 ; C 60 ; WX 549 ; N less ; B 26 0 523 522 ; C 61 ; WX 549 ; N equal ; B 11 141 537 390 ; C 62 ; WX 549 ; N greater ; B 26 0 523 522 ; C 63 ; WX 444 ; N question ; B 70 -17 412 686 ; C 64 ; WX 549 ; N congruent ; B 11 0 537 475 ; C 65 ; WX 722 ; N Alpha ; B 4 0 684 673 ; C 66 ; WX 667 ; N Beta ; B 29 0 592 673 ; C 67 ; WX 722 ; N Chi ; B -9 0 704 673 ; C 68 ; WX 612 ; N Delta ; B 6 0 608 688 ; C 69 ; WX 611 ; N Epsilon ; B 32 0 617 673 ; C 70 ; WX 763 ; N Phi ; B 26 0 741 673 ; C 71 ; WX 603 ; N Gamma ; B 24 0 609 673 ; C 72 ; WX 722 ; N Eta ; B 39 0 729 673 ; C 73 ; WX 333 ; N Iota ; B 32 0 316 673 ; C 74 ; WX 631 ; N theta1 ; B 18 -18 623 689 ; C 75 ; WX 722 ; N Kappa ; B 35 0 722 673 ; C 76 ; WX 686 ; N Lambda ; B 6 0 680 688 ; C 77 ; WX 889 ; N Mu ; B 28 0 887 673 ; C 78 ; WX 722 ; N Nu ; B 29 -8 720 673 ; C 79 ; WX 722 ; N Omicron ; B 41 -17 715 685 ; C 80 ; WX 768 ; N Pi ; B 25 0 745 673 ; C 81 ; WX 741 ; N Theta ; B 41 -17 715 685 ; C 82 ; WX 556 ; N Rho ; B 28 0 563 673 ; C 83 ; WX 592 ; N Sigma ; B 5 0 589 673 ; C 84 ; WX 611 ; N Tau ; B 33 0 607 673 ; C 85 ; WX 690 ; N Upsilon ; B -8 0 694 673 ; C 86 ; WX 439 ; N sigma1 ; B 40 -233 436 500 ; C 87 ; WX 768 ; N Omega ; B 34 0 736 688 ; C 88 ; WX 645 ; N Xi ; B 40 0 599 673 ; C 89 ; WX 795 ; N Psi ; B 15 0 781 684 ; C 90 ; WX 611 ; N Zeta ; B 44 0 636 673 ; C 91 ; WX 333 ; N bracketleft ; B 86 -155 299 674 ; C 92 ; WX 863 ; N therefore ; B 163 0 701 487 ; C 93 ; WX 333 ; N bracketright ; B 33 -155 246 674 ; C 94 ; WX 658 ; N perpendicular ; B 15 0 652 674 ; C 95 ; WX 500 ; N underscore ; B -2 -125 502 -75 ; C 96 ; WX 500 ; N radicalex ; B 480 881 1090 917 ; C 97 ; WX 631 ; N alpha ; B 41 -18 622 500 ; C 98 ; WX 549 ; N beta ; B 61 -223 515 741 ; C 99 ; WX 549 ; N chi ; B 12 -231 522 499 ; C 100 ; WX 494 ; N delta ; B 40 -19 481 740 ; C 101 ; WX 439 ; N epsilon ; B 22 -19 427 502 ; C 102 ; WX 521 ; N phi ; B 28 -224 492 673 ; C 103 ; WX 411 ; N gamma ; B 5 -225 484 499 ; C 104 ; WX 603 ; N eta ; B 0 -202 527 514 ; C 105 ; WX 329 ; N iota ; B 0 -17 301 503 ; C 106 ; WX 603 ; N phi1 ; B 36 -224 587 499 ; C 107 ; WX 549 ; N kappa ; B 33 0 558 501 ; C 108 ; WX 549 ; N lambda ; B 24 -17 548 739 ; C 109 ; WX 576 ; N mu ; B 33 -223 567 500 ; C 110 ; WX 521 ; N nu ; B -9 -16 475 507 ; C 111 ; WX 549 ; N omicron ; B 35 -19 501 499 ; C 112 ; WX 549 ; N pi ; B 10 -19 530 487 ; C 113 ; WX 521 ; N theta ; B 43 -17 485 690 ; C 114 ; WX 549 ; N rho ; B 50 -230 490 499 ; C 115 ; WX 603 ; N sigma ; B 30 -21 588 500 ; C 116 ; WX 439 ; N tau ; B 10 -19 418 500 ; C 117 ; WX 576 ; N upsilon ; B 7 -18 535 507 ; C 118 ; WX 713 ; N omega1 ; B 12 -18 671 583 ; C 119 ; WX 686 ; N omega ; B 42 -17 684 500 ; C 120 ; WX 493 ; N xi ; B 27 -224 469 766 ; C 121 ; WX 686 ; N psi ; B 12 -228 701 500 ; C 122 ; WX 494 ; N zeta ; B 60 -225 467 756 ; C 123 ; WX 480 ; N braceleft ; B 58 -183 397 673 ; C 124 ; WX 200 ; N bar ; B 65 -293 135 707 ; C 125 ; WX 480 ; N braceright ; B 79 -183 418 673 ; C 126 ; WX 549 ; N similar ; B 17 203 529 307 ; C 160 ; WX 750 ; N Euro ; B 20 -12 714 685 ; C 161 ; WX 620 ; N Upsilon1 ; B -2 0 610 685 ; C 162 ; WX 247 ; N minute ; B 27 459 228 735 ; C 163 ; WX 549 ; N lessequal ; B 29 0 526 639 ; C 164 ; WX 167 ; N fraction ; B -180 -12 340 677 ; C 165 ; WX 713 ; N infinity ; B 26 124 688 404 ; C 166 ; WX 500 ; N florin ; B 2 -193 494 686 ; C 167 ; WX 753 ; N club ; B 86 -26 660 533 ; C 168 ; WX 753 ; N diamond ; B 142 -36 600 550 ; C 169 ; WX 753 ; N heart ; B 117 -33 631 532 ; C 170 ; WX 753 ; N spade ; B 113 -36 629 548 ; C 171 ; WX 1042 ; N arrowboth ; B 24 -15 1024 511 ; C 172 ; WX 987 ; N arrowleft ; B 32 -15 942 511 ; C 173 ; WX 603 ; N arrowup ; B 45 0 571 910 ; C 174 ; WX 987 ; N arrowright ; B 49 -15 959 511 ; C 175 ; WX 603 ; N arrowdown ; B 45 -22 571 888 ; C 176 ; WX 400 ; N degree ; B 50 385 350 685 ; C 177 ; WX 549 ; N plusminus ; B 10 0 539 645 ; C 178 ; WX 411 ; N second ; B 20 459 413 737 ; C 179 ; WX 549 ; N greaterequal ; B 29 0 526 639 ; C 180 ; WX 549 ; N multiply ; B 17 8 533 524 ; C 181 ; WX 713 ; N proportional ; B 27 123 639 404 ; C 182 ; WX 494 ; N partialdiff ; B 26 -20 462 746 ; C 183 ; WX 460 ; N bullet ; B 50 113 410 473 ; C 184 ; WX 549 ; N divide ; B 10 71 536 456 ; C 185 ; WX 549 ; N notequal ; B 15 -25 540 549 ; C 186 ; WX 549 ; N equivalence ; B 14 82 538 443 ; C 187 ; WX 549 ; N approxequal ; B 14 135 527 394 ; C 188 ; WX 1000 ; N ellipsis ; B 111 -17 889 95 ; C 189 ; WX 603 ; N arrowvertex ; B 280 -120 336 1010 ; C 190 ; WX 1000 ; N arrowhorizex ; B -60 220 1050 276 ; C 191 ; WX 658 ; N carriagereturn ; B 15 -16 602 629 ; C 192 ; WX 823 ; N aleph ; B 175 -18 661 658 ; C 193 ; WX 686 ; N Ifraktur ; B 10 -53 578 740 ; C 194 ; WX 795 ; N Rfraktur ; B 26 -15 759 734 ; C 195 ; WX 987 ; N weierstrass ; B 159 -211 870 573 ; C 196 ; WX 768 ; N circlemultiply ; B 43 -17 733 673 ; C 197 ; WX 768 ; N circleplus ; B 43 -15 733 675 ; C 198 ; WX 823 ; N emptyset ; B 39 -24 781 719 ; C 199 ; WX 768 ; N intersection ; B 40 0 732 509 ; C 200 ; WX 768 ; N union ; B 40 -17 732 492 ; C 201 ; WX 713 ; N propersuperset ; B 20 0 673 470 ; C 202 ; WX 713 ; N reflexsuperset ; B 20 -125 673 470 ; C 203 ; WX 713 ; N notsubset ; B 36 -70 690 540 ; C 204 ; WX 713 ; N propersubset ; B 37 0 690 470 ; C 205 ; WX 713 ; N reflexsubset ; B 37 -125 690 470 ; C 206 ; WX 713 ; N element ; B 45 0 505 468 ; C 207 ; WX 713 ; N notelement ; B 45 -58 505 555 ; C 208 ; WX 768 ; N angle ; B 26 0 738 673 ; C 209 ; WX 713 ; N gradient ; B 36 -19 681 718 ; C 210 ; WX 790 ; N registerserif ; B 50 -17 740 673 ; C 211 ; WX 790 ; N copyrightserif ; B 51 -15 741 675 ; C 212 ; WX 890 ; N trademarkserif ; B 18 293 855 673 ; C 213 ; WX 823 ; N product ; B 25 -101 803 751 ; C 214 ; WX 549 ; N radical ; B 10 -38 515 917 ; C 215 ; WX 250 ; N dotmath ; B 69 210 169 310 ; C 216 ; WX 713 ; N logicalnot ; B 15 0 680 288 ; C 217 ; WX 603 ; N logicaland ; B 23 0 583 454 ; C 218 ; WX 603 ; N logicalor ; B 30 0 578 477 ; C 219 ; WX 1042 ; N arrowdblboth ; B 27 -20 1023 510 ; C 220 ; WX 987 ; N arrowdblleft ; B 30 -15 939 513 ; C 221 ; WX 603 ; N arrowdblup ; B 39 2 567 911 ; C 222 ; WX 987 ; N arrowdblright ; B 45 -20 954 508 ; C 223 ; WX 603 ; N arrowdbldown ; B 44 -19 572 890 ; C 224 ; WX 494 ; N lozenge ; B 18 0 466 745 ; C 225 ; WX 329 ; N angleleft ; B 25 -198 306 746 ; C 226 ; WX 790 ; N registersans ; B 50 -20 740 670 ; C 227 ; WX 790 ; N copyrightsans ; B 49 -15 739 675 ; C 228 ; WX 786 ; N trademarksans ; B 5 293 725 673 ; C 229 ; WX 713 ; N summation ; B 14 -108 695 752 ; C 230 ; WX 384 ; N parenlefttp ; B 24 -293 436 926 ; C 231 ; WX 384 ; N parenleftex ; B 24 -85 108 925 ; C 232 ; WX 384 ; N parenleftbt ; B 24 -293 436 926 ; C 233 ; WX 384 ; N bracketlefttp ; B 0 -80 349 926 ; C 234 ; WX 384 ; N bracketleftex ; B 0 -79 77 925 ; C 235 ; WX 384 ; N bracketleftbt ; B 0 -80 349 926 ; C 236 ; WX 494 ; N bracelefttp ; B 209 -85 445 925 ; C 237 ; WX 494 ; N braceleftmid ; B 20 -85 284 935 ; C 238 ; WX 494 ; N braceleftbt ; B 209 -75 445 935 ; C 239 ; WX 494 ; N braceex ; B 209 -85 284 935 ; C 241 ; WX 329 ; N angleright ; B 21 -198 302 746 ; C 242 ; WX 274 ; N integral ; B 2 -107 291 916 ; C 243 ; WX 686 ; N integraltp ; B 308 -88 675 920 ; C 244 ; WX 686 ; N integralex ; B 308 -88 378 975 ; C 245 ; WX 686 ; N integralbt ; B 11 -87 378 921 ; C 246 ; WX 384 ; N parenrighttp ; B 54 -293 466 926 ; C 247 ; WX 384 ; N parenrightex ; B 382 -85 466 925 ; C 248 ; WX 384 ; N parenrightbt ; B 54 -293 466 926 ; C 249 ; WX 384 ; N bracketrighttp ; B 22 -80 371 926 ; C 250 ; WX 384 ; N bracketrightex ; B 294 -79 371 925 ; C 251 ; WX 384 ; N bracketrightbt ; B 22 -80 371 926 ; C 252 ; WX 494 ; N bracerighttp ; B 48 -85 284 925 ; C 253 ; WX 494 ; N bracerightmid ; B 209 -85 473 935 ; C 254 ; WX 494 ; N bracerightbt ; B 48 -75 284 935 ; C -1 ; WX 790 ; N apple ; B 56 -3 733 808 ; EndCharMetrics EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/pdfcorefonts/Times-Bold.afm ================================================ StartFontMetrics 4.1 Comment Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Thu May 1 12:52:56 1997 Comment UniqueID 43065 Comment VMusage 41636 52661 FontName Times-Bold FullName Times Bold FamilyName Times Weight Bold ItalicAngle 0 IsFixedPitch false CharacterSet ExtendedRoman FontBBox -168 -218 1000 935 UnderlinePosition -100 UnderlineThickness 50 Version 002.000 Notice Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype-Hell AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 676 XHeight 461 Ascender 683 Descender -217 StdHW 44 StdVW 139 StartCharMetrics 315 C 32 ; WX 250 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 81 -13 251 691 ; C 34 ; WX 555 ; N quotedbl ; B 83 404 472 691 ; C 35 ; WX 500 ; N numbersign ; B 4 0 496 700 ; C 36 ; WX 500 ; N dollar ; B 29 -99 472 750 ; C 37 ; WX 1000 ; N percent ; B 124 -14 877 692 ; C 38 ; WX 833 ; N ampersand ; B 62 -16 787 691 ; C 39 ; WX 333 ; N quoteright ; B 79 356 263 691 ; C 40 ; WX 333 ; N parenleft ; B 46 -168 306 694 ; C 41 ; WX 333 ; N parenright ; B 27 -168 287 694 ; C 42 ; WX 500 ; N asterisk ; B 56 255 447 691 ; C 43 ; WX 570 ; N plus ; B 33 0 537 506 ; C 44 ; WX 250 ; N comma ; B 39 -180 223 155 ; C 45 ; WX 333 ; N hyphen ; B 44 171 287 287 ; C 46 ; WX 250 ; N period ; B 41 -13 210 156 ; C 47 ; WX 278 ; N slash ; B -24 -19 302 691 ; C 48 ; WX 500 ; N zero ; B 24 -13 476 688 ; C 49 ; WX 500 ; N one ; B 65 0 442 688 ; C 50 ; WX 500 ; N two ; B 17 0 478 688 ; C 51 ; WX 500 ; N three ; B 16 -14 468 688 ; C 52 ; WX 500 ; N four ; B 19 0 475 688 ; C 53 ; WX 500 ; N five ; B 22 -8 470 676 ; C 54 ; WX 500 ; N six ; B 28 -13 475 688 ; C 55 ; WX 500 ; N seven ; B 17 0 477 676 ; C 56 ; WX 500 ; N eight ; B 28 -13 472 688 ; C 57 ; WX 500 ; N nine ; B 26 -13 473 688 ; C 58 ; WX 333 ; N colon ; B 82 -13 251 472 ; C 59 ; WX 333 ; N semicolon ; B 82 -180 266 472 ; C 60 ; WX 570 ; N less ; B 31 -8 539 514 ; C 61 ; WX 570 ; N equal ; B 33 107 537 399 ; C 62 ; WX 570 ; N greater ; B 31 -8 539 514 ; C 63 ; WX 500 ; N question ; B 57 -13 445 689 ; C 64 ; WX 930 ; N at ; B 108 -19 822 691 ; C 65 ; WX 722 ; N A ; B 9 0 689 690 ; C 66 ; WX 667 ; N B ; B 16 0 619 676 ; C 67 ; WX 722 ; N C ; B 49 -19 687 691 ; C 68 ; WX 722 ; N D ; B 14 0 690 676 ; C 69 ; WX 667 ; N E ; B 16 0 641 676 ; C 70 ; WX 611 ; N F ; B 16 0 583 676 ; C 71 ; WX 778 ; N G ; B 37 -19 755 691 ; C 72 ; WX 778 ; N H ; B 21 0 759 676 ; C 73 ; WX 389 ; N I ; B 20 0 370 676 ; C 74 ; WX 500 ; N J ; B 3 -96 479 676 ; C 75 ; WX 778 ; N K ; B 30 0 769 676 ; C 76 ; WX 667 ; N L ; B 19 0 638 676 ; C 77 ; WX 944 ; N M ; B 14 0 921 676 ; C 78 ; WX 722 ; N N ; B 16 -18 701 676 ; C 79 ; WX 778 ; N O ; B 35 -19 743 691 ; C 80 ; WX 611 ; N P ; B 16 0 600 676 ; C 81 ; WX 778 ; N Q ; B 35 -176 743 691 ; C 82 ; WX 722 ; N R ; B 26 0 715 676 ; C 83 ; WX 556 ; N S ; B 35 -19 513 692 ; C 84 ; WX 667 ; N T ; B 31 0 636 676 ; C 85 ; WX 722 ; N U ; B 16 -19 701 676 ; C 86 ; WX 722 ; N V ; B 16 -18 701 676 ; C 87 ; WX 1000 ; N W ; B 19 -15 981 676 ; C 88 ; WX 722 ; N X ; B 16 0 699 676 ; C 89 ; WX 722 ; N Y ; B 15 0 699 676 ; C 90 ; WX 667 ; N Z ; B 28 0 634 676 ; C 91 ; WX 333 ; N bracketleft ; B 67 -149 301 678 ; C 92 ; WX 278 ; N backslash ; B -25 -19 303 691 ; C 93 ; WX 333 ; N bracketright ; B 32 -149 266 678 ; C 94 ; WX 581 ; N asciicircum ; B 73 311 509 676 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 333 ; N quoteleft ; B 70 356 254 691 ; C 97 ; WX 500 ; N a ; B 25 -14 488 473 ; C 98 ; WX 556 ; N b ; B 17 -14 521 676 ; C 99 ; WX 444 ; N c ; B 25 -14 430 473 ; C 100 ; WX 556 ; N d ; B 25 -14 534 676 ; C 101 ; WX 444 ; N e ; B 25 -14 426 473 ; C 102 ; WX 333 ; N f ; B 14 0 389 691 ; L i fi ; L l fl ; C 103 ; WX 500 ; N g ; B 28 -206 483 473 ; C 104 ; WX 556 ; N h ; B 16 0 534 676 ; C 105 ; WX 278 ; N i ; B 16 0 255 691 ; C 106 ; WX 333 ; N j ; B -57 -203 263 691 ; C 107 ; WX 556 ; N k ; B 22 0 543 676 ; C 108 ; WX 278 ; N l ; B 16 0 255 676 ; C 109 ; WX 833 ; N m ; B 16 0 814 473 ; C 110 ; WX 556 ; N n ; B 21 0 539 473 ; C 111 ; WX 500 ; N o ; B 25 -14 476 473 ; C 112 ; WX 556 ; N p ; B 19 -205 524 473 ; C 113 ; WX 556 ; N q ; B 34 -205 536 473 ; C 114 ; WX 444 ; N r ; B 29 0 434 473 ; C 115 ; WX 389 ; N s ; B 25 -14 361 473 ; C 116 ; WX 333 ; N t ; B 20 -12 332 630 ; C 117 ; WX 556 ; N u ; B 16 -14 537 461 ; C 118 ; WX 500 ; N v ; B 21 -14 485 461 ; C 119 ; WX 722 ; N w ; B 23 -14 707 461 ; C 120 ; WX 500 ; N x ; B 12 0 484 461 ; C 121 ; WX 500 ; N y ; B 16 -205 480 461 ; C 122 ; WX 444 ; N z ; B 21 0 420 461 ; C 123 ; WX 394 ; N braceleft ; B 22 -175 340 698 ; C 124 ; WX 220 ; N bar ; B 66 -218 154 782 ; C 125 ; WX 394 ; N braceright ; B 54 -175 372 698 ; C 126 ; WX 520 ; N asciitilde ; B 29 173 491 333 ; C 161 ; WX 333 ; N exclamdown ; B 82 -203 252 501 ; C 162 ; WX 500 ; N cent ; B 53 -140 458 588 ; C 163 ; WX 500 ; N sterling ; B 21 -14 477 684 ; C 164 ; WX 167 ; N fraction ; B -168 -12 329 688 ; C 165 ; WX 500 ; N yen ; B -64 0 547 676 ; C 166 ; WX 500 ; N florin ; B 0 -155 498 706 ; C 167 ; WX 500 ; N section ; B 57 -132 443 691 ; C 168 ; WX 500 ; N currency ; B -26 61 526 613 ; C 169 ; WX 278 ; N quotesingle ; B 75 404 204 691 ; C 170 ; WX 500 ; N quotedblleft ; B 32 356 486 691 ; C 171 ; WX 500 ; N guillemotleft ; B 23 36 473 415 ; C 172 ; WX 333 ; N guilsinglleft ; B 51 36 305 415 ; C 173 ; WX 333 ; N guilsinglright ; B 28 36 282 415 ; C 174 ; WX 556 ; N fi ; B 14 0 536 691 ; C 175 ; WX 556 ; N fl ; B 14 0 536 691 ; C 177 ; WX 500 ; N endash ; B 0 181 500 271 ; C 178 ; WX 500 ; N dagger ; B 47 -134 453 691 ; C 179 ; WX 500 ; N daggerdbl ; B 45 -132 456 691 ; C 180 ; WX 250 ; N periodcentered ; B 41 248 210 417 ; C 182 ; WX 540 ; N paragraph ; B 0 -186 519 676 ; C 183 ; WX 350 ; N bullet ; B 35 198 315 478 ; C 184 ; WX 333 ; N quotesinglbase ; B 79 -180 263 155 ; C 185 ; WX 500 ; N quotedblbase ; B 14 -180 468 155 ; C 186 ; WX 500 ; N quotedblright ; B 14 356 468 691 ; C 187 ; WX 500 ; N guillemotright ; B 27 36 477 415 ; C 188 ; WX 1000 ; N ellipsis ; B 82 -13 917 156 ; C 189 ; WX 1000 ; N perthousand ; B 7 -29 995 706 ; C 191 ; WX 500 ; N questiondown ; B 55 -201 443 501 ; C 193 ; WX 333 ; N grave ; B 8 528 246 713 ; C 194 ; WX 333 ; N acute ; B 86 528 324 713 ; C 195 ; WX 333 ; N circumflex ; B -2 528 335 704 ; C 196 ; WX 333 ; N tilde ; B -16 547 349 674 ; C 197 ; WX 333 ; N macron ; B 1 565 331 637 ; C 198 ; WX 333 ; N breve ; B 15 528 318 691 ; C 199 ; WX 333 ; N dotaccent ; B 103 536 258 691 ; C 200 ; WX 333 ; N dieresis ; B -2 537 335 667 ; C 202 ; WX 333 ; N ring ; B 60 527 273 740 ; C 203 ; WX 333 ; N cedilla ; B 68 -218 294 0 ; C 205 ; WX 333 ; N hungarumlaut ; B -13 528 425 713 ; C 206 ; WX 333 ; N ogonek ; B 90 -193 319 24 ; C 207 ; WX 333 ; N caron ; B -2 528 335 704 ; C 208 ; WX 1000 ; N emdash ; B 0 181 1000 271 ; C 225 ; WX 1000 ; N AE ; B 4 0 951 676 ; C 227 ; WX 300 ; N ordfeminine ; B -1 397 301 688 ; C 232 ; WX 667 ; N Lslash ; B 19 0 638 676 ; C 233 ; WX 778 ; N Oslash ; B 35 -74 743 737 ; C 234 ; WX 1000 ; N OE ; B 22 -5 981 684 ; C 235 ; WX 330 ; N ordmasculine ; B 18 397 312 688 ; C 241 ; WX 722 ; N ae ; B 33 -14 693 473 ; C 245 ; WX 278 ; N dotlessi ; B 16 0 255 461 ; C 248 ; WX 278 ; N lslash ; B -22 0 303 676 ; C 249 ; WX 500 ; N oslash ; B 25 -92 476 549 ; C 250 ; WX 722 ; N oe ; B 22 -14 696 473 ; C 251 ; WX 556 ; N germandbls ; B 19 -12 517 691 ; C -1 ; WX 389 ; N Idieresis ; B 20 0 370 877 ; C -1 ; WX 444 ; N eacute ; B 25 -14 426 713 ; C -1 ; WX 500 ; N abreve ; B 25 -14 488 691 ; C -1 ; WX 556 ; N uhungarumlaut ; B 16 -14 557 713 ; C -1 ; WX 444 ; N ecaron ; B 25 -14 426 704 ; C -1 ; WX 722 ; N Ydieresis ; B 15 0 699 877 ; C -1 ; WX 570 ; N divide ; B 33 -31 537 537 ; C -1 ; WX 722 ; N Yacute ; B 15 0 699 923 ; C -1 ; WX 722 ; N Acircumflex ; B 9 0 689 914 ; C -1 ; WX 500 ; N aacute ; B 25 -14 488 713 ; C -1 ; WX 722 ; N Ucircumflex ; B 16 -19 701 914 ; C -1 ; WX 500 ; N yacute ; B 16 -205 480 713 ; C -1 ; WX 389 ; N scommaaccent ; B 25 -218 361 473 ; C -1 ; WX 444 ; N ecircumflex ; B 25 -14 426 704 ; C -1 ; WX 722 ; N Uring ; B 16 -19 701 935 ; C -1 ; WX 722 ; N Udieresis ; B 16 -19 701 877 ; C -1 ; WX 500 ; N aogonek ; B 25 -193 504 473 ; C -1 ; WX 722 ; N Uacute ; B 16 -19 701 923 ; C -1 ; WX 556 ; N uogonek ; B 16 -193 539 461 ; C -1 ; WX 667 ; N Edieresis ; B 16 0 641 877 ; C -1 ; WX 722 ; N Dcroat ; B 6 0 690 676 ; C -1 ; WX 250 ; N commaaccent ; B 47 -218 203 -50 ; C -1 ; WX 747 ; N copyright ; B 26 -19 721 691 ; C -1 ; WX 667 ; N Emacron ; B 16 0 641 847 ; C -1 ; WX 444 ; N ccaron ; B 25 -14 430 704 ; C -1 ; WX 500 ; N aring ; B 25 -14 488 740 ; C -1 ; WX 722 ; N Ncommaaccent ; B 16 -188 701 676 ; C -1 ; WX 278 ; N lacute ; B 16 0 297 923 ; C -1 ; WX 500 ; N agrave ; B 25 -14 488 713 ; C -1 ; WX 667 ; N Tcommaaccent ; B 31 -218 636 676 ; C -1 ; WX 722 ; N Cacute ; B 49 -19 687 923 ; C -1 ; WX 500 ; N atilde ; B 25 -14 488 674 ; C -1 ; WX 667 ; N Edotaccent ; B 16 0 641 901 ; C -1 ; WX 389 ; N scaron ; B 25 -14 363 704 ; C -1 ; WX 389 ; N scedilla ; B 25 -218 361 473 ; C -1 ; WX 278 ; N iacute ; B 16 0 289 713 ; C -1 ; WX 494 ; N lozenge ; B 10 0 484 745 ; C -1 ; WX 722 ; N Rcaron ; B 26 0 715 914 ; C -1 ; WX 778 ; N Gcommaaccent ; B 37 -218 755 691 ; C -1 ; WX 556 ; N ucircumflex ; B 16 -14 537 704 ; C -1 ; WX 500 ; N acircumflex ; B 25 -14 488 704 ; C -1 ; WX 722 ; N Amacron ; B 9 0 689 847 ; C -1 ; WX 444 ; N rcaron ; B 29 0 434 704 ; C -1 ; WX 444 ; N ccedilla ; B 25 -218 430 473 ; C -1 ; WX 667 ; N Zdotaccent ; B 28 0 634 901 ; C -1 ; WX 611 ; N Thorn ; B 16 0 600 676 ; C -1 ; WX 778 ; N Omacron ; B 35 -19 743 847 ; C -1 ; WX 722 ; N Racute ; B 26 0 715 923 ; C -1 ; WX 556 ; N Sacute ; B 35 -19 513 923 ; C -1 ; WX 672 ; N dcaron ; B 25 -14 681 682 ; C -1 ; WX 722 ; N Umacron ; B 16 -19 701 847 ; C -1 ; WX 556 ; N uring ; B 16 -14 537 740 ; C -1 ; WX 300 ; N threesuperior ; B 3 268 297 688 ; C -1 ; WX 778 ; N Ograve ; B 35 -19 743 923 ; C -1 ; WX 722 ; N Agrave ; B 9 0 689 923 ; C -1 ; WX 722 ; N Abreve ; B 9 0 689 901 ; C -1 ; WX 570 ; N multiply ; B 48 16 522 490 ; C -1 ; WX 556 ; N uacute ; B 16 -14 537 713 ; C -1 ; WX 667 ; N Tcaron ; B 31 0 636 914 ; C -1 ; WX 494 ; N partialdiff ; B 11 -21 494 750 ; C -1 ; WX 500 ; N ydieresis ; B 16 -205 480 667 ; C -1 ; WX 722 ; N Nacute ; B 16 -18 701 923 ; C -1 ; WX 278 ; N icircumflex ; B -37 0 300 704 ; C -1 ; WX 667 ; N Ecircumflex ; B 16 0 641 914 ; C -1 ; WX 500 ; N adieresis ; B 25 -14 488 667 ; C -1 ; WX 444 ; N edieresis ; B 25 -14 426 667 ; C -1 ; WX 444 ; N cacute ; B 25 -14 430 713 ; C -1 ; WX 556 ; N nacute ; B 21 0 539 713 ; C -1 ; WX 556 ; N umacron ; B 16 -14 537 637 ; C -1 ; WX 722 ; N Ncaron ; B 16 -18 701 914 ; C -1 ; WX 389 ; N Iacute ; B 20 0 370 923 ; C -1 ; WX 570 ; N plusminus ; B 33 0 537 506 ; C -1 ; WX 220 ; N brokenbar ; B 66 -143 154 707 ; C -1 ; WX 747 ; N registered ; B 26 -19 721 691 ; C -1 ; WX 778 ; N Gbreve ; B 37 -19 755 901 ; C -1 ; WX 389 ; N Idotaccent ; B 20 0 370 901 ; C -1 ; WX 600 ; N summation ; B 14 -10 585 706 ; C -1 ; WX 667 ; N Egrave ; B 16 0 641 923 ; C -1 ; WX 444 ; N racute ; B 29 0 434 713 ; C -1 ; WX 500 ; N omacron ; B 25 -14 476 637 ; C -1 ; WX 667 ; N Zacute ; B 28 0 634 923 ; C -1 ; WX 667 ; N Zcaron ; B 28 0 634 914 ; C -1 ; WX 549 ; N greaterequal ; B 26 0 523 704 ; C -1 ; WX 722 ; N Eth ; B 6 0 690 676 ; C -1 ; WX 722 ; N Ccedilla ; B 49 -218 687 691 ; C -1 ; WX 278 ; N lcommaaccent ; B 16 -218 255 676 ; C -1 ; WX 416 ; N tcaron ; B 20 -12 425 815 ; C -1 ; WX 444 ; N eogonek ; B 25 -193 426 473 ; C -1 ; WX 722 ; N Uogonek ; B 16 -193 701 676 ; C -1 ; WX 722 ; N Aacute ; B 9 0 689 923 ; C -1 ; WX 722 ; N Adieresis ; B 9 0 689 877 ; C -1 ; WX 444 ; N egrave ; B 25 -14 426 713 ; C -1 ; WX 444 ; N zacute ; B 21 0 420 713 ; C -1 ; WX 278 ; N iogonek ; B 16 -193 274 691 ; C -1 ; WX 778 ; N Oacute ; B 35 -19 743 923 ; C -1 ; WX 500 ; N oacute ; B 25 -14 476 713 ; C -1 ; WX 500 ; N amacron ; B 25 -14 488 637 ; C -1 ; WX 389 ; N sacute ; B 25 -14 361 713 ; C -1 ; WX 278 ; N idieresis ; B -37 0 300 667 ; C -1 ; WX 778 ; N Ocircumflex ; B 35 -19 743 914 ; C -1 ; WX 722 ; N Ugrave ; B 16 -19 701 923 ; C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; C -1 ; WX 556 ; N thorn ; B 19 -205 524 676 ; C -1 ; WX 300 ; N twosuperior ; B 0 275 300 688 ; C -1 ; WX 778 ; N Odieresis ; B 35 -19 743 877 ; C -1 ; WX 556 ; N mu ; B 33 -206 536 461 ; C -1 ; WX 278 ; N igrave ; B -27 0 255 713 ; C -1 ; WX 500 ; N ohungarumlaut ; B 25 -14 529 713 ; C -1 ; WX 667 ; N Eogonek ; B 16 -193 644 676 ; C -1 ; WX 556 ; N dcroat ; B 25 -14 534 676 ; C -1 ; WX 750 ; N threequarters ; B 23 -12 733 688 ; C -1 ; WX 556 ; N Scedilla ; B 35 -218 513 692 ; C -1 ; WX 394 ; N lcaron ; B 16 0 412 682 ; C -1 ; WX 778 ; N Kcommaaccent ; B 30 -218 769 676 ; C -1 ; WX 667 ; N Lacute ; B 19 0 638 923 ; C -1 ; WX 1000 ; N trademark ; B 24 271 977 676 ; C -1 ; WX 444 ; N edotaccent ; B 25 -14 426 691 ; C -1 ; WX 389 ; N Igrave ; B 20 0 370 923 ; C -1 ; WX 389 ; N Imacron ; B 20 0 370 847 ; C -1 ; WX 667 ; N Lcaron ; B 19 0 652 682 ; C -1 ; WX 750 ; N onehalf ; B -7 -12 775 688 ; C -1 ; WX 549 ; N lessequal ; B 29 0 526 704 ; C -1 ; WX 500 ; N ocircumflex ; B 25 -14 476 704 ; C -1 ; WX 556 ; N ntilde ; B 21 0 539 674 ; C -1 ; WX 722 ; N Uhungarumlaut ; B 16 -19 701 923 ; C -1 ; WX 667 ; N Eacute ; B 16 0 641 923 ; C -1 ; WX 444 ; N emacron ; B 25 -14 426 637 ; C -1 ; WX 500 ; N gbreve ; B 28 -206 483 691 ; C -1 ; WX 750 ; N onequarter ; B 28 -12 743 688 ; C -1 ; WX 556 ; N Scaron ; B 35 -19 513 914 ; C -1 ; WX 556 ; N Scommaaccent ; B 35 -218 513 692 ; C -1 ; WX 778 ; N Ohungarumlaut ; B 35 -19 743 923 ; C -1 ; WX 400 ; N degree ; B 57 402 343 688 ; C -1 ; WX 500 ; N ograve ; B 25 -14 476 713 ; C -1 ; WX 722 ; N Ccaron ; B 49 -19 687 914 ; C -1 ; WX 556 ; N ugrave ; B 16 -14 537 713 ; C -1 ; WX 549 ; N radical ; B 10 -46 512 850 ; C -1 ; WX 722 ; N Dcaron ; B 14 0 690 914 ; C -1 ; WX 444 ; N rcommaaccent ; B 29 -218 434 473 ; C -1 ; WX 722 ; N Ntilde ; B 16 -18 701 884 ; C -1 ; WX 500 ; N otilde ; B 25 -14 476 674 ; C -1 ; WX 722 ; N Rcommaaccent ; B 26 -218 715 676 ; C -1 ; WX 667 ; N Lcommaaccent ; B 19 -218 638 676 ; C -1 ; WX 722 ; N Atilde ; B 9 0 689 884 ; C -1 ; WX 722 ; N Aogonek ; B 9 -193 699 690 ; C -1 ; WX 722 ; N Aring ; B 9 0 689 935 ; C -1 ; WX 778 ; N Otilde ; B 35 -19 743 884 ; C -1 ; WX 444 ; N zdotaccent ; B 21 0 420 691 ; C -1 ; WX 667 ; N Ecaron ; B 16 0 641 914 ; C -1 ; WX 389 ; N Iogonek ; B 20 -193 370 676 ; C -1 ; WX 556 ; N kcommaaccent ; B 22 -218 543 676 ; C -1 ; WX 570 ; N minus ; B 33 209 537 297 ; C -1 ; WX 389 ; N Icircumflex ; B 20 0 370 914 ; C -1 ; WX 556 ; N ncaron ; B 21 0 539 704 ; C -1 ; WX 333 ; N tcommaaccent ; B 20 -218 332 630 ; C -1 ; WX 570 ; N logicalnot ; B 33 108 537 399 ; C -1 ; WX 500 ; N odieresis ; B 25 -14 476 667 ; C -1 ; WX 556 ; N udieresis ; B 16 -14 537 667 ; C -1 ; WX 549 ; N notequal ; B 15 -49 540 570 ; C -1 ; WX 500 ; N gcommaaccent ; B 28 -206 483 829 ; C -1 ; WX 500 ; N eth ; B 25 -14 476 691 ; C -1 ; WX 444 ; N zcaron ; B 21 0 420 704 ; C -1 ; WX 556 ; N ncommaaccent ; B 21 -218 539 473 ; C -1 ; WX 300 ; N onesuperior ; B 28 275 273 688 ; C -1 ; WX 278 ; N imacron ; B -8 0 272 637 ; C -1 ; WX 500 ; N Euro ; B 0 0 0 0 ; EndCharMetrics StartKernData StartKernPairs 2242 KPX A C -55 KPX A Cacute -55 KPX A Ccaron -55 KPX A Ccedilla -55 KPX A G -55 KPX A Gbreve -55 KPX A Gcommaaccent -55 KPX A O -45 KPX A Oacute -45 KPX A Ocircumflex -45 KPX A Odieresis -45 KPX A Ograve -45 KPX A Ohungarumlaut -45 KPX A Omacron -45 KPX A Oslash -45 KPX A Otilde -45 KPX A Q -45 KPX A T -95 KPX A Tcaron -95 KPX A Tcommaaccent -95 KPX A U -50 KPX A Uacute -50 KPX A Ucircumflex -50 KPX A Udieresis -50 KPX A Ugrave -50 KPX A Uhungarumlaut -50 KPX A Umacron -50 KPX A Uogonek -50 KPX A Uring -50 KPX A V -145 KPX A W -130 KPX A Y -100 KPX A Yacute -100 KPX A Ydieresis -100 KPX A p -25 KPX A quoteright -74 KPX A u -50 KPX A uacute -50 KPX A ucircumflex -50 KPX A udieresis -50 KPX A ugrave -50 KPX A uhungarumlaut -50 KPX A umacron -50 KPX A uogonek -50 KPX A uring -50 KPX A v -100 KPX A w -90 KPX A y -74 KPX A yacute -74 KPX A ydieresis -74 KPX Aacute C -55 KPX Aacute Cacute -55 KPX Aacute Ccaron -55 KPX Aacute Ccedilla -55 KPX Aacute G -55 KPX Aacute Gbreve -55 KPX Aacute Gcommaaccent -55 KPX Aacute O -45 KPX Aacute Oacute -45 KPX Aacute Ocircumflex -45 KPX Aacute Odieresis -45 KPX Aacute Ograve -45 KPX Aacute Ohungarumlaut -45 KPX Aacute Omacron -45 KPX Aacute Oslash -45 KPX Aacute Otilde -45 KPX Aacute Q -45 KPX Aacute T -95 KPX Aacute Tcaron -95 KPX Aacute Tcommaaccent -95 KPX Aacute U -50 KPX Aacute Uacute -50 KPX Aacute Ucircumflex -50 KPX Aacute Udieresis -50 KPX Aacute Ugrave -50 KPX Aacute Uhungarumlaut -50 KPX Aacute Umacron -50 KPX Aacute Uogonek -50 KPX Aacute Uring -50 KPX Aacute V -145 KPX Aacute W -130 KPX Aacute Y -100 KPX Aacute Yacute -100 KPX Aacute Ydieresis -100 KPX Aacute p -25 KPX Aacute quoteright -74 KPX Aacute u -50 KPX Aacute uacute -50 KPX Aacute ucircumflex -50 KPX Aacute udieresis -50 KPX Aacute ugrave -50 KPX Aacute uhungarumlaut -50 KPX Aacute umacron -50 KPX Aacute uogonek -50 KPX Aacute uring -50 KPX Aacute v -100 KPX Aacute w -90 KPX Aacute y -74 KPX Aacute yacute -74 KPX Aacute ydieresis -74 KPX Abreve C -55 KPX Abreve Cacute -55 KPX Abreve Ccaron -55 KPX Abreve Ccedilla -55 KPX Abreve G -55 KPX Abreve Gbreve -55 KPX Abreve Gcommaaccent -55 KPX Abreve O -45 KPX Abreve Oacute -45 KPX Abreve Ocircumflex -45 KPX Abreve Odieresis -45 KPX Abreve Ograve -45 KPX Abreve Ohungarumlaut -45 KPX Abreve Omacron -45 KPX Abreve Oslash -45 KPX Abreve Otilde -45 KPX Abreve Q -45 KPX Abreve T -95 KPX Abreve Tcaron -95 KPX Abreve Tcommaaccent -95 KPX Abreve U -50 KPX Abreve Uacute -50 KPX Abreve Ucircumflex -50 KPX Abreve Udieresis -50 KPX Abreve Ugrave -50 KPX Abreve Uhungarumlaut -50 KPX Abreve Umacron -50 KPX Abreve Uogonek -50 KPX Abreve Uring -50 KPX Abreve V -145 KPX Abreve W -130 KPX Abreve Y -100 KPX Abreve Yacute -100 KPX Abreve Ydieresis -100 KPX Abreve p -25 KPX Abreve quoteright -74 KPX Abreve u -50 KPX Abreve uacute -50 KPX Abreve ucircumflex -50 KPX Abreve udieresis -50 KPX Abreve ugrave -50 KPX Abreve uhungarumlaut -50 KPX Abreve umacron -50 KPX Abreve uogonek -50 KPX Abreve uring -50 KPX Abreve v -100 KPX Abreve w -90 KPX Abreve y -74 KPX Abreve yacute -74 KPX Abreve ydieresis -74 KPX Acircumflex C -55 KPX Acircumflex Cacute -55 KPX Acircumflex Ccaron -55 KPX Acircumflex Ccedilla -55 KPX Acircumflex G -55 KPX Acircumflex Gbreve -55 KPX Acircumflex Gcommaaccent -55 KPX Acircumflex O -45 KPX Acircumflex Oacute -45 KPX Acircumflex Ocircumflex -45 KPX Acircumflex Odieresis -45 KPX Acircumflex Ograve -45 KPX Acircumflex Ohungarumlaut -45 KPX Acircumflex Omacron -45 KPX Acircumflex Oslash -45 KPX Acircumflex Otilde -45 KPX Acircumflex Q -45 KPX Acircumflex T -95 KPX Acircumflex Tcaron -95 KPX Acircumflex Tcommaaccent -95 KPX Acircumflex U -50 KPX Acircumflex Uacute -50 KPX Acircumflex Ucircumflex -50 KPX Acircumflex Udieresis -50 KPX Acircumflex Ugrave -50 KPX Acircumflex Uhungarumlaut -50 KPX Acircumflex Umacron -50 KPX Acircumflex Uogonek -50 KPX Acircumflex Uring -50 KPX Acircumflex V -145 KPX Acircumflex W -130 KPX Acircumflex Y -100 KPX Acircumflex Yacute -100 KPX Acircumflex Ydieresis -100 KPX Acircumflex p -25 KPX Acircumflex quoteright -74 KPX Acircumflex u -50 KPX Acircumflex uacute -50 KPX Acircumflex ucircumflex -50 KPX Acircumflex udieresis -50 KPX Acircumflex ugrave -50 KPX Acircumflex uhungarumlaut -50 KPX Acircumflex umacron -50 KPX Acircumflex uogonek -50 KPX Acircumflex uring -50 KPX Acircumflex v -100 KPX Acircumflex w -90 KPX Acircumflex y -74 KPX Acircumflex yacute -74 KPX Acircumflex ydieresis -74 KPX Adieresis C -55 KPX Adieresis Cacute -55 KPX Adieresis Ccaron -55 KPX Adieresis Ccedilla -55 KPX Adieresis G -55 KPX Adieresis Gbreve -55 KPX Adieresis Gcommaaccent -55 KPX Adieresis O -45 KPX Adieresis Oacute -45 KPX Adieresis Ocircumflex -45 KPX Adieresis Odieresis -45 KPX Adieresis Ograve -45 KPX Adieresis Ohungarumlaut -45 KPX Adieresis Omacron -45 KPX Adieresis Oslash -45 KPX Adieresis Otilde -45 KPX Adieresis Q -45 KPX Adieresis T -95 KPX Adieresis Tcaron -95 KPX Adieresis Tcommaaccent -95 KPX Adieresis U -50 KPX Adieresis Uacute -50 KPX Adieresis Ucircumflex -50 KPX Adieresis Udieresis -50 KPX Adieresis Ugrave -50 KPX Adieresis Uhungarumlaut -50 KPX Adieresis Umacron -50 KPX Adieresis Uogonek -50 KPX Adieresis Uring -50 KPX Adieresis V -145 KPX Adieresis W -130 KPX Adieresis Y -100 KPX Adieresis Yacute -100 KPX Adieresis Ydieresis -100 KPX Adieresis p -25 KPX Adieresis quoteright -74 KPX Adieresis u -50 KPX Adieresis uacute -50 KPX Adieresis ucircumflex -50 KPX Adieresis udieresis -50 KPX Adieresis ugrave -50 KPX Adieresis uhungarumlaut -50 KPX Adieresis umacron -50 KPX Adieresis uogonek -50 KPX Adieresis uring -50 KPX Adieresis v -100 KPX Adieresis w -90 KPX Adieresis y -74 KPX Adieresis yacute -74 KPX Adieresis ydieresis -74 KPX Agrave C -55 KPX Agrave Cacute -55 KPX Agrave Ccaron -55 KPX Agrave Ccedilla -55 KPX Agrave G -55 KPX Agrave Gbreve -55 KPX Agrave Gcommaaccent -55 KPX Agrave O -45 KPX Agrave Oacute -45 KPX Agrave Ocircumflex -45 KPX Agrave Odieresis -45 KPX Agrave Ograve -45 KPX Agrave Ohungarumlaut -45 KPX Agrave Omacron -45 KPX Agrave Oslash -45 KPX Agrave Otilde -45 KPX Agrave Q -45 KPX Agrave T -95 KPX Agrave Tcaron -95 KPX Agrave Tcommaaccent -95 KPX Agrave U -50 KPX Agrave Uacute -50 KPX Agrave Ucircumflex -50 KPX Agrave Udieresis -50 KPX Agrave Ugrave -50 KPX Agrave Uhungarumlaut -50 KPX Agrave Umacron -50 KPX Agrave Uogonek -50 KPX Agrave Uring -50 KPX Agrave V -145 KPX Agrave W -130 KPX Agrave Y -100 KPX Agrave Yacute -100 KPX Agrave Ydieresis -100 KPX Agrave p -25 KPX Agrave quoteright -74 KPX Agrave u -50 KPX Agrave uacute -50 KPX Agrave ucircumflex -50 KPX Agrave udieresis -50 KPX Agrave ugrave -50 KPX Agrave uhungarumlaut -50 KPX Agrave umacron -50 KPX Agrave uogonek -50 KPX Agrave uring -50 KPX Agrave v -100 KPX Agrave w -90 KPX Agrave y -74 KPX Agrave yacute -74 KPX Agrave ydieresis -74 KPX Amacron C -55 KPX Amacron Cacute -55 KPX Amacron Ccaron -55 KPX Amacron Ccedilla -55 KPX Amacron G -55 KPX Amacron Gbreve -55 KPX Amacron Gcommaaccent -55 KPX Amacron O -45 KPX Amacron Oacute -45 KPX Amacron Ocircumflex -45 KPX Amacron Odieresis -45 KPX Amacron Ograve -45 KPX Amacron Ohungarumlaut -45 KPX Amacron Omacron -45 KPX Amacron Oslash -45 KPX Amacron Otilde -45 KPX Amacron Q -45 KPX Amacron T -95 KPX Amacron Tcaron -95 KPX Amacron Tcommaaccent -95 KPX Amacron U -50 KPX Amacron Uacute -50 KPX Amacron Ucircumflex -50 KPX Amacron Udieresis -50 KPX Amacron Ugrave -50 KPX Amacron Uhungarumlaut -50 KPX Amacron Umacron -50 KPX Amacron Uogonek -50 KPX Amacron Uring -50 KPX Amacron V -145 KPX Amacron W -130 KPX Amacron Y -100 KPX Amacron Yacute -100 KPX Amacron Ydieresis -100 KPX Amacron p -25 KPX Amacron quoteright -74 KPX Amacron u -50 KPX Amacron uacute -50 KPX Amacron ucircumflex -50 KPX Amacron udieresis -50 KPX Amacron ugrave -50 KPX Amacron uhungarumlaut -50 KPX Amacron umacron -50 KPX Amacron uogonek -50 KPX Amacron uring -50 KPX Amacron v -100 KPX Amacron w -90 KPX Amacron y -74 KPX Amacron yacute -74 KPX Amacron ydieresis -74 KPX Aogonek C -55 KPX Aogonek Cacute -55 KPX Aogonek Ccaron -55 KPX Aogonek Ccedilla -55 KPX Aogonek G -55 KPX Aogonek Gbreve -55 KPX Aogonek Gcommaaccent -55 KPX Aogonek O -45 KPX Aogonek Oacute -45 KPX Aogonek Ocircumflex -45 KPX Aogonek Odieresis -45 KPX Aogonek Ograve -45 KPX Aogonek Ohungarumlaut -45 KPX Aogonek Omacron -45 KPX Aogonek Oslash -45 KPX Aogonek Otilde -45 KPX Aogonek Q -45 KPX Aogonek T -95 KPX Aogonek Tcaron -95 KPX Aogonek Tcommaaccent -95 KPX Aogonek U -50 KPX Aogonek Uacute -50 KPX Aogonek Ucircumflex -50 KPX Aogonek Udieresis -50 KPX Aogonek Ugrave -50 KPX Aogonek Uhungarumlaut -50 KPX Aogonek Umacron -50 KPX Aogonek Uogonek -50 KPX Aogonek Uring -50 KPX Aogonek V -145 KPX Aogonek W -130 KPX Aogonek Y -100 KPX Aogonek Yacute -100 KPX Aogonek Ydieresis -100 KPX Aogonek p -25 KPX Aogonek quoteright -74 KPX Aogonek u -50 KPX Aogonek uacute -50 KPX Aogonek ucircumflex -50 KPX Aogonek udieresis -50 KPX Aogonek ugrave -50 KPX Aogonek uhungarumlaut -50 KPX Aogonek umacron -50 KPX Aogonek uogonek -50 KPX Aogonek uring -50 KPX Aogonek v -100 KPX Aogonek w -90 KPX Aogonek y -34 KPX Aogonek yacute -34 KPX Aogonek ydieresis -34 KPX Aring C -55 KPX Aring Cacute -55 KPX Aring Ccaron -55 KPX Aring Ccedilla -55 KPX Aring G -55 KPX Aring Gbreve -55 KPX Aring Gcommaaccent -55 KPX Aring O -45 KPX Aring Oacute -45 KPX Aring Ocircumflex -45 KPX Aring Odieresis -45 KPX Aring Ograve -45 KPX Aring Ohungarumlaut -45 KPX Aring Omacron -45 KPX Aring Oslash -45 KPX Aring Otilde -45 KPX Aring Q -45 KPX Aring T -95 KPX Aring Tcaron -95 KPX Aring Tcommaaccent -95 KPX Aring U -50 KPX Aring Uacute -50 KPX Aring Ucircumflex -50 KPX Aring Udieresis -50 KPX Aring Ugrave -50 KPX Aring Uhungarumlaut -50 KPX Aring Umacron -50 KPX Aring Uogonek -50 KPX Aring Uring -50 KPX Aring V -145 KPX Aring W -130 KPX Aring Y -100 KPX Aring Yacute -100 KPX Aring Ydieresis -100 KPX Aring p -25 KPX Aring quoteright -74 KPX Aring u -50 KPX Aring uacute -50 KPX Aring ucircumflex -50 KPX Aring udieresis -50 KPX Aring ugrave -50 KPX Aring uhungarumlaut -50 KPX Aring umacron -50 KPX Aring uogonek -50 KPX Aring uring -50 KPX Aring v -100 KPX Aring w -90 KPX Aring y -74 KPX Aring yacute -74 KPX Aring ydieresis -74 KPX Atilde C -55 KPX Atilde Cacute -55 KPX Atilde Ccaron -55 KPX Atilde Ccedilla -55 KPX Atilde G -55 KPX Atilde Gbreve -55 KPX Atilde Gcommaaccent -55 KPX Atilde O -45 KPX Atilde Oacute -45 KPX Atilde Ocircumflex -45 KPX Atilde Odieresis -45 KPX Atilde Ograve -45 KPX Atilde Ohungarumlaut -45 KPX Atilde Omacron -45 KPX Atilde Oslash -45 KPX Atilde Otilde -45 KPX Atilde Q -45 KPX Atilde T -95 KPX Atilde Tcaron -95 KPX Atilde Tcommaaccent -95 KPX Atilde U -50 KPX Atilde Uacute -50 KPX Atilde Ucircumflex -50 KPX Atilde Udieresis -50 KPX Atilde Ugrave -50 KPX Atilde Uhungarumlaut -50 KPX Atilde Umacron -50 KPX Atilde Uogonek -50 KPX Atilde Uring -50 KPX Atilde V -145 KPX Atilde W -130 KPX Atilde Y -100 KPX Atilde Yacute -100 KPX Atilde Ydieresis -100 KPX Atilde p -25 KPX Atilde quoteright -74 KPX Atilde u -50 KPX Atilde uacute -50 KPX Atilde ucircumflex -50 KPX Atilde udieresis -50 KPX Atilde ugrave -50 KPX Atilde uhungarumlaut -50 KPX Atilde umacron -50 KPX Atilde uogonek -50 KPX Atilde uring -50 KPX Atilde v -100 KPX Atilde w -90 KPX Atilde y -74 KPX Atilde yacute -74 KPX Atilde ydieresis -74 KPX B A -30 KPX B Aacute -30 KPX B Abreve -30 KPX B Acircumflex -30 KPX B Adieresis -30 KPX B Agrave -30 KPX B Amacron -30 KPX B Aogonek -30 KPX B Aring -30 KPX B Atilde -30 KPX B U -10 KPX B Uacute -10 KPX B Ucircumflex -10 KPX B Udieresis -10 KPX B Ugrave -10 KPX B Uhungarumlaut -10 KPX B Umacron -10 KPX B Uogonek -10 KPX B Uring -10 KPX D A -35 KPX D Aacute -35 KPX D Abreve -35 KPX D Acircumflex -35 KPX D Adieresis -35 KPX D Agrave -35 KPX D Amacron -35 KPX D Aogonek -35 KPX D Aring -35 KPX D Atilde -35 KPX D V -40 KPX D W -40 KPX D Y -40 KPX D Yacute -40 KPX D Ydieresis -40 KPX D period -20 KPX Dcaron A -35 KPX Dcaron Aacute -35 KPX Dcaron Abreve -35 KPX Dcaron Acircumflex -35 KPX Dcaron Adieresis -35 KPX Dcaron Agrave -35 KPX Dcaron Amacron -35 KPX Dcaron Aogonek -35 KPX Dcaron Aring -35 KPX Dcaron Atilde -35 KPX Dcaron V -40 KPX Dcaron W -40 KPX Dcaron Y -40 KPX Dcaron Yacute -40 KPX Dcaron Ydieresis -40 KPX Dcaron period -20 KPX Dcroat A -35 KPX Dcroat Aacute -35 KPX Dcroat Abreve -35 KPX Dcroat Acircumflex -35 KPX Dcroat Adieresis -35 KPX Dcroat Agrave -35 KPX Dcroat Amacron -35 KPX Dcroat Aogonek -35 KPX Dcroat Aring -35 KPX Dcroat Atilde -35 KPX Dcroat V -40 KPX Dcroat W -40 KPX Dcroat Y -40 KPX Dcroat Yacute -40 KPX Dcroat Ydieresis -40 KPX Dcroat period -20 KPX F A -90 KPX F Aacute -90 KPX F Abreve -90 KPX F Acircumflex -90 KPX F Adieresis -90 KPX F Agrave -90 KPX F Amacron -90 KPX F Aogonek -90 KPX F Aring -90 KPX F Atilde -90 KPX F a -25 KPX F aacute -25 KPX F abreve -25 KPX F acircumflex -25 KPX F adieresis -25 KPX F agrave -25 KPX F amacron -25 KPX F aogonek -25 KPX F aring -25 KPX F atilde -25 KPX F comma -92 KPX F e -25 KPX F eacute -25 KPX F ecaron -25 KPX F ecircumflex -25 KPX F edieresis -25 KPX F edotaccent -25 KPX F egrave -25 KPX F emacron -25 KPX F eogonek -25 KPX F o -25 KPX F oacute -25 KPX F ocircumflex -25 KPX F odieresis -25 KPX F ograve -25 KPX F ohungarumlaut -25 KPX F omacron -25 KPX F oslash -25 KPX F otilde -25 KPX F period -110 KPX J A -30 KPX J Aacute -30 KPX J Abreve -30 KPX J Acircumflex -30 KPX J Adieresis -30 KPX J Agrave -30 KPX J Amacron -30 KPX J Aogonek -30 KPX J Aring -30 KPX J Atilde -30 KPX J a -15 KPX J aacute -15 KPX J abreve -15 KPX J acircumflex -15 KPX J adieresis -15 KPX J agrave -15 KPX J amacron -15 KPX J aogonek -15 KPX J aring -15 KPX J atilde -15 KPX J e -15 KPX J eacute -15 KPX J ecaron -15 KPX J ecircumflex -15 KPX J edieresis -15 KPX J edotaccent -15 KPX J egrave -15 KPX J emacron -15 KPX J eogonek -15 KPX J o -15 KPX J oacute -15 KPX J ocircumflex -15 KPX J odieresis -15 KPX J ograve -15 KPX J ohungarumlaut -15 KPX J omacron -15 KPX J oslash -15 KPX J otilde -15 KPX J period -20 KPX J u -15 KPX J uacute -15 KPX J ucircumflex -15 KPX J udieresis -15 KPX J ugrave -15 KPX J uhungarumlaut -15 KPX J umacron -15 KPX J uogonek -15 KPX J uring -15 KPX K O -30 KPX K Oacute -30 KPX K Ocircumflex -30 KPX K Odieresis -30 KPX K Ograve -30 KPX K Ohungarumlaut -30 KPX K Omacron -30 KPX K Oslash -30 KPX K Otilde -30 KPX K e -25 KPX K eacute -25 KPX K ecaron -25 KPX K ecircumflex -25 KPX K edieresis -25 KPX K edotaccent -25 KPX K egrave -25 KPX K emacron -25 KPX K eogonek -25 KPX K o -25 KPX K oacute -25 KPX K ocircumflex -25 KPX K odieresis -25 KPX K ograve -25 KPX K ohungarumlaut -25 KPX K omacron -25 KPX K oslash -25 KPX K otilde -25 KPX K u -15 KPX K uacute -15 KPX K ucircumflex -15 KPX K udieresis -15 KPX K ugrave -15 KPX K uhungarumlaut -15 KPX K umacron -15 KPX K uogonek -15 KPX K uring -15 KPX K y -45 KPX K yacute -45 KPX K ydieresis -45 KPX Kcommaaccent O -30 KPX Kcommaaccent Oacute -30 KPX Kcommaaccent Ocircumflex -30 KPX Kcommaaccent Odieresis -30 KPX Kcommaaccent Ograve -30 KPX Kcommaaccent Ohungarumlaut -30 KPX Kcommaaccent Omacron -30 KPX Kcommaaccent Oslash -30 KPX Kcommaaccent Otilde -30 KPX Kcommaaccent e -25 KPX Kcommaaccent eacute -25 KPX Kcommaaccent ecaron -25 KPX Kcommaaccent ecircumflex -25 KPX Kcommaaccent edieresis -25 KPX Kcommaaccent edotaccent -25 KPX Kcommaaccent egrave -25 KPX Kcommaaccent emacron -25 KPX Kcommaaccent eogonek -25 KPX Kcommaaccent o -25 KPX Kcommaaccent oacute -25 KPX Kcommaaccent ocircumflex -25 KPX Kcommaaccent odieresis -25 KPX Kcommaaccent ograve -25 KPX Kcommaaccent ohungarumlaut -25 KPX Kcommaaccent omacron -25 KPX Kcommaaccent oslash -25 KPX Kcommaaccent otilde -25 KPX Kcommaaccent u -15 KPX Kcommaaccent uacute -15 KPX Kcommaaccent ucircumflex -15 KPX Kcommaaccent udieresis -15 KPX Kcommaaccent ugrave -15 KPX Kcommaaccent uhungarumlaut -15 KPX Kcommaaccent umacron -15 KPX Kcommaaccent uogonek -15 KPX Kcommaaccent uring -15 KPX Kcommaaccent y -45 KPX Kcommaaccent yacute -45 KPX Kcommaaccent ydieresis -45 KPX L T -92 KPX L Tcaron -92 KPX L Tcommaaccent -92 KPX L V -92 KPX L W -92 KPX L Y -92 KPX L Yacute -92 KPX L Ydieresis -92 KPX L quotedblright -20 KPX L quoteright -110 KPX L y -55 KPX L yacute -55 KPX L ydieresis -55 KPX Lacute T -92 KPX Lacute Tcaron -92 KPX Lacute Tcommaaccent -92 KPX Lacute V -92 KPX Lacute W -92 KPX Lacute Y -92 KPX Lacute Yacute -92 KPX Lacute Ydieresis -92 KPX Lacute quotedblright -20 KPX Lacute quoteright -110 KPX Lacute y -55 KPX Lacute yacute -55 KPX Lacute ydieresis -55 KPX Lcommaaccent T -92 KPX Lcommaaccent Tcaron -92 KPX Lcommaaccent Tcommaaccent -92 KPX Lcommaaccent V -92 KPX Lcommaaccent W -92 KPX Lcommaaccent Y -92 KPX Lcommaaccent Yacute -92 KPX Lcommaaccent Ydieresis -92 KPX Lcommaaccent quotedblright -20 KPX Lcommaaccent quoteright -110 KPX Lcommaaccent y -55 KPX Lcommaaccent yacute -55 KPX Lcommaaccent ydieresis -55 KPX Lslash T -92 KPX Lslash Tcaron -92 KPX Lslash Tcommaaccent -92 KPX Lslash V -92 KPX Lslash W -92 KPX Lslash Y -92 KPX Lslash Yacute -92 KPX Lslash Ydieresis -92 KPX Lslash quotedblright -20 KPX Lslash quoteright -110 KPX Lslash y -55 KPX Lslash yacute -55 KPX Lslash ydieresis -55 KPX N A -20 KPX N Aacute -20 KPX N Abreve -20 KPX N Acircumflex -20 KPX N Adieresis -20 KPX N Agrave -20 KPX N Amacron -20 KPX N Aogonek -20 KPX N Aring -20 KPX N Atilde -20 KPX Nacute A -20 KPX Nacute Aacute -20 KPX Nacute Abreve -20 KPX Nacute Acircumflex -20 KPX Nacute Adieresis -20 KPX Nacute Agrave -20 KPX Nacute Amacron -20 KPX Nacute Aogonek -20 KPX Nacute Aring -20 KPX Nacute Atilde -20 KPX Ncaron A -20 KPX Ncaron Aacute -20 KPX Ncaron Abreve -20 KPX Ncaron Acircumflex -20 KPX Ncaron Adieresis -20 KPX Ncaron Agrave -20 KPX Ncaron Amacron -20 KPX Ncaron Aogonek -20 KPX Ncaron Aring -20 KPX Ncaron Atilde -20 KPX Ncommaaccent A -20 KPX Ncommaaccent Aacute -20 KPX Ncommaaccent Abreve -20 KPX Ncommaaccent Acircumflex -20 KPX Ncommaaccent Adieresis -20 KPX Ncommaaccent Agrave -20 KPX Ncommaaccent Amacron -20 KPX Ncommaaccent Aogonek -20 KPX Ncommaaccent Aring -20 KPX Ncommaaccent Atilde -20 KPX Ntilde A -20 KPX Ntilde Aacute -20 KPX Ntilde Abreve -20 KPX Ntilde Acircumflex -20 KPX Ntilde Adieresis -20 KPX Ntilde Agrave -20 KPX Ntilde Amacron -20 KPX Ntilde Aogonek -20 KPX Ntilde Aring -20 KPX Ntilde Atilde -20 KPX O A -40 KPX O Aacute -40 KPX O Abreve -40 KPX O Acircumflex -40 KPX O Adieresis -40 KPX O Agrave -40 KPX O Amacron -40 KPX O Aogonek -40 KPX O Aring -40 KPX O Atilde -40 KPX O T -40 KPX O Tcaron -40 KPX O Tcommaaccent -40 KPX O V -50 KPX O W -50 KPX O X -40 KPX O Y -50 KPX O Yacute -50 KPX O Ydieresis -50 KPX Oacute A -40 KPX Oacute Aacute -40 KPX Oacute Abreve -40 KPX Oacute Acircumflex -40 KPX Oacute Adieresis -40 KPX Oacute Agrave -40 KPX Oacute Amacron -40 KPX Oacute Aogonek -40 KPX Oacute Aring -40 KPX Oacute Atilde -40 KPX Oacute T -40 KPX Oacute Tcaron -40 KPX Oacute Tcommaaccent -40 KPX Oacute V -50 KPX Oacute W -50 KPX Oacute X -40 KPX Oacute Y -50 KPX Oacute Yacute -50 KPX Oacute Ydieresis -50 KPX Ocircumflex A -40 KPX Ocircumflex Aacute -40 KPX Ocircumflex Abreve -40 KPX Ocircumflex Acircumflex -40 KPX Ocircumflex Adieresis -40 KPX Ocircumflex Agrave -40 KPX Ocircumflex Amacron -40 KPX Ocircumflex Aogonek -40 KPX Ocircumflex Aring -40 KPX Ocircumflex Atilde -40 KPX Ocircumflex T -40 KPX Ocircumflex Tcaron -40 KPX Ocircumflex Tcommaaccent -40 KPX Ocircumflex V -50 KPX Ocircumflex W -50 KPX Ocircumflex X -40 KPX Ocircumflex Y -50 KPX Ocircumflex Yacute -50 KPX Ocircumflex Ydieresis -50 KPX Odieresis A -40 KPX Odieresis Aacute -40 KPX Odieresis Abreve -40 KPX Odieresis Acircumflex -40 KPX Odieresis Adieresis -40 KPX Odieresis Agrave -40 KPX Odieresis Amacron -40 KPX Odieresis Aogonek -40 KPX Odieresis Aring -40 KPX Odieresis Atilde -40 KPX Odieresis T -40 KPX Odieresis Tcaron -40 KPX Odieresis Tcommaaccent -40 KPX Odieresis V -50 KPX Odieresis W -50 KPX Odieresis X -40 KPX Odieresis Y -50 KPX Odieresis Yacute -50 KPX Odieresis Ydieresis -50 KPX Ograve A -40 KPX Ograve Aacute -40 KPX Ograve Abreve -40 KPX Ograve Acircumflex -40 KPX Ograve Adieresis -40 KPX Ograve Agrave -40 KPX Ograve Amacron -40 KPX Ograve Aogonek -40 KPX Ograve Aring -40 KPX Ograve Atilde -40 KPX Ograve T -40 KPX Ograve Tcaron -40 KPX Ograve Tcommaaccent -40 KPX Ograve V -50 KPX Ograve W -50 KPX Ograve X -40 KPX Ograve Y -50 KPX Ograve Yacute -50 KPX Ograve Ydieresis -50 KPX Ohungarumlaut A -40 KPX Ohungarumlaut Aacute -40 KPX Ohungarumlaut Abreve -40 KPX Ohungarumlaut Acircumflex -40 KPX Ohungarumlaut Adieresis -40 KPX Ohungarumlaut Agrave -40 KPX Ohungarumlaut Amacron -40 KPX Ohungarumlaut Aogonek -40 KPX Ohungarumlaut Aring -40 KPX Ohungarumlaut Atilde -40 KPX Ohungarumlaut T -40 KPX Ohungarumlaut Tcaron -40 KPX Ohungarumlaut Tcommaaccent -40 KPX Ohungarumlaut V -50 KPX Ohungarumlaut W -50 KPX Ohungarumlaut X -40 KPX Ohungarumlaut Y -50 KPX Ohungarumlaut Yacute -50 KPX Ohungarumlaut Ydieresis -50 KPX Omacron A -40 KPX Omacron Aacute -40 KPX Omacron Abreve -40 KPX Omacron Acircumflex -40 KPX Omacron Adieresis -40 KPX Omacron Agrave -40 KPX Omacron Amacron -40 KPX Omacron Aogonek -40 KPX Omacron Aring -40 KPX Omacron Atilde -40 KPX Omacron T -40 KPX Omacron Tcaron -40 KPX Omacron Tcommaaccent -40 KPX Omacron V -50 KPX Omacron W -50 KPX Omacron X -40 KPX Omacron Y -50 KPX Omacron Yacute -50 KPX Omacron Ydieresis -50 KPX Oslash A -40 KPX Oslash Aacute -40 KPX Oslash Abreve -40 KPX Oslash Acircumflex -40 KPX Oslash Adieresis -40 KPX Oslash Agrave -40 KPX Oslash Amacron -40 KPX Oslash Aogonek -40 KPX Oslash Aring -40 KPX Oslash Atilde -40 KPX Oslash T -40 KPX Oslash Tcaron -40 KPX Oslash Tcommaaccent -40 KPX Oslash V -50 KPX Oslash W -50 KPX Oslash X -40 KPX Oslash Y -50 KPX Oslash Yacute -50 KPX Oslash Ydieresis -50 KPX Otilde A -40 KPX Otilde Aacute -40 KPX Otilde Abreve -40 KPX Otilde Acircumflex -40 KPX Otilde Adieresis -40 KPX Otilde Agrave -40 KPX Otilde Amacron -40 KPX Otilde Aogonek -40 KPX Otilde Aring -40 KPX Otilde Atilde -40 KPX Otilde T -40 KPX Otilde Tcaron -40 KPX Otilde Tcommaaccent -40 KPX Otilde V -50 KPX Otilde W -50 KPX Otilde X -40 KPX Otilde Y -50 KPX Otilde Yacute -50 KPX Otilde Ydieresis -50 KPX P A -74 KPX P Aacute -74 KPX P Abreve -74 KPX P Acircumflex -74 KPX P Adieresis -74 KPX P Agrave -74 KPX P Amacron -74 KPX P Aogonek -74 KPX P Aring -74 KPX P Atilde -74 KPX P a -10 KPX P aacute -10 KPX P abreve -10 KPX P acircumflex -10 KPX P adieresis -10 KPX P agrave -10 KPX P amacron -10 KPX P aogonek -10 KPX P aring -10 KPX P atilde -10 KPX P comma -92 KPX P e -20 KPX P eacute -20 KPX P ecaron -20 KPX P ecircumflex -20 KPX P edieresis -20 KPX P edotaccent -20 KPX P egrave -20 KPX P emacron -20 KPX P eogonek -20 KPX P o -20 KPX P oacute -20 KPX P ocircumflex -20 KPX P odieresis -20 KPX P ograve -20 KPX P ohungarumlaut -20 KPX P omacron -20 KPX P oslash -20 KPX P otilde -20 KPX P period -110 KPX Q U -10 KPX Q Uacute -10 KPX Q Ucircumflex -10 KPX Q Udieresis -10 KPX Q Ugrave -10 KPX Q Uhungarumlaut -10 KPX Q Umacron -10 KPX Q Uogonek -10 KPX Q Uring -10 KPX Q period -20 KPX R O -30 KPX R Oacute -30 KPX R Ocircumflex -30 KPX R Odieresis -30 KPX R Ograve -30 KPX R Ohungarumlaut -30 KPX R Omacron -30 KPX R Oslash -30 KPX R Otilde -30 KPX R T -40 KPX R Tcaron -40 KPX R Tcommaaccent -40 KPX R U -30 KPX R Uacute -30 KPX R Ucircumflex -30 KPX R Udieresis -30 KPX R Ugrave -30 KPX R Uhungarumlaut -30 KPX R Umacron -30 KPX R Uogonek -30 KPX R Uring -30 KPX R V -55 KPX R W -35 KPX R Y -35 KPX R Yacute -35 KPX R Ydieresis -35 KPX Racute O -30 KPX Racute Oacute -30 KPX Racute Ocircumflex -30 KPX Racute Odieresis -30 KPX Racute Ograve -30 KPX Racute Ohungarumlaut -30 KPX Racute Omacron -30 KPX Racute Oslash -30 KPX Racute Otilde -30 KPX Racute T -40 KPX Racute Tcaron -40 KPX Racute Tcommaaccent -40 KPX Racute U -30 KPX Racute Uacute -30 KPX Racute Ucircumflex -30 KPX Racute Udieresis -30 KPX Racute Ugrave -30 KPX Racute Uhungarumlaut -30 KPX Racute Umacron -30 KPX Racute Uogonek -30 KPX Racute Uring -30 KPX Racute V -55 KPX Racute W -35 KPX Racute Y -35 KPX Racute Yacute -35 KPX Racute Ydieresis -35 KPX Rcaron O -30 KPX Rcaron Oacute -30 KPX Rcaron Ocircumflex -30 KPX Rcaron Odieresis -30 KPX Rcaron Ograve -30 KPX Rcaron Ohungarumlaut -30 KPX Rcaron Omacron -30 KPX Rcaron Oslash -30 KPX Rcaron Otilde -30 KPX Rcaron T -40 KPX Rcaron Tcaron -40 KPX Rcaron Tcommaaccent -40 KPX Rcaron U -30 KPX Rcaron Uacute -30 KPX Rcaron Ucircumflex -30 KPX Rcaron Udieresis -30 KPX Rcaron Ugrave -30 KPX Rcaron Uhungarumlaut -30 KPX Rcaron Umacron -30 KPX Rcaron Uogonek -30 KPX Rcaron Uring -30 KPX Rcaron V -55 KPX Rcaron W -35 KPX Rcaron Y -35 KPX Rcaron Yacute -35 KPX Rcaron Ydieresis -35 KPX Rcommaaccent O -30 KPX Rcommaaccent Oacute -30 KPX Rcommaaccent Ocircumflex -30 KPX Rcommaaccent Odieresis -30 KPX Rcommaaccent Ograve -30 KPX Rcommaaccent Ohungarumlaut -30 KPX Rcommaaccent Omacron -30 KPX Rcommaaccent Oslash -30 KPX Rcommaaccent Otilde -30 KPX Rcommaaccent T -40 KPX Rcommaaccent Tcaron -40 KPX Rcommaaccent Tcommaaccent -40 KPX Rcommaaccent U -30 KPX Rcommaaccent Uacute -30 KPX Rcommaaccent Ucircumflex -30 KPX Rcommaaccent Udieresis -30 KPX Rcommaaccent Ugrave -30 KPX Rcommaaccent Uhungarumlaut -30 KPX Rcommaaccent Umacron -30 KPX Rcommaaccent Uogonek -30 KPX Rcommaaccent Uring -30 KPX Rcommaaccent V -55 KPX Rcommaaccent W -35 KPX Rcommaaccent Y -35 KPX Rcommaaccent Yacute -35 KPX Rcommaaccent Ydieresis -35 KPX T A -90 KPX T Aacute -90 KPX T Abreve -90 KPX T Acircumflex -90 KPX T Adieresis -90 KPX T Agrave -90 KPX T Amacron -90 KPX T Aogonek -90 KPX T Aring -90 KPX T Atilde -90 KPX T O -18 KPX T Oacute -18 KPX T Ocircumflex -18 KPX T Odieresis -18 KPX T Ograve -18 KPX T Ohungarumlaut -18 KPX T Omacron -18 KPX T Oslash -18 KPX T Otilde -18 KPX T a -92 KPX T aacute -92 KPX T abreve -52 KPX T acircumflex -52 KPX T adieresis -52 KPX T agrave -52 KPX T amacron -52 KPX T aogonek -92 KPX T aring -92 KPX T atilde -52 KPX T colon -74 KPX T comma -74 KPX T e -92 KPX T eacute -92 KPX T ecaron -92 KPX T ecircumflex -92 KPX T edieresis -52 KPX T edotaccent -92 KPX T egrave -52 KPX T emacron -52 KPX T eogonek -92 KPX T hyphen -92 KPX T i -18 KPX T iacute -18 KPX T iogonek -18 KPX T o -92 KPX T oacute -92 KPX T ocircumflex -92 KPX T odieresis -92 KPX T ograve -92 KPX T ohungarumlaut -92 KPX T omacron -92 KPX T oslash -92 KPX T otilde -92 KPX T period -90 KPX T r -74 KPX T racute -74 KPX T rcaron -74 KPX T rcommaaccent -74 KPX T semicolon -74 KPX T u -92 KPX T uacute -92 KPX T ucircumflex -92 KPX T udieresis -92 KPX T ugrave -92 KPX T uhungarumlaut -92 KPX T umacron -92 KPX T uogonek -92 KPX T uring -92 KPX T w -74 KPX T y -34 KPX T yacute -34 KPX T ydieresis -34 KPX Tcaron A -90 KPX Tcaron Aacute -90 KPX Tcaron Abreve -90 KPX Tcaron Acircumflex -90 KPX Tcaron Adieresis -90 KPX Tcaron Agrave -90 KPX Tcaron Amacron -90 KPX Tcaron Aogonek -90 KPX Tcaron Aring -90 KPX Tcaron Atilde -90 KPX Tcaron O -18 KPX Tcaron Oacute -18 KPX Tcaron Ocircumflex -18 KPX Tcaron Odieresis -18 KPX Tcaron Ograve -18 KPX Tcaron Ohungarumlaut -18 KPX Tcaron Omacron -18 KPX Tcaron Oslash -18 KPX Tcaron Otilde -18 KPX Tcaron a -92 KPX Tcaron aacute -92 KPX Tcaron abreve -52 KPX Tcaron acircumflex -52 KPX Tcaron adieresis -52 KPX Tcaron agrave -52 KPX Tcaron amacron -52 KPX Tcaron aogonek -92 KPX Tcaron aring -92 KPX Tcaron atilde -52 KPX Tcaron colon -74 KPX Tcaron comma -74 KPX Tcaron e -92 KPX Tcaron eacute -92 KPX Tcaron ecaron -92 KPX Tcaron ecircumflex -92 KPX Tcaron edieresis -52 KPX Tcaron edotaccent -92 KPX Tcaron egrave -52 KPX Tcaron emacron -52 KPX Tcaron eogonek -92 KPX Tcaron hyphen -92 KPX Tcaron i -18 KPX Tcaron iacute -18 KPX Tcaron iogonek -18 KPX Tcaron o -92 KPX Tcaron oacute -92 KPX Tcaron ocircumflex -92 KPX Tcaron odieresis -92 KPX Tcaron ograve -92 KPX Tcaron ohungarumlaut -92 KPX Tcaron omacron -92 KPX Tcaron oslash -92 KPX Tcaron otilde -92 KPX Tcaron period -90 KPX Tcaron r -74 KPX Tcaron racute -74 KPX Tcaron rcaron -74 KPX Tcaron rcommaaccent -74 KPX Tcaron semicolon -74 KPX Tcaron u -92 KPX Tcaron uacute -92 KPX Tcaron ucircumflex -92 KPX Tcaron udieresis -92 KPX Tcaron ugrave -92 KPX Tcaron uhungarumlaut -92 KPX Tcaron umacron -92 KPX Tcaron uogonek -92 KPX Tcaron uring -92 KPX Tcaron w -74 KPX Tcaron y -34 KPX Tcaron yacute -34 KPX Tcaron ydieresis -34 KPX Tcommaaccent A -90 KPX Tcommaaccent Aacute -90 KPX Tcommaaccent Abreve -90 KPX Tcommaaccent Acircumflex -90 KPX Tcommaaccent Adieresis -90 KPX Tcommaaccent Agrave -90 KPX Tcommaaccent Amacron -90 KPX Tcommaaccent Aogonek -90 KPX Tcommaaccent Aring -90 KPX Tcommaaccent Atilde -90 KPX Tcommaaccent O -18 KPX Tcommaaccent Oacute -18 KPX Tcommaaccent Ocircumflex -18 KPX Tcommaaccent Odieresis -18 KPX Tcommaaccent Ograve -18 KPX Tcommaaccent Ohungarumlaut -18 KPX Tcommaaccent Omacron -18 KPX Tcommaaccent Oslash -18 KPX Tcommaaccent Otilde -18 KPX Tcommaaccent a -92 KPX Tcommaaccent aacute -92 KPX Tcommaaccent abreve -52 KPX Tcommaaccent acircumflex -52 KPX Tcommaaccent adieresis -52 KPX Tcommaaccent agrave -52 KPX Tcommaaccent amacron -52 KPX Tcommaaccent aogonek -92 KPX Tcommaaccent aring -92 KPX Tcommaaccent atilde -52 KPX Tcommaaccent colon -74 KPX Tcommaaccent comma -74 KPX Tcommaaccent e -92 KPX Tcommaaccent eacute -92 KPX Tcommaaccent ecaron -92 KPX Tcommaaccent ecircumflex -92 KPX Tcommaaccent edieresis -52 KPX Tcommaaccent edotaccent -92 KPX Tcommaaccent egrave -52 KPX Tcommaaccent emacron -52 KPX Tcommaaccent eogonek -92 KPX Tcommaaccent hyphen -92 KPX Tcommaaccent i -18 KPX Tcommaaccent iacute -18 KPX Tcommaaccent iogonek -18 KPX Tcommaaccent o -92 KPX Tcommaaccent oacute -92 KPX Tcommaaccent ocircumflex -92 KPX Tcommaaccent odieresis -92 KPX Tcommaaccent ograve -92 KPX Tcommaaccent ohungarumlaut -92 KPX Tcommaaccent omacron -92 KPX Tcommaaccent oslash -92 KPX Tcommaaccent otilde -92 KPX Tcommaaccent period -90 KPX Tcommaaccent r -74 KPX Tcommaaccent racute -74 KPX Tcommaaccent rcaron -74 KPX Tcommaaccent rcommaaccent -74 KPX Tcommaaccent semicolon -74 KPX Tcommaaccent u -92 KPX Tcommaaccent uacute -92 KPX Tcommaaccent ucircumflex -92 KPX Tcommaaccent udieresis -92 KPX Tcommaaccent ugrave -92 KPX Tcommaaccent uhungarumlaut -92 KPX Tcommaaccent umacron -92 KPX Tcommaaccent uogonek -92 KPX Tcommaaccent uring -92 KPX Tcommaaccent w -74 KPX Tcommaaccent y -34 KPX Tcommaaccent yacute -34 KPX Tcommaaccent ydieresis -34 KPX U A -60 KPX U Aacute -60 KPX U Abreve -60 KPX U Acircumflex -60 KPX U Adieresis -60 KPX U Agrave -60 KPX U Amacron -60 KPX U Aogonek -60 KPX U Aring -60 KPX U Atilde -60 KPX U comma -50 KPX U period -50 KPX Uacute A -60 KPX Uacute Aacute -60 KPX Uacute Abreve -60 KPX Uacute Acircumflex -60 KPX Uacute Adieresis -60 KPX Uacute Agrave -60 KPX Uacute Amacron -60 KPX Uacute Aogonek -60 KPX Uacute Aring -60 KPX Uacute Atilde -60 KPX Uacute comma -50 KPX Uacute period -50 KPX Ucircumflex A -60 KPX Ucircumflex Aacute -60 KPX Ucircumflex Abreve -60 KPX Ucircumflex Acircumflex -60 KPX Ucircumflex Adieresis -60 KPX Ucircumflex Agrave -60 KPX Ucircumflex Amacron -60 KPX Ucircumflex Aogonek -60 KPX Ucircumflex Aring -60 KPX Ucircumflex Atilde -60 KPX Ucircumflex comma -50 KPX Ucircumflex period -50 KPX Udieresis A -60 KPX Udieresis Aacute -60 KPX Udieresis Abreve -60 KPX Udieresis Acircumflex -60 KPX Udieresis Adieresis -60 KPX Udieresis Agrave -60 KPX Udieresis Amacron -60 KPX Udieresis Aogonek -60 KPX Udieresis Aring -60 KPX Udieresis Atilde -60 KPX Udieresis comma -50 KPX Udieresis period -50 KPX Ugrave A -60 KPX Ugrave Aacute -60 KPX Ugrave Abreve -60 KPX Ugrave Acircumflex -60 KPX Ugrave Adieresis -60 KPX Ugrave Agrave -60 KPX Ugrave Amacron -60 KPX Ugrave Aogonek -60 KPX Ugrave Aring -60 KPX Ugrave Atilde -60 KPX Ugrave comma -50 KPX Ugrave period -50 KPX Uhungarumlaut A -60 KPX Uhungarumlaut Aacute -60 KPX Uhungarumlaut Abreve -60 KPX Uhungarumlaut Acircumflex -60 KPX Uhungarumlaut Adieresis -60 KPX Uhungarumlaut Agrave -60 KPX Uhungarumlaut Amacron -60 KPX Uhungarumlaut Aogonek -60 KPX Uhungarumlaut Aring -60 KPX Uhungarumlaut Atilde -60 KPX Uhungarumlaut comma -50 KPX Uhungarumlaut period -50 KPX Umacron A -60 KPX Umacron Aacute -60 KPX Umacron Abreve -60 KPX Umacron Acircumflex -60 KPX Umacron Adieresis -60 KPX Umacron Agrave -60 KPX Umacron Amacron -60 KPX Umacron Aogonek -60 KPX Umacron Aring -60 KPX Umacron Atilde -60 KPX Umacron comma -50 KPX Umacron period -50 KPX Uogonek A -60 KPX Uogonek Aacute -60 KPX Uogonek Abreve -60 KPX Uogonek Acircumflex -60 KPX Uogonek Adieresis -60 KPX Uogonek Agrave -60 KPX Uogonek Amacron -60 KPX Uogonek Aogonek -60 KPX Uogonek Aring -60 KPX Uogonek Atilde -60 KPX Uogonek comma -50 KPX Uogonek period -50 KPX Uring A -60 KPX Uring Aacute -60 KPX Uring Abreve -60 KPX Uring Acircumflex -60 KPX Uring Adieresis -60 KPX Uring Agrave -60 KPX Uring Amacron -60 KPX Uring Aogonek -60 KPX Uring Aring -60 KPX Uring Atilde -60 KPX Uring comma -50 KPX Uring period -50 KPX V A -135 KPX V Aacute -135 KPX V Abreve -135 KPX V Acircumflex -135 KPX V Adieresis -135 KPX V Agrave -135 KPX V Amacron -135 KPX V Aogonek -135 KPX V Aring -135 KPX V Atilde -135 KPX V G -30 KPX V Gbreve -30 KPX V Gcommaaccent -30 KPX V O -45 KPX V Oacute -45 KPX V Ocircumflex -45 KPX V Odieresis -45 KPX V Ograve -45 KPX V Ohungarumlaut -45 KPX V Omacron -45 KPX V Oslash -45 KPX V Otilde -45 KPX V a -92 KPX V aacute -92 KPX V abreve -92 KPX V acircumflex -92 KPX V adieresis -92 KPX V agrave -92 KPX V amacron -92 KPX V aogonek -92 KPX V aring -92 KPX V atilde -92 KPX V colon -92 KPX V comma -129 KPX V e -100 KPX V eacute -100 KPX V ecaron -100 KPX V ecircumflex -100 KPX V edieresis -100 KPX V edotaccent -100 KPX V egrave -100 KPX V emacron -100 KPX V eogonek -100 KPX V hyphen -74 KPX V i -37 KPX V iacute -37 KPX V icircumflex -37 KPX V idieresis -37 KPX V igrave -37 KPX V imacron -37 KPX V iogonek -37 KPX V o -100 KPX V oacute -100 KPX V ocircumflex -100 KPX V odieresis -100 KPX V ograve -100 KPX V ohungarumlaut -100 KPX V omacron -100 KPX V oslash -100 KPX V otilde -100 KPX V period -145 KPX V semicolon -92 KPX V u -92 KPX V uacute -92 KPX V ucircumflex -92 KPX V udieresis -92 KPX V ugrave -92 KPX V uhungarumlaut -92 KPX V umacron -92 KPX V uogonek -92 KPX V uring -92 KPX W A -120 KPX W Aacute -120 KPX W Abreve -120 KPX W Acircumflex -120 KPX W Adieresis -120 KPX W Agrave -120 KPX W Amacron -120 KPX W Aogonek -120 KPX W Aring -120 KPX W Atilde -120 KPX W O -10 KPX W Oacute -10 KPX W Ocircumflex -10 KPX W Odieresis -10 KPX W Ograve -10 KPX W Ohungarumlaut -10 KPX W Omacron -10 KPX W Oslash -10 KPX W Otilde -10 KPX W a -65 KPX W aacute -65 KPX W abreve -65 KPX W acircumflex -65 KPX W adieresis -65 KPX W agrave -65 KPX W amacron -65 KPX W aogonek -65 KPX W aring -65 KPX W atilde -65 KPX W colon -55 KPX W comma -92 KPX W e -65 KPX W eacute -65 KPX W ecaron -65 KPX W ecircumflex -65 KPX W edieresis -65 KPX W edotaccent -65 KPX W egrave -65 KPX W emacron -65 KPX W eogonek -65 KPX W hyphen -37 KPX W i -18 KPX W iacute -18 KPX W iogonek -18 KPX W o -75 KPX W oacute -75 KPX W ocircumflex -75 KPX W odieresis -75 KPX W ograve -75 KPX W ohungarumlaut -75 KPX W omacron -75 KPX W oslash -75 KPX W otilde -75 KPX W period -92 KPX W semicolon -55 KPX W u -50 KPX W uacute -50 KPX W ucircumflex -50 KPX W udieresis -50 KPX W ugrave -50 KPX W uhungarumlaut -50 KPX W umacron -50 KPX W uogonek -50 KPX W uring -50 KPX W y -60 KPX W yacute -60 KPX W ydieresis -60 KPX Y A -110 KPX Y Aacute -110 KPX Y Abreve -110 KPX Y Acircumflex -110 KPX Y Adieresis -110 KPX Y Agrave -110 KPX Y Amacron -110 KPX Y Aogonek -110 KPX Y Aring -110 KPX Y Atilde -110 KPX Y O -35 KPX Y Oacute -35 KPX Y Ocircumflex -35 KPX Y Odieresis -35 KPX Y Ograve -35 KPX Y Ohungarumlaut -35 KPX Y Omacron -35 KPX Y Oslash -35 KPX Y Otilde -35 KPX Y a -85 KPX Y aacute -85 KPX Y abreve -85 KPX Y acircumflex -85 KPX Y adieresis -85 KPX Y agrave -85 KPX Y amacron -85 KPX Y aogonek -85 KPX Y aring -85 KPX Y atilde -85 KPX Y colon -92 KPX Y comma -92 KPX Y e -111 KPX Y eacute -111 KPX Y ecaron -111 KPX Y ecircumflex -111 KPX Y edieresis -71 KPX Y edotaccent -111 KPX Y egrave -71 KPX Y emacron -71 KPX Y eogonek -111 KPX Y hyphen -92 KPX Y i -37 KPX Y iacute -37 KPX Y iogonek -37 KPX Y o -111 KPX Y oacute -111 KPX Y ocircumflex -111 KPX Y odieresis -111 KPX Y ograve -111 KPX Y ohungarumlaut -111 KPX Y omacron -111 KPX Y oslash -111 KPX Y otilde -111 KPX Y period -92 KPX Y semicolon -92 KPX Y u -92 KPX Y uacute -92 KPX Y ucircumflex -92 KPX Y udieresis -92 KPX Y ugrave -92 KPX Y uhungarumlaut -92 KPX Y umacron -92 KPX Y uogonek -92 KPX Y uring -92 KPX Yacute A -110 KPX Yacute Aacute -110 KPX Yacute Abreve -110 KPX Yacute Acircumflex -110 KPX Yacute Adieresis -110 KPX Yacute Agrave -110 KPX Yacute Amacron -110 KPX Yacute Aogonek -110 KPX Yacute Aring -110 KPX Yacute Atilde -110 KPX Yacute O -35 KPX Yacute Oacute -35 KPX Yacute Ocircumflex -35 KPX Yacute Odieresis -35 KPX Yacute Ograve -35 KPX Yacute Ohungarumlaut -35 KPX Yacute Omacron -35 KPX Yacute Oslash -35 KPX Yacute Otilde -35 KPX Yacute a -85 KPX Yacute aacute -85 KPX Yacute abreve -85 KPX Yacute acircumflex -85 KPX Yacute adieresis -85 KPX Yacute agrave -85 KPX Yacute amacron -85 KPX Yacute aogonek -85 KPX Yacute aring -85 KPX Yacute atilde -85 KPX Yacute colon -92 KPX Yacute comma -92 KPX Yacute e -111 KPX Yacute eacute -111 KPX Yacute ecaron -111 KPX Yacute ecircumflex -111 KPX Yacute edieresis -71 KPX Yacute edotaccent -111 KPX Yacute egrave -71 KPX Yacute emacron -71 KPX Yacute eogonek -111 KPX Yacute hyphen -92 KPX Yacute i -37 KPX Yacute iacute -37 KPX Yacute iogonek -37 KPX Yacute o -111 KPX Yacute oacute -111 KPX Yacute ocircumflex -111 KPX Yacute odieresis -111 KPX Yacute ograve -111 KPX Yacute ohungarumlaut -111 KPX Yacute omacron -111 KPX Yacute oslash -111 KPX Yacute otilde -111 KPX Yacute period -92 KPX Yacute semicolon -92 KPX Yacute u -92 KPX Yacute uacute -92 KPX Yacute ucircumflex -92 KPX Yacute udieresis -92 KPX Yacute ugrave -92 KPX Yacute uhungarumlaut -92 KPX Yacute umacron -92 KPX Yacute uogonek -92 KPX Yacute uring -92 KPX Ydieresis A -110 KPX Ydieresis Aacute -110 KPX Ydieresis Abreve -110 KPX Ydieresis Acircumflex -110 KPX Ydieresis Adieresis -110 KPX Ydieresis Agrave -110 KPX Ydieresis Amacron -110 KPX Ydieresis Aogonek -110 KPX Ydieresis Aring -110 KPX Ydieresis Atilde -110 KPX Ydieresis O -35 KPX Ydieresis Oacute -35 KPX Ydieresis Ocircumflex -35 KPX Ydieresis Odieresis -35 KPX Ydieresis Ograve -35 KPX Ydieresis Ohungarumlaut -35 KPX Ydieresis Omacron -35 KPX Ydieresis Oslash -35 KPX Ydieresis Otilde -35 KPX Ydieresis a -85 KPX Ydieresis aacute -85 KPX Ydieresis abreve -85 KPX Ydieresis acircumflex -85 KPX Ydieresis adieresis -85 KPX Ydieresis agrave -85 KPX Ydieresis amacron -85 KPX Ydieresis aogonek -85 KPX Ydieresis aring -85 KPX Ydieresis atilde -85 KPX Ydieresis colon -92 KPX Ydieresis comma -92 KPX Ydieresis e -111 KPX Ydieresis eacute -111 KPX Ydieresis ecaron -111 KPX Ydieresis ecircumflex -111 KPX Ydieresis edieresis -71 KPX Ydieresis edotaccent -111 KPX Ydieresis egrave -71 KPX Ydieresis emacron -71 KPX Ydieresis eogonek -111 KPX Ydieresis hyphen -92 KPX Ydieresis i -37 KPX Ydieresis iacute -37 KPX Ydieresis iogonek -37 KPX Ydieresis o -111 KPX Ydieresis oacute -111 KPX Ydieresis ocircumflex -111 KPX Ydieresis odieresis -111 KPX Ydieresis ograve -111 KPX Ydieresis ohungarumlaut -111 KPX Ydieresis omacron -111 KPX Ydieresis oslash -111 KPX Ydieresis otilde -111 KPX Ydieresis period -92 KPX Ydieresis semicolon -92 KPX Ydieresis u -92 KPX Ydieresis uacute -92 KPX Ydieresis ucircumflex -92 KPX Ydieresis udieresis -92 KPX Ydieresis ugrave -92 KPX Ydieresis uhungarumlaut -92 KPX Ydieresis umacron -92 KPX Ydieresis uogonek -92 KPX Ydieresis uring -92 KPX a v -25 KPX aacute v -25 KPX abreve v -25 KPX acircumflex v -25 KPX adieresis v -25 KPX agrave v -25 KPX amacron v -25 KPX aogonek v -25 KPX aring v -25 KPX atilde v -25 KPX b b -10 KPX b period -40 KPX b u -20 KPX b uacute -20 KPX b ucircumflex -20 KPX b udieresis -20 KPX b ugrave -20 KPX b uhungarumlaut -20 KPX b umacron -20 KPX b uogonek -20 KPX b uring -20 KPX b v -15 KPX comma quotedblright -45 KPX comma quoteright -55 KPX d w -15 KPX dcroat w -15 KPX e v -15 KPX eacute v -15 KPX ecaron v -15 KPX ecircumflex v -15 KPX edieresis v -15 KPX edotaccent v -15 KPX egrave v -15 KPX emacron v -15 KPX eogonek v -15 KPX f comma -15 KPX f dotlessi -35 KPX f i -25 KPX f o -25 KPX f oacute -25 KPX f ocircumflex -25 KPX f odieresis -25 KPX f ograve -25 KPX f ohungarumlaut -25 KPX f omacron -25 KPX f oslash -25 KPX f otilde -25 KPX f period -15 KPX f quotedblright 50 KPX f quoteright 55 KPX g period -15 KPX gbreve period -15 KPX gcommaaccent period -15 KPX h y -15 KPX h yacute -15 KPX h ydieresis -15 KPX i v -10 KPX iacute v -10 KPX icircumflex v -10 KPX idieresis v -10 KPX igrave v -10 KPX imacron v -10 KPX iogonek v -10 KPX k e -10 KPX k eacute -10 KPX k ecaron -10 KPX k ecircumflex -10 KPX k edieresis -10 KPX k edotaccent -10 KPX k egrave -10 KPX k emacron -10 KPX k eogonek -10 KPX k o -15 KPX k oacute -15 KPX k ocircumflex -15 KPX k odieresis -15 KPX k ograve -15 KPX k ohungarumlaut -15 KPX k omacron -15 KPX k oslash -15 KPX k otilde -15 KPX k y -15 KPX k yacute -15 KPX k ydieresis -15 KPX kcommaaccent e -10 KPX kcommaaccent eacute -10 KPX kcommaaccent ecaron -10 KPX kcommaaccent ecircumflex -10 KPX kcommaaccent edieresis -10 KPX kcommaaccent edotaccent -10 KPX kcommaaccent egrave -10 KPX kcommaaccent emacron -10 KPX kcommaaccent eogonek -10 KPX kcommaaccent o -15 KPX kcommaaccent oacute -15 KPX kcommaaccent ocircumflex -15 KPX kcommaaccent odieresis -15 KPX kcommaaccent ograve -15 KPX kcommaaccent ohungarumlaut -15 KPX kcommaaccent omacron -15 KPX kcommaaccent oslash -15 KPX kcommaaccent otilde -15 KPX kcommaaccent y -15 KPX kcommaaccent yacute -15 KPX kcommaaccent ydieresis -15 KPX n v -40 KPX nacute v -40 KPX ncaron v -40 KPX ncommaaccent v -40 KPX ntilde v -40 KPX o v -10 KPX o w -10 KPX oacute v -10 KPX oacute w -10 KPX ocircumflex v -10 KPX ocircumflex w -10 KPX odieresis v -10 KPX odieresis w -10 KPX ograve v -10 KPX ograve w -10 KPX ohungarumlaut v -10 KPX ohungarumlaut w -10 KPX omacron v -10 KPX omacron w -10 KPX oslash v -10 KPX oslash w -10 KPX otilde v -10 KPX otilde w -10 KPX period quotedblright -55 KPX period quoteright -55 KPX quotedblleft A -10 KPX quotedblleft Aacute -10 KPX quotedblleft Abreve -10 KPX quotedblleft Acircumflex -10 KPX quotedblleft Adieresis -10 KPX quotedblleft Agrave -10 KPX quotedblleft Amacron -10 KPX quotedblleft Aogonek -10 KPX quotedblleft Aring -10 KPX quotedblleft Atilde -10 KPX quoteleft A -10 KPX quoteleft Aacute -10 KPX quoteleft Abreve -10 KPX quoteleft Acircumflex -10 KPX quoteleft Adieresis -10 KPX quoteleft Agrave -10 KPX quoteleft Amacron -10 KPX quoteleft Aogonek -10 KPX quoteleft Aring -10 KPX quoteleft Atilde -10 KPX quoteleft quoteleft -63 KPX quoteright d -20 KPX quoteright dcroat -20 KPX quoteright quoteright -63 KPX quoteright r -20 KPX quoteright racute -20 KPX quoteright rcaron -20 KPX quoteright rcommaaccent -20 KPX quoteright s -37 KPX quoteright sacute -37 KPX quoteright scaron -37 KPX quoteright scedilla -37 KPX quoteright scommaaccent -37 KPX quoteright space -74 KPX quoteright v -20 KPX r c -18 KPX r cacute -18 KPX r ccaron -18 KPX r ccedilla -18 KPX r comma -92 KPX r e -18 KPX r eacute -18 KPX r ecaron -18 KPX r ecircumflex -18 KPX r edieresis -18 KPX r edotaccent -18 KPX r egrave -18 KPX r emacron -18 KPX r eogonek -18 KPX r g -10 KPX r gbreve -10 KPX r gcommaaccent -10 KPX r hyphen -37 KPX r n -15 KPX r nacute -15 KPX r ncaron -15 KPX r ncommaaccent -15 KPX r ntilde -15 KPX r o -18 KPX r oacute -18 KPX r ocircumflex -18 KPX r odieresis -18 KPX r ograve -18 KPX r ohungarumlaut -18 KPX r omacron -18 KPX r oslash -18 KPX r otilde -18 KPX r p -10 KPX r period -100 KPX r q -18 KPX r v -10 KPX racute c -18 KPX racute cacute -18 KPX racute ccaron -18 KPX racute ccedilla -18 KPX racute comma -92 KPX racute e -18 KPX racute eacute -18 KPX racute ecaron -18 KPX racute ecircumflex -18 KPX racute edieresis -18 KPX racute edotaccent -18 KPX racute egrave -18 KPX racute emacron -18 KPX racute eogonek -18 KPX racute g -10 KPX racute gbreve -10 KPX racute gcommaaccent -10 KPX racute hyphen -37 KPX racute n -15 KPX racute nacute -15 KPX racute ncaron -15 KPX racute ncommaaccent -15 KPX racute ntilde -15 KPX racute o -18 KPX racute oacute -18 KPX racute ocircumflex -18 KPX racute odieresis -18 KPX racute ograve -18 KPX racute ohungarumlaut -18 KPX racute omacron -18 KPX racute oslash -18 KPX racute otilde -18 KPX racute p -10 KPX racute period -100 KPX racute q -18 KPX racute v -10 KPX rcaron c -18 KPX rcaron cacute -18 KPX rcaron ccaron -18 KPX rcaron ccedilla -18 KPX rcaron comma -92 KPX rcaron e -18 KPX rcaron eacute -18 KPX rcaron ecaron -18 KPX rcaron ecircumflex -18 KPX rcaron edieresis -18 KPX rcaron edotaccent -18 KPX rcaron egrave -18 KPX rcaron emacron -18 KPX rcaron eogonek -18 KPX rcaron g -10 KPX rcaron gbreve -10 KPX rcaron gcommaaccent -10 KPX rcaron hyphen -37 KPX rcaron n -15 KPX rcaron nacute -15 KPX rcaron ncaron -15 KPX rcaron ncommaaccent -15 KPX rcaron ntilde -15 KPX rcaron o -18 KPX rcaron oacute -18 KPX rcaron ocircumflex -18 KPX rcaron odieresis -18 KPX rcaron ograve -18 KPX rcaron ohungarumlaut -18 KPX rcaron omacron -18 KPX rcaron oslash -18 KPX rcaron otilde -18 KPX rcaron p -10 KPX rcaron period -100 KPX rcaron q -18 KPX rcaron v -10 KPX rcommaaccent c -18 KPX rcommaaccent cacute -18 KPX rcommaaccent ccaron -18 KPX rcommaaccent ccedilla -18 KPX rcommaaccent comma -92 KPX rcommaaccent e -18 KPX rcommaaccent eacute -18 KPX rcommaaccent ecaron -18 KPX rcommaaccent ecircumflex -18 KPX rcommaaccent edieresis -18 KPX rcommaaccent edotaccent -18 KPX rcommaaccent egrave -18 KPX rcommaaccent emacron -18 KPX rcommaaccent eogonek -18 KPX rcommaaccent g -10 KPX rcommaaccent gbreve -10 KPX rcommaaccent gcommaaccent -10 KPX rcommaaccent hyphen -37 KPX rcommaaccent n -15 KPX rcommaaccent nacute -15 KPX rcommaaccent ncaron -15 KPX rcommaaccent ncommaaccent -15 KPX rcommaaccent ntilde -15 KPX rcommaaccent o -18 KPX rcommaaccent oacute -18 KPX rcommaaccent ocircumflex -18 KPX rcommaaccent odieresis -18 KPX rcommaaccent ograve -18 KPX rcommaaccent ohungarumlaut -18 KPX rcommaaccent omacron -18 KPX rcommaaccent oslash -18 KPX rcommaaccent otilde -18 KPX rcommaaccent p -10 KPX rcommaaccent period -100 KPX rcommaaccent q -18 KPX rcommaaccent v -10 KPX space A -55 KPX space Aacute -55 KPX space Abreve -55 KPX space Acircumflex -55 KPX space Adieresis -55 KPX space Agrave -55 KPX space Amacron -55 KPX space Aogonek -55 KPX space Aring -55 KPX space Atilde -55 KPX space T -30 KPX space Tcaron -30 KPX space Tcommaaccent -30 KPX space V -45 KPX space W -30 KPX space Y -55 KPX space Yacute -55 KPX space Ydieresis -55 KPX v a -10 KPX v aacute -10 KPX v abreve -10 KPX v acircumflex -10 KPX v adieresis -10 KPX v agrave -10 KPX v amacron -10 KPX v aogonek -10 KPX v aring -10 KPX v atilde -10 KPX v comma -55 KPX v e -10 KPX v eacute -10 KPX v ecaron -10 KPX v ecircumflex -10 KPX v edieresis -10 KPX v edotaccent -10 KPX v egrave -10 KPX v emacron -10 KPX v eogonek -10 KPX v o -10 KPX v oacute -10 KPX v ocircumflex -10 KPX v odieresis -10 KPX v ograve -10 KPX v ohungarumlaut -10 KPX v omacron -10 KPX v oslash -10 KPX v otilde -10 KPX v period -70 KPX w comma -55 KPX w o -10 KPX w oacute -10 KPX w ocircumflex -10 KPX w odieresis -10 KPX w ograve -10 KPX w ohungarumlaut -10 KPX w omacron -10 KPX w oslash -10 KPX w otilde -10 KPX w period -70 KPX y comma -55 KPX y e -10 KPX y eacute -10 KPX y ecaron -10 KPX y ecircumflex -10 KPX y edieresis -10 KPX y edotaccent -10 KPX y egrave -10 KPX y emacron -10 KPX y eogonek -10 KPX y o -25 KPX y oacute -25 KPX y ocircumflex -25 KPX y odieresis -25 KPX y ograve -25 KPX y ohungarumlaut -25 KPX y omacron -25 KPX y oslash -25 KPX y otilde -25 KPX y period -70 KPX yacute comma -55 KPX yacute e -10 KPX yacute eacute -10 KPX yacute ecaron -10 KPX yacute ecircumflex -10 KPX yacute edieresis -10 KPX yacute edotaccent -10 KPX yacute egrave -10 KPX yacute emacron -10 KPX yacute eogonek -10 KPX yacute o -25 KPX yacute oacute -25 KPX yacute ocircumflex -25 KPX yacute odieresis -25 KPX yacute ograve -25 KPX yacute ohungarumlaut -25 KPX yacute omacron -25 KPX yacute oslash -25 KPX yacute otilde -25 KPX yacute period -70 KPX ydieresis comma -55 KPX ydieresis e -10 KPX ydieresis eacute -10 KPX ydieresis ecaron -10 KPX ydieresis ecircumflex -10 KPX ydieresis edieresis -10 KPX ydieresis edotaccent -10 KPX ydieresis egrave -10 KPX ydieresis emacron -10 KPX ydieresis eogonek -10 KPX ydieresis o -25 KPX ydieresis oacute -25 KPX ydieresis ocircumflex -25 KPX ydieresis odieresis -25 KPX ydieresis ograve -25 KPX ydieresis ohungarumlaut -25 KPX ydieresis omacron -25 KPX ydieresis oslash -25 KPX ydieresis otilde -25 KPX ydieresis period -70 EndKernPairs EndKernData EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/pdfcorefonts/Times-BoldItalic.afm ================================================ StartFontMetrics 4.1 Comment Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Thu May 1 13:04:06 1997 Comment UniqueID 43066 Comment VMusage 45874 56899 FontName Times-BoldItalic FullName Times Bold Italic FamilyName Times Weight Bold ItalicAngle -15 IsFixedPitch false CharacterSet ExtendedRoman FontBBox -200 -218 996 921 UnderlinePosition -100 UnderlineThickness 50 Version 002.000 Notice Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype-Hell AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 669 XHeight 462 Ascender 683 Descender -217 StdHW 42 StdVW 121 StartCharMetrics 315 C 32 ; WX 250 ; N space ; B 0 0 0 0 ; C 33 ; WX 389 ; N exclam ; B 67 -13 370 684 ; C 34 ; WX 555 ; N quotedbl ; B 136 398 536 685 ; C 35 ; WX 500 ; N numbersign ; B -33 0 533 700 ; C 36 ; WX 500 ; N dollar ; B -20 -100 497 733 ; C 37 ; WX 833 ; N percent ; B 39 -10 793 692 ; C 38 ; WX 778 ; N ampersand ; B 5 -19 699 682 ; C 39 ; WX 333 ; N quoteright ; B 98 369 302 685 ; C 40 ; WX 333 ; N parenleft ; B 28 -179 344 685 ; C 41 ; WX 333 ; N parenright ; B -44 -179 271 685 ; C 42 ; WX 500 ; N asterisk ; B 65 249 456 685 ; C 43 ; WX 570 ; N plus ; B 33 0 537 506 ; C 44 ; WX 250 ; N comma ; B -60 -182 144 134 ; C 45 ; WX 333 ; N hyphen ; B 2 166 271 282 ; C 46 ; WX 250 ; N period ; B -9 -13 139 135 ; C 47 ; WX 278 ; N slash ; B -64 -18 342 685 ; C 48 ; WX 500 ; N zero ; B 17 -14 477 683 ; C 49 ; WX 500 ; N one ; B 5 0 419 683 ; C 50 ; WX 500 ; N two ; B -27 0 446 683 ; C 51 ; WX 500 ; N three ; B -15 -13 450 683 ; C 52 ; WX 500 ; N four ; B -15 0 503 683 ; C 53 ; WX 500 ; N five ; B -11 -13 487 669 ; C 54 ; WX 500 ; N six ; B 23 -15 509 679 ; C 55 ; WX 500 ; N seven ; B 52 0 525 669 ; C 56 ; WX 500 ; N eight ; B 3 -13 476 683 ; C 57 ; WX 500 ; N nine ; B -12 -10 475 683 ; C 58 ; WX 333 ; N colon ; B 23 -13 264 459 ; C 59 ; WX 333 ; N semicolon ; B -25 -183 264 459 ; C 60 ; WX 570 ; N less ; B 31 -8 539 514 ; C 61 ; WX 570 ; N equal ; B 33 107 537 399 ; C 62 ; WX 570 ; N greater ; B 31 -8 539 514 ; C 63 ; WX 500 ; N question ; B 79 -13 470 684 ; C 64 ; WX 832 ; N at ; B 63 -18 770 685 ; C 65 ; WX 667 ; N A ; B -67 0 593 683 ; C 66 ; WX 667 ; N B ; B -24 0 624 669 ; C 67 ; WX 667 ; N C ; B 32 -18 677 685 ; C 68 ; WX 722 ; N D ; B -46 0 685 669 ; C 69 ; WX 667 ; N E ; B -27 0 653 669 ; C 70 ; WX 667 ; N F ; B -13 0 660 669 ; C 71 ; WX 722 ; N G ; B 21 -18 706 685 ; C 72 ; WX 778 ; N H ; B -24 0 799 669 ; C 73 ; WX 389 ; N I ; B -32 0 406 669 ; C 74 ; WX 500 ; N J ; B -46 -99 524 669 ; C 75 ; WX 667 ; N K ; B -21 0 702 669 ; C 76 ; WX 611 ; N L ; B -22 0 590 669 ; C 77 ; WX 889 ; N M ; B -29 -12 917 669 ; C 78 ; WX 722 ; N N ; B -27 -15 748 669 ; C 79 ; WX 722 ; N O ; B 27 -18 691 685 ; C 80 ; WX 611 ; N P ; B -27 0 613 669 ; C 81 ; WX 722 ; N Q ; B 27 -208 691 685 ; C 82 ; WX 667 ; N R ; B -29 0 623 669 ; C 83 ; WX 556 ; N S ; B 2 -18 526 685 ; C 84 ; WX 611 ; N T ; B 50 0 650 669 ; C 85 ; WX 722 ; N U ; B 67 -18 744 669 ; C 86 ; WX 667 ; N V ; B 65 -18 715 669 ; C 87 ; WX 889 ; N W ; B 65 -18 940 669 ; C 88 ; WX 667 ; N X ; B -24 0 694 669 ; C 89 ; WX 611 ; N Y ; B 73 0 659 669 ; C 90 ; WX 611 ; N Z ; B -11 0 590 669 ; C 91 ; WX 333 ; N bracketleft ; B -37 -159 362 674 ; C 92 ; WX 278 ; N backslash ; B -1 -18 279 685 ; C 93 ; WX 333 ; N bracketright ; B -56 -157 343 674 ; C 94 ; WX 570 ; N asciicircum ; B 67 304 503 669 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 333 ; N quoteleft ; B 128 369 332 685 ; C 97 ; WX 500 ; N a ; B -21 -14 455 462 ; C 98 ; WX 500 ; N b ; B -14 -13 444 699 ; C 99 ; WX 444 ; N c ; B -5 -13 392 462 ; C 100 ; WX 500 ; N d ; B -21 -13 517 699 ; C 101 ; WX 444 ; N e ; B 5 -13 398 462 ; C 102 ; WX 333 ; N f ; B -169 -205 446 698 ; L i fi ; L l fl ; C 103 ; WX 500 ; N g ; B -52 -203 478 462 ; C 104 ; WX 556 ; N h ; B -13 -9 498 699 ; C 105 ; WX 278 ; N i ; B 2 -9 263 684 ; C 106 ; WX 278 ; N j ; B -189 -207 279 684 ; C 107 ; WX 500 ; N k ; B -23 -8 483 699 ; C 108 ; WX 278 ; N l ; B 2 -9 290 699 ; C 109 ; WX 778 ; N m ; B -14 -9 722 462 ; C 110 ; WX 556 ; N n ; B -6 -9 493 462 ; C 111 ; WX 500 ; N o ; B -3 -13 441 462 ; C 112 ; WX 500 ; N p ; B -120 -205 446 462 ; C 113 ; WX 500 ; N q ; B 1 -205 471 462 ; C 114 ; WX 389 ; N r ; B -21 0 389 462 ; C 115 ; WX 389 ; N s ; B -19 -13 333 462 ; C 116 ; WX 278 ; N t ; B -11 -9 281 594 ; C 117 ; WX 556 ; N u ; B 15 -9 492 462 ; C 118 ; WX 444 ; N v ; B 16 -13 401 462 ; C 119 ; WX 667 ; N w ; B 16 -13 614 462 ; C 120 ; WX 500 ; N x ; B -46 -13 469 462 ; C 121 ; WX 444 ; N y ; B -94 -205 392 462 ; C 122 ; WX 389 ; N z ; B -43 -78 368 449 ; C 123 ; WX 348 ; N braceleft ; B 5 -187 436 686 ; C 124 ; WX 220 ; N bar ; B 66 -218 154 782 ; C 125 ; WX 348 ; N braceright ; B -129 -187 302 686 ; C 126 ; WX 570 ; N asciitilde ; B 54 173 516 333 ; C 161 ; WX 389 ; N exclamdown ; B 19 -205 322 492 ; C 162 ; WX 500 ; N cent ; B 42 -143 439 576 ; C 163 ; WX 500 ; N sterling ; B -32 -12 510 683 ; C 164 ; WX 167 ; N fraction ; B -169 -14 324 683 ; C 165 ; WX 500 ; N yen ; B 33 0 628 669 ; C 166 ; WX 500 ; N florin ; B -87 -156 537 707 ; C 167 ; WX 500 ; N section ; B 36 -143 459 685 ; C 168 ; WX 500 ; N currency ; B -26 34 526 586 ; C 169 ; WX 278 ; N quotesingle ; B 128 398 268 685 ; C 170 ; WX 500 ; N quotedblleft ; B 53 369 513 685 ; C 171 ; WX 500 ; N guillemotleft ; B 12 32 468 415 ; C 172 ; WX 333 ; N guilsinglleft ; B 32 32 303 415 ; C 173 ; WX 333 ; N guilsinglright ; B 10 32 281 415 ; C 174 ; WX 556 ; N fi ; B -188 -205 514 703 ; C 175 ; WX 556 ; N fl ; B -186 -205 553 704 ; C 177 ; WX 500 ; N endash ; B -40 178 477 269 ; C 178 ; WX 500 ; N dagger ; B 91 -145 494 685 ; C 179 ; WX 500 ; N daggerdbl ; B 10 -139 493 685 ; C 180 ; WX 250 ; N periodcentered ; B 51 257 199 405 ; C 182 ; WX 500 ; N paragraph ; B -57 -193 562 669 ; C 183 ; WX 350 ; N bullet ; B 0 175 350 525 ; C 184 ; WX 333 ; N quotesinglbase ; B -5 -182 199 134 ; C 185 ; WX 500 ; N quotedblbase ; B -57 -182 403 134 ; C 186 ; WX 500 ; N quotedblright ; B 53 369 513 685 ; C 187 ; WX 500 ; N guillemotright ; B 12 32 468 415 ; C 188 ; WX 1000 ; N ellipsis ; B 40 -13 852 135 ; C 189 ; WX 1000 ; N perthousand ; B 7 -29 996 706 ; C 191 ; WX 500 ; N questiondown ; B 30 -205 421 492 ; C 193 ; WX 333 ; N grave ; B 85 516 297 697 ; C 194 ; WX 333 ; N acute ; B 139 516 379 697 ; C 195 ; WX 333 ; N circumflex ; B 40 516 367 690 ; C 196 ; WX 333 ; N tilde ; B 48 536 407 655 ; C 197 ; WX 333 ; N macron ; B 51 553 393 623 ; C 198 ; WX 333 ; N breve ; B 71 516 387 678 ; C 199 ; WX 333 ; N dotaccent ; B 163 550 298 684 ; C 200 ; WX 333 ; N dieresis ; B 55 550 402 684 ; C 202 ; WX 333 ; N ring ; B 127 516 340 729 ; C 203 ; WX 333 ; N cedilla ; B -80 -218 156 5 ; C 205 ; WX 333 ; N hungarumlaut ; B 69 516 498 697 ; C 206 ; WX 333 ; N ogonek ; B 15 -183 244 34 ; C 207 ; WX 333 ; N caron ; B 79 516 411 690 ; C 208 ; WX 1000 ; N emdash ; B -40 178 977 269 ; C 225 ; WX 944 ; N AE ; B -64 0 918 669 ; C 227 ; WX 266 ; N ordfeminine ; B 16 399 330 685 ; C 232 ; WX 611 ; N Lslash ; B -22 0 590 669 ; C 233 ; WX 722 ; N Oslash ; B 27 -125 691 764 ; C 234 ; WX 944 ; N OE ; B 23 -8 946 677 ; C 235 ; WX 300 ; N ordmasculine ; B 56 400 347 685 ; C 241 ; WX 722 ; N ae ; B -5 -13 673 462 ; C 245 ; WX 278 ; N dotlessi ; B 2 -9 238 462 ; C 248 ; WX 278 ; N lslash ; B -7 -9 307 699 ; C 249 ; WX 500 ; N oslash ; B -3 -119 441 560 ; C 250 ; WX 722 ; N oe ; B 6 -13 674 462 ; C 251 ; WX 500 ; N germandbls ; B -200 -200 473 705 ; C -1 ; WX 389 ; N Idieresis ; B -32 0 450 862 ; C -1 ; WX 444 ; N eacute ; B 5 -13 435 697 ; C -1 ; WX 500 ; N abreve ; B -21 -14 471 678 ; C -1 ; WX 556 ; N uhungarumlaut ; B 15 -9 610 697 ; C -1 ; WX 444 ; N ecaron ; B 5 -13 467 690 ; C -1 ; WX 611 ; N Ydieresis ; B 73 0 659 862 ; C -1 ; WX 570 ; N divide ; B 33 -29 537 535 ; C -1 ; WX 611 ; N Yacute ; B 73 0 659 904 ; C -1 ; WX 667 ; N Acircumflex ; B -67 0 593 897 ; C -1 ; WX 500 ; N aacute ; B -21 -14 463 697 ; C -1 ; WX 722 ; N Ucircumflex ; B 67 -18 744 897 ; C -1 ; WX 444 ; N yacute ; B -94 -205 435 697 ; C -1 ; WX 389 ; N scommaaccent ; B -19 -218 333 462 ; C -1 ; WX 444 ; N ecircumflex ; B 5 -13 423 690 ; C -1 ; WX 722 ; N Uring ; B 67 -18 744 921 ; C -1 ; WX 722 ; N Udieresis ; B 67 -18 744 862 ; C -1 ; WX 500 ; N aogonek ; B -21 -183 455 462 ; C -1 ; WX 722 ; N Uacute ; B 67 -18 744 904 ; C -1 ; WX 556 ; N uogonek ; B 15 -183 492 462 ; C -1 ; WX 667 ; N Edieresis ; B -27 0 653 862 ; C -1 ; WX 722 ; N Dcroat ; B -31 0 700 669 ; C -1 ; WX 250 ; N commaaccent ; B -36 -218 131 -50 ; C -1 ; WX 747 ; N copyright ; B 30 -18 718 685 ; C -1 ; WX 667 ; N Emacron ; B -27 0 653 830 ; C -1 ; WX 444 ; N ccaron ; B -5 -13 467 690 ; C -1 ; WX 500 ; N aring ; B -21 -14 455 729 ; C -1 ; WX 722 ; N Ncommaaccent ; B -27 -218 748 669 ; C -1 ; WX 278 ; N lacute ; B 2 -9 392 904 ; C -1 ; WX 500 ; N agrave ; B -21 -14 455 697 ; C -1 ; WX 611 ; N Tcommaaccent ; B 50 -218 650 669 ; C -1 ; WX 667 ; N Cacute ; B 32 -18 677 904 ; C -1 ; WX 500 ; N atilde ; B -21 -14 491 655 ; C -1 ; WX 667 ; N Edotaccent ; B -27 0 653 862 ; C -1 ; WX 389 ; N scaron ; B -19 -13 424 690 ; C -1 ; WX 389 ; N scedilla ; B -19 -218 333 462 ; C -1 ; WX 278 ; N iacute ; B 2 -9 352 697 ; C -1 ; WX 494 ; N lozenge ; B 10 0 484 745 ; C -1 ; WX 667 ; N Rcaron ; B -29 0 623 897 ; C -1 ; WX 722 ; N Gcommaaccent ; B 21 -218 706 685 ; C -1 ; WX 556 ; N ucircumflex ; B 15 -9 492 690 ; C -1 ; WX 500 ; N acircumflex ; B -21 -14 455 690 ; C -1 ; WX 667 ; N Amacron ; B -67 0 593 830 ; C -1 ; WX 389 ; N rcaron ; B -21 0 424 690 ; C -1 ; WX 444 ; N ccedilla ; B -5 -218 392 462 ; C -1 ; WX 611 ; N Zdotaccent ; B -11 0 590 862 ; C -1 ; WX 611 ; N Thorn ; B -27 0 573 669 ; C -1 ; WX 722 ; N Omacron ; B 27 -18 691 830 ; C -1 ; WX 667 ; N Racute ; B -29 0 623 904 ; C -1 ; WX 556 ; N Sacute ; B 2 -18 531 904 ; C -1 ; WX 608 ; N dcaron ; B -21 -13 675 708 ; C -1 ; WX 722 ; N Umacron ; B 67 -18 744 830 ; C -1 ; WX 556 ; N uring ; B 15 -9 492 729 ; C -1 ; WX 300 ; N threesuperior ; B 17 265 321 683 ; C -1 ; WX 722 ; N Ograve ; B 27 -18 691 904 ; C -1 ; WX 667 ; N Agrave ; B -67 0 593 904 ; C -1 ; WX 667 ; N Abreve ; B -67 0 593 885 ; C -1 ; WX 570 ; N multiply ; B 48 16 522 490 ; C -1 ; WX 556 ; N uacute ; B 15 -9 492 697 ; C -1 ; WX 611 ; N Tcaron ; B 50 0 650 897 ; C -1 ; WX 494 ; N partialdiff ; B 11 -21 494 750 ; C -1 ; WX 444 ; N ydieresis ; B -94 -205 443 655 ; C -1 ; WX 722 ; N Nacute ; B -27 -15 748 904 ; C -1 ; WX 278 ; N icircumflex ; B -3 -9 324 690 ; C -1 ; WX 667 ; N Ecircumflex ; B -27 0 653 897 ; C -1 ; WX 500 ; N adieresis ; B -21 -14 476 655 ; C -1 ; WX 444 ; N edieresis ; B 5 -13 448 655 ; C -1 ; WX 444 ; N cacute ; B -5 -13 435 697 ; C -1 ; WX 556 ; N nacute ; B -6 -9 493 697 ; C -1 ; WX 556 ; N umacron ; B 15 -9 492 623 ; C -1 ; WX 722 ; N Ncaron ; B -27 -15 748 897 ; C -1 ; WX 389 ; N Iacute ; B -32 0 432 904 ; C -1 ; WX 570 ; N plusminus ; B 33 0 537 506 ; C -1 ; WX 220 ; N brokenbar ; B 66 -143 154 707 ; C -1 ; WX 747 ; N registered ; B 30 -18 718 685 ; C -1 ; WX 722 ; N Gbreve ; B 21 -18 706 885 ; C -1 ; WX 389 ; N Idotaccent ; B -32 0 406 862 ; C -1 ; WX 600 ; N summation ; B 14 -10 585 706 ; C -1 ; WX 667 ; N Egrave ; B -27 0 653 904 ; C -1 ; WX 389 ; N racute ; B -21 0 407 697 ; C -1 ; WX 500 ; N omacron ; B -3 -13 462 623 ; C -1 ; WX 611 ; N Zacute ; B -11 0 590 904 ; C -1 ; WX 611 ; N Zcaron ; B -11 0 590 897 ; C -1 ; WX 549 ; N greaterequal ; B 26 0 523 704 ; C -1 ; WX 722 ; N Eth ; B -31 0 700 669 ; C -1 ; WX 667 ; N Ccedilla ; B 32 -218 677 685 ; C -1 ; WX 278 ; N lcommaaccent ; B -42 -218 290 699 ; C -1 ; WX 366 ; N tcaron ; B -11 -9 434 754 ; C -1 ; WX 444 ; N eogonek ; B 5 -183 398 462 ; C -1 ; WX 722 ; N Uogonek ; B 67 -183 744 669 ; C -1 ; WX 667 ; N Aacute ; B -67 0 593 904 ; C -1 ; WX 667 ; N Adieresis ; B -67 0 593 862 ; C -1 ; WX 444 ; N egrave ; B 5 -13 398 697 ; C -1 ; WX 389 ; N zacute ; B -43 -78 407 697 ; C -1 ; WX 278 ; N iogonek ; B -20 -183 263 684 ; C -1 ; WX 722 ; N Oacute ; B 27 -18 691 904 ; C -1 ; WX 500 ; N oacute ; B -3 -13 463 697 ; C -1 ; WX 500 ; N amacron ; B -21 -14 467 623 ; C -1 ; WX 389 ; N sacute ; B -19 -13 407 697 ; C -1 ; WX 278 ; N idieresis ; B 2 -9 364 655 ; C -1 ; WX 722 ; N Ocircumflex ; B 27 -18 691 897 ; C -1 ; WX 722 ; N Ugrave ; B 67 -18 744 904 ; C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; C -1 ; WX 500 ; N thorn ; B -120 -205 446 699 ; C -1 ; WX 300 ; N twosuperior ; B 2 274 313 683 ; C -1 ; WX 722 ; N Odieresis ; B 27 -18 691 862 ; C -1 ; WX 576 ; N mu ; B -60 -207 516 449 ; C -1 ; WX 278 ; N igrave ; B 2 -9 259 697 ; C -1 ; WX 500 ; N ohungarumlaut ; B -3 -13 582 697 ; C -1 ; WX 667 ; N Eogonek ; B -27 -183 653 669 ; C -1 ; WX 500 ; N dcroat ; B -21 -13 552 699 ; C -1 ; WX 750 ; N threequarters ; B 7 -14 726 683 ; C -1 ; WX 556 ; N Scedilla ; B 2 -218 526 685 ; C -1 ; WX 382 ; N lcaron ; B 2 -9 448 708 ; C -1 ; WX 667 ; N Kcommaaccent ; B -21 -218 702 669 ; C -1 ; WX 611 ; N Lacute ; B -22 0 590 904 ; C -1 ; WX 1000 ; N trademark ; B 32 263 968 669 ; C -1 ; WX 444 ; N edotaccent ; B 5 -13 398 655 ; C -1 ; WX 389 ; N Igrave ; B -32 0 406 904 ; C -1 ; WX 389 ; N Imacron ; B -32 0 461 830 ; C -1 ; WX 611 ; N Lcaron ; B -22 0 671 718 ; C -1 ; WX 750 ; N onehalf ; B -9 -14 723 683 ; C -1 ; WX 549 ; N lessequal ; B 29 0 526 704 ; C -1 ; WX 500 ; N ocircumflex ; B -3 -13 451 690 ; C -1 ; WX 556 ; N ntilde ; B -6 -9 504 655 ; C -1 ; WX 722 ; N Uhungarumlaut ; B 67 -18 744 904 ; C -1 ; WX 667 ; N Eacute ; B -27 0 653 904 ; C -1 ; WX 444 ; N emacron ; B 5 -13 439 623 ; C -1 ; WX 500 ; N gbreve ; B -52 -203 478 678 ; C -1 ; WX 750 ; N onequarter ; B 7 -14 721 683 ; C -1 ; WX 556 ; N Scaron ; B 2 -18 553 897 ; C -1 ; WX 556 ; N Scommaaccent ; B 2 -218 526 685 ; C -1 ; WX 722 ; N Ohungarumlaut ; B 27 -18 723 904 ; C -1 ; WX 400 ; N degree ; B 83 397 369 683 ; C -1 ; WX 500 ; N ograve ; B -3 -13 441 697 ; C -1 ; WX 667 ; N Ccaron ; B 32 -18 677 897 ; C -1 ; WX 556 ; N ugrave ; B 15 -9 492 697 ; C -1 ; WX 549 ; N radical ; B 10 -46 512 850 ; C -1 ; WX 722 ; N Dcaron ; B -46 0 685 897 ; C -1 ; WX 389 ; N rcommaaccent ; B -67 -218 389 462 ; C -1 ; WX 722 ; N Ntilde ; B -27 -15 748 862 ; C -1 ; WX 500 ; N otilde ; B -3 -13 491 655 ; C -1 ; WX 667 ; N Rcommaaccent ; B -29 -218 623 669 ; C -1 ; WX 611 ; N Lcommaaccent ; B -22 -218 590 669 ; C -1 ; WX 667 ; N Atilde ; B -67 0 593 862 ; C -1 ; WX 667 ; N Aogonek ; B -67 -183 604 683 ; C -1 ; WX 667 ; N Aring ; B -67 0 593 921 ; C -1 ; WX 722 ; N Otilde ; B 27 -18 691 862 ; C -1 ; WX 389 ; N zdotaccent ; B -43 -78 368 655 ; C -1 ; WX 667 ; N Ecaron ; B -27 0 653 897 ; C -1 ; WX 389 ; N Iogonek ; B -32 -183 406 669 ; C -1 ; WX 500 ; N kcommaaccent ; B -23 -218 483 699 ; C -1 ; WX 606 ; N minus ; B 51 209 555 297 ; C -1 ; WX 389 ; N Icircumflex ; B -32 0 450 897 ; C -1 ; WX 556 ; N ncaron ; B -6 -9 523 690 ; C -1 ; WX 278 ; N tcommaaccent ; B -62 -218 281 594 ; C -1 ; WX 606 ; N logicalnot ; B 51 108 555 399 ; C -1 ; WX 500 ; N odieresis ; B -3 -13 471 655 ; C -1 ; WX 556 ; N udieresis ; B 15 -9 499 655 ; C -1 ; WX 549 ; N notequal ; B 15 -49 540 570 ; C -1 ; WX 500 ; N gcommaaccent ; B -52 -203 478 767 ; C -1 ; WX 500 ; N eth ; B -3 -13 454 699 ; C -1 ; WX 389 ; N zcaron ; B -43 -78 424 690 ; C -1 ; WX 556 ; N ncommaaccent ; B -6 -218 493 462 ; C -1 ; WX 300 ; N onesuperior ; B 30 274 301 683 ; C -1 ; WX 278 ; N imacron ; B 2 -9 294 623 ; C -1 ; WX 500 ; N Euro ; B 0 0 0 0 ; EndCharMetrics StartKernData StartKernPairs 2038 KPX A C -65 KPX A Cacute -65 KPX A Ccaron -65 KPX A Ccedilla -65 KPX A G -60 KPX A Gbreve -60 KPX A Gcommaaccent -60 KPX A O -50 KPX A Oacute -50 KPX A Ocircumflex -50 KPX A Odieresis -50 KPX A Ograve -50 KPX A Ohungarumlaut -50 KPX A Omacron -50 KPX A Oslash -50 KPX A Otilde -50 KPX A Q -55 KPX A T -55 KPX A Tcaron -55 KPX A Tcommaaccent -55 KPX A U -50 KPX A Uacute -50 KPX A Ucircumflex -50 KPX A Udieresis -50 KPX A Ugrave -50 KPX A Uhungarumlaut -50 KPX A Umacron -50 KPX A Uogonek -50 KPX A Uring -50 KPX A V -95 KPX A W -100 KPX A Y -70 KPX A Yacute -70 KPX A Ydieresis -70 KPX A quoteright -74 KPX A u -30 KPX A uacute -30 KPX A ucircumflex -30 KPX A udieresis -30 KPX A ugrave -30 KPX A uhungarumlaut -30 KPX A umacron -30 KPX A uogonek -30 KPX A uring -30 KPX A v -74 KPX A w -74 KPX A y -74 KPX A yacute -74 KPX A ydieresis -74 KPX Aacute C -65 KPX Aacute Cacute -65 KPX Aacute Ccaron -65 KPX Aacute Ccedilla -65 KPX Aacute G -60 KPX Aacute Gbreve -60 KPX Aacute Gcommaaccent -60 KPX Aacute O -50 KPX Aacute Oacute -50 KPX Aacute Ocircumflex -50 KPX Aacute Odieresis -50 KPX Aacute Ograve -50 KPX Aacute Ohungarumlaut -50 KPX Aacute Omacron -50 KPX Aacute Oslash -50 KPX Aacute Otilde -50 KPX Aacute Q -55 KPX Aacute T -55 KPX Aacute Tcaron -55 KPX Aacute Tcommaaccent -55 KPX Aacute U -50 KPX Aacute Uacute -50 KPX Aacute Ucircumflex -50 KPX Aacute Udieresis -50 KPX Aacute Ugrave -50 KPX Aacute Uhungarumlaut -50 KPX Aacute Umacron -50 KPX Aacute Uogonek -50 KPX Aacute Uring -50 KPX Aacute V -95 KPX Aacute W -100 KPX Aacute Y -70 KPX Aacute Yacute -70 KPX Aacute Ydieresis -70 KPX Aacute quoteright -74 KPX Aacute u -30 KPX Aacute uacute -30 KPX Aacute ucircumflex -30 KPX Aacute udieresis -30 KPX Aacute ugrave -30 KPX Aacute uhungarumlaut -30 KPX Aacute umacron -30 KPX Aacute uogonek -30 KPX Aacute uring -30 KPX Aacute v -74 KPX Aacute w -74 KPX Aacute y -74 KPX Aacute yacute -74 KPX Aacute ydieresis -74 KPX Abreve C -65 KPX Abreve Cacute -65 KPX Abreve Ccaron -65 KPX Abreve Ccedilla -65 KPX Abreve G -60 KPX Abreve Gbreve -60 KPX Abreve Gcommaaccent -60 KPX Abreve O -50 KPX Abreve Oacute -50 KPX Abreve Ocircumflex -50 KPX Abreve Odieresis -50 KPX Abreve Ograve -50 KPX Abreve Ohungarumlaut -50 KPX Abreve Omacron -50 KPX Abreve Oslash -50 KPX Abreve Otilde -50 KPX Abreve Q -55 KPX Abreve T -55 KPX Abreve Tcaron -55 KPX Abreve Tcommaaccent -55 KPX Abreve U -50 KPX Abreve Uacute -50 KPX Abreve Ucircumflex -50 KPX Abreve Udieresis -50 KPX Abreve Ugrave -50 KPX Abreve Uhungarumlaut -50 KPX Abreve Umacron -50 KPX Abreve Uogonek -50 KPX Abreve Uring -50 KPX Abreve V -95 KPX Abreve W -100 KPX Abreve Y -70 KPX Abreve Yacute -70 KPX Abreve Ydieresis -70 KPX Abreve quoteright -74 KPX Abreve u -30 KPX Abreve uacute -30 KPX Abreve ucircumflex -30 KPX Abreve udieresis -30 KPX Abreve ugrave -30 KPX Abreve uhungarumlaut -30 KPX Abreve umacron -30 KPX Abreve uogonek -30 KPX Abreve uring -30 KPX Abreve v -74 KPX Abreve w -74 KPX Abreve y -74 KPX Abreve yacute -74 KPX Abreve ydieresis -74 KPX Acircumflex C -65 KPX Acircumflex Cacute -65 KPX Acircumflex Ccaron -65 KPX Acircumflex Ccedilla -65 KPX Acircumflex G -60 KPX Acircumflex Gbreve -60 KPX Acircumflex Gcommaaccent -60 KPX Acircumflex O -50 KPX Acircumflex Oacute -50 KPX Acircumflex Ocircumflex -50 KPX Acircumflex Odieresis -50 KPX Acircumflex Ograve -50 KPX Acircumflex Ohungarumlaut -50 KPX Acircumflex Omacron -50 KPX Acircumflex Oslash -50 KPX Acircumflex Otilde -50 KPX Acircumflex Q -55 KPX Acircumflex T -55 KPX Acircumflex Tcaron -55 KPX Acircumflex Tcommaaccent -55 KPX Acircumflex U -50 KPX Acircumflex Uacute -50 KPX Acircumflex Ucircumflex -50 KPX Acircumflex Udieresis -50 KPX Acircumflex Ugrave -50 KPX Acircumflex Uhungarumlaut -50 KPX Acircumflex Umacron -50 KPX Acircumflex Uogonek -50 KPX Acircumflex Uring -50 KPX Acircumflex V -95 KPX Acircumflex W -100 KPX Acircumflex Y -70 KPX Acircumflex Yacute -70 KPX Acircumflex Ydieresis -70 KPX Acircumflex quoteright -74 KPX Acircumflex u -30 KPX Acircumflex uacute -30 KPX Acircumflex ucircumflex -30 KPX Acircumflex udieresis -30 KPX Acircumflex ugrave -30 KPX Acircumflex uhungarumlaut -30 KPX Acircumflex umacron -30 KPX Acircumflex uogonek -30 KPX Acircumflex uring -30 KPX Acircumflex v -74 KPX Acircumflex w -74 KPX Acircumflex y -74 KPX Acircumflex yacute -74 KPX Acircumflex ydieresis -74 KPX Adieresis C -65 KPX Adieresis Cacute -65 KPX Adieresis Ccaron -65 KPX Adieresis Ccedilla -65 KPX Adieresis G -60 KPX Adieresis Gbreve -60 KPX Adieresis Gcommaaccent -60 KPX Adieresis O -50 KPX Adieresis Oacute -50 KPX Adieresis Ocircumflex -50 KPX Adieresis Odieresis -50 KPX Adieresis Ograve -50 KPX Adieresis Ohungarumlaut -50 KPX Adieresis Omacron -50 KPX Adieresis Oslash -50 KPX Adieresis Otilde -50 KPX Adieresis Q -55 KPX Adieresis T -55 KPX Adieresis Tcaron -55 KPX Adieresis Tcommaaccent -55 KPX Adieresis U -50 KPX Adieresis Uacute -50 KPX Adieresis Ucircumflex -50 KPX Adieresis Udieresis -50 KPX Adieresis Ugrave -50 KPX Adieresis Uhungarumlaut -50 KPX Adieresis Umacron -50 KPX Adieresis Uogonek -50 KPX Adieresis Uring -50 KPX Adieresis V -95 KPX Adieresis W -100 KPX Adieresis Y -70 KPX Adieresis Yacute -70 KPX Adieresis Ydieresis -70 KPX Adieresis quoteright -74 KPX Adieresis u -30 KPX Adieresis uacute -30 KPX Adieresis ucircumflex -30 KPX Adieresis udieresis -30 KPX Adieresis ugrave -30 KPX Adieresis uhungarumlaut -30 KPX Adieresis umacron -30 KPX Adieresis uogonek -30 KPX Adieresis uring -30 KPX Adieresis v -74 KPX Adieresis w -74 KPX Adieresis y -74 KPX Adieresis yacute -74 KPX Adieresis ydieresis -74 KPX Agrave C -65 KPX Agrave Cacute -65 KPX Agrave Ccaron -65 KPX Agrave Ccedilla -65 KPX Agrave G -60 KPX Agrave Gbreve -60 KPX Agrave Gcommaaccent -60 KPX Agrave O -50 KPX Agrave Oacute -50 KPX Agrave Ocircumflex -50 KPX Agrave Odieresis -50 KPX Agrave Ograve -50 KPX Agrave Ohungarumlaut -50 KPX Agrave Omacron -50 KPX Agrave Oslash -50 KPX Agrave Otilde -50 KPX Agrave Q -55 KPX Agrave T -55 KPX Agrave Tcaron -55 KPX Agrave Tcommaaccent -55 KPX Agrave U -50 KPX Agrave Uacute -50 KPX Agrave Ucircumflex -50 KPX Agrave Udieresis -50 KPX Agrave Ugrave -50 KPX Agrave Uhungarumlaut -50 KPX Agrave Umacron -50 KPX Agrave Uogonek -50 KPX Agrave Uring -50 KPX Agrave V -95 KPX Agrave W -100 KPX Agrave Y -70 KPX Agrave Yacute -70 KPX Agrave Ydieresis -70 KPX Agrave quoteright -74 KPX Agrave u -30 KPX Agrave uacute -30 KPX Agrave ucircumflex -30 KPX Agrave udieresis -30 KPX Agrave ugrave -30 KPX Agrave uhungarumlaut -30 KPX Agrave umacron -30 KPX Agrave uogonek -30 KPX Agrave uring -30 KPX Agrave v -74 KPX Agrave w -74 KPX Agrave y -74 KPX Agrave yacute -74 KPX Agrave ydieresis -74 KPX Amacron C -65 KPX Amacron Cacute -65 KPX Amacron Ccaron -65 KPX Amacron Ccedilla -65 KPX Amacron G -60 KPX Amacron Gbreve -60 KPX Amacron Gcommaaccent -60 KPX Amacron O -50 KPX Amacron Oacute -50 KPX Amacron Ocircumflex -50 KPX Amacron Odieresis -50 KPX Amacron Ograve -50 KPX Amacron Ohungarumlaut -50 KPX Amacron Omacron -50 KPX Amacron Oslash -50 KPX Amacron Otilde -50 KPX Amacron Q -55 KPX Amacron T -55 KPX Amacron Tcaron -55 KPX Amacron Tcommaaccent -55 KPX Amacron U -50 KPX Amacron Uacute -50 KPX Amacron Ucircumflex -50 KPX Amacron Udieresis -50 KPX Amacron Ugrave -50 KPX Amacron Uhungarumlaut -50 KPX Amacron Umacron -50 KPX Amacron Uogonek -50 KPX Amacron Uring -50 KPX Amacron V -95 KPX Amacron W -100 KPX Amacron Y -70 KPX Amacron Yacute -70 KPX Amacron Ydieresis -70 KPX Amacron quoteright -74 KPX Amacron u -30 KPX Amacron uacute -30 KPX Amacron ucircumflex -30 KPX Amacron udieresis -30 KPX Amacron ugrave -30 KPX Amacron uhungarumlaut -30 KPX Amacron umacron -30 KPX Amacron uogonek -30 KPX Amacron uring -30 KPX Amacron v -74 KPX Amacron w -74 KPX Amacron y -74 KPX Amacron yacute -74 KPX Amacron ydieresis -74 KPX Aogonek C -65 KPX Aogonek Cacute -65 KPX Aogonek Ccaron -65 KPX Aogonek Ccedilla -65 KPX Aogonek G -60 KPX Aogonek Gbreve -60 KPX Aogonek Gcommaaccent -60 KPX Aogonek O -50 KPX Aogonek Oacute -50 KPX Aogonek Ocircumflex -50 KPX Aogonek Odieresis -50 KPX Aogonek Ograve -50 KPX Aogonek Ohungarumlaut -50 KPX Aogonek Omacron -50 KPX Aogonek Oslash -50 KPX Aogonek Otilde -50 KPX Aogonek Q -55 KPX Aogonek T -55 KPX Aogonek Tcaron -55 KPX Aogonek Tcommaaccent -55 KPX Aogonek U -50 KPX Aogonek Uacute -50 KPX Aogonek Ucircumflex -50 KPX Aogonek Udieresis -50 KPX Aogonek Ugrave -50 KPX Aogonek Uhungarumlaut -50 KPX Aogonek Umacron -50 KPX Aogonek Uogonek -50 KPX Aogonek Uring -50 KPX Aogonek V -95 KPX Aogonek W -100 KPX Aogonek Y -70 KPX Aogonek Yacute -70 KPX Aogonek Ydieresis -70 KPX Aogonek quoteright -74 KPX Aogonek u -30 KPX Aogonek uacute -30 KPX Aogonek ucircumflex -30 KPX Aogonek udieresis -30 KPX Aogonek ugrave -30 KPX Aogonek uhungarumlaut -30 KPX Aogonek umacron -30 KPX Aogonek uogonek -30 KPX Aogonek uring -30 KPX Aogonek v -74 KPX Aogonek w -74 KPX Aogonek y -34 KPX Aogonek yacute -34 KPX Aogonek ydieresis -34 KPX Aring C -65 KPX Aring Cacute -65 KPX Aring Ccaron -65 KPX Aring Ccedilla -65 KPX Aring G -60 KPX Aring Gbreve -60 KPX Aring Gcommaaccent -60 KPX Aring O -50 KPX Aring Oacute -50 KPX Aring Ocircumflex -50 KPX Aring Odieresis -50 KPX Aring Ograve -50 KPX Aring Ohungarumlaut -50 KPX Aring Omacron -50 KPX Aring Oslash -50 KPX Aring Otilde -50 KPX Aring Q -55 KPX Aring T -55 KPX Aring Tcaron -55 KPX Aring Tcommaaccent -55 KPX Aring U -50 KPX Aring Uacute -50 KPX Aring Ucircumflex -50 KPX Aring Udieresis -50 KPX Aring Ugrave -50 KPX Aring Uhungarumlaut -50 KPX Aring Umacron -50 KPX Aring Uogonek -50 KPX Aring Uring -50 KPX Aring V -95 KPX Aring W -100 KPX Aring Y -70 KPX Aring Yacute -70 KPX Aring Ydieresis -70 KPX Aring quoteright -74 KPX Aring u -30 KPX Aring uacute -30 KPX Aring ucircumflex -30 KPX Aring udieresis -30 KPX Aring ugrave -30 KPX Aring uhungarumlaut -30 KPX Aring umacron -30 KPX Aring uogonek -30 KPX Aring uring -30 KPX Aring v -74 KPX Aring w -74 KPX Aring y -74 KPX Aring yacute -74 KPX Aring ydieresis -74 KPX Atilde C -65 KPX Atilde Cacute -65 KPX Atilde Ccaron -65 KPX Atilde Ccedilla -65 KPX Atilde G -60 KPX Atilde Gbreve -60 KPX Atilde Gcommaaccent -60 KPX Atilde O -50 KPX Atilde Oacute -50 KPX Atilde Ocircumflex -50 KPX Atilde Odieresis -50 KPX Atilde Ograve -50 KPX Atilde Ohungarumlaut -50 KPX Atilde Omacron -50 KPX Atilde Oslash -50 KPX Atilde Otilde -50 KPX Atilde Q -55 KPX Atilde T -55 KPX Atilde Tcaron -55 KPX Atilde Tcommaaccent -55 KPX Atilde U -50 KPX Atilde Uacute -50 KPX Atilde Ucircumflex -50 KPX Atilde Udieresis -50 KPX Atilde Ugrave -50 KPX Atilde Uhungarumlaut -50 KPX Atilde Umacron -50 KPX Atilde Uogonek -50 KPX Atilde Uring -50 KPX Atilde V -95 KPX Atilde W -100 KPX Atilde Y -70 KPX Atilde Yacute -70 KPX Atilde Ydieresis -70 KPX Atilde quoteright -74 KPX Atilde u -30 KPX Atilde uacute -30 KPX Atilde ucircumflex -30 KPX Atilde udieresis -30 KPX Atilde ugrave -30 KPX Atilde uhungarumlaut -30 KPX Atilde umacron -30 KPX Atilde uogonek -30 KPX Atilde uring -30 KPX Atilde v -74 KPX Atilde w -74 KPX Atilde y -74 KPX Atilde yacute -74 KPX Atilde ydieresis -74 KPX B A -25 KPX B Aacute -25 KPX B Abreve -25 KPX B Acircumflex -25 KPX B Adieresis -25 KPX B Agrave -25 KPX B Amacron -25 KPX B Aogonek -25 KPX B Aring -25 KPX B Atilde -25 KPX B U -10 KPX B Uacute -10 KPX B Ucircumflex -10 KPX B Udieresis -10 KPX B Ugrave -10 KPX B Uhungarumlaut -10 KPX B Umacron -10 KPX B Uogonek -10 KPX B Uring -10 KPX D A -25 KPX D Aacute -25 KPX D Abreve -25 KPX D Acircumflex -25 KPX D Adieresis -25 KPX D Agrave -25 KPX D Amacron -25 KPX D Aogonek -25 KPX D Aring -25 KPX D Atilde -25 KPX D V -50 KPX D W -40 KPX D Y -50 KPX D Yacute -50 KPX D Ydieresis -50 KPX Dcaron A -25 KPX Dcaron Aacute -25 KPX Dcaron Abreve -25 KPX Dcaron Acircumflex -25 KPX Dcaron Adieresis -25 KPX Dcaron Agrave -25 KPX Dcaron Amacron -25 KPX Dcaron Aogonek -25 KPX Dcaron Aring -25 KPX Dcaron Atilde -25 KPX Dcaron V -50 KPX Dcaron W -40 KPX Dcaron Y -50 KPX Dcaron Yacute -50 KPX Dcaron Ydieresis -50 KPX Dcroat A -25 KPX Dcroat Aacute -25 KPX Dcroat Abreve -25 KPX Dcroat Acircumflex -25 KPX Dcroat Adieresis -25 KPX Dcroat Agrave -25 KPX Dcroat Amacron -25 KPX Dcroat Aogonek -25 KPX Dcroat Aring -25 KPX Dcroat Atilde -25 KPX Dcroat V -50 KPX Dcroat W -40 KPX Dcroat Y -50 KPX Dcroat Yacute -50 KPX Dcroat Ydieresis -50 KPX F A -100 KPX F Aacute -100 KPX F Abreve -100 KPX F Acircumflex -100 KPX F Adieresis -100 KPX F Agrave -100 KPX F Amacron -100 KPX F Aogonek -100 KPX F Aring -100 KPX F Atilde -100 KPX F a -95 KPX F aacute -95 KPX F abreve -95 KPX F acircumflex -95 KPX F adieresis -95 KPX F agrave -95 KPX F amacron -95 KPX F aogonek -95 KPX F aring -95 KPX F atilde -95 KPX F comma -129 KPX F e -100 KPX F eacute -100 KPX F ecaron -100 KPX F ecircumflex -100 KPX F edieresis -100 KPX F edotaccent -100 KPX F egrave -100 KPX F emacron -100 KPX F eogonek -100 KPX F i -40 KPX F iacute -40 KPX F icircumflex -40 KPX F idieresis -40 KPX F igrave -40 KPX F imacron -40 KPX F iogonek -40 KPX F o -70 KPX F oacute -70 KPX F ocircumflex -70 KPX F odieresis -70 KPX F ograve -70 KPX F ohungarumlaut -70 KPX F omacron -70 KPX F oslash -70 KPX F otilde -70 KPX F period -129 KPX F r -50 KPX F racute -50 KPX F rcaron -50 KPX F rcommaaccent -50 KPX J A -25 KPX J Aacute -25 KPX J Abreve -25 KPX J Acircumflex -25 KPX J Adieresis -25 KPX J Agrave -25 KPX J Amacron -25 KPX J Aogonek -25 KPX J Aring -25 KPX J Atilde -25 KPX J a -40 KPX J aacute -40 KPX J abreve -40 KPX J acircumflex -40 KPX J adieresis -40 KPX J agrave -40 KPX J amacron -40 KPX J aogonek -40 KPX J aring -40 KPX J atilde -40 KPX J comma -10 KPX J e -40 KPX J eacute -40 KPX J ecaron -40 KPX J ecircumflex -40 KPX J edieresis -40 KPX J edotaccent -40 KPX J egrave -40 KPX J emacron -40 KPX J eogonek -40 KPX J o -40 KPX J oacute -40 KPX J ocircumflex -40 KPX J odieresis -40 KPX J ograve -40 KPX J ohungarumlaut -40 KPX J omacron -40 KPX J oslash -40 KPX J otilde -40 KPX J period -10 KPX J u -40 KPX J uacute -40 KPX J ucircumflex -40 KPX J udieresis -40 KPX J ugrave -40 KPX J uhungarumlaut -40 KPX J umacron -40 KPX J uogonek -40 KPX J uring -40 KPX K O -30 KPX K Oacute -30 KPX K Ocircumflex -30 KPX K Odieresis -30 KPX K Ograve -30 KPX K Ohungarumlaut -30 KPX K Omacron -30 KPX K Oslash -30 KPX K Otilde -30 KPX K e -25 KPX K eacute -25 KPX K ecaron -25 KPX K ecircumflex -25 KPX K edieresis -25 KPX K edotaccent -25 KPX K egrave -25 KPX K emacron -25 KPX K eogonek -25 KPX K o -25 KPX K oacute -25 KPX K ocircumflex -25 KPX K odieresis -25 KPX K ograve -25 KPX K ohungarumlaut -25 KPX K omacron -25 KPX K oslash -25 KPX K otilde -25 KPX K u -20 KPX K uacute -20 KPX K ucircumflex -20 KPX K udieresis -20 KPX K ugrave -20 KPX K uhungarumlaut -20 KPX K umacron -20 KPX K uogonek -20 KPX K uring -20 KPX K y -20 KPX K yacute -20 KPX K ydieresis -20 KPX Kcommaaccent O -30 KPX Kcommaaccent Oacute -30 KPX Kcommaaccent Ocircumflex -30 KPX Kcommaaccent Odieresis -30 KPX Kcommaaccent Ograve -30 KPX Kcommaaccent Ohungarumlaut -30 KPX Kcommaaccent Omacron -30 KPX Kcommaaccent Oslash -30 KPX Kcommaaccent Otilde -30 KPX Kcommaaccent e -25 KPX Kcommaaccent eacute -25 KPX Kcommaaccent ecaron -25 KPX Kcommaaccent ecircumflex -25 KPX Kcommaaccent edieresis -25 KPX Kcommaaccent edotaccent -25 KPX Kcommaaccent egrave -25 KPX Kcommaaccent emacron -25 KPX Kcommaaccent eogonek -25 KPX Kcommaaccent o -25 KPX Kcommaaccent oacute -25 KPX Kcommaaccent ocircumflex -25 KPX Kcommaaccent odieresis -25 KPX Kcommaaccent ograve -25 KPX Kcommaaccent ohungarumlaut -25 KPX Kcommaaccent omacron -25 KPX Kcommaaccent oslash -25 KPX Kcommaaccent otilde -25 KPX Kcommaaccent u -20 KPX Kcommaaccent uacute -20 KPX Kcommaaccent ucircumflex -20 KPX Kcommaaccent udieresis -20 KPX Kcommaaccent ugrave -20 KPX Kcommaaccent uhungarumlaut -20 KPX Kcommaaccent umacron -20 KPX Kcommaaccent uogonek -20 KPX Kcommaaccent uring -20 KPX Kcommaaccent y -20 KPX Kcommaaccent yacute -20 KPX Kcommaaccent ydieresis -20 KPX L T -18 KPX L Tcaron -18 KPX L Tcommaaccent -18 KPX L V -37 KPX L W -37 KPX L Y -37 KPX L Yacute -37 KPX L Ydieresis -37 KPX L quoteright -55 KPX L y -37 KPX L yacute -37 KPX L ydieresis -37 KPX Lacute T -18 KPX Lacute Tcaron -18 KPX Lacute Tcommaaccent -18 KPX Lacute V -37 KPX Lacute W -37 KPX Lacute Y -37 KPX Lacute Yacute -37 KPX Lacute Ydieresis -37 KPX Lacute quoteright -55 KPX Lacute y -37 KPX Lacute yacute -37 KPX Lacute ydieresis -37 KPX Lcommaaccent T -18 KPX Lcommaaccent Tcaron -18 KPX Lcommaaccent Tcommaaccent -18 KPX Lcommaaccent V -37 KPX Lcommaaccent W -37 KPX Lcommaaccent Y -37 KPX Lcommaaccent Yacute -37 KPX Lcommaaccent Ydieresis -37 KPX Lcommaaccent quoteright -55 KPX Lcommaaccent y -37 KPX Lcommaaccent yacute -37 KPX Lcommaaccent ydieresis -37 KPX Lslash T -18 KPX Lslash Tcaron -18 KPX Lslash Tcommaaccent -18 KPX Lslash V -37 KPX Lslash W -37 KPX Lslash Y -37 KPX Lslash Yacute -37 KPX Lslash Ydieresis -37 KPX Lslash quoteright -55 KPX Lslash y -37 KPX Lslash yacute -37 KPX Lslash ydieresis -37 KPX N A -30 KPX N Aacute -30 KPX N Abreve -30 KPX N Acircumflex -30 KPX N Adieresis -30 KPX N Agrave -30 KPX N Amacron -30 KPX N Aogonek -30 KPX N Aring -30 KPX N Atilde -30 KPX Nacute A -30 KPX Nacute Aacute -30 KPX Nacute Abreve -30 KPX Nacute Acircumflex -30 KPX Nacute Adieresis -30 KPX Nacute Agrave -30 KPX Nacute Amacron -30 KPX Nacute Aogonek -30 KPX Nacute Aring -30 KPX Nacute Atilde -30 KPX Ncaron A -30 KPX Ncaron Aacute -30 KPX Ncaron Abreve -30 KPX Ncaron Acircumflex -30 KPX Ncaron Adieresis -30 KPX Ncaron Agrave -30 KPX Ncaron Amacron -30 KPX Ncaron Aogonek -30 KPX Ncaron Aring -30 KPX Ncaron Atilde -30 KPX Ncommaaccent A -30 KPX Ncommaaccent Aacute -30 KPX Ncommaaccent Abreve -30 KPX Ncommaaccent Acircumflex -30 KPX Ncommaaccent Adieresis -30 KPX Ncommaaccent Agrave -30 KPX Ncommaaccent Amacron -30 KPX Ncommaaccent Aogonek -30 KPX Ncommaaccent Aring -30 KPX Ncommaaccent Atilde -30 KPX Ntilde A -30 KPX Ntilde Aacute -30 KPX Ntilde Abreve -30 KPX Ntilde Acircumflex -30 KPX Ntilde Adieresis -30 KPX Ntilde Agrave -30 KPX Ntilde Amacron -30 KPX Ntilde Aogonek -30 KPX Ntilde Aring -30 KPX Ntilde Atilde -30 KPX O A -40 KPX O Aacute -40 KPX O Abreve -40 KPX O Acircumflex -40 KPX O Adieresis -40 KPX O Agrave -40 KPX O Amacron -40 KPX O Aogonek -40 KPX O Aring -40 KPX O Atilde -40 KPX O T -40 KPX O Tcaron -40 KPX O Tcommaaccent -40 KPX O V -50 KPX O W -50 KPX O X -40 KPX O Y -50 KPX O Yacute -50 KPX O Ydieresis -50 KPX Oacute A -40 KPX Oacute Aacute -40 KPX Oacute Abreve -40 KPX Oacute Acircumflex -40 KPX Oacute Adieresis -40 KPX Oacute Agrave -40 KPX Oacute Amacron -40 KPX Oacute Aogonek -40 KPX Oacute Aring -40 KPX Oacute Atilde -40 KPX Oacute T -40 KPX Oacute Tcaron -40 KPX Oacute Tcommaaccent -40 KPX Oacute V -50 KPX Oacute W -50 KPX Oacute X -40 KPX Oacute Y -50 KPX Oacute Yacute -50 KPX Oacute Ydieresis -50 KPX Ocircumflex A -40 KPX Ocircumflex Aacute -40 KPX Ocircumflex Abreve -40 KPX Ocircumflex Acircumflex -40 KPX Ocircumflex Adieresis -40 KPX Ocircumflex Agrave -40 KPX Ocircumflex Amacron -40 KPX Ocircumflex Aogonek -40 KPX Ocircumflex Aring -40 KPX Ocircumflex Atilde -40 KPX Ocircumflex T -40 KPX Ocircumflex Tcaron -40 KPX Ocircumflex Tcommaaccent -40 KPX Ocircumflex V -50 KPX Ocircumflex W -50 KPX Ocircumflex X -40 KPX Ocircumflex Y -50 KPX Ocircumflex Yacute -50 KPX Ocircumflex Ydieresis -50 KPX Odieresis A -40 KPX Odieresis Aacute -40 KPX Odieresis Abreve -40 KPX Odieresis Acircumflex -40 KPX Odieresis Adieresis -40 KPX Odieresis Agrave -40 KPX Odieresis Amacron -40 KPX Odieresis Aogonek -40 KPX Odieresis Aring -40 KPX Odieresis Atilde -40 KPX Odieresis T -40 KPX Odieresis Tcaron -40 KPX Odieresis Tcommaaccent -40 KPX Odieresis V -50 KPX Odieresis W -50 KPX Odieresis X -40 KPX Odieresis Y -50 KPX Odieresis Yacute -50 KPX Odieresis Ydieresis -50 KPX Ograve A -40 KPX Ograve Aacute -40 KPX Ograve Abreve -40 KPX Ograve Acircumflex -40 KPX Ograve Adieresis -40 KPX Ograve Agrave -40 KPX Ograve Amacron -40 KPX Ograve Aogonek -40 KPX Ograve Aring -40 KPX Ograve Atilde -40 KPX Ograve T -40 KPX Ograve Tcaron -40 KPX Ograve Tcommaaccent -40 KPX Ograve V -50 KPX Ograve W -50 KPX Ograve X -40 KPX Ograve Y -50 KPX Ograve Yacute -50 KPX Ograve Ydieresis -50 KPX Ohungarumlaut A -40 KPX Ohungarumlaut Aacute -40 KPX Ohungarumlaut Abreve -40 KPX Ohungarumlaut Acircumflex -40 KPX Ohungarumlaut Adieresis -40 KPX Ohungarumlaut Agrave -40 KPX Ohungarumlaut Amacron -40 KPX Ohungarumlaut Aogonek -40 KPX Ohungarumlaut Aring -40 KPX Ohungarumlaut Atilde -40 KPX Ohungarumlaut T -40 KPX Ohungarumlaut Tcaron -40 KPX Ohungarumlaut Tcommaaccent -40 KPX Ohungarumlaut V -50 KPX Ohungarumlaut W -50 KPX Ohungarumlaut X -40 KPX Ohungarumlaut Y -50 KPX Ohungarumlaut Yacute -50 KPX Ohungarumlaut Ydieresis -50 KPX Omacron A -40 KPX Omacron Aacute -40 KPX Omacron Abreve -40 KPX Omacron Acircumflex -40 KPX Omacron Adieresis -40 KPX Omacron Agrave -40 KPX Omacron Amacron -40 KPX Omacron Aogonek -40 KPX Omacron Aring -40 KPX Omacron Atilde -40 KPX Omacron T -40 KPX Omacron Tcaron -40 KPX Omacron Tcommaaccent -40 KPX Omacron V -50 KPX Omacron W -50 KPX Omacron X -40 KPX Omacron Y -50 KPX Omacron Yacute -50 KPX Omacron Ydieresis -50 KPX Oslash A -40 KPX Oslash Aacute -40 KPX Oslash Abreve -40 KPX Oslash Acircumflex -40 KPX Oslash Adieresis -40 KPX Oslash Agrave -40 KPX Oslash Amacron -40 KPX Oslash Aogonek -40 KPX Oslash Aring -40 KPX Oslash Atilde -40 KPX Oslash T -40 KPX Oslash Tcaron -40 KPX Oslash Tcommaaccent -40 KPX Oslash V -50 KPX Oslash W -50 KPX Oslash X -40 KPX Oslash Y -50 KPX Oslash Yacute -50 KPX Oslash Ydieresis -50 KPX Otilde A -40 KPX Otilde Aacute -40 KPX Otilde Abreve -40 KPX Otilde Acircumflex -40 KPX Otilde Adieresis -40 KPX Otilde Agrave -40 KPX Otilde Amacron -40 KPX Otilde Aogonek -40 KPX Otilde Aring -40 KPX Otilde Atilde -40 KPX Otilde T -40 KPX Otilde Tcaron -40 KPX Otilde Tcommaaccent -40 KPX Otilde V -50 KPX Otilde W -50 KPX Otilde X -40 KPX Otilde Y -50 KPX Otilde Yacute -50 KPX Otilde Ydieresis -50 KPX P A -85 KPX P Aacute -85 KPX P Abreve -85 KPX P Acircumflex -85 KPX P Adieresis -85 KPX P Agrave -85 KPX P Amacron -85 KPX P Aogonek -85 KPX P Aring -85 KPX P Atilde -85 KPX P a -40 KPX P aacute -40 KPX P abreve -40 KPX P acircumflex -40 KPX P adieresis -40 KPX P agrave -40 KPX P amacron -40 KPX P aogonek -40 KPX P aring -40 KPX P atilde -40 KPX P comma -129 KPX P e -50 KPX P eacute -50 KPX P ecaron -50 KPX P ecircumflex -50 KPX P edieresis -50 KPX P edotaccent -50 KPX P egrave -50 KPX P emacron -50 KPX P eogonek -50 KPX P o -55 KPX P oacute -55 KPX P ocircumflex -55 KPX P odieresis -55 KPX P ograve -55 KPX P ohungarumlaut -55 KPX P omacron -55 KPX P oslash -55 KPX P otilde -55 KPX P period -129 KPX Q U -10 KPX Q Uacute -10 KPX Q Ucircumflex -10 KPX Q Udieresis -10 KPX Q Ugrave -10 KPX Q Uhungarumlaut -10 KPX Q Umacron -10 KPX Q Uogonek -10 KPX Q Uring -10 KPX R O -40 KPX R Oacute -40 KPX R Ocircumflex -40 KPX R Odieresis -40 KPX R Ograve -40 KPX R Ohungarumlaut -40 KPX R Omacron -40 KPX R Oslash -40 KPX R Otilde -40 KPX R T -30 KPX R Tcaron -30 KPX R Tcommaaccent -30 KPX R U -40 KPX R Uacute -40 KPX R Ucircumflex -40 KPX R Udieresis -40 KPX R Ugrave -40 KPX R Uhungarumlaut -40 KPX R Umacron -40 KPX R Uogonek -40 KPX R Uring -40 KPX R V -18 KPX R W -18 KPX R Y -18 KPX R Yacute -18 KPX R Ydieresis -18 KPX Racute O -40 KPX Racute Oacute -40 KPX Racute Ocircumflex -40 KPX Racute Odieresis -40 KPX Racute Ograve -40 KPX Racute Ohungarumlaut -40 KPX Racute Omacron -40 KPX Racute Oslash -40 KPX Racute Otilde -40 KPX Racute T -30 KPX Racute Tcaron -30 KPX Racute Tcommaaccent -30 KPX Racute U -40 KPX Racute Uacute -40 KPX Racute Ucircumflex -40 KPX Racute Udieresis -40 KPX Racute Ugrave -40 KPX Racute Uhungarumlaut -40 KPX Racute Umacron -40 KPX Racute Uogonek -40 KPX Racute Uring -40 KPX Racute V -18 KPX Racute W -18 KPX Racute Y -18 KPX Racute Yacute -18 KPX Racute Ydieresis -18 KPX Rcaron O -40 KPX Rcaron Oacute -40 KPX Rcaron Ocircumflex -40 KPX Rcaron Odieresis -40 KPX Rcaron Ograve -40 KPX Rcaron Ohungarumlaut -40 KPX Rcaron Omacron -40 KPX Rcaron Oslash -40 KPX Rcaron Otilde -40 KPX Rcaron T -30 KPX Rcaron Tcaron -30 KPX Rcaron Tcommaaccent -30 KPX Rcaron U -40 KPX Rcaron Uacute -40 KPX Rcaron Ucircumflex -40 KPX Rcaron Udieresis -40 KPX Rcaron Ugrave -40 KPX Rcaron Uhungarumlaut -40 KPX Rcaron Umacron -40 KPX Rcaron Uogonek -40 KPX Rcaron Uring -40 KPX Rcaron V -18 KPX Rcaron W -18 KPX Rcaron Y -18 KPX Rcaron Yacute -18 KPX Rcaron Ydieresis -18 KPX Rcommaaccent O -40 KPX Rcommaaccent Oacute -40 KPX Rcommaaccent Ocircumflex -40 KPX Rcommaaccent Odieresis -40 KPX Rcommaaccent Ograve -40 KPX Rcommaaccent Ohungarumlaut -40 KPX Rcommaaccent Omacron -40 KPX Rcommaaccent Oslash -40 KPX Rcommaaccent Otilde -40 KPX Rcommaaccent T -30 KPX Rcommaaccent Tcaron -30 KPX Rcommaaccent Tcommaaccent -30 KPX Rcommaaccent U -40 KPX Rcommaaccent Uacute -40 KPX Rcommaaccent Ucircumflex -40 KPX Rcommaaccent Udieresis -40 KPX Rcommaaccent Ugrave -40 KPX Rcommaaccent Uhungarumlaut -40 KPX Rcommaaccent Umacron -40 KPX Rcommaaccent Uogonek -40 KPX Rcommaaccent Uring -40 KPX Rcommaaccent V -18 KPX Rcommaaccent W -18 KPX Rcommaaccent Y -18 KPX Rcommaaccent Yacute -18 KPX Rcommaaccent Ydieresis -18 KPX T A -55 KPX T Aacute -55 KPX T Abreve -55 KPX T Acircumflex -55 KPX T Adieresis -55 KPX T Agrave -55 KPX T Amacron -55 KPX T Aogonek -55 KPX T Aring -55 KPX T Atilde -55 KPX T O -18 KPX T Oacute -18 KPX T Ocircumflex -18 KPX T Odieresis -18 KPX T Ograve -18 KPX T Ohungarumlaut -18 KPX T Omacron -18 KPX T Oslash -18 KPX T Otilde -18 KPX T a -92 KPX T aacute -92 KPX T abreve -92 KPX T acircumflex -92 KPX T adieresis -92 KPX T agrave -92 KPX T amacron -92 KPX T aogonek -92 KPX T aring -92 KPX T atilde -92 KPX T colon -74 KPX T comma -92 KPX T e -92 KPX T eacute -92 KPX T ecaron -92 KPX T ecircumflex -92 KPX T edieresis -52 KPX T edotaccent -92 KPX T egrave -52 KPX T emacron -52 KPX T eogonek -92 KPX T hyphen -92 KPX T i -37 KPX T iacute -37 KPX T iogonek -37 KPX T o -95 KPX T oacute -95 KPX T ocircumflex -95 KPX T odieresis -95 KPX T ograve -95 KPX T ohungarumlaut -95 KPX T omacron -95 KPX T oslash -95 KPX T otilde -95 KPX T period -92 KPX T r -37 KPX T racute -37 KPX T rcaron -37 KPX T rcommaaccent -37 KPX T semicolon -74 KPX T u -37 KPX T uacute -37 KPX T ucircumflex -37 KPX T udieresis -37 KPX T ugrave -37 KPX T uhungarumlaut -37 KPX T umacron -37 KPX T uogonek -37 KPX T uring -37 KPX T w -37 KPX T y -37 KPX T yacute -37 KPX T ydieresis -37 KPX Tcaron A -55 KPX Tcaron Aacute -55 KPX Tcaron Abreve -55 KPX Tcaron Acircumflex -55 KPX Tcaron Adieresis -55 KPX Tcaron Agrave -55 KPX Tcaron Amacron -55 KPX Tcaron Aogonek -55 KPX Tcaron Aring -55 KPX Tcaron Atilde -55 KPX Tcaron O -18 KPX Tcaron Oacute -18 KPX Tcaron Ocircumflex -18 KPX Tcaron Odieresis -18 KPX Tcaron Ograve -18 KPX Tcaron Ohungarumlaut -18 KPX Tcaron Omacron -18 KPX Tcaron Oslash -18 KPX Tcaron Otilde -18 KPX Tcaron a -92 KPX Tcaron aacute -92 KPX Tcaron abreve -92 KPX Tcaron acircumflex -92 KPX Tcaron adieresis -92 KPX Tcaron agrave -92 KPX Tcaron amacron -92 KPX Tcaron aogonek -92 KPX Tcaron aring -92 KPX Tcaron atilde -92 KPX Tcaron colon -74 KPX Tcaron comma -92 KPX Tcaron e -92 KPX Tcaron eacute -92 KPX Tcaron ecaron -92 KPX Tcaron ecircumflex -92 KPX Tcaron edieresis -52 KPX Tcaron edotaccent -92 KPX Tcaron egrave -52 KPX Tcaron emacron -52 KPX Tcaron eogonek -92 KPX Tcaron hyphen -92 KPX Tcaron i -37 KPX Tcaron iacute -37 KPX Tcaron iogonek -37 KPX Tcaron o -95 KPX Tcaron oacute -95 KPX Tcaron ocircumflex -95 KPX Tcaron odieresis -95 KPX Tcaron ograve -95 KPX Tcaron ohungarumlaut -95 KPX Tcaron omacron -95 KPX Tcaron oslash -95 KPX Tcaron otilde -95 KPX Tcaron period -92 KPX Tcaron r -37 KPX Tcaron racute -37 KPX Tcaron rcaron -37 KPX Tcaron rcommaaccent -37 KPX Tcaron semicolon -74 KPX Tcaron u -37 KPX Tcaron uacute -37 KPX Tcaron ucircumflex -37 KPX Tcaron udieresis -37 KPX Tcaron ugrave -37 KPX Tcaron uhungarumlaut -37 KPX Tcaron umacron -37 KPX Tcaron uogonek -37 KPX Tcaron uring -37 KPX Tcaron w -37 KPX Tcaron y -37 KPX Tcaron yacute -37 KPX Tcaron ydieresis -37 KPX Tcommaaccent A -55 KPX Tcommaaccent Aacute -55 KPX Tcommaaccent Abreve -55 KPX Tcommaaccent Acircumflex -55 KPX Tcommaaccent Adieresis -55 KPX Tcommaaccent Agrave -55 KPX Tcommaaccent Amacron -55 KPX Tcommaaccent Aogonek -55 KPX Tcommaaccent Aring -55 KPX Tcommaaccent Atilde -55 KPX Tcommaaccent O -18 KPX Tcommaaccent Oacute -18 KPX Tcommaaccent Ocircumflex -18 KPX Tcommaaccent Odieresis -18 KPX Tcommaaccent Ograve -18 KPX Tcommaaccent Ohungarumlaut -18 KPX Tcommaaccent Omacron -18 KPX Tcommaaccent Oslash -18 KPX Tcommaaccent Otilde -18 KPX Tcommaaccent a -92 KPX Tcommaaccent aacute -92 KPX Tcommaaccent abreve -92 KPX Tcommaaccent acircumflex -92 KPX Tcommaaccent adieresis -92 KPX Tcommaaccent agrave -92 KPX Tcommaaccent amacron -92 KPX Tcommaaccent aogonek -92 KPX Tcommaaccent aring -92 KPX Tcommaaccent atilde -92 KPX Tcommaaccent colon -74 KPX Tcommaaccent comma -92 KPX Tcommaaccent e -92 KPX Tcommaaccent eacute -92 KPX Tcommaaccent ecaron -92 KPX Tcommaaccent ecircumflex -92 KPX Tcommaaccent edieresis -52 KPX Tcommaaccent edotaccent -92 KPX Tcommaaccent egrave -52 KPX Tcommaaccent emacron -52 KPX Tcommaaccent eogonek -92 KPX Tcommaaccent hyphen -92 KPX Tcommaaccent i -37 KPX Tcommaaccent iacute -37 KPX Tcommaaccent iogonek -37 KPX Tcommaaccent o -95 KPX Tcommaaccent oacute -95 KPX Tcommaaccent ocircumflex -95 KPX Tcommaaccent odieresis -95 KPX Tcommaaccent ograve -95 KPX Tcommaaccent ohungarumlaut -95 KPX Tcommaaccent omacron -95 KPX Tcommaaccent oslash -95 KPX Tcommaaccent otilde -95 KPX Tcommaaccent period -92 KPX Tcommaaccent r -37 KPX Tcommaaccent racute -37 KPX Tcommaaccent rcaron -37 KPX Tcommaaccent rcommaaccent -37 KPX Tcommaaccent semicolon -74 KPX Tcommaaccent u -37 KPX Tcommaaccent uacute -37 KPX Tcommaaccent ucircumflex -37 KPX Tcommaaccent udieresis -37 KPX Tcommaaccent ugrave -37 KPX Tcommaaccent uhungarumlaut -37 KPX Tcommaaccent umacron -37 KPX Tcommaaccent uogonek -37 KPX Tcommaaccent uring -37 KPX Tcommaaccent w -37 KPX Tcommaaccent y -37 KPX Tcommaaccent yacute -37 KPX Tcommaaccent ydieresis -37 KPX U A -45 KPX U Aacute -45 KPX U Abreve -45 KPX U Acircumflex -45 KPX U Adieresis -45 KPX U Agrave -45 KPX U Amacron -45 KPX U Aogonek -45 KPX U Aring -45 KPX U Atilde -45 KPX Uacute A -45 KPX Uacute Aacute -45 KPX Uacute Abreve -45 KPX Uacute Acircumflex -45 KPX Uacute Adieresis -45 KPX Uacute Agrave -45 KPX Uacute Amacron -45 KPX Uacute Aogonek -45 KPX Uacute Aring -45 KPX Uacute Atilde -45 KPX Ucircumflex A -45 KPX Ucircumflex Aacute -45 KPX Ucircumflex Abreve -45 KPX Ucircumflex Acircumflex -45 KPX Ucircumflex Adieresis -45 KPX Ucircumflex Agrave -45 KPX Ucircumflex Amacron -45 KPX Ucircumflex Aogonek -45 KPX Ucircumflex Aring -45 KPX Ucircumflex Atilde -45 KPX Udieresis A -45 KPX Udieresis Aacute -45 KPX Udieresis Abreve -45 KPX Udieresis Acircumflex -45 KPX Udieresis Adieresis -45 KPX Udieresis Agrave -45 KPX Udieresis Amacron -45 KPX Udieresis Aogonek -45 KPX Udieresis Aring -45 KPX Udieresis Atilde -45 KPX Ugrave A -45 KPX Ugrave Aacute -45 KPX Ugrave Abreve -45 KPX Ugrave Acircumflex -45 KPX Ugrave Adieresis -45 KPX Ugrave Agrave -45 KPX Ugrave Amacron -45 KPX Ugrave Aogonek -45 KPX Ugrave Aring -45 KPX Ugrave Atilde -45 KPX Uhungarumlaut A -45 KPX Uhungarumlaut Aacute -45 KPX Uhungarumlaut Abreve -45 KPX Uhungarumlaut Acircumflex -45 KPX Uhungarumlaut Adieresis -45 KPX Uhungarumlaut Agrave -45 KPX Uhungarumlaut Amacron -45 KPX Uhungarumlaut Aogonek -45 KPX Uhungarumlaut Aring -45 KPX Uhungarumlaut Atilde -45 KPX Umacron A -45 KPX Umacron Aacute -45 KPX Umacron Abreve -45 KPX Umacron Acircumflex -45 KPX Umacron Adieresis -45 KPX Umacron Agrave -45 KPX Umacron Amacron -45 KPX Umacron Aogonek -45 KPX Umacron Aring -45 KPX Umacron Atilde -45 KPX Uogonek A -45 KPX Uogonek Aacute -45 KPX Uogonek Abreve -45 KPX Uogonek Acircumflex -45 KPX Uogonek Adieresis -45 KPX Uogonek Agrave -45 KPX Uogonek Amacron -45 KPX Uogonek Aogonek -45 KPX Uogonek Aring -45 KPX Uogonek Atilde -45 KPX Uring A -45 KPX Uring Aacute -45 KPX Uring Abreve -45 KPX Uring Acircumflex -45 KPX Uring Adieresis -45 KPX Uring Agrave -45 KPX Uring Amacron -45 KPX Uring Aogonek -45 KPX Uring Aring -45 KPX Uring Atilde -45 KPX V A -85 KPX V Aacute -85 KPX V Abreve -85 KPX V Acircumflex -85 KPX V Adieresis -85 KPX V Agrave -85 KPX V Amacron -85 KPX V Aogonek -85 KPX V Aring -85 KPX V Atilde -85 KPX V G -10 KPX V Gbreve -10 KPX V Gcommaaccent -10 KPX V O -30 KPX V Oacute -30 KPX V Ocircumflex -30 KPX V Odieresis -30 KPX V Ograve -30 KPX V Ohungarumlaut -30 KPX V Omacron -30 KPX V Oslash -30 KPX V Otilde -30 KPX V a -111 KPX V aacute -111 KPX V abreve -111 KPX V acircumflex -111 KPX V adieresis -111 KPX V agrave -111 KPX V amacron -111 KPX V aogonek -111 KPX V aring -111 KPX V atilde -111 KPX V colon -74 KPX V comma -129 KPX V e -111 KPX V eacute -111 KPX V ecaron -111 KPX V ecircumflex -111 KPX V edieresis -71 KPX V edotaccent -111 KPX V egrave -71 KPX V emacron -71 KPX V eogonek -111 KPX V hyphen -70 KPX V i -55 KPX V iacute -55 KPX V iogonek -55 KPX V o -111 KPX V oacute -111 KPX V ocircumflex -111 KPX V odieresis -111 KPX V ograve -111 KPX V ohungarumlaut -111 KPX V omacron -111 KPX V oslash -111 KPX V otilde -111 KPX V period -129 KPX V semicolon -74 KPX V u -55 KPX V uacute -55 KPX V ucircumflex -55 KPX V udieresis -55 KPX V ugrave -55 KPX V uhungarumlaut -55 KPX V umacron -55 KPX V uogonek -55 KPX V uring -55 KPX W A -74 KPX W Aacute -74 KPX W Abreve -74 KPX W Acircumflex -74 KPX W Adieresis -74 KPX W Agrave -74 KPX W Amacron -74 KPX W Aogonek -74 KPX W Aring -74 KPX W Atilde -74 KPX W O -15 KPX W Oacute -15 KPX W Ocircumflex -15 KPX W Odieresis -15 KPX W Ograve -15 KPX W Ohungarumlaut -15 KPX W Omacron -15 KPX W Oslash -15 KPX W Otilde -15 KPX W a -85 KPX W aacute -85 KPX W abreve -85 KPX W acircumflex -85 KPX W adieresis -85 KPX W agrave -85 KPX W amacron -85 KPX W aogonek -85 KPX W aring -85 KPX W atilde -85 KPX W colon -55 KPX W comma -74 KPX W e -90 KPX W eacute -90 KPX W ecaron -90 KPX W ecircumflex -90 KPX W edieresis -50 KPX W edotaccent -90 KPX W egrave -50 KPX W emacron -50 KPX W eogonek -90 KPX W hyphen -50 KPX W i -37 KPX W iacute -37 KPX W iogonek -37 KPX W o -80 KPX W oacute -80 KPX W ocircumflex -80 KPX W odieresis -80 KPX W ograve -80 KPX W ohungarumlaut -80 KPX W omacron -80 KPX W oslash -80 KPX W otilde -80 KPX W period -74 KPX W semicolon -55 KPX W u -55 KPX W uacute -55 KPX W ucircumflex -55 KPX W udieresis -55 KPX W ugrave -55 KPX W uhungarumlaut -55 KPX W umacron -55 KPX W uogonek -55 KPX W uring -55 KPX W y -55 KPX W yacute -55 KPX W ydieresis -55 KPX Y A -74 KPX Y Aacute -74 KPX Y Abreve -74 KPX Y Acircumflex -74 KPX Y Adieresis -74 KPX Y Agrave -74 KPX Y Amacron -74 KPX Y Aogonek -74 KPX Y Aring -74 KPX Y Atilde -74 KPX Y O -25 KPX Y Oacute -25 KPX Y Ocircumflex -25 KPX Y Odieresis -25 KPX Y Ograve -25 KPX Y Ohungarumlaut -25 KPX Y Omacron -25 KPX Y Oslash -25 KPX Y Otilde -25 KPX Y a -92 KPX Y aacute -92 KPX Y abreve -92 KPX Y acircumflex -92 KPX Y adieresis -92 KPX Y agrave -92 KPX Y amacron -92 KPX Y aogonek -92 KPX Y aring -92 KPX Y atilde -92 KPX Y colon -92 KPX Y comma -92 KPX Y e -111 KPX Y eacute -111 KPX Y ecaron -111 KPX Y ecircumflex -71 KPX Y edieresis -71 KPX Y edotaccent -111 KPX Y egrave -71 KPX Y emacron -71 KPX Y eogonek -111 KPX Y hyphen -92 KPX Y i -55 KPX Y iacute -55 KPX Y iogonek -55 KPX Y o -111 KPX Y oacute -111 KPX Y ocircumflex -111 KPX Y odieresis -111 KPX Y ograve -111 KPX Y ohungarumlaut -111 KPX Y omacron -111 KPX Y oslash -111 KPX Y otilde -111 KPX Y period -74 KPX Y semicolon -92 KPX Y u -92 KPX Y uacute -92 KPX Y ucircumflex -92 KPX Y udieresis -92 KPX Y ugrave -92 KPX Y uhungarumlaut -92 KPX Y umacron -92 KPX Y uogonek -92 KPX Y uring -92 KPX Yacute A -74 KPX Yacute Aacute -74 KPX Yacute Abreve -74 KPX Yacute Acircumflex -74 KPX Yacute Adieresis -74 KPX Yacute Agrave -74 KPX Yacute Amacron -74 KPX Yacute Aogonek -74 KPX Yacute Aring -74 KPX Yacute Atilde -74 KPX Yacute O -25 KPX Yacute Oacute -25 KPX Yacute Ocircumflex -25 KPX Yacute Odieresis -25 KPX Yacute Ograve -25 KPX Yacute Ohungarumlaut -25 KPX Yacute Omacron -25 KPX Yacute Oslash -25 KPX Yacute Otilde -25 KPX Yacute a -92 KPX Yacute aacute -92 KPX Yacute abreve -92 KPX Yacute acircumflex -92 KPX Yacute adieresis -92 KPX Yacute agrave -92 KPX Yacute amacron -92 KPX Yacute aogonek -92 KPX Yacute aring -92 KPX Yacute atilde -92 KPX Yacute colon -92 KPX Yacute comma -92 KPX Yacute e -111 KPX Yacute eacute -111 KPX Yacute ecaron -111 KPX Yacute ecircumflex -71 KPX Yacute edieresis -71 KPX Yacute edotaccent -111 KPX Yacute egrave -71 KPX Yacute emacron -71 KPX Yacute eogonek -111 KPX Yacute hyphen -92 KPX Yacute i -55 KPX Yacute iacute -55 KPX Yacute iogonek -55 KPX Yacute o -111 KPX Yacute oacute -111 KPX Yacute ocircumflex -111 KPX Yacute odieresis -111 KPX Yacute ograve -111 KPX Yacute ohungarumlaut -111 KPX Yacute omacron -111 KPX Yacute oslash -111 KPX Yacute otilde -111 KPX Yacute period -74 KPX Yacute semicolon -92 KPX Yacute u -92 KPX Yacute uacute -92 KPX Yacute ucircumflex -92 KPX Yacute udieresis -92 KPX Yacute ugrave -92 KPX Yacute uhungarumlaut -92 KPX Yacute umacron -92 KPX Yacute uogonek -92 KPX Yacute uring -92 KPX Ydieresis A -74 KPX Ydieresis Aacute -74 KPX Ydieresis Abreve -74 KPX Ydieresis Acircumflex -74 KPX Ydieresis Adieresis -74 KPX Ydieresis Agrave -74 KPX Ydieresis Amacron -74 KPX Ydieresis Aogonek -74 KPX Ydieresis Aring -74 KPX Ydieresis Atilde -74 KPX Ydieresis O -25 KPX Ydieresis Oacute -25 KPX Ydieresis Ocircumflex -25 KPX Ydieresis Odieresis -25 KPX Ydieresis Ograve -25 KPX Ydieresis Ohungarumlaut -25 KPX Ydieresis Omacron -25 KPX Ydieresis Oslash -25 KPX Ydieresis Otilde -25 KPX Ydieresis a -92 KPX Ydieresis aacute -92 KPX Ydieresis abreve -92 KPX Ydieresis acircumflex -92 KPX Ydieresis adieresis -92 KPX Ydieresis agrave -92 KPX Ydieresis amacron -92 KPX Ydieresis aogonek -92 KPX Ydieresis aring -92 KPX Ydieresis atilde -92 KPX Ydieresis colon -92 KPX Ydieresis comma -92 KPX Ydieresis e -111 KPX Ydieresis eacute -111 KPX Ydieresis ecaron -111 KPX Ydieresis ecircumflex -71 KPX Ydieresis edieresis -71 KPX Ydieresis edotaccent -111 KPX Ydieresis egrave -71 KPX Ydieresis emacron -71 KPX Ydieresis eogonek -111 KPX Ydieresis hyphen -92 KPX Ydieresis i -55 KPX Ydieresis iacute -55 KPX Ydieresis iogonek -55 KPX Ydieresis o -111 KPX Ydieresis oacute -111 KPX Ydieresis ocircumflex -111 KPX Ydieresis odieresis -111 KPX Ydieresis ograve -111 KPX Ydieresis ohungarumlaut -111 KPX Ydieresis omacron -111 KPX Ydieresis oslash -111 KPX Ydieresis otilde -111 KPX Ydieresis period -74 KPX Ydieresis semicolon -92 KPX Ydieresis u -92 KPX Ydieresis uacute -92 KPX Ydieresis ucircumflex -92 KPX Ydieresis udieresis -92 KPX Ydieresis ugrave -92 KPX Ydieresis uhungarumlaut -92 KPX Ydieresis umacron -92 KPX Ydieresis uogonek -92 KPX Ydieresis uring -92 KPX b b -10 KPX b period -40 KPX b u -20 KPX b uacute -20 KPX b ucircumflex -20 KPX b udieresis -20 KPX b ugrave -20 KPX b uhungarumlaut -20 KPX b umacron -20 KPX b uogonek -20 KPX b uring -20 KPX c h -10 KPX c k -10 KPX c kcommaaccent -10 KPX cacute h -10 KPX cacute k -10 KPX cacute kcommaaccent -10 KPX ccaron h -10 KPX ccaron k -10 KPX ccaron kcommaaccent -10 KPX ccedilla h -10 KPX ccedilla k -10 KPX ccedilla kcommaaccent -10 KPX comma quotedblright -95 KPX comma quoteright -95 KPX e b -10 KPX eacute b -10 KPX ecaron b -10 KPX ecircumflex b -10 KPX edieresis b -10 KPX edotaccent b -10 KPX egrave b -10 KPX emacron b -10 KPX eogonek b -10 KPX f comma -10 KPX f dotlessi -30 KPX f e -10 KPX f eacute -10 KPX f edotaccent -10 KPX f eogonek -10 KPX f f -18 KPX f o -10 KPX f oacute -10 KPX f ocircumflex -10 KPX f ograve -10 KPX f ohungarumlaut -10 KPX f oslash -10 KPX f otilde -10 KPX f period -10 KPX f quoteright 55 KPX k e -30 KPX k eacute -30 KPX k ecaron -30 KPX k ecircumflex -30 KPX k edieresis -30 KPX k edotaccent -30 KPX k egrave -30 KPX k emacron -30 KPX k eogonek -30 KPX k o -10 KPX k oacute -10 KPX k ocircumflex -10 KPX k odieresis -10 KPX k ograve -10 KPX k ohungarumlaut -10 KPX k omacron -10 KPX k oslash -10 KPX k otilde -10 KPX kcommaaccent e -30 KPX kcommaaccent eacute -30 KPX kcommaaccent ecaron -30 KPX kcommaaccent ecircumflex -30 KPX kcommaaccent edieresis -30 KPX kcommaaccent edotaccent -30 KPX kcommaaccent egrave -30 KPX kcommaaccent emacron -30 KPX kcommaaccent eogonek -30 KPX kcommaaccent o -10 KPX kcommaaccent oacute -10 KPX kcommaaccent ocircumflex -10 KPX kcommaaccent odieresis -10 KPX kcommaaccent ograve -10 KPX kcommaaccent ohungarumlaut -10 KPX kcommaaccent omacron -10 KPX kcommaaccent oslash -10 KPX kcommaaccent otilde -10 KPX n v -40 KPX nacute v -40 KPX ncaron v -40 KPX ncommaaccent v -40 KPX ntilde v -40 KPX o v -15 KPX o w -25 KPX o x -10 KPX o y -10 KPX o yacute -10 KPX o ydieresis -10 KPX oacute v -15 KPX oacute w -25 KPX oacute x -10 KPX oacute y -10 KPX oacute yacute -10 KPX oacute ydieresis -10 KPX ocircumflex v -15 KPX ocircumflex w -25 KPX ocircumflex x -10 KPX ocircumflex y -10 KPX ocircumflex yacute -10 KPX ocircumflex ydieresis -10 KPX odieresis v -15 KPX odieresis w -25 KPX odieresis x -10 KPX odieresis y -10 KPX odieresis yacute -10 KPX odieresis ydieresis -10 KPX ograve v -15 KPX ograve w -25 KPX ograve x -10 KPX ograve y -10 KPX ograve yacute -10 KPX ograve ydieresis -10 KPX ohungarumlaut v -15 KPX ohungarumlaut w -25 KPX ohungarumlaut x -10 KPX ohungarumlaut y -10 KPX ohungarumlaut yacute -10 KPX ohungarumlaut ydieresis -10 KPX omacron v -15 KPX omacron w -25 KPX omacron x -10 KPX omacron y -10 KPX omacron yacute -10 KPX omacron ydieresis -10 KPX oslash v -15 KPX oslash w -25 KPX oslash x -10 KPX oslash y -10 KPX oslash yacute -10 KPX oslash ydieresis -10 KPX otilde v -15 KPX otilde w -25 KPX otilde x -10 KPX otilde y -10 KPX otilde yacute -10 KPX otilde ydieresis -10 KPX period quotedblright -95 KPX period quoteright -95 KPX quoteleft quoteleft -74 KPX quoteright d -15 KPX quoteright dcroat -15 KPX quoteright quoteright -74 KPX quoteright r -15 KPX quoteright racute -15 KPX quoteright rcaron -15 KPX quoteright rcommaaccent -15 KPX quoteright s -74 KPX quoteright sacute -74 KPX quoteright scaron -74 KPX quoteright scedilla -74 KPX quoteright scommaaccent -74 KPX quoteright space -74 KPX quoteright t -37 KPX quoteright tcommaaccent -37 KPX quoteright v -15 KPX r comma -65 KPX r period -65 KPX racute comma -65 KPX racute period -65 KPX rcaron comma -65 KPX rcaron period -65 KPX rcommaaccent comma -65 KPX rcommaaccent period -65 KPX space A -37 KPX space Aacute -37 KPX space Abreve -37 KPX space Acircumflex -37 KPX space Adieresis -37 KPX space Agrave -37 KPX space Amacron -37 KPX space Aogonek -37 KPX space Aring -37 KPX space Atilde -37 KPX space V -70 KPX space W -70 KPX space Y -70 KPX space Yacute -70 KPX space Ydieresis -70 KPX v comma -37 KPX v e -15 KPX v eacute -15 KPX v ecaron -15 KPX v ecircumflex -15 KPX v edieresis -15 KPX v edotaccent -15 KPX v egrave -15 KPX v emacron -15 KPX v eogonek -15 KPX v o -15 KPX v oacute -15 KPX v ocircumflex -15 KPX v odieresis -15 KPX v ograve -15 KPX v ohungarumlaut -15 KPX v omacron -15 KPX v oslash -15 KPX v otilde -15 KPX v period -37 KPX w a -10 KPX w aacute -10 KPX w abreve -10 KPX w acircumflex -10 KPX w adieresis -10 KPX w agrave -10 KPX w amacron -10 KPX w aogonek -10 KPX w aring -10 KPX w atilde -10 KPX w comma -37 KPX w e -10 KPX w eacute -10 KPX w ecaron -10 KPX w ecircumflex -10 KPX w edieresis -10 KPX w edotaccent -10 KPX w egrave -10 KPX w emacron -10 KPX w eogonek -10 KPX w o -15 KPX w oacute -15 KPX w ocircumflex -15 KPX w odieresis -15 KPX w ograve -15 KPX w ohungarumlaut -15 KPX w omacron -15 KPX w oslash -15 KPX w otilde -15 KPX w period -37 KPX x e -10 KPX x eacute -10 KPX x ecaron -10 KPX x ecircumflex -10 KPX x edieresis -10 KPX x edotaccent -10 KPX x egrave -10 KPX x emacron -10 KPX x eogonek -10 KPX y comma -37 KPX y period -37 KPX yacute comma -37 KPX yacute period -37 KPX ydieresis comma -37 KPX ydieresis period -37 EndKernPairs EndKernData EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/pdfcorefonts/Times-Italic.afm ================================================ StartFontMetrics 4.1 Comment Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Thu May 1 12:56:55 1997 Comment UniqueID 43067 Comment VMusage 47727 58752 FontName Times-Italic FullName Times Italic FamilyName Times Weight Medium ItalicAngle -15.5 IsFixedPitch false CharacterSet ExtendedRoman FontBBox -169 -217 1010 883 UnderlinePosition -100 UnderlineThickness 50 Version 002.000 Notice Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype-Hell AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 653 XHeight 441 Ascender 683 Descender -217 StdHW 32 StdVW 76 StartCharMetrics 315 C 32 ; WX 250 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 39 -11 302 667 ; C 34 ; WX 420 ; N quotedbl ; B 144 421 432 666 ; C 35 ; WX 500 ; N numbersign ; B 2 0 540 676 ; C 36 ; WX 500 ; N dollar ; B 31 -89 497 731 ; C 37 ; WX 833 ; N percent ; B 79 -13 790 676 ; C 38 ; WX 778 ; N ampersand ; B 76 -18 723 666 ; C 39 ; WX 333 ; N quoteright ; B 151 436 290 666 ; C 40 ; WX 333 ; N parenleft ; B 42 -181 315 669 ; C 41 ; WX 333 ; N parenright ; B 16 -180 289 669 ; C 42 ; WX 500 ; N asterisk ; B 128 255 492 666 ; C 43 ; WX 675 ; N plus ; B 86 0 590 506 ; C 44 ; WX 250 ; N comma ; B -4 -129 135 101 ; C 45 ; WX 333 ; N hyphen ; B 49 192 282 255 ; C 46 ; WX 250 ; N period ; B 27 -11 138 100 ; C 47 ; WX 278 ; N slash ; B -65 -18 386 666 ; C 48 ; WX 500 ; N zero ; B 32 -7 497 676 ; C 49 ; WX 500 ; N one ; B 49 0 409 676 ; C 50 ; WX 500 ; N two ; B 12 0 452 676 ; C 51 ; WX 500 ; N three ; B 15 -7 465 676 ; C 52 ; WX 500 ; N four ; B 1 0 479 676 ; C 53 ; WX 500 ; N five ; B 15 -7 491 666 ; C 54 ; WX 500 ; N six ; B 30 -7 521 686 ; C 55 ; WX 500 ; N seven ; B 75 -8 537 666 ; C 56 ; WX 500 ; N eight ; B 30 -7 493 676 ; C 57 ; WX 500 ; N nine ; B 23 -17 492 676 ; C 58 ; WX 333 ; N colon ; B 50 -11 261 441 ; C 59 ; WX 333 ; N semicolon ; B 27 -129 261 441 ; C 60 ; WX 675 ; N less ; B 84 -8 592 514 ; C 61 ; WX 675 ; N equal ; B 86 120 590 386 ; C 62 ; WX 675 ; N greater ; B 84 -8 592 514 ; C 63 ; WX 500 ; N question ; B 132 -12 472 664 ; C 64 ; WX 920 ; N at ; B 118 -18 806 666 ; C 65 ; WX 611 ; N A ; B -51 0 564 668 ; C 66 ; WX 611 ; N B ; B -8 0 588 653 ; C 67 ; WX 667 ; N C ; B 66 -18 689 666 ; C 68 ; WX 722 ; N D ; B -8 0 700 653 ; C 69 ; WX 611 ; N E ; B -1 0 634 653 ; C 70 ; WX 611 ; N F ; B 8 0 645 653 ; C 71 ; WX 722 ; N G ; B 52 -18 722 666 ; C 72 ; WX 722 ; N H ; B -8 0 767 653 ; C 73 ; WX 333 ; N I ; B -8 0 384 653 ; C 74 ; WX 444 ; N J ; B -6 -18 491 653 ; C 75 ; WX 667 ; N K ; B 7 0 722 653 ; C 76 ; WX 556 ; N L ; B -8 0 559 653 ; C 77 ; WX 833 ; N M ; B -18 0 873 653 ; C 78 ; WX 667 ; N N ; B -20 -15 727 653 ; C 79 ; WX 722 ; N O ; B 60 -18 699 666 ; C 80 ; WX 611 ; N P ; B 0 0 605 653 ; C 81 ; WX 722 ; N Q ; B 59 -182 699 666 ; C 82 ; WX 611 ; N R ; B -13 0 588 653 ; C 83 ; WX 500 ; N S ; B 17 -18 508 667 ; C 84 ; WX 556 ; N T ; B 59 0 633 653 ; C 85 ; WX 722 ; N U ; B 102 -18 765 653 ; C 86 ; WX 611 ; N V ; B 76 -18 688 653 ; C 87 ; WX 833 ; N W ; B 71 -18 906 653 ; C 88 ; WX 611 ; N X ; B -29 0 655 653 ; C 89 ; WX 556 ; N Y ; B 78 0 633 653 ; C 90 ; WX 556 ; N Z ; B -6 0 606 653 ; C 91 ; WX 389 ; N bracketleft ; B 21 -153 391 663 ; C 92 ; WX 278 ; N backslash ; B -41 -18 319 666 ; C 93 ; WX 389 ; N bracketright ; B 12 -153 382 663 ; C 94 ; WX 422 ; N asciicircum ; B 0 301 422 666 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 333 ; N quoteleft ; B 171 436 310 666 ; C 97 ; WX 500 ; N a ; B 17 -11 476 441 ; C 98 ; WX 500 ; N b ; B 23 -11 473 683 ; C 99 ; WX 444 ; N c ; B 30 -11 425 441 ; C 100 ; WX 500 ; N d ; B 15 -13 527 683 ; C 101 ; WX 444 ; N e ; B 31 -11 412 441 ; C 102 ; WX 278 ; N f ; B -147 -207 424 678 ; L i fi ; L l fl ; C 103 ; WX 500 ; N g ; B 8 -206 472 441 ; C 104 ; WX 500 ; N h ; B 19 -9 478 683 ; C 105 ; WX 278 ; N i ; B 49 -11 264 654 ; C 106 ; WX 278 ; N j ; B -124 -207 276 654 ; C 107 ; WX 444 ; N k ; B 14 -11 461 683 ; C 108 ; WX 278 ; N l ; B 41 -11 279 683 ; C 109 ; WX 722 ; N m ; B 12 -9 704 441 ; C 110 ; WX 500 ; N n ; B 14 -9 474 441 ; C 111 ; WX 500 ; N o ; B 27 -11 468 441 ; C 112 ; WX 500 ; N p ; B -75 -205 469 441 ; C 113 ; WX 500 ; N q ; B 25 -209 483 441 ; C 114 ; WX 389 ; N r ; B 45 0 412 441 ; C 115 ; WX 389 ; N s ; B 16 -13 366 442 ; C 116 ; WX 278 ; N t ; B 37 -11 296 546 ; C 117 ; WX 500 ; N u ; B 42 -11 475 441 ; C 118 ; WX 444 ; N v ; B 21 -18 426 441 ; C 119 ; WX 667 ; N w ; B 16 -18 648 441 ; C 120 ; WX 444 ; N x ; B -27 -11 447 441 ; C 121 ; WX 444 ; N y ; B -24 -206 426 441 ; C 122 ; WX 389 ; N z ; B -2 -81 380 428 ; C 123 ; WX 400 ; N braceleft ; B 51 -177 407 687 ; C 124 ; WX 275 ; N bar ; B 105 -217 171 783 ; C 125 ; WX 400 ; N braceright ; B -7 -177 349 687 ; C 126 ; WX 541 ; N asciitilde ; B 40 183 502 323 ; C 161 ; WX 389 ; N exclamdown ; B 59 -205 322 473 ; C 162 ; WX 500 ; N cent ; B 77 -143 472 560 ; C 163 ; WX 500 ; N sterling ; B 10 -6 517 670 ; C 164 ; WX 167 ; N fraction ; B -169 -10 337 676 ; C 165 ; WX 500 ; N yen ; B 27 0 603 653 ; C 166 ; WX 500 ; N florin ; B 25 -182 507 682 ; C 167 ; WX 500 ; N section ; B 53 -162 461 666 ; C 168 ; WX 500 ; N currency ; B -22 53 522 597 ; C 169 ; WX 214 ; N quotesingle ; B 132 421 241 666 ; C 170 ; WX 556 ; N quotedblleft ; B 166 436 514 666 ; C 171 ; WX 500 ; N guillemotleft ; B 53 37 445 403 ; C 172 ; WX 333 ; N guilsinglleft ; B 51 37 281 403 ; C 173 ; WX 333 ; N guilsinglright ; B 52 37 282 403 ; C 174 ; WX 500 ; N fi ; B -141 -207 481 681 ; C 175 ; WX 500 ; N fl ; B -141 -204 518 682 ; C 177 ; WX 500 ; N endash ; B -6 197 505 243 ; C 178 ; WX 500 ; N dagger ; B 101 -159 488 666 ; C 179 ; WX 500 ; N daggerdbl ; B 22 -143 491 666 ; C 180 ; WX 250 ; N periodcentered ; B 70 199 181 310 ; C 182 ; WX 523 ; N paragraph ; B 55 -123 616 653 ; C 183 ; WX 350 ; N bullet ; B 40 191 310 461 ; C 184 ; WX 333 ; N quotesinglbase ; B 44 -129 183 101 ; C 185 ; WX 556 ; N quotedblbase ; B 57 -129 405 101 ; C 186 ; WX 556 ; N quotedblright ; B 151 436 499 666 ; C 187 ; WX 500 ; N guillemotright ; B 55 37 447 403 ; C 188 ; WX 889 ; N ellipsis ; B 57 -11 762 100 ; C 189 ; WX 1000 ; N perthousand ; B 25 -19 1010 706 ; C 191 ; WX 500 ; N questiondown ; B 28 -205 368 471 ; C 193 ; WX 333 ; N grave ; B 121 492 311 664 ; C 194 ; WX 333 ; N acute ; B 180 494 403 664 ; C 195 ; WX 333 ; N circumflex ; B 91 492 385 661 ; C 196 ; WX 333 ; N tilde ; B 100 517 427 624 ; C 197 ; WX 333 ; N macron ; B 99 532 411 583 ; C 198 ; WX 333 ; N breve ; B 117 492 418 650 ; C 199 ; WX 333 ; N dotaccent ; B 207 548 305 646 ; C 200 ; WX 333 ; N dieresis ; B 107 548 405 646 ; C 202 ; WX 333 ; N ring ; B 155 492 355 691 ; C 203 ; WX 333 ; N cedilla ; B -30 -217 182 0 ; C 205 ; WX 333 ; N hungarumlaut ; B 93 494 486 664 ; C 206 ; WX 333 ; N ogonek ; B 20 -169 203 40 ; C 207 ; WX 333 ; N caron ; B 121 492 426 661 ; C 208 ; WX 889 ; N emdash ; B -6 197 894 243 ; C 225 ; WX 889 ; N AE ; B -27 0 911 653 ; C 227 ; WX 276 ; N ordfeminine ; B 42 406 352 676 ; C 232 ; WX 556 ; N Lslash ; B -8 0 559 653 ; C 233 ; WX 722 ; N Oslash ; B 60 -105 699 722 ; C 234 ; WX 944 ; N OE ; B 49 -8 964 666 ; C 235 ; WX 310 ; N ordmasculine ; B 67 406 362 676 ; C 241 ; WX 667 ; N ae ; B 23 -11 640 441 ; C 245 ; WX 278 ; N dotlessi ; B 49 -11 235 441 ; C 248 ; WX 278 ; N lslash ; B 41 -11 312 683 ; C 249 ; WX 500 ; N oslash ; B 28 -135 469 554 ; C 250 ; WX 667 ; N oe ; B 20 -12 646 441 ; C 251 ; WX 500 ; N germandbls ; B -168 -207 493 679 ; C -1 ; WX 333 ; N Idieresis ; B -8 0 435 818 ; C -1 ; WX 444 ; N eacute ; B 31 -11 459 664 ; C -1 ; WX 500 ; N abreve ; B 17 -11 502 650 ; C -1 ; WX 500 ; N uhungarumlaut ; B 42 -11 580 664 ; C -1 ; WX 444 ; N ecaron ; B 31 -11 482 661 ; C -1 ; WX 556 ; N Ydieresis ; B 78 0 633 818 ; C -1 ; WX 675 ; N divide ; B 86 -11 590 517 ; C -1 ; WX 556 ; N Yacute ; B 78 0 633 876 ; C -1 ; WX 611 ; N Acircumflex ; B -51 0 564 873 ; C -1 ; WX 500 ; N aacute ; B 17 -11 487 664 ; C -1 ; WX 722 ; N Ucircumflex ; B 102 -18 765 873 ; C -1 ; WX 444 ; N yacute ; B -24 -206 459 664 ; C -1 ; WX 389 ; N scommaaccent ; B 16 -217 366 442 ; C -1 ; WX 444 ; N ecircumflex ; B 31 -11 441 661 ; C -1 ; WX 722 ; N Uring ; B 102 -18 765 883 ; C -1 ; WX 722 ; N Udieresis ; B 102 -18 765 818 ; C -1 ; WX 500 ; N aogonek ; B 17 -169 476 441 ; C -1 ; WX 722 ; N Uacute ; B 102 -18 765 876 ; C -1 ; WX 500 ; N uogonek ; B 42 -169 477 441 ; C -1 ; WX 611 ; N Edieresis ; B -1 0 634 818 ; C -1 ; WX 722 ; N Dcroat ; B -8 0 700 653 ; C -1 ; WX 250 ; N commaaccent ; B 8 -217 133 -50 ; C -1 ; WX 760 ; N copyright ; B 41 -18 719 666 ; C -1 ; WX 611 ; N Emacron ; B -1 0 634 795 ; C -1 ; WX 444 ; N ccaron ; B 30 -11 482 661 ; C -1 ; WX 500 ; N aring ; B 17 -11 476 691 ; C -1 ; WX 667 ; N Ncommaaccent ; B -20 -187 727 653 ; C -1 ; WX 278 ; N lacute ; B 41 -11 395 876 ; C -1 ; WX 500 ; N agrave ; B 17 -11 476 664 ; C -1 ; WX 556 ; N Tcommaaccent ; B 59 -217 633 653 ; C -1 ; WX 667 ; N Cacute ; B 66 -18 690 876 ; C -1 ; WX 500 ; N atilde ; B 17 -11 511 624 ; C -1 ; WX 611 ; N Edotaccent ; B -1 0 634 818 ; C -1 ; WX 389 ; N scaron ; B 16 -13 454 661 ; C -1 ; WX 389 ; N scedilla ; B 16 -217 366 442 ; C -1 ; WX 278 ; N iacute ; B 49 -11 355 664 ; C -1 ; WX 471 ; N lozenge ; B 13 0 459 724 ; C -1 ; WX 611 ; N Rcaron ; B -13 0 588 873 ; C -1 ; WX 722 ; N Gcommaaccent ; B 52 -217 722 666 ; C -1 ; WX 500 ; N ucircumflex ; B 42 -11 475 661 ; C -1 ; WX 500 ; N acircumflex ; B 17 -11 476 661 ; C -1 ; WX 611 ; N Amacron ; B -51 0 564 795 ; C -1 ; WX 389 ; N rcaron ; B 45 0 434 661 ; C -1 ; WX 444 ; N ccedilla ; B 30 -217 425 441 ; C -1 ; WX 556 ; N Zdotaccent ; B -6 0 606 818 ; C -1 ; WX 611 ; N Thorn ; B 0 0 569 653 ; C -1 ; WX 722 ; N Omacron ; B 60 -18 699 795 ; C -1 ; WX 611 ; N Racute ; B -13 0 588 876 ; C -1 ; WX 500 ; N Sacute ; B 17 -18 508 876 ; C -1 ; WX 544 ; N dcaron ; B 15 -13 658 683 ; C -1 ; WX 722 ; N Umacron ; B 102 -18 765 795 ; C -1 ; WX 500 ; N uring ; B 42 -11 475 691 ; C -1 ; WX 300 ; N threesuperior ; B 43 268 339 676 ; C -1 ; WX 722 ; N Ograve ; B 60 -18 699 876 ; C -1 ; WX 611 ; N Agrave ; B -51 0 564 876 ; C -1 ; WX 611 ; N Abreve ; B -51 0 564 862 ; C -1 ; WX 675 ; N multiply ; B 93 8 582 497 ; C -1 ; WX 500 ; N uacute ; B 42 -11 477 664 ; C -1 ; WX 556 ; N Tcaron ; B 59 0 633 873 ; C -1 ; WX 476 ; N partialdiff ; B 17 -38 459 710 ; C -1 ; WX 444 ; N ydieresis ; B -24 -206 441 606 ; C -1 ; WX 667 ; N Nacute ; B -20 -15 727 876 ; C -1 ; WX 278 ; N icircumflex ; B 33 -11 327 661 ; C -1 ; WX 611 ; N Ecircumflex ; B -1 0 634 873 ; C -1 ; WX 500 ; N adieresis ; B 17 -11 489 606 ; C -1 ; WX 444 ; N edieresis ; B 31 -11 451 606 ; C -1 ; WX 444 ; N cacute ; B 30 -11 459 664 ; C -1 ; WX 500 ; N nacute ; B 14 -9 477 664 ; C -1 ; WX 500 ; N umacron ; B 42 -11 485 583 ; C -1 ; WX 667 ; N Ncaron ; B -20 -15 727 873 ; C -1 ; WX 333 ; N Iacute ; B -8 0 433 876 ; C -1 ; WX 675 ; N plusminus ; B 86 0 590 506 ; C -1 ; WX 275 ; N brokenbar ; B 105 -142 171 708 ; C -1 ; WX 760 ; N registered ; B 41 -18 719 666 ; C -1 ; WX 722 ; N Gbreve ; B 52 -18 722 862 ; C -1 ; WX 333 ; N Idotaccent ; B -8 0 384 818 ; C -1 ; WX 600 ; N summation ; B 15 -10 585 706 ; C -1 ; WX 611 ; N Egrave ; B -1 0 634 876 ; C -1 ; WX 389 ; N racute ; B 45 0 431 664 ; C -1 ; WX 500 ; N omacron ; B 27 -11 495 583 ; C -1 ; WX 556 ; N Zacute ; B -6 0 606 876 ; C -1 ; WX 556 ; N Zcaron ; B -6 0 606 873 ; C -1 ; WX 549 ; N greaterequal ; B 26 0 523 658 ; C -1 ; WX 722 ; N Eth ; B -8 0 700 653 ; C -1 ; WX 667 ; N Ccedilla ; B 66 -217 689 666 ; C -1 ; WX 278 ; N lcommaaccent ; B 22 -217 279 683 ; C -1 ; WX 300 ; N tcaron ; B 37 -11 407 681 ; C -1 ; WX 444 ; N eogonek ; B 31 -169 412 441 ; C -1 ; WX 722 ; N Uogonek ; B 102 -184 765 653 ; C -1 ; WX 611 ; N Aacute ; B -51 0 564 876 ; C -1 ; WX 611 ; N Adieresis ; B -51 0 564 818 ; C -1 ; WX 444 ; N egrave ; B 31 -11 412 664 ; C -1 ; WX 389 ; N zacute ; B -2 -81 431 664 ; C -1 ; WX 278 ; N iogonek ; B 49 -169 264 654 ; C -1 ; WX 722 ; N Oacute ; B 60 -18 699 876 ; C -1 ; WX 500 ; N oacute ; B 27 -11 487 664 ; C -1 ; WX 500 ; N amacron ; B 17 -11 495 583 ; C -1 ; WX 389 ; N sacute ; B 16 -13 431 664 ; C -1 ; WX 278 ; N idieresis ; B 49 -11 352 606 ; C -1 ; WX 722 ; N Ocircumflex ; B 60 -18 699 873 ; C -1 ; WX 722 ; N Ugrave ; B 102 -18 765 876 ; C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; C -1 ; WX 500 ; N thorn ; B -75 -205 469 683 ; C -1 ; WX 300 ; N twosuperior ; B 33 271 324 676 ; C -1 ; WX 722 ; N Odieresis ; B 60 -18 699 818 ; C -1 ; WX 500 ; N mu ; B -30 -209 497 428 ; C -1 ; WX 278 ; N igrave ; B 49 -11 284 664 ; C -1 ; WX 500 ; N ohungarumlaut ; B 27 -11 590 664 ; C -1 ; WX 611 ; N Eogonek ; B -1 -169 634 653 ; C -1 ; WX 500 ; N dcroat ; B 15 -13 572 683 ; C -1 ; WX 750 ; N threequarters ; B 23 -10 736 676 ; C -1 ; WX 500 ; N Scedilla ; B 17 -217 508 667 ; C -1 ; WX 300 ; N lcaron ; B 41 -11 407 683 ; C -1 ; WX 667 ; N Kcommaaccent ; B 7 -217 722 653 ; C -1 ; WX 556 ; N Lacute ; B -8 0 559 876 ; C -1 ; WX 980 ; N trademark ; B 30 247 957 653 ; C -1 ; WX 444 ; N edotaccent ; B 31 -11 412 606 ; C -1 ; WX 333 ; N Igrave ; B -8 0 384 876 ; C -1 ; WX 333 ; N Imacron ; B -8 0 441 795 ; C -1 ; WX 611 ; N Lcaron ; B -8 0 586 653 ; C -1 ; WX 750 ; N onehalf ; B 34 -10 749 676 ; C -1 ; WX 549 ; N lessequal ; B 26 0 523 658 ; C -1 ; WX 500 ; N ocircumflex ; B 27 -11 468 661 ; C -1 ; WX 500 ; N ntilde ; B 14 -9 476 624 ; C -1 ; WX 722 ; N Uhungarumlaut ; B 102 -18 765 876 ; C -1 ; WX 611 ; N Eacute ; B -1 0 634 876 ; C -1 ; WX 444 ; N emacron ; B 31 -11 457 583 ; C -1 ; WX 500 ; N gbreve ; B 8 -206 487 650 ; C -1 ; WX 750 ; N onequarter ; B 33 -10 736 676 ; C -1 ; WX 500 ; N Scaron ; B 17 -18 520 873 ; C -1 ; WX 500 ; N Scommaaccent ; B 17 -217 508 667 ; C -1 ; WX 722 ; N Ohungarumlaut ; B 60 -18 699 876 ; C -1 ; WX 400 ; N degree ; B 101 390 387 676 ; C -1 ; WX 500 ; N ograve ; B 27 -11 468 664 ; C -1 ; WX 667 ; N Ccaron ; B 66 -18 689 873 ; C -1 ; WX 500 ; N ugrave ; B 42 -11 475 664 ; C -1 ; WX 453 ; N radical ; B 2 -60 452 768 ; C -1 ; WX 722 ; N Dcaron ; B -8 0 700 873 ; C -1 ; WX 389 ; N rcommaaccent ; B -3 -217 412 441 ; C -1 ; WX 667 ; N Ntilde ; B -20 -15 727 836 ; C -1 ; WX 500 ; N otilde ; B 27 -11 496 624 ; C -1 ; WX 611 ; N Rcommaaccent ; B -13 -187 588 653 ; C -1 ; WX 556 ; N Lcommaaccent ; B -8 -217 559 653 ; C -1 ; WX 611 ; N Atilde ; B -51 0 566 836 ; C -1 ; WX 611 ; N Aogonek ; B -51 -169 566 668 ; C -1 ; WX 611 ; N Aring ; B -51 0 564 883 ; C -1 ; WX 722 ; N Otilde ; B 60 -18 699 836 ; C -1 ; WX 389 ; N zdotaccent ; B -2 -81 380 606 ; C -1 ; WX 611 ; N Ecaron ; B -1 0 634 873 ; C -1 ; WX 333 ; N Iogonek ; B -8 -169 384 653 ; C -1 ; WX 444 ; N kcommaaccent ; B 14 -187 461 683 ; C -1 ; WX 675 ; N minus ; B 86 220 590 286 ; C -1 ; WX 333 ; N Icircumflex ; B -8 0 425 873 ; C -1 ; WX 500 ; N ncaron ; B 14 -9 510 661 ; C -1 ; WX 278 ; N tcommaaccent ; B 2 -217 296 546 ; C -1 ; WX 675 ; N logicalnot ; B 86 108 590 386 ; C -1 ; WX 500 ; N odieresis ; B 27 -11 489 606 ; C -1 ; WX 500 ; N udieresis ; B 42 -11 479 606 ; C -1 ; WX 549 ; N notequal ; B 12 -29 537 541 ; C -1 ; WX 500 ; N gcommaaccent ; B 8 -206 472 706 ; C -1 ; WX 500 ; N eth ; B 27 -11 482 683 ; C -1 ; WX 389 ; N zcaron ; B -2 -81 434 661 ; C -1 ; WX 500 ; N ncommaaccent ; B 14 -187 474 441 ; C -1 ; WX 300 ; N onesuperior ; B 43 271 284 676 ; C -1 ; WX 278 ; N imacron ; B 46 -11 311 583 ; C -1 ; WX 500 ; N Euro ; B 0 0 0 0 ; EndCharMetrics StartKernData StartKernPairs 2321 KPX A C -30 KPX A Cacute -30 KPX A Ccaron -30 KPX A Ccedilla -30 KPX A G -35 KPX A Gbreve -35 KPX A Gcommaaccent -35 KPX A O -40 KPX A Oacute -40 KPX A Ocircumflex -40 KPX A Odieresis -40 KPX A Ograve -40 KPX A Ohungarumlaut -40 KPX A Omacron -40 KPX A Oslash -40 KPX A Otilde -40 KPX A Q -40 KPX A T -37 KPX A Tcaron -37 KPX A Tcommaaccent -37 KPX A U -50 KPX A Uacute -50 KPX A Ucircumflex -50 KPX A Udieresis -50 KPX A Ugrave -50 KPX A Uhungarumlaut -50 KPX A Umacron -50 KPX A Uogonek -50 KPX A Uring -50 KPX A V -105 KPX A W -95 KPX A Y -55 KPX A Yacute -55 KPX A Ydieresis -55 KPX A quoteright -37 KPX A u -20 KPX A uacute -20 KPX A ucircumflex -20 KPX A udieresis -20 KPX A ugrave -20 KPX A uhungarumlaut -20 KPX A umacron -20 KPX A uogonek -20 KPX A uring -20 KPX A v -55 KPX A w -55 KPX A y -55 KPX A yacute -55 KPX A ydieresis -55 KPX Aacute C -30 KPX Aacute Cacute -30 KPX Aacute Ccaron -30 KPX Aacute Ccedilla -30 KPX Aacute G -35 KPX Aacute Gbreve -35 KPX Aacute Gcommaaccent -35 KPX Aacute O -40 KPX Aacute Oacute -40 KPX Aacute Ocircumflex -40 KPX Aacute Odieresis -40 KPX Aacute Ograve -40 KPX Aacute Ohungarumlaut -40 KPX Aacute Omacron -40 KPX Aacute Oslash -40 KPX Aacute Otilde -40 KPX Aacute Q -40 KPX Aacute T -37 KPX Aacute Tcaron -37 KPX Aacute Tcommaaccent -37 KPX Aacute U -50 KPX Aacute Uacute -50 KPX Aacute Ucircumflex -50 KPX Aacute Udieresis -50 KPX Aacute Ugrave -50 KPX Aacute Uhungarumlaut -50 KPX Aacute Umacron -50 KPX Aacute Uogonek -50 KPX Aacute Uring -50 KPX Aacute V -105 KPX Aacute W -95 KPX Aacute Y -55 KPX Aacute Yacute -55 KPX Aacute Ydieresis -55 KPX Aacute quoteright -37 KPX Aacute u -20 KPX Aacute uacute -20 KPX Aacute ucircumflex -20 KPX Aacute udieresis -20 KPX Aacute ugrave -20 KPX Aacute uhungarumlaut -20 KPX Aacute umacron -20 KPX Aacute uogonek -20 KPX Aacute uring -20 KPX Aacute v -55 KPX Aacute w -55 KPX Aacute y -55 KPX Aacute yacute -55 KPX Aacute ydieresis -55 KPX Abreve C -30 KPX Abreve Cacute -30 KPX Abreve Ccaron -30 KPX Abreve Ccedilla -30 KPX Abreve G -35 KPX Abreve Gbreve -35 KPX Abreve Gcommaaccent -35 KPX Abreve O -40 KPX Abreve Oacute -40 KPX Abreve Ocircumflex -40 KPX Abreve Odieresis -40 KPX Abreve Ograve -40 KPX Abreve Ohungarumlaut -40 KPX Abreve Omacron -40 KPX Abreve Oslash -40 KPX Abreve Otilde -40 KPX Abreve Q -40 KPX Abreve T -37 KPX Abreve Tcaron -37 KPX Abreve Tcommaaccent -37 KPX Abreve U -50 KPX Abreve Uacute -50 KPX Abreve Ucircumflex -50 KPX Abreve Udieresis -50 KPX Abreve Ugrave -50 KPX Abreve Uhungarumlaut -50 KPX Abreve Umacron -50 KPX Abreve Uogonek -50 KPX Abreve Uring -50 KPX Abreve V -105 KPX Abreve W -95 KPX Abreve Y -55 KPX Abreve Yacute -55 KPX Abreve Ydieresis -55 KPX Abreve quoteright -37 KPX Abreve u -20 KPX Abreve uacute -20 KPX Abreve ucircumflex -20 KPX Abreve udieresis -20 KPX Abreve ugrave -20 KPX Abreve uhungarumlaut -20 KPX Abreve umacron -20 KPX Abreve uogonek -20 KPX Abreve uring -20 KPX Abreve v -55 KPX Abreve w -55 KPX Abreve y -55 KPX Abreve yacute -55 KPX Abreve ydieresis -55 KPX Acircumflex C -30 KPX Acircumflex Cacute -30 KPX Acircumflex Ccaron -30 KPX Acircumflex Ccedilla -30 KPX Acircumflex G -35 KPX Acircumflex Gbreve -35 KPX Acircumflex Gcommaaccent -35 KPX Acircumflex O -40 KPX Acircumflex Oacute -40 KPX Acircumflex Ocircumflex -40 KPX Acircumflex Odieresis -40 KPX Acircumflex Ograve -40 KPX Acircumflex Ohungarumlaut -40 KPX Acircumflex Omacron -40 KPX Acircumflex Oslash -40 KPX Acircumflex Otilde -40 KPX Acircumflex Q -40 KPX Acircumflex T -37 KPX Acircumflex Tcaron -37 KPX Acircumflex Tcommaaccent -37 KPX Acircumflex U -50 KPX Acircumflex Uacute -50 KPX Acircumflex Ucircumflex -50 KPX Acircumflex Udieresis -50 KPX Acircumflex Ugrave -50 KPX Acircumflex Uhungarumlaut -50 KPX Acircumflex Umacron -50 KPX Acircumflex Uogonek -50 KPX Acircumflex Uring -50 KPX Acircumflex V -105 KPX Acircumflex W -95 KPX Acircumflex Y -55 KPX Acircumflex Yacute -55 KPX Acircumflex Ydieresis -55 KPX Acircumflex quoteright -37 KPX Acircumflex u -20 KPX Acircumflex uacute -20 KPX Acircumflex ucircumflex -20 KPX Acircumflex udieresis -20 KPX Acircumflex ugrave -20 KPX Acircumflex uhungarumlaut -20 KPX Acircumflex umacron -20 KPX Acircumflex uogonek -20 KPX Acircumflex uring -20 KPX Acircumflex v -55 KPX Acircumflex w -55 KPX Acircumflex y -55 KPX Acircumflex yacute -55 KPX Acircumflex ydieresis -55 KPX Adieresis C -30 KPX Adieresis Cacute -30 KPX Adieresis Ccaron -30 KPX Adieresis Ccedilla -30 KPX Adieresis G -35 KPX Adieresis Gbreve -35 KPX Adieresis Gcommaaccent -35 KPX Adieresis O -40 KPX Adieresis Oacute -40 KPX Adieresis Ocircumflex -40 KPX Adieresis Odieresis -40 KPX Adieresis Ograve -40 KPX Adieresis Ohungarumlaut -40 KPX Adieresis Omacron -40 KPX Adieresis Oslash -40 KPX Adieresis Otilde -40 KPX Adieresis Q -40 KPX Adieresis T -37 KPX Adieresis Tcaron -37 KPX Adieresis Tcommaaccent -37 KPX Adieresis U -50 KPX Adieresis Uacute -50 KPX Adieresis Ucircumflex -50 KPX Adieresis Udieresis -50 KPX Adieresis Ugrave -50 KPX Adieresis Uhungarumlaut -50 KPX Adieresis Umacron -50 KPX Adieresis Uogonek -50 KPX Adieresis Uring -50 KPX Adieresis V -105 KPX Adieresis W -95 KPX Adieresis Y -55 KPX Adieresis Yacute -55 KPX Adieresis Ydieresis -55 KPX Adieresis quoteright -37 KPX Adieresis u -20 KPX Adieresis uacute -20 KPX Adieresis ucircumflex -20 KPX Adieresis udieresis -20 KPX Adieresis ugrave -20 KPX Adieresis uhungarumlaut -20 KPX Adieresis umacron -20 KPX Adieresis uogonek -20 KPX Adieresis uring -20 KPX Adieresis v -55 KPX Adieresis w -55 KPX Adieresis y -55 KPX Adieresis yacute -55 KPX Adieresis ydieresis -55 KPX Agrave C -30 KPX Agrave Cacute -30 KPX Agrave Ccaron -30 KPX Agrave Ccedilla -30 KPX Agrave G -35 KPX Agrave Gbreve -35 KPX Agrave Gcommaaccent -35 KPX Agrave O -40 KPX Agrave Oacute -40 KPX Agrave Ocircumflex -40 KPX Agrave Odieresis -40 KPX Agrave Ograve -40 KPX Agrave Ohungarumlaut -40 KPX Agrave Omacron -40 KPX Agrave Oslash -40 KPX Agrave Otilde -40 KPX Agrave Q -40 KPX Agrave T -37 KPX Agrave Tcaron -37 KPX Agrave Tcommaaccent -37 KPX Agrave U -50 KPX Agrave Uacute -50 KPX Agrave Ucircumflex -50 KPX Agrave Udieresis -50 KPX Agrave Ugrave -50 KPX Agrave Uhungarumlaut -50 KPX Agrave Umacron -50 KPX Agrave Uogonek -50 KPX Agrave Uring -50 KPX Agrave V -105 KPX Agrave W -95 KPX Agrave Y -55 KPX Agrave Yacute -55 KPX Agrave Ydieresis -55 KPX Agrave quoteright -37 KPX Agrave u -20 KPX Agrave uacute -20 KPX Agrave ucircumflex -20 KPX Agrave udieresis -20 KPX Agrave ugrave -20 KPX Agrave uhungarumlaut -20 KPX Agrave umacron -20 KPX Agrave uogonek -20 KPX Agrave uring -20 KPX Agrave v -55 KPX Agrave w -55 KPX Agrave y -55 KPX Agrave yacute -55 KPX Agrave ydieresis -55 KPX Amacron C -30 KPX Amacron Cacute -30 KPX Amacron Ccaron -30 KPX Amacron Ccedilla -30 KPX Amacron G -35 KPX Amacron Gbreve -35 KPX Amacron Gcommaaccent -35 KPX Amacron O -40 KPX Amacron Oacute -40 KPX Amacron Ocircumflex -40 KPX Amacron Odieresis -40 KPX Amacron Ograve -40 KPX Amacron Ohungarumlaut -40 KPX Amacron Omacron -40 KPX Amacron Oslash -40 KPX Amacron Otilde -40 KPX Amacron Q -40 KPX Amacron T -37 KPX Amacron Tcaron -37 KPX Amacron Tcommaaccent -37 KPX Amacron U -50 KPX Amacron Uacute -50 KPX Amacron Ucircumflex -50 KPX Amacron Udieresis -50 KPX Amacron Ugrave -50 KPX Amacron Uhungarumlaut -50 KPX Amacron Umacron -50 KPX Amacron Uogonek -50 KPX Amacron Uring -50 KPX Amacron V -105 KPX Amacron W -95 KPX Amacron Y -55 KPX Amacron Yacute -55 KPX Amacron Ydieresis -55 KPX Amacron quoteright -37 KPX Amacron u -20 KPX Amacron uacute -20 KPX Amacron ucircumflex -20 KPX Amacron udieresis -20 KPX Amacron ugrave -20 KPX Amacron uhungarumlaut -20 KPX Amacron umacron -20 KPX Amacron uogonek -20 KPX Amacron uring -20 KPX Amacron v -55 KPX Amacron w -55 KPX Amacron y -55 KPX Amacron yacute -55 KPX Amacron ydieresis -55 KPX Aogonek C -30 KPX Aogonek Cacute -30 KPX Aogonek Ccaron -30 KPX Aogonek Ccedilla -30 KPX Aogonek G -35 KPX Aogonek Gbreve -35 KPX Aogonek Gcommaaccent -35 KPX Aogonek O -40 KPX Aogonek Oacute -40 KPX Aogonek Ocircumflex -40 KPX Aogonek Odieresis -40 KPX Aogonek Ograve -40 KPX Aogonek Ohungarumlaut -40 KPX Aogonek Omacron -40 KPX Aogonek Oslash -40 KPX Aogonek Otilde -40 KPX Aogonek Q -40 KPX Aogonek T -37 KPX Aogonek Tcaron -37 KPX Aogonek Tcommaaccent -37 KPX Aogonek U -50 KPX Aogonek Uacute -50 KPX Aogonek Ucircumflex -50 KPX Aogonek Udieresis -50 KPX Aogonek Ugrave -50 KPX Aogonek Uhungarumlaut -50 KPX Aogonek Umacron -50 KPX Aogonek Uogonek -50 KPX Aogonek Uring -50 KPX Aogonek V -105 KPX Aogonek W -95 KPX Aogonek Y -55 KPX Aogonek Yacute -55 KPX Aogonek Ydieresis -55 KPX Aogonek quoteright -37 KPX Aogonek u -20 KPX Aogonek uacute -20 KPX Aogonek ucircumflex -20 KPX Aogonek udieresis -20 KPX Aogonek ugrave -20 KPX Aogonek uhungarumlaut -20 KPX Aogonek umacron -20 KPX Aogonek uogonek -20 KPX Aogonek uring -20 KPX Aogonek v -55 KPX Aogonek w -55 KPX Aogonek y -55 KPX Aogonek yacute -55 KPX Aogonek ydieresis -55 KPX Aring C -30 KPX Aring Cacute -30 KPX Aring Ccaron -30 KPX Aring Ccedilla -30 KPX Aring G -35 KPX Aring Gbreve -35 KPX Aring Gcommaaccent -35 KPX Aring O -40 KPX Aring Oacute -40 KPX Aring Ocircumflex -40 KPX Aring Odieresis -40 KPX Aring Ograve -40 KPX Aring Ohungarumlaut -40 KPX Aring Omacron -40 KPX Aring Oslash -40 KPX Aring Otilde -40 KPX Aring Q -40 KPX Aring T -37 KPX Aring Tcaron -37 KPX Aring Tcommaaccent -37 KPX Aring U -50 KPX Aring Uacute -50 KPX Aring Ucircumflex -50 KPX Aring Udieresis -50 KPX Aring Ugrave -50 KPX Aring Uhungarumlaut -50 KPX Aring Umacron -50 KPX Aring Uogonek -50 KPX Aring Uring -50 KPX Aring V -105 KPX Aring W -95 KPX Aring Y -55 KPX Aring Yacute -55 KPX Aring Ydieresis -55 KPX Aring quoteright -37 KPX Aring u -20 KPX Aring uacute -20 KPX Aring ucircumflex -20 KPX Aring udieresis -20 KPX Aring ugrave -20 KPX Aring uhungarumlaut -20 KPX Aring umacron -20 KPX Aring uogonek -20 KPX Aring uring -20 KPX Aring v -55 KPX Aring w -55 KPX Aring y -55 KPX Aring yacute -55 KPX Aring ydieresis -55 KPX Atilde C -30 KPX Atilde Cacute -30 KPX Atilde Ccaron -30 KPX Atilde Ccedilla -30 KPX Atilde G -35 KPX Atilde Gbreve -35 KPX Atilde Gcommaaccent -35 KPX Atilde O -40 KPX Atilde Oacute -40 KPX Atilde Ocircumflex -40 KPX Atilde Odieresis -40 KPX Atilde Ograve -40 KPX Atilde Ohungarumlaut -40 KPX Atilde Omacron -40 KPX Atilde Oslash -40 KPX Atilde Otilde -40 KPX Atilde Q -40 KPX Atilde T -37 KPX Atilde Tcaron -37 KPX Atilde Tcommaaccent -37 KPX Atilde U -50 KPX Atilde Uacute -50 KPX Atilde Ucircumflex -50 KPX Atilde Udieresis -50 KPX Atilde Ugrave -50 KPX Atilde Uhungarumlaut -50 KPX Atilde Umacron -50 KPX Atilde Uogonek -50 KPX Atilde Uring -50 KPX Atilde V -105 KPX Atilde W -95 KPX Atilde Y -55 KPX Atilde Yacute -55 KPX Atilde Ydieresis -55 KPX Atilde quoteright -37 KPX Atilde u -20 KPX Atilde uacute -20 KPX Atilde ucircumflex -20 KPX Atilde udieresis -20 KPX Atilde ugrave -20 KPX Atilde uhungarumlaut -20 KPX Atilde umacron -20 KPX Atilde uogonek -20 KPX Atilde uring -20 KPX Atilde v -55 KPX Atilde w -55 KPX Atilde y -55 KPX Atilde yacute -55 KPX Atilde ydieresis -55 KPX B A -25 KPX B Aacute -25 KPX B Abreve -25 KPX B Acircumflex -25 KPX B Adieresis -25 KPX B Agrave -25 KPX B Amacron -25 KPX B Aogonek -25 KPX B Aring -25 KPX B Atilde -25 KPX B U -10 KPX B Uacute -10 KPX B Ucircumflex -10 KPX B Udieresis -10 KPX B Ugrave -10 KPX B Uhungarumlaut -10 KPX B Umacron -10 KPX B Uogonek -10 KPX B Uring -10 KPX D A -35 KPX D Aacute -35 KPX D Abreve -35 KPX D Acircumflex -35 KPX D Adieresis -35 KPX D Agrave -35 KPX D Amacron -35 KPX D Aogonek -35 KPX D Aring -35 KPX D Atilde -35 KPX D V -40 KPX D W -40 KPX D Y -40 KPX D Yacute -40 KPX D Ydieresis -40 KPX Dcaron A -35 KPX Dcaron Aacute -35 KPX Dcaron Abreve -35 KPX Dcaron Acircumflex -35 KPX Dcaron Adieresis -35 KPX Dcaron Agrave -35 KPX Dcaron Amacron -35 KPX Dcaron Aogonek -35 KPX Dcaron Aring -35 KPX Dcaron Atilde -35 KPX Dcaron V -40 KPX Dcaron W -40 KPX Dcaron Y -40 KPX Dcaron Yacute -40 KPX Dcaron Ydieresis -40 KPX Dcroat A -35 KPX Dcroat Aacute -35 KPX Dcroat Abreve -35 KPX Dcroat Acircumflex -35 KPX Dcroat Adieresis -35 KPX Dcroat Agrave -35 KPX Dcroat Amacron -35 KPX Dcroat Aogonek -35 KPX Dcroat Aring -35 KPX Dcroat Atilde -35 KPX Dcroat V -40 KPX Dcroat W -40 KPX Dcroat Y -40 KPX Dcroat Yacute -40 KPX Dcroat Ydieresis -40 KPX F A -115 KPX F Aacute -115 KPX F Abreve -115 KPX F Acircumflex -115 KPX F Adieresis -115 KPX F Agrave -115 KPX F Amacron -115 KPX F Aogonek -115 KPX F Aring -115 KPX F Atilde -115 KPX F a -75 KPX F aacute -75 KPX F abreve -75 KPX F acircumflex -75 KPX F adieresis -75 KPX F agrave -75 KPX F amacron -75 KPX F aogonek -75 KPX F aring -75 KPX F atilde -75 KPX F comma -135 KPX F e -75 KPX F eacute -75 KPX F ecaron -75 KPX F ecircumflex -75 KPX F edieresis -75 KPX F edotaccent -75 KPX F egrave -75 KPX F emacron -75 KPX F eogonek -75 KPX F i -45 KPX F iacute -45 KPX F icircumflex -45 KPX F idieresis -45 KPX F igrave -45 KPX F imacron -45 KPX F iogonek -45 KPX F o -105 KPX F oacute -105 KPX F ocircumflex -105 KPX F odieresis -105 KPX F ograve -105 KPX F ohungarumlaut -105 KPX F omacron -105 KPX F oslash -105 KPX F otilde -105 KPX F period -135 KPX F r -55 KPX F racute -55 KPX F rcaron -55 KPX F rcommaaccent -55 KPX J A -40 KPX J Aacute -40 KPX J Abreve -40 KPX J Acircumflex -40 KPX J Adieresis -40 KPX J Agrave -40 KPX J Amacron -40 KPX J Aogonek -40 KPX J Aring -40 KPX J Atilde -40 KPX J a -35 KPX J aacute -35 KPX J abreve -35 KPX J acircumflex -35 KPX J adieresis -35 KPX J agrave -35 KPX J amacron -35 KPX J aogonek -35 KPX J aring -35 KPX J atilde -35 KPX J comma -25 KPX J e -25 KPX J eacute -25 KPX J ecaron -25 KPX J ecircumflex -25 KPX J edieresis -25 KPX J edotaccent -25 KPX J egrave -25 KPX J emacron -25 KPX J eogonek -25 KPX J o -25 KPX J oacute -25 KPX J ocircumflex -25 KPX J odieresis -25 KPX J ograve -25 KPX J ohungarumlaut -25 KPX J omacron -25 KPX J oslash -25 KPX J otilde -25 KPX J period -25 KPX J u -35 KPX J uacute -35 KPX J ucircumflex -35 KPX J udieresis -35 KPX J ugrave -35 KPX J uhungarumlaut -35 KPX J umacron -35 KPX J uogonek -35 KPX J uring -35 KPX K O -50 KPX K Oacute -50 KPX K Ocircumflex -50 KPX K Odieresis -50 KPX K Ograve -50 KPX K Ohungarumlaut -50 KPX K Omacron -50 KPX K Oslash -50 KPX K Otilde -50 KPX K e -35 KPX K eacute -35 KPX K ecaron -35 KPX K ecircumflex -35 KPX K edieresis -35 KPX K edotaccent -35 KPX K egrave -35 KPX K emacron -35 KPX K eogonek -35 KPX K o -40 KPX K oacute -40 KPX K ocircumflex -40 KPX K odieresis -40 KPX K ograve -40 KPX K ohungarumlaut -40 KPX K omacron -40 KPX K oslash -40 KPX K otilde -40 KPX K u -40 KPX K uacute -40 KPX K ucircumflex -40 KPX K udieresis -40 KPX K ugrave -40 KPX K uhungarumlaut -40 KPX K umacron -40 KPX K uogonek -40 KPX K uring -40 KPX K y -40 KPX K yacute -40 KPX K ydieresis -40 KPX Kcommaaccent O -50 KPX Kcommaaccent Oacute -50 KPX Kcommaaccent Ocircumflex -50 KPX Kcommaaccent Odieresis -50 KPX Kcommaaccent Ograve -50 KPX Kcommaaccent Ohungarumlaut -50 KPX Kcommaaccent Omacron -50 KPX Kcommaaccent Oslash -50 KPX Kcommaaccent Otilde -50 KPX Kcommaaccent e -35 KPX Kcommaaccent eacute -35 KPX Kcommaaccent ecaron -35 KPX Kcommaaccent ecircumflex -35 KPX Kcommaaccent edieresis -35 KPX Kcommaaccent edotaccent -35 KPX Kcommaaccent egrave -35 KPX Kcommaaccent emacron -35 KPX Kcommaaccent eogonek -35 KPX Kcommaaccent o -40 KPX Kcommaaccent oacute -40 KPX Kcommaaccent ocircumflex -40 KPX Kcommaaccent odieresis -40 KPX Kcommaaccent ograve -40 KPX Kcommaaccent ohungarumlaut -40 KPX Kcommaaccent omacron -40 KPX Kcommaaccent oslash -40 KPX Kcommaaccent otilde -40 KPX Kcommaaccent u -40 KPX Kcommaaccent uacute -40 KPX Kcommaaccent ucircumflex -40 KPX Kcommaaccent udieresis -40 KPX Kcommaaccent ugrave -40 KPX Kcommaaccent uhungarumlaut -40 KPX Kcommaaccent umacron -40 KPX Kcommaaccent uogonek -40 KPX Kcommaaccent uring -40 KPX Kcommaaccent y -40 KPX Kcommaaccent yacute -40 KPX Kcommaaccent ydieresis -40 KPX L T -20 KPX L Tcaron -20 KPX L Tcommaaccent -20 KPX L V -55 KPX L W -55 KPX L Y -20 KPX L Yacute -20 KPX L Ydieresis -20 KPX L quoteright -37 KPX L y -30 KPX L yacute -30 KPX L ydieresis -30 KPX Lacute T -20 KPX Lacute Tcaron -20 KPX Lacute Tcommaaccent -20 KPX Lacute V -55 KPX Lacute W -55 KPX Lacute Y -20 KPX Lacute Yacute -20 KPX Lacute Ydieresis -20 KPX Lacute quoteright -37 KPX Lacute y -30 KPX Lacute yacute -30 KPX Lacute ydieresis -30 KPX Lcommaaccent T -20 KPX Lcommaaccent Tcaron -20 KPX Lcommaaccent Tcommaaccent -20 KPX Lcommaaccent V -55 KPX Lcommaaccent W -55 KPX Lcommaaccent Y -20 KPX Lcommaaccent Yacute -20 KPX Lcommaaccent Ydieresis -20 KPX Lcommaaccent quoteright -37 KPX Lcommaaccent y -30 KPX Lcommaaccent yacute -30 KPX Lcommaaccent ydieresis -30 KPX Lslash T -20 KPX Lslash Tcaron -20 KPX Lslash Tcommaaccent -20 KPX Lslash V -55 KPX Lslash W -55 KPX Lslash Y -20 KPX Lslash Yacute -20 KPX Lslash Ydieresis -20 KPX Lslash quoteright -37 KPX Lslash y -30 KPX Lslash yacute -30 KPX Lslash ydieresis -30 KPX N A -27 KPX N Aacute -27 KPX N Abreve -27 KPX N Acircumflex -27 KPX N Adieresis -27 KPX N Agrave -27 KPX N Amacron -27 KPX N Aogonek -27 KPX N Aring -27 KPX N Atilde -27 KPX Nacute A -27 KPX Nacute Aacute -27 KPX Nacute Abreve -27 KPX Nacute Acircumflex -27 KPX Nacute Adieresis -27 KPX Nacute Agrave -27 KPX Nacute Amacron -27 KPX Nacute Aogonek -27 KPX Nacute Aring -27 KPX Nacute Atilde -27 KPX Ncaron A -27 KPX Ncaron Aacute -27 KPX Ncaron Abreve -27 KPX Ncaron Acircumflex -27 KPX Ncaron Adieresis -27 KPX Ncaron Agrave -27 KPX Ncaron Amacron -27 KPX Ncaron Aogonek -27 KPX Ncaron Aring -27 KPX Ncaron Atilde -27 KPX Ncommaaccent A -27 KPX Ncommaaccent Aacute -27 KPX Ncommaaccent Abreve -27 KPX Ncommaaccent Acircumflex -27 KPX Ncommaaccent Adieresis -27 KPX Ncommaaccent Agrave -27 KPX Ncommaaccent Amacron -27 KPX Ncommaaccent Aogonek -27 KPX Ncommaaccent Aring -27 KPX Ncommaaccent Atilde -27 KPX Ntilde A -27 KPX Ntilde Aacute -27 KPX Ntilde Abreve -27 KPX Ntilde Acircumflex -27 KPX Ntilde Adieresis -27 KPX Ntilde Agrave -27 KPX Ntilde Amacron -27 KPX Ntilde Aogonek -27 KPX Ntilde Aring -27 KPX Ntilde Atilde -27 KPX O A -55 KPX O Aacute -55 KPX O Abreve -55 KPX O Acircumflex -55 KPX O Adieresis -55 KPX O Agrave -55 KPX O Amacron -55 KPX O Aogonek -55 KPX O Aring -55 KPX O Atilde -55 KPX O T -40 KPX O Tcaron -40 KPX O Tcommaaccent -40 KPX O V -50 KPX O W -50 KPX O X -40 KPX O Y -50 KPX O Yacute -50 KPX O Ydieresis -50 KPX Oacute A -55 KPX Oacute Aacute -55 KPX Oacute Abreve -55 KPX Oacute Acircumflex -55 KPX Oacute Adieresis -55 KPX Oacute Agrave -55 KPX Oacute Amacron -55 KPX Oacute Aogonek -55 KPX Oacute Aring -55 KPX Oacute Atilde -55 KPX Oacute T -40 KPX Oacute Tcaron -40 KPX Oacute Tcommaaccent -40 KPX Oacute V -50 KPX Oacute W -50 KPX Oacute X -40 KPX Oacute Y -50 KPX Oacute Yacute -50 KPX Oacute Ydieresis -50 KPX Ocircumflex A -55 KPX Ocircumflex Aacute -55 KPX Ocircumflex Abreve -55 KPX Ocircumflex Acircumflex -55 KPX Ocircumflex Adieresis -55 KPX Ocircumflex Agrave -55 KPX Ocircumflex Amacron -55 KPX Ocircumflex Aogonek -55 KPX Ocircumflex Aring -55 KPX Ocircumflex Atilde -55 KPX Ocircumflex T -40 KPX Ocircumflex Tcaron -40 KPX Ocircumflex Tcommaaccent -40 KPX Ocircumflex V -50 KPX Ocircumflex W -50 KPX Ocircumflex X -40 KPX Ocircumflex Y -50 KPX Ocircumflex Yacute -50 KPX Ocircumflex Ydieresis -50 KPX Odieresis A -55 KPX Odieresis Aacute -55 KPX Odieresis Abreve -55 KPX Odieresis Acircumflex -55 KPX Odieresis Adieresis -55 KPX Odieresis Agrave -55 KPX Odieresis Amacron -55 KPX Odieresis Aogonek -55 KPX Odieresis Aring -55 KPX Odieresis Atilde -55 KPX Odieresis T -40 KPX Odieresis Tcaron -40 KPX Odieresis Tcommaaccent -40 KPX Odieresis V -50 KPX Odieresis W -50 KPX Odieresis X -40 KPX Odieresis Y -50 KPX Odieresis Yacute -50 KPX Odieresis Ydieresis -50 KPX Ograve A -55 KPX Ograve Aacute -55 KPX Ograve Abreve -55 KPX Ograve Acircumflex -55 KPX Ograve Adieresis -55 KPX Ograve Agrave -55 KPX Ograve Amacron -55 KPX Ograve Aogonek -55 KPX Ograve Aring -55 KPX Ograve Atilde -55 KPX Ograve T -40 KPX Ograve Tcaron -40 KPX Ograve Tcommaaccent -40 KPX Ograve V -50 KPX Ograve W -50 KPX Ograve X -40 KPX Ograve Y -50 KPX Ograve Yacute -50 KPX Ograve Ydieresis -50 KPX Ohungarumlaut A -55 KPX Ohungarumlaut Aacute -55 KPX Ohungarumlaut Abreve -55 KPX Ohungarumlaut Acircumflex -55 KPX Ohungarumlaut Adieresis -55 KPX Ohungarumlaut Agrave -55 KPX Ohungarumlaut Amacron -55 KPX Ohungarumlaut Aogonek -55 KPX Ohungarumlaut Aring -55 KPX Ohungarumlaut Atilde -55 KPX Ohungarumlaut T -40 KPX Ohungarumlaut Tcaron -40 KPX Ohungarumlaut Tcommaaccent -40 KPX Ohungarumlaut V -50 KPX Ohungarumlaut W -50 KPX Ohungarumlaut X -40 KPX Ohungarumlaut Y -50 KPX Ohungarumlaut Yacute -50 KPX Ohungarumlaut Ydieresis -50 KPX Omacron A -55 KPX Omacron Aacute -55 KPX Omacron Abreve -55 KPX Omacron Acircumflex -55 KPX Omacron Adieresis -55 KPX Omacron Agrave -55 KPX Omacron Amacron -55 KPX Omacron Aogonek -55 KPX Omacron Aring -55 KPX Omacron Atilde -55 KPX Omacron T -40 KPX Omacron Tcaron -40 KPX Omacron Tcommaaccent -40 KPX Omacron V -50 KPX Omacron W -50 KPX Omacron X -40 KPX Omacron Y -50 KPX Omacron Yacute -50 KPX Omacron Ydieresis -50 KPX Oslash A -55 KPX Oslash Aacute -55 KPX Oslash Abreve -55 KPX Oslash Acircumflex -55 KPX Oslash Adieresis -55 KPX Oslash Agrave -55 KPX Oslash Amacron -55 KPX Oslash Aogonek -55 KPX Oslash Aring -55 KPX Oslash Atilde -55 KPX Oslash T -40 KPX Oslash Tcaron -40 KPX Oslash Tcommaaccent -40 KPX Oslash V -50 KPX Oslash W -50 KPX Oslash X -40 KPX Oslash Y -50 KPX Oslash Yacute -50 KPX Oslash Ydieresis -50 KPX Otilde A -55 KPX Otilde Aacute -55 KPX Otilde Abreve -55 KPX Otilde Acircumflex -55 KPX Otilde Adieresis -55 KPX Otilde Agrave -55 KPX Otilde Amacron -55 KPX Otilde Aogonek -55 KPX Otilde Aring -55 KPX Otilde Atilde -55 KPX Otilde T -40 KPX Otilde Tcaron -40 KPX Otilde Tcommaaccent -40 KPX Otilde V -50 KPX Otilde W -50 KPX Otilde X -40 KPX Otilde Y -50 KPX Otilde Yacute -50 KPX Otilde Ydieresis -50 KPX P A -90 KPX P Aacute -90 KPX P Abreve -90 KPX P Acircumflex -90 KPX P Adieresis -90 KPX P Agrave -90 KPX P Amacron -90 KPX P Aogonek -90 KPX P Aring -90 KPX P Atilde -90 KPX P a -80 KPX P aacute -80 KPX P abreve -80 KPX P acircumflex -80 KPX P adieresis -80 KPX P agrave -80 KPX P amacron -80 KPX P aogonek -80 KPX P aring -80 KPX P atilde -80 KPX P comma -135 KPX P e -80 KPX P eacute -80 KPX P ecaron -80 KPX P ecircumflex -80 KPX P edieresis -80 KPX P edotaccent -80 KPX P egrave -80 KPX P emacron -80 KPX P eogonek -80 KPX P o -80 KPX P oacute -80 KPX P ocircumflex -80 KPX P odieresis -80 KPX P ograve -80 KPX P ohungarumlaut -80 KPX P omacron -80 KPX P oslash -80 KPX P otilde -80 KPX P period -135 KPX Q U -10 KPX Q Uacute -10 KPX Q Ucircumflex -10 KPX Q Udieresis -10 KPX Q Ugrave -10 KPX Q Uhungarumlaut -10 KPX Q Umacron -10 KPX Q Uogonek -10 KPX Q Uring -10 KPX R O -40 KPX R Oacute -40 KPX R Ocircumflex -40 KPX R Odieresis -40 KPX R Ograve -40 KPX R Ohungarumlaut -40 KPX R Omacron -40 KPX R Oslash -40 KPX R Otilde -40 KPX R U -40 KPX R Uacute -40 KPX R Ucircumflex -40 KPX R Udieresis -40 KPX R Ugrave -40 KPX R Uhungarumlaut -40 KPX R Umacron -40 KPX R Uogonek -40 KPX R Uring -40 KPX R V -18 KPX R W -18 KPX R Y -18 KPX R Yacute -18 KPX R Ydieresis -18 KPX Racute O -40 KPX Racute Oacute -40 KPX Racute Ocircumflex -40 KPX Racute Odieresis -40 KPX Racute Ograve -40 KPX Racute Ohungarumlaut -40 KPX Racute Omacron -40 KPX Racute Oslash -40 KPX Racute Otilde -40 KPX Racute U -40 KPX Racute Uacute -40 KPX Racute Ucircumflex -40 KPX Racute Udieresis -40 KPX Racute Ugrave -40 KPX Racute Uhungarumlaut -40 KPX Racute Umacron -40 KPX Racute Uogonek -40 KPX Racute Uring -40 KPX Racute V -18 KPX Racute W -18 KPX Racute Y -18 KPX Racute Yacute -18 KPX Racute Ydieresis -18 KPX Rcaron O -40 KPX Rcaron Oacute -40 KPX Rcaron Ocircumflex -40 KPX Rcaron Odieresis -40 KPX Rcaron Ograve -40 KPX Rcaron Ohungarumlaut -40 KPX Rcaron Omacron -40 KPX Rcaron Oslash -40 KPX Rcaron Otilde -40 KPX Rcaron U -40 KPX Rcaron Uacute -40 KPX Rcaron Ucircumflex -40 KPX Rcaron Udieresis -40 KPX Rcaron Ugrave -40 KPX Rcaron Uhungarumlaut -40 KPX Rcaron Umacron -40 KPX Rcaron Uogonek -40 KPX Rcaron Uring -40 KPX Rcaron V -18 KPX Rcaron W -18 KPX Rcaron Y -18 KPX Rcaron Yacute -18 KPX Rcaron Ydieresis -18 KPX Rcommaaccent O -40 KPX Rcommaaccent Oacute -40 KPX Rcommaaccent Ocircumflex -40 KPX Rcommaaccent Odieresis -40 KPX Rcommaaccent Ograve -40 KPX Rcommaaccent Ohungarumlaut -40 KPX Rcommaaccent Omacron -40 KPX Rcommaaccent Oslash -40 KPX Rcommaaccent Otilde -40 KPX Rcommaaccent U -40 KPX Rcommaaccent Uacute -40 KPX Rcommaaccent Ucircumflex -40 KPX Rcommaaccent Udieresis -40 KPX Rcommaaccent Ugrave -40 KPX Rcommaaccent Uhungarumlaut -40 KPX Rcommaaccent Umacron -40 KPX Rcommaaccent Uogonek -40 KPX Rcommaaccent Uring -40 KPX Rcommaaccent V -18 KPX Rcommaaccent W -18 KPX Rcommaaccent Y -18 KPX Rcommaaccent Yacute -18 KPX Rcommaaccent Ydieresis -18 KPX T A -50 KPX T Aacute -50 KPX T Abreve -50 KPX T Acircumflex -50 KPX T Adieresis -50 KPX T Agrave -50 KPX T Amacron -50 KPX T Aogonek -50 KPX T Aring -50 KPX T Atilde -50 KPX T O -18 KPX T Oacute -18 KPX T Ocircumflex -18 KPX T Odieresis -18 KPX T Ograve -18 KPX T Ohungarumlaut -18 KPX T Omacron -18 KPX T Oslash -18 KPX T Otilde -18 KPX T a -92 KPX T aacute -92 KPX T abreve -92 KPX T acircumflex -92 KPX T adieresis -92 KPX T agrave -92 KPX T amacron -92 KPX T aogonek -92 KPX T aring -92 KPX T atilde -92 KPX T colon -55 KPX T comma -74 KPX T e -92 KPX T eacute -92 KPX T ecaron -92 KPX T ecircumflex -52 KPX T edieresis -52 KPX T edotaccent -92 KPX T egrave -52 KPX T emacron -52 KPX T eogonek -92 KPX T hyphen -74 KPX T i -55 KPX T iacute -55 KPX T iogonek -55 KPX T o -92 KPX T oacute -92 KPX T ocircumflex -92 KPX T odieresis -92 KPX T ograve -92 KPX T ohungarumlaut -92 KPX T omacron -92 KPX T oslash -92 KPX T otilde -92 KPX T period -74 KPX T r -55 KPX T racute -55 KPX T rcaron -55 KPX T rcommaaccent -55 KPX T semicolon -65 KPX T u -55 KPX T uacute -55 KPX T ucircumflex -55 KPX T udieresis -55 KPX T ugrave -55 KPX T uhungarumlaut -55 KPX T umacron -55 KPX T uogonek -55 KPX T uring -55 KPX T w -74 KPX T y -74 KPX T yacute -74 KPX T ydieresis -34 KPX Tcaron A -50 KPX Tcaron Aacute -50 KPX Tcaron Abreve -50 KPX Tcaron Acircumflex -50 KPX Tcaron Adieresis -50 KPX Tcaron Agrave -50 KPX Tcaron Amacron -50 KPX Tcaron Aogonek -50 KPX Tcaron Aring -50 KPX Tcaron Atilde -50 KPX Tcaron O -18 KPX Tcaron Oacute -18 KPX Tcaron Ocircumflex -18 KPX Tcaron Odieresis -18 KPX Tcaron Ograve -18 KPX Tcaron Ohungarumlaut -18 KPX Tcaron Omacron -18 KPX Tcaron Oslash -18 KPX Tcaron Otilde -18 KPX Tcaron a -92 KPX Tcaron aacute -92 KPX Tcaron abreve -92 KPX Tcaron acircumflex -92 KPX Tcaron adieresis -92 KPX Tcaron agrave -92 KPX Tcaron amacron -92 KPX Tcaron aogonek -92 KPX Tcaron aring -92 KPX Tcaron atilde -92 KPX Tcaron colon -55 KPX Tcaron comma -74 KPX Tcaron e -92 KPX Tcaron eacute -92 KPX Tcaron ecaron -92 KPX Tcaron ecircumflex -52 KPX Tcaron edieresis -52 KPX Tcaron edotaccent -92 KPX Tcaron egrave -52 KPX Tcaron emacron -52 KPX Tcaron eogonek -92 KPX Tcaron hyphen -74 KPX Tcaron i -55 KPX Tcaron iacute -55 KPX Tcaron iogonek -55 KPX Tcaron o -92 KPX Tcaron oacute -92 KPX Tcaron ocircumflex -92 KPX Tcaron odieresis -92 KPX Tcaron ograve -92 KPX Tcaron ohungarumlaut -92 KPX Tcaron omacron -92 KPX Tcaron oslash -92 KPX Tcaron otilde -92 KPX Tcaron period -74 KPX Tcaron r -55 KPX Tcaron racute -55 KPX Tcaron rcaron -55 KPX Tcaron rcommaaccent -55 KPX Tcaron semicolon -65 KPX Tcaron u -55 KPX Tcaron uacute -55 KPX Tcaron ucircumflex -55 KPX Tcaron udieresis -55 KPX Tcaron ugrave -55 KPX Tcaron uhungarumlaut -55 KPX Tcaron umacron -55 KPX Tcaron uogonek -55 KPX Tcaron uring -55 KPX Tcaron w -74 KPX Tcaron y -74 KPX Tcaron yacute -74 KPX Tcaron ydieresis -34 KPX Tcommaaccent A -50 KPX Tcommaaccent Aacute -50 KPX Tcommaaccent Abreve -50 KPX Tcommaaccent Acircumflex -50 KPX Tcommaaccent Adieresis -50 KPX Tcommaaccent Agrave -50 KPX Tcommaaccent Amacron -50 KPX Tcommaaccent Aogonek -50 KPX Tcommaaccent Aring -50 KPX Tcommaaccent Atilde -50 KPX Tcommaaccent O -18 KPX Tcommaaccent Oacute -18 KPX Tcommaaccent Ocircumflex -18 KPX Tcommaaccent Odieresis -18 KPX Tcommaaccent Ograve -18 KPX Tcommaaccent Ohungarumlaut -18 KPX Tcommaaccent Omacron -18 KPX Tcommaaccent Oslash -18 KPX Tcommaaccent Otilde -18 KPX Tcommaaccent a -92 KPX Tcommaaccent aacute -92 KPX Tcommaaccent abreve -92 KPX Tcommaaccent acircumflex -92 KPX Tcommaaccent adieresis -92 KPX Tcommaaccent agrave -92 KPX Tcommaaccent amacron -92 KPX Tcommaaccent aogonek -92 KPX Tcommaaccent aring -92 KPX Tcommaaccent atilde -92 KPX Tcommaaccent colon -55 KPX Tcommaaccent comma -74 KPX Tcommaaccent e -92 KPX Tcommaaccent eacute -92 KPX Tcommaaccent ecaron -92 KPX Tcommaaccent ecircumflex -52 KPX Tcommaaccent edieresis -52 KPX Tcommaaccent edotaccent -92 KPX Tcommaaccent egrave -52 KPX Tcommaaccent emacron -52 KPX Tcommaaccent eogonek -92 KPX Tcommaaccent hyphen -74 KPX Tcommaaccent i -55 KPX Tcommaaccent iacute -55 KPX Tcommaaccent iogonek -55 KPX Tcommaaccent o -92 KPX Tcommaaccent oacute -92 KPX Tcommaaccent ocircumflex -92 KPX Tcommaaccent odieresis -92 KPX Tcommaaccent ograve -92 KPX Tcommaaccent ohungarumlaut -92 KPX Tcommaaccent omacron -92 KPX Tcommaaccent oslash -92 KPX Tcommaaccent otilde -92 KPX Tcommaaccent period -74 KPX Tcommaaccent r -55 KPX Tcommaaccent racute -55 KPX Tcommaaccent rcaron -55 KPX Tcommaaccent rcommaaccent -55 KPX Tcommaaccent semicolon -65 KPX Tcommaaccent u -55 KPX Tcommaaccent uacute -55 KPX Tcommaaccent ucircumflex -55 KPX Tcommaaccent udieresis -55 KPX Tcommaaccent ugrave -55 KPX Tcommaaccent uhungarumlaut -55 KPX Tcommaaccent umacron -55 KPX Tcommaaccent uogonek -55 KPX Tcommaaccent uring -55 KPX Tcommaaccent w -74 KPX Tcommaaccent y -74 KPX Tcommaaccent yacute -74 KPX Tcommaaccent ydieresis -34 KPX U A -40 KPX U Aacute -40 KPX U Abreve -40 KPX U Acircumflex -40 KPX U Adieresis -40 KPX U Agrave -40 KPX U Amacron -40 KPX U Aogonek -40 KPX U Aring -40 KPX U Atilde -40 KPX U comma -25 KPX U period -25 KPX Uacute A -40 KPX Uacute Aacute -40 KPX Uacute Abreve -40 KPX Uacute Acircumflex -40 KPX Uacute Adieresis -40 KPX Uacute Agrave -40 KPX Uacute Amacron -40 KPX Uacute Aogonek -40 KPX Uacute Aring -40 KPX Uacute Atilde -40 KPX Uacute comma -25 KPX Uacute period -25 KPX Ucircumflex A -40 KPX Ucircumflex Aacute -40 KPX Ucircumflex Abreve -40 KPX Ucircumflex Acircumflex -40 KPX Ucircumflex Adieresis -40 KPX Ucircumflex Agrave -40 KPX Ucircumflex Amacron -40 KPX Ucircumflex Aogonek -40 KPX Ucircumflex Aring -40 KPX Ucircumflex Atilde -40 KPX Ucircumflex comma -25 KPX Ucircumflex period -25 KPX Udieresis A -40 KPX Udieresis Aacute -40 KPX Udieresis Abreve -40 KPX Udieresis Acircumflex -40 KPX Udieresis Adieresis -40 KPX Udieresis Agrave -40 KPX Udieresis Amacron -40 KPX Udieresis Aogonek -40 KPX Udieresis Aring -40 KPX Udieresis Atilde -40 KPX Udieresis comma -25 KPX Udieresis period -25 KPX Ugrave A -40 KPX Ugrave Aacute -40 KPX Ugrave Abreve -40 KPX Ugrave Acircumflex -40 KPX Ugrave Adieresis -40 KPX Ugrave Agrave -40 KPX Ugrave Amacron -40 KPX Ugrave Aogonek -40 KPX Ugrave Aring -40 KPX Ugrave Atilde -40 KPX Ugrave comma -25 KPX Ugrave period -25 KPX Uhungarumlaut A -40 KPX Uhungarumlaut Aacute -40 KPX Uhungarumlaut Abreve -40 KPX Uhungarumlaut Acircumflex -40 KPX Uhungarumlaut Adieresis -40 KPX Uhungarumlaut Agrave -40 KPX Uhungarumlaut Amacron -40 KPX Uhungarumlaut Aogonek -40 KPX Uhungarumlaut Aring -40 KPX Uhungarumlaut Atilde -40 KPX Uhungarumlaut comma -25 KPX Uhungarumlaut period -25 KPX Umacron A -40 KPX Umacron Aacute -40 KPX Umacron Abreve -40 KPX Umacron Acircumflex -40 KPX Umacron Adieresis -40 KPX Umacron Agrave -40 KPX Umacron Amacron -40 KPX Umacron Aogonek -40 KPX Umacron Aring -40 KPX Umacron Atilde -40 KPX Umacron comma -25 KPX Umacron period -25 KPX Uogonek A -40 KPX Uogonek Aacute -40 KPX Uogonek Abreve -40 KPX Uogonek Acircumflex -40 KPX Uogonek Adieresis -40 KPX Uogonek Agrave -40 KPX Uogonek Amacron -40 KPX Uogonek Aogonek -40 KPX Uogonek Aring -40 KPX Uogonek Atilde -40 KPX Uogonek comma -25 KPX Uogonek period -25 KPX Uring A -40 KPX Uring Aacute -40 KPX Uring Abreve -40 KPX Uring Acircumflex -40 KPX Uring Adieresis -40 KPX Uring Agrave -40 KPX Uring Amacron -40 KPX Uring Aogonek -40 KPX Uring Aring -40 KPX Uring Atilde -40 KPX Uring comma -25 KPX Uring period -25 KPX V A -60 KPX V Aacute -60 KPX V Abreve -60 KPX V Acircumflex -60 KPX V Adieresis -60 KPX V Agrave -60 KPX V Amacron -60 KPX V Aogonek -60 KPX V Aring -60 KPX V Atilde -60 KPX V O -30 KPX V Oacute -30 KPX V Ocircumflex -30 KPX V Odieresis -30 KPX V Ograve -30 KPX V Ohungarumlaut -30 KPX V Omacron -30 KPX V Oslash -30 KPX V Otilde -30 KPX V a -111 KPX V aacute -111 KPX V abreve -111 KPX V acircumflex -111 KPX V adieresis -111 KPX V agrave -111 KPX V amacron -111 KPX V aogonek -111 KPX V aring -111 KPX V atilde -111 KPX V colon -65 KPX V comma -129 KPX V e -111 KPX V eacute -111 KPX V ecaron -111 KPX V ecircumflex -111 KPX V edieresis -71 KPX V edotaccent -111 KPX V egrave -71 KPX V emacron -71 KPX V eogonek -111 KPX V hyphen -55 KPX V i -74 KPX V iacute -74 KPX V icircumflex -34 KPX V idieresis -34 KPX V igrave -34 KPX V imacron -34 KPX V iogonek -74 KPX V o -111 KPX V oacute -111 KPX V ocircumflex -111 KPX V odieresis -111 KPX V ograve -111 KPX V ohungarumlaut -111 KPX V omacron -111 KPX V oslash -111 KPX V otilde -111 KPX V period -129 KPX V semicolon -74 KPX V u -74 KPX V uacute -74 KPX V ucircumflex -74 KPX V udieresis -74 KPX V ugrave -74 KPX V uhungarumlaut -74 KPX V umacron -74 KPX V uogonek -74 KPX V uring -74 KPX W A -60 KPX W Aacute -60 KPX W Abreve -60 KPX W Acircumflex -60 KPX W Adieresis -60 KPX W Agrave -60 KPX W Amacron -60 KPX W Aogonek -60 KPX W Aring -60 KPX W Atilde -60 KPX W O -25 KPX W Oacute -25 KPX W Ocircumflex -25 KPX W Odieresis -25 KPX W Ograve -25 KPX W Ohungarumlaut -25 KPX W Omacron -25 KPX W Oslash -25 KPX W Otilde -25 KPX W a -92 KPX W aacute -92 KPX W abreve -92 KPX W acircumflex -92 KPX W adieresis -92 KPX W agrave -92 KPX W amacron -92 KPX W aogonek -92 KPX W aring -92 KPX W atilde -92 KPX W colon -65 KPX W comma -92 KPX W e -92 KPX W eacute -92 KPX W ecaron -92 KPX W ecircumflex -92 KPX W edieresis -52 KPX W edotaccent -92 KPX W egrave -52 KPX W emacron -52 KPX W eogonek -92 KPX W hyphen -37 KPX W i -55 KPX W iacute -55 KPX W iogonek -55 KPX W o -92 KPX W oacute -92 KPX W ocircumflex -92 KPX W odieresis -92 KPX W ograve -92 KPX W ohungarumlaut -92 KPX W omacron -92 KPX W oslash -92 KPX W otilde -92 KPX W period -92 KPX W semicolon -65 KPX W u -55 KPX W uacute -55 KPX W ucircumflex -55 KPX W udieresis -55 KPX W ugrave -55 KPX W uhungarumlaut -55 KPX W umacron -55 KPX W uogonek -55 KPX W uring -55 KPX W y -70 KPX W yacute -70 KPX W ydieresis -70 KPX Y A -50 KPX Y Aacute -50 KPX Y Abreve -50 KPX Y Acircumflex -50 KPX Y Adieresis -50 KPX Y Agrave -50 KPX Y Amacron -50 KPX Y Aogonek -50 KPX Y Aring -50 KPX Y Atilde -50 KPX Y O -15 KPX Y Oacute -15 KPX Y Ocircumflex -15 KPX Y Odieresis -15 KPX Y Ograve -15 KPX Y Ohungarumlaut -15 KPX Y Omacron -15 KPX Y Oslash -15 KPX Y Otilde -15 KPX Y a -92 KPX Y aacute -92 KPX Y abreve -92 KPX Y acircumflex -92 KPX Y adieresis -92 KPX Y agrave -92 KPX Y amacron -92 KPX Y aogonek -92 KPX Y aring -92 KPX Y atilde -92 KPX Y colon -65 KPX Y comma -92 KPX Y e -92 KPX Y eacute -92 KPX Y ecaron -92 KPX Y ecircumflex -92 KPX Y edieresis -52 KPX Y edotaccent -92 KPX Y egrave -52 KPX Y emacron -52 KPX Y eogonek -92 KPX Y hyphen -74 KPX Y i -74 KPX Y iacute -74 KPX Y icircumflex -34 KPX Y idieresis -34 KPX Y igrave -34 KPX Y imacron -34 KPX Y iogonek -74 KPX Y o -92 KPX Y oacute -92 KPX Y ocircumflex -92 KPX Y odieresis -92 KPX Y ograve -92 KPX Y ohungarumlaut -92 KPX Y omacron -92 KPX Y oslash -92 KPX Y otilde -92 KPX Y period -92 KPX Y semicolon -65 KPX Y u -92 KPX Y uacute -92 KPX Y ucircumflex -92 KPX Y udieresis -92 KPX Y ugrave -92 KPX Y uhungarumlaut -92 KPX Y umacron -92 KPX Y uogonek -92 KPX Y uring -92 KPX Yacute A -50 KPX Yacute Aacute -50 KPX Yacute Abreve -50 KPX Yacute Acircumflex -50 KPX Yacute Adieresis -50 KPX Yacute Agrave -50 KPX Yacute Amacron -50 KPX Yacute Aogonek -50 KPX Yacute Aring -50 KPX Yacute Atilde -50 KPX Yacute O -15 KPX Yacute Oacute -15 KPX Yacute Ocircumflex -15 KPX Yacute Odieresis -15 KPX Yacute Ograve -15 KPX Yacute Ohungarumlaut -15 KPX Yacute Omacron -15 KPX Yacute Oslash -15 KPX Yacute Otilde -15 KPX Yacute a -92 KPX Yacute aacute -92 KPX Yacute abreve -92 KPX Yacute acircumflex -92 KPX Yacute adieresis -92 KPX Yacute agrave -92 KPX Yacute amacron -92 KPX Yacute aogonek -92 KPX Yacute aring -92 KPX Yacute atilde -92 KPX Yacute colon -65 KPX Yacute comma -92 KPX Yacute e -92 KPX Yacute eacute -92 KPX Yacute ecaron -92 KPX Yacute ecircumflex -92 KPX Yacute edieresis -52 KPX Yacute edotaccent -92 KPX Yacute egrave -52 KPX Yacute emacron -52 KPX Yacute eogonek -92 KPX Yacute hyphen -74 KPX Yacute i -74 KPX Yacute iacute -74 KPX Yacute icircumflex -34 KPX Yacute idieresis -34 KPX Yacute igrave -34 KPX Yacute imacron -34 KPX Yacute iogonek -74 KPX Yacute o -92 KPX Yacute oacute -92 KPX Yacute ocircumflex -92 KPX Yacute odieresis -92 KPX Yacute ograve -92 KPX Yacute ohungarumlaut -92 KPX Yacute omacron -92 KPX Yacute oslash -92 KPX Yacute otilde -92 KPX Yacute period -92 KPX Yacute semicolon -65 KPX Yacute u -92 KPX Yacute uacute -92 KPX Yacute ucircumflex -92 KPX Yacute udieresis -92 KPX Yacute ugrave -92 KPX Yacute uhungarumlaut -92 KPX Yacute umacron -92 KPX Yacute uogonek -92 KPX Yacute uring -92 KPX Ydieresis A -50 KPX Ydieresis Aacute -50 KPX Ydieresis Abreve -50 KPX Ydieresis Acircumflex -50 KPX Ydieresis Adieresis -50 KPX Ydieresis Agrave -50 KPX Ydieresis Amacron -50 KPX Ydieresis Aogonek -50 KPX Ydieresis Aring -50 KPX Ydieresis Atilde -50 KPX Ydieresis O -15 KPX Ydieresis Oacute -15 KPX Ydieresis Ocircumflex -15 KPX Ydieresis Odieresis -15 KPX Ydieresis Ograve -15 KPX Ydieresis Ohungarumlaut -15 KPX Ydieresis Omacron -15 KPX Ydieresis Oslash -15 KPX Ydieresis Otilde -15 KPX Ydieresis a -92 KPX Ydieresis aacute -92 KPX Ydieresis abreve -92 KPX Ydieresis acircumflex -92 KPX Ydieresis adieresis -92 KPX Ydieresis agrave -92 KPX Ydieresis amacron -92 KPX Ydieresis aogonek -92 KPX Ydieresis aring -92 KPX Ydieresis atilde -92 KPX Ydieresis colon -65 KPX Ydieresis comma -92 KPX Ydieresis e -92 KPX Ydieresis eacute -92 KPX Ydieresis ecaron -92 KPX Ydieresis ecircumflex -92 KPX Ydieresis edieresis -52 KPX Ydieresis edotaccent -92 KPX Ydieresis egrave -52 KPX Ydieresis emacron -52 KPX Ydieresis eogonek -92 KPX Ydieresis hyphen -74 KPX Ydieresis i -74 KPX Ydieresis iacute -74 KPX Ydieresis icircumflex -34 KPX Ydieresis idieresis -34 KPX Ydieresis igrave -34 KPX Ydieresis imacron -34 KPX Ydieresis iogonek -74 KPX Ydieresis o -92 KPX Ydieresis oacute -92 KPX Ydieresis ocircumflex -92 KPX Ydieresis odieresis -92 KPX Ydieresis ograve -92 KPX Ydieresis ohungarumlaut -92 KPX Ydieresis omacron -92 KPX Ydieresis oslash -92 KPX Ydieresis otilde -92 KPX Ydieresis period -92 KPX Ydieresis semicolon -65 KPX Ydieresis u -92 KPX Ydieresis uacute -92 KPX Ydieresis ucircumflex -92 KPX Ydieresis udieresis -92 KPX Ydieresis ugrave -92 KPX Ydieresis uhungarumlaut -92 KPX Ydieresis umacron -92 KPX Ydieresis uogonek -92 KPX Ydieresis uring -92 KPX a g -10 KPX a gbreve -10 KPX a gcommaaccent -10 KPX aacute g -10 KPX aacute gbreve -10 KPX aacute gcommaaccent -10 KPX abreve g -10 KPX abreve gbreve -10 KPX abreve gcommaaccent -10 KPX acircumflex g -10 KPX acircumflex gbreve -10 KPX acircumflex gcommaaccent -10 KPX adieresis g -10 KPX adieresis gbreve -10 KPX adieresis gcommaaccent -10 KPX agrave g -10 KPX agrave gbreve -10 KPX agrave gcommaaccent -10 KPX amacron g -10 KPX amacron gbreve -10 KPX amacron gcommaaccent -10 KPX aogonek g -10 KPX aogonek gbreve -10 KPX aogonek gcommaaccent -10 KPX aring g -10 KPX aring gbreve -10 KPX aring gcommaaccent -10 KPX atilde g -10 KPX atilde gbreve -10 KPX atilde gcommaaccent -10 KPX b period -40 KPX b u -20 KPX b uacute -20 KPX b ucircumflex -20 KPX b udieresis -20 KPX b ugrave -20 KPX b uhungarumlaut -20 KPX b umacron -20 KPX b uogonek -20 KPX b uring -20 KPX c h -15 KPX c k -20 KPX c kcommaaccent -20 KPX cacute h -15 KPX cacute k -20 KPX cacute kcommaaccent -20 KPX ccaron h -15 KPX ccaron k -20 KPX ccaron kcommaaccent -20 KPX ccedilla h -15 KPX ccedilla k -20 KPX ccedilla kcommaaccent -20 KPX comma quotedblright -140 KPX comma quoteright -140 KPX e comma -10 KPX e g -40 KPX e gbreve -40 KPX e gcommaaccent -40 KPX e period -15 KPX e v -15 KPX e w -15 KPX e x -20 KPX e y -30 KPX e yacute -30 KPX e ydieresis -30 KPX eacute comma -10 KPX eacute g -40 KPX eacute gbreve -40 KPX eacute gcommaaccent -40 KPX eacute period -15 KPX eacute v -15 KPX eacute w -15 KPX eacute x -20 KPX eacute y -30 KPX eacute yacute -30 KPX eacute ydieresis -30 KPX ecaron comma -10 KPX ecaron g -40 KPX ecaron gbreve -40 KPX ecaron gcommaaccent -40 KPX ecaron period -15 KPX ecaron v -15 KPX ecaron w -15 KPX ecaron x -20 KPX ecaron y -30 KPX ecaron yacute -30 KPX ecaron ydieresis -30 KPX ecircumflex comma -10 KPX ecircumflex g -40 KPX ecircumflex gbreve -40 KPX ecircumflex gcommaaccent -40 KPX ecircumflex period -15 KPX ecircumflex v -15 KPX ecircumflex w -15 KPX ecircumflex x -20 KPX ecircumflex y -30 KPX ecircumflex yacute -30 KPX ecircumflex ydieresis -30 KPX edieresis comma -10 KPX edieresis g -40 KPX edieresis gbreve -40 KPX edieresis gcommaaccent -40 KPX edieresis period -15 KPX edieresis v -15 KPX edieresis w -15 KPX edieresis x -20 KPX edieresis y -30 KPX edieresis yacute -30 KPX edieresis ydieresis -30 KPX edotaccent comma -10 KPX edotaccent g -40 KPX edotaccent gbreve -40 KPX edotaccent gcommaaccent -40 KPX edotaccent period -15 KPX edotaccent v -15 KPX edotaccent w -15 KPX edotaccent x -20 KPX edotaccent y -30 KPX edotaccent yacute -30 KPX edotaccent ydieresis -30 KPX egrave comma -10 KPX egrave g -40 KPX egrave gbreve -40 KPX egrave gcommaaccent -40 KPX egrave period -15 KPX egrave v -15 KPX egrave w -15 KPX egrave x -20 KPX egrave y -30 KPX egrave yacute -30 KPX egrave ydieresis -30 KPX emacron comma -10 KPX emacron g -40 KPX emacron gbreve -40 KPX emacron gcommaaccent -40 KPX emacron period -15 KPX emacron v -15 KPX emacron w -15 KPX emacron x -20 KPX emacron y -30 KPX emacron yacute -30 KPX emacron ydieresis -30 KPX eogonek comma -10 KPX eogonek g -40 KPX eogonek gbreve -40 KPX eogonek gcommaaccent -40 KPX eogonek period -15 KPX eogonek v -15 KPX eogonek w -15 KPX eogonek x -20 KPX eogonek y -30 KPX eogonek yacute -30 KPX eogonek ydieresis -30 KPX f comma -10 KPX f dotlessi -60 KPX f f -18 KPX f i -20 KPX f iogonek -20 KPX f period -15 KPX f quoteright 92 KPX g comma -10 KPX g e -10 KPX g eacute -10 KPX g ecaron -10 KPX g ecircumflex -10 KPX g edieresis -10 KPX g edotaccent -10 KPX g egrave -10 KPX g emacron -10 KPX g eogonek -10 KPX g g -10 KPX g gbreve -10 KPX g gcommaaccent -10 KPX g period -15 KPX gbreve comma -10 KPX gbreve e -10 KPX gbreve eacute -10 KPX gbreve ecaron -10 KPX gbreve ecircumflex -10 KPX gbreve edieresis -10 KPX gbreve edotaccent -10 KPX gbreve egrave -10 KPX gbreve emacron -10 KPX gbreve eogonek -10 KPX gbreve g -10 KPX gbreve gbreve -10 KPX gbreve gcommaaccent -10 KPX gbreve period -15 KPX gcommaaccent comma -10 KPX gcommaaccent e -10 KPX gcommaaccent eacute -10 KPX gcommaaccent ecaron -10 KPX gcommaaccent ecircumflex -10 KPX gcommaaccent edieresis -10 KPX gcommaaccent edotaccent -10 KPX gcommaaccent egrave -10 KPX gcommaaccent emacron -10 KPX gcommaaccent eogonek -10 KPX gcommaaccent g -10 KPX gcommaaccent gbreve -10 KPX gcommaaccent gcommaaccent -10 KPX gcommaaccent period -15 KPX k e -10 KPX k eacute -10 KPX k ecaron -10 KPX k ecircumflex -10 KPX k edieresis -10 KPX k edotaccent -10 KPX k egrave -10 KPX k emacron -10 KPX k eogonek -10 KPX k o -10 KPX k oacute -10 KPX k ocircumflex -10 KPX k odieresis -10 KPX k ograve -10 KPX k ohungarumlaut -10 KPX k omacron -10 KPX k oslash -10 KPX k otilde -10 KPX k y -10 KPX k yacute -10 KPX k ydieresis -10 KPX kcommaaccent e -10 KPX kcommaaccent eacute -10 KPX kcommaaccent ecaron -10 KPX kcommaaccent ecircumflex -10 KPX kcommaaccent edieresis -10 KPX kcommaaccent edotaccent -10 KPX kcommaaccent egrave -10 KPX kcommaaccent emacron -10 KPX kcommaaccent eogonek -10 KPX kcommaaccent o -10 KPX kcommaaccent oacute -10 KPX kcommaaccent ocircumflex -10 KPX kcommaaccent odieresis -10 KPX kcommaaccent ograve -10 KPX kcommaaccent ohungarumlaut -10 KPX kcommaaccent omacron -10 KPX kcommaaccent oslash -10 KPX kcommaaccent otilde -10 KPX kcommaaccent y -10 KPX kcommaaccent yacute -10 KPX kcommaaccent ydieresis -10 KPX n v -40 KPX nacute v -40 KPX ncaron v -40 KPX ncommaaccent v -40 KPX ntilde v -40 KPX o g -10 KPX o gbreve -10 KPX o gcommaaccent -10 KPX o v -10 KPX oacute g -10 KPX oacute gbreve -10 KPX oacute gcommaaccent -10 KPX oacute v -10 KPX ocircumflex g -10 KPX ocircumflex gbreve -10 KPX ocircumflex gcommaaccent -10 KPX ocircumflex v -10 KPX odieresis g -10 KPX odieresis gbreve -10 KPX odieresis gcommaaccent -10 KPX odieresis v -10 KPX ograve g -10 KPX ograve gbreve -10 KPX ograve gcommaaccent -10 KPX ograve v -10 KPX ohungarumlaut g -10 KPX ohungarumlaut gbreve -10 KPX ohungarumlaut gcommaaccent -10 KPX ohungarumlaut v -10 KPX omacron g -10 KPX omacron gbreve -10 KPX omacron gcommaaccent -10 KPX omacron v -10 KPX oslash g -10 KPX oslash gbreve -10 KPX oslash gcommaaccent -10 KPX oslash v -10 KPX otilde g -10 KPX otilde gbreve -10 KPX otilde gcommaaccent -10 KPX otilde v -10 KPX period quotedblright -140 KPX period quoteright -140 KPX quoteleft quoteleft -111 KPX quoteright d -25 KPX quoteright dcroat -25 KPX quoteright quoteright -111 KPX quoteright r -25 KPX quoteright racute -25 KPX quoteright rcaron -25 KPX quoteright rcommaaccent -25 KPX quoteright s -40 KPX quoteright sacute -40 KPX quoteright scaron -40 KPX quoteright scedilla -40 KPX quoteright scommaaccent -40 KPX quoteright space -111 KPX quoteright t -30 KPX quoteright tcommaaccent -30 KPX quoteright v -10 KPX r a -15 KPX r aacute -15 KPX r abreve -15 KPX r acircumflex -15 KPX r adieresis -15 KPX r agrave -15 KPX r amacron -15 KPX r aogonek -15 KPX r aring -15 KPX r atilde -15 KPX r c -37 KPX r cacute -37 KPX r ccaron -37 KPX r ccedilla -37 KPX r comma -111 KPX r d -37 KPX r dcroat -37 KPX r e -37 KPX r eacute -37 KPX r ecaron -37 KPX r ecircumflex -37 KPX r edieresis -37 KPX r edotaccent -37 KPX r egrave -37 KPX r emacron -37 KPX r eogonek -37 KPX r g -37 KPX r gbreve -37 KPX r gcommaaccent -37 KPX r hyphen -20 KPX r o -45 KPX r oacute -45 KPX r ocircumflex -45 KPX r odieresis -45 KPX r ograve -45 KPX r ohungarumlaut -45 KPX r omacron -45 KPX r oslash -45 KPX r otilde -45 KPX r period -111 KPX r q -37 KPX r s -10 KPX r sacute -10 KPX r scaron -10 KPX r scedilla -10 KPX r scommaaccent -10 KPX racute a -15 KPX racute aacute -15 KPX racute abreve -15 KPX racute acircumflex -15 KPX racute adieresis -15 KPX racute agrave -15 KPX racute amacron -15 KPX racute aogonek -15 KPX racute aring -15 KPX racute atilde -15 KPX racute c -37 KPX racute cacute -37 KPX racute ccaron -37 KPX racute ccedilla -37 KPX racute comma -111 KPX racute d -37 KPX racute dcroat -37 KPX racute e -37 KPX racute eacute -37 KPX racute ecaron -37 KPX racute ecircumflex -37 KPX racute edieresis -37 KPX racute edotaccent -37 KPX racute egrave -37 KPX racute emacron -37 KPX racute eogonek -37 KPX racute g -37 KPX racute gbreve -37 KPX racute gcommaaccent -37 KPX racute hyphen -20 KPX racute o -45 KPX racute oacute -45 KPX racute ocircumflex -45 KPX racute odieresis -45 KPX racute ograve -45 KPX racute ohungarumlaut -45 KPX racute omacron -45 KPX racute oslash -45 KPX racute otilde -45 KPX racute period -111 KPX racute q -37 KPX racute s -10 KPX racute sacute -10 KPX racute scaron -10 KPX racute scedilla -10 KPX racute scommaaccent -10 KPX rcaron a -15 KPX rcaron aacute -15 KPX rcaron abreve -15 KPX rcaron acircumflex -15 KPX rcaron adieresis -15 KPX rcaron agrave -15 KPX rcaron amacron -15 KPX rcaron aogonek -15 KPX rcaron aring -15 KPX rcaron atilde -15 KPX rcaron c -37 KPX rcaron cacute -37 KPX rcaron ccaron -37 KPX rcaron ccedilla -37 KPX rcaron comma -111 KPX rcaron d -37 KPX rcaron dcroat -37 KPX rcaron e -37 KPX rcaron eacute -37 KPX rcaron ecaron -37 KPX rcaron ecircumflex -37 KPX rcaron edieresis -37 KPX rcaron edotaccent -37 KPX rcaron egrave -37 KPX rcaron emacron -37 KPX rcaron eogonek -37 KPX rcaron g -37 KPX rcaron gbreve -37 KPX rcaron gcommaaccent -37 KPX rcaron hyphen -20 KPX rcaron o -45 KPX rcaron oacute -45 KPX rcaron ocircumflex -45 KPX rcaron odieresis -45 KPX rcaron ograve -45 KPX rcaron ohungarumlaut -45 KPX rcaron omacron -45 KPX rcaron oslash -45 KPX rcaron otilde -45 KPX rcaron period -111 KPX rcaron q -37 KPX rcaron s -10 KPX rcaron sacute -10 KPX rcaron scaron -10 KPX rcaron scedilla -10 KPX rcaron scommaaccent -10 KPX rcommaaccent a -15 KPX rcommaaccent aacute -15 KPX rcommaaccent abreve -15 KPX rcommaaccent acircumflex -15 KPX rcommaaccent adieresis -15 KPX rcommaaccent agrave -15 KPX rcommaaccent amacron -15 KPX rcommaaccent aogonek -15 KPX rcommaaccent aring -15 KPX rcommaaccent atilde -15 KPX rcommaaccent c -37 KPX rcommaaccent cacute -37 KPX rcommaaccent ccaron -37 KPX rcommaaccent ccedilla -37 KPX rcommaaccent comma -111 KPX rcommaaccent d -37 KPX rcommaaccent dcroat -37 KPX rcommaaccent e -37 KPX rcommaaccent eacute -37 KPX rcommaaccent ecaron -37 KPX rcommaaccent ecircumflex -37 KPX rcommaaccent edieresis -37 KPX rcommaaccent edotaccent -37 KPX rcommaaccent egrave -37 KPX rcommaaccent emacron -37 KPX rcommaaccent eogonek -37 KPX rcommaaccent g -37 KPX rcommaaccent gbreve -37 KPX rcommaaccent gcommaaccent -37 KPX rcommaaccent hyphen -20 KPX rcommaaccent o -45 KPX rcommaaccent oacute -45 KPX rcommaaccent ocircumflex -45 KPX rcommaaccent odieresis -45 KPX rcommaaccent ograve -45 KPX rcommaaccent ohungarumlaut -45 KPX rcommaaccent omacron -45 KPX rcommaaccent oslash -45 KPX rcommaaccent otilde -45 KPX rcommaaccent period -111 KPX rcommaaccent q -37 KPX rcommaaccent s -10 KPX rcommaaccent sacute -10 KPX rcommaaccent scaron -10 KPX rcommaaccent scedilla -10 KPX rcommaaccent scommaaccent -10 KPX space A -18 KPX space Aacute -18 KPX space Abreve -18 KPX space Acircumflex -18 KPX space Adieresis -18 KPX space Agrave -18 KPX space Amacron -18 KPX space Aogonek -18 KPX space Aring -18 KPX space Atilde -18 KPX space T -18 KPX space Tcaron -18 KPX space Tcommaaccent -18 KPX space V -35 KPX space W -40 KPX space Y -75 KPX space Yacute -75 KPX space Ydieresis -75 KPX v comma -74 KPX v period -74 KPX w comma -74 KPX w period -74 KPX y comma -55 KPX y period -55 KPX yacute comma -55 KPX yacute period -55 KPX ydieresis comma -55 KPX ydieresis period -55 EndKernPairs EndKernData EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/pdfcorefonts/Times-Roman.afm ================================================ StartFontMetrics 4.1 Comment Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Thu May 1 12:49:17 1997 Comment UniqueID 43068 Comment VMusage 43909 54934 FontName Times-Roman FullName Times Roman FamilyName Times Weight Roman ItalicAngle 0 IsFixedPitch false CharacterSet ExtendedRoman FontBBox -168 -218 1000 898 UnderlinePosition -100 UnderlineThickness 50 Version 002.000 Notice Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype-Hell AG and/or its subsidiaries. EncodingScheme AdobeStandardEncoding CapHeight 662 XHeight 450 Ascender 683 Descender -217 StdHW 28 StdVW 84 StartCharMetrics 315 C 32 ; WX 250 ; N space ; B 0 0 0 0 ; C 33 ; WX 333 ; N exclam ; B 130 -9 238 676 ; C 34 ; WX 408 ; N quotedbl ; B 77 431 331 676 ; C 35 ; WX 500 ; N numbersign ; B 5 0 496 662 ; C 36 ; WX 500 ; N dollar ; B 44 -87 457 727 ; C 37 ; WX 833 ; N percent ; B 61 -13 772 676 ; C 38 ; WX 778 ; N ampersand ; B 42 -13 750 676 ; C 39 ; WX 333 ; N quoteright ; B 79 433 218 676 ; C 40 ; WX 333 ; N parenleft ; B 48 -177 304 676 ; C 41 ; WX 333 ; N parenright ; B 29 -177 285 676 ; C 42 ; WX 500 ; N asterisk ; B 69 265 432 676 ; C 43 ; WX 564 ; N plus ; B 30 0 534 506 ; C 44 ; WX 250 ; N comma ; B 56 -141 195 102 ; C 45 ; WX 333 ; N hyphen ; B 39 194 285 257 ; C 46 ; WX 250 ; N period ; B 70 -11 181 100 ; C 47 ; WX 278 ; N slash ; B -9 -14 287 676 ; C 48 ; WX 500 ; N zero ; B 24 -14 476 676 ; C 49 ; WX 500 ; N one ; B 111 0 394 676 ; C 50 ; WX 500 ; N two ; B 30 0 475 676 ; C 51 ; WX 500 ; N three ; B 43 -14 431 676 ; C 52 ; WX 500 ; N four ; B 12 0 472 676 ; C 53 ; WX 500 ; N five ; B 32 -14 438 688 ; C 54 ; WX 500 ; N six ; B 34 -14 468 684 ; C 55 ; WX 500 ; N seven ; B 20 -8 449 662 ; C 56 ; WX 500 ; N eight ; B 56 -14 445 676 ; C 57 ; WX 500 ; N nine ; B 30 -22 459 676 ; C 58 ; WX 278 ; N colon ; B 81 -11 192 459 ; C 59 ; WX 278 ; N semicolon ; B 80 -141 219 459 ; C 60 ; WX 564 ; N less ; B 28 -8 536 514 ; C 61 ; WX 564 ; N equal ; B 30 120 534 386 ; C 62 ; WX 564 ; N greater ; B 28 -8 536 514 ; C 63 ; WX 444 ; N question ; B 68 -8 414 676 ; C 64 ; WX 921 ; N at ; B 116 -14 809 676 ; C 65 ; WX 722 ; N A ; B 15 0 706 674 ; C 66 ; WX 667 ; N B ; B 17 0 593 662 ; C 67 ; WX 667 ; N C ; B 28 -14 633 676 ; C 68 ; WX 722 ; N D ; B 16 0 685 662 ; C 69 ; WX 611 ; N E ; B 12 0 597 662 ; C 70 ; WX 556 ; N F ; B 12 0 546 662 ; C 71 ; WX 722 ; N G ; B 32 -14 709 676 ; C 72 ; WX 722 ; N H ; B 19 0 702 662 ; C 73 ; WX 333 ; N I ; B 18 0 315 662 ; C 74 ; WX 389 ; N J ; B 10 -14 370 662 ; C 75 ; WX 722 ; N K ; B 34 0 723 662 ; C 76 ; WX 611 ; N L ; B 12 0 598 662 ; C 77 ; WX 889 ; N M ; B 12 0 863 662 ; C 78 ; WX 722 ; N N ; B 12 -11 707 662 ; C 79 ; WX 722 ; N O ; B 34 -14 688 676 ; C 80 ; WX 556 ; N P ; B 16 0 542 662 ; C 81 ; WX 722 ; N Q ; B 34 -178 701 676 ; C 82 ; WX 667 ; N R ; B 17 0 659 662 ; C 83 ; WX 556 ; N S ; B 42 -14 491 676 ; C 84 ; WX 611 ; N T ; B 17 0 593 662 ; C 85 ; WX 722 ; N U ; B 14 -14 705 662 ; C 86 ; WX 722 ; N V ; B 16 -11 697 662 ; C 87 ; WX 944 ; N W ; B 5 -11 932 662 ; C 88 ; WX 722 ; N X ; B 10 0 704 662 ; C 89 ; WX 722 ; N Y ; B 22 0 703 662 ; C 90 ; WX 611 ; N Z ; B 9 0 597 662 ; C 91 ; WX 333 ; N bracketleft ; B 88 -156 299 662 ; C 92 ; WX 278 ; N backslash ; B -9 -14 287 676 ; C 93 ; WX 333 ; N bracketright ; B 34 -156 245 662 ; C 94 ; WX 469 ; N asciicircum ; B 24 297 446 662 ; C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; C 96 ; WX 333 ; N quoteleft ; B 115 433 254 676 ; C 97 ; WX 444 ; N a ; B 37 -10 442 460 ; C 98 ; WX 500 ; N b ; B 3 -10 468 683 ; C 99 ; WX 444 ; N c ; B 25 -10 412 460 ; C 100 ; WX 500 ; N d ; B 27 -10 491 683 ; C 101 ; WX 444 ; N e ; B 25 -10 424 460 ; C 102 ; WX 333 ; N f ; B 20 0 383 683 ; L i fi ; L l fl ; C 103 ; WX 500 ; N g ; B 28 -218 470 460 ; C 104 ; WX 500 ; N h ; B 9 0 487 683 ; C 105 ; WX 278 ; N i ; B 16 0 253 683 ; C 106 ; WX 278 ; N j ; B -70 -218 194 683 ; C 107 ; WX 500 ; N k ; B 7 0 505 683 ; C 108 ; WX 278 ; N l ; B 19 0 257 683 ; C 109 ; WX 778 ; N m ; B 16 0 775 460 ; C 110 ; WX 500 ; N n ; B 16 0 485 460 ; C 111 ; WX 500 ; N o ; B 29 -10 470 460 ; C 112 ; WX 500 ; N p ; B 5 -217 470 460 ; C 113 ; WX 500 ; N q ; B 24 -217 488 460 ; C 114 ; WX 333 ; N r ; B 5 0 335 460 ; C 115 ; WX 389 ; N s ; B 51 -10 348 460 ; C 116 ; WX 278 ; N t ; B 13 -10 279 579 ; C 117 ; WX 500 ; N u ; B 9 -10 479 450 ; C 118 ; WX 500 ; N v ; B 19 -14 477 450 ; C 119 ; WX 722 ; N w ; B 21 -14 694 450 ; C 120 ; WX 500 ; N x ; B 17 0 479 450 ; C 121 ; WX 500 ; N y ; B 14 -218 475 450 ; C 122 ; WX 444 ; N z ; B 27 0 418 450 ; C 123 ; WX 480 ; N braceleft ; B 100 -181 350 680 ; C 124 ; WX 200 ; N bar ; B 67 -218 133 782 ; C 125 ; WX 480 ; N braceright ; B 130 -181 380 680 ; C 126 ; WX 541 ; N asciitilde ; B 40 183 502 323 ; C 161 ; WX 333 ; N exclamdown ; B 97 -218 205 467 ; C 162 ; WX 500 ; N cent ; B 53 -138 448 579 ; C 163 ; WX 500 ; N sterling ; B 12 -8 490 676 ; C 164 ; WX 167 ; N fraction ; B -168 -14 331 676 ; C 165 ; WX 500 ; N yen ; B -53 0 512 662 ; C 166 ; WX 500 ; N florin ; B 7 -189 490 676 ; C 167 ; WX 500 ; N section ; B 70 -148 426 676 ; C 168 ; WX 500 ; N currency ; B -22 58 522 602 ; C 169 ; WX 180 ; N quotesingle ; B 48 431 133 676 ; C 170 ; WX 444 ; N quotedblleft ; B 43 433 414 676 ; C 171 ; WX 500 ; N guillemotleft ; B 42 33 456 416 ; C 172 ; WX 333 ; N guilsinglleft ; B 63 33 285 416 ; C 173 ; WX 333 ; N guilsinglright ; B 48 33 270 416 ; C 174 ; WX 556 ; N fi ; B 31 0 521 683 ; C 175 ; WX 556 ; N fl ; B 32 0 521 683 ; C 177 ; WX 500 ; N endash ; B 0 201 500 250 ; C 178 ; WX 500 ; N dagger ; B 59 -149 442 676 ; C 179 ; WX 500 ; N daggerdbl ; B 58 -153 442 676 ; C 180 ; WX 250 ; N periodcentered ; B 70 199 181 310 ; C 182 ; WX 453 ; N paragraph ; B -22 -154 450 662 ; C 183 ; WX 350 ; N bullet ; B 40 196 310 466 ; C 184 ; WX 333 ; N quotesinglbase ; B 79 -141 218 102 ; C 185 ; WX 444 ; N quotedblbase ; B 45 -141 416 102 ; C 186 ; WX 444 ; N quotedblright ; B 30 433 401 676 ; C 187 ; WX 500 ; N guillemotright ; B 44 33 458 416 ; C 188 ; WX 1000 ; N ellipsis ; B 111 -11 888 100 ; C 189 ; WX 1000 ; N perthousand ; B 7 -19 994 706 ; C 191 ; WX 444 ; N questiondown ; B 30 -218 376 466 ; C 193 ; WX 333 ; N grave ; B 19 507 242 678 ; C 194 ; WX 333 ; N acute ; B 93 507 317 678 ; C 195 ; WX 333 ; N circumflex ; B 11 507 322 674 ; C 196 ; WX 333 ; N tilde ; B 1 532 331 638 ; C 197 ; WX 333 ; N macron ; B 11 547 322 601 ; C 198 ; WX 333 ; N breve ; B 26 507 307 664 ; C 199 ; WX 333 ; N dotaccent ; B 118 581 216 681 ; C 200 ; WX 333 ; N dieresis ; B 18 581 315 681 ; C 202 ; WX 333 ; N ring ; B 67 512 266 711 ; C 203 ; WX 333 ; N cedilla ; B 52 -215 261 0 ; C 205 ; WX 333 ; N hungarumlaut ; B -3 507 377 678 ; C 206 ; WX 333 ; N ogonek ; B 62 -165 243 0 ; C 207 ; WX 333 ; N caron ; B 11 507 322 674 ; C 208 ; WX 1000 ; N emdash ; B 0 201 1000 250 ; C 225 ; WX 889 ; N AE ; B 0 0 863 662 ; C 227 ; WX 276 ; N ordfeminine ; B 4 394 270 676 ; C 232 ; WX 611 ; N Lslash ; B 12 0 598 662 ; C 233 ; WX 722 ; N Oslash ; B 34 -80 688 734 ; C 234 ; WX 889 ; N OE ; B 30 -6 885 668 ; C 235 ; WX 310 ; N ordmasculine ; B 6 394 304 676 ; C 241 ; WX 667 ; N ae ; B 38 -10 632 460 ; C 245 ; WX 278 ; N dotlessi ; B 16 0 253 460 ; C 248 ; WX 278 ; N lslash ; B 19 0 259 683 ; C 249 ; WX 500 ; N oslash ; B 29 -112 470 551 ; C 250 ; WX 722 ; N oe ; B 30 -10 690 460 ; C 251 ; WX 500 ; N germandbls ; B 12 -9 468 683 ; C -1 ; WX 333 ; N Idieresis ; B 18 0 315 835 ; C -1 ; WX 444 ; N eacute ; B 25 -10 424 678 ; C -1 ; WX 444 ; N abreve ; B 37 -10 442 664 ; C -1 ; WX 500 ; N uhungarumlaut ; B 9 -10 501 678 ; C -1 ; WX 444 ; N ecaron ; B 25 -10 424 674 ; C -1 ; WX 722 ; N Ydieresis ; B 22 0 703 835 ; C -1 ; WX 564 ; N divide ; B 30 -10 534 516 ; C -1 ; WX 722 ; N Yacute ; B 22 0 703 890 ; C -1 ; WX 722 ; N Acircumflex ; B 15 0 706 886 ; C -1 ; WX 444 ; N aacute ; B 37 -10 442 678 ; C -1 ; WX 722 ; N Ucircumflex ; B 14 -14 705 886 ; C -1 ; WX 500 ; N yacute ; B 14 -218 475 678 ; C -1 ; WX 389 ; N scommaaccent ; B 51 -218 348 460 ; C -1 ; WX 444 ; N ecircumflex ; B 25 -10 424 674 ; C -1 ; WX 722 ; N Uring ; B 14 -14 705 898 ; C -1 ; WX 722 ; N Udieresis ; B 14 -14 705 835 ; C -1 ; WX 444 ; N aogonek ; B 37 -165 469 460 ; C -1 ; WX 722 ; N Uacute ; B 14 -14 705 890 ; C -1 ; WX 500 ; N uogonek ; B 9 -155 487 450 ; C -1 ; WX 611 ; N Edieresis ; B 12 0 597 835 ; C -1 ; WX 722 ; N Dcroat ; B 16 0 685 662 ; C -1 ; WX 250 ; N commaaccent ; B 59 -218 184 -50 ; C -1 ; WX 760 ; N copyright ; B 38 -14 722 676 ; C -1 ; WX 611 ; N Emacron ; B 12 0 597 813 ; C -1 ; WX 444 ; N ccaron ; B 25 -10 412 674 ; C -1 ; WX 444 ; N aring ; B 37 -10 442 711 ; C -1 ; WX 722 ; N Ncommaaccent ; B 12 -198 707 662 ; C -1 ; WX 278 ; N lacute ; B 19 0 290 890 ; C -1 ; WX 444 ; N agrave ; B 37 -10 442 678 ; C -1 ; WX 611 ; N Tcommaaccent ; B 17 -218 593 662 ; C -1 ; WX 667 ; N Cacute ; B 28 -14 633 890 ; C -1 ; WX 444 ; N atilde ; B 37 -10 442 638 ; C -1 ; WX 611 ; N Edotaccent ; B 12 0 597 835 ; C -1 ; WX 389 ; N scaron ; B 39 -10 350 674 ; C -1 ; WX 389 ; N scedilla ; B 51 -215 348 460 ; C -1 ; WX 278 ; N iacute ; B 16 0 290 678 ; C -1 ; WX 471 ; N lozenge ; B 13 0 459 724 ; C -1 ; WX 667 ; N Rcaron ; B 17 0 659 886 ; C -1 ; WX 722 ; N Gcommaaccent ; B 32 -218 709 676 ; C -1 ; WX 500 ; N ucircumflex ; B 9 -10 479 674 ; C -1 ; WX 444 ; N acircumflex ; B 37 -10 442 674 ; C -1 ; WX 722 ; N Amacron ; B 15 0 706 813 ; C -1 ; WX 333 ; N rcaron ; B 5 0 335 674 ; C -1 ; WX 444 ; N ccedilla ; B 25 -215 412 460 ; C -1 ; WX 611 ; N Zdotaccent ; B 9 0 597 835 ; C -1 ; WX 556 ; N Thorn ; B 16 0 542 662 ; C -1 ; WX 722 ; N Omacron ; B 34 -14 688 813 ; C -1 ; WX 667 ; N Racute ; B 17 0 659 890 ; C -1 ; WX 556 ; N Sacute ; B 42 -14 491 890 ; C -1 ; WX 588 ; N dcaron ; B 27 -10 589 695 ; C -1 ; WX 722 ; N Umacron ; B 14 -14 705 813 ; C -1 ; WX 500 ; N uring ; B 9 -10 479 711 ; C -1 ; WX 300 ; N threesuperior ; B 15 262 291 676 ; C -1 ; WX 722 ; N Ograve ; B 34 -14 688 890 ; C -1 ; WX 722 ; N Agrave ; B 15 0 706 890 ; C -1 ; WX 722 ; N Abreve ; B 15 0 706 876 ; C -1 ; WX 564 ; N multiply ; B 38 8 527 497 ; C -1 ; WX 500 ; N uacute ; B 9 -10 479 678 ; C -1 ; WX 611 ; N Tcaron ; B 17 0 593 886 ; C -1 ; WX 476 ; N partialdiff ; B 17 -38 459 710 ; C -1 ; WX 500 ; N ydieresis ; B 14 -218 475 623 ; C -1 ; WX 722 ; N Nacute ; B 12 -11 707 890 ; C -1 ; WX 278 ; N icircumflex ; B -16 0 295 674 ; C -1 ; WX 611 ; N Ecircumflex ; B 12 0 597 886 ; C -1 ; WX 444 ; N adieresis ; B 37 -10 442 623 ; C -1 ; WX 444 ; N edieresis ; B 25 -10 424 623 ; C -1 ; WX 444 ; N cacute ; B 25 -10 413 678 ; C -1 ; WX 500 ; N nacute ; B 16 0 485 678 ; C -1 ; WX 500 ; N umacron ; B 9 -10 479 601 ; C -1 ; WX 722 ; N Ncaron ; B 12 -11 707 886 ; C -1 ; WX 333 ; N Iacute ; B 18 0 317 890 ; C -1 ; WX 564 ; N plusminus ; B 30 0 534 506 ; C -1 ; WX 200 ; N brokenbar ; B 67 -143 133 707 ; C -1 ; WX 760 ; N registered ; B 38 -14 722 676 ; C -1 ; WX 722 ; N Gbreve ; B 32 -14 709 876 ; C -1 ; WX 333 ; N Idotaccent ; B 18 0 315 835 ; C -1 ; WX 600 ; N summation ; B 15 -10 585 706 ; C -1 ; WX 611 ; N Egrave ; B 12 0 597 890 ; C -1 ; WX 333 ; N racute ; B 5 0 335 678 ; C -1 ; WX 500 ; N omacron ; B 29 -10 470 601 ; C -1 ; WX 611 ; N Zacute ; B 9 0 597 890 ; C -1 ; WX 611 ; N Zcaron ; B 9 0 597 886 ; C -1 ; WX 549 ; N greaterequal ; B 26 0 523 666 ; C -1 ; WX 722 ; N Eth ; B 16 0 685 662 ; C -1 ; WX 667 ; N Ccedilla ; B 28 -215 633 676 ; C -1 ; WX 278 ; N lcommaaccent ; B 19 -218 257 683 ; C -1 ; WX 326 ; N tcaron ; B 13 -10 318 722 ; C -1 ; WX 444 ; N eogonek ; B 25 -165 424 460 ; C -1 ; WX 722 ; N Uogonek ; B 14 -165 705 662 ; C -1 ; WX 722 ; N Aacute ; B 15 0 706 890 ; C -1 ; WX 722 ; N Adieresis ; B 15 0 706 835 ; C -1 ; WX 444 ; N egrave ; B 25 -10 424 678 ; C -1 ; WX 444 ; N zacute ; B 27 0 418 678 ; C -1 ; WX 278 ; N iogonek ; B 16 -165 265 683 ; C -1 ; WX 722 ; N Oacute ; B 34 -14 688 890 ; C -1 ; WX 500 ; N oacute ; B 29 -10 470 678 ; C -1 ; WX 444 ; N amacron ; B 37 -10 442 601 ; C -1 ; WX 389 ; N sacute ; B 51 -10 348 678 ; C -1 ; WX 278 ; N idieresis ; B -9 0 288 623 ; C -1 ; WX 722 ; N Ocircumflex ; B 34 -14 688 886 ; C -1 ; WX 722 ; N Ugrave ; B 14 -14 705 890 ; C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; C -1 ; WX 500 ; N thorn ; B 5 -217 470 683 ; C -1 ; WX 300 ; N twosuperior ; B 1 270 296 676 ; C -1 ; WX 722 ; N Odieresis ; B 34 -14 688 835 ; C -1 ; WX 500 ; N mu ; B 36 -218 512 450 ; C -1 ; WX 278 ; N igrave ; B -8 0 253 678 ; C -1 ; WX 500 ; N ohungarumlaut ; B 29 -10 491 678 ; C -1 ; WX 611 ; N Eogonek ; B 12 -165 597 662 ; C -1 ; WX 500 ; N dcroat ; B 27 -10 500 683 ; C -1 ; WX 750 ; N threequarters ; B 15 -14 718 676 ; C -1 ; WX 556 ; N Scedilla ; B 42 -215 491 676 ; C -1 ; WX 344 ; N lcaron ; B 19 0 347 695 ; C -1 ; WX 722 ; N Kcommaaccent ; B 34 -198 723 662 ; C -1 ; WX 611 ; N Lacute ; B 12 0 598 890 ; C -1 ; WX 980 ; N trademark ; B 30 256 957 662 ; C -1 ; WX 444 ; N edotaccent ; B 25 -10 424 623 ; C -1 ; WX 333 ; N Igrave ; B 18 0 315 890 ; C -1 ; WX 333 ; N Imacron ; B 11 0 322 813 ; C -1 ; WX 611 ; N Lcaron ; B 12 0 598 676 ; C -1 ; WX 750 ; N onehalf ; B 31 -14 746 676 ; C -1 ; WX 549 ; N lessequal ; B 26 0 523 666 ; C -1 ; WX 500 ; N ocircumflex ; B 29 -10 470 674 ; C -1 ; WX 500 ; N ntilde ; B 16 0 485 638 ; C -1 ; WX 722 ; N Uhungarumlaut ; B 14 -14 705 890 ; C -1 ; WX 611 ; N Eacute ; B 12 0 597 890 ; C -1 ; WX 444 ; N emacron ; B 25 -10 424 601 ; C -1 ; WX 500 ; N gbreve ; B 28 -218 470 664 ; C -1 ; WX 750 ; N onequarter ; B 37 -14 718 676 ; C -1 ; WX 556 ; N Scaron ; B 42 -14 491 886 ; C -1 ; WX 556 ; N Scommaaccent ; B 42 -218 491 676 ; C -1 ; WX 722 ; N Ohungarumlaut ; B 34 -14 688 890 ; C -1 ; WX 400 ; N degree ; B 57 390 343 676 ; C -1 ; WX 500 ; N ograve ; B 29 -10 470 678 ; C -1 ; WX 667 ; N Ccaron ; B 28 -14 633 886 ; C -1 ; WX 500 ; N ugrave ; B 9 -10 479 678 ; C -1 ; WX 453 ; N radical ; B 2 -60 452 768 ; C -1 ; WX 722 ; N Dcaron ; B 16 0 685 886 ; C -1 ; WX 333 ; N rcommaaccent ; B 5 -218 335 460 ; C -1 ; WX 722 ; N Ntilde ; B 12 -11 707 850 ; C -1 ; WX 500 ; N otilde ; B 29 -10 470 638 ; C -1 ; WX 667 ; N Rcommaaccent ; B 17 -198 659 662 ; C -1 ; WX 611 ; N Lcommaaccent ; B 12 -218 598 662 ; C -1 ; WX 722 ; N Atilde ; B 15 0 706 850 ; C -1 ; WX 722 ; N Aogonek ; B 15 -165 738 674 ; C -1 ; WX 722 ; N Aring ; B 15 0 706 898 ; C -1 ; WX 722 ; N Otilde ; B 34 -14 688 850 ; C -1 ; WX 444 ; N zdotaccent ; B 27 0 418 623 ; C -1 ; WX 611 ; N Ecaron ; B 12 0 597 886 ; C -1 ; WX 333 ; N Iogonek ; B 18 -165 315 662 ; C -1 ; WX 500 ; N kcommaaccent ; B 7 -218 505 683 ; C -1 ; WX 564 ; N minus ; B 30 220 534 286 ; C -1 ; WX 333 ; N Icircumflex ; B 11 0 322 886 ; C -1 ; WX 500 ; N ncaron ; B 16 0 485 674 ; C -1 ; WX 278 ; N tcommaaccent ; B 13 -218 279 579 ; C -1 ; WX 564 ; N logicalnot ; B 30 108 534 386 ; C -1 ; WX 500 ; N odieresis ; B 29 -10 470 623 ; C -1 ; WX 500 ; N udieresis ; B 9 -10 479 623 ; C -1 ; WX 549 ; N notequal ; B 12 -31 537 547 ; C -1 ; WX 500 ; N gcommaaccent ; B 28 -218 470 749 ; C -1 ; WX 500 ; N eth ; B 29 -10 471 686 ; C -1 ; WX 444 ; N zcaron ; B 27 0 418 674 ; C -1 ; WX 500 ; N ncommaaccent ; B 16 -218 485 460 ; C -1 ; WX 300 ; N onesuperior ; B 57 270 248 676 ; C -1 ; WX 278 ; N imacron ; B 6 0 271 601 ; C -1 ; WX 500 ; N Euro ; B 0 0 0 0 ; EndCharMetrics StartKernData StartKernPairs 2073 KPX A C -40 KPX A Cacute -40 KPX A Ccaron -40 KPX A Ccedilla -40 KPX A G -40 KPX A Gbreve -40 KPX A Gcommaaccent -40 KPX A O -55 KPX A Oacute -55 KPX A Ocircumflex -55 KPX A Odieresis -55 KPX A Ograve -55 KPX A Ohungarumlaut -55 KPX A Omacron -55 KPX A Oslash -55 KPX A Otilde -55 KPX A Q -55 KPX A T -111 KPX A Tcaron -111 KPX A Tcommaaccent -111 KPX A U -55 KPX A Uacute -55 KPX A Ucircumflex -55 KPX A Udieresis -55 KPX A Ugrave -55 KPX A Uhungarumlaut -55 KPX A Umacron -55 KPX A Uogonek -55 KPX A Uring -55 KPX A V -135 KPX A W -90 KPX A Y -105 KPX A Yacute -105 KPX A Ydieresis -105 KPX A quoteright -111 KPX A v -74 KPX A w -92 KPX A y -92 KPX A yacute -92 KPX A ydieresis -92 KPX Aacute C -40 KPX Aacute Cacute -40 KPX Aacute Ccaron -40 KPX Aacute Ccedilla -40 KPX Aacute G -40 KPX Aacute Gbreve -40 KPX Aacute Gcommaaccent -40 KPX Aacute O -55 KPX Aacute Oacute -55 KPX Aacute Ocircumflex -55 KPX Aacute Odieresis -55 KPX Aacute Ograve -55 KPX Aacute Ohungarumlaut -55 KPX Aacute Omacron -55 KPX Aacute Oslash -55 KPX Aacute Otilde -55 KPX Aacute Q -55 KPX Aacute T -111 KPX Aacute Tcaron -111 KPX Aacute Tcommaaccent -111 KPX Aacute U -55 KPX Aacute Uacute -55 KPX Aacute Ucircumflex -55 KPX Aacute Udieresis -55 KPX Aacute Ugrave -55 KPX Aacute Uhungarumlaut -55 KPX Aacute Umacron -55 KPX Aacute Uogonek -55 KPX Aacute Uring -55 KPX Aacute V -135 KPX Aacute W -90 KPX Aacute Y -105 KPX Aacute Yacute -105 KPX Aacute Ydieresis -105 KPX Aacute quoteright -111 KPX Aacute v -74 KPX Aacute w -92 KPX Aacute y -92 KPX Aacute yacute -92 KPX Aacute ydieresis -92 KPX Abreve C -40 KPX Abreve Cacute -40 KPX Abreve Ccaron -40 KPX Abreve Ccedilla -40 KPX Abreve G -40 KPX Abreve Gbreve -40 KPX Abreve Gcommaaccent -40 KPX Abreve O -55 KPX Abreve Oacute -55 KPX Abreve Ocircumflex -55 KPX Abreve Odieresis -55 KPX Abreve Ograve -55 KPX Abreve Ohungarumlaut -55 KPX Abreve Omacron -55 KPX Abreve Oslash -55 KPX Abreve Otilde -55 KPX Abreve Q -55 KPX Abreve T -111 KPX Abreve Tcaron -111 KPX Abreve Tcommaaccent -111 KPX Abreve U -55 KPX Abreve Uacute -55 KPX Abreve Ucircumflex -55 KPX Abreve Udieresis -55 KPX Abreve Ugrave -55 KPX Abreve Uhungarumlaut -55 KPX Abreve Umacron -55 KPX Abreve Uogonek -55 KPX Abreve Uring -55 KPX Abreve V -135 KPX Abreve W -90 KPX Abreve Y -105 KPX Abreve Yacute -105 KPX Abreve Ydieresis -105 KPX Abreve quoteright -111 KPX Abreve v -74 KPX Abreve w -92 KPX Abreve y -92 KPX Abreve yacute -92 KPX Abreve ydieresis -92 KPX Acircumflex C -40 KPX Acircumflex Cacute -40 KPX Acircumflex Ccaron -40 KPX Acircumflex Ccedilla -40 KPX Acircumflex G -40 KPX Acircumflex Gbreve -40 KPX Acircumflex Gcommaaccent -40 KPX Acircumflex O -55 KPX Acircumflex Oacute -55 KPX Acircumflex Ocircumflex -55 KPX Acircumflex Odieresis -55 KPX Acircumflex Ograve -55 KPX Acircumflex Ohungarumlaut -55 KPX Acircumflex Omacron -55 KPX Acircumflex Oslash -55 KPX Acircumflex Otilde -55 KPX Acircumflex Q -55 KPX Acircumflex T -111 KPX Acircumflex Tcaron -111 KPX Acircumflex Tcommaaccent -111 KPX Acircumflex U -55 KPX Acircumflex Uacute -55 KPX Acircumflex Ucircumflex -55 KPX Acircumflex Udieresis -55 KPX Acircumflex Ugrave -55 KPX Acircumflex Uhungarumlaut -55 KPX Acircumflex Umacron -55 KPX Acircumflex Uogonek -55 KPX Acircumflex Uring -55 KPX Acircumflex V -135 KPX Acircumflex W -90 KPX Acircumflex Y -105 KPX Acircumflex Yacute -105 KPX Acircumflex Ydieresis -105 KPX Acircumflex quoteright -111 KPX Acircumflex v -74 KPX Acircumflex w -92 KPX Acircumflex y -92 KPX Acircumflex yacute -92 KPX Acircumflex ydieresis -92 KPX Adieresis C -40 KPX Adieresis Cacute -40 KPX Adieresis Ccaron -40 KPX Adieresis Ccedilla -40 KPX Adieresis G -40 KPX Adieresis Gbreve -40 KPX Adieresis Gcommaaccent -40 KPX Adieresis O -55 KPX Adieresis Oacute -55 KPX Adieresis Ocircumflex -55 KPX Adieresis Odieresis -55 KPX Adieresis Ograve -55 KPX Adieresis Ohungarumlaut -55 KPX Adieresis Omacron -55 KPX Adieresis Oslash -55 KPX Adieresis Otilde -55 KPX Adieresis Q -55 KPX Adieresis T -111 KPX Adieresis Tcaron -111 KPX Adieresis Tcommaaccent -111 KPX Adieresis U -55 KPX Adieresis Uacute -55 KPX Adieresis Ucircumflex -55 KPX Adieresis Udieresis -55 KPX Adieresis Ugrave -55 KPX Adieresis Uhungarumlaut -55 KPX Adieresis Umacron -55 KPX Adieresis Uogonek -55 KPX Adieresis Uring -55 KPX Adieresis V -135 KPX Adieresis W -90 KPX Adieresis Y -105 KPX Adieresis Yacute -105 KPX Adieresis Ydieresis -105 KPX Adieresis quoteright -111 KPX Adieresis v -74 KPX Adieresis w -92 KPX Adieresis y -92 KPX Adieresis yacute -92 KPX Adieresis ydieresis -92 KPX Agrave C -40 KPX Agrave Cacute -40 KPX Agrave Ccaron -40 KPX Agrave Ccedilla -40 KPX Agrave G -40 KPX Agrave Gbreve -40 KPX Agrave Gcommaaccent -40 KPX Agrave O -55 KPX Agrave Oacute -55 KPX Agrave Ocircumflex -55 KPX Agrave Odieresis -55 KPX Agrave Ograve -55 KPX Agrave Ohungarumlaut -55 KPX Agrave Omacron -55 KPX Agrave Oslash -55 KPX Agrave Otilde -55 KPX Agrave Q -55 KPX Agrave T -111 KPX Agrave Tcaron -111 KPX Agrave Tcommaaccent -111 KPX Agrave U -55 KPX Agrave Uacute -55 KPX Agrave Ucircumflex -55 KPX Agrave Udieresis -55 KPX Agrave Ugrave -55 KPX Agrave Uhungarumlaut -55 KPX Agrave Umacron -55 KPX Agrave Uogonek -55 KPX Agrave Uring -55 KPX Agrave V -135 KPX Agrave W -90 KPX Agrave Y -105 KPX Agrave Yacute -105 KPX Agrave Ydieresis -105 KPX Agrave quoteright -111 KPX Agrave v -74 KPX Agrave w -92 KPX Agrave y -92 KPX Agrave yacute -92 KPX Agrave ydieresis -92 KPX Amacron C -40 KPX Amacron Cacute -40 KPX Amacron Ccaron -40 KPX Amacron Ccedilla -40 KPX Amacron G -40 KPX Amacron Gbreve -40 KPX Amacron Gcommaaccent -40 KPX Amacron O -55 KPX Amacron Oacute -55 KPX Amacron Ocircumflex -55 KPX Amacron Odieresis -55 KPX Amacron Ograve -55 KPX Amacron Ohungarumlaut -55 KPX Amacron Omacron -55 KPX Amacron Oslash -55 KPX Amacron Otilde -55 KPX Amacron Q -55 KPX Amacron T -111 KPX Amacron Tcaron -111 KPX Amacron Tcommaaccent -111 KPX Amacron U -55 KPX Amacron Uacute -55 KPX Amacron Ucircumflex -55 KPX Amacron Udieresis -55 KPX Amacron Ugrave -55 KPX Amacron Uhungarumlaut -55 KPX Amacron Umacron -55 KPX Amacron Uogonek -55 KPX Amacron Uring -55 KPX Amacron V -135 KPX Amacron W -90 KPX Amacron Y -105 KPX Amacron Yacute -105 KPX Amacron Ydieresis -105 KPX Amacron quoteright -111 KPX Amacron v -74 KPX Amacron w -92 KPX Amacron y -92 KPX Amacron yacute -92 KPX Amacron ydieresis -92 KPX Aogonek C -40 KPX Aogonek Cacute -40 KPX Aogonek Ccaron -40 KPX Aogonek Ccedilla -40 KPX Aogonek G -40 KPX Aogonek Gbreve -40 KPX Aogonek Gcommaaccent -40 KPX Aogonek O -55 KPX Aogonek Oacute -55 KPX Aogonek Ocircumflex -55 KPX Aogonek Odieresis -55 KPX Aogonek Ograve -55 KPX Aogonek Ohungarumlaut -55 KPX Aogonek Omacron -55 KPX Aogonek Oslash -55 KPX Aogonek Otilde -55 KPX Aogonek Q -55 KPX Aogonek T -111 KPX Aogonek Tcaron -111 KPX Aogonek Tcommaaccent -111 KPX Aogonek U -55 KPX Aogonek Uacute -55 KPX Aogonek Ucircumflex -55 KPX Aogonek Udieresis -55 KPX Aogonek Ugrave -55 KPX Aogonek Uhungarumlaut -55 KPX Aogonek Umacron -55 KPX Aogonek Uogonek -55 KPX Aogonek Uring -55 KPX Aogonek V -135 KPX Aogonek W -90 KPX Aogonek Y -105 KPX Aogonek Yacute -105 KPX Aogonek Ydieresis -105 KPX Aogonek quoteright -111 KPX Aogonek v -74 KPX Aogonek w -52 KPX Aogonek y -52 KPX Aogonek yacute -52 KPX Aogonek ydieresis -52 KPX Aring C -40 KPX Aring Cacute -40 KPX Aring Ccaron -40 KPX Aring Ccedilla -40 KPX Aring G -40 KPX Aring Gbreve -40 KPX Aring Gcommaaccent -40 KPX Aring O -55 KPX Aring Oacute -55 KPX Aring Ocircumflex -55 KPX Aring Odieresis -55 KPX Aring Ograve -55 KPX Aring Ohungarumlaut -55 KPX Aring Omacron -55 KPX Aring Oslash -55 KPX Aring Otilde -55 KPX Aring Q -55 KPX Aring T -111 KPX Aring Tcaron -111 KPX Aring Tcommaaccent -111 KPX Aring U -55 KPX Aring Uacute -55 KPX Aring Ucircumflex -55 KPX Aring Udieresis -55 KPX Aring Ugrave -55 KPX Aring Uhungarumlaut -55 KPX Aring Umacron -55 KPX Aring Uogonek -55 KPX Aring Uring -55 KPX Aring V -135 KPX Aring W -90 KPX Aring Y -105 KPX Aring Yacute -105 KPX Aring Ydieresis -105 KPX Aring quoteright -111 KPX Aring v -74 KPX Aring w -92 KPX Aring y -92 KPX Aring yacute -92 KPX Aring ydieresis -92 KPX Atilde C -40 KPX Atilde Cacute -40 KPX Atilde Ccaron -40 KPX Atilde Ccedilla -40 KPX Atilde G -40 KPX Atilde Gbreve -40 KPX Atilde Gcommaaccent -40 KPX Atilde O -55 KPX Atilde Oacute -55 KPX Atilde Ocircumflex -55 KPX Atilde Odieresis -55 KPX Atilde Ograve -55 KPX Atilde Ohungarumlaut -55 KPX Atilde Omacron -55 KPX Atilde Oslash -55 KPX Atilde Otilde -55 KPX Atilde Q -55 KPX Atilde T -111 KPX Atilde Tcaron -111 KPX Atilde Tcommaaccent -111 KPX Atilde U -55 KPX Atilde Uacute -55 KPX Atilde Ucircumflex -55 KPX Atilde Udieresis -55 KPX Atilde Ugrave -55 KPX Atilde Uhungarumlaut -55 KPX Atilde Umacron -55 KPX Atilde Uogonek -55 KPX Atilde Uring -55 KPX Atilde V -135 KPX Atilde W -90 KPX Atilde Y -105 KPX Atilde Yacute -105 KPX Atilde Ydieresis -105 KPX Atilde quoteright -111 KPX Atilde v -74 KPX Atilde w -92 KPX Atilde y -92 KPX Atilde yacute -92 KPX Atilde ydieresis -92 KPX B A -35 KPX B Aacute -35 KPX B Abreve -35 KPX B Acircumflex -35 KPX B Adieresis -35 KPX B Agrave -35 KPX B Amacron -35 KPX B Aogonek -35 KPX B Aring -35 KPX B Atilde -35 KPX B U -10 KPX B Uacute -10 KPX B Ucircumflex -10 KPX B Udieresis -10 KPX B Ugrave -10 KPX B Uhungarumlaut -10 KPX B Umacron -10 KPX B Uogonek -10 KPX B Uring -10 KPX D A -40 KPX D Aacute -40 KPX D Abreve -40 KPX D Acircumflex -40 KPX D Adieresis -40 KPX D Agrave -40 KPX D Amacron -40 KPX D Aogonek -40 KPX D Aring -40 KPX D Atilde -40 KPX D V -40 KPX D W -30 KPX D Y -55 KPX D Yacute -55 KPX D Ydieresis -55 KPX Dcaron A -40 KPX Dcaron Aacute -40 KPX Dcaron Abreve -40 KPX Dcaron Acircumflex -40 KPX Dcaron Adieresis -40 KPX Dcaron Agrave -40 KPX Dcaron Amacron -40 KPX Dcaron Aogonek -40 KPX Dcaron Aring -40 KPX Dcaron Atilde -40 KPX Dcaron V -40 KPX Dcaron W -30 KPX Dcaron Y -55 KPX Dcaron Yacute -55 KPX Dcaron Ydieresis -55 KPX Dcroat A -40 KPX Dcroat Aacute -40 KPX Dcroat Abreve -40 KPX Dcroat Acircumflex -40 KPX Dcroat Adieresis -40 KPX Dcroat Agrave -40 KPX Dcroat Amacron -40 KPX Dcroat Aogonek -40 KPX Dcroat Aring -40 KPX Dcroat Atilde -40 KPX Dcroat V -40 KPX Dcroat W -30 KPX Dcroat Y -55 KPX Dcroat Yacute -55 KPX Dcroat Ydieresis -55 KPX F A -74 KPX F Aacute -74 KPX F Abreve -74 KPX F Acircumflex -74 KPX F Adieresis -74 KPX F Agrave -74 KPX F Amacron -74 KPX F Aogonek -74 KPX F Aring -74 KPX F Atilde -74 KPX F a -15 KPX F aacute -15 KPX F abreve -15 KPX F acircumflex -15 KPX F adieresis -15 KPX F agrave -15 KPX F amacron -15 KPX F aogonek -15 KPX F aring -15 KPX F atilde -15 KPX F comma -80 KPX F o -15 KPX F oacute -15 KPX F ocircumflex -15 KPX F odieresis -15 KPX F ograve -15 KPX F ohungarumlaut -15 KPX F omacron -15 KPX F oslash -15 KPX F otilde -15 KPX F period -80 KPX J A -60 KPX J Aacute -60 KPX J Abreve -60 KPX J Acircumflex -60 KPX J Adieresis -60 KPX J Agrave -60 KPX J Amacron -60 KPX J Aogonek -60 KPX J Aring -60 KPX J Atilde -60 KPX K O -30 KPX K Oacute -30 KPX K Ocircumflex -30 KPX K Odieresis -30 KPX K Ograve -30 KPX K Ohungarumlaut -30 KPX K Omacron -30 KPX K Oslash -30 KPX K Otilde -30 KPX K e -25 KPX K eacute -25 KPX K ecaron -25 KPX K ecircumflex -25 KPX K edieresis -25 KPX K edotaccent -25 KPX K egrave -25 KPX K emacron -25 KPX K eogonek -25 KPX K o -35 KPX K oacute -35 KPX K ocircumflex -35 KPX K odieresis -35 KPX K ograve -35 KPX K ohungarumlaut -35 KPX K omacron -35 KPX K oslash -35 KPX K otilde -35 KPX K u -15 KPX K uacute -15 KPX K ucircumflex -15 KPX K udieresis -15 KPX K ugrave -15 KPX K uhungarumlaut -15 KPX K umacron -15 KPX K uogonek -15 KPX K uring -15 KPX K y -25 KPX K yacute -25 KPX K ydieresis -25 KPX Kcommaaccent O -30 KPX Kcommaaccent Oacute -30 KPX Kcommaaccent Ocircumflex -30 KPX Kcommaaccent Odieresis -30 KPX Kcommaaccent Ograve -30 KPX Kcommaaccent Ohungarumlaut -30 KPX Kcommaaccent Omacron -30 KPX Kcommaaccent Oslash -30 KPX Kcommaaccent Otilde -30 KPX Kcommaaccent e -25 KPX Kcommaaccent eacute -25 KPX Kcommaaccent ecaron -25 KPX Kcommaaccent ecircumflex -25 KPX Kcommaaccent edieresis -25 KPX Kcommaaccent edotaccent -25 KPX Kcommaaccent egrave -25 KPX Kcommaaccent emacron -25 KPX Kcommaaccent eogonek -25 KPX Kcommaaccent o -35 KPX Kcommaaccent oacute -35 KPX Kcommaaccent ocircumflex -35 KPX Kcommaaccent odieresis -35 KPX Kcommaaccent ograve -35 KPX Kcommaaccent ohungarumlaut -35 KPX Kcommaaccent omacron -35 KPX Kcommaaccent oslash -35 KPX Kcommaaccent otilde -35 KPX Kcommaaccent u -15 KPX Kcommaaccent uacute -15 KPX Kcommaaccent ucircumflex -15 KPX Kcommaaccent udieresis -15 KPX Kcommaaccent ugrave -15 KPX Kcommaaccent uhungarumlaut -15 KPX Kcommaaccent umacron -15 KPX Kcommaaccent uogonek -15 KPX Kcommaaccent uring -15 KPX Kcommaaccent y -25 KPX Kcommaaccent yacute -25 KPX Kcommaaccent ydieresis -25 KPX L T -92 KPX L Tcaron -92 KPX L Tcommaaccent -92 KPX L V -100 KPX L W -74 KPX L Y -100 KPX L Yacute -100 KPX L Ydieresis -100 KPX L quoteright -92 KPX L y -55 KPX L yacute -55 KPX L ydieresis -55 KPX Lacute T -92 KPX Lacute Tcaron -92 KPX Lacute Tcommaaccent -92 KPX Lacute V -100 KPX Lacute W -74 KPX Lacute Y -100 KPX Lacute Yacute -100 KPX Lacute Ydieresis -100 KPX Lacute quoteright -92 KPX Lacute y -55 KPX Lacute yacute -55 KPX Lacute ydieresis -55 KPX Lcaron quoteright -92 KPX Lcaron y -55 KPX Lcaron yacute -55 KPX Lcaron ydieresis -55 KPX Lcommaaccent T -92 KPX Lcommaaccent Tcaron -92 KPX Lcommaaccent Tcommaaccent -92 KPX Lcommaaccent V -100 KPX Lcommaaccent W -74 KPX Lcommaaccent Y -100 KPX Lcommaaccent Yacute -100 KPX Lcommaaccent Ydieresis -100 KPX Lcommaaccent quoteright -92 KPX Lcommaaccent y -55 KPX Lcommaaccent yacute -55 KPX Lcommaaccent ydieresis -55 KPX Lslash T -92 KPX Lslash Tcaron -92 KPX Lslash Tcommaaccent -92 KPX Lslash V -100 KPX Lslash W -74 KPX Lslash Y -100 KPX Lslash Yacute -100 KPX Lslash Ydieresis -100 KPX Lslash quoteright -92 KPX Lslash y -55 KPX Lslash yacute -55 KPX Lslash ydieresis -55 KPX N A -35 KPX N Aacute -35 KPX N Abreve -35 KPX N Acircumflex -35 KPX N Adieresis -35 KPX N Agrave -35 KPX N Amacron -35 KPX N Aogonek -35 KPX N Aring -35 KPX N Atilde -35 KPX Nacute A -35 KPX Nacute Aacute -35 KPX Nacute Abreve -35 KPX Nacute Acircumflex -35 KPX Nacute Adieresis -35 KPX Nacute Agrave -35 KPX Nacute Amacron -35 KPX Nacute Aogonek -35 KPX Nacute Aring -35 KPX Nacute Atilde -35 KPX Ncaron A -35 KPX Ncaron Aacute -35 KPX Ncaron Abreve -35 KPX Ncaron Acircumflex -35 KPX Ncaron Adieresis -35 KPX Ncaron Agrave -35 KPX Ncaron Amacron -35 KPX Ncaron Aogonek -35 KPX Ncaron Aring -35 KPX Ncaron Atilde -35 KPX Ncommaaccent A -35 KPX Ncommaaccent Aacute -35 KPX Ncommaaccent Abreve -35 KPX Ncommaaccent Acircumflex -35 KPX Ncommaaccent Adieresis -35 KPX Ncommaaccent Agrave -35 KPX Ncommaaccent Amacron -35 KPX Ncommaaccent Aogonek -35 KPX Ncommaaccent Aring -35 KPX Ncommaaccent Atilde -35 KPX Ntilde A -35 KPX Ntilde Aacute -35 KPX Ntilde Abreve -35 KPX Ntilde Acircumflex -35 KPX Ntilde Adieresis -35 KPX Ntilde Agrave -35 KPX Ntilde Amacron -35 KPX Ntilde Aogonek -35 KPX Ntilde Aring -35 KPX Ntilde Atilde -35 KPX O A -35 KPX O Aacute -35 KPX O Abreve -35 KPX O Acircumflex -35 KPX O Adieresis -35 KPX O Agrave -35 KPX O Amacron -35 KPX O Aogonek -35 KPX O Aring -35 KPX O Atilde -35 KPX O T -40 KPX O Tcaron -40 KPX O Tcommaaccent -40 KPX O V -50 KPX O W -35 KPX O X -40 KPX O Y -50 KPX O Yacute -50 KPX O Ydieresis -50 KPX Oacute A -35 KPX Oacute Aacute -35 KPX Oacute Abreve -35 KPX Oacute Acircumflex -35 KPX Oacute Adieresis -35 KPX Oacute Agrave -35 KPX Oacute Amacron -35 KPX Oacute Aogonek -35 KPX Oacute Aring -35 KPX Oacute Atilde -35 KPX Oacute T -40 KPX Oacute Tcaron -40 KPX Oacute Tcommaaccent -40 KPX Oacute V -50 KPX Oacute W -35 KPX Oacute X -40 KPX Oacute Y -50 KPX Oacute Yacute -50 KPX Oacute Ydieresis -50 KPX Ocircumflex A -35 KPX Ocircumflex Aacute -35 KPX Ocircumflex Abreve -35 KPX Ocircumflex Acircumflex -35 KPX Ocircumflex Adieresis -35 KPX Ocircumflex Agrave -35 KPX Ocircumflex Amacron -35 KPX Ocircumflex Aogonek -35 KPX Ocircumflex Aring -35 KPX Ocircumflex Atilde -35 KPX Ocircumflex T -40 KPX Ocircumflex Tcaron -40 KPX Ocircumflex Tcommaaccent -40 KPX Ocircumflex V -50 KPX Ocircumflex W -35 KPX Ocircumflex X -40 KPX Ocircumflex Y -50 KPX Ocircumflex Yacute -50 KPX Ocircumflex Ydieresis -50 KPX Odieresis A -35 KPX Odieresis Aacute -35 KPX Odieresis Abreve -35 KPX Odieresis Acircumflex -35 KPX Odieresis Adieresis -35 KPX Odieresis Agrave -35 KPX Odieresis Amacron -35 KPX Odieresis Aogonek -35 KPX Odieresis Aring -35 KPX Odieresis Atilde -35 KPX Odieresis T -40 KPX Odieresis Tcaron -40 KPX Odieresis Tcommaaccent -40 KPX Odieresis V -50 KPX Odieresis W -35 KPX Odieresis X -40 KPX Odieresis Y -50 KPX Odieresis Yacute -50 KPX Odieresis Ydieresis -50 KPX Ograve A -35 KPX Ograve Aacute -35 KPX Ograve Abreve -35 KPX Ograve Acircumflex -35 KPX Ograve Adieresis -35 KPX Ograve Agrave -35 KPX Ograve Amacron -35 KPX Ograve Aogonek -35 KPX Ograve Aring -35 KPX Ograve Atilde -35 KPX Ograve T -40 KPX Ograve Tcaron -40 KPX Ograve Tcommaaccent -40 KPX Ograve V -50 KPX Ograve W -35 KPX Ograve X -40 KPX Ograve Y -50 KPX Ograve Yacute -50 KPX Ograve Ydieresis -50 KPX Ohungarumlaut A -35 KPX Ohungarumlaut Aacute -35 KPX Ohungarumlaut Abreve -35 KPX Ohungarumlaut Acircumflex -35 KPX Ohungarumlaut Adieresis -35 KPX Ohungarumlaut Agrave -35 KPX Ohungarumlaut Amacron -35 KPX Ohungarumlaut Aogonek -35 KPX Ohungarumlaut Aring -35 KPX Ohungarumlaut Atilde -35 KPX Ohungarumlaut T -40 KPX Ohungarumlaut Tcaron -40 KPX Ohungarumlaut Tcommaaccent -40 KPX Ohungarumlaut V -50 KPX Ohungarumlaut W -35 KPX Ohungarumlaut X -40 KPX Ohungarumlaut Y -50 KPX Ohungarumlaut Yacute -50 KPX Ohungarumlaut Ydieresis -50 KPX Omacron A -35 KPX Omacron Aacute -35 KPX Omacron Abreve -35 KPX Omacron Acircumflex -35 KPX Omacron Adieresis -35 KPX Omacron Agrave -35 KPX Omacron Amacron -35 KPX Omacron Aogonek -35 KPX Omacron Aring -35 KPX Omacron Atilde -35 KPX Omacron T -40 KPX Omacron Tcaron -40 KPX Omacron Tcommaaccent -40 KPX Omacron V -50 KPX Omacron W -35 KPX Omacron X -40 KPX Omacron Y -50 KPX Omacron Yacute -50 KPX Omacron Ydieresis -50 KPX Oslash A -35 KPX Oslash Aacute -35 KPX Oslash Abreve -35 KPX Oslash Acircumflex -35 KPX Oslash Adieresis -35 KPX Oslash Agrave -35 KPX Oslash Amacron -35 KPX Oslash Aogonek -35 KPX Oslash Aring -35 KPX Oslash Atilde -35 KPX Oslash T -40 KPX Oslash Tcaron -40 KPX Oslash Tcommaaccent -40 KPX Oslash V -50 KPX Oslash W -35 KPX Oslash X -40 KPX Oslash Y -50 KPX Oslash Yacute -50 KPX Oslash Ydieresis -50 KPX Otilde A -35 KPX Otilde Aacute -35 KPX Otilde Abreve -35 KPX Otilde Acircumflex -35 KPX Otilde Adieresis -35 KPX Otilde Agrave -35 KPX Otilde Amacron -35 KPX Otilde Aogonek -35 KPX Otilde Aring -35 KPX Otilde Atilde -35 KPX Otilde T -40 KPX Otilde Tcaron -40 KPX Otilde Tcommaaccent -40 KPX Otilde V -50 KPX Otilde W -35 KPX Otilde X -40 KPX Otilde Y -50 KPX Otilde Yacute -50 KPX Otilde Ydieresis -50 KPX P A -92 KPX P Aacute -92 KPX P Abreve -92 KPX P Acircumflex -92 KPX P Adieresis -92 KPX P Agrave -92 KPX P Amacron -92 KPX P Aogonek -92 KPX P Aring -92 KPX P Atilde -92 KPX P a -15 KPX P aacute -15 KPX P abreve -15 KPX P acircumflex -15 KPX P adieresis -15 KPX P agrave -15 KPX P amacron -15 KPX P aogonek -15 KPX P aring -15 KPX P atilde -15 KPX P comma -111 KPX P period -111 KPX Q U -10 KPX Q Uacute -10 KPX Q Ucircumflex -10 KPX Q Udieresis -10 KPX Q Ugrave -10 KPX Q Uhungarumlaut -10 KPX Q Umacron -10 KPX Q Uogonek -10 KPX Q Uring -10 KPX R O -40 KPX R Oacute -40 KPX R Ocircumflex -40 KPX R Odieresis -40 KPX R Ograve -40 KPX R Ohungarumlaut -40 KPX R Omacron -40 KPX R Oslash -40 KPX R Otilde -40 KPX R T -60 KPX R Tcaron -60 KPX R Tcommaaccent -60 KPX R U -40 KPX R Uacute -40 KPX R Ucircumflex -40 KPX R Udieresis -40 KPX R Ugrave -40 KPX R Uhungarumlaut -40 KPX R Umacron -40 KPX R Uogonek -40 KPX R Uring -40 KPX R V -80 KPX R W -55 KPX R Y -65 KPX R Yacute -65 KPX R Ydieresis -65 KPX Racute O -40 KPX Racute Oacute -40 KPX Racute Ocircumflex -40 KPX Racute Odieresis -40 KPX Racute Ograve -40 KPX Racute Ohungarumlaut -40 KPX Racute Omacron -40 KPX Racute Oslash -40 KPX Racute Otilde -40 KPX Racute T -60 KPX Racute Tcaron -60 KPX Racute Tcommaaccent -60 KPX Racute U -40 KPX Racute Uacute -40 KPX Racute Ucircumflex -40 KPX Racute Udieresis -40 KPX Racute Ugrave -40 KPX Racute Uhungarumlaut -40 KPX Racute Umacron -40 KPX Racute Uogonek -40 KPX Racute Uring -40 KPX Racute V -80 KPX Racute W -55 KPX Racute Y -65 KPX Racute Yacute -65 KPX Racute Ydieresis -65 KPX Rcaron O -40 KPX Rcaron Oacute -40 KPX Rcaron Ocircumflex -40 KPX Rcaron Odieresis -40 KPX Rcaron Ograve -40 KPX Rcaron Ohungarumlaut -40 KPX Rcaron Omacron -40 KPX Rcaron Oslash -40 KPX Rcaron Otilde -40 KPX Rcaron T -60 KPX Rcaron Tcaron -60 KPX Rcaron Tcommaaccent -60 KPX Rcaron U -40 KPX Rcaron Uacute -40 KPX Rcaron Ucircumflex -40 KPX Rcaron Udieresis -40 KPX Rcaron Ugrave -40 KPX Rcaron Uhungarumlaut -40 KPX Rcaron Umacron -40 KPX Rcaron Uogonek -40 KPX Rcaron Uring -40 KPX Rcaron V -80 KPX Rcaron W -55 KPX Rcaron Y -65 KPX Rcaron Yacute -65 KPX Rcaron Ydieresis -65 KPX Rcommaaccent O -40 KPX Rcommaaccent Oacute -40 KPX Rcommaaccent Ocircumflex -40 KPX Rcommaaccent Odieresis -40 KPX Rcommaaccent Ograve -40 KPX Rcommaaccent Ohungarumlaut -40 KPX Rcommaaccent Omacron -40 KPX Rcommaaccent Oslash -40 KPX Rcommaaccent Otilde -40 KPX Rcommaaccent T -60 KPX Rcommaaccent Tcaron -60 KPX Rcommaaccent Tcommaaccent -60 KPX Rcommaaccent U -40 KPX Rcommaaccent Uacute -40 KPX Rcommaaccent Ucircumflex -40 KPX Rcommaaccent Udieresis -40 KPX Rcommaaccent Ugrave -40 KPX Rcommaaccent Uhungarumlaut -40 KPX Rcommaaccent Umacron -40 KPX Rcommaaccent Uogonek -40 KPX Rcommaaccent Uring -40 KPX Rcommaaccent V -80 KPX Rcommaaccent W -55 KPX Rcommaaccent Y -65 KPX Rcommaaccent Yacute -65 KPX Rcommaaccent Ydieresis -65 KPX T A -93 KPX T Aacute -93 KPX T Abreve -93 KPX T Acircumflex -93 KPX T Adieresis -93 KPX T Agrave -93 KPX T Amacron -93 KPX T Aogonek -93 KPX T Aring -93 KPX T Atilde -93 KPX T O -18 KPX T Oacute -18 KPX T Ocircumflex -18 KPX T Odieresis -18 KPX T Ograve -18 KPX T Ohungarumlaut -18 KPX T Omacron -18 KPX T Oslash -18 KPX T Otilde -18 KPX T a -80 KPX T aacute -80 KPX T abreve -80 KPX T acircumflex -80 KPX T adieresis -40 KPX T agrave -40 KPX T amacron -40 KPX T aogonek -80 KPX T aring -80 KPX T atilde -40 KPX T colon -50 KPX T comma -74 KPX T e -70 KPX T eacute -70 KPX T ecaron -70 KPX T ecircumflex -70 KPX T edieresis -30 KPX T edotaccent -70 KPX T egrave -70 KPX T emacron -30 KPX T eogonek -70 KPX T hyphen -92 KPX T i -35 KPX T iacute -35 KPX T iogonek -35 KPX T o -80 KPX T oacute -80 KPX T ocircumflex -80 KPX T odieresis -80 KPX T ograve -80 KPX T ohungarumlaut -80 KPX T omacron -80 KPX T oslash -80 KPX T otilde -80 KPX T period -74 KPX T r -35 KPX T racute -35 KPX T rcaron -35 KPX T rcommaaccent -35 KPX T semicolon -55 KPX T u -45 KPX T uacute -45 KPX T ucircumflex -45 KPX T udieresis -45 KPX T ugrave -45 KPX T uhungarumlaut -45 KPX T umacron -45 KPX T uogonek -45 KPX T uring -45 KPX T w -80 KPX T y -80 KPX T yacute -80 KPX T ydieresis -80 KPX Tcaron A -93 KPX Tcaron Aacute -93 KPX Tcaron Abreve -93 KPX Tcaron Acircumflex -93 KPX Tcaron Adieresis -93 KPX Tcaron Agrave -93 KPX Tcaron Amacron -93 KPX Tcaron Aogonek -93 KPX Tcaron Aring -93 KPX Tcaron Atilde -93 KPX Tcaron O -18 KPX Tcaron Oacute -18 KPX Tcaron Ocircumflex -18 KPX Tcaron Odieresis -18 KPX Tcaron Ograve -18 KPX Tcaron Ohungarumlaut -18 KPX Tcaron Omacron -18 KPX Tcaron Oslash -18 KPX Tcaron Otilde -18 KPX Tcaron a -80 KPX Tcaron aacute -80 KPX Tcaron abreve -80 KPX Tcaron acircumflex -80 KPX Tcaron adieresis -40 KPX Tcaron agrave -40 KPX Tcaron amacron -40 KPX Tcaron aogonek -80 KPX Tcaron aring -80 KPX Tcaron atilde -40 KPX Tcaron colon -50 KPX Tcaron comma -74 KPX Tcaron e -70 KPX Tcaron eacute -70 KPX Tcaron ecaron -70 KPX Tcaron ecircumflex -30 KPX Tcaron edieresis -30 KPX Tcaron edotaccent -70 KPX Tcaron egrave -70 KPX Tcaron emacron -30 KPX Tcaron eogonek -70 KPX Tcaron hyphen -92 KPX Tcaron i -35 KPX Tcaron iacute -35 KPX Tcaron iogonek -35 KPX Tcaron o -80 KPX Tcaron oacute -80 KPX Tcaron ocircumflex -80 KPX Tcaron odieresis -80 KPX Tcaron ograve -80 KPX Tcaron ohungarumlaut -80 KPX Tcaron omacron -80 KPX Tcaron oslash -80 KPX Tcaron otilde -80 KPX Tcaron period -74 KPX Tcaron r -35 KPX Tcaron racute -35 KPX Tcaron rcaron -35 KPX Tcaron rcommaaccent -35 KPX Tcaron semicolon -55 KPX Tcaron u -45 KPX Tcaron uacute -45 KPX Tcaron ucircumflex -45 KPX Tcaron udieresis -45 KPX Tcaron ugrave -45 KPX Tcaron uhungarumlaut -45 KPX Tcaron umacron -45 KPX Tcaron uogonek -45 KPX Tcaron uring -45 KPX Tcaron w -80 KPX Tcaron y -80 KPX Tcaron yacute -80 KPX Tcaron ydieresis -80 KPX Tcommaaccent A -93 KPX Tcommaaccent Aacute -93 KPX Tcommaaccent Abreve -93 KPX Tcommaaccent Acircumflex -93 KPX Tcommaaccent Adieresis -93 KPX Tcommaaccent Agrave -93 KPX Tcommaaccent Amacron -93 KPX Tcommaaccent Aogonek -93 KPX Tcommaaccent Aring -93 KPX Tcommaaccent Atilde -93 KPX Tcommaaccent O -18 KPX Tcommaaccent Oacute -18 KPX Tcommaaccent Ocircumflex -18 KPX Tcommaaccent Odieresis -18 KPX Tcommaaccent Ograve -18 KPX Tcommaaccent Ohungarumlaut -18 KPX Tcommaaccent Omacron -18 KPX Tcommaaccent Oslash -18 KPX Tcommaaccent Otilde -18 KPX Tcommaaccent a -80 KPX Tcommaaccent aacute -80 KPX Tcommaaccent abreve -80 KPX Tcommaaccent acircumflex -80 KPX Tcommaaccent adieresis -40 KPX Tcommaaccent agrave -40 KPX Tcommaaccent amacron -40 KPX Tcommaaccent aogonek -80 KPX Tcommaaccent aring -80 KPX Tcommaaccent atilde -40 KPX Tcommaaccent colon -50 KPX Tcommaaccent comma -74 KPX Tcommaaccent e -70 KPX Tcommaaccent eacute -70 KPX Tcommaaccent ecaron -70 KPX Tcommaaccent ecircumflex -30 KPX Tcommaaccent edieresis -30 KPX Tcommaaccent edotaccent -70 KPX Tcommaaccent egrave -30 KPX Tcommaaccent emacron -70 KPX Tcommaaccent eogonek -70 KPX Tcommaaccent hyphen -92 KPX Tcommaaccent i -35 KPX Tcommaaccent iacute -35 KPX Tcommaaccent iogonek -35 KPX Tcommaaccent o -80 KPX Tcommaaccent oacute -80 KPX Tcommaaccent ocircumflex -80 KPX Tcommaaccent odieresis -80 KPX Tcommaaccent ograve -80 KPX Tcommaaccent ohungarumlaut -80 KPX Tcommaaccent omacron -80 KPX Tcommaaccent oslash -80 KPX Tcommaaccent otilde -80 KPX Tcommaaccent period -74 KPX Tcommaaccent r -35 KPX Tcommaaccent racute -35 KPX Tcommaaccent rcaron -35 KPX Tcommaaccent rcommaaccent -35 KPX Tcommaaccent semicolon -55 KPX Tcommaaccent u -45 KPX Tcommaaccent uacute -45 KPX Tcommaaccent ucircumflex -45 KPX Tcommaaccent udieresis -45 KPX Tcommaaccent ugrave -45 KPX Tcommaaccent uhungarumlaut -45 KPX Tcommaaccent umacron -45 KPX Tcommaaccent uogonek -45 KPX Tcommaaccent uring -45 KPX Tcommaaccent w -80 KPX Tcommaaccent y -80 KPX Tcommaaccent yacute -80 KPX Tcommaaccent ydieresis -80 KPX U A -40 KPX U Aacute -40 KPX U Abreve -40 KPX U Acircumflex -40 KPX U Adieresis -40 KPX U Agrave -40 KPX U Amacron -40 KPX U Aogonek -40 KPX U Aring -40 KPX U Atilde -40 KPX Uacute A -40 KPX Uacute Aacute -40 KPX Uacute Abreve -40 KPX Uacute Acircumflex -40 KPX Uacute Adieresis -40 KPX Uacute Agrave -40 KPX Uacute Amacron -40 KPX Uacute Aogonek -40 KPX Uacute Aring -40 KPX Uacute Atilde -40 KPX Ucircumflex A -40 KPX Ucircumflex Aacute -40 KPX Ucircumflex Abreve -40 KPX Ucircumflex Acircumflex -40 KPX Ucircumflex Adieresis -40 KPX Ucircumflex Agrave -40 KPX Ucircumflex Amacron -40 KPX Ucircumflex Aogonek -40 KPX Ucircumflex Aring -40 KPX Ucircumflex Atilde -40 KPX Udieresis A -40 KPX Udieresis Aacute -40 KPX Udieresis Abreve -40 KPX Udieresis Acircumflex -40 KPX Udieresis Adieresis -40 KPX Udieresis Agrave -40 KPX Udieresis Amacron -40 KPX Udieresis Aogonek -40 KPX Udieresis Aring -40 KPX Udieresis Atilde -40 KPX Ugrave A -40 KPX Ugrave Aacute -40 KPX Ugrave Abreve -40 KPX Ugrave Acircumflex -40 KPX Ugrave Adieresis -40 KPX Ugrave Agrave -40 KPX Ugrave Amacron -40 KPX Ugrave Aogonek -40 KPX Ugrave Aring -40 KPX Ugrave Atilde -40 KPX Uhungarumlaut A -40 KPX Uhungarumlaut Aacute -40 KPX Uhungarumlaut Abreve -40 KPX Uhungarumlaut Acircumflex -40 KPX Uhungarumlaut Adieresis -40 KPX Uhungarumlaut Agrave -40 KPX Uhungarumlaut Amacron -40 KPX Uhungarumlaut Aogonek -40 KPX Uhungarumlaut Aring -40 KPX Uhungarumlaut Atilde -40 KPX Umacron A -40 KPX Umacron Aacute -40 KPX Umacron Abreve -40 KPX Umacron Acircumflex -40 KPX Umacron Adieresis -40 KPX Umacron Agrave -40 KPX Umacron Amacron -40 KPX Umacron Aogonek -40 KPX Umacron Aring -40 KPX Umacron Atilde -40 KPX Uogonek A -40 KPX Uogonek Aacute -40 KPX Uogonek Abreve -40 KPX Uogonek Acircumflex -40 KPX Uogonek Adieresis -40 KPX Uogonek Agrave -40 KPX Uogonek Amacron -40 KPX Uogonek Aogonek -40 KPX Uogonek Aring -40 KPX Uogonek Atilde -40 KPX Uring A -40 KPX Uring Aacute -40 KPX Uring Abreve -40 KPX Uring Acircumflex -40 KPX Uring Adieresis -40 KPX Uring Agrave -40 KPX Uring Amacron -40 KPX Uring Aogonek -40 KPX Uring Aring -40 KPX Uring Atilde -40 KPX V A -135 KPX V Aacute -135 KPX V Abreve -135 KPX V Acircumflex -135 KPX V Adieresis -135 KPX V Agrave -135 KPX V Amacron -135 KPX V Aogonek -135 KPX V Aring -135 KPX V Atilde -135 KPX V G -15 KPX V Gbreve -15 KPX V Gcommaaccent -15 KPX V O -40 KPX V Oacute -40 KPX V Ocircumflex -40 KPX V Odieresis -40 KPX V Ograve -40 KPX V Ohungarumlaut -40 KPX V Omacron -40 KPX V Oslash -40 KPX V Otilde -40 KPX V a -111 KPX V aacute -111 KPX V abreve -111 KPX V acircumflex -71 KPX V adieresis -71 KPX V agrave -71 KPX V amacron -71 KPX V aogonek -111 KPX V aring -111 KPX V atilde -71 KPX V colon -74 KPX V comma -129 KPX V e -111 KPX V eacute -111 KPX V ecaron -71 KPX V ecircumflex -71 KPX V edieresis -71 KPX V edotaccent -111 KPX V egrave -71 KPX V emacron -71 KPX V eogonek -111 KPX V hyphen -100 KPX V i -60 KPX V iacute -60 KPX V icircumflex -20 KPX V idieresis -20 KPX V igrave -20 KPX V imacron -20 KPX V iogonek -60 KPX V o -129 KPX V oacute -129 KPX V ocircumflex -129 KPX V odieresis -89 KPX V ograve -89 KPX V ohungarumlaut -129 KPX V omacron -89 KPX V oslash -129 KPX V otilde -89 KPX V period -129 KPX V semicolon -74 KPX V u -75 KPX V uacute -75 KPX V ucircumflex -75 KPX V udieresis -75 KPX V ugrave -75 KPX V uhungarumlaut -75 KPX V umacron -75 KPX V uogonek -75 KPX V uring -75 KPX W A -120 KPX W Aacute -120 KPX W Abreve -120 KPX W Acircumflex -120 KPX W Adieresis -120 KPX W Agrave -120 KPX W Amacron -120 KPX W Aogonek -120 KPX W Aring -120 KPX W Atilde -120 KPX W O -10 KPX W Oacute -10 KPX W Ocircumflex -10 KPX W Odieresis -10 KPX W Ograve -10 KPX W Ohungarumlaut -10 KPX W Omacron -10 KPX W Oslash -10 KPX W Otilde -10 KPX W a -80 KPX W aacute -80 KPX W abreve -80 KPX W acircumflex -80 KPX W adieresis -80 KPX W agrave -80 KPX W amacron -80 KPX W aogonek -80 KPX W aring -80 KPX W atilde -80 KPX W colon -37 KPX W comma -92 KPX W e -80 KPX W eacute -80 KPX W ecaron -80 KPX W ecircumflex -80 KPX W edieresis -40 KPX W edotaccent -80 KPX W egrave -40 KPX W emacron -40 KPX W eogonek -80 KPX W hyphen -65 KPX W i -40 KPX W iacute -40 KPX W iogonek -40 KPX W o -80 KPX W oacute -80 KPX W ocircumflex -80 KPX W odieresis -80 KPX W ograve -80 KPX W ohungarumlaut -80 KPX W omacron -80 KPX W oslash -80 KPX W otilde -80 KPX W period -92 KPX W semicolon -37 KPX W u -50 KPX W uacute -50 KPX W ucircumflex -50 KPX W udieresis -50 KPX W ugrave -50 KPX W uhungarumlaut -50 KPX W umacron -50 KPX W uogonek -50 KPX W uring -50 KPX W y -73 KPX W yacute -73 KPX W ydieresis -73 KPX Y A -120 KPX Y Aacute -120 KPX Y Abreve -120 KPX Y Acircumflex -120 KPX Y Adieresis -120 KPX Y Agrave -120 KPX Y Amacron -120 KPX Y Aogonek -120 KPX Y Aring -120 KPX Y Atilde -120 KPX Y O -30 KPX Y Oacute -30 KPX Y Ocircumflex -30 KPX Y Odieresis -30 KPX Y Ograve -30 KPX Y Ohungarumlaut -30 KPX Y Omacron -30 KPX Y Oslash -30 KPX Y Otilde -30 KPX Y a -100 KPX Y aacute -100 KPX Y abreve -100 KPX Y acircumflex -100 KPX Y adieresis -60 KPX Y agrave -60 KPX Y amacron -60 KPX Y aogonek -100 KPX Y aring -100 KPX Y atilde -60 KPX Y colon -92 KPX Y comma -129 KPX Y e -100 KPX Y eacute -100 KPX Y ecaron -100 KPX Y ecircumflex -100 KPX Y edieresis -60 KPX Y edotaccent -100 KPX Y egrave -60 KPX Y emacron -60 KPX Y eogonek -100 KPX Y hyphen -111 KPX Y i -55 KPX Y iacute -55 KPX Y iogonek -55 KPX Y o -110 KPX Y oacute -110 KPX Y ocircumflex -110 KPX Y odieresis -70 KPX Y ograve -70 KPX Y ohungarumlaut -110 KPX Y omacron -70 KPX Y oslash -110 KPX Y otilde -70 KPX Y period -129 KPX Y semicolon -92 KPX Y u -111 KPX Y uacute -111 KPX Y ucircumflex -111 KPX Y udieresis -71 KPX Y ugrave -71 KPX Y uhungarumlaut -111 KPX Y umacron -71 KPX Y uogonek -111 KPX Y uring -111 KPX Yacute A -120 KPX Yacute Aacute -120 KPX Yacute Abreve -120 KPX Yacute Acircumflex -120 KPX Yacute Adieresis -120 KPX Yacute Agrave -120 KPX Yacute Amacron -120 KPX Yacute Aogonek -120 KPX Yacute Aring -120 KPX Yacute Atilde -120 KPX Yacute O -30 KPX Yacute Oacute -30 KPX Yacute Ocircumflex -30 KPX Yacute Odieresis -30 KPX Yacute Ograve -30 KPX Yacute Ohungarumlaut -30 KPX Yacute Omacron -30 KPX Yacute Oslash -30 KPX Yacute Otilde -30 KPX Yacute a -100 KPX Yacute aacute -100 KPX Yacute abreve -100 KPX Yacute acircumflex -100 KPX Yacute adieresis -60 KPX Yacute agrave -60 KPX Yacute amacron -60 KPX Yacute aogonek -100 KPX Yacute aring -100 KPX Yacute atilde -60 KPX Yacute colon -92 KPX Yacute comma -129 KPX Yacute e -100 KPX Yacute eacute -100 KPX Yacute ecaron -100 KPX Yacute ecircumflex -100 KPX Yacute edieresis -60 KPX Yacute edotaccent -100 KPX Yacute egrave -60 KPX Yacute emacron -60 KPX Yacute eogonek -100 KPX Yacute hyphen -111 KPX Yacute i -55 KPX Yacute iacute -55 KPX Yacute iogonek -55 KPX Yacute o -110 KPX Yacute oacute -110 KPX Yacute ocircumflex -110 KPX Yacute odieresis -70 KPX Yacute ograve -70 KPX Yacute ohungarumlaut -110 KPX Yacute omacron -70 KPX Yacute oslash -110 KPX Yacute otilde -70 KPX Yacute period -129 KPX Yacute semicolon -92 KPX Yacute u -111 KPX Yacute uacute -111 KPX Yacute ucircumflex -111 KPX Yacute udieresis -71 KPX Yacute ugrave -71 KPX Yacute uhungarumlaut -111 KPX Yacute umacron -71 KPX Yacute uogonek -111 KPX Yacute uring -111 KPX Ydieresis A -120 KPX Ydieresis Aacute -120 KPX Ydieresis Abreve -120 KPX Ydieresis Acircumflex -120 KPX Ydieresis Adieresis -120 KPX Ydieresis Agrave -120 KPX Ydieresis Amacron -120 KPX Ydieresis Aogonek -120 KPX Ydieresis Aring -120 KPX Ydieresis Atilde -120 KPX Ydieresis O -30 KPX Ydieresis Oacute -30 KPX Ydieresis Ocircumflex -30 KPX Ydieresis Odieresis -30 KPX Ydieresis Ograve -30 KPX Ydieresis Ohungarumlaut -30 KPX Ydieresis Omacron -30 KPX Ydieresis Oslash -30 KPX Ydieresis Otilde -30 KPX Ydieresis a -100 KPX Ydieresis aacute -100 KPX Ydieresis abreve -100 KPX Ydieresis acircumflex -100 KPX Ydieresis adieresis -60 KPX Ydieresis agrave -60 KPX Ydieresis amacron -60 KPX Ydieresis aogonek -100 KPX Ydieresis aring -100 KPX Ydieresis atilde -100 KPX Ydieresis colon -92 KPX Ydieresis comma -129 KPX Ydieresis e -100 KPX Ydieresis eacute -100 KPX Ydieresis ecaron -100 KPX Ydieresis ecircumflex -100 KPX Ydieresis edieresis -60 KPX Ydieresis edotaccent -100 KPX Ydieresis egrave -60 KPX Ydieresis emacron -60 KPX Ydieresis eogonek -100 KPX Ydieresis hyphen -111 KPX Ydieresis i -55 KPX Ydieresis iacute -55 KPX Ydieresis iogonek -55 KPX Ydieresis o -110 KPX Ydieresis oacute -110 KPX Ydieresis ocircumflex -110 KPX Ydieresis odieresis -70 KPX Ydieresis ograve -70 KPX Ydieresis ohungarumlaut -110 KPX Ydieresis omacron -70 KPX Ydieresis oslash -110 KPX Ydieresis otilde -70 KPX Ydieresis period -129 KPX Ydieresis semicolon -92 KPX Ydieresis u -111 KPX Ydieresis uacute -111 KPX Ydieresis ucircumflex -111 KPX Ydieresis udieresis -71 KPX Ydieresis ugrave -71 KPX Ydieresis uhungarumlaut -111 KPX Ydieresis umacron -71 KPX Ydieresis uogonek -111 KPX Ydieresis uring -111 KPX a v -20 KPX a w -15 KPX aacute v -20 KPX aacute w -15 KPX abreve v -20 KPX abreve w -15 KPX acircumflex v -20 KPX acircumflex w -15 KPX adieresis v -20 KPX adieresis w -15 KPX agrave v -20 KPX agrave w -15 KPX amacron v -20 KPX amacron w -15 KPX aogonek v -20 KPX aogonek w -15 KPX aring v -20 KPX aring w -15 KPX atilde v -20 KPX atilde w -15 KPX b period -40 KPX b u -20 KPX b uacute -20 KPX b ucircumflex -20 KPX b udieresis -20 KPX b ugrave -20 KPX b uhungarumlaut -20 KPX b umacron -20 KPX b uogonek -20 KPX b uring -20 KPX b v -15 KPX c y -15 KPX c yacute -15 KPX c ydieresis -15 KPX cacute y -15 KPX cacute yacute -15 KPX cacute ydieresis -15 KPX ccaron y -15 KPX ccaron yacute -15 KPX ccaron ydieresis -15 KPX ccedilla y -15 KPX ccedilla yacute -15 KPX ccedilla ydieresis -15 KPX comma quotedblright -70 KPX comma quoteright -70 KPX e g -15 KPX e gbreve -15 KPX e gcommaaccent -15 KPX e v -25 KPX e w -25 KPX e x -15 KPX e y -15 KPX e yacute -15 KPX e ydieresis -15 KPX eacute g -15 KPX eacute gbreve -15 KPX eacute gcommaaccent -15 KPX eacute v -25 KPX eacute w -25 KPX eacute x -15 KPX eacute y -15 KPX eacute yacute -15 KPX eacute ydieresis -15 KPX ecaron g -15 KPX ecaron gbreve -15 KPX ecaron gcommaaccent -15 KPX ecaron v -25 KPX ecaron w -25 KPX ecaron x -15 KPX ecaron y -15 KPX ecaron yacute -15 KPX ecaron ydieresis -15 KPX ecircumflex g -15 KPX ecircumflex gbreve -15 KPX ecircumflex gcommaaccent -15 KPX ecircumflex v -25 KPX ecircumflex w -25 KPX ecircumflex x -15 KPX ecircumflex y -15 KPX ecircumflex yacute -15 KPX ecircumflex ydieresis -15 KPX edieresis g -15 KPX edieresis gbreve -15 KPX edieresis gcommaaccent -15 KPX edieresis v -25 KPX edieresis w -25 KPX edieresis x -15 KPX edieresis y -15 KPX edieresis yacute -15 KPX edieresis ydieresis -15 KPX edotaccent g -15 KPX edotaccent gbreve -15 KPX edotaccent gcommaaccent -15 KPX edotaccent v -25 KPX edotaccent w -25 KPX edotaccent x -15 KPX edotaccent y -15 KPX edotaccent yacute -15 KPX edotaccent ydieresis -15 KPX egrave g -15 KPX egrave gbreve -15 KPX egrave gcommaaccent -15 KPX egrave v -25 KPX egrave w -25 KPX egrave x -15 KPX egrave y -15 KPX egrave yacute -15 KPX egrave ydieresis -15 KPX emacron g -15 KPX emacron gbreve -15 KPX emacron gcommaaccent -15 KPX emacron v -25 KPX emacron w -25 KPX emacron x -15 KPX emacron y -15 KPX emacron yacute -15 KPX emacron ydieresis -15 KPX eogonek g -15 KPX eogonek gbreve -15 KPX eogonek gcommaaccent -15 KPX eogonek v -25 KPX eogonek w -25 KPX eogonek x -15 KPX eogonek y -15 KPX eogonek yacute -15 KPX eogonek ydieresis -15 KPX f a -10 KPX f aacute -10 KPX f abreve -10 KPX f acircumflex -10 KPX f adieresis -10 KPX f agrave -10 KPX f amacron -10 KPX f aogonek -10 KPX f aring -10 KPX f atilde -10 KPX f dotlessi -50 KPX f f -25 KPX f i -20 KPX f iacute -20 KPX f quoteright 55 KPX g a -5 KPX g aacute -5 KPX g abreve -5 KPX g acircumflex -5 KPX g adieresis -5 KPX g agrave -5 KPX g amacron -5 KPX g aogonek -5 KPX g aring -5 KPX g atilde -5 KPX gbreve a -5 KPX gbreve aacute -5 KPX gbreve abreve -5 KPX gbreve acircumflex -5 KPX gbreve adieresis -5 KPX gbreve agrave -5 KPX gbreve amacron -5 KPX gbreve aogonek -5 KPX gbreve aring -5 KPX gbreve atilde -5 KPX gcommaaccent a -5 KPX gcommaaccent aacute -5 KPX gcommaaccent abreve -5 KPX gcommaaccent acircumflex -5 KPX gcommaaccent adieresis -5 KPX gcommaaccent agrave -5 KPX gcommaaccent amacron -5 KPX gcommaaccent aogonek -5 KPX gcommaaccent aring -5 KPX gcommaaccent atilde -5 KPX h y -5 KPX h yacute -5 KPX h ydieresis -5 KPX i v -25 KPX iacute v -25 KPX icircumflex v -25 KPX idieresis v -25 KPX igrave v -25 KPX imacron v -25 KPX iogonek v -25 KPX k e -10 KPX k eacute -10 KPX k ecaron -10 KPX k ecircumflex -10 KPX k edieresis -10 KPX k edotaccent -10 KPX k egrave -10 KPX k emacron -10 KPX k eogonek -10 KPX k o -10 KPX k oacute -10 KPX k ocircumflex -10 KPX k odieresis -10 KPX k ograve -10 KPX k ohungarumlaut -10 KPX k omacron -10 KPX k oslash -10 KPX k otilde -10 KPX k y -15 KPX k yacute -15 KPX k ydieresis -15 KPX kcommaaccent e -10 KPX kcommaaccent eacute -10 KPX kcommaaccent ecaron -10 KPX kcommaaccent ecircumflex -10 KPX kcommaaccent edieresis -10 KPX kcommaaccent edotaccent -10 KPX kcommaaccent egrave -10 KPX kcommaaccent emacron -10 KPX kcommaaccent eogonek -10 KPX kcommaaccent o -10 KPX kcommaaccent oacute -10 KPX kcommaaccent ocircumflex -10 KPX kcommaaccent odieresis -10 KPX kcommaaccent ograve -10 KPX kcommaaccent ohungarumlaut -10 KPX kcommaaccent omacron -10 KPX kcommaaccent oslash -10 KPX kcommaaccent otilde -10 KPX kcommaaccent y -15 KPX kcommaaccent yacute -15 KPX kcommaaccent ydieresis -15 KPX l w -10 KPX lacute w -10 KPX lcommaaccent w -10 KPX lslash w -10 KPX n v -40 KPX n y -15 KPX n yacute -15 KPX n ydieresis -15 KPX nacute v -40 KPX nacute y -15 KPX nacute yacute -15 KPX nacute ydieresis -15 KPX ncaron v -40 KPX ncaron y -15 KPX ncaron yacute -15 KPX ncaron ydieresis -15 KPX ncommaaccent v -40 KPX ncommaaccent y -15 KPX ncommaaccent yacute -15 KPX ncommaaccent ydieresis -15 KPX ntilde v -40 KPX ntilde y -15 KPX ntilde yacute -15 KPX ntilde ydieresis -15 KPX o v -15 KPX o w -25 KPX o y -10 KPX o yacute -10 KPX o ydieresis -10 KPX oacute v -15 KPX oacute w -25 KPX oacute y -10 KPX oacute yacute -10 KPX oacute ydieresis -10 KPX ocircumflex v -15 KPX ocircumflex w -25 KPX ocircumflex y -10 KPX ocircumflex yacute -10 KPX ocircumflex ydieresis -10 KPX odieresis v -15 KPX odieresis w -25 KPX odieresis y -10 KPX odieresis yacute -10 KPX odieresis ydieresis -10 KPX ograve v -15 KPX ograve w -25 KPX ograve y -10 KPX ograve yacute -10 KPX ograve ydieresis -10 KPX ohungarumlaut v -15 KPX ohungarumlaut w -25 KPX ohungarumlaut y -10 KPX ohungarumlaut yacute -10 KPX ohungarumlaut ydieresis -10 KPX omacron v -15 KPX omacron w -25 KPX omacron y -10 KPX omacron yacute -10 KPX omacron ydieresis -10 KPX oslash v -15 KPX oslash w -25 KPX oslash y -10 KPX oslash yacute -10 KPX oslash ydieresis -10 KPX otilde v -15 KPX otilde w -25 KPX otilde y -10 KPX otilde yacute -10 KPX otilde ydieresis -10 KPX p y -10 KPX p yacute -10 KPX p ydieresis -10 KPX period quotedblright -70 KPX period quoteright -70 KPX quotedblleft A -80 KPX quotedblleft Aacute -80 KPX quotedblleft Abreve -80 KPX quotedblleft Acircumflex -80 KPX quotedblleft Adieresis -80 KPX quotedblleft Agrave -80 KPX quotedblleft Amacron -80 KPX quotedblleft Aogonek -80 KPX quotedblleft Aring -80 KPX quotedblleft Atilde -80 KPX quoteleft A -80 KPX quoteleft Aacute -80 KPX quoteleft Abreve -80 KPX quoteleft Acircumflex -80 KPX quoteleft Adieresis -80 KPX quoteleft Agrave -80 KPX quoteleft Amacron -80 KPX quoteleft Aogonek -80 KPX quoteleft Aring -80 KPX quoteleft Atilde -80 KPX quoteleft quoteleft -74 KPX quoteright d -50 KPX quoteright dcroat -50 KPX quoteright l -10 KPX quoteright lacute -10 KPX quoteright lcommaaccent -10 KPX quoteright lslash -10 KPX quoteright quoteright -74 KPX quoteright r -50 KPX quoteright racute -50 KPX quoteright rcaron -50 KPX quoteright rcommaaccent -50 KPX quoteright s -55 KPX quoteright sacute -55 KPX quoteright scaron -55 KPX quoteright scedilla -55 KPX quoteright scommaaccent -55 KPX quoteright space -74 KPX quoteright t -18 KPX quoteright tcommaaccent -18 KPX quoteright v -50 KPX r comma -40 KPX r g -18 KPX r gbreve -18 KPX r gcommaaccent -18 KPX r hyphen -20 KPX r period -55 KPX racute comma -40 KPX racute g -18 KPX racute gbreve -18 KPX racute gcommaaccent -18 KPX racute hyphen -20 KPX racute period -55 KPX rcaron comma -40 KPX rcaron g -18 KPX rcaron gbreve -18 KPX rcaron gcommaaccent -18 KPX rcaron hyphen -20 KPX rcaron period -55 KPX rcommaaccent comma -40 KPX rcommaaccent g -18 KPX rcommaaccent gbreve -18 KPX rcommaaccent gcommaaccent -18 KPX rcommaaccent hyphen -20 KPX rcommaaccent period -55 KPX space A -55 KPX space Aacute -55 KPX space Abreve -55 KPX space Acircumflex -55 KPX space Adieresis -55 KPX space Agrave -55 KPX space Amacron -55 KPX space Aogonek -55 KPX space Aring -55 KPX space Atilde -55 KPX space T -18 KPX space Tcaron -18 KPX space Tcommaaccent -18 KPX space V -50 KPX space W -30 KPX space Y -90 KPX space Yacute -90 KPX space Ydieresis -90 KPX v a -25 KPX v aacute -25 KPX v abreve -25 KPX v acircumflex -25 KPX v adieresis -25 KPX v agrave -25 KPX v amacron -25 KPX v aogonek -25 KPX v aring -25 KPX v atilde -25 KPX v comma -65 KPX v e -15 KPX v eacute -15 KPX v ecaron -15 KPX v ecircumflex -15 KPX v edieresis -15 KPX v edotaccent -15 KPX v egrave -15 KPX v emacron -15 KPX v eogonek -15 KPX v o -20 KPX v oacute -20 KPX v ocircumflex -20 KPX v odieresis -20 KPX v ograve -20 KPX v ohungarumlaut -20 KPX v omacron -20 KPX v oslash -20 KPX v otilde -20 KPX v period -65 KPX w a -10 KPX w aacute -10 KPX w abreve -10 KPX w acircumflex -10 KPX w adieresis -10 KPX w agrave -10 KPX w amacron -10 KPX w aogonek -10 KPX w aring -10 KPX w atilde -10 KPX w comma -65 KPX w o -10 KPX w oacute -10 KPX w ocircumflex -10 KPX w odieresis -10 KPX w ograve -10 KPX w ohungarumlaut -10 KPX w omacron -10 KPX w oslash -10 KPX w otilde -10 KPX w period -65 KPX x e -15 KPX x eacute -15 KPX x ecaron -15 KPX x ecircumflex -15 KPX x edieresis -15 KPX x edotaccent -15 KPX x egrave -15 KPX x emacron -15 KPX x eogonek -15 KPX y comma -65 KPX y period -65 KPX yacute comma -65 KPX yacute period -65 KPX ydieresis comma -65 KPX ydieresis period -65 EndKernPairs EndKernData EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/pdfcorefonts/ZapfDingbats.afm ================================================ StartFontMetrics 4.1 Comment Copyright (c) 1985, 1987, 1988, 1989, 1997 Adobe Systems Incorporated. All Rights Reserved. Comment Creation Date: Thu May 1 15:14:13 1997 Comment UniqueID 43082 Comment VMusage 45775 55535 FontName ZapfDingbats FullName ITC Zapf Dingbats FamilyName ZapfDingbats Weight Medium ItalicAngle 0 IsFixedPitch false CharacterSet Special FontBBox -1 -143 981 820 UnderlinePosition -100 UnderlineThickness 50 Version 002.000 Notice Copyright (c) 1985, 1987, 1988, 1989, 1997 Adobe Systems Incorporated. All Rights Reserved.ITC Zapf Dingbats is a registered trademark of International Typeface Corporation. EncodingScheme FontSpecific StdHW 28 StdVW 90 StartCharMetrics 202 C 32 ; WX 278 ; N space ; B 0 0 0 0 ; C 33 ; WX 974 ; N a1 ; B 35 72 939 621 ; C 34 ; WX 961 ; N a2 ; B 35 81 927 611 ; C 35 ; WX 974 ; N a202 ; B 35 72 939 621 ; C 36 ; WX 980 ; N a3 ; B 35 0 945 692 ; C 37 ; WX 719 ; N a4 ; B 34 139 685 566 ; C 38 ; WX 789 ; N a5 ; B 35 -14 755 705 ; C 39 ; WX 790 ; N a119 ; B 35 -14 755 705 ; C 40 ; WX 791 ; N a118 ; B 35 -13 761 705 ; C 41 ; WX 690 ; N a117 ; B 34 138 655 553 ; C 42 ; WX 960 ; N a11 ; B 35 123 925 568 ; C 43 ; WX 939 ; N a12 ; B 35 134 904 559 ; C 44 ; WX 549 ; N a13 ; B 29 -11 516 705 ; C 45 ; WX 855 ; N a14 ; B 34 59 820 632 ; C 46 ; WX 911 ; N a15 ; B 35 50 876 642 ; C 47 ; WX 933 ; N a16 ; B 35 139 899 550 ; C 48 ; WX 911 ; N a105 ; B 35 50 876 642 ; C 49 ; WX 945 ; N a17 ; B 35 139 909 553 ; C 50 ; WX 974 ; N a18 ; B 35 104 938 587 ; C 51 ; WX 755 ; N a19 ; B 34 -13 721 705 ; C 52 ; WX 846 ; N a20 ; B 36 -14 811 705 ; C 53 ; WX 762 ; N a21 ; B 35 0 727 692 ; C 54 ; WX 761 ; N a22 ; B 35 0 727 692 ; C 55 ; WX 571 ; N a23 ; B -1 -68 571 661 ; C 56 ; WX 677 ; N a24 ; B 36 -13 642 705 ; C 57 ; WX 763 ; N a25 ; B 35 0 728 692 ; C 58 ; WX 760 ; N a26 ; B 35 0 726 692 ; C 59 ; WX 759 ; N a27 ; B 35 0 725 692 ; C 60 ; WX 754 ; N a28 ; B 35 0 720 692 ; C 61 ; WX 494 ; N a6 ; B 35 0 460 692 ; C 62 ; WX 552 ; N a7 ; B 35 0 517 692 ; C 63 ; WX 537 ; N a8 ; B 35 0 503 692 ; C 64 ; WX 577 ; N a9 ; B 35 96 542 596 ; C 65 ; WX 692 ; N a10 ; B 35 -14 657 705 ; C 66 ; WX 786 ; N a29 ; B 35 -14 751 705 ; C 67 ; WX 788 ; N a30 ; B 35 -14 752 705 ; C 68 ; WX 788 ; N a31 ; B 35 -14 753 705 ; C 69 ; WX 790 ; N a32 ; B 35 -14 756 705 ; C 70 ; WX 793 ; N a33 ; B 35 -13 759 705 ; C 71 ; WX 794 ; N a34 ; B 35 -13 759 705 ; C 72 ; WX 816 ; N a35 ; B 35 -14 782 705 ; C 73 ; WX 823 ; N a36 ; B 35 -14 787 705 ; C 74 ; WX 789 ; N a37 ; B 35 -14 754 705 ; C 75 ; WX 841 ; N a38 ; B 35 -14 807 705 ; C 76 ; WX 823 ; N a39 ; B 35 -14 789 705 ; C 77 ; WX 833 ; N a40 ; B 35 -14 798 705 ; C 78 ; WX 816 ; N a41 ; B 35 -13 782 705 ; C 79 ; WX 831 ; N a42 ; B 35 -14 796 705 ; C 80 ; WX 923 ; N a43 ; B 35 -14 888 705 ; C 81 ; WX 744 ; N a44 ; B 35 0 710 692 ; C 82 ; WX 723 ; N a45 ; B 35 0 688 692 ; C 83 ; WX 749 ; N a46 ; B 35 0 714 692 ; C 84 ; WX 790 ; N a47 ; B 34 -14 756 705 ; C 85 ; WX 792 ; N a48 ; B 35 -14 758 705 ; C 86 ; WX 695 ; N a49 ; B 35 -14 661 706 ; C 87 ; WX 776 ; N a50 ; B 35 -6 741 699 ; C 88 ; WX 768 ; N a51 ; B 35 -7 734 699 ; C 89 ; WX 792 ; N a52 ; B 35 -14 757 705 ; C 90 ; WX 759 ; N a53 ; B 35 0 725 692 ; C 91 ; WX 707 ; N a54 ; B 35 -13 672 704 ; C 92 ; WX 708 ; N a55 ; B 35 -14 672 705 ; C 93 ; WX 682 ; N a56 ; B 35 -14 647 705 ; C 94 ; WX 701 ; N a57 ; B 35 -14 666 705 ; C 95 ; WX 826 ; N a58 ; B 35 -14 791 705 ; C 96 ; WX 815 ; N a59 ; B 35 -14 780 705 ; C 97 ; WX 789 ; N a60 ; B 35 -14 754 705 ; C 98 ; WX 789 ; N a61 ; B 35 -14 754 705 ; C 99 ; WX 707 ; N a62 ; B 34 -14 673 705 ; C 100 ; WX 687 ; N a63 ; B 36 0 651 692 ; C 101 ; WX 696 ; N a64 ; B 35 0 661 691 ; C 102 ; WX 689 ; N a65 ; B 35 0 655 692 ; C 103 ; WX 786 ; N a66 ; B 34 -14 751 705 ; C 104 ; WX 787 ; N a67 ; B 35 -14 752 705 ; C 105 ; WX 713 ; N a68 ; B 35 -14 678 705 ; C 106 ; WX 791 ; N a69 ; B 35 -14 756 705 ; C 107 ; WX 785 ; N a70 ; B 36 -14 751 705 ; C 108 ; WX 791 ; N a71 ; B 35 -14 757 705 ; C 109 ; WX 873 ; N a72 ; B 35 -14 838 705 ; C 110 ; WX 761 ; N a73 ; B 35 0 726 692 ; C 111 ; WX 762 ; N a74 ; B 35 0 727 692 ; C 112 ; WX 762 ; N a203 ; B 35 0 727 692 ; C 113 ; WX 759 ; N a75 ; B 35 0 725 692 ; C 114 ; WX 759 ; N a204 ; B 35 0 725 692 ; C 115 ; WX 892 ; N a76 ; B 35 0 858 705 ; C 116 ; WX 892 ; N a77 ; B 35 -14 858 692 ; C 117 ; WX 788 ; N a78 ; B 35 -14 754 705 ; C 118 ; WX 784 ; N a79 ; B 35 -14 749 705 ; C 119 ; WX 438 ; N a81 ; B 35 -14 403 705 ; C 120 ; WX 138 ; N a82 ; B 35 0 104 692 ; C 121 ; WX 277 ; N a83 ; B 35 0 242 692 ; C 122 ; WX 415 ; N a84 ; B 35 0 380 692 ; C 123 ; WX 392 ; N a97 ; B 35 263 357 705 ; C 124 ; WX 392 ; N a98 ; B 34 263 357 705 ; C 125 ; WX 668 ; N a99 ; B 35 263 633 705 ; C 126 ; WX 668 ; N a100 ; B 36 263 634 705 ; C 128 ; WX 390 ; N a89 ; B 35 -14 356 705 ; C 129 ; WX 390 ; N a90 ; B 35 -14 355 705 ; C 130 ; WX 317 ; N a93 ; B 35 0 283 692 ; C 131 ; WX 317 ; N a94 ; B 35 0 283 692 ; C 132 ; WX 276 ; N a91 ; B 35 0 242 692 ; C 133 ; WX 276 ; N a92 ; B 35 0 242 692 ; C 134 ; WX 509 ; N a205 ; B 35 0 475 692 ; C 135 ; WX 509 ; N a85 ; B 35 0 475 692 ; C 136 ; WX 410 ; N a206 ; B 35 0 375 692 ; C 137 ; WX 410 ; N a86 ; B 35 0 375 692 ; C 138 ; WX 234 ; N a87 ; B 35 -14 199 705 ; C 139 ; WX 234 ; N a88 ; B 35 -14 199 705 ; C 140 ; WX 334 ; N a95 ; B 35 0 299 692 ; C 141 ; WX 334 ; N a96 ; B 35 0 299 692 ; C 161 ; WX 732 ; N a101 ; B 35 -143 697 806 ; C 162 ; WX 544 ; N a102 ; B 56 -14 488 706 ; C 163 ; WX 544 ; N a103 ; B 34 -14 508 705 ; C 164 ; WX 910 ; N a104 ; B 35 40 875 651 ; C 165 ; WX 667 ; N a106 ; B 35 -14 633 705 ; C 166 ; WX 760 ; N a107 ; B 35 -14 726 705 ; C 167 ; WX 760 ; N a108 ; B 0 121 758 569 ; C 168 ; WX 776 ; N a112 ; B 35 0 741 705 ; C 169 ; WX 595 ; N a111 ; B 34 -14 560 705 ; C 170 ; WX 694 ; N a110 ; B 35 -14 659 705 ; C 171 ; WX 626 ; N a109 ; B 34 0 591 705 ; C 172 ; WX 788 ; N a120 ; B 35 -14 754 705 ; C 173 ; WX 788 ; N a121 ; B 35 -14 754 705 ; C 174 ; WX 788 ; N a122 ; B 35 -14 754 705 ; C 175 ; WX 788 ; N a123 ; B 35 -14 754 705 ; C 176 ; WX 788 ; N a124 ; B 35 -14 754 705 ; C 177 ; WX 788 ; N a125 ; B 35 -14 754 705 ; C 178 ; WX 788 ; N a126 ; B 35 -14 754 705 ; C 179 ; WX 788 ; N a127 ; B 35 -14 754 705 ; C 180 ; WX 788 ; N a128 ; B 35 -14 754 705 ; C 181 ; WX 788 ; N a129 ; B 35 -14 754 705 ; C 182 ; WX 788 ; N a130 ; B 35 -14 754 705 ; C 183 ; WX 788 ; N a131 ; B 35 -14 754 705 ; C 184 ; WX 788 ; N a132 ; B 35 -14 754 705 ; C 185 ; WX 788 ; N a133 ; B 35 -14 754 705 ; C 186 ; WX 788 ; N a134 ; B 35 -14 754 705 ; C 187 ; WX 788 ; N a135 ; B 35 -14 754 705 ; C 188 ; WX 788 ; N a136 ; B 35 -14 754 705 ; C 189 ; WX 788 ; N a137 ; B 35 -14 754 705 ; C 190 ; WX 788 ; N a138 ; B 35 -14 754 705 ; C 191 ; WX 788 ; N a139 ; B 35 -14 754 705 ; C 192 ; WX 788 ; N a140 ; B 35 -14 754 705 ; C 193 ; WX 788 ; N a141 ; B 35 -14 754 705 ; C 194 ; WX 788 ; N a142 ; B 35 -14 754 705 ; C 195 ; WX 788 ; N a143 ; B 35 -14 754 705 ; C 196 ; WX 788 ; N a144 ; B 35 -14 754 705 ; C 197 ; WX 788 ; N a145 ; B 35 -14 754 705 ; C 198 ; WX 788 ; N a146 ; B 35 -14 754 705 ; C 199 ; WX 788 ; N a147 ; B 35 -14 754 705 ; C 200 ; WX 788 ; N a148 ; B 35 -14 754 705 ; C 201 ; WX 788 ; N a149 ; B 35 -14 754 705 ; C 202 ; WX 788 ; N a150 ; B 35 -14 754 705 ; C 203 ; WX 788 ; N a151 ; B 35 -14 754 705 ; C 204 ; WX 788 ; N a152 ; B 35 -14 754 705 ; C 205 ; WX 788 ; N a153 ; B 35 -14 754 705 ; C 206 ; WX 788 ; N a154 ; B 35 -14 754 705 ; C 207 ; WX 788 ; N a155 ; B 35 -14 754 705 ; C 208 ; WX 788 ; N a156 ; B 35 -14 754 705 ; C 209 ; WX 788 ; N a157 ; B 35 -14 754 705 ; C 210 ; WX 788 ; N a158 ; B 35 -14 754 705 ; C 211 ; WX 788 ; N a159 ; B 35 -14 754 705 ; C 212 ; WX 894 ; N a160 ; B 35 58 860 634 ; C 213 ; WX 838 ; N a161 ; B 35 152 803 540 ; C 214 ; WX 1016 ; N a163 ; B 34 152 981 540 ; C 215 ; WX 458 ; N a164 ; B 35 -127 422 820 ; C 216 ; WX 748 ; N a196 ; B 35 94 698 597 ; C 217 ; WX 924 ; N a165 ; B 35 140 890 552 ; C 218 ; WX 748 ; N a192 ; B 35 94 698 597 ; C 219 ; WX 918 ; N a166 ; B 35 166 884 526 ; C 220 ; WX 927 ; N a167 ; B 35 32 892 660 ; C 221 ; WX 928 ; N a168 ; B 35 129 891 562 ; C 222 ; WX 928 ; N a169 ; B 35 128 893 563 ; C 223 ; WX 834 ; N a170 ; B 35 155 799 537 ; C 224 ; WX 873 ; N a171 ; B 35 93 838 599 ; C 225 ; WX 828 ; N a172 ; B 35 104 791 588 ; C 226 ; WX 924 ; N a173 ; B 35 98 889 594 ; C 227 ; WX 924 ; N a162 ; B 35 98 889 594 ; C 228 ; WX 917 ; N a174 ; B 35 0 882 692 ; C 229 ; WX 930 ; N a175 ; B 35 84 896 608 ; C 230 ; WX 931 ; N a176 ; B 35 84 896 608 ; C 231 ; WX 463 ; N a177 ; B 35 -99 429 791 ; C 232 ; WX 883 ; N a178 ; B 35 71 848 623 ; C 233 ; WX 836 ; N a179 ; B 35 44 802 648 ; C 234 ; WX 836 ; N a193 ; B 35 44 802 648 ; C 235 ; WX 867 ; N a180 ; B 35 101 832 591 ; C 236 ; WX 867 ; N a199 ; B 35 101 832 591 ; C 237 ; WX 696 ; N a181 ; B 35 44 661 648 ; C 238 ; WX 696 ; N a200 ; B 35 44 661 648 ; C 239 ; WX 874 ; N a182 ; B 35 77 840 619 ; C 241 ; WX 874 ; N a201 ; B 35 73 840 615 ; C 242 ; WX 760 ; N a183 ; B 35 0 725 692 ; C 243 ; WX 946 ; N a184 ; B 35 160 911 533 ; C 244 ; WX 771 ; N a197 ; B 34 37 736 655 ; C 245 ; WX 865 ; N a185 ; B 35 207 830 481 ; C 246 ; WX 771 ; N a194 ; B 34 37 736 655 ; C 247 ; WX 888 ; N a198 ; B 34 -19 853 712 ; C 248 ; WX 967 ; N a186 ; B 35 124 932 568 ; C 249 ; WX 888 ; N a195 ; B 34 -19 853 712 ; C 250 ; WX 831 ; N a187 ; B 35 113 796 579 ; C 251 ; WX 873 ; N a188 ; B 36 118 838 578 ; C 252 ; WX 927 ; N a189 ; B 35 150 891 542 ; C 253 ; WX 970 ; N a190 ; B 35 76 931 616 ; C 254 ; WX 918 ; N a191 ; B 34 99 884 593 ; EndCharMetrics EndFontMetrics ================================================ FILE: OptolithiumGui/mpl-data/fonts/ttf/LICENSE_STIX ================================================ The STIX fonts distributed with matplotlib have been modified from their canonical form. They have been converted from OTF to TTF format using Fontforge and this script: #!/usr/bin/env fontforge i=1 while ( i<$argc ) Open($argv[i]) Generate($argv[i]:r + ".ttf") i = i+1 endloop The original STIX Font License begins below. ----------------------------------------------------------- STIX Font License 24 May 2010 Copyright (c) 2001-2010 by the STI Pub Companies, consisting of the American Institute of Physics, the American Chemical Society, the American Mathematical Society, the American Physical Society, Elsevier, Inc., and The Institute of Electrical and Electronic Engineers, Inc. (www.stixfonts.org), with Reserved Font Name STIX Fonts, STIX Fonts (TM) is a trademark of The Institute of Electrical and Electronics Engineers, Inc. Portions copyright (c) 1998-2003 by MicroPress, Inc. (www.micropress-inc.com), with Reserved Font Name TM Math. To obtain additional mathematical fonts, please contact MicroPress, Inc., 68-30 Harrow Street, Forest Hills, NY 11375, USA, Phone: (718) 575-1816. Portions copyright (c) 1990 by Elsevier, Inc. This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. ================================================ FILE: OptolithiumGui/mpl-data/images/back.ppm ================================================ P6 24 24 255 k<(v$v"s*{Jһe&u#))(&#r){9&,01.,)&#m{X@&1;AB=4-)%!lzS{"}.$+3CR^7($t9&w&*.:Uˈʏ˔zqs$(+Pt {izr!%(s~ yjz!s"%7u | wk{,w!#1lged~ z t(tK 0ݼ+ { vnK撹 u-ݺ( | xsk{2x*۹% { xt n=曼+z&F} z wso!m}[0}~~} | z xurol{QG~ y y y x vuspo,s性6yD0 vrq r)z-vSݏ^A><}P ================================================ FILE: OptolithiumGui/mpl-data/images/back.xpm ================================================ /* XPM */ static char *back[] = { /* columns rows colors chars-per-pixel */ "24 24 130 2", " c #17697A", ". c #1B6B7A", "X c #216D7D", "o c #066F8C", "O c #0C6E85", "+ c #0F6F89", "@ c #04708F", "# c #0B728F", "$ c #067291", "% c #097593", "& c #0B7995", "* c #0E7D99", "= c #14748A", "- c #1D7280", "; c #147C92", ": c #127E9B", "> c #1A7F94", ", c #237483", "< c #217C8B", "1 c #2A7584", "2 c #2A7A8B", "3 c #297A92", "4 c #347886", "5 c #3D7E8D", "6 c #12829D", "7 c #1F8395", "8 c #1B8498", "9 c #1586A0", "0 c #1688A1", "q c #1A8CA4", "w c #1E92A9", "e c #248595", "r c #25859B", "t c #258A9B", "y c #2A879B", "u c #2D8C9E", "i c #308095", "p c #3B8293", "a c #398499", "s c #3E8A9D", "d c #298DA1", "f c #2195AB", "g c #2398AE", "h c #299AAC", "j c #259BB0", "k c #289EB2", "l c #3086A1", "z c #308FA0", "x c #3192A2", "c c #3799A9", "v c #2AA1B5", "b c #2DA5B8", "n c #37A0AF", "m c #32ABBD", "M c #38A0B0", "N c #36B0C1", "B c #3AB6C6", "V c #3CB8C7", "C c #3DBAC8", "Z c #41808F", "A c #408797", "S c #45899D", "D c #518A9A", "F c #4B8CA0", "G c #4697AB", "H c #4A92A4", "J c #5C91A0", "K c #539AB1", "L c #589DB4", "P c #50A9B6", "I c #54B1BC", "U c #659DAF", "Y c #64A9B7", "T c #66ADBA", "R c #6BA2B6", "E c #6CB0BD", "W c #7FA8B7", "Q c #74B2BF", "! c #41BECC", "~ c #5EBEC6", "^ c #68B7C2", "/ c #73ACC4", "( c #7BAFC5", ") c #43C1CE", "_ c #47C6D2", "` c #4ACAD5", "' c #5EC2C9", "] c #52D4DD", "[ c #57DBE3", "{ c #6ACFD3", "} c #61E7EC", "| c #63EAEF", " . c #6BF5F7", ".. c #80A7B2", "X. c #8FB1BC", "o. c #8DB5C9", "O. c #86B6D0", "+. c #88BAD2", "@. c #92B9CE", "#. c #9BBCCD", "$. c #91BDD6", "%. c #9CBDD2", "&. c #8AC1CA", "*. c #94C4CD", "=. c #93C7D0", "-. c #A9D3DC", ";. c #B8CBD7", ":. c #ADD9E1", ">. c #B6CDE0", ",. c #B7D0E4", "<. c #BDD3E9", "1. c #BADDE4", "2. c #BDE0E7", "3. c #BEE2E8", "4. c #C3D3DF", "5. c #D3DBDD", "6. c #C2D6EA", "7. c #C6D8EA", "8. c #CAD9E9", "9. c #D7DFE7", "0. c #D3DDE8", "q. c #C0E4EA", "w. c #C3E9EE", "e. c #C2EDF0", "r. c #C8EEF2", "t. c #C6F2F4", "y. c #CAF1F4", "u. c #DCE1E7", "i. c #D9E0E8", "p. c #E5E5E6", /* pixels */ "p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.", "p.p.p.p.p.p.p.p.i.8.6.<.,.7.8.i.p.p.p.p.p.p.p.p.", "p.p.p.p.p.p.u.,.R a 1 , X 2 H +.<.9.p.p.p.p.p.p.", "p.p.p.p.p.8.U X e h v v v f 8 X 2 $.8.p.p.p.p.p.", "p.p.p.p.6.p y b b m b b v g g w 8 . L 7.p.p.p.p.", "p.p.p.8.s e b V ! ) C N v v k w w 0 . K 8.p.p.p.", "p.p.u.( < b C ` ] ] ] I E v v w w q 6 . +.9.p.p.", "p.p.6., h m ) ] } | ' 3.3.n v g w w 0 ; , 6.p.p.", "p.u./ - v N _ [ .{ t.y.w.n v f g q 0 6 . / u.p.", "p.0.x t v m ) ] ' 3.y.t.w.n v g w q 9 6 = a 0.p.", "p.6.< g v b V I 3.t.t.r.q.&.&.&.*.q 6 6 * - 8.p.", "p.6.X g v v P 3.t.t.r.3.2.2.2.2.1.Q 9 * & 6.p.", "p.<.- f g v =.3.q.q.2.2.2.2.2.2.2.Q 6 6 * 6.p.", "p.6., w f g c :.3.3.2.2.2.2.2.2.1./ 6 & % . 6.p.", "p.8.1 q w f g x -.3.2.2.2.E T T Y 6 : % % 1 0.p.", "p.9.F > q w f f x -.2.2.2.d q 6 6 * * % O F 9.p.", "p.p.@.- q q q q w u -.1.1.d 9 6 6 * & $ . %.p.p.", "p.p.0.4 6 9 0 0 0 0 y -.,.r 6 * & % $ O p 0.p.p.", "p.p.p.#.2 9 9 9 9 9 9 r G 6 * * % $ @ X >.p.p.p.", "p.p.p.p.J 3 & * * * * * * & % $ $ @ . o.p.p.p.p.", "p.p.p.p.p.D S : % & & % % $ $ @ O 1 %.p.p.p.p.p.", "p.p.p.p.p.p...4 S a % $ $ # 3 4 D 4.p.p.p.p.p.p.", "p.p.p.p.p.p.p.5.o.J 5 5 5 D ..;.p.p.p.p.p.p.p.p.", "p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p." }; ================================================ FILE: OptolithiumGui/mpl-data/images/filesave.xpm ================================================ /* XPM */ static char *filesave1a[] = { /* width height ncolors chars_per_pixel */ "24 24 301 2", /* colors */ " c #7CA3B5", " . c #374F64", " X c #7898A7", " o c #2D4C64", " O c #B3815D", " + c #845646", " @ c #5C7F92", " # c #28465F", " $ c #27465E", " % c #79A3B5", " & c #03496C", " * c #899CA7", " = c #02476B", " - c #01476A", " ; c #044063", " : c #7B95A3", " > c #81949F", " , c #B6C9D3", " < c #085374", " 1 c #AF7F5C", " 2 c #7893A0", " 3 c #B4C7D1", " 4 c #7E929C", " 5 c #064F72", " 6 c #A16E41", " 7 c #A06C40", " 8 c #044D70", " 9 c #9F6C3F", " 0 c #B0C3CD", " q c #195E7E", " w c #AFC3CC", " e c #175C7C", " r c #6B8C9D", " t c #546376", " y c #96AEBA", " u c #ACBFC9", " i c #155A7A", " p c #135878", " a c #A9BDC6", " s c #0B597A", " d c #A9BBC6", " f c #205271", " g c #125677", " h c #034265", " j c #0A5779", " k c #095778", " l c #4E5D70", " z c #A6B9C3", " x c #304B63", " c c #7396A8", " v c #8FA6B3", " b c #4B5B6D", " n c #A4B7C1", " m c #0B5070", " M c #A0B3BD", " N c #0B5B7D", " B c #374E63", " V c #364C62", " C c #7E96A2", " Z c #B4825D", " A c #7795A5", " S c #2D4B63", " D c #92A5AF", " F c #2B4961", " G c #29475F", " H c #8EA1AB", " J c #27455D", " K c #86A0AD", " L c #9BAFBB", " P c #8A9DA7", " I c #98ADB8", " U c #014669", " Y c #8699A3", " T c #004468", " R c #8497A1", " E c #82959F", " W c #B1805D", " Q c #B0805C", " ! c #90A5B0", " ~ c #A47143", " ^ c #7E919B", " / c #A16D40", " ( c #044C6F", " ) c #7A8D97", " _ c #195D7D", " ` c #ADC0C9", " ' c #768993", " ] c #94ABB7", " [ c #0B5879", " { c #92A9B5", " } c #095677", " | c #085476", ". c #075275", ".. c #AD7E5C", ".X c #AC7C5B", ".o c #6F91A3", ".O c #1F415B", ".+ c #0C5C7D", ".@ c #0B5C7C", ".# c #5F7486", ".$ c #738593", ".% c #708190", ".& c #A4B8C3", ".* c #7492A1", ".= c #566A7D", ".- c #7BA3B5", ".; c #687988", ".: c #526679", ".> c #285874", "., c #3A677F", ".< c #BCCFD7", ".1 c #6C8699", ".2 c #B9CBD4", ".3 c #0A5374", ".4 c #A57243", ".5 c #3C748E", ".6 c #A37041", ".7 c #27465F", ".8 c #305975", ".9 c #77A3B4", ".0 c #9BB0BD", ".q c #044B6E", ".w c #705047", ".e c #03496D", ".r c #819DAA", ".t c #01476B", ".y c #43778E", ".u c #658295", ".i c #085375", ".p c #AE7F5C", ".a c #075174", ".s c #065173", ".d c #8DA4AF", ".f c #7A8C99", ".g c #768895", ".h c #1F405A", ".j c #0C5B7C", ".k c #0B597B", ".l c #0A597A", ".z c #A7BBC5", ".x c #105676", ".c c #095779", ".v c #374C61", ".b c #4A596D", ".n c #73919F", ".m c #718F9D", ".M c #536579", ".N c #7A99A9", ".B c #95A9B3", ".V c #A4B9C5", ".C c #2E4D65", ".Z c #A67343", ".A c #B2805C", ".S c #4A7187", ".D c #335C77", ".F c #9FB5C0", ".G c #224863", ".H c #28475F", ".J c #8EA1AC", ".K c #27455E", ".L c #26455D", ".P c #587C8E", ".I c #839EAB", ".U c #02486B", ".Y c #293E56", ".T c #01466A", ".R c #8699A4", ".E c #7F9AA7", ".W c #729CAE", ".Q c #8DAAB8", ".! c #044163", ".~ c #7D98A5", ".^ c #8397A1", "./ c #93A7B4", ".( c #AE7E5B", ".) c #A26F42", "._ c #065072", ".` c #B3C6D0", ".' c #054E71", ".] c #B1C4CE", ".[ c #044C70", ".{ c #9F6B3F", ".} c #798D97", ".| c #AEC2CB", "X c #6C8D9E", "X. c #ACC0C9", "XX c #ABBEC8", "Xo c #145979", "XO c #516073", "X+ c #125777", "X@ c #505E72", "X# c #0A5879", "X$ c #728590", "X% c #095678", "X& c #40768D", "X* c #304A63", "X= c #7295A7", "X- c #889FAC", "X; c #9DB0BA", "X: c #0B5C7D", "X> c #99ACB6", "X, c #034568", "X< c #7A4C38", "X1 c #024367", "X2 c #4F768B", "X3 c #374D63", "X4 c #304E66", "X5 c #364D62", "X6 c #8DA7B4", "X7 c #2C4A62", "X8 c #7594A3", "X9 c #8BA5B2", "X0 c #91A4AE", "Xq c #576C7F", "Xw c #2A4860", "Xe c #89A3B0", "Xr c #28465E", "Xt c #9DB2BD", "Xy c #8DA0AA", "Xu c #8B9EA8", "Xi c #899CA6", "Xp c #879AA4", "Xa c #014569", "Xs c #213E57", "Xd c #004568", "Xf c #96AAB6", "Xg c #8598A2", "Xh c #45778E", "Xj c #8396A0", "Xk c #684A3D", "Xl c #B1815D", "Xz c #81949E", "Xx c #7F929C", "Xc c #A26E41", "Xv c #7192A2", "Xb c #7D909A", "Xn c #7B8E98", "Xm c #B0C3CC", "XM c #034B6E", "XN c #175C7B", "XB c #778A94", "XV c #155A79", "XC c #536174", "XZ c #FFFFFF", "XA c #41758D", "XS c #085376", "XD c #075375", "XF c #7194A5", "XG c #065174", "XH c #AD7D5C", "XJ c #9BB4C1", "XK c #8AA2AD", "XL c #7CA2B3", "XP c #6D8EA1", "XI c #97B0BD", "XU c #768896", "XY c #DDE0E4", "XT c #1D2A42", "XR c #0B5B7C", "XE c #7C9BA9", "XW c #91AAB7", "XQ c #3E758D", "X! c #8DA6B3", "X~ c #D5D8DC", "X^ c #6D7E8D", "X/ c #55697C", "X( c #7AA2B4", "X) c #28435D", "X_ c #53677A", "X` c #708D9D", "X' c #516578", "X] c #839CA9", "X[ c #4F6376", "X{ c #4D6174", "X} c #004467", "X| c #BACCD5", "o c #B1805C", "o. c #B6C8D1", "oX c #034A6D", "oo c #02486C", "oO c #01466B", "o+ c #1F516E", "o@ c #095476", "o# c #075274", "o$ c #AE7E5C", "o% c #B2C6D0", "o& c #6E8FA1", "o* c #5F7B8F", "o= c #899FAB", "o- c #20415B", "o; c #95ADBA", "o: c #1F415A", "o> c #135979", "o, c #0B5A7B", "o< c #125778", "o1 c #185674", "o2 c #0A587A", "o3 c #41768F", "o4 c #2F4A63", "o5 c #A1B4BF", "o6 c None", /* pixels */ "XZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZ", "XZ.+.+.@.+X:X: NXRXRXRXRXRXRXRXRXRXRXR.jo,o,.+XZ", ".+XRo2 [X<.Z.4 ~ ~ ~.6.)Xc 6 6 / 7 9.{XkXM.q k.+", ".+.,o*.3 + Z O.AXlo W Q 1.po$.(XH...X.wo+.1 f s", ".j.uX~ m.9.<.2 3 0 u d.&o5Xt L IXf./ !.5.8XY.D.l", "XRo1.> < %X|o..].Q cX=XFXv.oo&XPX rX]XQX1.!X,.l", "XR |XDo@X( ,o%.|X2 G.H #.7 $.K.K.L.L @X&Xa T -.l", "o,. .aXS.-.` w u.V.F.0 y ] { v.dXKX-o=o3 U T -.l", "o,.s._o#XLXmX. a.So-o-o-.O.Oo:.h.h.h.P.y.T T -.l", ".k 5.'o# ` a zX6XE.N X AX8.*.n.mX` CXhoO T -.l", ".l.' 8XG.WXJXIo;XWX!X9Xe K.I.r.E.~ : 2XA.T T -.l", ".l (.q.[ q _ eXN iXVXoXoXoo> p poXbX3 T T T T =o2", "X% T T T T T x MX@XTXT.%Xu.R E ^.}X5 T T T T =o2", "X# T T T T T xX; lXTXTX^XpXj 4 ) ' V T T T T.e.l", "o,.i T T T TX*X>.;.b b.g.^XxXnXBX$.vX} T T.e.l.+", "XZ.k jX%X%X%.GX4.C o SX7 FXw GXr JXs } k k.l.+XZ" }; ================================================ FILE: OptolithiumGui/mpl-data/images/forward.ppm ================================================ P6 24 24 255 k<(v$v"s*{Jһe&u#))(&#r){9&,01.,)&#m{X@&1;AB=4-)%!lzS{"}.$+3CR^aVMt9&w&*.:jЎ،׉Նzqs$(+/ {izr!%(+}㍾~ yjz!s"%'{ƿ | wk{,w!#_̈ɈɆȼ~ z t(tK !! & { vnK撹 u | xsk{2x { xt n=曼+zD} z wso!m}[0}~~} | z xurol{QG~ y y y x vuspo,s性6yD0 vrq r)z-vSݏ^A><}P ================================================ FILE: OptolithiumGui/mpl-data/images/forward.xpm ================================================ /* XPM */ static char *forward[] = { /* columns rows colors chars-per-pixel */ "24 24 124 2", " c #17697A", ". c #1B6B7A", "X c #216D7D", "o c #066F8C", "O c #0C6E85", "+ c #0F6F89", "@ c #04708F", "# c #0B728F", "$ c #067291", "% c #097593", "& c #0B7995", "* c #0E7D99", "= c #14748A", "- c #1D7280", "; c #147C92", ": c #127E9B", "> c #1A7F94", ", c #237483", "< c #217C8B", "1 c #2A7584", "2 c #2A7A8B", "3 c #297A92", "4 c #347886", "5 c #3D7E8D", "6 c #12829D", "7 c #1F8395", "8 c #1A8499", "9 c #1586A0", "0 c #1788A2", "q c #1A8CA4", "w c #1E91A9", "e c #248595", "r c #258A9B", "t c #308095", "y c #3B8293", "u c #398499", "i c #3E8A9D", "p c #268FA3", "a c #2195AB", "s c #2398AE", "d c #299AAC", "f c #259BB0", "g c #289EB2", "h c #3086A1", "j c #2AA1B5", "k c #2EA5B9", "l c #32ABBD", "z c #36B0C1", "x c #3AB6C6", "c c #3CB8C7", "v c #3DBAC8", "b c #41808F", "n c #408797", "m c #45899D", "M c #518A9A", "N c #4B8CA0", "B c #4497AA", "V c #4A92A4", "C c #5C91A0", "Z c #539AB1", "A c #589DB4", "S c #5FB0BD", "D c #659DAF", "F c #6BA2B6", "G c #7FA8B7", "H c #41BDCB", "J c #4DBBC5", "K c #53BFC9", "L c #58BCC7", "P c #64B6C2", "I c #73ACC4", "U c #7BAFC5", "Y c #7BBBC6", "T c #7DBDC8", "R c #43C1CE", "E c #47C6D2", "W c #4ACAD5", "Q c #52D4DD", "! c #56DAE2", "~ c #58DCE4", "^ c #5DE3E9", "/ c #6AC7D0", "( c #61E7EC", ") c #63EAEF", "_ c #6BF5F7", "` c #71FCFD", "' c #80A7B2", "] c #8FB1BC", "[ c #86BEC8", "{ c #8DB5C9", "} c #8DBEC7", "| c #86B6D0", " . c #88BAD2", ".. c #92B9CE", "X. c #9BBCCD", "o. c #91BDD6", "O. c #9CBDD2", "+. c #83C5CE", "@. c #88C0CA", "#. c #89CED5", "$. c #8CD1D7", "%. c #8ED3D8", "&. c #AED5DD", "*. c #B8CBD7", "=. c #B3D7DF", "-. c #B6CDE0", ";. c #B7D0E4", ":. c #B4DAE2", ">. c #BDD3E9", ",. c #BADDE4", "<. c #BDE0E7", "1. c #BEE2E8", "2. c #C3D3DF", "3. c #D3DBDD", "4. c #C2D6EA", "5. c #C6D8EA", "6. c #CAD9E9", "7. c #D7DFE7", "8. c #D3DDE8", "9. c #C0E4EA", "0. c #C4E9EE", "q. c #DCE1E7", "w. c #D9E0E8", "e. c #E5E5E6", /* pixels */ "e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.", "e.e.e.e.e.e.e.e.w.6.4.>.>.4.6.w.e.e.e.e.e.e.e.e.", "e.e.e.e.e.e.w.;.F y 1 , , 2 V .>.8.e.e.e.e.e.e.", "e.e.e.e.e.6.D 1 e d j f d a 8 . 2 o.6.e.e.e.e.e.", "e.e.e.e.4.y e k k l k k j f s w 8 X A 5.e.e.e.e.", "e.e.e.6.i e k c R R v l j j s s q 0 . Z 6.e.e.e.", "e.e.q.U < k v W Q Q Q J S j j w w q 6 . | q.e.e.", "e.e.4., d l R Q ( ( Q E 1.<.j s a q 0 ; , 4.e.e.", "e.7.I > k z E ! _ ` ^ E 0.9.=.d w q 0 6 - I q.e.", "e.8.i r j l v Q ^ ( ~ J 0.9.9.=.w q 0 6 = u 8.e.", "e.4.1 s j k x / %.%.#.+.9.9.9.<.:.q 9 6 * - 5.e.", "e.>.- s g j l +.0.0.0.1.9.<.<.<.,.:.9 6 & 4.e.", "e.>.X w s g j T 9.9.9.9.<.<.<.,.,.,.} * & 4.e.", "e.4., w a s f T 9.<.<.1.<.<.<.,.,.&.6 & % . 4.e.", "e.6.2 q w a s S @.@.@.@.<.,.,.=.&.6 * & % 1 8.e.", "e.w.m 7 q w w a a a a r ,.,.9.=.6 * * % O M 7.e.", "e.e...- 0 q q w w w q 8 ,.,.:.6 * * % % O.e.e.", "e.e.8.4 6 9 9 9 0 q 0 6 :.:.6 * * & % O 5 8.e.e.", "e.e.e.X.2 6 6 6 6 6 6 6 B * * & % $ o X -.e.e.e.", "e.e.e.e.C t * 6 * 6 * * & & & % $ o . { e.e.e.e.", "e.e.e.e.e.M m : & & & & % % @ o + 1 O.e.e.e.e.e.", "e.e.e.e.e.e.G 4 m u & $ @ # 3 1 M >.e.e.e.e.e.e.", "e.e.e.e.e.e.e.3.] C b 5 5 M G *.e.e.e.e.e.e.e.e.", "e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e.e." }; ================================================ FILE: OptolithiumGui/mpl-data/images/hand.ppm ================================================ P6 24 24 255 pVpɸ쓻TSX쓼WVZ씽c\\얿pggø呺ГӓӖՑ|okȸcQU^nq[SPVSPdLPU[ituk\UQMIEXhOQT[`g`UZWURPuƸ쓼ZW[쓼UTX쓻QPW쒺NMU쐺JIRiTmø ================================================ FILE: OptolithiumGui/mpl-data/images/hand.xpm ================================================ /* XPM */ static char *hand[] = { /* columns rows colors chars-per-pixel */ "24 24 118 2", " c #459BB5", ". c #4C9EB2", "X c #509AB2", "o c #509BB3", "O c #529DB4", "+ c #529EB5", "@ c #539FB6", "# c #549EB5", "$ c #589CB4", "% c #4FA0B6", "& c #49A0B9", "* c #49A1B9", "= c #4AA2BA", "- c #4DA6BD", "; c #4EA7BE", ": c #50A3B7", "> c #55A0B7", ", c #51A5B8", "< c #53A7BA", "1 c #55A2B8", "2 c #56A3B9", "3 c #57A3B9", "4 c #57A4BA", "5 c #54A8BB", "6 c #55A8BB", "7 c #58A5BB", "8 c #58A7BB", "9 c #5AA8BD", "0 c #5BA9BD", "q c #5CAABF", "w c #64A5BD", "e c #63A8BE", "r c #69A7BE", "t c #50AAC0", "y c #51ABC1", "u c #53ADC3", "i c #54AEC4", "p c #55B0C5", "a c #56B1C6", "s c #57B2C7", "d c #57B3C7", "f c #5BB0C1", "g c #5BB1C2", "h c #5AB6CA", "j c #5BB7CB", "k c #5CB9CC", "l c #5CB9CD", "z c #5EBCCE", "x c #68ABC2", "c c #6DABC3", "v c #60B7C7", "b c #67B0C3", "n c #6BB4C8", "m c #60BFD1", "M c #70ADC4", "N c #75ACC6", "B c #70B1C9", "V c #63C1D3", "C c #67C7D7", "Z c #67C8D8", "A c #69CADA", "S c #6BCCDB", "D c #6ED0DE", "F c #6FD2DF", "G c #70D3E1", "H c #71D3E1", "J c #74D8E5", "K c #75D9E5", "L c #7CE3ED", "P c #7FE6EF", "I c #90BAD0", "U c #91BAD0", "Y c #93BBD1", "T c #92BAD2", "R c #93BBD2", "E c #93BCD3", "W c #94BDD4", "Q c #96BFD5", "! c #91C2D6", "~ c #82EAF3", "^ c #ACCBE5", "/ c #AFCCE5", "( c #BAD2EB", ") c #B8D2EC", "_ c #BDD3EA", "` c #BCD4EB", "' c #BED4EA", "] c #BFD5EB", "[ c #BDD5EC", "{ c #C0D5EB", "} c #C2D6EA", "| c #C2D6EB", " . c #C3D7EA", ".. c #C5D7E9", "X. c #C4D7EA", "o. c #C6D8EA", "O. c #C6D8EB", "+. c #C7D9EA", "@. c #C9D9EA", "#. c #CBDAE9", "$. c #CDDBE9", "%. c #CCDBEA", "&. c #CEDBE9", "*. c #D7DFE7", "=. c #D0DCE9", "-. c #D2DDE8", ";. c #D4DEE8", ":. c #D5DFE9", ">. c #D7DFE8", ",. c #DAE0E7", "<. c #DBE1E7", "1. c #DFE3E7", "2. c #D8E0E8", "3. c #DAE1E8", "4. c #E2E4E6", "5. c #E3E5E6", "6. c #E5E5E6", "7. c #E6E6E6", /* pixels */ "7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.", "7.7.7.7.7.7.7.4.>.$.| _ _ | @.*.7.7.7.7.7.7.7.7.", "7.7.7.7.7.7.3.] ) ) ) ) ) ) ( ( ] *.7.7.7.7.7.7.", "7.7.7.7.7.@.) ) ) ) ) ) ) ) ) ) ) ) @.7.7.7.7.7.", "7.7.7.7...) ) ) ) ) ) ) ) ) ) ) ) ) ) ..7.7.7.7.", "7.7.7.@.) ) ) ) ) ) / N 1 n ) ) ) ) ) ) @.7.7.7.", "7.7.3.) ) ) ) ) ) ) R u u 7 ) ) ) ) ) ) ) 3.7.7.", "7.7.| ) ) ) ) ) ) ) W s i 0 ) ) ) ) ) ) ) | 7.7.", "7.<.) ) ) ) ) ) ) ) W V l q ) ) ) ) ) ) ) ) 1.7.", "7.$.) ) ) ) ) ) ) ) W F C b ) ) ) ) ) ) ) ) -.7.", "7. .) ) ) / E E E Q ! P D n ) ) ) ) ) ) ) ) @.7.", "7.] ) ) ) e y i z D P ~ H f < : 1 @ X w ) ) ..7.", "7.( ) ) ) . ; i j S K K S k i y - = $ ) ) ..7.", "7.| ) ) ) b % , 5 q j Z V 5 0 4 1 @ X N ) ) .7.", "7.#.) ) ) ) ) ) ( ( W j i q ) ) ) ) ) ) ) ) $.7.", "7.2.) ) ) ) ) ) ) ) Q i i 6 ) ) ) ) ) ) ) ) <.7.", "7.7.( ) ) ) ) ) ) ) E ; ; 5 ) ) ) ) ) ) ) ] 7.7.", "7.7.2.) ) ) ) ) ) ) E - ; 1 ) ) ) ) ) ) ) -.7.7.", "7.7.7.| ) ) ) ) ) ) I = = O ( ) ) ) ) ( ..7.7.7.", "7.7.7.4.] ) ) ) ) ) ^ r # c ) ) ) ) ) ] 4.7.7.7.", "7.7.7.7.4. .) ) ) ) ) ) ) ) ) ) ) ) ] 4.7.7.7.7.", "7.7.7.7.7.7.-.( ) ) ) ) ) ) ) ( ( -.7.7.7.7.7.7.", "7.7.7.7.7.7.7.4.-.+.] ) ) ( .-.4.7.7.7.7.7.7.7.", "7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7.7." }; ================================================ FILE: OptolithiumGui/mpl-data/images/home.ppm ================================================ P6 24 24 255 p$"hfsgsecVx#2Dy00usݳяjO־w!Y4Q/K#;w/.usݳڌ-s:O@[6R0L&B"?!:w/.us䰆wXy'-56>,2!9"? ;w/.ghx=O=Uhs116"? ;w/.s>R@[f!#n11!8"?!:w/.Թu=RE^d !i//'?"?#;w/.ԹuAVJbh-/кf+*)A"?#;w.-ؿw!DYKdg)+ſvo^XJʵe))+A"?2l{--AUIa??mqqj٨Ԗ}ҙOD4ɻҔy43&9m̲漢GP@?p|~wnљݳԘ~eUkhϙn$"ɥv41r}tcԗإӕ|cLyoϙzscҐՙюxaJyoϙzraΆЍ̈́q]Fyoϙzr`{́zjVByoϙzscptoaP c #662B2A", ", c #6E2422", "< c #682D2F", "1 c #692F2F", "2 c #6E3131", "3 c #702422", "4 c #772E2D", "5 c #772F2E", "6 c #7B2D2D", "7 c #7F2C32", "8 c #733131", "9 c #763431", "0 c #793030", "q c #793433", "w c #4E7379", "e c #6D7171", "r c #707C7E", "t c #727D7F", "y c #6E7E81", "u c #628287", "i c #658489", "p c #6C8A8F", "a c #758081", "s c #7A8485", "d c #7F989C", "f c #981D32", "g c #9B1E36", "h c #882D35", "j c #833F3F", "k c #8D363E", "l c #992139", "z c #9B2138", "x c #992639", "c c #A2213A", "v c #A3203B", "b c #A2233B", "n c #A0273F", "m c #AB223F", "M c #A12941", "N c #A22B41", "B c #AB2642", "V c #A13244", "C c #AD354C", "Z c #AE3A4F", "A c #AF3D52", "S c #B32F4B", "D c #B4304C", "F c #B03C4F", "G c #B13D4F", "H c #B33451", "J c #B63652", "K c #B13C51", "L c #B03E52", "P c #B23C52", "I c #B83D55", "U c #B93E58", "Y c #BC3D58", "T c #BD3E59", "R c #854434", "E c #83403F", "W c #81443D", "Q c #8F4F35", "! c #8F4F36", "~ c #905038", "^ c #9D613F", "/ c #9D4750", "( c #92584A", ") c #986356", "_ c #976866", "` c #9C6768", "' c #9C6B65", "] c #9A6B68", "[ c #9F7573", "{ c #B14155", "} c #B34156", "| c #B64459", " . c #BC405B", ".. c #BE405B", "X. c #BD455E", "o. c #BD4961", "O. c #BF4A62", "+. c #A0604D", "@. c #A16A4F", "#. c #A46F5E", "$. c #A57260", "%. c #A57261", "&. c #A47363", "*. c #A57363", "=. c #A57365", "-. c #A57367", ";. c #A57463", ":. c #A47464", ">. c #A47466", ",. c #A7776E", "<. c #A7796E", "1. c #A7796F", "2. c #AC7F76", "3. c #C24B64", "4. c #B6846A", "5. c #DA8C2D", "6. c #EFAB24", "7. c #EFAC28", "8. c #F0AF2E", "9. c #F1B136", "0. c #F1B137", "q. c #F1B33C", "w. c #D2994F", "e. c #E8B255", "r. c #F1B540", "t. c #F2B542", "y. c #F2B645", "u. c #F2B746", "i. c #F1B849", "p. c #F1B94A", "a. c #F1B94C", "s. c #F2BA4D", "d. c #F2BA4E", "f. c #F2BA50", "g. c #F2BD56", "h. c #F3BD58", "j. c #F3BE59", "k. c #F3BF5D", "l. c #F3C061", "z. c #F4C263", "x. c #F4C265", "c. c #F4C368", "v. c #F4C46A", "b. c #F4C56F", "n. c #F5C670", "m. c #F5C671", "M. c #F5C774", "N. c #F5C878", "B. c #F5C97A", "V. c #F5C97B", "C. c #F6C97C", "Z. c #F6CA7D", "A. c #F6CA7E", "S. c #8D8382", "D. c #918483", "F. c #988B8A", "G. c #9D8F8E", "H. c #949293", "J. c #93A0A2", "K. c #99A3A4", "L. c #A59897", "P. c #B99488", "I. c #B49C9B", "U. c gray63", "Y. c #A2A2A2", "T. c gray68", "R. c #BCA2A2", "E. c #BFACAB", "W. c #B1B1B1", "Q. c gray70", "!. c #B5B0B0", "~. c gray71", "^. c #BAB5B5", "/. c gray74", "(. c gray", "). c #C9A5AA", "_. c #C1BCBC", "`. c #CCB2B4", "'. c #C9BBBA", "]. c #D4B9BD", "[. c #E4B086", "{. c #D6BEC1", "}. c #D8BFC3", "|. c #F7CC81", " X c #F7CD84", ".X c #F7CE86", "XX c #F8D08D", "oX c #F8D18E", "OX c #F8D18F", "+X c #F6D199", "@X c #F8D290", "#X c #F9D395", "$X c #F9D496", "%X c #F9D497", "&X c #F9D498", "*X c #F9D599", "=X c #FAD8A5", "-X c #FAD9A8", ";X c #FBDDB3", ":X c #C6C1C1", ">X c gray77", ",X c #C5C5C5", "XzXgXpX>X2 z m c 5 7XfXfXfX", "fXfXfX].@ A X.= F.(.tXbXxXfXtX(.1 n m c 5 7XfXfX", "fXfX].@ } O.< S.~.2XbXbXcXjXaX4X~.> M B c 5 5XfX", "fX9X% | 3.: S.T.,X).4.' ( P.sXuX1X!.; N B f X fX", "fX6 { o.j e W.(.I.4.-X$XZ.w.R '.eXwXH.q x `.fX", "fXR./ j 5Xt U.jX,.+X;X&XZ.x.e.] kX4XK.8X, ).fXfX", "fXfX9 5XfXt U.nX&.$X=X#XZ.z.a.1.xX4XK.fXfXfXfXfX", "fXfXfXfXfXs U.nX*.@X&XOXN.l.p.1.xX4XK.fXfXfXfXfX", "fXfXfXfXfXs U.nX*..XOX|.M.j.u.2.lX3XK.fXfXfXfXfX", "fXfXfXfXfXs U.nX$.C.A.C.v.g.t.<.zX3XK.fXfXfXfXfX", "fXfXfXfXfXs U.nX&.m.M.b.z.d.q.<.zX3XK.fXfXfXfXfX", "fXfXfXfXfXa U.nX:.x.c.z.g.p.0.<.zX3XK.fXfXfXfXfX", "fXfXfXfXfXt U.nX:.j.k.j.a.r.7.1.xX8XK.fXfXfXfXfX", "fXfXfXfXfXt U.nX&.a.f.d.u.q.7.1.xX3XK.fXfXfXfXfX", "fXfXfXfXfXy Q.vXW ~ ~ ~ ! ! ^ ' kXeXJ.fXfXfXfXfX", "fXfXfXfXfXu d d d p i i i i i i i i w fXfXfXfXfX" }; ================================================ FILE: OptolithiumGui/mpl-data/images/move.ppm ================================================ P6 24 24 255 [y)pd榽W^~-qhb^~^~={-rh`^~`e$l5w^~)o:y^~)oD^~)o"kD^~)o$m摰%lammmmm#k^hmtzzza/sMd^~^~^~^~^~^~^~^~b^~^~^~^~^~^~^~^~eXcVe^~^~^~^~^~^~^~^~b^~^~^~^~^~^~^~^~`Kdn9y`_____f_~fmf___a(n_+p5w^~)o,q5w^~)o5w^~)o5w^~)o,qg`^~_b$lZ^~^~^~D榽H^~-qu(ndY ================================================ FILE: OptolithiumGui/mpl-data/images/move.xpm ================================================ /* XPM */ static char *move[] = { /* columns rows colors chars-per-pixel */ "24 24 26 1", " c black", ". c #0B5D7D", "X c #0B5D7E", "o c #0B5E7D", "O c #0D5979", "+ c #0D5B7D", "@ c #0C5C7C", "# c #0C5C7D", "$ c #0C5D7D", "% c #0D5C7D", "& c #0D5D7D", "* c #0C5C7E", "= c #0C5D7E", "- c #0D5C7E", "; c #0D5D7E", ": c #0C5E7D", "> c #0C5E7E", ", c #0D5E7E", "< c #0E5C7E", "1 c #0E5C7F", "2 c #004080", "3 c #095B80", "4 c #0D5D80", "5 c #0E5C80", "6 c #006080", "7 c None", /* pixels */ "777777777777777777777777", "77777777772o677777777777", "7777777777< c #B2C7DB", ", c #9CB7D1", "' c #9AB5CF", ") c #B6CADD", "! c #5B88B2", "~ c #A4BDD5", "{ c #2A435B", "] c #5080AD", "^ c #97B3CE", "/ c #080D11", "( c #5F8BB4", "_ c #95B2CE", ": c #4C79A3", " ", " ", " ....... ", " .+@#$%. ", " .&*=-;. ", " .>,'-;. ", " .),'-;. ", " .)@@-;. ", " ....)',-;.... ", " .!=~*,---{. ", " .],,,--{. ", " .]^*-{. ", " /(_{. ", " .:. ", " . ", " "}; ================================================ FILE: OptolithiumGui/mpl-data/images/stock_left.xpm ================================================ /* XPM */ static char * stock_left_xpm[] = { "16 16 26 1", " c None", ". c #000000", "+ c #C4D4E3", "@ c #A3BCD4", "# c #A6BED5", "$ c #AAC1D7", "% c #ABC2D8", "& c #AFC5DA", "* c #AEC4D9", "= c #6892B9", "- c #9CB7D1", "; c #A4BDD5", "> c #9FB9D2", ", c #9BB6D0", "' c #9AB5CF", ") c #49759E", "! c #1C2D3D", "~ c #C5D5E4", "{ c #A0BAD3", "] c #9EB8D1", "^ c #4B78A2", "/ c #2A435B", "( c #3F6588", "_ c #34536F", ": c #29425A", "< c #2D4760", " ", " . ", " .. ", " .+. ", " .+@....... ", " .+#$%&%*@=. ", " .+-;@>,,>'). ", " !~>{]]->>>>^. ", " ./((((((((_. ", " ./((:::::<. ", " ./(....... ", " ./. ", " .. ", " . ", " ", " "}; ================================================ FILE: OptolithiumGui/mpl-data/images/stock_refresh.xpm ================================================ /* XPM */ static char * stock_refresh_xpm[] = { "16 16 16 1", " c None", ". c #000000", "+ c #8FA8BE", "@ c #D5DEE6", "# c #BBCBD8", "$ c #A6BACB", "% c #A2B7C9", "& c #83A0B8", "* c #7393AE", "= c #4F6F8A", "- c #48667F", "; c #92ABC0", "> c #33485A", ", c #22303B", "' c #7897B1", ") c #4B6A84", " ", " . ", " ..+. ", " .@#$%. ", " .&*==-. ", " .;>.,. ", " .'. . . ", " .). .. ", " .. .@. ", " . . .=. ", " .@.>=. ", " .@===>. ", " .'=>>. ", " .'.. ", " . ", " "}; ================================================ FILE: OptolithiumGui/mpl-data/images/stock_right.xpm ================================================ /* XPM */ static char * stock_right_xpm[] = { "16 16 25 1", " c None", ". c #000000", "+ c #5B88B2", "@ c #9EB8D1", "# c #5080AD", "$ c #B5C9DC", "% c #AFC5DA", "& c #B2C7DB", "* c #B6CADD", "= c #A4BDD5", "- c #9CB7D1", "; c #080D11", "> c #9BB6D0", ", c #A0BAD3", "' c #9AB5CF", ") c #97B3CE", "! c #5F8BB4", "~ c #91B0CC", "{ c #95B2CE", "] c #4C79A3", "^ c #49749C", "/ c #3F6588", "( c #2A435B", "_ c #456F96", ": c #375978", " ", " . ", " .. ", " .+. ", " .......@#. ", " .$%&***=-#; ", " .>,-->',-)!. ", " .~@''>---,{]. ", " .^////////(. ", " ._::::://(. ", " ......./(. ", " .(. ", " .. ", " . ", " ", " "}; ================================================ FILE: OptolithiumGui/mpl-data/images/stock_save_as.xpm ================================================ /* XPM */ static char * stock_save_as_xpm[] = { "16 16 111 2", " c None", ". c #000000", "+ c #F7F8FA", "@ c #CBDDEB", "# c #C88A80", "$ c #D18F84", "% c #CF8D82", "& c #A49626", "* c #634A1E", "= c #A8BBCC", "- c #BFD5E8", "; c #DBE7F1", "> c #8DA9BE", ", c #B7877E", "' c #C77568", ") c #C77467", "! c #C57366", "~ c #FCEB3D", "{ c #F7B544", "] c #61522E", "^ c #72899A", "/ c #54697C", "( c #CFE0ED", "_ c #D7D7D7", ": c #FEFEFE", "< c #FCFCFC", "[ c #F9DF39", "} c #F7B545", "| c #6C5F34", "1 c #B4B4B4", "2 c #84A0B5", "3 c #4F6475", "4 c #D6D6D6", "5 c #F8D837", "6 c #EFB44D", "7 c #584D2B", "8 c #8F8F8F", "9 c #F1F1F1", "0 c #819AAE", "a c #496072", "b c #FDFDFD", "c c #F6D236", "d c #EDA43E", "e c #584E2B", "f c #AAAAAA", "g c #D3D3D3", "h c #485F71", "i c #D5D5D5", "j c #D7AE74", "k c #61562F", "l c #737373", "m c #C5C5C5", "n c #B0B0B0", "o c #7F98AC", "p c #EDEDED", "q c #4F4115", "r c #8D8D8D", "s c #EBEBEB", "t c #ECECEC", "u c #ACBDCB", "v c #6F767D", "w c #9AA3AC", "x c #BFCBD6", "y c #BDC9D4", "z c #A1B6C4", "A c #8BA7BC", "B c #809CB0", "C c #6C8394", "D c #7D97AB", "E c #7D97AC", "F c #A4ACB8", "G c #B9B9B9", "H c #C7C7C7", "I c #E1E1E1", "J c #D4D4D4", "K c #9C9D9D", "L c #2F4656", "M c #80868C", "N c #183042", "O c #33495A", "P c #132D3C", "Q c #586D80", "R c #97A5B0", "S c #86A4B9", "T c #CDCDCD", "U c #2E4353", "V c #5A7082", "W c #BFBFBF", "X c #112835", "Y c #9DA9B0", "Z c #6B7882", "` c #829DB1", " . c #CBCBCB", ".. c #E5E5E5", "+. c #213648", "@. c #5F7989", "#. c #C2C2C2", "$. c #B2B2B2", "%. c #112C3A", "&. c #9FA9B0", "*. c #59636D", "=. c #A1A1A1", "-. c #C0C0C0", ";. c #909090", ">. c #868686", ",. c #6E6E6E", "'. c #7A7A7A", "). c #2D3949", "!. c #3E4F5C", "~. c #80878F", "{. c #1A3140", " . . . . . . . . . . . . . . ", ". + @ # $ $ $ $ % . & * . = - . ", ". ; > , ' ) ) ! . ~ { ] . ^ / . ", ". ( > _ : : < . [ } | . 1 2 3 . ", ". ( > _ _ 4 . 5 6 7 . 8 9 0 a . ", ". ( > _ b . c d e . f g 9 0 h . ", ". ( > _ i . j k . l m n 9 o a . ", ". ( > p . q . . r g s s t 0 a . ", ". ( > u . . v w x x x y z 0 a . ", ". ( > A B C 0 0 0 0 D E 0 0 a . ", ". ( > A F G G H I J K L M 0 a . ", ". ( > 2 m m N O i m G P Q R a . ", ". ( S 0 m T U V m m W X V Y a . ", ". Z ` o ...+.@.m #.$.%.V &.a . ", ". . *.3 =.-.;.;.>.,.'.).!.~.{.. ", " . . . . . . . . . . . . . . "}; ================================================ FILE: OptolithiumGui/mpl-data/images/stock_up.xpm ================================================ /* XPM */ static char * stock_up_xpm[] = { "16 16 26 1", " c None", ". c #1C2D3D", "+ c #000000", "@ c #C5D5E4", "# c #C4D4E3", "$ c #9FB9D2", "% c #2A435B", "& c #9CB7D1", "* c #A0BAD3", "= c #3F6588", "- c #A6BED5", "; c #A4BDD5", "> c #9EB8D1", ", c #A3BCD4", "' c #AAC1D7", ") c #ABC2D8", "! c #29425A", "~ c #AFC5DA", "{ c #9BB6D0", "] c #AEC4D9", "^ c #9AB5CF", "/ c #6892B9", "( c #49759E", "_ c #4B78A2", ": c #34536F", "< c #2D4760", " ", " . ", " +@+ ", " +#$%+ ", " +#&*=%+ ", " +#-;>==%+ ", " +#,',>===%+ ", " ++++)$&=!++++ ", " +~{$=!+ ", " +){$=!+ ", " +]$$=!+ ", " +,^$=!+ ", " +/(_:<+ ", " +++++++ ", " ", " "}; ================================================ FILE: OptolithiumGui/mpl-data/images/stock_zoom-in.xpm ================================================ /* XPM */ static char * stock_zoom_in_xpm[] = { "16 16 42 1", " c None", ". c #000000", "+ c #262626", "@ c #C5C5C5", "# c #EEEEEE", "$ c #EDEDED", "% c #ABABAB", "& c #464646", "* c #878787", "= c #F1F1F1", "- c #FEFEFE", "; c #FDFDFD", "> c #FCFCFC", ", c #EAEAEA", "' c #707070", ") c #252525", "! c #282828", "~ c #FBFBFB", "{ c #E8E8E8", "] c #B0B0B0", "^ c #FFFFFF", "/ c #050505", "( c #040404", "_ c #FAFAFA", ": c #A4A4A4", "< c #090909", "[ c #242424", "} c #E5E5E5", "| c #E4E4E4", "1 c #F9F9F9", "2 c #BABABA", "3 c #E7E7E7", "4 c #858585", "5 c #E3E3E3", "6 c #6D6D6D", "7 c #A1A1A1", "8 c #202020", "9 c #686868", "0 c #343434", "a c #797979", "b c #3A3A3A", "c c #1F1F1F", " .... ", " .+@#$%&. ", " .*=--;>,'. ", " &=--)!;~{& ", ".]--^/(;>_:. ", ".#-//<(([_}. ", ".$;[(../[_|. ", ".%>;;((~_12. ", " &,~><)_13& ", " .4{___156. ", " .&:}|7&.... ", " .... 88.. ", " .90.. ", " .ab..", " .9c.", " .. "}; ================================================ FILE: OptolithiumGui/mpl-data/images/stock_zoom-out.xpm ================================================ /* XPM */ static char * stock_zoom_out_xpm[] = { "16 16 40 1", " c None", ". c #000000", "+ c #262626", "@ c #C5C5C5", "# c #EEEEEE", "$ c #EDEDED", "% c #ABABAB", "& c #464646", "* c #878787", "= c #F1F1F1", "- c #FEFEFE", "; c #FDFDFD", "> c #FCFCFC", ", c #EAEAEA", "' c #707070", ") c #FBFBFB", "! c #E8E8E8", "~ c #B0B0B0", "{ c #FFFFFF", "] c #FAFAFA", "^ c #A4A4A4", "/ c #050505", "( c #090909", "_ c #040404", ": c #242424", "< c #E5E5E5", "[ c #E4E4E4", "} c #F9F9F9", "| c #BABABA", "1 c #E7E7E7", "2 c #858585", "3 c #E3E3E3", "4 c #6D6D6D", "5 c #A1A1A1", "6 c #202020", "7 c #686868", "8 c #343434", "9 c #797979", "0 c #3A3A3A", "a c #1F1F1F", " .... ", " .+@#$%&. ", " .*=--;>,'. ", " &=----;)!& ", ".~--{--;>]^. ", ".#-//(__:]<. ", ".$;:_../:][. ", ".%>;;;>)]}|. ", " &,)>))]}1& ", " .2!]]]}34. ", " .&^<[5&.... ", " .... 66.. ", " .78.. ", " .90..", " .7a.", " .. "}; ================================================ FILE: OptolithiumGui/mpl-data/images/subplots.xpm ================================================ /* XPM */ static char * subplots_xpm[] = { "24 24 218 2", " c None", ". c #000000", "+ c #2C2C2C", "@ c #3B3B3B", "# c #004300", "$ c #007300", "% c #F2F2F2", "& c #F4F4F4", "* c #F3F3F3", "= c #F1F1F1", "- c #A9A9A9", "; c #3C583C", "> c #48D848", ", c #58DC58", "' c #479447", ") c #6F6F6F", "! c #ECECEC", "~ c #D8D8D8", "{ c #858585", "] c #3A3A3A", "^ c #CFCFCF", "/ c #B7B7B7", "( c #B9B9B9", "_ c #374037", ": c #3AC13A", "< c #62D562", "[ c #79DA79", "} c #5FD45F", "| c #2F5E2F", "1 c #BBBBBB", "2 c #C2C2C2", "3 c #C5C5C5", "4 c #161616", "5 c #393939", "6 c #CDCDCD", "7 c #A5A5A5", "8 c #808080", "9 c #383838", "0 c #202020", "a c #686868", "b c #D9D9D9", "c c #CACACA", "d c #A0A0A0", "e c #6686A5", "f c #518FCC", "g c #5694CF", "h c #5B98D1", "i c #609DD4", "j c #65A1D6", "k c #6AA6D9", "l c #6FAADB", "m c #75AFDE", "n c #7AB3E1", "o c #7FB8E3", "p c #91C3E8", "q c #A3CEED", "r c #CFE6F6", "s c #373737", "t c #C8C8C8", "u c #6888A6", "v c #5693CE", "w c #47759E", "x c #32506B", "y c #34526C", "z c #37546D", "A c #39576E", "B c #3C5970", "C c #3E5B71", "D c #7CA2BE", "E c #ADD4EF", "F c #A9D3EF", "G c #D2E8F7", "H c #353535", "I c #9A9A9A", "J c #303030", "K c #39526A", "L c #5A98D1", "M c #29435C", "N c #1F1F1F", "O c #2E2E2E", "P c #191919", "Q c #2A2D48", "R c #141414", "S c #242424", "T c #586B78", "U c #AED7F1", "V c #4D5860", "W c #5A5A5A", "X c #171717", "Y c #314E31", "Z c #32BA32", "` c #2C3F51", " . c #5F9CD3", ".. c #848484", "+. c #ACACAC", "@. c #656565", "#. c #6F7DA9", "$. c #565656", "%. c #AAAAAA", "&. c #999999", "*. c #0B0D0F", "=. c #B2DAF3", "-. c #3A6242", ";. c #44B144", ">. c #000900", ",. c #0C460C", "'. c #3ECD3E", "). c #5BCE5B", "!. c #2E4152", "~. c #64A0D6", "{. c #8D8D8D", "]. c #6A6A6A", "^. c #95AFCD", "/. c #5F5F5F", "(. c #A2A2A2", "_. c #B6DDF5", ":. c #47664F", "<. c #6EE16E", "[. c #0D930D", "}. c #002600", "|. c #001900", "1. c #0D9D0D", "2. c #52D252", "3. c #76D576", "4. c #2F4253", "5. c #69A4D8", "6. c #7F7F7F", "7. c #BAE1F7", "8. c #4B6753", "9. c #8FEA8F", "0. c #21A121", "a. c #00A600", "b. c #0C160C", "c. c #63D063", "d. c #314353", "e. c #6EA8DA", "f. c #FFFFFF", "g. c #BDE4F9", "h. c #37633F", "i. c #8BE98B", "j. c #0E5A0E", "k. c #4C4C4C", "l. c #308130", "m. c #324554", "n. c #89BAE2", "o. c #C0E6FA", "p. c #38593F", "q. c #457745", "r. c #333333", "s. c #B6B6B6", "t. c #6D6D6D", "u. c #5C768C", "v. c #8BBCE4", "w. c #191C1E", "x. c #181D1F", "y. c #C2E9FC", "z. c #95A4AB", "A. c #BFBFBF", "B. c #7C99B0", "C. c #8DBFE5", "D. c #92A6B5", "E. c #181C1E", "F. c #A0BECD", "G. c #C4ECFE", "H. c #E1F5FF", "I. c #EFEFEF", "J. c #7E9BB1", "K. c #8FC1E7", "L. c #C0DDF2", "M. c #C3E0F4", "N. c #C6E2F5", "O. c #C8E4F6", "P. c #C8E5F7", "Q. c #C8E6F8", "R. c #C8E8F9", "S. c #C7E9FB", "T. c #C7EBFC", "U. c #C6ECFE", "V. c #C4EDFF", "W. c #E0F5FF", "X. c #819DB2", "Y. c #92C4E9", "Z. c #BBDBF2", "`. c #4B575F", " + c #30383D", ".+ c #31393E", "++ c #323A3E", "@+ c #3B454A", "#+ c #A2BFCD", "$+ c #C8EDFE", "%+ c #C6EDFF", "&+ c #C2ECFF", "*+ c #DFF5FF", "=+ c #F0F0F0", "-+ c #B8B8B8", ";+ c #E7E7E7", ">+ c #4B554B", ",+ c #4FD34F", "'+ c #7BE87B", ")+ c #9BF09B", "!+ c #78E778", "~+ c #407040", "{+ c #8C8C8C", "]+ c #DADADA", "^+ c #DBDBDB", "/+ c #A8A8A8", "(+ c #385438", "_+ c #4DD64D", ":+ c #60DB60", "<+ c #459145", "[+ c #767676", "}+ c #DFDFDF", "|+ c #E0E0E0", "1+ c #E1E1E1", "2+ c #E2E2E2", "3+ c #0B0B0B", "4+ c #003900", "5+ c #017301", " ", " ", " . . ", " . + @ . . . . . # $ . . . . . . . . ", " + % & & * = - ; > , ' ) ! ! ! ~ ~ { . ", " ] ^ / ( ( ( _ : < [ } | { 1 1 2 3 3 4 ", " 5 6 7 8 8 8 9 0 0 0 0 + a 8 8 8 8 b . ", " 9 c d e f g h i j k l m n o p q r ! . ", " s t d u v h w x y z A B C D E F G ! . ", " H I J K L M N O P Q Q R + S T U V W . ", " X Y Z ` .. ..+.@.#.#.$.%.&.*.=.-.;.>. ", " . ,.'.).!.~.. {.%.].^.^./.+.(.. _.:.<.[.}. ", " |.1.2.3.4.5.. 6.6.6.6.6.6.6.6.. 7.8.9.0.a.. ", " b.;.c.d.e.. f.f.f.f.f.f.f.f.. g.h.i.j.. ", " N k.l.m.n.. f.f.f.f.f.f.f.f.. o.p.q.. ", " r.s.t.u.v.w.^ f.f.f.f.f.f.^ x.y.z.%.. ", " r.A.(.B.C.D.E.. . . . . . x.F.G.H.I.. ", " r.A.(.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.I.. ", " r.A.(.X.Y.Z.`. +.+.+++@+#+$+%+&+*+=+. ", " P A.-+;+f.f.>+,+'+)+!+~+/ f.f.f.f.=+. ", " . {+^ ]+]+^+/+(+_+:+<+[+}+|+|+1+1+2+. ", " 3+. . . . . . 4+5+. . . . . . . 9 . ", " . . ", " "}; ================================================ FILE: OptolithiumGui/mpl-data/images/zoom_to_rect.ppm ================================================ P6 24 24 255 ξܑTًOݠpeӠk߷ޑRȗԙ~a2ܖ^yעϊoTe։LФҤҥԪޮZѡӗ|`ZݘVۦ~խݿ߽ݺۺܫ۹Ȝ|ﺃأΈmUiْ[Ѷ޷ڲתگڣly^VّT޵ӵݍ՝ޟޙۓ،Ԅπ̓ҼI×T_Ŕؔ؈׵њpкۤӺߔ^LFDB:zҷٽݏ߱۞Ҵ׸ڊg\XSNGxзڲ׃ЖΒ̍ʈǃÅĤ٭~ʾoifb]X٧yȸtnlhdx֑Ϣծ۱ۭܰ٬آԨ޷ۤԡ՝Ѡӥҿϖږږږږږږږڗۗۗۗۗۗۗۗۊ ================================================ FILE: OptolithiumGui/mpl-data/images/zoom_to_rect.xpm ================================================ /* XPM */ static char *zoom_to_rect[] = { /* columns rows colors chars-per-pixel */ "24 24 241 2", " c #3A889D", ". c #428DA1", "X c #448DA3", "o c #468EA5", "O c #4790A3", "+ c #4E94A7", "@ c #4C91A8", "# c #5397AA", "$ c #589AAD", "% c #589CAC", "& c #5D9FAF", "* c #5C9CB0", "= c #5E9DB1", "- c #62A2B1", "; c #64A5B3", ": c #66A4B4", "> c #67A5B7", ", c #68A7B5", "< c #69A6B6", "1 c #6CA9B7", "2 c #6EABB9", "3 c #6FABB9", "4 c #74AFBC", "5 c #78B1BE", "6 c #78B2BC", "7 c #7AB3BF", "8 c #79BEC8", "9 c #7EC1CA", "0 c #D77F32", "q c #B78F5F", "w c #C39754", "e c #D6894C", "r c #D98B4F", "t c #D99154", "y c #DE9152", "u c #DC9154", "i c #D9925B", "p c #DC965E", "a c #DD9856", "s c #C89C7C", "d c #D19A70", "f c #DAA36C", "g c #DDA070", "h c #DBA67E", "j c #E0985A", "k c #E8A949", "l c #ECB556", "z c #EFBB5A", "x c #F3BD55", "c c #F4BC54", "v c #E5A165", "b c #E4AD69", "n c #EBAF6B", "m c #E8B365", "M c #EBB079", "N c #F4C05E", "B c #F4C061", "V c #F5C160", "C c #F6C56D", "Z c #F6C66F", "A c #F7C979", "S c #F7CA7C", "D c #F7CB7E", "F c #BCA88D", "G c #AFB9B8", "H c #83B9C3", "J c #85BCC4", "K c #88BCC7", "L c #8ABDC7", "P c #8DBFCA", "I c #91BFC9", "U c #80C3CC", "Y c #83C3CD", "T c #82C4CF", "R c #84C5CF", "E c #8AC7D1", "W c #88C9D5", "Q c #8ACBD7", "! c #8DC8D1", "~ c #8CCAD4", "^ c #8DCBD5", "/ c #8FCAD4", "( c #92C1CC", ") c #91C5CF", "_ c #96C4CE", "` c #99C4C5", "' c #97C5D0", "] c #93C8D2", "[ c #94CDD7", "{ c #93CED8", "} c #97C9DE", "| c #94CED8", " . c #97CFD8", ".. c #9DCAD1", "X. c #9ECAD2", "o. c #9FCBD3", "O. c #96D0DA", "+. c #97D1DB", "@. c #99D1DB", "#. c #98D2DC", "$. c #9DD4DE", "%. c #9ED4DE", "&. c #9FD5E0", "*. c #A1C8D1", "=. c #A0CAD3", "-. c #A3CAD2", ";. c #A1CBD4", ":. c #A1CCD5", ">. c #A2CCD4", ",. c #A2CDD5", "<. c #A4CAD2", "1. c #A4CBD2", "2. c #A4CBD3", "3. c #A7CBD3", "4. c #A5CBD4", "5. c #A5CCD2", "6. c #A4CCD4", "7. c #A4CCD5", "8. c #A8C9D0", "9. c #A9CAD0", "0. c #AACAD0", "q. c #A9CBD5", "w. c #A8CDD4", "e. c #A4D1D7", "r. c #A7D0D9", "t. c #ADD0D4", "y. c #AAD1D9", "u. c #AAD1DA", "i. c #ABD2DB", "p. c #ACD3D8", "a. c #ADD5D9", "s. c #ACD4DB", "d. c #AED5DB", "f. c #ADD4DD", "g. c #B4CCD6", "h. c #B5CFD6", "j. c #B2D3D7", "k. c #B2D4D7", "l. c #B4D4D7", "z. c #B0D6DB", "x. c #B1D7DB", "c. c #B1D7DC", "v. c #B7D1DB", "b. c #B7D6D9", "n. c #B7D6DA", "m. c #B5D6DD", "M. c #B1D8DB", "N. c #B6D8DF", "B. c #B7DADF", "V. c #B9D0D8", "C. c #B9D1D9", "Z. c #B8D6DA", "A. c #BAD7DB", "S. c #BAD7DC", "D. c #BAD9DE", "F. c #BDD9DD", "G. c #BEDADE", "H. c #BFD7E0", "J. c #B8DBE0", "K. c #BBDCE1", "L. c #BFDCE0", "P. c #BEDEE3", "I. c #BEDFE3", "U. c #BFDFE4", "Y. c #DEAE87", "T. c #DEB597", "R. c #DFB797", "E. c #EFBA83", "W. c #F8CE88", "Q. c #F8CF8A", "!. c #F4C897", "~. c #F9D397", "^. c #F9D499", "/. c #E2C0A5", "(. c #E2CEBE", "). c #F6D1A1", "_. c #F8D3A0", "`. c #F9D7A2", "'. c #FAD8A3", "]. c #C0DBDF", "[. c #C1DBDF", "{. c #C1D8E1", "}. c #C2DCE1", "|. c #C6DEE2", " X c #C6DEE3", ".X c #C9D8E3", "XX c #C9D9E5", "oX c #C9D9E6", "OX c #C8DFE3", "+X c #CAD9E9", "@X c #CDDBE9", "#X c #CEDBE9", "$X c #CFDCE9", "%X c #D4DEE7", "&X c #D0DCE9", "*X c #D0DDE9", "=X c #D1DDE9", "-X c #D2DDE8", ";X c #D5DFE9", ":X c #C1E0E5", ">X c #C4E2E7", ",X c #C5E3E7", "XOX>X}.F.B.k.i.G f A N l t R.lXcXcXcX", "cX&X4.m.~ &.e.%.#.{ Q R 9 ] F k w q ` { { ~ cXcX", "kX.Xf.}.{ aXbXaXrX7X1X}.L.e.l.d hXBXBXBXBX#.cXcX", "&X9.A.}. .aXbXsXrX7X1X}.J.x.4.yXBXBXBXBXBX#.cXcX", "$X4.A.[.[ rXaX= @ o X . 7 o.iXBXBXBXBXBX#.cXcX", "$X*.b.F.^ 7X8X8X7X2X>XI.J.x.X.iXBXBXBXBXBX#.cXcX", "&X<.l.Z.E 4X4X> * $ + + O 6 ;.iXBXBXBXBXBX#.cXcX", "&X9.b.k.U : - & % L {.mXBXBXBXBXBX#.cXcX", "cX%XV.i.8 D.D.4 2 1 , ; 6 ( wXBXBXBXBXBXBX#.cXcX", "cXcX&Xg.] ;.z.M.x.a.p.4.3.5XNXBXBXBXBXBXBX#.cXcX", "cXcXcX9X} S.;.;.X.*.<.F.uXNXBXBXBXBXBXBXBX#.cXcX", "cXcXcXcXE nXiXiXyXiXiXmXBXBXBXBXBXBXBXBXBX#.cXcX", "cXcXcXcXU +.+.+.+.+.+.+.{ +.+.+.+.+.+.+.+.Q cXcX", "cXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcX", "cXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcXcX" }; ================================================ FILE: OptolithiumGui/mpl-data/lineprops.glade ================================================ True Line Properties GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False True False False GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True True False 0 True GTK_BUTTONBOX_END True True True gtk-cancel True GTK_RELIEF_NORMAL True -6 True True True gtk-ok True GTK_RELIEF_NORMAL True -5 0 False True GTK_PACK_END True False 0 True 0 True True True 0 0.5 GTK_SHADOW_NONE True 0.5 0.5 1 1 0 0 12 0 True False 0 True 2 3 False 0 0 True Marker False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 0 1 1 2 fill True 1 2 0 1 fill True 1 2 1 2 fill fill True True True Line color True 2 3 0 1 fill True True False Marker color True 2 3 1 2 fill True Line style False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 0 1 0 1 fill 0 True True True <b>Line properties</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 label_item 0 True True 0 True True ================================================ FILE: OptolithiumGui/options/__init__.py ================================================ # -*- coding: utf-8 -*- # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com from options.structures import Options, OptionsLoadErrors from options.common import Abstract, Variable, Numeric, Enum __author__ = 'Alexei Gladkikh' ================================================ FILE: OptolithiumGui/options/common.py ================================================ # -*- coding: utf-8 -*- # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import logging as module_logging from database.base import SignalsMeta, Float, Integer, String import helpers __author__ = 'Alexei Gladkikh' logging = module_logging.getLogger(__name__) logging.setLevel(module_logging.INFO) helpers.logStreamEnable(logging) class ReportTemplates(object): header = ( """ %(body)s
%(name)s
""" ) value = ( """ %(name)s %(value)s """ ) subvalue = ( """
%(name)s
%(value)s """ ) composite = ( """ %s """ ) class Abstract(object): key = "value" def __init__(self, dtype): self.__dtype = dtype() self.__values = {None: self} def __get__(self, instance, owner): if instance not in self.__values: raise KeyError("Value of %s [%s] hasn't set yet" % (instance.name, owner)) return self.__values[instance] def __set__(self, instance, value): real_type = self.__dtype.python_type if not isinstance(value, real_type): raise TypeError("Option value of %s can be assigned only to %s type value (input is %s)" % (instance.name, real_type.__name__, type(value).__name__)) if instance not in self.__values or self.__values[instance] != value: # previous = "Undefined" if instance not in self.__values else self.__values[instance] # logging.info("%s.%s: %s -> %s" % (instance.name, self.key, previous, value)) self.__values[instance] = value instance.signals[Abstract].emit() @staticmethod def get_concrete(instance): """:rtype: Abstract""" return getattr(instance.__class__, Abstract.key) @property def type(self): return self.__dtype class Enum(Abstract): def __init__(self, variants, raise_constraint=True): """ :param list of string variants: List of the possible value for enumeration :param bool raise_constraint: If True - then exception will be raised if try to set value not from variants """ super(Enum, self).__init__(dtype=String) if not isinstance(variants, list): raise TypeError("Variants input parameter must be list of the acceptable values") if not all([isinstance(v, basestring) for v in variants]): raise TypeError("Each variants member must be string type") self.__raise_constraint = raise_constraint self.__variants = variants def __set__(self, instance, value): if not isinstance(value, basestring): raise TypeError("Value input parameter must be string") if value not in self.__variants: if self.__raise_constraint: raise ValueError("Enumeration of %s set to value not in possible list: %s" % (instance.name, value)) super(Enum, self).__set__(instance, value) @property def variants(self): return self.__variants class Numeric(Abstract): orm_cast = { float: Float, int: Integer, long: Integer } def __init__(self, vmin=None, vmax=None, dtype=float, precision=None, raise_constraint=False): if dtype not in Numeric.orm_cast: raise TypeError("Numeric class only support the next types: int, float! Input value is %s" % dtype.__name__) super(Numeric, self).__init__(dtype=Numeric.orm_cast[dtype]) self.__raise_constraint = raise_constraint self.__precision = precision if vmin is not None: if type(vmin) != dtype: raise TypeError("Minimum value type must be identical to value type") self.__min_value = vmin else: self.__min_value = None if vmax is not None: if type(vmax) != dtype: raise TypeError("Maximum value type must be identical to value type") self.__max_value = vmax else: self.__max_value = None @property def min(self): return self.__min_value @property def max(self): return self.__max_value @property def precision(self): return self.__precision def higher_max(self, value): return self.max is not None and value > self.max def lower_min(self, value): return self.min is not None and value < self.min def within_constraint(self, value): return not self.higher_max(value) and not self.lower_min(value) def __set__(self, instance, value): if self.__raise_constraint and not self.within_constraint(value): raise ValueError("Numeric of %s set to the outside constraint value: %s" % (instance.name, value)) if self.higher_max(value): value = self.max elif self.lower_min(value): value = self.min if type(value) == float and self.__precision is not None: value = round(value, self.__precision) super(Numeric, self).__set__(instance, value) class AttributedProperty(property): def __init__(self, fget=None, fset=None, fdel=None, doc=None, **kwargs): super(AttributedProperty, self).__init__(fget, fset, fdel, doc) self.key = kwargs.pop("key") self.type = kwargs.pop("dtype")() self.precision = kwargs.pop("precision", None) if kwargs: raise NotImplementedError("The next attributes is unimplemented: %s" % kwargs) class Variable(object): SignalsClass = SignalsMeta.CreateSignalsClass("SignalsClass", [Abstract.key]) value = None count = 0 def __init__(self, ftype, value=None, name=None): """ :param str or None name: Object name :param value: Initial options value :param name: Option name """ self.__name = "%s_%d" % (Variable.__name__, Variable.count) if name is None else name self.__signals = Variable.SignalsClass(self) if value is not None: self.value = value Variable.count += 1 @property def name(self): return self.__name @property def signals(self): return self.__signals def __new__(cls, ftype, *args, **kwargs): class_ = type(cls.__name__, (cls, ), {"value": ftype}) return object.__new__(class_) def report(self): return ReportTemplates.value % {"name": self.name, "value": self.value} ================================================ FILE: OptolithiumGui/options/structures.py ================================================ # -*- coding: utf-8 -*- # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import bson import os import numpy import logging as module_logging from pcpi import PluginNotFoundError from resources import Resources from options.common import Abstract, Variable, Numeric, Enum, ReportTemplates, AttributedProperty from qt import QtCore, connect, Slot, disconnect, Signal, GlobalSignals from database import orm from metrics import VARIATE_HEIGHT_FALSE, VARIATE_HEIGHT_TRUE, MASK_CLEAR, MASK_OPAQUE import config import helpers import optolithiumc as oplc __author__ = 'Alexei Gladkikh' logging = module_logging.getLogger(__name__) logging.setLevel(module_logging.DEBUG) helpers.logStreamEnable(logging) PARAMETRIC_NAME = "Parametric" RESIST_TYPE = "Resist" LAYER_TYPE = "Layer" SUBSTRATE_TYPE = "Substrate" def get_field(p_object, abstract_field): if hasattr(abstract_field, "get_concrete"): return abstract_field.get_concrete(p_object) else: return abstract_field class OptionsLoadErrors(Exception): def __init__(self, errors, p_object): self.errors = errors self.p_object = p_object def __iter__(self): return self.errors.__iter__() class OptionsParseError(Exception): pass class AbstractReportOption(object): icon = None @property def identifier(self): return self.__class__.__name__ def report_header(self): return ReportTemplates.header % {"icon": Resources(self.icon, "url"), "name": self.identifier, "body": "%s"} def report(self): raise NotImplementedError class AbstractOptionsBase(QtCore.QObject, AbstractReportOption): changed = Signal() def __init__(self, *args, **kwargs): super(AbstractOptionsBase, self).__init__(*args, **kwargs) self.__saved = True self.__simulated = True def _connect_signals(self): for var in self.__dict__.values(): if isinstance(var, Variable): connect(var.signals[Abstract], self.onOptionChanged) connect(self.changed, GlobalSignals.onChanged) def _set_composite_variable(self, name, value): vname = "_%s__%s" % (self.__class__.__name__, name) if getattr(self, vname) is not None: for variable in getattr(self, vname).variables: # print(variable.signals[Abstract]) disconnect(variable.signals[Abstract], self.onOptionChanged) setattr(self, vname, value) if value is not None: for variable in getattr(self, vname).variables: connect(variable.signals[Abstract], self.onOptionChanged) self.onOptionChanged() # noinspection PyPep8Naming @Slot() def onOptionChanged(self): # emit_required = self.__saved or self.__simulated # sender_str = " by %s" % self.sender() if self.sender() else "" # logging.info("Options <%s> has been changed (saved = %s simulated = %s)%s" % # (self.identifier, self.__saved, self.__simulated, sender_str)) self.__saved = False self.__simulated = False # if emit_required: self.changed.emit() @property def is_saved(self): return self.__saved @property def is_simulated(self): return self.__simulated def saved(self, emit=True): # logging.info("Save options, emit = %s" % emit) self.__saved = True if emit: self.changed.emit() def simulated(self): self.__simulated = True # if emit: # self.changed.emit() @classmethod def default(cls): raise NotImplementedError @classmethod def empty(cls): raise NotImplementedError @classmethod def load(cls, data): raise NotImplementedError def assign(self, other): """:type other: AbstractOptionsBase""" self.__saved = other.__saved self.__simulated = other.__simulated def export(self): raise NotImplementedError class Numerics(AbstractOptionsBase): icon = "icons/Numerics" scalar = "Scalar" vector = "Vector" def __init__(self, model, speed, grid_xy, grid_z): super(Numerics, self).__init__() self.calculation_model = Variable( Enum(variants=[Numerics.scalar, Numerics.vector]), value=model, name="Model") self.speed_factor = Variable( Numeric(vmin=0, vmax=10, dtype=int), value=speed, name="SpeedFactor") self.grid_xy = Variable( Numeric(vmin=1.0, vmax=50.0, dtype=float, precision=1), value=grid_xy, name="GridXY") self.grid_z = Variable( Numeric(vmin=1.0, vmax=50.0, dtype=float, precision=1), value=grid_z, name="GridZ") self._connect_signals() @property def source_stepxy(self): return config.SOURCE_SHAPE_STEP_MAP[self.speed_factor.value] def assign(self, other): """:type other: Numerics""" self.calculation_model.value = other.calculation_model.value self.speed_factor.value = other.speed_factor.value self.grid_xy.value = other.grid_xy.value self.grid_z.value = other.grid_z.value @classmethod def default(cls): return cls(model=Numerics.scalar, speed=5, grid_xy=5.0, grid_z=5.0) @classmethod def empty(cls): return cls(model=None, speed=None, grid_xy=None, grid_z=None) @classmethod def load(cls, data): return cls.empty().parse(data) def report(self): template = self.report_header() body = "\n".join([ self.calculation_model.report(), self.speed_factor.report(), self.grid_xy.report(), self.grid_z.report() ]) return template % body def export(self): return { self.calculation_model.name: self.calculation_model.value, self.speed_factor.name: self.speed_factor.value, self.grid_xy.name: self.grid_xy.value, self.grid_z.name: self.grid_z.value } def parse(self, data): """:type data: dict""" self.calculation_model.value = data[self.calculation_model.name] self.speed_factor.value = data[self.speed_factor.name] self.grid_xy.value = data[self.grid_xy.name] self.grid_z.value = data[self.grid_z.name] return self class WaferStackLayer(AbstractReportOption): def __init__(self, material, is_parametric=False): """ :type material: orm.Generic :type is_parametric: bool """ self._material = material self._is_parametric = is_parametric def connect_with(self, slot): raise NotImplementedError def disconnect_from(self, slot): raise NotImplementedError @property def is_parametric(self): return self._is_parametric @staticmethod def _create_parametric_material(wavelength, real, imag): """ :type wavelength: float :type real: float :type imag: float """ material = orm.Material( name=PARAMETRIC_NAME, data=[orm.MaterialData(wavelength=wavelength, real=real, imag=imag)], desc="Parametric material n=%.2f k=+%.2fi @ %.0f nm" % (real, imag, wavelength)) return material @classmethod def default_parametric(cls, wavelength): """:rtype: WaferStackLayer""" raise NotImplementedError @classmethod def db_stored(cls, material, *args): """ :type material: orm.Material :rtype: WaferStackLayer """ raise NotImplementedError @property def wavelength(self): """:rtype: list of float""" raise NotImplementedError @property def refraction(self): """ :return: Refractive index real, image lists :rtype: list of float, list of float """ raise NotImplementedError @property def type(self): """:rtype: str""" raise NotImplementedError def refraction_at(self, wavelength): wvl = self.wavelength real, imag = self.refraction re = numpy.interp(wavelength, wvl, real) im = numpy.interp(wavelength, wvl, imag) return re, im def export(self): raise NotImplementedError @classmethod def load(cls, data): raise NotImplementedError def convert2core(self): raise NotImplementedError class MaterialLayer(WaferStackLayer): """Class describe wafer stack layer which has predefined material data (for example Substrate)""" icon = "icons/Material" SignalsClass = orm.SignalsMeta.CreateSignalsClass("MaterialLayer", ["real", "imag"], db_columns=False) def __init__(self, material, is_parametric=False): """ :type material: orm.Material :type is_parametric: bool """ self.__signals = self.__class__.SignalsClass(self) WaferStackLayer.__init__(self, material, is_parametric) def connect_with(self, slot): if self.is_parametric: connect(self.signals[MaterialLayer.real], slot) connect(self.signals[MaterialLayer.imag], slot) def disconnect_from(self, slot): if self.is_parametric: disconnect(self.signals[MaterialLayer.real], slot) disconnect(self.signals[MaterialLayer.imag], slot) @property def signals(self): return self.__signals @property def name(self): return self._material.name @property def wavelength(self): """:rtype: list of float""" return [d.wavelength for d in self._material.data] @property def refraction(self): """ :return: Refractive index real, image lists :rtype: list of float, list of float """ return zip(*self._material.data) # ------------------------------------------------------------------------------------------------------------------ # These refraction properties are only appropriate for parametric object # where only one material data item is contained in the material data list. _real_error_string = "Property 'real' is only available for parametric object" def _get_real(self): if not self.is_parametric: raise NotImplementedError(self._real_error_string) return self._material.data[0].real def _set_real(self, value): if not self.is_parametric: raise NotImplementedError(self._real_error_string) if self._material.data[0].real != value: self._material.data[0].real = value self.signals[MaterialLayer.real].emit() real = AttributedProperty( _get_real, _set_real, key="real", dtype=orm.Float, precision=orm.MaterialData.real.precision) _imag_error_string = "Property 'imag' is only available for parametric object" def _get_imag(self): if not self.is_parametric: raise NotImplementedError(self._imag_error_string) return self._material.data[0].imag def _set_imag(self, value): if not self.is_parametric: raise NotImplementedError(self._imag_error_string) if self._material.data[0].imag != value: self._material.data[0].imag = value self.signals[MaterialLayer.imag].emit() imag = AttributedProperty( _get_imag, _set_imag, key="imag", dtype=orm.Float, precision=orm.MaterialData.imag.precision) def export(self): return { "Type": self.type, "Parametric": self.is_parametric, "Material": self._material.export() } @classmethod def load(cls, data): """:type data: dict""" return cls(orm.Material.load(data["Material"]), data["Parametric"]) class Substrate(MaterialLayer): @classmethod def parametric(cls, wavelength, real, imag): """ :type wavelength: float :type real: float :type imag: float """ material = MaterialLayer._create_parametric_material(wavelength, real, imag) return cls(material, is_parametric=True) @classmethod def default_parametric(cls, wavelength): """ :type wavelength: float :rtype: Substrate """ return cls.parametric( wavelength, config.DEFAULT_LAYER_REAL_INDEX, config.DEFAULT_LAYER_IMAG_INDEX) @classmethod def db_stored(cls, material, *args): """ :type material: orm.Material :rtype: Substrate """ return cls(material) @property def type(self): return SUBSTRATE_TYPE def report(self): body = [ ReportTemplates.value % {"name": "Name", "value": "%(order)d:" + self._material.name}, ReportTemplates.value % {"name": "Refractive", "value": "%(index)s"}, ] template = self.report_header() return template % "\n".join(body) def convert2core(self): real, imag = self.refraction[0], self.refraction[1] if len(self.wavelength) > 1: return oplc.StandardWaferLayer( oplc.SUBSTRATE_LAYER, numpy.asfortranarray(self.wavelength), numpy.asfortranarray(real), numpy.asfortranarray(imag)) else: return oplc.ConstantWaferLayer(oplc.SUBSTRATE_LAYER, real[0], imag[0]) class StandardLayer(MaterialLayer): """Class describe wafer stack layer that has both a predefined material and thickness""" SignalsClass = orm.SignalsMeta.CreateSignalsClass("StandardLayer", ["real", "imag", "thickness"], db_columns=False) def __init__(self, material, thickness, is_parametric=False): """ :type material: orm.Material :type thickness: float :type is_parametric: bool """ MaterialLayer.__init__(self, material, is_parametric) self._thickness = Variable(Numeric(vmin=0.0, vmax=10000.0, precision=1), value=thickness, name="Thickness") def connect_with(self, slot): super(StandardLayer, self).connect_with(slot) connect(self.signals[StandardLayer.thickness], slot) def disconnect_from(self, slot): super(StandardLayer, self).disconnect_from(slot) disconnect(self.signals[StandardLayer.thickness], slot) @classmethod def parametric(cls, wavelength, real, imag, thickness): """ :type wavelength: float :type real: float :type imag: float :type thickness: float """ material = MaterialLayer._create_parametric_material(wavelength, real, imag) return cls(material, thickness, is_parametric=True) @classmethod def default_parametric(cls, wavelength): """ :type wavelength: float :rtype: StandardLayer """ return cls.parametric( wavelength, config.DEFAULT_LAYER_REAL_INDEX, config.DEFAULT_LAYER_IMAG_INDEX, config.DEFAULT_LAYER_THICKNESS) @classmethod def db_stored(cls, material, *args): """ :type material: orm.Material :rtype: StandardLayer """ thickness = args[0] return cls(material, thickness) def _get_thickness(self): return self._thickness.value def _set_thickness(self, value): if self._thickness.value != value: self._thickness.value = value self.signals[StandardLayer.thickness].emit() thickness = AttributedProperty(_get_thickness, _set_thickness, key="thickness", dtype=orm.Float) @property def type(self): return LAYER_TYPE def export(self): result = super(StandardLayer, self).export() result.update({"Thickness": self.thickness}) return result @classmethod def load(cls, data): """:type data: dict""" return cls( material=orm.Material.load(data["Material"]), thickness=data["Thickness"], is_parametric=data["Parametric"]) def report(self): body = [ ReportTemplates.value % {"name": "Name", "value": "%(order)d:" + self._material.name}, ReportTemplates.value % {"name": "Thickness", "value": self.thickness}, ReportTemplates.value % {"name": "Refractive", "value": "%(index)s"}, ] template = self.report_header() return template % "\n".join(body) def convert2core(self): real, imag = self.refraction[0], self.refraction[1] if len(self.wavelength) > 1: return oplc.StandardWaferLayer( oplc.SUBSTRATE_LAYER, self.thickness, numpy.asfortranarray(self.wavelength), numpy.asfortranarray(real), numpy.asfortranarray(imag)) else: return oplc.ConstantWaferLayer(oplc.SUBSTRATE_LAYER, self.thickness, real[0], imag[0]) class Resist(AbstractOptionsBase, StandardLayer): """Class redefined from database material to resist""" icon = "icons/Resist" def __init__(self, material, thickness): """ :type material: orm.Resist :type thickness: float """ AbstractOptionsBase.__init__(self) StandardLayer.__init__(self, material, thickness) def connect_with(self, slot): super(Resist, self).connect_with(slot) connect(self._material.peb.signals[orm.PebParameters.ea], slot) connect(self._material.peb.signals[orm.PebParameters.ln_ar], slot) connect(self._material.exposure.signals[orm.ExposureParameters.wavelength], slot) connect(self._material.exposure.signals[orm.ExposureParameters.a], slot) connect(self._material.exposure.signals[orm.ExposureParameters.b], slot) connect(self._material.exposure.signals[orm.ExposureParameters.c], slot) connect(self._material.exposure.signals[orm.ExposureParameters.n], slot) if isinstance(self._material.developer, orm.DeveloperExpr): for obj in self._material.developer.object_values: connect(obj.signals[orm.DeveloperExprArgValue.value], slot) def disconnect_from(self, slot): super(Resist, self).disconnect_from(slot) disconnect(self._material.peb.signals[orm.PebParameters.ea], slot) disconnect(self._material.peb.signals[orm.PebParameters.ln_ar], slot) disconnect(self._material.exposure.signals[orm.ExposureParameters.wavelength], slot) disconnect(self._material.exposure.signals[orm.ExposureParameters.a], slot) disconnect(self._material.exposure.signals[orm.ExposureParameters.b], slot) disconnect(self._material.exposure.signals[orm.ExposureParameters.c], slot) disconnect(self._material.exposure.signals[orm.ExposureParameters.n], slot) if isinstance(self._material.developer, orm.DeveloperExpr): for obj in self._material.developer.object_values: disconnect(obj.signals[orm.DeveloperExprArgValue.value], slot) @classmethod def default_parametric(cls, wavelength): raise NotImplementedError @classmethod def db_stored(cls, material, *args): raise NotImplementedError @property def db(self): """:rtype: orm.Resist""" return self._material @property def name(self): return self._material.name @name.setter def name(self, value): self._material.name = value self.onOptionChanged() @property def exposure(self): """:rtype: orm.ExposureParameters""" return self._material.exposure @property def peb(self): """:rtype: orm.PebParameters""" return self._material.peb @property def developer(self): """:rtype: orm.DeveloperInterface""" return self._material.developer @developer.setter def developer(self, value): """:type value: orm.DeveloperInterface""" if self._material.developer is not value: self._material.developer = value self.onOptionChanged() @property def wavelength(self): """:rtype: list of float""" # Because refraction of the resist changes linear depend on wavelength so list of refractions and # wavelengths return to refraction_at method automatically calculate it. return [0.0, self._material.exposure.wavelength] @property def refraction(self): """ :return: Refractive index real, image lists :rtype: list of float, list of float """ re = self._material.exposure.n # k = w/4/pi*(A+B)/1000 ab = (self._material.exposure.a + self._material.exposure.b)*1e-3 im = self._material.exposure.wavelength/4.0/numpy.pi * ab return [re, re], [0.0, im] @property def type(self): return RESIST_TYPE def report(self): body = [ ReportTemplates.value % {"name": "Name", "value": self._material.name}, ReportTemplates.value % {"name": "Thickness", "value": self.thickness}, ReportTemplates.value % {"name": "Exposure", "value": ""}, ReportTemplates.subvalue % {"name": "Wavelength", "value": self._material.exposure.wavelength}, ReportTemplates.subvalue % {"name": "Refractive", "value": self._material.exposure.n}, ReportTemplates.subvalue % {"name": "Dill A", "value": self._material.exposure.a}, ReportTemplates.subvalue % {"name": "Dill B", "value": self._material.exposure.b}, ReportTemplates.subvalue % {"name": "Dill C", "value": self._material.exposure.c}, ReportTemplates.value % {"name": "Post Exposure Bake", "value": ""}, ReportTemplates.subvalue % {"name": "Ln(Ar)", "value": self._material.peb.ln_ar}, ReportTemplates.subvalue % {"name": "Ea", "value": self._material.peb.ea}, ReportTemplates.value % {"name": "Development", "value": ""}, ] if isinstance(self._material.developer, orm.DeveloperExpr): body.append(ReportTemplates.subvalue % {"name": "Developer", "value": self._material.developer.name}) for arg, value in zip(self._material.developer.model.args, self._material.developer.values): body.append(ReportTemplates.subvalue % {"name": arg.name, "value": value}) elif isinstance(self._material.developer, orm.DeveloperSheet): body.append(ReportTemplates.subvalue % {"name": "Developer", "value": self._material.developer.name}) else: body.append(ReportTemplates.subvalue % {"name": "Developer", "value": "Undefined"}) template = self.report_header() return template % "\n".join(body) def assign(self, other): """:type other: Resist""" self.thickness = other.thickness self._material.assign(other._material) self.onOptionChanged() def export(self): return { "Type": self.type, "Thickness": self.thickness, "Material": self._material.export() } @classmethod def load(cls, data): """:type data: dict""" return cls(material=orm.Resist.load(data["Material"]), thickness=data["Thickness"]) def parse(self, data): """:type data: dict""" self._material.parse(data["Material"]) self.thickness = data["Thickness"] def convert2core(self): exposure = self._material.exposure.convert2core() peb = self._material.peb.convert2core() developer = self._material.developer.convert2core() return oplc.ResistWaferLayer(self.thickness, exposure, peb, developer) class WaferProcess(AbstractOptionsBase): icon = "icons/WaferStack" _resist_key = 0 _substrate_key = -1 def __init__(self, stack_layers=None): """ :type stack_layers: list of WaferStackLayer or None """ super(WaferProcess, self).__init__() self._stack = list() """:type: list of WaferStackLayer""" if stack_layers is not None: for layer in stack_layers: if not isinstance(layer, WaferStackLayer): raise TypeError("Value must be WaferStackLayer") layer.connect_with(self.onOptionChanged) self._stack.append(layer) self.imaging_tool = None """:type: ImagingTool""" connect(self.changed, GlobalSignals.onChanged) def insert(self, index, stack_layer): """ :type index: int :type stack_layer: WaferStackLayer """ if not isinstance(stack_layer, WaferStackLayer): raise TypeError("Value must be WaferStackLayer") stack_layer.connect_with(self.onOptionChanged) self._stack.insert(index, stack_layer) self.onOptionChanged() def remove(self, index): """:type index: int""" self._stack[index].disconnect_from(self.onOptionChanged) del self._stack[index] self.onOptionChanged() def __iter__(self): return self._stack.__iter__() def __setitem__(self, key, value): """ :type key: int :type value: WaferStackLayer """ if not isinstance(value, WaferStackLayer): raise TypeError("Value must be WaferStackLayer") # if key in self._stack: # self._link_layer(self._stack[key], action=disconnect) # self._stack[key] = value if key == WaferProcess._resist_key: self._stack[key] = value else: self.remove(key) self.insert(key, value) self.onOptionChanged() def __getitem__(self, item): """ :type item: int :rtype: WaferStackLayer """ return self._stack[item] def __len__(self): """:rtype: int""" return len(self._stack) @property def resist(self): """:rtype: Resist""" return self[WaferProcess._resist_key] @resist.setter def resist(self, value): """:type value: Resist""" if self.resist is not value: self.resist.disconnect_from(self.onOptionChanged) if WaferProcess._resist_key in self: # noinspection PyUnresolvedReferences disconnect(self[WaferProcess._resist_key].changed, self.onOptionChanged) self[WaferProcess._resist_key] = value # noinspection PyUnresolvedReferences connect(self[WaferProcess._resist_key].changed, self.onOptionChanged) self.resist.connect_with(self.onOptionChanged) @property def substrate(self): """:rtype: Substrate""" return self[WaferProcess._substrate_key] @staticmethod def _create_default_substrate(): substrate = orm.Material( name=config.DEFAULT_SUBSTRATE_MATERIAL_NAME, data=[orm.MaterialData(wavelength=362.5, real=6.308, imag=2.88)], desc="Default substrate material, n=6.308+2.88i @ 362.5 nm") return substrate @staticmethod def _create_default_devrate(): dev_rate = orm.DeveloperSheet( name=config.DEFAULT_DEV_RATE_NAME, is_depth=False, data=[orm.DeveloperSheetData(pac=0.0, rate=100.0), orm.DeveloperSheetData(pac=0.3, rate=90.0), orm.DeveloperSheetData(pac=0.7, rate=10.0), orm.DeveloperSheetData(pac=1.0, rate=0.1)], desc="Default development rate data") return dev_rate @staticmethod def _create_default_resist(): exposure = orm.ExposureParameters(wavelength=365.0, a=0.5, b=0.5, c=0.01, n=1.5) peb = orm.PebParameters(ea=30.0, ln_ar=40.0) dev_rate = WaferProcess._create_default_devrate() resist = orm.Resist( name=config.DEFAULT_RESIST_NAME, comment="Default resist data", exposure=exposure, peb=peb, developer=dev_rate) return resist # noinspection PyMethodOverriding @classmethod def default(cls): """:rtype: WaferProcess""" resist = Resist(WaferProcess._create_default_resist(), config.DEFAULT_LAYER_THICKNESS) substrate = Substrate(WaferProcess._create_default_substrate()) return cls([resist, substrate]) @classmethod def empty(cls): return cls() @classmethod def load(cls, data): stack_layers = [] for layer_data in data: if layer_data["Type"] == RESIST_TYPE: layer = Resist.load(layer_data) elif layer_data["Type"] == LAYER_TYPE: layer = StandardLayer.load(layer_data) elif layer_data["Type"] == SUBSTRATE_TYPE: layer = Substrate.load(layer_data) else: raise KeyError("Unknown layer type: %s" % layer_data["Type"]) stack_layers.append(layer) return cls(stack_layers=stack_layers) def __del__(self): # FIXME: This is workaround for strange error when exit: _stack not found in wafer_process pass def saved(self, emit=True): self.resist.saved(emit=False) super(WaferProcess, self).saved(emit) def report(self): template = self.report_header() body = "\n".join( [ReportTemplates.composite % layer.report() % { "order": len(self._stack)-order-1, # "index": "%.2f%+.2fi" % layer.refraction_at(self.resist.material.exposure.wavelength) "index": "%.2f%+.2fi" % layer.refraction_at(self.resist.exposure.wavelength) } for order, layer in enumerate(self._stack) if not isinstance(layer, Resist)]) return template % body def export(self): return [layer.export() for layer in self._stack] def assign(self, other): """:type other: WaferProcess""" # Delete all layers except the resist (first layer) while len(self) != 1: self.remove(-1) for layer in other: if isinstance(layer, Resist): self.resist.assign(layer) else: layer.connect_with(self.onOptionChanged) self._stack.append(layer) def parse(self, data): """:type data: dict""" stack_layers = [] # Delete all layers except the resist (first layer) while len(self) != 1: self.remove(-1) for layer_data in data: if layer_data["Type"] == RESIST_TYPE: # self.resist.parse(layer_data) self.resist = Resist.load(layer_data) elif layer_data["Type"] == LAYER_TYPE: stack_layers.append(StandardLayer.load(layer_data)) elif layer_data["Type"] == SUBSTRATE_TYPE: stack_layers.append(Substrate.load(layer_data)) # self._stack[WaferProcess._resist_key+1:] = stack_layers for layer in stack_layers: layer.connect_with(self.onOptionChanged) self._stack.append(layer) def convert2core(self): result = oplc.WaferStack() for wafer_layer in reversed(self): result.push(wafer_layer.convert2core()) nenv = self.imaging_tool.immersion.value if self.imaging_tool.immersion_enabled else oplc.air_nk.real core_env_layer = oplc.ConstantWaferLayer(oplc.ENVIRONMENT_LAYER, nenv, 0.0) result.push(core_env_layer) return result class Mask(AbstractOptionsBase): icon = "icons/Mask" mask_type_map = {0: "1D", 1: "2D"} def __init__(self, container): """:type container: orm.Mask | orm.ConcretePluginMask""" super(Mask, self).__init__() self.__container = None self.container = container self._connect_signals() @property def container(self): return self.__container @container.setter def container(self, value): if self.__container is not value: if self.__container is not None: disconnect(self.__container.signals[orm.Mask.background], self.onOptionChanged) disconnect(self.__container.signals[orm.Mask.phase], self.onOptionChanged) self._set_composite_variable("container", value) connect(self.__container.signals[orm.Mask.background], self.onOptionChanged) connect(self.__container.signals[orm.Mask.phase], self.onOptionChanged) def report(self): body = [ ReportTemplates.value % {"name": "Name", "value": self.container.name}, ReportTemplates.value % {"name": "Dimensions", "value": "%sD" % self.container.dimensions}, ] if isinstance(self.container, orm.ConcretePluginMask): body.append(ReportTemplates.value % {"name": "Type", "value": "Plugin"}) for arg, value in zip(self.container.variables, self.container.values): body.append(ReportTemplates.subvalue % {"name": arg.name, "value": value}) elif isinstance(self.container, orm.Mask): body.append(ReportTemplates.value % {"name": "Type", "value": "Database"}) template = self.report_header() return template % "\n".join(body) @staticmethod def default_container(): region_transmit = 1.0 bg_transmit = 0.0 feature = 250.0 pitch = 800.0 height = 800.0 name = "Line %s/%s" % (feature, pitch) description = "Binary dense line mask with feature = %s and pitch = %s size" % (feature, pitch) boundary = orm.Geometry.rectangle(-pitch/2.0, -height/2.0, pitch/2.0, height/2.0) sim_region = boundary.clone() points = [orm.Point(-feature/2.0, -height/2.0), orm.Point(-feature/2.0, height/2.0), orm.Point(feature/2.0, height/2.0), orm.Point(feature/2.0, -height/2.0)] regions = [orm.Region(region_transmit, 0.0, orm.GeometryShape.Polygon, points)] return orm.Mask(name, bg_transmit, 0.0, boundary, sim_region, regions, desc=description) @classmethod def default(cls): return cls(container=Mask.default_container()) @classmethod def empty(cls): return cls(container=None) @classmethod def load(cls, data): """:type data: dict""" return cls.empty().parse(data) def assign(self, other): """:type other: Mask""" self.container = other.container.clone() def export(self): return self.container.export() def parse(self, data): """:type data: dict""" if data[orm.Generic.type.key] == str(orm.GenericType.Mask): self.container = orm.Mask.load(data) elif data[orm.Generic.type.key] == str(orm.GenericType.AbstractPluginMask): self.container = orm.ConcretePluginMask.load(data) else: raise orm.UnknownObjectTypeError(data[orm.Generic.type.key]) return self def convert2core(self): container = self.container points = oplc.Points2dArray([oplc.Point2d(*p) for p in container.boundary.points]) boundary = oplc.Box(points, container.background, container.phase) regions = oplc.RegionsArray() for region in container.regions: points = oplc.Points2dArray([oplc.Point2d(p.x, p.y) for p in region.points]) regions.append(oplc.Region(points, region.transmittance, region.phase)) return oplc.Mask(regions, boundary) class ImagingTool(AbstractOptionsBase): icon = "icons/ImagingTool" pupil_filter_key = "PupilFilter" source_shape_key = "SourceShape" def __init__(self, wavelength, numerical_aperture, reduction_ratio, flare, immersion, immersion_enabled, source_shape, pupil_filter): """ :param float wavelength: Imaging tool nominal wavelength :param float numerical_aperture: Imaging tool projection lenses nominal numerical aperture :param float reduction_ratio: Imaging tool projection lenses reduction ratio :param float flare: Imaging tool parasitic flare (empirical parameter) :param float or None immersion: Refraction index of immersion layer above resist (None if not applicable) :param bool immersion_enabled: If True immersion data is valid and enabled :param orm.SourceShape or orm.ConcretePluginSourceShape source_shape: Source shape of the imaging tool :param orm.PupilFilter or orm.ConcretePluginPupilFilter or None pupil_filter: Projection lenses pupil filter of the imaging tool (None - no) """ super(ImagingTool, self).__init__() self.__source_shape = source_shape self.__pupil_filter = pupil_filter self.wavelength = Variable( Numeric(vmin=0.0001, vmax=1000.0, dtype=float), value=wavelength, name="Wavelength") self.numerical_aperture = Variable( Numeric(vmin=0.0001, vmax=1.0, dtype=float), value=numerical_aperture, name="Numerical Aperture") self.reduction_ratio = Variable( Numeric(vmin=1.0, vmax=10.0, dtype=float), value=reduction_ratio, name="Reduction Ratio") self.flare = Variable( Numeric(vmin=0.0, vmax=1.0, dtype=float), value=flare, name="Flare") immersion = 1.44 if immersion is None else immersion self.immersion = Variable( Numeric(vmin=1.0, vmax=3.0, dtype=float), value=immersion, name="Immersion") self.__immersion_enabled = immersion_enabled self.numerics = None """:type: Numerics""" self._connect_signals() @property def source_shape(self): return self.__source_shape @source_shape.setter def source_shape(self, value): """:type value: orm.SourceShape or orm.ConcretePluginSourceShape""" if self.__source_shape is not value: self._set_composite_variable("source_shape", value) self.__source_shape.numerics = self.numerics @property def pupil_filter(self): return self.__pupil_filter @pupil_filter.setter def pupil_filter(self, value): if self.__pupil_filter is not value: self._set_composite_variable("pupil_filter", value) @property def immersion_enabled(self): return self.__immersion_enabled @immersion_enabled.setter def immersion_enabled(self, value): if self.__immersion_enabled != value: self.__immersion_enabled = value self.onOptionChanged() def report(self): body = [ self.wavelength.report(), self.numerical_aperture.report(), self.reduction_ratio.report(), self.flare.report() ] if self.immersion_enabled: body.append(self.immersion.report()) body.append(ReportTemplates.value % {"name": "Source Shape", "value": self.source_shape.name}) if isinstance(self.source_shape, orm.ConcretePluginSourceShape): body.append(ReportTemplates.subvalue % {"name": "Type", "value": "Plugin"}) for arg, value in zip(self.source_shape.variables, self.source_shape.values): body.append(ReportTemplates.subvalue % {"name": arg.name, "value": value}) elif isinstance(self.source_shape, orm.SourceShape): body.append(ReportTemplates.subvalue % {"name": "Type", "value": "Database"}) if self.pupil_filter is not None: body.append(ReportTemplates.value % {"name": "Pupil Filter", "value": self.pupil_filter.name}) if isinstance(self.pupil_filter, orm.ConcretePluginPupilFilter): body.append(ReportTemplates.subvalue % {"name": "Type", "value": "Plugin"}) for arg, value in zip(self.pupil_filter.variables, self.pupil_filter.values): body.append(ReportTemplates.subvalue % {"name": arg.name, "value": value}) elif isinstance(self.pupil_filter, orm.PupilFilter): body.append(ReportTemplates.subvalue % {"name": "Type", "value": "Database"}) template = self.report_header() return template % "\n".join(body) @classmethod def default(cls): default_source_shape = orm.SourceShape( name="CoherentDefault", data=[orm.SourceShapeData(x=0.0, y=0.0, intensity=1.0)], desc="Default ideal conventional coherent source shape") return cls( wavelength=365.0, numerical_aperture=0.51, reduction_ratio=1.0, flare=0.0, immersion=None, immersion_enabled=False, source_shape=default_source_shape, pupil_filter=None) @classmethod def empty(cls): return cls( wavelength=None, numerical_aperture=None, reduction_ratio=None, flare=None, immersion=None, immersion_enabled=False, source_shape=None, pupil_filter=None ) def export(self): if self.pupil_filter is not None: pupil_filter = {ImagingTool.pupil_filter_key: self.pupil_filter.export()} else: pupil_filter = {} if self.immersion_enabled: immersion = {self.immersion.name: self.immersion.value} else: immersion = {} result = { self.wavelength.name: self.wavelength.value, self.numerical_aperture.name: self.numerical_aperture.value, self.reduction_ratio.name: self.reduction_ratio.value, self.flare.name: self.flare.value, ImagingTool.source_shape_key: self.source_shape.export(), } result.update(pupil_filter) result.update(immersion) return result def assign(self, other): """:type other: ImagingTool""" self.wavelength.value = other.wavelength.value self.numerical_aperture.value = other.numerical_aperture.value self.reduction_ratio.value = other.reduction_ratio.value self.flare.value = other.flare.value self.immersion.value = other.immersion.value self.immersion_enabled = other.immersion_enabled self.source_shape = other.source_shape.clone() self.pupil_filter = other.pupil_filter.clone() if other.pupil_filter is not None else None def parse(self, data): """:type data: dict""" self.wavelength.value = float(data[self.wavelength.name]) self.numerical_aperture.value = float(data[self.numerical_aperture.name]) self.reduction_ratio.value = float(data[self.reduction_ratio.name]) self.flare.value = float(data[self.flare.name]) source_shape_data = data[ImagingTool.source_shape_key] typename = source_shape_data[orm.Generic.type.key] if typename == str(orm.GenericType.SourceShape): self.source_shape = orm.SourceShape.load(source_shape_data) elif typename == str(orm.GenericType.AbstractPluginSourceShape): self.source_shape = orm.ConcretePluginSourceShape.load(source_shape_data) else: raise orm.UnknownObjectTypeError(typename) try: immersion = float(data[self.immersion.name]) except KeyError: self.immersion_enabled = False else: self.immersion.value = immersion self.immersion_enabled = True try: pupil_filter_data = data[ImagingTool.pupil_filter_key] except KeyError: self.pupil_filter = None else: typename = pupil_filter_data[orm.Generic.type.key] if typename == str(orm.GenericType.PupilFilter): self.pupil_filter = orm.PupilFilter.load(pupil_filter_data) elif typename == str(orm.GenericType.AbstractPluginPupilFilter): self.pupil_filter = orm.ConcretePluginPupilFilter.load(pupil_filter_data) else: raise orm.UnknownObjectTypeError(typename) return self @classmethod def load(cls, data): return cls.empty().parse(data) def convert2core(self): stepx = stepy = self.numerics.source_stepxy model = self.source_shape.convert2core() source_shape = oplc.SourceShape(model, stepx, stepy) pupil_filter = self.pupil_filter.convert2core() \ if self.pupil_filter is not None else oplc.PupilFilterModelEmpty() immersion = self.immersion.value if self.immersion_enabled else oplc.air_nk.real return oplc.ImagingTool( source_shape, pupil_filter, self.wavelength.value, self.numerical_aperture.value, self.reduction_ratio.value, self.flare.value, immersion) class ExposureFocus(AbstractOptionsBase): icon = "icons/ExposureAndFocus" top = "Top" middle = "Middle" bottom = "Bottom" up = "Up" down = "Down" _dir_ = {up: -1.0, down: 1.0} def __init__(self, exposure, focus, correctable, relative_to, direction): """ :param float exposure: Exposure value :param float focus: Focus value :param float correctable: Dose correctable coefficient :param str relative_to: Focal position relative to :param str direction: Positive direction of focal position """ super(ExposureFocus, self).__init__() self.exposure = Variable( Numeric(vmin=0.0, vmax=1000.0, dtype=float), value=exposure, name="Exposure") self.focus = Variable( Numeric(vmin=-10.0, vmax=10.0, dtype=float), value=focus, name="Focus") self.dose_correctable = Variable( Numeric(vmin=0.0, vmax=100.0, dtype=float), value=correctable, name="DoseCorrectable") self.focal_relative_to = Variable( Enum(variants=[ExposureFocus.top, ExposureFocus.middle, ExposureFocus.bottom]), value=relative_to, name="FocalRelativeTo") self.focal_direction = Variable( Enum(variants=[ExposureFocus.up, ExposureFocus.down]), value=direction, name="FocalDirection") # Link to the wafer process (simplify the calculation) self.wafer_process = None """:type: WaferProcess""" self._connect_signals() _rel_ = { top: lambda v: 0.0, middle: lambda v: float(v)/2.0, bottom: lambda v: float(v) } def assign(self, other): """:type other: ExposureFocus""" self.exposure.value = other.exposure.value self.focus.value = other.focus.value self.dose_correctable.value = other.dose_correctable.value self.focal_relative_to.value = other.focal_relative_to.value self.focal_direction.value = other.focal_direction.value @property def focal_plane(self): """ Calculate focus relative to the top of Resist :rtype: float """ # noinspection PyCallingNonCallable base = ExposureFocus._rel_[self.focal_relative_to.value](self.wafer_process.resist.thickness) direction = ExposureFocus._dir_[self.focal_direction.value] return direction * 1E3*self.focus.value + base @classmethod def default(cls): return cls( exposure=50.0, focus=0.0, correctable=1.0, relative_to=ExposureFocus.top, direction=ExposureFocus.up ) @classmethod def empty(cls): return cls( exposure=None, focus=None, correctable=None, relative_to=None, direction=None ) @classmethod def load(cls, data): return cls.empty().parse(data) def report(self): template = self.report_header() body = "\n".join([ self.exposure.report(), self.focus.report(), self.dose_correctable.report(), self.focal_relative_to.report(), self.focal_direction.report(), ]) return template % body def export(self): return { self.exposure.name: self.exposure.value, self.focus.name: self.focus.value, self.dose_correctable.name: self.dose_correctable.value, self.focal_relative_to.name: self.focal_relative_to.value, self.focal_direction.name: self.focal_direction.value } def parse(self, data): """:type data: dict""" self.exposure.value = data[self.exposure.name] self.focus.value = data[self.focus.name] self.dose_correctable.value = data[self.dose_correctable.name] self.focal_relative_to.value = data[self.focal_relative_to.name] self.focal_direction.value = data[self.focal_direction.name] return self def convert2core(self): focus_top = self.focal_plane exposure = self.exposure.value correctable = self.dose_correctable.value return oplc.Exposure(focus_top, exposure, correctable) class PostExposureBake(AbstractOptionsBase): icon = "icons/PEB" def __init__(self, time, temp): super(PostExposureBake, self).__init__() self.time = Variable(Numeric(vmin=0.0, vmax=500.0, precision=1), value=time, name="PebTime") self.temp = Variable(Numeric(vmin=0.0, vmax=300.0, precision=1), value=temp, name="PebTemp") self._connect_signals() def assign(self, other): """:type other: PostExposureBake""" self.time.value = other.time.value self.temp.value = other.temp.value def parse(self, data): """ :type data: dict :rtype: PostExposureBake """ self.time.value = data[self.time.name] self.temp.value = data[self.temp.name] return self @classmethod def default(cls): return cls(time=50.0, temp=115.0) @classmethod def empty(cls): return cls(time=None, temp=None) @classmethod def load(cls, data): return cls.empty().parse(data) def report(self): template = self.report_header() body = "\n".join([ self.time.report(), self.temp.report(), ]) return template % body def export(self): return { self.time.name: self.time.value, self.temp.name: self.temp.value } def convert2core(self): return oplc.PostExposureBake(self.time.value, self.temp.value) class Development(AbstractOptionsBase): icon = "icons/Development" def __init__(self, time): super(Development, self).__init__() self.develop_time = Variable( Numeric(vmin=0.0, vmax=5000.0, precision=1), value=time, name="DevelopmentTime") self._connect_signals() def assign(self, other): """:type other: Development""" self.develop_time.value = other.develop_time.value @classmethod def default(cls): return cls(time=60.0) @classmethod def empty(cls): return cls(time=None) @classmethod def load(cls, data): return cls.empty().parse(data) def report(self): template = self.report_header() return template % self.develop_time.report() def export(self): return {self.develop_time.name: self.develop_time.value} def parse(self, data): """:type data: dict""" self.develop_time.value = data[self.develop_time.name] return self def convert2core(self): return oplc.Development(self.develop_time.value) class Metrology(AbstractOptionsBase): icon = "icons/Metrology" def __init__(self, measurement_height, var_meas_height, aerial_image_level, image_in_resist_level, latent_image_level, peb_latent_image_level, mask_tonality, cd_bias): super(Metrology, self).__init__() self.measurement_height = Variable( Numeric(vmin=0.0, vmax=100.0, precision=2), value=measurement_height, name="Measurement Height") self.variate_meas_height = Variable( Enum(variants=[VARIATE_HEIGHT_FALSE, VARIATE_HEIGHT_TRUE]), value=var_meas_height, name="Variate measurement height") self.aerial_image_level = Variable( Numeric(vmin=0.0, precision=3), value=aerial_image_level, name="Aerial Image Intensity Level") self.image_in_resist_level = Variable( Numeric(vmin=0.0, precision=3), value=image_in_resist_level, name="Image In Resist Intensity Level") self.latent_image_level = Variable( Numeric(vmin=0.0, precision=3), value=latent_image_level, name="Exposed Latent Image PAC Level") self.peb_latent_image_level = Variable( Numeric(vmin=0.0, precision=3), value=peb_latent_image_level, name="PEB Latent Image PAC Level") self.mask_tonality = Variable( Enum(variants=[MASK_CLEAR, MASK_OPAQUE]), value=mask_tonality, name="Mask tonality") self.cd_bias = Variable( Numeric(vmin=0.0, precision=3), value=cd_bias, name="Resist Profile Bias") def assign(self, other): """:type other: Metrology""" self.measurement_height.value = other.measurement_height.value self.variate_meas_height.value = other.variate_meas_height.value self.aerial_image_level.value = other.aerial_image_level.value self.image_in_resist_level.value = other.image_in_resist_level.value self.latent_image_level.value = other.latent_image_level.value self.peb_latent_image_level.value = other.peb_latent_image_level.value self.mask_tonality.value = other.mask_tonality.value self.cd_bias.value = other.cd_bias.value @classmethod def default(cls): return cls( measurement_height=5.0, var_meas_height=VARIATE_HEIGHT_FALSE, aerial_image_level=0.3, image_in_resist_level=0.3, latent_image_level=0.5, peb_latent_image_level=0.5, mask_tonality=MASK_OPAQUE, cd_bias=0.0, ) @classmethod def empty(cls): return cls( measurement_height=None, var_meas_height=None, aerial_image_level=None, image_in_resist_level=None, latent_image_level=None, peb_latent_image_level=None, mask_tonality=None, cd_bias=None, ) @classmethod def load(cls, data): return cls.empty().parse(data) def report(self): template = self.report_header() body = "\n".join([ self.measurement_height.report(), self.variate_meas_height.report(), self.aerial_image_level.report(), self.image_in_resist_level.report(), self.latent_image_level.report(), self.peb_latent_image_level.report(), self.mask_tonality.report(), self.cd_bias.report(), ]) return template % body def export(self): return { self.measurement_height.name: self.measurement_height.value, self.variate_meas_height.name: self.variate_meas_height.value, self.aerial_image_level.name: self.aerial_image_level.value, self.image_in_resist_level.name: self.image_in_resist_level.value, self.latent_image_level.name: self.latent_image_level.value, self.peb_latent_image_level.name: self.peb_latent_image_level.value, self.mask_tonality.name: self.mask_tonality.value, self.cd_bias.name: self.cd_bias.value, } def parse(self, data): """:type data: dict""" self.measurement_height.value = data[self.measurement_height.name] self.variate_meas_height.value = data[self.variate_meas_height.name] self.aerial_image_level.value = data[self.aerial_image_level.name] self.image_in_resist_level.value = data[self.image_in_resist_level.name] self.latent_image_level.value = data[self.latent_image_level.name] self.peb_latent_image_level.value = data[self.peb_latent_image_level.name] self.mask_tonality.value = data[self.mask_tonality.name] self.cd_bias.value = data[self.cd_bias.name] return self class Options(AbstractOptionsBase): def __init__(self, numerics, wafer_process, mask, imaging_tool, exposure_focus, peb, development, metrology, path=None, coupled=False): """ :type numerics: Numerics :type wafer_process: WaferProcess :type mask: Mask :type imaging_tool: ImagingTool :type exposure_focus: ExposureFocus :type peb: PostExposureBake :type development: Development :type metrology: Metrology :type path: str or None :param bool coupled: If true then Options coupled with file on disk """ super(Options, self).__init__() self._folder = None """:type: str""" self._filename = None """:type: str""" self.numerics = numerics """:type: Numerics""" self.wafer_process = wafer_process """:type: WaferProcess""" self.mask = mask """:type: Mask""" self.imaging_tool = imaging_tool """:type: ImagingTool""" self.exposure_focus = exposure_focus """:type: ExposureFocus""" self.peb = peb """:type: PostExposureBake""" self.development = development """:type: Development""" self.metrology = metrology """:type: Metrology""" self.imaging_tool.numerics = self.numerics self.wafer_process.imaging_tool = self.imaging_tool self.exposure_focus.wafer_process = self.wafer_process self.__groups = [ self.numerics, self.wafer_process, self.mask, self.imaging_tool, self.exposure_focus, self.peb, self.development, self.metrology] """:type: list of AbstractOptionsBase""" self.__coupled = coupled self.path = path connect(GlobalSignals.changed, self.onOptionChanged) def assign(self, other): """:type other: Options""" super(Options, self).assign(other) disconnect(GlobalSignals.changed, other.onOptionChanged) for group in self.__groups: other_group = filter(lambda g: isinstance(g, type(group)), other.groups)[0] group.assign(other_group) self.path = other.path self.__coupled = other.coupled connect(GlobalSignals.changed, other.onOptionChanged) self.changed.emit() @property def groups(self): return self.__groups @property def path(self): return os.path.join(self._folder, self._filename) @path.setter def path(self, value): if value is not None: folder, filename = os.path.split(value) self._folder = folder self._filename = filename else: self._folder = os.path.expanduser("~") self._filename = config.DEFAULT_OPTIONS_NAME @property def filename(self): return self._filename @property def folder(self): return self._folder @property def coupled(self): """ :return: True if options has been already coupled with the file on disk :rtype: bool """ return self.__coupled def couple_with(self, path): # logging.info("Couple with: %s" % path) self.path = path self.__coupled = True for group in self.__groups: group.saved(emit=False) self.saved() @classmethod def default(cls): """:rtype: Options""" default_options = cls( numerics=Numerics.default(), wafer_process=WaferProcess.default(), mask=Mask.default(), imaging_tool=ImagingTool.default(), exposure_focus=ExposureFocus.default(), peb=PostExposureBake.default(), development=Development.default(), metrology=Metrology.default(), ) return default_options @classmethod def empty(cls): return cls( numerics=Numerics.empty(), wafer_process=WaferProcess.empty(), mask=Mask.empty(), imaging_tool=ImagingTool.empty(), exposure_focus=ExposureFocus.empty(), peb=PostExposureBake.empty(), development=Development.empty(), metrology=Metrology.empty(), ) def report(self): return ("""
%(numerics)s %(exposure_focus)s
%(wafer_process)s %(resist)s
%(mask)s %(imaging_tool)s
%(development)s %(peb)s
%(metrology)s
""" % { "numerics": self.numerics.report(), "wafer_process": self.wafer_process.report(), "resist": self.wafer_process.resist.report(), "mask": self.mask.report(), "imaging_tool": self.imaging_tool.report(), "exposure_focus": self.exposure_focus.report(), "peb": self.peb.report(), "development": self.development.report(), "metrology": self.metrology.report(), }) def export(self): return {group.identifier: group.export() for group in self.groups} def save(self, path): if not path: return data = self.export() # import json # logging.info("Save data:\n%s" % json.dumps(data, indent=4)) # import time # time.sleep(0.1) with open(path, "wb") as options_file: options_file.write(bson.dumps(data)) self.couple_with(path) def open(self, path): if not path: return with open(path, "rb") as options_file: data = bson.loads(options_file.read()) # import json # logging.info("Parse data:\n%s" % json.dumps(data, indent=4)) # import time # time.sleep(0.1) errors = [] for group in self.__groups: try: # logging.debug("Load options group %s" % group.name) group_data = data[group.identifier] try: group.parse(group_data) except PluginNotFoundError as error: group.assign(type(group).default()) errors.append(OptionsParseError(error.message)) except orm.UnknownObjectTypeError as error: group.assign(type(group).default()) errors.append(OptionsParseError(error.message)) except KeyError: group.assign(type(group).default()) errors.append(OptionsParseError("%s data not found in file" % group.identifier)) self.couple_with(path) if errors: raise OptionsLoadErrors(errors, self) @classmethod def load(cls, path): """ :rtype: Options """ with open(path, "rb") as options_file: data = bson.loads(options_file.read()) # import json # logging.info("Load data:\n%s" % json.dumps(data, indent=4)) # import time # time.sleep(0.1) errors = [] kwargs = dict() for group_class in [Numerics, WaferProcess, Mask, ImagingTool, ExposureFocus, PostExposureBake, Development]: try: logging.debug("Load options group %s" % group_class.name) group_data = data[group_class.name] try: kwargs[group_class.name] = group_class.load(group_data) except PluginNotFoundError as error: kwargs[group_class.name] = group_class.default() errors.append(OptionsParseError(error.message)) except orm.UnknownObjectTypeError as error: kwargs[group_class.name] = group_class.default() errors.append(OptionsParseError(error.message)) except KeyError: kwargs[group_class.name] = group_class.default() errors.append(OptionsParseError("%s data not found in file" % group_class.name)) result = cls( numerics=kwargs[Numerics.identifier], wafer_process=kwargs[WaferProcess.identifier], mask=kwargs[Mask.identifier], imaging_tool=kwargs[ImagingTool.identifier], exposure_focus=kwargs[ExposureFocus.identifier], peb=kwargs[PostExposureBake.identifier], development=kwargs[Development.identifier]) result.couple_with(path) if errors: raise OptionsLoadErrors(errors, result) return result ================================================ FILE: OptolithiumGui/optolithium.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import os import logging as module_logging import sys import webbrowser import psutil from qt import QtCore, QtGui, connect, Slot, backend_name from qt import core_version as QtCoreVersion from qt import version as QtBackendVersion os.environ["MATPLOTLIBDATA"] = os.path.join(os.path.abspath(os.curdir), "mpl-data") from matplotlib import __version__ as matplotlib_version from views.controls import ControlBar, ControlsView from views.common import QStackedWidget, QuestionBox, ErrorBox, ExtendedErrorBox, msgBox from views.dbview import DatabaseView from views.summary import SummaryView from views.numerics import NumericsView from views.wafer import WaferProcessView from views.resist import ResistView from views.mask import MaskView from views.imaging import ImagingView from views.exposure import ExposureFocusView from views.peb import PostExposureBakeView from views.development import DevelopmentView from views.metrology import MetrologyView from views.diffraction import DiffractionPatternView from views.simulations import AerialImageView, ImageInResistView, LatentImageView, \ PebLatentImageView, DevelopContoursView, ResistProfileView from views.sets import SimulationSets from views.appconfig import AppConfigurationView from resources import Resources from database.common import ApplicationDatabase from database.dbparser import GenericParser, GenericParserError from config import MEGABYTE from optolithiumc import OPTOLITHIUM_CORE_VERSION import config import helpers import options import plugins import core __author__ = 'Alexei Gladkikh' from info import __version__ logging = module_logging.getLogger(__name__) logging.setLevel(module_logging.INFO) helpers.logStreamEnable(logging) class AboutWindow(QtGui.QDialog): def __init__(self, parent): """:type parent: QtGui.QMainWindow""" QtGui.QDialog.__init__(self, parent) self.setWindowTitle("About") self.setWindowIcon(parent.windowIcon()) logo_banner = os.path.join(os.getcwd(), "icons/Banner.png") self.__program_banner = QtGui.QLabel(self) self.__program_banner.setPixmap(QtGui.QPixmap(logo_banner)) self.__program_banner.setAlignment(QtCore.Qt.AlignCenter) self.__close_button = QtGui.QPushButton("Close", self) self.__close_button.setMaximumWidth(config.MAXIMUM_DIALOG_BUTTON_WIDTH) connect(self.__close_button.clicked, self.close) self.__info_box = QtGui.QGroupBox("Information", self) self.__info_layout = QtGui.QFormLayout(self.__info_box) widget_t = QtGui.QLabel self.__info_layout.addRow("Application:", widget_t(config.APPLICATION_NAME + " " + __version__)) self.__info_layout.addRow("Author:", widget_t(__author__)) self.__info_layout.addRow("Core version:", widget_t(OPTOLITHIUM_CORE_VERSION)) self.__info_layout.addRow("Python version:", widget_t(sys.version)) self.__info_layout.addRow("%s version:" % backend_name, widget_t(QtBackendVersion)) self.__info_layout.addRow("Qt4 version:", widget_t(QtCoreVersion)) self.__info_layout.addRow("Matplotlib version:", widget_t(matplotlib_version)) self.__layout = QtGui.QGridLayout(self) self.__layout.addWidget(self.__program_banner, 0, 0, 1, 2) self.__layout.addWidget(self.__info_box, 1, 0, 1, 2) self.__layout.addWidget(self.__close_button, 2, 1) class MemoryUsageView(QtGui.QProgressBar): STYLE = """ QProgressBar{ text-align: center } QProgressBar::chunk { width: 10px; margin: 0px; } """ def __init__(self, parent, pid): QtGui.QProgressBar.__init__(self, parent) self.__process = psutil.Process(pid) self.setStyleSheet(MemoryUsageView.STYLE) self.setFormat("%v MiB") self.update_memory() def update_memory(self): usage = psutil.virtual_memory() meminfo = self.__process.get_memory_info() total = int(usage.total/MEGABYTE) free = int(usage.available/MEGABYTE) required = int(meminfo.rss/MEGABYTE) self.setMaximum(free + required) self.setValue(required) self.setToolTip("Available: %d MiB\nTotal: %d MiB" % (free, total)) class StatusBar(QtGui.QStatusBar): def __init__(self, parent): QtGui.QStatusBar.__init__(self, parent) self.setObjectName("StatusBar") self.__mem_usage = MemoryUsageView(self, os.getpid()) self.__mem_usage.setMaximumWidth(200) self.addPermanentWidget(self.__mem_usage) self.__mem_update_timer = QtCore.QTimer(self) connect(self.__mem_update_timer.timeout, self.__mem_usage.update_memory) self.__mem_update_timer.start(config.Configuration.memory_update_interval) class MainWindow(QtGui.QMainWindow): def __init__(self): QtGui.QMainWindow.__init__(self) Resources.load(os.getcwd(), ["icons", "xhtml"], icon_driver=QtGui.QIcon) self.tabs = dict() """:type: dict from str to QtGui.QWidget""" self.tabs_stack = None """:type: QStackedWidget""" self.window_layout = None """:type: QtGui.QLayout""" self.controls_view = None """:type: ControlsView""" self.about_window = None """:type: AboutWindow""" self.dbparser = None """:type: GenericParser""" self.appdb = None """:type: database.ApplicationDatabase""" self.plugins = None """:type: plugins.Container""" self.my_state = None self.my_geometry = None self.resize(1080, 760) self.center() try: config.openLayerMapConfig(config.Configuration.layer_map_path) except config.LayerMapConfig.ParseError: ErrorBox(self, "Can't parse '%s' GDSII layer mapping file!" % config.Configuration.layer_map_path) sys.exit(-1) self.configure_dbparser() self.configure_database() self.configure_plugins() self.configure_windows() self.appconfig = AppConfigurationView(self) # Create initial options object self.options = options.Options.default() self.core = core.Core(self.options) connect(self.options.changed, self.setApplicationTitle) self.setApplicationTitle() self.setWindowIcon(QtGui.QIcon("icons/Logo.png")) self.configure_controls() self.configure_window_state() logging.info("Configure status bar") self.status_bar = StatusBar(self) self.setStatusBar(self.status_bar) self.statusBar().showMessage("Ready") self.state_changed = False logging.info("Configuration done") logging.info("Loading options") if len(sys.argv) > 1: path = sys.argv[1] self._open_options(path) self.show() # noinspection PyPep8Naming @Slot() def setApplicationTitle(self): self.setWindowTitle("%s - [%s]%s" % ( config.APPLICATION_NAME, self.options.filename, " *" if not self.options.is_saved else "")) # noinspection PyArgumentList def center(self): frame = self.frameGeometry() screen = QtGui.QApplication.desktop().screenNumber(QtGui.QApplication.desktop().cursor().pos()) center = QtGui.QApplication.desktop().screenGeometry(screen).center() frame.moveCenter(center) self.move(frame.topLeft()) def configure_dbparser(self): try: self.dbparser = GenericParser() except GenericParserError as error: ErrorBox(self, "Critical error in database parser: %s" % error.message) sys.exit(-1) def configure_database(self): logging.info("Configure application database") try: self.appdb = ApplicationDatabase.open(config.Configuration.db_path, create=True) except ApplicationDatabase.DefaultObjectsError as missing_defaults: reply = QuestionBox(self, "Default objects %s not found in the database.\n" "Do you want to create these objects?\n" "Note: otherwise program will be closed." % missing_defaults.message, msgBox.Yes | msgBox.No, msgBox.Yes) if reply == msgBox.Yes: self.appdb = missing_defaults.fix() else: sys.exit(0) except ApplicationDatabase.OperationError as error: reply = QuestionBox(self, "Application database can't be opened:\n%s\n" "Do you want to replace it with the empty compatible database?\n" "Note: if you select Yes all previous data will be erased!" % error.message, msgBox.Yes | msgBox.No, msgBox.No) if reply == msgBox.Yes: self.appdb = ApplicationDatabase.create(config.Configuration.db_path, rewrite=True) else: sys.exit(0) self.appdb.parser = self.dbparser # FIXME: Handle case when database can't be created for specified path def configure_plugins(self): logging.info("Configure application plugins") self.plugins = plugins.Container.load(*config.Configuration.plugin_paths) inspector = plugins.Inspector(self.appdb) for plugin in self.plugins: try: inspector.verify(plugin) except ApplicationDatabase.SqlError as error: logging.info("Can't acquire plugin '%s': %s" % (plugin.entry.name, error.message)) except plugins.Inspector.CommonError as error: logging.info("Verification plugin error '%s': %s" % (plugin.entry.name, error.message)) dll_plugin_names = {plugin.entry.name for plugin in self.plugins} db_plugin_names = set() for table in self.appdb.plugin_tables: db_plugin_names.update([str(p_object.name) for p_object in self.appdb[table]]) missed_plugins = db_plugin_names - dll_plugin_names for plugin_name in missed_plugins: reply = QuestionBox(self, "Plugin %s wasn't loaded and must be removed from the application database. " "Do you want continue? If canceled you can try to fix missed dynamic library. " "Note: if you continue all dependent objects also will be deleted." % plugin_name, msgBox.Yes | msgBox.Cancel, msgBox.Cancel) if reply == msgBox.Cancel: sys.exit(0) self.appdb.remove(plugin_name) def configure_windows(self): logging.info("Configure application windows") self.about_window = AboutWindow(self) def configure_window_state(self): self.controls_view["Parameters"]["Numerics"].trigger() # self.controls_view["Parameters"]["Summary"].trigger() def save_state(self): self.my_state = self.saveState() self.my_geometry = self.saveGeometry() def load_state(self): self.restoreState(self.my_state) self.restoreGeometry(self.my_geometry) def options_modified_handler(self): """ Check whether options has been modified and ask user to save it before reset options. :return: True - if action accepted and False if rejected :rtype: bool """ if not self.options.is_saved: reply = QuestionBox( self, "Options data had been changed but not saved.\n" "Do you want save it to %s?" % self.options.filename, msgBox.Cancel | msgBox.No | msgBox.Yes) if reply == msgBox.Yes: self.save_options() return True elif reply == msgBox.No: return True else: return False else: return True def closeEvent(self, event): if self.options_modified_handler(): event.accept() else: event.ignore() @Slot() def new_options(self): if self.options_modified_handler(): default_options = self.options.default() self.options.assign(default_options) for tab in self.tabs.values(): tab.reset() @Slot() def save_options(self): if not self.options.coupled: path, _ = QtGui.QFileDialog.getSaveFileName( self.centralWidget(), "Save Options As...", self.options.path, config.OPTIONS_EXTENSION) else: path = self.options.path self.options.save(path) self.statusBar().showMessage("Options has been successfully saved to %s" % path, config.STATUS_BAR_MESSAGE_DURATION) @Slot() def save_options_as(self): path, _ = QtGui.QFileDialog.getSaveFileName( self.centralWidget(), "Save Options As...", self.options.path, config.OPTIONS_EXTENSION) self.options.save(path) self.statusBar().showMessage("Options has been successfully saved to %s" % path, config.STATUS_BAR_MESSAGE_DURATION) def _open_options(self, path): try: self.options.open(path) except options.OptionsLoadErrors as errors: error_box = ExtendedErrorBox( "Options load errors occurred", "During loading given option file %s the errors occurred; default values will be loaded" % path, str("\n").join([error.message for error in errors])) reply = error_box.exec_() if reply == error_box.Close: sys.exit(-1) for tab in self.tabs.values(): tab.reset() self.statusBar().showMessage("Options has been successfully loaded from %s" % path, config.STATUS_BAR_MESSAGE_DURATION) logging.info("Options has been successfully loaded from %s" % path) @Slot() def load_options(self): if self.options_modified_handler(): path, _ = QtGui.QFileDialog.getOpenFileName( self.centralWidget(), "Open Options", self.options.path, config.OPTIONS_EXTENSION) self._open_options(path) # noinspection PyPep8Naming def changeStackView(self): sender_name = str(self.sender().objectName()) widget = self.tabs[sender_name] self.tabs_stack.setCurrentWidget(widget) # noinspection PyPep8Naming,PyMethodMayBeStatic def onWebsiteOpen(self): webbrowser.open(config.APPLICATION_WEBSITE) # noinspection PyPep8Naming def onPrint(self): dialog = QtGui.QPrintDialog() if dialog.exec_() == QtGui.QDialog.Accepted: self.tabs["Parameters.Summary"].print_(dialog.printer()) # noinspection PyPep8Naming def onPrintPreview(self): dialog = QtGui.QPrintPreviewDialog() connect(dialog.paintRequested, self.tabs["Parameters.Summary"].print_) dialog.exec_() # noinspection PyPep8Naming,PyMethodMayBeStatic def onPageSetup(self): dialog = QtGui.QPageSetupDialog() dialog.exec_() def configure_controls(self): logging.info("Configure window controls") controls_data = [ ControlsView.ControlData(name="File", text="&File", actions=[ ControlBar.ActionData( name="New", text="&New", icon=Resources("icons/NewFile"), callback=self.new_options, status_tip="Create a new document", shortcut="Ctrl+N"), ControlBar.ActionData( name="Open", text="&Open", icon=Resources("icons/Open"), callback=self.load_options, status_tip="Open an existing document", shortcut="Ctrl+O"), ControlBar.ActionData( name="Save", text="&Save", icon=Resources("icons/Save"), callback=self.save_options, status_tip="Save the active document"), ControlBar.ActionData( name="SaveAs", text="Save As ...", callback=self.save_options_as, status_tip="Save the active document with a new name"), None, ControlBar.ActionData( name="Preferences", text="&Preferences", callback=self.appconfig.exec_, icon=Resources("icons/Preferences"), status_tip="Edit preferences settings"), None, ControlBar.ActionData( name="Print", text="Print...", callback=self.onPrint, status_tip="Print the active document", shortcut="Ctrl+P"), ControlBar.ActionData( name="PrintPreview", text="Print Preview", callback=self.onPrintPreview, status_tip="Display a preview of the report"), ControlBar.ActionData( name="PrintSetup", text="Print Setup...", # callback=self.onPageSetup, status_tip="Change the printer and printing options"), None, ControlBar.ActionData( name="Exit", text="&Exit", icon=Resources("icons/Exit"), callback=self.close, status_tip="Quit the application; prompts to save document", shortcut="Ctrl+Q") ]), ControlsView.ControlData(name="View", text="&View", actions=[ ControlBar.ActionData( name="Database", text="&Database", icon=Resources("icons/Database"), callback=self.changeStackView, status_tip="%s database storage" % config.APPLICATION_NAME), ControlBar.ActionData( name="Queue", text="&Queue", icon=Resources("icons/Queue"), status_tip="Show the sim_region queue window"), ControlBar.ActionData( name="Warnings", text="&Warnings", status_tip="Show the warning list window") ]), ControlsView.ControlData(name="Parameters", text="&Parameters", actions=[ ControlBar.ActionData( name="Numerics", text="&Numerics", icon=Resources("icons/Numerics"), callback=self.changeStackView, status_tip="Numerics"), ControlBar.ActionData( name="WaferProcesses", text="&Wafer Processes", icon=Resources("icons/WaferStack"), callback=self.changeStackView, status_tip="Wafer Processes"), ControlBar.ActionData( name="Resist", text="&Resist", icon=Resources("icons/Resist"), callback=self.changeStackView, status_tip="Resist"), ControlBar.ActionData( name="CoatAndPrebake", text="&Coat and prebake", callback=self.changeStackView, status_tip="Coat and prebake"), ControlBar.ActionData( name="Mask", text="&Mask", icon=Resources("icons/Mask"), callback=self.changeStackView, status_tip="Mask"), ControlBar.ActionData( name="ImagingTool", text="&Imaging Tool", icon=Resources("icons/ImagingTool"), callback=self.changeStackView, status_tip="Imaging Tool"), ControlBar.ActionData( name="ExposureAndFocus", text="&Exposure and Focus", icon=Resources("icons/ExposureAndFocus"), callback=self.changeStackView, status_tip="Exposure and Focus"), ControlBar.ActionData( name="PostExposureBake", text="&Post Exposure Bake", icon=Resources("icons/PEB"), callback=self.changeStackView, status_tip="Post Exposure Bake"), ControlBar.ActionData( name="Development", text="&Development", icon=Resources("icons/Development"), callback=self.changeStackView, status_tip="Development"), ControlBar.ActionData( name="Metrology", text="M&etrology", icon=Resources("icons/Metrology"), callback=self.changeStackView, status_tip="Metrology"), ControlBar.ActionData( name="Summary", text="&Summary", icon=Resources("icons/Summary"), callback=self.changeStackView, status_tip="Summary") ]), ControlsView.ControlData(name="Simulation", text="&Simulations", actions=[ ControlBar.ActionData( name="DiffractionPattern", text="&Diffraction Pattern", icon=Resources("icons/DiffractionPattern"), callback=self.changeStackView, status_tip="Diffraction Pattern"), ControlBar.ActionData( name="AerialImage", text="&Aerial Image", icon=Resources("icons/AerialImage"), callback=self.changeStackView, status_tip="Aerial Image"), ControlBar.ActionData( name="ImageInResist", text="&Image in Resist", icon=Resources("icons/ImageInResist"), callback=self.changeStackView, status_tip="Image in Resist"), ControlBar.ActionData( name="ExposedLatentImage", text="&Exposed Latent Image", icon=Resources("icons/LatentImage"), callback=self.changeStackView, status_tip="Exposed Latent Image"), ControlBar.ActionData( name="PEBLatentImage", text="&PEB Latent Image", icon=Resources("icons/PostBakeImage"), callback=self.changeStackView, status_tip="PEB Latent Image"), ControlBar.ActionData( name="DevelopTimeContours", text="&Develop Time Contours", icon=Resources("icons/DevelopTimeContours"), callback=self.changeStackView, status_tip="Develop Time Contours"), ControlBar.ActionData( name="ResistProfile", text="&Resist Profile", icon=Resources("icons/ResistProfile"), callback=self.changeStackView, status_tip="Resist Profile"), None, ControlBar.ActionData( name="SimulationSets", text="&Simulation Sets", icon=Resources("icons/SimulationSets"), callback=self.changeStackView, status_tip="Simulation Sets") ]), ControlsView.ControlData(name="Help", text="&Help", actions=[ ControlBar.ActionData( name="Manual", text="&Manual", icon=Resources("icons/Help"), status_tip="Application manual of %s" % config.APPLICATION_NAME), ControlBar.ActionData( name="About", text="&About %s" % config.APPLICATION_NAME, icon=Resources("icons/About"), callback=self.about_window.show, status_tip="Display program information, version, copyright and etc"), ControlBar.ActionData( name="Warnings", text="%s website" % config.APPLICATION_NAME, icon=Resources("icons/Website"), callback=self.onWebsiteOpen, status_tip="Launch browser to %s project website" % config.APPLICATION_NAME) ]), ] controls_group = [("View", "Parameters", "Simulation")] logging.info("Create controls view") self.controls_view = ControlsView(self, controls_data, controls_group) logging.info("Create database view") self.tabs["View.Database"] = DatabaseView(self, self.appdb) logging.info("Create numerics view") self.tabs["Parameters.Numerics"] = NumericsView(self, self.options) logging.info("Create wafer processes view") self.tabs["Parameters.WaferProcesses"] = WaferProcessView( self, self.options.wafer_process, self.appdb) logging.info("Create resist view") self.tabs["Parameters.Resist"] = ResistView( self, self.options.wafer_process, self.options.peb.temp, self.appdb) logging.info("Create mask view") self.tabs["Parameters.Mask"] = MaskView(self, self.options, self.appdb) logging.info("Create imaging tool view") self.tabs["Parameters.ImagingTool"] = ImagingView(self, self.options, self.appdb) logging.info("Create exposure and focus view") self.tabs["Parameters.ExposureAndFocus"] = ExposureFocusView( self, self.options.exposure_focus, self.options.wafer_process) logging.info("Create post exposure bake view") self.tabs["Parameters.PostExposureBake"] = PostExposureBakeView(self, self.options) logging.info("Create development view") self.tabs["Parameters.Development"] = DevelopmentView( self, self.options.development, self.options.wafer_process) logging.info("Create metrology view") self.tabs["Parameters.Metrology"] = MetrologyView(self, self.options) logging.info("Create summary view") self.tabs["Parameters.Summary"] = SummaryView(self, self.options) logging.info("Create diffraction pattern simulation view") self.tabs["Simulation.DiffractionPattern"] = DiffractionPatternView(self, self.core) logging.info("Create aerial image simulation view") self.tabs["Simulation.AerialImage"] = AerialImageView(self, self.core.aerial_image, self.options) logging.info("Create image in resist simulation view") self.tabs["Simulation.ImageInResist"] = ImageInResistView(self, self.core.image_in_resist, self.options) logging.info("Create exposed latent image simulation view") self.tabs["Simulation.ExposedLatentImage"] = LatentImageView(self, self.core.latent_image, self.options) logging.info("Create peb latent image simulation view") self.tabs["Simulation.PEBLatentImage"] = PebLatentImageView(self, self.core.peb_latent_image, self.options) logging.info("Create develop time contours simulation view") self.tabs["Simulation.DevelopTimeContours"] = \ DevelopContoursView(self, self.core.develop_contours, self.options) logging.info("Create resist profile simulation view") self.tabs["Simulation.ResistProfile"] = ResistProfileView(self, self.core.resist_profile, self.options) logging.info("Create simulation sets view") self.tabs["Simulation.SimulationSets"] = SimulationSets(self, self.core) logging.info("Configure stack widget") window = QtGui.QWidget() self.setCentralWidget(window) self.tabs_stack = QStackedWidget(window) self.window_layout = QtGui.QHBoxLayout(window) self.window_layout.addWidget(self.tabs_stack) # self.scroll_widget = QtGui.QScrollArea() # self.scroll_widget.setWidget(window) # self.scroll_widget.setWidgetResizable(True) for control in self.tabs.values(): self.tabs_stack.addWidget(control) ================================================ FILE: OptolithiumGui/pcpi.py ================================================ # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com from ctypes import POINTER, CFUNCTYPE, Structure, cast from ctypes import c_void_p, c_char_p, c_double, c_int import inspect __author__ = 'Alexei Gladkikh' class PluginCommonError(Exception): pass class PluginNotFoundError(PluginCommonError): pass class PluginRegistry(object): def __init__(self): self.__container_id = dict() self.__container_name = dict() def get_by_id(self, plugin_id): """:rtype: plugins.Plugin""" try: return self.__container_id[plugin_id] except KeyError: raise PluginNotFoundError("Plugin with id %s not found" % plugin_id) def get_by_name(self, plugin_name): """:rtype: plugins.Plugin""" try: return self.__container_name[plugin_name] except KeyError: raise PluginNotFoundError("Plugin with name %s not found" % plugin_name) def add_plugin(self, plugin): """:type plugin: plugins.Plugin""" self.__container_id[plugin.record.id] = plugin self.__container_name[plugin.record.name] = plugin # Plugin registry must be in pcpi module not in plugins module otherwise it result in circular imports PLUGIN_REGISTRY = PluginRegistry() class CPluginInterface(Structure): plugin_id = None """:type: int""" name = None """:type: str""" desc = None """:type: str""" def deref(p): return p.contents.value if p else None def ro_property(attribute): return property(fget=lambda self: getattr(self, attribute)) def rw_property(attribute): return property(fget=lambda self: getattr(self, attribute), fset=lambda self, value: setattr(self, attribute, value)) # noinspection PyPep8Naming class _variable_part_t(Structure): _fields_ = [ ("_name", c_char_p), ("_defv", c_double), ("_min", POINTER(c_double)), ("_max", POINTER(c_double)) ] name = property(lambda self: self._name) """:type: str""" defv = property(lambda self: self._defv) """:type: float""" min = property(lambda self: deref(self._min)) """:type: float or None""" max = property(lambda self: deref(self._max)) """:type: float or None""" def __str__(self): vmin = "Min %.2f, " % self.min if self.min is not None else str() vmax = "Max %.2f" % self.max if self.max is not None else str() return "Name: \"%s\", %s%s Default: %.2f" % (self.name, vmin, vmax, self.defv) # ------------------------------------------ Development model Plugin -------------------------------------------------- # noinspection PyPep8Naming class dev_model_arg_t(_variable_part_t): pass # Return value: double # Parameters: pac, depth, values dev_model_expr_t = CFUNCTYPE(c_double, c_double, c_double, POINTER(c_double)) # noinspection PyPep8Naming class dev_model_t(CPluginInterface): plugin_id = 1 _fields_ = [ ("_prolith_id", POINTER(c_int)), ("_name", c_char_p), ("_desc", c_char_p), ("_expr", dev_model_expr_t), ("_args_count", c_int), ("_args", POINTER(dev_model_arg_t)) ] prolith_id = property(lambda self: deref(self._prolith_id)) """:type: int or None""" name = property(lambda self: self._name) """:type: str""" desc = property(lambda self: self._desc) """:type: str""" expr = property(lambda self: self._expr) """:type: dev_model_expr_t""" args_count = property(lambda self: self._args_count) """:type: int""" args = property(lambda self: self._args) """:type: list of dev_model_arg_t""" def __str__(self): args = "\n".join(["\t%d. %s" % (k, self.args[k]) for k in xrange(self.args_count)]) return ("Name: \"%s\"\nDesc: %s\nExpr: %s\nCount: %d\nProlith Id: %s\nArgs:\n%s" % (self.name, self.desc, self.expr, self.args_count, self.prolith_id, args)) # ------------------------------------------------ Mask Plugin --------------------------------------------------------- # noinspection PyPep8Naming class point_t(Structure): _fields_ = [ ("_x", c_double), ("_y", c_double) ] x = rw_property("_x") """:type: float""" y = rw_property("_y") """:type: float""" # noinspection PyPep8Naming class mask_region_t(Structure): _fields_ = [ ("_transmittance", c_double), ("_phase", c_double), ("_length", c_int), ("_points", POINTER(point_t)) ] transmittance = rw_property("_transmittance") """:type: float""" phase = rw_property("_phase") """:type: float""" length = ro_property("_length") """:type: int""" points = ro_property("_points") """:type: list of point_t""" # noinspection PyPep8Naming class mask_parameter_t(_variable_part_t): pass # noinspection PyPep8Naming class mask_t(Structure): _fields_ = [ ("_boundary", mask_region_t), ("_regions_count", c_int), ("_regions", POINTER(mask_region_t)), ] boundary = ro_property("_boundary") """:type: mask_region_t""" regions_count = ro_property("_regions_count") """:type: int""" regions = ro_property("_regions") """:type: list of mask_region_t""" # Return value: int - status (0 - Ok) # Parameters: mask, parameters mask_create_t = CFUNCTYPE(c_int, POINTER(mask_t), POINTER(c_double)) # noinspection PyPep8Naming class mask_plugin_t(CPluginInterface): plugin_id = 0 _fields_ = [ ("_name", c_char_p), ("_desc", c_char_p), ("_dimensions", c_int), ("_create", mask_create_t), ("_parameters_count", c_int), ("_parameters", POINTER(mask_parameter_t)) ] name = ro_property("_name") """:type: str""" desc = ro_property("_desc") """:type: str""" dimensions = ro_property("_dimensions") """:type: int""" create = ro_property("_create") """:type: mask_create_t""" parameters_count = ro_property("_parameters_count") """:type: int""" parameters = ro_property("_parameters") """:type: mask_parameter_t""" # --------------------------------------------- Source Shape Plugin ---------------------------------------------------- # noinspection PyPep8Naming class source_shape_parameter_t(_variable_part_t): pass # Return value: double - intensity value # Parameters: direction cosine x, y, and parameters source_shape_expr_t = CFUNCTYPE(c_double, c_double, c_double, POINTER(c_double)) # noinspection PyPep8Naming class source_shape_plugin_t(CPluginInterface): plugin_id = 2 _fields_ = [ ("_name", c_char_p), ("_desc", c_char_p), ("_expression", source_shape_expr_t), ("_parameters_count", c_int), ("_parameters", POINTER(source_shape_parameter_t)) ] name = ro_property("_name") """:type: str""" desc = ro_property("_desc") """:type: str""" expr = ro_property("_expression") """:type: source_shape_expr_t""" parameters_count = ro_property("_parameters_count") """:type: int""" parameters = ro_property("_parameters") """:type: source_shape_parameter_t""" # --------------------------------------------- Pupil Filter Plugin ---------------------------------------------------- # noinspection PyPep8Naming class pupil_filter_parameter_t(_variable_part_t): pass # noinspection PyPep8Naming class c_complex(Structure): _fields_ = [("_real", c_double), ("_imag", c_double)] real = rw_property("_real") imag = rw_property("_imag") # Return value: double - diffraction term coefficient value # Parameters: direction cosine x, y, and parameters pupil_filter_expr_t = CFUNCTYPE(c_complex, c_double, c_double, POINTER(c_double)) # noinspection PyPep8Naming class pupil_filter_plugin_t(CPluginInterface): plugin_id = 5 _fields_ = [ ("_name", c_char_p), ("_desc", c_char_p), ("_expression", pupil_filter_expr_t), ("_parameters_count", c_int), ("_parameters", POINTER(pupil_filter_parameter_t)) ] name = ro_property("_name") """:type: str""" desc = ro_property("_desc") """:type: str""" expr = ro_property("_expression") """:type: pupil_filter_expr_t""" parameters_count = ro_property("_parameters_count") """:type: int""" parameters = ro_property("_parameters") """:type: pupil_filter_parameter_t""" # ---------------------------------------------------------------------------------------------------------------------- plugin_types = {cls.plugin_id: cls for cls in globals().values() if inspect.isclass(cls) and issubclass(cls, CPluginInterface) and cls.plugin_id is not None} ENTRY_POINT = "PluginDescriptor" # noinspection PyPep8Naming class plugin_descriptor_t(Structure): _fields_ = [ ("_plugin_type", c_int), ("_plugin_entry", c_void_p) ] plugin_type = property(lambda self: self._plugin_type) """:type: int""" @property def plugin_entry(self): """:rtype: CPluginInterface""" return cast(self._plugin_entry, POINTER(plugin_types[self.plugin_type])).contents ================================================ FILE: OptolithiumGui/physc.py ================================================ __author__ = 'Alexei Gladkikh' R = 1.9872e-3 T0 = -273.15 AIR_N = 1.0002926 AIR_K = 0.0 ================================================ FILE: OptolithiumGui/plugins.py ================================================ # -*- coding: utf-8 -*- # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import os import logging as module_logging import ctypes import sys from database import orm import config import helpers import pcpi __author__ = 'Alexei Gladkikh' logging = module_logging.getLogger(__name__) logging.setLevel(module_logging.DEBUG) helpers.logStreamEnable(logging) class System(object): def _darwin_free_lib(self, handle): self._dylib.dlclose(handle) def _linux_free_lib(self, handle): self._libdl.dlclose(handle) def _windows_free_lib(self, handle): self._windll.kernel32.FreeLibrary(handle) def __init__(self): if sys.platform.startswith(config.darwin): self._dylib = ctypes.cdll.LoadLibrary("libdl.dylib") elif os.name == config.posix: self._libdl = ctypes.cdll.LoadLibrary("libdl.so") elif os.name == config.nt: self._windll = ctypes.windll self._free_library = { config.darwin: self._darwin_free_lib, config.nt: self._windows_free_lib, config.posix: self._linux_free_lib } # noinspection PyProtectedMember def free_library(self, library): handle = library._handle # noinspection PyCallingNonCallable return self._free_library[os.name](handle) # noinspection PyMethodMayBeStatic,PyPep8Naming @property def SharedLibraryLoadError(self): # noinspection PyUnresolvedReferences return WindowsError system = System() class Plugin(object): class LoadError(Exception): def __init__(self, *args, **kwargs): super(Plugin.LoadError, self).__init__(*args, **kwargs) def __init__(self, library_path, library, plugin_desc): """ :param str library_path: Path to the library :param library: Module handle of the plugin library :param plugin_descriptor_t plugin_desc: C plugin descriptor """ self._library_path = library_path self._library = library self._plugin_desc = plugin_desc self.record = None """:type: orm.Generic or None""" @property def type(self): """:rtype: int""" return self._plugin_desc.plugin_type @property def entry(self): """:rtype: CPluginInterface""" return self._plugin_desc.plugin_entry @property def path(self): """:rtype: str""" return self._library_path @classmethod def load(cls, library_path): """ :param str library_path: Path to the file of plugin shared library """ try: library = ctypes.cdll.LoadLibrary(library_path) except system.SharedLibraryLoadError: raise Plugin.LoadError("File \"%s\" is not valid shared object and can't be loaded" % library_path) try: plugin_desc = pcpi.plugin_descriptor_t.in_dll(library, pcpi.ENTRY_POINT) except ValueError: system.free_library(library) raise Plugin.LoadError("Plugin entry point not found: \"%s\"" % library_path) if plugin_desc.plugin_type not in pcpi.plugin_types: plugin_type = plugin_desc.plugin_type system.free_library(library) raise Plugin.LoadError("Unsupported plugin type \"%s\" of \"%s\"" % (plugin_type, library_path)) return cls(library_path, library, plugin_desc) def unload(self): system.free_library(self._library) self._library_path = None self._library = None self._plugin_desc = None class Container(object): @staticmethod def _clean_plugins_dict(): """:rtype: dict[int, list[Plugin]]""" return {possible_type: list() for possible_type in pcpi.plugin_types} def __init__(self): self._plugins_directory = self._clean_plugins_dict() def load_path(self, *plugins_path): """ Enumerate plugin file in directories. Structure of the one directory is follow: + plugins: + masks: - line.dll - space.dll + dev_models: - mack.dll - enhanced.dll - notch.dll + source_shapes: - conventional.dll - annular.dll - coherent.dll :param tuple[str] plugins_path: List of of root directories for plugins """ if not plugins_path: plugins_path = [config.Configuration.SYSTEM_PLUGINS_PATH] for path in plugins_path: if not os.path.isdir(path): logging.warning("Plugin path '%s' not existed or not is directory omitted" % path) continue for dir_name in os.listdir(path): dir_path = os.path.join(path, dir_name) if not os.path.isdir(dir_path): continue for filename in os.listdir(dir_path): _, ext = os.path.splitext(filename) if ext != config.shared_ext: continue filepath = os.path.join(dir_path, filename) if self.is_loaded(filepath): logging.info("Plugin already loaded \"%s\"" % filepath) continue try: plugin = Plugin.load(filepath) except Plugin.LoadError as error: logging.warning(error.message) else: self._plugins_directory[plugin.type].append(plugin) logging.info("Plugin library load: \"%s\"" % filepath) def __iter__(self): """:rtype: __generator[Plugin]""" for plugins in self._plugins_directory.values(): for plugin in plugins: yield plugin def next(self): """:rtype: Plugin""" return next(self) def is_loaded(self, filepath): """ :param str filepath: Plugin file path :rtype: bool """ for plugin in self: if plugin.path == filepath: return True return False @classmethod def load(cls, *plugins_path): container = cls() container.load_path(*plugins_path) return container def unload(self): for plugin in self: plugin.unload() del plugin self._plugins_directory = self._clean_plugins_dict() class Inspector(object): Load = 0 Verify = 1 class CommonError(Exception): def __init__(self, *args, **kwargs): super(Inspector.CommonError, self).__init__(*args, **kwargs) class VerifyError(CommonError): def __init__(self, *args, **kwargs): super(Inspector.VerifyError, self).__init__(*args, **kwargs) self.message = "Verify of %s" % self.message class DevelopmentModelVerifyError(VerifyError): def __init__(self, *args, **kwargs): super(Inspector.DevelopmentModelVerifyError, self).__init__(*args, **kwargs) self.message = "Development model: %s" % self.message class PluginMaskVerifyError(VerifyError): def __init__(self, *args, **kwargs): super(Inspector.PluginMaskVerifyError, self).__init__(*args, **kwargs) self.message = "Plugin mask: %s" % self.message class PluginSourceShapeVerifyError(VerifyError): def __init__(self, *args, **kwargs): super(Inspector.PluginSourceShapeVerifyError, self).__init__(*args, **kwargs) self.message = "Source shape: %s" % self.message class PluginPupilFilterVerifyError(VerifyError): def __init__(self, *args, **kwargs): super(Inspector.PluginPupilFilterVerifyError, self).__init__(*args, **kwargs) self.message = "Pupil filter: %s" % self.message @staticmethod def _load_development_model(plugin): """:type plugin: Plugin""" entry = plugin.entry """:type: dev_model_t""" args = [orm.DevelopmentModelArg(entry.args[k].name, k, entry.args[k].defv, entry.args[k].min, entry.args[k].max) for k in xrange(entry.args_count)] return orm.DevelopmentModel(name=entry.name, args=args, desc=entry.desc, prolith_id=entry.prolith_id) @staticmethod def _verify_development_model(plugin, record): """ :param Plugin plugin: Descriptor of the loaded plugin :param orm.DevelopmentModel record: Database record of this plugin """ entry = plugin.entry """:type: pcpi.dev_model_t""" if record.name != entry.name: raise Inspector.DevelopmentModelVerifyError("Names not equals: %s != %s" % (record.name, entry.name)) if len(record.args) != entry.args_count: raise Inspector.DevelopmentModelVerifyError( "Plugin expression arguments not equal to saved: %d != %d" % (len(record.args), entry.args_count)) for rarg in record.args: earg = entry.args[rarg.ord] if rarg.name != earg.name: raise Inspector.DevelopmentModelVerifyError( "Argument names not equals: %s != %s" % (rarg.name, earg.name)) if rarg.max != earg.max: raise Inspector.DevelopmentModelVerifyError( "Maximum values not equals: %s != %s" % (rarg.max, earg.max)) if rarg.min != earg.min: raise Inspector.DevelopmentModelVerifyError( "Minimum values not equals: %s != %s" % (rarg.min, earg.min)) @staticmethod def _load_standard_plugin(plugin, plg_type, prm_type): entry = plugin.entry prms = [prm_type( entry.parameters[k].name, k, entry.parameters[k].defv, entry.parameters[k].min, entry.parameters[k].max) for k in xrange(entry.parameters_count)] return plg_type(name=entry.name, prms=prms, desc=entry.desc) @staticmethod def _verify_standard_plugin(plugin, record, err_type): """ :param Plugin plugin: Descriptor of the loaded plugin :param record: Database record of this plugin :param type err_type: Error type to raise if necessary """ entry = plugin.entry """:type: pcpi.mask_t""" if record.name != entry.name: raise err_type("Names not equals: %s != %s" % (record.name, entry.name)) if len(record.prms) != entry.parameters_count: raise err_type("Plugin parameters not equal to saved: %d != %d" % (len(record.prms), entry.parameters_count)) for rprm in record.prms: eprm = entry.parameters[rprm.ord] if rprm.name != eprm.name: raise err_type("Parameters names not equals: %s != %s" % (rprm.name, eprm.name)) if rprm.max != eprm.max: raise err_type("Maximum values not equals: %s != %s" % (rprm.max, eprm.max)) if rprm.min != eprm.min: raise err_type("Minimum values not equals: %s != %s" % (rprm.min, eprm.min)) @staticmethod def _load_mask_plugin(plugin): """:type plugin: Plugin""" entry = plugin.entry prms = [orm.AbstractPluginMaskPrm( entry.parameters[k].name, k, entry.parameters[k].defv, entry.parameters[k].min, entry.parameters[k].max) for k in xrange(entry.parameters_count)] return orm.AbstractPluginMask(name=entry.name, prms=prms, desc=entry.desc, dims=entry.dimensions) @staticmethod def _verify_mask_plugin(plugin, record): """ :param Plugin plugin: Descriptor of the loaded plugin :param orm.AbstractPluginMask record: Database record of this plugin """ Inspector._verify_standard_plugin(plugin, record, Inspector.PluginMaskVerifyError) @staticmethod def _load_source_shape_plugin(plugin): """:type plugin: Plugin""" return Inspector._load_standard_plugin(plugin, orm.AbstractPluginSourceShape, orm.AbstractPluginSourceShapePrm) @staticmethod def _verify_source_shape_plugin(plugin, record): """ :param Plugin plugin: Descriptor of the loaded plugin :param orm.AbstractPluginSourceShape record: Database record of this plugin """ Inspector._verify_standard_plugin(plugin, record, Inspector.PluginSourceShapeVerifyError) @staticmethod def _load_pupil_filter_plugin(plugin): """:type plugin: Plugin""" return Inspector._load_standard_plugin(plugin, orm.AbstractPluginPupilFilter, orm.AbstractPluginPupilFilterPrm) @staticmethod def _verify_pupil_filter_plugin(plugin, record): """ :param Plugin plugin: Descriptor of the loaded plugin :param orm.AbstractPluginPupilFilter record: Database record of this plugin """ Inspector._verify_standard_plugin(plugin, record, Inspector.PluginPupilFilterVerifyError) def __init__(self, database): """ :type database: database.ApplicationDatabase """ self._plugin_map = { orm.AbstractPluginMask.cpi.plugin_id: (self._load_mask_plugin, self._verify_mask_plugin), orm.AbstractPluginSourceShape.cpi.plugin_id: (self._load_source_shape_plugin, self._verify_source_shape_plugin), orm.AbstractPluginPupilFilter.cpi.plugin_id: (self._load_pupil_filter_plugin, self._verify_pupil_filter_plugin), orm.DevelopmentModel.cpi.plugin_id: (self._load_development_model, self._verify_development_model), } self._database = database def verify(self, plugin): """:type plugin: Plugin""" table = orm.get_table_by_plugin(plugin) try: routines = self._plugin_map[plugin.type] except KeyError: raise Inspector.CommonError( "Plugin verification routines not found! " "Plugin type with index '%d' is not supported now." % plugin.type) try: record = self._database[table].filter(table.name == plugin.entry.name).one() except orm.NoResultFound: record = routines[Inspector.Load](plugin) self._database.add(record) else: routines[Inspector.Verify](plugin, record) plugin.record = record # Save plugin expression in the registry pcpi.PLUGIN_REGISTRY.add_plugin(plugin) ================================================ FILE: OptolithiumGui/qt.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import PySide import PySide.QtCore as _QtCore import PySide.QtGui as _QtGui import PySide.QtWebKit as _QtWebKit import helpers import logging as module_logging backend_name = 'PySide' __author__ = 'Alexei Gladkikh' logging = module_logging.getLogger(__name__) logging.setLevel(module_logging.INFO) helpers.logStreamEnable(logging) QtCore = _QtCore QtGui = _QtGui QtWebKit = _QtWebKit Signal = QtCore.Signal Slot = QtCore.Slot core_version = QtCore.__version__ version = PySide.__version__ def connect(signal, *slots, **kwargs): """ :type signal: Signal :type slot: Slot """ connection_type = kwargs.get("connection_type", QtCore.Qt.AutoConnection) logging.debug("Connect %s with %s" % (signal, slots)) for slot in slots: # noinspection PyUnresolvedReferences signal.connect(slot, connection_type) def disconnect(signal, slot): """ :type signal: Signal :type slot: Slot """ logging.debug("Disconnect %s with %s" % (signal, slot)) # noinspection PyUnresolvedReferences signal.disconnect(slot) class _GlobalSignalsClass(QtCore.QObject): changed = Signal() # noinspection PyPep8Naming @Slot() def onChanged(self): # noinspection PyUnresolvedReferences self.changed.emit() GlobalSignals = _GlobalSignalsClass() ================================================ FILE: OptolithiumGui/resources.py ================================================ # -*- coding: utf-8 -*- # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import os import sys if os.name == "nt": basis = sys.executable if hasattr(sys, 'frozen') else sys.argv[0] basepath = os.path.split(basis)[0] os.environ['PATH'] = basepath + os.pathsep + os.environ['PATH'] import magic from magic.api import MagicError import helpers import logging as module_logging __author__ = 'Alexei Gladkikh' logging = module_logging.getLogger(__name__) logging.setLevel(module_logging.INFO) helpers.logStreamEnable(logging) class Resource(object): # In windows platform prefix must be file:\\ and in linux file:/ html_prefix = { "nt": "file:\\", "posix": "file:" } def __init__(self, path): if not os.path.isabs(path): path = os.path.abspath(path) logging.debug("Loading resources %s" % path) self.__path = path self.__url = Resource.html_prefix[os.name] + path @property def path(self): return self.__path @property def url(self): return self.__url class PlainText(Resource): def __init__(self, *args): path = args[0] super(PlainText, self).__init__(path) with open(path) as data_file: self.__data = data_file.read() @property def data(self): return self.__data class Icon(Resource): def __init__(self, *args): path, icon_driver = args[0], args[1] super(Icon, self).__init__(path) self.__data = icon_driver(path) @property def data(self): return self.__data _ResourceFactory = { "text": PlainText, "application": PlainText, "image": Icon } class DummyIcon(object): def __init__(self, path): self.__path = path class Resources(object): _instance = None # FIXME: Quirk to load magic library (must be fixed by mean of the recompiling of libmagic1 library) try: _magic = magic.Magic(flags=magic.MAGIC_MIME_TYPE) except MagicError: _magic = magic.Magic(paths=["share/misc/magic"], flags=magic.MAGIC_MIME_TYPE) def __new__(cls, resource=None, attribute=None, data=None): if not cls._instance: cls._instance = super(Resources, cls).__new__(cls) return cls._instance else: return cls._instance.get_item_attribute(resource, attribute) # noinspection PyUnusedLocal def __init__(self, resource=None, data=None): if isinstance(self, Resources): self.__data = data @classmethod def load(cls, basepath, directories, icon_driver=None): if icon_driver is None: logging.warning("Icons driver was not set!") icon_driver = DummyIcon data = dict() for directory in directories: data[directory] = dict() resource_directory = os.path.join(basepath, directory) for filename in os.listdir(resource_directory): path = os.path.join(resource_directory, filename) mime_type = cls._magic.id_filename(path) if mime_type is not None: mime = mime_type.split('/')[0] try: resource_class = _ResourceFactory[mime] except KeyError: logging.warning("Can't load resource (unknown mime %s): %s" % (mime, path)) else: resource_name = helpers.GetFilename(filename).split('.')[0] data[directory][resource_name] = resource_class(path, icon_driver) else: logging.warning("Can't load resource (mime not determined): %s" % path) return cls(data=data) def get_item_attribute(self, item, attribute=None): attribute = "data" if attribute is None else attribute if '/' not in item: return [getattr(v, attribute) for v in self.__data[item].values()] else: directory, name = item.split('/') return getattr(self.__data[directory][name], attribute) if __name__ == "__main__": import PyQt4.QtGui as QtGui app = QtGui.QApplication(sys.argv) Resources.load(os.getcwd(), ["icons", "ddl"], QtGui.QIcon) print Resources("icons/No") print Resources("icons/Resist", "url") print Resources("ddl") main_window = QtGui.QMainWindow() main_window.show() sys.exit(app.exec_()) ================================================ FILE: OptolithiumGui/setup.py ================================================ # This file is part of Optolithium lithography modelling software. # # Copyright (C) 2015 Alexei Gladkikh # # This software is dual-licensed: 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 2 of the License, or # (at your option) any later version only for NON-COMMERCIAL usage. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # If you are interested in other licensing models, including a commercial- # license, please contact the author at gladkikhalexei@gmail.com import os import sys import time import hashlib import shutil from distutils.extension import Extension from Cython.Build import cythonize from info import __name__ as name from info import __version__ as version __author__ = 'Alexei Gladkikh' DO_CYTHONIZE = False shared_ext = {"nt": ".pyd", "posix": ".so"}[os.name] try: from cx_Freeze import setup, Executable except ImportError: setup = None Executable = None TEMP_CYTHON_C_DIR = "build/temp_c" TEMP_CYTHON_SHARED_DIR = "build/temp_shared" CYTHON_EXTENSIONS = [ Extension("optolithium", ["optolithium.py"]), Extension("pcpi", ["pcpi.py"]), Extension("physc", ["physc.py"]), Extension("plugins", ["plugins.py"]), Extension("qt", ["qt.py"]), Extension("resources", ["resources.py"]), Extension("config", ["config.py"]), Extension("core", ["core.py"]), Extension("auxmath", ["auxmath.py"]), Extension("metrics", ["metrics.py"]), Extension("options.structures", ["options/structures.py"]), Extension("options.common", ["options/common.py"]), Extension("database.common", ["database/common.py"]), Extension("database.dbparser", ["database/dbparser.py"]), Extension("database.Enum", ["database/Enum.py"]), Extension("database.orm", ["database/orm.py"]), Extension("database.settings", ["database/settings.py"]), Extension("views.common", ["views/common.py"]), Extension("views.controls", ["views/controls.py"]), Extension("views.dbview", ["views/dbview.py"]), Extension("views.development", ["views/development.py"]), Extension("views.metrology", ["views/metrology.py"]), Extension("views.exposure", ["views/exposure.py"]), Extension("views.numerics", ["views/numerics.py"]), Extension("views.peb", ["views/peb.py"]), Extension("views.resist", ["views/resist.py"]), Extension("views.summary", ["views/summary.py"]), Extension("views.wafer", ["views/wafer.py"]), Extension("views.diffraction", ["views/diffraction.py"]), Extension("views.simulations", ["views/simulations.py"]), ] if os.name == "nt": WINLIBS = [ "zlib1.dll", "magic.dll", "regex2.dll" ] else: WINLIBS = [] # Dependencies are automatically detected, but it might need fine tuning. CX_BUILD_OPTIONS = { # "icon": "icons/ResistProfile.png", "packages": [ "database", "views", "PySide.QtCore", "PySide.QtGui", "PySide.QtWebKit", "sqlalchemy", "matplotlib.figure", "matplotlib.backends.backend_qt4agg", "scipy.interpolate", "scipy.linalg", "scipy.special", "scipy.sparse", "gdsii", "magic", ], "includes": [ "sqlalchemy.dialects.sqlite", "config", "core", "auxmath", "metrics", "options", "optolithium", "optolithiumc", "helpers", "clipper", "pcpi", "physc", "plugins", "qt", "resources", "webbrowser", "psutil", "magic", "bson", "json", ], "include_files": [ "matplotlibrc", "icons/", "plugins/", "xhtml/", "share/", "_clipper" + shared_ext, "_optolithiumc" + shared_ext, ] + WINLIBS, "excludes": [ "apport", "apt", "PyQt4", "_tkinter", "Tkinter", # "unittest", "numpy.distutils", # "numpy.testing", "setuptools", "serial", "pysqlite2", "apt", "compiler", "backports", "curses", # "distutils", "email", "glib", "gobject", "importlib", "_markerlib", "nose", "pydoc", "pydoc_data", # "opcode", "ast", "BaseHTTPServer", "cgi", "doctest", "_MozillaCookieJar", "SimpleHTTPServer", "_codecs_cn", "_codecs_hk", "_codecs_iso2022", "_codecs_jp", "_codecs_kr", "_codecs_tw", # "matplotlib._delaunay", "urllib.datetime", "urllib._heapq", "urllib.readline", ], #"exclude_files": [ # "/usr/lib/pymodules/python2.7/matplotlib/mpl-data/fonts/ttf/cmsy10.ttf", #] } def cmp_hash(file1, file2): with open(file1, "rb") as tmp: text1 = tmp.read() with open(file2, "rb") as tmp: text2 = tmp.read() hash1 = hashlib.md5() hash1.update(text1) hash1 = hash1.hexdigest() hash2 = hashlib.md5() hash2.update(text2) hash2 = hash2.hexdigest() return hash1 == hash2 def restore_cython_files(tmp_dir, extensions, ext): if os.path.exists(tmp_dir): for extension in extensions: for src in extension.sources: path, x = os.path.splitext(src) real_path = path + ext if os.path.exists(os.path.join(tmp_dir, real_path)): os.rename(os.path.join(tmp_dir, real_path), real_path) def save_cython_files(tmp_dir, extensions, ext): if not os.path.exists(tmp_dir): os.makedirs(tmp_dir) else: shutil.rmtree(tmp_dir) os.makedirs(tmp_dir) for extension in extensions: for src in extension.sources: path, x = os.path.splitext(src) real_path = path + ext if not os.path.exists(os.path.join(tmp_dir, real_path)): print "Move %s to %s" % (real_path, os.path.join(tmp_dir, real_path)) os.renames(real_path, os.path.join(tmp_dir, real_path)) elif cmp_hash(real_path, os.path.join(tmp_dir, real_path)): print "Move %s to %s" % (real_path, os.path.join(tmp_dir, real_path)) os.renames(real_path, os.path.join(tmp_dir, real_path)) def main(): # GUI applications require a different base on Windows (the default is for a console application). base = None if sys.platform == "win32": base = "Win32GUI" exe_ext = ".exe" else: exe_ext = "" if DO_CYTHONIZE: restore_cython_files(TEMP_CYTHON_C_DIR, CYTHON_EXTENSIONS, ext=".c") restore_cython_files(TEMP_CYTHON_SHARED_DIR, CYTHON_EXTENSIONS, ext=shared_ext) sys.argv = [sys.argv[0], "build_ext", "--inplace"] print("Build Cython extensions") setup(name=name, version=version, ext_modules=cythonize(CYTHON_EXTENSIONS)) save_cython_files(TEMP_CYTHON_C_DIR, CYTHON_EXTENSIONS, ext=".c") sys.argv = [sys.argv[0], "build"] print("Build project") setup(name=name, version=version, description="Optolithium Application", options={"build_exe": CX_BUILD_OPTIONS}, executables=[Executable( script="main.py", targetName=name + exe_ext, base=base, icon="icon.ico")]) if DO_CYTHONIZE: save_cython_files(TEMP_CYTHON_SHARED_DIR, CYTHON_EXTENSIONS, ext=shared_ext) if __name__ == "__main__": start_time = time.time() main() print("Build Optolithium project done in: %s s" % (time.time() - start_time)) ================================================ FILE: OptolithiumGui/share/data/Air-Vacuum.MAT ================================================ [Version] 1.2.3.4 [Parameters] Air Vacuum ;Material Name ;data in wavelength (nm), n, k [Data] 100.00000 1.00000 0.00000 ================================================ FILE: OptolithiumGui/share/data/Si Dioxide.MAT ================================================ [Version] 1.2.3.4 [Parameters] Si Dioxide ;Material Name ;data in wavelength (nm), n, k [Data] 10.00000 0.98740 0.00970 10.20000 0.98650 0.00850 10.40000 0.98510 0.00830 10.60000 0.98410 0.00960 10.80000 0.98480 0.00990 11.00000 0.98440 0.00900 11.20000 0.98220 0.00930 11.40000 0.98280 0.01590 11.60000 0.98670 0.01060 11.80000 0.98580 0.00750 12.00000 0.98390 0.00650 12.20000 0.98230 0.00680 12.40000 0.98130 0.00700 12.60000 0.98030 0.00730 12.80000 0.97940 0.00760 13.00000 0.97890 0.00760 13.20000 0.97780 0.00830 13.40000 0.97700 0.00870 13.60000 0.97610 0.00930 13.80000 0.97470 0.01030 15.00000 0.96340 0.01990 16.00000 0.96080 0.02260 17.00000 0.95620 0.02440 18.00000 0.95090 0.02810 19.00000 0.94580 0.03350 20.00000 0.94160 0.03740 21.00000 0.93860 0.04370 22.00000 0.93280 0.04620 23.00000 0.92710 0.05200 24.00000 0.92220 0.05780 25.00000 0.91640 0.06500 26.00000 0.91050 0.07260 27.00000 0.92070 0.06800 28.00000 0.91750 0.07500 29.00000 0.91370 0.08200 30.00000 0.91300 0.09000 31.00000 0.90700 0.09200 32.00000 0.90100 0.09400 33.00000 0.89500 0.09800 34.00000 0.88800 0.10700 35.00000 0.88200 0.11300 36.00000 0.87700 0.12000 37.00000 0.87000 0.12800 38.00000 0.86600 0.13700 39.00000 0.85800 0.14400 40.00000 0.85100 0.15600 41.00000 0.84500 0.16900 42.00000 0.83900 0.18000 43.00000 0.83300 0.19000 44.00000 0.82700 0.20200 45.00000 0.82200 0.21800 46.00000 0.81700 0.23300 47.00000 0.81300 0.25000 48.00000 0.80800 0.27000 49.00000 0.80400 0.28200 49.59000 0.73300 0.32500 50.00000 0.80300 0.30000 51.00000 0.80400 0.32200 52.00000 0.80600 0.34300 53.00000 0.81100 0.36600 54.00000 0.81700 0.38500 55.00000 0.82200 0.40800 56.00000 0.82900 0.43000 57.00000 0.83300 0.45000 58.00000 0.84300 0.47000 59.00000 0.85100 0.48200 60.00000 0.86200 0.49700 63.58000 0.87900 0.61300 65.26000 0.90200 0.64500 67.01000 0.92700 0.67700 68.88000 0.95700 0.71200 69.85000 0.97500 0.73100 70.85000 0.99900 0.75000 71.87000 1.03000 0.76300 72.93000 1.07200 0.76800 74.02000 1.12400 0.76500 75.14000 1.13700 0.75500 76.30000 1.15600 0.73700 77.49000 1.17200 0.71700 78.72000 1.17800 0.70300 79.99000 1.17200 0.69600 81.30000 1.16700 0.69900 82.66000 1.16800 0.71100 84.05000 1.17500 0.73900 85.51000 1.19500 0.77100 87.00000 1.22500 0.79900 88.56000 1.26500 0.80800 90.17000 1.32000 0.79500 91.84000 1.36300 0.77500 93.57000 1.37100 0.75500 95.37000 1.36800 0.74700 97.24000 1.37200 0.76600 99.19000 1.38300 0.79300 101.20000 1.41000 0.82400 103.30000 1.47500 0.86100 105.10000 1.55400 0.87400 106.90000 1.63500 0.85900 108.80000 1.71600 0.81000 110.70000 1.76600 0.71800 112.70000 1.73900 0.56900 113.70000 1.68700 0.56500 114.80000 1.58700 0.61800 115.90000 1.51300 0.72500 117.00000 1.49200 0.91400 118.10000 1.56700 1.11000 118.70000 1.64500 1.13600 119.20000 1.77200 1.13000 119.80000 1.91900 1.04500 120.40000 2.04800 0.92500 121.00000 2.15200 0.81000 122.80000 2.33200 0.46000 124.00000 2.33000 0.32300 125.20000 2.29200 0.23600 126.50000 2.24300 0.16800 127.80000 2.19000 0.11900 129.10001 2.14000 0.07700 130.50000 2.09200 0.05610 131.89999 2.04700 0.04300 133.30000 2.00600 0.03390 134.80000 1.96900 0.02710 136.20000 1.93500 0.02280 137.80000 1.90400 0.01890 139.30000 1.87600 0.01560 140.89999 1.85000 0.01320 142.50000 1.82500 0.01090 144.20000 1.80300 0.00838 145.89999 1.78300 0.00557 147.60001 1.76400 0.00317 149.39999 1.74700 0.00000 153.10001 1.71600 0.00000 159.00000 1.67600 0.00000 167.50000 1.63300 0.00000 177.10001 1.60000 0.00000 183.70000 1.58200 0.00000 190.70000 1.56700 0.00000 198.39999 1.55400 0.00000 206.60001 1.54300 0.00000 213.89999 1.53400 0.00000 214.39999 1.53400 0.00000 226.70000 1.52300 0.00000 230.20000 1.52000 0.00000 237.80000 1.51500 0.00000 239.89999 1.51300 0.00000 248.30000 1.50800 0.00000 265.20001 1.50000 0.00000 269.89999 1.49800 0.00000 275.29999 1.49600 0.00000 280.29999 1.49400 0.00000 289.39999 1.49100 0.00000 296.70001 1.48900 0.00000 302.20001 1.48700 0.00000 330.29999 1.48100 0.00000 334.10001 1.48000 0.00000 340.39999 1.47900 0.00000 346.60001 1.47700 0.00000 361.10001 1.47500 0.00000 365.00000 1.47400 0.00000 404.70001 1.47000 0.00000 435.79999 1.46700 0.00000 467.79999 1.46400 0.00000 486.10001 1.46300 0.00000 508.60001 1.46200 0.00000 546.00000 1.46000 0.00000 576.90002 1.45900 0.00000 579.00000 1.45900 0.00000 587.59998 1.45800 0.00000 589.29999 1.45800 0.00000 643.79999 1.45700 0.00000 656.29999 1.45600 0.00000 667.79999 1.45600 0.00000 706.50000 1.45500 0.00000 ================================================ FILE: OptolithiumGui/share/data/Si Nitride.MAT ================================================ [Version] 1.2.3.4 [Parameters] Si Nitride ;Material Name ;data in wavelength (nm), n, k [Data] 51.66000 0.65500 0.42000 53.91000 0.62500 0.48100 56.36000 0.61100 0.56000 59.04000 0.61700 0.64700 61.99000 0.63500 0.74300 65.26000 0.67600 0.84100 68.88000 0.73500 0.93600 72.93000 0.81000 1.03000 77.49000 0.90200 1.11000 82.66000 1.00100 1.18000 88.56000 1.11100 1.26000 95.37000 1.24700 1.35000 103.30000 1.41700 1.43000 112.70000 1.65700 1.52000 118.10000 1.82700 1.53000 124.00000 2.00000 1.49000 130.50000 2.16200 1.44000 137.80000 2.32600 1.32000 145.89999 2.49200 1.16000 155.00000 2.65100 0.96000 165.30000 2.75300 0.75000 177.10001 2.75200 0.49000 183.70000 2.72400 0.38000 190.70000 2.68200 0.27000 198.39999 2.62000 0.17000 206.60001 2.54100 0.10000 215.60001 2.46400 0.06000 225.39999 2.39300 0.03000 236.20000 2.33100 0.01000 248.00000 2.27800 0.00000 261.00000 2.23400 0.00000 275.50000 2.19800 0.00000 291.70001 2.16700 0.00000 310.00000 2.14100 0.00000 354.20001 2.09900 0.00000 413.29999 2.06600 0.00000 495.89999 2.04100 0.00000 619.90002 2.02200 0.00000 826.59998 2.00800 0.00000 ================================================ FILE: OptolithiumGui/share/data/Silicon.MAT ================================================ [Version] 1.2.3.4 [Parameters] Silicon ;Material Name ;data in wavelength (nm), n, k [Data] 9.99800 0.99773 0.02060 10.25000 0.99856 0.02120 10.51000 0.99958 0.02190 10.78000 1.00080 0.02260 11.07000 1.00240 0.02330 11.27000 1.00390 0.02390 11.59000 1.00700 0.02470 11.92000 1.01320 0.02560 12.16000 1.02410 0.02620 12.20000 1.02500 0.02400 12.30000 1.03000 0.00500 12.40000 1.03200 0.00154 12.50000 1.03400 0.00100 12.60000 1.03400 0.00102 12.80000 1.03400 0.00109 13.00000 1.03000 0.00113 13.20000 1.02200 0.00120 13.60000 1.00800 0.00130 14.00000 1.00000 0.00143 15.00000 0.99300 0.00178 16.00000 0.99100 0.00215 17.00000 0.98800 0.00254 18.00000 0.98500 0.00297 19.00000 0.98200 0.00343 20.00000 0.97800 0.00393 21.00000 0.97600 0.00443 22.00000 0.97200 0.00500 23.00000 0.96800 0.00553 24.00000 0.96400 0.00610 25.00000 0.96000 0.00670 26.00000 0.95600 0.00730 27.00000 0.95200 0.00785 28.00000 0.94700 0.00840 29.00000 0.94200 0.00900 30.00000 0.93700 0.00950 31.00000 0.93000 0.01000 32.00000 0.92500 0.01040 33.00000 0.91800 0.01000 34.00000 0.91300 0.01130 35.00000 0.90600 0.01170 36.00000 0.89900 0.01210 37.00000 0.89300 0.01240 38.00000 0.88500 0.01280 39.00000 0.87700 0.01320 40.00000 0.86900 0.01350 41.00000 0.86000 0.01380 42.00000 0.85300 0.01420 43.00000 0.84300 0.01470 44.00000 0.83400 0.01520 45.00000 0.82400 0.01580 46.00000 0.81400 0.01680 47.00000 0.80300 0.01780 48.00000 0.79200 0.01920 49.00000 0.77800 0.02050 50.00000 0.76600 0.02230 51.00000 0.75200 0.02430 52.00000 0.73700 0.02640 53.00000 0.72200 0.02920 54.00000 0.70600 0.03250 55.00000 0.69100 0.03650 56.00000 0.67500 0.04050 57.00000 0.65900 0.04550 58.00000 0.64400 0.05100 59.00000 0.62700 0.05800 60.00000 0.61000 0.06500 61.00000 0.59000 0.07400 62.00000 0.56700 0.08350 63.00000 0.54900 0.09300 64.00000 0.53000 0.10000 65.00000 0.51300 0.11300 65.26000 0.51400 0.16300 67.02000 0.48500 0.18900 68.88000 0.45500 0.21900 69.85000 0.44000 0.23700 70.85000 0.42600 0.25500 71.87000 0.41100 0.27500 72.93000 0.39700 0.29600 73.80000 0.38600 0.31400 74.24000 0.37900 0.32300 74.69000 0.37400 0.33300 75.14000 0.36900 0.34200 76.30000 0.35700 0.36700 77.49000 0.34500 0.39400 78.72000 0.33300 0.42100 79.99000 0.32300 0.45000 81.30000 0.31300 0.47900 82.66000 0.30400 0.51000 84.06000 0.29600 0.54100 85.51000 0.28800 0.57300 87.00000 0.28100 0.60700 88.56000 0.27500 0.64100 90.17000 0.26900 0.67700 91.84000 0.26500 0.71400 93.57000 0.26100 0.75200 95.37000 0.25800 0.79200 97.24000 0.25600 0.83300 99.19000 0.25500 0.87500 101.20000 0.25600 0.91800 103.30000 0.25700 0.96300 105.50000 0.25900 1.01000 107.80000 0.26300 1.06000 110.20000 0.26700 1.11000 112.70000 0.27200 1.16000 115.30000 0.27800 1.21000 118.10000 0.28600 1.26000 121.00000 0.29500 1.32000 124.00000 0.30600 1.38000 127.20000 0.31800 1.45000 130.50000 0.33200 1.51000 134.00000 0.34800 1.58000 137.80000 0.36700 1.66000 141.70000 0.38900 1.73000 145.89999 0.41400 1.82000 155.00000 0.47800 2.00000 165.30000 0.56300 2.21000 177.10001 0.68200 2.45000 183.70000 0.75600 2.58000 190.70000 0.84700 2.73000 198.39999 0.96800 2.89000 206.60001 1.01000 2.91000 208.70000 1.06600 2.94000 210.89999 1.08800 2.99000 213.00000 1.11900 3.03000 215.30000 1.15500 3.07000 217.50000 1.18000 3.11000 219.80000 1.22200 3.17000 222.20000 1.26500 3.23000 224.60001 1.31900 3.29000 227.10001 1.38900 3.33000 229.60001 1.47100 3.37000 232.20000 1.54800 3.36000 234.80000 1.58500 3.35000 237.50000 1.59200 3.35000 240.30000 1.58200 3.38000 243.10001 1.57100 3.43000 246.00000 1.56800 3.50000 249.00000 1.57500 3.60000 252.00000 1.59100 3.71000 255.10001 1.61800 3.84000 258.29999 1.65800 3.98000 261.60001 1.71300 4.15000 264.89999 1.79400 4.35000 268.39999 1.92700 4.59000 271.89999 2.14000 4.85000 275.50000 2.45100 5.08000 279.20001 2.83300 5.26000 283.10001 3.27700 5.38000 287.00000 3.84900 5.44000 291.00000 4.52500 5.16000 295.20001 4.88800 4.64000 299.50000 4.99900 4.20000 303.89999 5.02100 3.88000 308.39999 5.01500 3.65000 313.10001 5.01000 3.48000 317.89999 5.01600 3.35000 322.89999 5.04000 3.24000 328.00000 5.07900 3.15000 333.29999 5.13400 3.08000 338.79999 5.20400 3.02000 344.39999 5.29600 2.99000 350.20001 5.44200 2.99000 356.29999 5.73300 3.03000 362.50000 6.30800 2.88000 369.00000 6.79600 2.17000 375.70001 6.70900 1.32000 382.70001 6.31600 0.81000 389.89999 5.94800 0.56000 397.39999 5.65400 0.42000 405.20001 5.42000 0.33000 413.29999 5.22200 0.27000 421.70001 5.05800 0.23000 430.50000 4.91600 0.19000 439.70001 4.79100 0.17000 449.20001 4.68200 0.15000 459.20001 4.58300 0.13000 469.60001 4.49500 0.12000 480.60001 4.41600 0.09000 492.00000 4.34300 0.08000 499.89999 4.29800 0.07000 504.00000 4.27700 0.07000 508.10001 4.25500 0.07200 512.29999 4.23500 0.06000 516.59998 4.21500 0.06000 520.90002 4.19600 0.05600 525.40002 4.17700 0.05300 529.90002 4.15900 0.04300 534.40002 4.14000 0.04500 539.09998 4.12300 0.04800 543.79999 4.10600 0.04400 548.59998 4.08900 0.04400 553.50000 4.07300 0.03200 558.50000 4.05700 0.03800 563.59998 4.04200 0.03200 568.70001 4.02600 0.03400 574.00000 4.01200 0.03000 579.40002 3.99700 0.02700 584.79999 3.98300 0.03000 590.40002 3.96900 0.03000 596.09998 3.95600 0.02700 601.90002 3.94300 0.02500 607.79999 3.93100 0.02500 613.79999 3.91800 0.02400 619.90002 3.90600 0.02200 626.20001 3.89300 0.02200 632.59998 3.88200 0.01900 639.09998 3.87000 0.01800 645.79999 3.85800 0.01700 ================================================ FILE: OptolithiumGui/share/data/a-Polysilicon.MAT ================================================ [Version] 1.2.3.4 [Parameters] a-Polysilicon ;Material Name ;data in wavelength (nm), n, k [Data] 24.80000 0.99500 0.02350 25.30000 0.99200 0.02420 25.83000 0.99000 0.02500 26.38000 0.98800 0.02580 26.95000 0.98600 0.02670 27.55000 0.98400 0.02750 28.18000 0.98100 0.02850 28.83000 0.97900 0.02940 29.52000 0.97600 0.03040 30.24000 0.97300 0.03140 31.00000 0.97000 0.03260 31.79000 0.96700 0.03370 32.63000 0.96300 0.03500 33.51000 0.95900 0.03640 34.44000 0.95500 0.03790 35.42000 0.95000 0.03950 36.47000 0.94500 0.04130 37.57000 0.93900 0.04330 38.75000 0.93300 0.04550 40.00000 0.92600 0.04800 41.33000 0.91800 0.05080 42.75000 0.90900 0.05410 44.28000 0.89900 0.05790 45.92000 0.88800 0.06230 47.69000 0.87600 0.06750 49.59000 0.86200 0.07370 51.66000 0.84600 0.08120 53.91000 0.82800 0.09030 56.36000 0.80800 0.10100 59.04000 0.78500 0.11500 61.99000 0.75800 0.13200 65.26000 0.72700 0.15400 68.88000 0.69100 0.18100 72.93000 0.65100 0.21600 77.49000 0.60300 0.26100 82.66000 0.54900 0.32100 88.56000 0.48500 0.40300 95.37000 0.41000 0.51900 103.30000 0.32700 0.72600 107.80000 0.36300 0.84700 112.70000 0.39200 0.94600 118.10000 0.42300 1.04000 124.00000 0.45900 1.14000 130.50000 0.49700 1.24000 137.80000 0.54300 1.35000 145.89999 0.59700 1.47000 155.00000 0.66000 1.60000 165.30000 0.73500 1.74000 177.10001 0.83200 1.89000 190.70000 0.95100 2.07000 206.60001 1.11000 2.28000 225.39999 1.35000 2.51000 248.00000 1.69000 2.76000 258.29999 1.86000 2.85000 269.50000 2.07000 2.93000 281.79999 2.30000 2.99000 295.20001 2.56000 3.04000 310.00000 2.87000 3.06000 326.29999 3.21000 3.00000 344.39999 3.55000 2.88000 354.29999 3.73000 2.79000 364.70001 3.90000 2.66000 387.50000 4.17000 2.38000 413.29999 4.38000 2.02000 442.79999 4.47000 1.64000 476.89999 4.49000 1.28000 496.00000 4.47000 1.12000 516.59998 4.46000 0.97000 563.59998 4.36000 0.69000 619.90002 4.23000 0.46100 652.59998 4.17000 0.36300 688.79999 4.09000 0.27100 ================================================ FILE: OptolithiumGui/share/data/fivebar.MSK ================================================ [Version] 1.2.3.4 [Parameters] fivebar ;2D Mask Name 6000.000, 3000.000, -3000.000, -3000.000 ;Mask dimensions [top,right,bottom,left] (nm) 5000.000, 2250.000, -2250.000, -2250.000 ;Simulation region [top,right,bottom,left] (nm) 1.000 ;Background intensity transmittance 0.000 ;Background phase (degrees) 20.000 ;critical shape step size for automatic generation of [CSE] data (nm) 0 ;1 = generate new [CSE] data when putting into PROLITH Database 0 ;1 = mask is clean (no overlaps), 0 = clean mask during import [Data] Polygon(0.0000, 0.00, 0) { -1575.000, 1500.000 -1225.000, 1500.000 -1225.000, -1500.000 -1575.000, -1500.000 } Polygon(0.0000, 0.00, 0) { -875.000, 1500.000 -525.000, 1500.000 -525.000, -1500.000 -875.000, -1500.000 } Polygon(0.0000, 0.00, 0) { -175.000, 4000.000 175.000, 4000.000 175.000, -1500.000 -175.000, -1500.000 } Polygon(0.0000, 0.00, 0) { 525.000, 1500.000 875.000, 1500.000 875.000, -1500.000 525.000, -1500.000 } Polygon(0.0000, 0.00, 0) { 1225.000, 1500.000 1575.000, 1500.000 1575.000, -1500.000 1225.000, -1500.000 } ================================================ FILE: OptolithiumGui/share/data/i-line.res ================================================ [Version] 1.2.3.4 [Parameters] Resist i-line Unknown 0 1 0 [Comments] Example of test i-line (365 nm) photoresist file [Develop Parameters] 1 3 ;Dev model (1=Mack, 2=Enhanced, 3=Notch) User Defined 105.0 ;Development Rmax (nm/s) 0.025 ;Development Rmin (nm/s) 1.500 ;Development n 0.700 ;Development Notch Mth 13.500 ;Development Notch n 1.000 10.000 [PAB Parameters] 1 1000.000 1.000 [PEB Parameters] 1 32.50 ;PEB Diffusivity Ea (kcal/mole) 46.000 ;PEB Diffusivity Ln(Ar) (nm2/s) ;wavelength A B C Unexposed n Completely Exposed n ; (nm) (1/um) (1/um) (cm2/mJ) [Exposure Parameters] 1 365.000 0.800 0.040 0.010 1.5 1.5 ================================================ FILE: OptolithiumGui/share/misc/magic ================================================ # Magic # Magic data for file(1) command. # Machine-generated from src/cmd/file/magdir/*; edit there only! # Format is described in magic(files), where: # files is 5 on V7 and BSD, 4 on SV, and ?? in the SVID. #------------------------------------------------------------------------------ # Localstuff: file(1) magic for locally observed files # # $File: Localstuff,v 1.4 2003/03/23 04:17:27 christos Exp $ # Add any locally observed files here. Remember: # text if readable, executable if runnable binary, data if unreadable. #------------------------------------------------------------------------------ # acorn: file(1) magic for files found on Acorn systems # # RISC OS Chunk File Format # From RISC OS Programmer's Reference Manual, Appendix D # We guess the file type from the type of the first chunk. 0 lelong 0xc3cbc6c5 RISC OS Chunk data >12 string OBJ_ \b, AOF object >12 string LIB_ \b, ALF library # RISC OS AIF, contains "SWI OS_Exit" at offset 16. 16 lelong 0xef000011 RISC OS AIF executable # RISC OS Draw files # From RISC OS Programmer's Reference Manual, Appendix E 0 string Draw RISC OS Draw file data # RISC OS new format font files # From RISC OS Programmer's Reference Manual, Appendix E 0 string FONT\0 RISC OS outline font data, >5 byte x version %d 0 string FONT\1 RISC OS 1bpp font data, >5 byte x version %d 0 string FONT\4 RISC OS 4bpp font data >5 byte x version %d # RISC OS Music files # From RISC OS Programmer's Reference Manual, Appendix E 0 string Maestro\r RISC OS music file >8 byte x version %d >8 byte x type %d # Digital Symphony data files # From: Bernard Jungen (bern8817@euphonynet.be) 0 string \x02\x01\x13\x13\x13\x01\x0d\x10 Digital Symphony sound sample (RISC OS), >8 byte x version %d, >9 pstring x named "%s", >(9.b+19) byte =0 8-bit logarithmic >(9.b+19) byte =1 LZW-compressed linear >(9.b+19) byte =2 8-bit linear signed >(9.b+19) byte =3 16-bit linear signed >(9.b+19) byte =4 SigmaDelta-compressed linear >(9.b+19) byte =5 SigmaDelta-compressed logarithmic >(9.b+19) byte >5 unknown format 0 string \x02\x01\x13\x13\x14\x12\x01\x0b Digital Symphony song (RISC OS), >8 byte x version %d, >9 byte =1 1 voice, >9 byte !1 %d voices, >10 leshort =1 1 track, >10 leshort !1 %d tracks, >12 leshort =1 1 pattern >12 leshort !1 %d patterns 0 string \x02\x01\x13\x13\x10\x14\x12\x0e >9 byte =0 Digital Symphony sequence (RISC OS), >>8 byte x version %d, >>10 byte =1 1 line, >>10 byte !1 %d lines, >>11 leshort =1 1 position >>11 leshort !1 %d positions >9 byte =1 Digital Symphony pattern data (RISC OS), >>8 byte x version %d, >>10 leshort =1 1 pattern >>10 leshort !1 %d patterns #------------------------------------------------------------------------------ # adi: file(1) magic for ADi's objects # From Gregory McGarry # 0 leshort 0x521c COFF DSP21k >18 lelong &02 executable, >18 lelong ^02 >>18 lelong &01 static object, >>18 lelong ^01 relocatable object, >18 lelong &010 stripped >18 lelong ^010 not stripped #------------------------------------------------------------------------------ # adventure: file(1) magic for Adventure game files # # from Allen Garvin # Edited by Dave Chapeskie Jun 28, 1998 # Edited by Chris Chittleborough , March 2002 # # ALAN # I assume there are other, lower versions, but these are the only ones I # saw in the archive. 0 beshort 0x0206 ALAN game data >2 byte <10 version 2.6%d # Infocom (see z-machine) #------------------------------------------------------------------------------ # Z-machine: file(1) magic for Z-machine binaries. # # This will match ${TEX_BASE}/texmf/omega/ocp/char2uni/inbig5.ocp which # appears to be a version-0 Z-machine binary. # # The (false match) message is to correct that behavior. Perhaps it is # not needed. # 16 belong&0xfe00f0f0 0x3030 Infocom game data >0 ubyte 0 (false match) >0 ubyte >0 (Z-machine %d, >>2 ubeshort x Release %d / >>18 string >\0 Serial %.6s) #------------------------------------------------------------------------------ # Glulx: file(1) magic for Glulx binaries. # # I haven't checked for false matches yet. # 0 string Glul Glulx game data >4 beshort x (Version %d >>6 byte x \b.%d >>8 byte x \b.%d) >36 string Info Compiled by Inform # For Quetzal and blorb magic see iff # TADS (Text Adventure Development System) # All files are machine-independent (games compile to byte-code) and are tagged # with a version string of the form "V2..\0" (but TADS 3 is # on the way). # Game files start with "TADS2 bin\n\r\032\0" then the compiler version. 0 string TADS2\ bin TADS >9 belong !0x0A0D1A00 game data, CORRUPTED >9 belong 0x0A0D1A00 >>13 string >\0 %s game data # Resource files start with "TADS2 rsc\n\r\032\0" then the compiler version. 0 string TADS2\ rsc TADS >9 belong !0x0A0D1A00 resource data, CORRUPTED >9 belong 0x0A0D1A00 >>13 string >\0 %s resource data # Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian # 2-byte length N, the N-char name of the game file *without* a NUL (darn!), # "TADS2 save\n\r\032\0" and the interpreter version. 0 string TADS2\ save/g TADS >12 belong !0x0A0D1A00 saved game data, CORRUPTED >12 belong 0x0A0D1A00 >>(16.s+32) string >\0 %s saved game data # Other saved game files start with "TADS2 save\n\r\032\0" and the interpreter # version. 0 string TADS2\ save TADS >10 belong !0x0A0D1A00 saved game data, CORRUPTED >10 belong 0x0A0D1A00 >>14 string >\0 %s saved game data # Danny Milosavljevic # this are adrift (adventure game standard) game files, extension .taf # depending on version magic continues with 0x93453E6139FA (V 4.0) # 0x9445376139FA (V 3.90) # 0x9445366139FA (V 3.80) # this is from source (http://www.adrift.org.uk/) and I have some taf # files, and checked them. #0 belong 0x3C423FC9 #>4 belong 0x6A87C2CF Adrift game file #!:mime application/x-adrift #------------------------------------------------------------------------------ # allegro: file(1) magic for Allegro datafiles # Toby Deshane # 0 belong 0x736C6821 Allegro datafile (packed) 0 belong 0x736C682E Allegro datafile (not packed/autodetect) 0 belong 0x736C682B Allegro datafile (appended exe data) #------------------------------------------------------------------------------ # alliant: file(1) magic for Alliant FX series a.out files # # If the FX series is the one that had a processor with a 68K-derived # instruction set, the "short" should probably become "beshort" and the # "long" should probably become "belong". # If it's the i860-based one, they should probably become either the # big-endian or little-endian versions, depending on the mode they ran # the 860 in.... # 0 short 0420 0420 Alliant virtual executable >2 short &0x0020 common library >16 long >0 not stripped 0 short 0421 0421 Alliant compact executable >2 short &0x0020 common library >16 long >0 not stripped #------------------------------------------------------------------------------ # alpha architecture description # 0 leshort 0603 COFF format alpha >22 leshort&030000 !020000 executable >24 leshort 0410 pure >24 leshort 0413 paged >22 leshort&020000 !0 dynamically linked >16 lelong !0 not stripped >16 lelong 0 stripped >22 leshort&030000 020000 shared library >24 leshort 0407 object >27 byte x - version %d >26 byte x .%d >28 byte x -%d # Basic recognition of Digital UNIX core dumps - Mike Bremford # # The actual magic number is just "Core", followed by a 2-byte version # number; however, treating any file that begins with "Core" as a Digital # UNIX core dump file may produce too many false hits, so we include one # byte of the version number as well; DU 5.0 appears only to be up to # version 2. # 0 string Core\001 Alpha COFF format core dump (Digital UNIX) >24 string >\0 \b, from '%s' 0 string Core\002 Alpha COFF format core dump (Digital UNIX) >24 string >\0 \b, from '%s' #------------------------------------------------------------------------------ # amanda: file(1) magic for amanda file format # 0 string AMANDA:\ AMANDA >8 string TAPESTART\ DATE tape header file, >>23 string X >>>25 string >\ Unused %s >>23 string >\ DATE %s >8 string FILE\ dump file, >>13 string >\ DATE %s #------------------------------------------------------------------------------ # amigaos: file(1) magic for AmigaOS binary formats: # # From ignatios@cs.uni-bonn.de (Ignatios Souvatzis) # 0 belong 0x000003fa AmigaOS shared library 0 belong 0x000003f3 AmigaOS loadseg()ble executable/binary 0 belong 0x000003e7 AmigaOS object/library data # 0 beshort 0xe310 Amiga Workbench >2 beshort 1 >>48 byte 1 disk icon >>48 byte 2 drawer icon >>48 byte 3 tool icon >>48 byte 4 project icon >>48 byte 5 garbage icon >>48 byte 6 device icon >>48 byte 7 kickstart icon >>48 byte 8 workbench application icon >2 beshort >1 icon, vers. %d # # various sound formats from the Amiga # G=F6tz Waschk # 0 string FC14 Future Composer 1.4 Module sound file 0 string SMOD Future Composer 1.3 Module sound file 0 string AON4artofnoise Art Of Noise Module sound file 1 string MUGICIAN/SOFTEYES Mugician Module sound file 58 string SIDMON\ II\ -\ THE Sidmon 2.0 Module sound file 0 string Synth4.0 Synthesis Module sound file 0 string ARP. The Holy Noise Module sound file 0 string BeEp\0 JamCracker Module sound file 0 string COSO\0 Hippel-COSO Module sound file # Too simple (short, pure ASCII, deep), MPi #26 string V.3 Brian Postma's Soundmon Module sound file v3 #26 string BPSM Brian Postma's Soundmon Module sound file v3 #26 string V.2 Brian Postma's Soundmon Module sound file v2 # The following are from: "Stefan A. Haubenthal" 0 beshort 0x0f00 AmigaOS bitmap font 0 beshort 0x0f03 AmigaOS outline font 0 belong 0x80001001 AmigaOS outline tag 0 string ##\ version catalog translation 0 string EMOD\0 Amiga E module 8 string ECXM\0 ECX module 0 string/c @database AmigaGuide file # Amiga disk types # 0 string RDSK Rigid Disk Block >160 string x on %.24s 0 string DOS\0 Amiga DOS disk 0 string DOS\1 Amiga FFS disk 0 string DOS\2 Amiga Inter DOS disk 0 string DOS\3 Amiga Inter FFS disk 0 string DOS\4 Amiga Fastdir DOS disk 0 string DOS\5 Amiga Fastdir FFS disk 0 string KICK Kickstart disk # From: Alex Beregszaszi 0 string LZX LZX compressed archive (Amiga) #------------------------------------------------------------------------------ # animation: file(1) magic for animation/movie formats # # animation formats # MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8) # FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com) # SGI and Apple formats 0 string MOVI Silicon Graphics movie file !:mime video/x-sgi-movie 4 string moov Apple QuickTime !:mime video/quicktime >12 string mvhd \b movie (fast start) >12 string mdra \b URL >12 string cmov \b movie (fast start, compressed header) >12 string rmra \b multiple URLs 4 string mdat Apple QuickTime movie (unoptimized) !:mime video/quicktime #4 string wide Apple QuickTime movie (unoptimized) #!:mime video/quicktime #4 string skip Apple QuickTime movie (modified) #!:mime video/quicktime #4 string free Apple QuickTime movie (modified) #!:mime video/quicktime 4 string idsc Apple QuickTime image (fast start) !:mime image/x-quicktime #4 string idat Apple QuickTime image (unoptimized) #!:mime image/x-quicktime 4 string pckg Apple QuickTime compressed archive !:mime application/x-quicktime-player 4 string/B jP JPEG 2000 image !:mime image/jp2 4 string ftyp ISO Media >8 string isom \b, MPEG v4 system, version 1 !:mime video/mp4 >8 string iso2 \b, MPEG v4 system, part 12 revision >8 string mp41 \b, MPEG v4 system, version 1 !:mime video/mp4 >8 string mp42 \b, MPEG v4 system, version 2 !:mime video/mp4 >8 string mp7t \b, MPEG v4 system, MPEG v7 XML >8 string mp7b \b, MPEG v4 system, MPEG v7 binary XML >8 string/B jp2 \b, JPEG 2000 !:mime image/jp2 >8 string 3gp \b, MPEG v4 system, 3GPP !:mime video/3gpp >>11 byte 4 \b v4 (H.263/AMR GSM 6.10) >>11 byte 5 \b v5 (H.263/AMR GSM 6.10) >>11 byte 6 \b v6 (ITU H.264/AMR GSM 6.10) >8 string mmp4 \b, MPEG v4 system, 3GPP Mobile !:mime video/mp4 >8 string avc1 \b, MPEG v4 system, 3GPP JVT AVC !:mime video/3gpp >8 string/B M4A \b, MPEG v4 system, iTunes AAC-LC !:mime audio/mp4 >8 string/B M4V \b, MPEG v4 system, iTunes AVC-LC !:mime video/mp4 >8 string/B M4P \b, MPEG v4 system, iTunes AES encrypted >8 string/B M4B \b, MPEG v4 system, iTunes bookmarked >8 string/B qt \b, Apple QuickTime movie !:mime video/quicktime # MPEG sequences # Scans for all common MPEG header start codes 0 belong 0x00000001 >4 byte&0x1F 0x07 JVT NAL sequence, H.264 video >>5 byte 66 \b, baseline >>5 byte 77 \b, main >>5 byte 88 \b, extended >>7 byte x \b @ L %u 0 belong&0xFFFFFF00 0x00000100 >3 byte 0xBA MPEG sequence >>4 byte &0x40 \b, v2, program multiplex >>4 byte ^0x40 \b, v1, system multiplex >3 byte 0xBB MPEG sequence, v1/2, multiplex (missing pack header) >3 byte&0x1F 0x07 MPEG sequence, H.264 video >>4 byte 66 \b, baseline >>4 byte 77 \b, main >>4 byte 88 \b, extended >>6 byte x \b @ L %u >3 byte 0xB0 MPEG sequence, v4 >>5 belong 0x000001B5 >>>9 byte &0x80 >>>>10 byte&0xF0 16 \b, video >>>>10 byte&0xF0 32 \b, still texture >>>>10 byte&0xF0 48 \b, mesh >>>>10 byte&0xF0 64 \b, face >>>9 byte&0xF8 8 \b, video >>>9 byte&0xF8 16 \b, still texture >>>9 byte&0xF8 24 \b, mesh >>>9 byte&0xF8 32 \b, face >>4 byte 1 \b, simple @ L1 >>4 byte 2 \b, simple @ L2 >>4 byte 3 \b, simple @ L3 >>4 byte 4 \b, simple @ L0 >>4 byte 17 \b, simple scalable @ L1 >>4 byte 18 \b, simple scalable @ L2 >>4 byte 33 \b, core @ L1 >>4 byte 34 \b, core @ L2 >>4 byte 50 \b, main @ L2 >>4 byte 51 \b, main @ L3 >>4 byte 53 \b, main @ L4 >>4 byte 66 \b, n-bit @ L2 >>4 byte 81 \b, scalable texture @ L1 >>4 byte 97 \b, simple face animation @ L1 >>4 byte 98 \b, simple face animation @ L2 >>4 byte 99 \b, simple face basic animation @ L1 >>4 byte 100 \b, simple face basic animation @ L2 >>4 byte 113 \b, basic animation text @ L1 >>4 byte 114 \b, basic animation text @ L2 >>4 byte 129 \b, hybrid @ L1 >>4 byte 130 \b, hybrid @ L2 >>4 byte 145 \b, advanced RT simple @ L! >>4 byte 146 \b, advanced RT simple @ L2 >>4 byte 147 \b, advanced RT simple @ L3 >>4 byte 148 \b, advanced RT simple @ L4 >>4 byte 161 \b, core scalable @ L1 >>4 byte 162 \b, core scalable @ L2 >>4 byte 163 \b, core scalable @ L3 >>4 byte 177 \b, advanced coding efficiency @ L1 >>4 byte 178 \b, advanced coding efficiency @ L2 >>4 byte 179 \b, advanced coding efficiency @ L3 >>4 byte 180 \b, advanced coding efficiency @ L4 >>4 byte 193 \b, advanced core @ L1 >>4 byte 194 \b, advanced core @ L2 >>4 byte 209 \b, advanced scalable texture @ L1 >>4 byte 210 \b, advanced scalable texture @ L2 >>4 byte 211 \b, advanced scalable texture @ L3 >>4 byte 225 \b, simple studio @ L1 >>4 byte 226 \b, simple studio @ L2 >>4 byte 227 \b, simple studio @ L3 >>4 byte 228 \b, simple studio @ L4 >>4 byte 229 \b, core studio @ L1 >>4 byte 230 \b, core studio @ L2 >>4 byte 231 \b, core studio @ L3 >>4 byte 232 \b, core studio @ L4 >>4 byte 240 \b, advanced simple @ L0 >>4 byte 241 \b, advanced simple @ L1 >>4 byte 242 \b, advanced simple @ L2 >>4 byte 243 \b, advanced simple @ L3 >>4 byte 244 \b, advanced simple @ L4 >>4 byte 245 \b, advanced simple @ L5 >>4 byte 247 \b, advanced simple @ L3b >>4 byte 248 \b, FGS @ L0 >>4 byte 249 \b, FGS @ L1 >>4 byte 250 \b, FGS @ L2 >>4 byte 251 \b, FGS @ L3 >>4 byte 252 \b, FGS @ L4 >>4 byte 253 \b, FGS @ L5 >3 byte 0xB5 MPEG sequence, v4 >>4 byte &0x80 >>>5 byte&0xF0 16 \b, video (missing profile header) >>>5 byte&0xF0 32 \b, still texture (missing profile header) >>>5 byte&0xF0 48 \b, mesh (missing profile header) >>>5 byte&0xF0 64 \b, face (missing profile header) >>4 byte&0xF8 8 \b, video (missing profile header) >>4 byte&0xF8 16 \b, still texture (missing profile header) >>4 byte&0xF8 24 \b, mesh (missing profile header) >>4 byte&0xF8 32 \b, face (missing profile header) >3 byte 0xB3 MPEG sequence >>12 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video >>12 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video >>12 belong 0x000001B5 \b, v2, >>>16 byte&0x0F 1 \b HP >>>16 byte&0x0F 2 \b Spt >>>16 byte&0x0F 3 \b SNR >>>16 byte&0x0F 4 \b MP >>>16 byte&0x0F 5 \b SP >>>17 byte&0xF0 64 \b@HL >>>17 byte&0xF0 96 \b@H-14 >>>17 byte&0xF0 128 \b@ML >>>17 byte&0xF0 160 \b@LL >>>17 byte &0x08 \b progressive >>>17 byte ^0x08 \b interlaced >>>17 byte&0x06 2 \b Y'CbCr 4:2:0 video >>>17 byte&0x06 4 \b Y'CbCr 4:2:2 video >>>17 byte&0x06 6 \b Y'CbCr 4:4:4 video >>11 byte &0x02 >>>75 byte &0x01 >>>>140 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video >>>>140 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video >>>>140 belong 0x000001B5 \b, v2, >>>>>144 byte&0x0F 1 \b HP >>>>>144 byte&0x0F 2 \b Spt >>>>>144 byte&0x0F 3 \b SNR >>>>>144 byte&0x0F 4 \b MP >>>>>144 byte&0x0F 5 \b SP >>>>>145 byte&0xF0 64 \b@HL >>>>>145 byte&0xF0 96 \b@H-14 >>>>>145 byte&0xF0 128 \b@ML >>>>>145 byte&0xF0 160 \b@LL >>>>>145 byte &0x08 \b progressive >>>>>145 byte ^0x08 \b interlaced >>>>>145 byte&0x06 2 \b Y'CbCr 4:2:0 video >>>>>145 byte&0x06 4 \b Y'CbCr 4:2:2 video >>>>>145 byte&0x06 6 \b Y'CbCr 4:4:4 video >>76 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video >>76 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video >>76 belong 0x000001B5 \b, v2, >>>80 byte&0x0F 1 \b HP >>>80 byte&0x0F 2 \b Spt >>>80 byte&0x0F 3 \b SNR >>>80 byte&0x0F 4 \b MP >>>80 byte&0x0F 5 \b SP >>>81 byte&0xF0 64 \b@HL >>>81 byte&0xF0 96 \b@H-14 >>>81 byte&0xF0 128 \b@ML >>>81 byte&0xF0 160 \b@LL >>>81 byte &0x08 \b progressive >>>81 byte ^0x08 \b interlaced >>>81 byte&0x06 2 \b Y'CbCr 4:2:0 video >>>81 byte&0x06 4 \b Y'CbCr 4:2:2 video >>>81 byte&0x06 6 \b Y'CbCr 4:4:4 video >>4 belong&0xFFFFFF00 0x78043800 \b, HD-TV 1920P >>>7 byte&0xF0 0x10 \b, 16:9 >>4 belong&0xFFFFFF00 0x50002D00 \b, SD-TV 1280I >>>7 byte&0xF0 0x10 \b, 16:9 >>4 belong&0xFFFFFF00 0x30024000 \b, PAL Capture >>>7 byte&0xF0 0x10 \b, 4:3 >>4 beshort&0xFFF0 0x2C00 \b, 4CIF >>>5 beshort&0x0FFF 0x01E0 \b NTSC >>>5 beshort&0x0FFF 0x0240 \b PAL >>>7 byte&0xF0 0x20 \b, 4:3 >>>7 byte&0xF0 0x30 \b, 16:9 >>>7 byte&0xF0 0x40 \b, 11:5 >>>7 byte&0xF0 0x80 \b, PAL 4:3 >>>7 byte&0xF0 0xC0 \b, NTSC 4:3 >>4 belong&0xFFFFFF00 0x2801E000 \b, LD-TV 640P >>>7 byte&0xF0 0x10 \b, 4:3 >>4 belong&0xFFFFFF00 0x1400F000 \b, 320x240 >>>7 byte&0xF0 0x10 \b, 4:3 >>4 belong&0xFFFFFF00 0x0F00A000 \b, 240x160 >>>7 byte&0xF0 0x10 \b, 4:3 >>4 belong&0xFFFFFF00 0x0A007800 \b, 160x120 >>>7 byte&0xF0 0x10 \b, 4:3 >>4 beshort&0xFFF0 0x1600 \b, CIF >>>5 beshort&0x0FFF 0x00F0 \b NTSC >>>5 beshort&0x0FFF 0x0120 \b PAL >>>7 byte&0xF0 0x20 \b, 4:3 >>>7 byte&0xF0 0x30 \b, 16:9 >>>7 byte&0xF0 0x40 \b, 11:5 >>>7 byte&0xF0 0x80 \b, PAL 4:3 >>>7 byte&0xF0 0xC0 \b, NTSC 4:3 >>>5 beshort&0x0FFF 0x0240 \b PAL 625 >>>>7 byte&0xF0 0x20 \b, 4:3 >>>>7 byte&0xF0 0x30 \b, 16:9 >>>>7 byte&0xF0 0x40 \b, 11:5 >>4 beshort&0xFFF0 0x2D00 \b, CCIR/ITU >>>5 beshort&0x0FFF 0x01E0 \b NTSC 525 >>>5 beshort&0x0FFF 0x0240 \b PAL 625 >>>7 byte&0xF0 0x20 \b, 4:3 >>>7 byte&0xF0 0x30 \b, 16:9 >>>7 byte&0xF0 0x40 \b, 11:5 >>4 beshort&0xFFF0 0x1E00 \b, SVCD >>>5 beshort&0x0FFF 0x01E0 \b NTSC 525 >>>5 beshort&0x0FFF 0x0240 \b PAL 625 >>>7 byte&0xF0 0x20 \b, 4:3 >>>7 byte&0xF0 0x30 \b, 16:9 >>>7 byte&0xF0 0x40 \b, 11:5 >>7 byte&0x0F 1 \b, 23.976 fps >>7 byte&0x0F 2 \b, 24 fps >>7 byte&0x0F 3 \b, 25 fps >>7 byte&0x0F 4 \b, 29.97 fps >>7 byte&0x0F 5 \b, 30 fps >>7 byte&0x0F 6 \b, 50 fps >>7 byte&0x0F 7 \b, 59.94 fps >>7 byte&0x0F 8 \b, 60 fps >>11 byte &0x04 \b, Constrained # MPEG ADTS Audio (*.mpx/mxa/aac) # from dreesen@math.fu-berlin.de # modified to fully support MPEG ADTS # MP3, M1A # modified by Joerg Jenderek # GRR the original test are too common for many DOS files # so don't accept as MP3 until we've tested the rate 0 beshort&0xFFFE 0xFFFA # rates >2 byte&0xF0 0x10 MPEG ADTS, layer III, v1, 32 kbps !:mime audio/mpeg >2 byte&0xF0 0x20 MPEG ADTS, layer III, v1, 40 kbps !:mime audio/mpeg >2 byte&0xF0 0x30 MPEG ADTS, layer III, v1, 48 kbps !:mime audio/mpeg >2 byte&0xF0 0x40 MPEG ADTS, layer III, v1, 56 kbps !:mime audio/mpeg >2 byte&0xF0 0x50 MPEG ADTS, layer III, v1, 64 kbps !:mime audio/mpeg >2 byte&0xF0 0x60 MPEG ADTS, layer III, v1, 80 kbps !:mime audio/mpeg >2 byte&0xF0 0x70 MPEG ADTS, layer III, v1, 96 kbps !:mime audio/mpeg >2 byte&0xF0 0x80 MPEG ADTS, layer III, v1, 112 kbps !:mime audio/mpeg >2 byte&0xF0 0x90 MPEG ADTS, layer III, v1, 128 kbps !:mime audio/mpeg >2 byte&0xF0 0xA0 MPEG ADTS, layer III, v1, 160 kbps !:mime audio/mpeg >2 byte&0xF0 0xB0 MPEG ADTS, layer III, v1, 192 kbps !:mime audio/mpeg >2 byte&0xF0 0xC0 MPEG ADTS, layer III, v1, 224 kbps !:mime audio/mpeg >2 byte&0xF0 0xD0 MPEG ADTS, layer III, v1, 256 kbps !:mime audio/mpeg >2 byte&0xF0 0xE0 MPEG ADTS, layer III, v1, 320 kbps !:mime audio/mpeg # timing >2 byte&0x0C 0x00 \b, 44.1 kHz >2 byte&0x0C 0x04 \b, 48 kHz >2 byte&0x0C 0x08 \b, 32 kHz # channels/options >3 byte&0xC0 0x00 \b, Stereo >3 byte&0xC0 0x40 \b, JntStereo >3 byte&0xC0 0x80 \b, 2x Monaural >3 byte&0xC0 0xC0 \b, Monaural #>1 byte ^0x01 \b, Data Verify #>2 byte &0x02 \b, Packet Pad #>2 byte &0x01 \b, Custom Flag #>3 byte &0x08 \b, Copyrighted #>3 byte &0x04 \b, Original Source #>3 byte&0x03 1 \b, NR: 50/15 ms #>3 byte&0x03 3 \b, NR: CCIT J.17 # MP2, M1A 0 beshort&0xFFFE 0xFFFC MPEG ADTS, layer II, v1 !:mime audio/mpeg # rates >2 byte&0xF0 0x10 \b, 32 kbps >2 byte&0xF0 0x20 \b, 48 kbps >2 byte&0xF0 0x30 \b, 56 kbps >2 byte&0xF0 0x40 \b, 64 kbps >2 byte&0xF0 0x50 \b, 80 kbps >2 byte&0xF0 0x60 \b, 96 kbps >2 byte&0xF0 0x70 \b, 112 kbps >2 byte&0xF0 0x80 \b, 128 kbps >2 byte&0xF0 0x90 \b, 160 kbps >2 byte&0xF0 0xA0 \b, 192 kbps >2 byte&0xF0 0xB0 \b, 224 kbps >2 byte&0xF0 0xC0 \b, 256 kbps >2 byte&0xF0 0xD0 \b, 320 kbps >2 byte&0xF0 0xE0 \b, 384 kbps # timing >2 byte&0x0C 0x00 \b, 44.1 kHz >2 byte&0x0C 0x04 \b, 48 kHz >2 byte&0x0C 0x08 \b, 32 kHz # channels/options >3 byte&0xC0 0x00 \b, Stereo >3 byte&0xC0 0x40 \b, JntStereo >3 byte&0xC0 0x80 \b, 2x Monaural >3 byte&0xC0 0xC0 \b, Monaural #>1 byte ^0x01 \b, Data Verify #>2 byte &0x02 \b, Packet Pad #>2 byte &0x01 \b, Custom Flag #>3 byte &0x08 \b, Copyrighted #>3 byte &0x04 \b, Original Source #>3 byte&0x03 1 \b, NR: 50/15 ms #>3 byte&0x03 3 \b, NR: CCIT J.17 # MPA, M1A # updated by Joerg Jenderek # GRR the original test are too common for many DOS files, so test 32 <= kbits <= 448 # GRR this test is still too general as it catches a BOM of UTF-16 files (0xFFFE) # FIXME: Almost all little endian UTF-16 text with BOM are clobbered by these entries #0 beshort&0xFFFE 0xFFFE #>2 ubyte&0xF0 >0x0F #>>2 ubyte&0xF0 <0xE1 MPEG ADTS, layer I, v1 ## rate #>>>2 byte&0xF0 0x10 \b, 32 kbps #>>>2 byte&0xF0 0x20 \b, 64 kbps #>>>2 byte&0xF0 0x30 \b, 96 kbps #>>>2 byte&0xF0 0x40 \b, 128 kbps #>>>2 byte&0xF0 0x50 \b, 160 kbps #>>>2 byte&0xF0 0x60 \b, 192 kbps #>>>2 byte&0xF0 0x70 \b, 224 kbps #>>>2 byte&0xF0 0x80 \b, 256 kbps #>>>2 byte&0xF0 0x90 \b, 288 kbps #>>>2 byte&0xF0 0xA0 \b, 320 kbps #>>>2 byte&0xF0 0xB0 \b, 352 kbps #>>>2 byte&0xF0 0xC0 \b, 384 kbps #>>>2 byte&0xF0 0xD0 \b, 416 kbps #>>>2 byte&0xF0 0xE0 \b, 448 kbps ## timing #>>>2 byte&0x0C 0x00 \b, 44.1 kHz #>>>2 byte&0x0C 0x04 \b, 48 kHz #>>>2 byte&0x0C 0x08 \b, 32 kHz ## channels/options #>>>3 byte&0xC0 0x00 \b, Stereo #>>>3 byte&0xC0 0x40 \b, JntStereo #>>>3 byte&0xC0 0x80 \b, 2x Monaural #>>>3 byte&0xC0 0xC0 \b, Monaural ##>1 byte ^0x01 \b, Data Verify ##>2 byte &0x02 \b, Packet Pad ##>2 byte &0x01 \b, Custom Flag ##>3 byte &0x08 \b, Copyrighted ##>3 byte &0x04 \b, Original Source ##>3 byte&0x03 1 \b, NR: 50/15 ms ##>3 byte&0x03 3 \b, NR: CCIT J.17 # MP3, M2A 0 beshort&0xFFFE 0xFFF2 MPEG ADTS, layer III, v2 !:mime audio/mpeg # rate >2 byte&0xF0 0x10 \b, 8 kbps >2 byte&0xF0 0x20 \b, 16 kbps >2 byte&0xF0 0x30 \b, 24 kbps >2 byte&0xF0 0x40 \b, 32 kbps >2 byte&0xF0 0x50 \b, 40 kbps >2 byte&0xF0 0x60 \b, 48 kbps >2 byte&0xF0 0x70 \b, 56 kbps >2 byte&0xF0 0x80 \b, 64 kbps >2 byte&0xF0 0x90 \b, 80 kbps >2 byte&0xF0 0xA0 \b, 96 kbps >2 byte&0xF0 0xB0 \b, 112 kbps >2 byte&0xF0 0xC0 \b, 128 kbps >2 byte&0xF0 0xD0 \b, 144 kbps >2 byte&0xF0 0xE0 \b, 160 kbps # timing >2 byte&0x0C 0x00 \b, 22.05 kHz >2 byte&0x0C 0x04 \b, 24 kHz >2 byte&0x0C 0x08 \b, 16 kHz # channels/options >3 byte&0xC0 0x00 \b, Stereo >3 byte&0xC0 0x40 \b, JntStereo >3 byte&0xC0 0x80 \b, 2x Monaural >3 byte&0xC0 0xC0 \b, Monaural #>1 byte ^0x01 \b, Data Verify #>2 byte &0x02 \b, Packet Pad #>2 byte &0x01 \b, Custom Flag #>3 byte &0x08 \b, Copyrighted #>3 byte &0x04 \b, Original Source #>3 byte&0x03 1 \b, NR: 50/15 ms #>3 byte&0x03 3 \b, NR: CCIT J.17 # MP2, M2A 0 beshort&0xFFFE 0xFFF4 MPEG ADTS, layer II, v2 # rate >2 byte&0xF0 0x10 \b, 8 kbps >2 byte&0xF0 0x20 \b, 16 kbps >2 byte&0xF0 0x30 \b, 24 kbps >2 byte&0xF0 0x40 \b, 32 kbps >2 byte&0xF0 0x50 \b, 40 kbps >2 byte&0xF0 0x60 \b, 48 kbps >2 byte&0xF0 0x70 \b, 56 kbps >2 byte&0xF0 0x80 \b, 64 kbps >2 byte&0xF0 0x90 \b, 80 kbps >2 byte&0xF0 0xA0 \b, 96 kbps >2 byte&0xF0 0xB0 \b, 112 kbps >2 byte&0xF0 0xC0 \b, 128 kbps >2 byte&0xF0 0xD0 \b, 144 kbps >2 byte&0xF0 0xE0 \b, 160 kbps # timing >2 byte&0x0C 0x00 \b, 22.05 kHz >2 byte&0x0C 0x04 \b, 24 kHz >2 byte&0x0C 0x08 \b, 16 kHz # channels/options >3 byte&0xC0 0x00 \b, Stereo >3 byte&0xC0 0x40 \b, JntStereo >3 byte&0xC0 0x80 \b, 2x Monaural >3 byte&0xC0 0xC0 \b, Monaural #>1 byte ^0x01 \b, Data Verify #>2 byte &0x02 \b, Packet Pad #>2 byte &0x01 \b, Custom Flag #>3 byte &0x08 \b, Copyrighted #>3 byte &0x04 \b, Original Source #>3 byte&0x03 1 \b, NR: 50/15 ms #>3 byte&0x03 3 \b, NR: CCIT J.17 # MPA, M2A 0 beshort&0xFFFE 0xFFF6 MPEG ADTS, layer I, v2 # rate >2 byte&0xF0 0x10 \b, 32 kbps >2 byte&0xF0 0x20 \b, 48 kbps >2 byte&0xF0 0x30 \b, 56 kbps >2 byte&0xF0 0x40 \b, 64 kbps >2 byte&0xF0 0x50 \b, 80 kbps >2 byte&0xF0 0x60 \b, 96 kbps >2 byte&0xF0 0x70 \b, 112 kbps >2 byte&0xF0 0x80 \b, 128 kbps >2 byte&0xF0 0x90 \b, 144 kbps >2 byte&0xF0 0xA0 \b, 160 kbps >2 byte&0xF0 0xB0 \b, 176 kbps >2 byte&0xF0 0xC0 \b, 192 kbps >2 byte&0xF0 0xD0 \b, 224 kbps >2 byte&0xF0 0xE0 \b, 256 kbps # timing >2 byte&0x0C 0x00 \b, 22.05 kHz >2 byte&0x0C 0x04 \b, 24 kHz >2 byte&0x0C 0x08 \b, 16 kHz # channels/options >3 byte&0xC0 0x00 \b, Stereo >3 byte&0xC0 0x40 \b, JntStereo >3 byte&0xC0 0x80 \b, 2x Monaural >3 byte&0xC0 0xC0 \b, Monaural #>1 byte ^0x01 \b, Data Verify #>2 byte &0x02 \b, Packet Pad #>2 byte &0x01 \b, Custom Flag #>3 byte &0x08 \b, Copyrighted #>3 byte &0x04 \b, Original Source #>3 byte&0x03 1 \b, NR: 50/15 ms #>3 byte&0x03 3 \b, NR: CCIT J.17 # MP3, M25A 0 beshort&0xFFFE 0xFFE2 MPEG ADTS, layer III, v2.5 # rate >2 byte&0xF0 0x10 \b, 8 kbps >2 byte&0xF0 0x20 \b, 16 kbps >2 byte&0xF0 0x30 \b, 24 kbps >2 byte&0xF0 0x40 \b, 32 kbps >2 byte&0xF0 0x50 \b, 40 kbps >2 byte&0xF0 0x60 \b, 48 kbps >2 byte&0xF0 0x70 \b, 56 kbps >2 byte&0xF0 0x80 \b, 64 kbps >2 byte&0xF0 0x90 \b, 80 kbps >2 byte&0xF0 0xA0 \b, 96 kbps >2 byte&0xF0 0xB0 \b, 112 kbps >2 byte&0xF0 0xC0 \b, 128 kbps >2 byte&0xF0 0xD0 \b, 144 kbps >2 byte&0xF0 0xE0 \b, 160 kbps # timing >2 byte&0x0C 0x00 \b, 11.025 kHz >2 byte&0x0C 0x04 \b, 12 kHz >2 byte&0x0C 0x08 \b, 8 kHz # channels/options >3 byte&0xC0 0x00 \b, Stereo >3 byte&0xC0 0x40 \b, JntStereo >3 byte&0xC0 0x80 \b, 2x Monaural >3 byte&0xC0 0xC0 \b, Monaural #>1 byte ^0x01 \b, Data Verify #>2 byte &0x02 \b, Packet Pad #>2 byte &0x01 \b, Custom Flag #>3 byte &0x08 \b, Copyrighted #>3 byte &0x04 \b, Original Source #>3 byte&0x03 1 \b, NR: 50/15 ms #>3 byte&0x03 3 \b, NR: CCIT J.17 # AAC (aka MPEG-2 NBC audio) and MPEG-4 audio # Stored AAC streams (instead of the MP4 format) 0 string ADIF MPEG ADIF, AAC !:mime audio/x-hx-aac-adif >4 byte &0x80 >>13 byte &0x10 \b, VBR >>13 byte ^0x10 \b, CBR >>16 byte&0x1E 0x02 \b, single stream >>16 byte&0x1E 0x04 \b, 2 streams >>16 byte&0x1E 0x06 \b, 3 streams >>16 byte &0x08 \b, 4 or more streams >>16 byte &0x10 \b, 8 or more streams >>4 byte &0x80 \b, Copyrighted >>13 byte &0x40 \b, Original Source >>13 byte &0x20 \b, Home Flag >4 byte ^0x80 >>4 byte &0x10 \b, VBR >>4 byte ^0x10 \b, CBR >>7 byte&0x1E 0x02 \b, single stream >>7 byte&0x1E 0x04 \b, 2 streams >>7 byte&0x1E 0x06 \b, 3 streams >>7 byte &0x08 \b, 4 or more streams >>7 byte &0x10 \b, 8 or more streams >>4 byte &0x40 \b, Original Stream(s) >>4 byte &0x20 \b, Home Source # Live or stored single AAC stream (used with MPEG-2 systems) 0 beshort&0xFFF6 0xFFF0 MPEG ADTS, AAC !:mime audio/x-hx-aac-adts >1 byte &0x08 \b, v2 >1 byte ^0x08 \b, v4 # profile >>2 byte &0xC0 \b LTP >2 byte&0xc0 0x00 \b Main >2 byte&0xc0 0x40 \b LC >2 byte&0xc0 0x80 \b SSR # timing >2 byte&0x3c 0x00 \b, 96 kHz >2 byte&0x3c 0x04 \b, 88.2 kHz >2 byte&0x3c 0x08 \b, 64 kHz >2 byte&0x3c 0x0c \b, 48 kHz >2 byte&0x3c 0x10 \b, 44.1 kHz >2 byte&0x3c 0x14 \b, 32 kHz >2 byte&0x3c 0x18 \b, 24 kHz >2 byte&0x3c 0x1c \b, 22.05 kHz >2 byte&0x3c 0x20 \b, 16 kHz >2 byte&0x3c 0x24 \b, 12 kHz >2 byte&0x3c 0x28 \b, 11.025 kHz >2 byte&0x3c 0x2c \b, 8 kHz # channels >2 beshort&0x01c0 0x0040 \b, monaural >2 beshort&0x01c0 0x0080 \b, stereo >2 beshort&0x01c0 0x00c0 \b, stereo + center >2 beshort&0x01c0 0x0100 \b, stereo+center+LFE >2 beshort&0x01c0 0x0140 \b, surround >2 beshort&0x01c0 0x0180 \b, surround + LFE >2 beshort &0x01C0 \b, surround + side #>1 byte ^0x01 \b, Data Verify #>2 byte &0x02 \b, Custom Flag #>3 byte &0x20 \b, Original Stream #>3 byte &0x10 \b, Home Source #>3 byte &0x08 \b, Copyrighted # Live MPEG-4 audio streams (instead of RTP FlexMux) 0 beshort&0xFFE0 0x56E0 MPEG-4 LOAS !:mime audio/x-mp4a-latm #>1 beshort&0x1FFF x \b, %u byte packet >3 byte&0xE0 0x40 >>4 byte&0x3C 0x04 \b, single stream >>4 byte&0x3C 0x08 \b, 2 streams >>4 byte&0x3C 0x0C \b, 3 streams >>4 byte &0x08 \b, 4 or more streams >>4 byte &0x20 \b, 8 or more streams >3 byte&0xC0 0 >>4 byte&0x78 0x08 \b, single stream >>4 byte&0x78 0x10 \b, 2 streams >>4 byte&0x78 0x18 \b, 3 streams >>4 byte &0x20 \b, 4 or more streams >>4 byte &0x40 \b, 8 or more streams # This magic isn't strong enough (matches plausible ISO-8859-1 text) #0 beshort 0x4DE1 MPEG-4 LO-EP audio stream #!:mime audio/x-mp4a-latm # Summary: FLI animation format # Created by: Daniel Quinlan # Modified by (1): Abel Cheung (avoid over-generic detection) 4 leshort 0xAF11 # standard FLI always has 320x200 resolution and 8 bit color >8 leshort 320 >>10 leshort 200 >>>12 leshort 8 FLI animation, 320x200x8 !:mime video/x-fli >>>>6 leshort x \b, %d frames # frame speed is multiple of 1/70s >>>>16 leshort x \b, %d/70s per frame # Summary: FLC animation format # Created by: Daniel Quinlan # Modified by (1): Abel Cheung (avoid over-generic detection) 4 leshort 0xAF12 # standard FLC always use 8 bit color >12 leshort 8 FLC animation !:mime video/x-flc >>8 leshort x \b, %d >>10 leshort x \bx%dx8 >>6 uleshort x \b, %d frames >>16 uleshort x \b, %dms per frame # DL animation format # XXX - collision with most `mips' magic # # I couldn't find a real magic number for these, however, this # -appears- to work. Note that it might catch other files, too, so be # careful! # # Note that title and author appear in the two 20-byte chunks # at decimal offsets 2 and 22, respectively, but they are XOR'ed with # 255 (hex FF)! The DL format is really bad. # #0 byte 1 DL version 1, medium format (160x100, 4 images/screen) #!:mime video/x-unknown #>42 byte x - %d screens, #>43 byte x %d commands #0 byte 2 DL version 2 #!:mime video/x-unknown #>1 byte 1 - large format (320x200,1 image/screen), #>1 byte 2 - medium format (160x100,4 images/screen), #>1 byte >2 - unknown format, #>42 byte x %d screens, #>43 byte x %d commands # Based on empirical evidence, DL version 3 have several nulls following the # \003. Most of them start with non-null values at hex offset 0x34 or so. #0 string \3\0\0\0\0\0\0\0\0\0\0\0 DL version 3 # iso 13818 transport stream # # from Oskar Schirmer Feb 3, 2001 (ISO 13818.1) # (the following is a little bit restrictive and works fine for a stream # that starts with PAT properly. it won't work for stream data, that is # cut from an input device data right in the middle, but this shouldn't # disturb) # syncbyte 8 bit 0x47 # error_ind 1 bit - # payload_start 1 bit 1 # priority 1 bit - # PID 13 bit 0x0000 # scrambling 2 bit - # adaptfld_ctrl 2 bit 1 or 3 # conti_count 4 bit 0 0 belong&0xFF5FFF1F 0x47400010 MPEG transport stream data >188 byte !0x47 CORRUPTED # DIF digital video file format 0 belong&0xffffff00 0x1f070000 DIF >4 byte &0x01 (DVCPRO) movie file >4 byte ^0x01 (DV) movie file >3 byte &0x80 (PAL) >3 byte ^0x80 (NTSC) # Microsoft Advanced Streaming Format (ASF) 0 belong 0x3026b275 Microsoft ASF # MNG Video Format, 0 string \x8aMNG MNG video data, !:mime video/x-mng >4 belong !0x0d0a1a0a CORRUPTED, >4 belong 0x0d0a1a0a >>16 belong x %ld x >>20 belong x %ld # JNG Video Format, 0 string \x8bJNG JNG video data, !:mime video/x-jng >4 belong !0x0d0a1a0a CORRUPTED, >4 belong 0x0d0a1a0a >>16 belong x %ld x >>20 belong x %ld # Vivo video (Wolfram Kleff) 3 string \x0D\x0AVersion:Vivo Vivo video data # VRML (Virtual Reality Modelling Language) 0 string/b #VRML\ V1.0\ ascii VRML 1 file !:mime model/vrml 0 string/b #VRML\ V2.0\ utf8 ISO/IEC 14772 VRML 97 file !:mime model/vrml # X3D (Extensible 3D) [http://www.web3d.org/specifications/x3d-3.0.dtd] # From Michel Briand 0 string \20 search/1000/cb \, 2002-10-03 # 0 string HVQM4 %s >6 string >\0 v%s >0 byte x GameCube movie, >0x34 ubeshort x %d x >0x36 ubeshort x %d, >0x26 ubeshort x %dµs, >0x42 ubeshort 0 no audio >0x42 ubeshort >0 %dHz audio # From: "Stefan A. Haubenthal" 0 string DVDVIDEO-VTS Video title set, >0x21 byte x v%x 0 string DVDVIDEO-VMG Video manager, >0x21 byte x v%x # From: Behan Webster # NuppelVideo used by Mythtv (*.nuv) # Note: there are two identical stanzas here differing only in the # initial string matched. It used to be done with a regex, but we're # trying to get rid of those. 0 string NuppelVideo MythTV NuppelVideo >12 string x v%s >20 lelong x (%d >24 lelong x \bx%d), >36 string P \bprogressive, >36 string I \binterlaced, >40 ledouble x \baspect:%.2f, >48 ledouble x \bfps:%.2f 0 string MythTV MythTV NuppelVideo >12 string x v%s >20 lelong x (%d >24 lelong x \bx%d), >36 string P \bprogressive, >36 string I \binterlaced, >40 ledouble x \baspect:%.2f, >48 ledouble x \bfps:%.2f # MPEG file # MPEG sequences # FIXME: This section is from the old magic.mime file and needs integrating with the rest 0 belong 0x000001BA >4 byte &0x40 !:mime video/mp2p >4 byte ^0x40 !:mime video/mpeg 0 belong 0x000001BB !:mime video/mpeg 0 belong 0x000001B0 !:mime video/mp4v-es 0 belong 0x000001B5 !:mime video/mp4v-es 0 belong 0x000001B3 !:mime video/mpv 0 belong&0xFF5FFF1F 0x47400010 !:mime video/mp2t 0 belong 0x00000001 >4 byte&0x1F 0x07 !:mime video/h264 # Type: Bink Video # URL: http://wiki.multimedia.cx/index.php?title=3DBink_Container # From: 2008-07-18 0 string BIK Bink Video >3 regex =[a-z] rev.%s #>4 ulelong x size %d >20 ulelong x \b, %d >24 ulelong x \bx%d >8 ulelong x \b, %d frames >32 ulelong x at rate %d/ >28 ulelong >1 \b%d >40 ulelong =0 \b, no audio >40 ulelong !0 \b, %d audio track >>40 ulelong !1 \bs # follow properties of the first audio track only >>48 uleshort x %dHz >>51 byte&0x20 0 mono >>51 byte&0x20 !0 stereo #>>51 byte&0x10 0 FFT #>>51 byte&0x10 !0 DCT #------------------------------------------------------------------------------ # apl: file(1) magic for APL (see also "pdp" and "vax" for other APL # workspaces) # 0 long 0100554 APL workspace (Ken's original?) #------------------------------------------------------------------------------ # apple: file(1) magic for Apple file formats # 0 search/1 FiLeStArTfIlEsTaRt binscii (apple ][) text 0 string \x0aGL Binary II (apple ][) data 0 string \x76\xff Squeezed (apple ][) data 0 string NuFile NuFile archive (apple ][) data 0 string N\xf5F\xe9l\xe5 NuFile archive (apple ][) data 0 belong 0x00051600 AppleSingle encoded Macintosh file 0 belong 0x00051607 AppleDouble encoded Macintosh file # Type: Apple Emulator 2IMG format # From: Radek Vokal 0 string 2IMG Apple ][ 2IMG Disk Image >4 string XGS! \b, XGS >4 string CTKG \b, Catakig >4 string ShIm \b, Sheppy's ImageMaker >4 string WOOF \b, Sweet 16 >4 string B2TR \b, Bernie ][ the Rescue >4 string !nfc \b, ASIMOV2 >4 string x \b, Unknown Format >0xc byte 00 \b, DOS 3.3 sector order >>0x10 byte 00 \b, Volume 254 >>0x10 byte&0x7f x \b, Volume %u >0xc byte 01 \b, ProDOS sector order >>0x14 short x \b, %u Blocks >0xc byte 02 \b, NIB data # magic for Newton PDA package formats # from Ruda Moura 0 string package0 Newton package, NOS 1.x, >12 belong &0x80000000 AutoRemove, >12 belong &0x40000000 CopyProtect, >12 belong &0x10000000 NoCompression, >12 belong &0x04000000 Relocation, >12 belong &0x02000000 UseFasterCompression, >16 belong x version %d 0 string package1 Newton package, NOS 2.x, >12 belong &0x80000000 AutoRemove, >12 belong &0x40000000 CopyProtect, >12 belong &0x10000000 NoCompression, >12 belong &0x04000000 Relocation, >12 belong &0x02000000 UseFasterCompression, >16 belong x version %d 0 string package4 Newton package, >8 byte 8 NOS 1.x, >8 byte 9 NOS 2.x, >12 belong &0x80000000 AutoRemove, >12 belong &0x40000000 CopyProtect, >12 belong &0x10000000 NoCompression, # The following entries for the Apple II are for files that have # been transferred as raw binary data from an Apple, without having # been encapsulated by any of the above archivers. # # In general, Apple II formats are hard to identify because Apple DOS # and especially Apple ProDOS have strong typing in the file system and # therefore programmers never felt much need to include type information # in the files themselves. # # Eric Fischer # AppleWorks word processor: # # This matches the standard tab stops for an AppleWorks file, but if # a file has a tab stop set in the first four columns this will fail. # # The "O" is really the magic number, but that's so common that it's # necessary to check the tab stops that follow it to avoid false positives. 4 string O==== AppleWorks word processor data >85 byte&0x01 >0 \b, zoomed >90 byte&0x01 >0 \b, paginated >92 byte&0x01 >0 \b, with mail merge #>91 byte x \b, left margin %d # AppleWorks database: # # This isn't really a magic number, but it's the closest thing to one # that I could find. The 1 and 2 really mean "order in which you defined # categories" and "left to right, top to bottom," respectively; the D and R # mean that the cursor should move either down or right when you press Return. #30 string \x01D AppleWorks database data #30 string \x02D AppleWorks database data #30 string \x01R AppleWorks database data #30 string \x02R AppleWorks database data # AppleWorks spreadsheet: # # Likewise, this isn't really meant as a magic number. The R or C means # row- or column-order recalculation; the A or M means automatic or manual # recalculation. #131 string RA AppleWorks spreadsheet data #131 string RM AppleWorks spreadsheet data #131 string CA AppleWorks spreadsheet data #131 string CM AppleWorks spreadsheet data # Applesoft BASIC: # # This is incredibly sloppy, but will be true if the program was # written at its usual memory location of 2048 and its first line # number is less than 256. Yuck. 0 belong&0xff00ff 0x80000 Applesoft BASIC program data #>2 leshort x \b, first line number %d # ORCA/EZ assembler: # # This will not identify ORCA/M source files, since those have # some sort of date code instead of the two zero bytes at 6 and 7 # XXX Conflicts with ELF #4 belong&0xff00ffff 0x01000000 ORCA/EZ assembler source data #>5 byte x \b, build number %d # Broderbund Fantavision # # I don't know what these values really mean, but they seem to recur. # Will they cause too many conflicts? # Probably :-) #2 belong&0xFF00FF 0x040008 Fantavision movie data # Some attempts at images. # # These are actually just bit-for-bit dumps of the frame buffer, so # there's really no reasonably way to distinguish them except for their # address (if preserved) -- 8192 or 16384 -- and their length -- 8192 # or, occasionally, 8184. # # Nevertheless this will manage to catch a lot of images that happen # to have a solid-colored line at the bottom of the screen. # GRR: Magic too weak #8144 string \x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F Apple II image with white background #8144 string \x55\x2A\x55\x2A\x55\x2A\x55\x2A Apple II image with purple background #8144 string \x2A\x55\x2A\x55\x2A\x55\x2A\x55 Apple II image with green background #8144 string \xD5\xAA\xD5\xAA\xD5\xAA\xD5\xAA Apple II image with blue background #8144 string \xAA\xD5\xAA\xD5\xAA\xD5\xAA\xD5 Apple II image with orange background # Beagle Bros. Apple Mechanic fonts 0 belong&0xFF00FFFF 0x6400D000 Apple Mechanic font # Apple Universal Disk Image Format (UDIF) - dmg files. # From Johan Gade. # These entries are disabled for now until we fix the following issues. # # Note there might be some problems with the "VAX COFF executable" # entry. Note this entry should be placed before the mac filesystem section, # particularly the "Apple Partition data" entry. # # The intended meaning of these tests is, that the file is only of the # specified type if both of the lines are correct - i.e. if the first # line matches and the second doesn't then it is not of that type. # #0 long 0x7801730d #>4 long 0x62626060 UDIF read-only zlib-compressed image (UDZO) # # Note that this entry is recognized correctly by the "Apple Partition # data" entry - however since this entry is more specific - this # information seems to be more useful. #0 long 0x45520200 #>0x410 string disk\ image UDIF read/write image (UDRW) # From: Toby Peterson 0 string bplist00 Apple binary property list # Apple binary property list (bplist) # Assumes version bytes are hex. # Provides content hints for version 0 files. Assumes that the root # object is the first object (true for CoreFoundation implementation). # From: David Remahl 0 string bplist >6 byte x \bCoreFoundation binary property list data, version 0x%c >>7 byte x \b%c >6 string 00 \b >>8 byte&0xF0 0x00 \b >>>8 byte&0x0F 0x00 \b, root type: null >>>8 byte&0x0F 0x08 \b, root type: false boolean >>>8 byte&0x0F 0x09 \b, root type: true boolean >>8 byte&0xF0 0x10 \b, root type: integer >>8 byte&0xF0 0x20 \b, root type: real >>8 byte&0xF0 0x30 \b, root type: date >>8 byte&0xF0 0x40 \b, root type: data >>8 byte&0xF0 0x50 \b, root type: ascii string >>8 byte&0xF0 0x60 \b, root type: unicode string >>8 byte&0xF0 0x80 \b, root type: uid (CORRUPT) >>8 byte&0xF0 0xa0 \b, root type: array >>8 byte&0xF0 0xd0 \b, root type: dictionary # Apple/NeXT typedstream data # Serialization format used by NeXT and Apple for various # purposes in YellowStep/Cocoa, including some nib files. # From: David Remahl 2 string typedstream NeXT/Apple typedstream data, big endian >0 byte x \b, version %hhd >0 byte <5 \b >>13 byte 0x81 \b >>>14 ubeshort x \b, system %hd 2 string streamtyped NeXT/Apple typedstream data, little endian >0 byte x \b, version %hhd >0 byte <5 \b >>13 byte 0x81 \b >>>14 uleshort x \b, system %hd #------------------------------------------------------------------------------ # CAF: Apple CoreAudio File Format # # Container format for high-end audio purposes. # From: David Remahl # 0 string caff CoreAudio Format audio file >4 beshort <10 version %d >6 beshort x #------------------------------------------------------------------------------ # Keychain database files 0 string kych Mac OS X Keychain File #------------------------------------------------------------------------------ # Code Signing related file types 0 belong 0xfade0c00 Mac OS X Code Requirement >8 belong 1 (opExpr) >4 belong x - %d bytes 0 belong 0xfade0c01 Mac OS X Code Requirement Set >8 belong >1 containing %d items >4 belong x - %d bytes 0 belong 0xfade0c02 Mac OS X Code Directory >8 belong x version %x >12 belong >0 flags 0x%x >4 belong x - %d bytes 0 belong 0xfade0cc0 Mac OS X Detached Code Signature (non-executable) >4 belong x - %d bytes 0 belong 0xfade0cc1 Mac OS X Detached Code Signature >8 belong >1 (%d elements) >4 belong x - %d bytes # From: "Nelson A. de Oliveira" # .vdi 4 string innotek\ VirtualBox\ Disk\ Image %s #------------------------------------------------------------------------------ # applix: file(1) magic for Applixware # From: Peter Soos # 0 string *BEGIN Applixware >7 string WORDS Words Document >7 string GRAPHICS Graphic >7 string RASTER Bitmap >7 string SPREADSHEETS Spreadsheet >7 string MACRO Macro >7 string BUILDER Builder Object #------------------------------------------------------------------------------ # archive: file(1) magic for archive formats (see also "msdos" for self- # extracting compressed archives) # # cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc. # pre-POSIX "tar" archives are handled in the C code. # POSIX tar archives 257 string ustar\0 POSIX tar archive !:mime application/x-tar # encoding: posix 257 string ustar\040\040\0 GNU tar archive !:mime application/x-tar # encoding: gnu # cpio archives # # Yes, the top two "cpio archive" formats *are* supposed to just be "short". # The idea is to indicate archives produced on machines with the same # byte order as the machine running "file" with "cpio archive", and # to indicate archives produced on machines with the opposite byte order # from the machine running "file" with "byte-swapped cpio archive". # # The SVR4 "cpio(4)" hints that there are additional formats, but they # are defined as "short"s; I think all the new formats are # character-header formats and thus are strings, not numbers. 0 short 070707 cpio archive !:mime application/x-cpio 0 short 0143561 byte-swapped cpio archive !:mime application/x-cpio # encoding: swapped 0 string 070707 ASCII cpio archive (pre-SVR4 or odc) 0 string 070701 ASCII cpio archive (SVR4 with no CRC) 0 string 070702 ASCII cpio archive (SVR4 with CRC) # Debian package (needs to go before regular portable archives) # 0 string =!\ndebian !:mime application/x-debian-package >8 string debian-split part of multipart Debian package >8 string debian-binary Debian binary package >8 string !debian >68 string >\0 (format %s) # These next two lines do not work, because a bzip2 Debian archive # still uses gzip for the control.tar (first in the archive). Only # data.tar varies, and the location of its filename varies too. # file/libmagic does not current have support for ascii-string based # (offsets) as of 2005-09-15. #>81 string bz2 \b, uses bzip2 compression #>84 string gz \b, uses gzip compression #>136 ledate x created: %s # other archives 0 long 0177555 very old archive 0 short 0177555 very old PDP-11 archive 0 long 0177545 old archive 0 short 0177545 old PDP-11 archive 0 long 0100554 apl workspace 0 string = archive !:mime application/x-archive # MIPS archive (needs to go before regular portable archives) # 0 string =!\n__________E MIPS archive >20 string U with MIPS Ucode members >21 string L with MIPSEL members >21 string B with MIPSEB members >19 string L and an EL hash table >19 string B and an EB hash table >22 string X -- out of date 0 search/1 -h- Software Tools format archive text # # XXX - why are there multiple thingies? Note that 0x213c6172 is # "! current ar archive # 0 long 0x213c6172 archive file # # and for SVR1 archives, we have: # # 0 string \ System V Release 1 ar archive # 0 string = archive # # XXX - did Aegis really store shared libraries, breakpointed modules, # and absolute code program modules in the same format as new-style # "ar" archives? # 0 string =! current ar archive !:mime application/x-archive >8 string __.SYMDEF random library >0 belong =65538 - pre SR9.5 >0 belong =65539 - post SR9.5 >0 beshort 2 - object archive >0 beshort 3 - shared library module >0 beshort 4 - debug break-pointed module >0 beshort 5 - absolute code program module 0 string \ System V Release 1 ar archive 0 string = archive # # XXX - from "vax", which appears to collect a bunch of byte-swapped # thingies, to help you recognize VAX files on big-endian machines; # with "leshort", "lelong", and "string", that's no longer necessary.... # 0 belong 0x65ff0000 VAX 3.0 archive 0 belong 0x3c61723e VAX 5.0 archive # 0 long 0x213c6172 archive file 0 lelong 0177555 very old VAX archive 0 leshort 0177555 very old PDP-11 archive # # XXX - "pdp" claims that 0177545 can have an __.SYMDEF member and thus # be a random library (it said 0xff65 rather than 0177545). # 0 lelong 0177545 old VAX archive >8 string __.SYMDEF random library 0 leshort 0177545 old PDP-11 archive >8 string __.SYMDEF random library # # From "pdp" (but why a 4-byte quantity?) # 0 lelong 0x39bed PDP-11 old archive 0 lelong 0x39bee PDP-11 4.0 archive # ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com) # # The first byte is the magic (0x1a), byte 2 is the compression type for # the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS # filename of the first file (null terminated). Since some types collide # we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%), # 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo. 0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW !:mime application/x-arc 0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed !:mime application/x-arc 0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed !:mime application/x-arc 0 lelong&0x8080ffff 0x0000031a ARC archive data, packed !:mime application/x-arc 0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed !:mime application/x-arc 0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched !:mime application/x-arc # [JW] stuff taken from idarc, obviously ARC successors: 0 lelong&0x8080ffff 0x00000a1a PAK archive data !:mime application/x-arc 0 lelong&0x8080ffff 0x0000141a ARC+ archive data !:mime application/x-arc 0 lelong&0x8080ffff 0x0000481a HYP archive data !:mime application/x-arc # Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk) # I can't create either SPARK or ArcFS archives so I have not tested this stuff # [GRR: the original entries collide with ARC, above; replaced with combined # version (not tested)] #0 byte 0x1a RISC OS archive (spark format) 0 string \032archive RISC OS archive (ArcFS format) 0 string Archive\000 RISC OS archive (ArcFS format) # All these were taken from idarc, many could not be verified. Unfortunately, # there were many low-quality sigs, i.e. easy to trigger false positives. # Please notify me of any real-world fishy/ambiguous signatures and I'll try # to get my hands on the actual archiver and see if I find something better. [JW] # probably many can be enhanced by finding some 0-byte or control char near the start # idarc calls this Crush/Uncompressed... *shrug* 0 string CRUSH Crush archive data # Squeeze It (.sqz) 0 string HLSQZ Squeeze It archive data # SQWEZ 0 string SQWEZ SQWEZ archive data # HPack (.hpk) 0 string HPAK HPack archive data # HAP 0 string \x91\x33HF HAP archive data # MD/MDCD 0 string MDmd MDCD archive data # LIM 0 string LIM\x1a LIM archive data # SAR 3 string LH5 SAR archive data # BSArc/BS2 0 string \212\3SB \0 BSArc/BS2 archive data # MAR 2 string =-ah MAR archive data # ACB 0 belong&0x00f800ff 0x00800000 ACB archive data # CPZ # TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data # JRC 0 string JRchive JRC archive data # Quantum 0 string DS\0 Quantum archive data # ReSOF 0 string PK\3\6 ReSOF archive data # QuArk 0 string 7\4 QuArk archive data # YAC 14 string YC YAC archive data # X1 0 string X1 X1 archive data 0 string XhDr X1 archive data # CDC Codec (.dqt) 0 belong&0xffffe000 0x76ff2000 CDC Codec archive data # AMGC 0 string \xad6" AMGC archive data # NuLIB 0 string NõFélå NuLIB archive data # PakLeo 0 string LEOLZW PAKLeo archive data # ChArc 0 string SChF ChArc archive data # PSA 0 string PSA PSA archive data # CrossePAC 0 string DSIGDCC CrossePAC archive data # Freeze 0 string \x1f\x9f\x4a\x10\x0a Freeze archive data # KBoom 0 string ¨MP¨ KBoom archive data # NSQ, must go after CDC Codec 0 string \x76\xff NSQ archive data # DPA 0 string Dirk\ Paehl DPA archive data # BA # TODO: idarc says "bytes 0-2 == bytes 3-5" # TTComp 0 string \0\6 TTComp archive data # ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation? 0 string ESP ESP archive data # ZPack 0 string \1ZPK\1 ZPack archive data # Sky 0 string \xbc\x40 Sky archive data # UFA 0 string UFA UFA archive data # Dry 0 string =-H2O DRY archive data # FoxSQZ 0 string FOXSQZ FoxSQZ archive data # AR7 0 string ,AR7 AR7 archive data # PPMZ 0 string PPMZ PPMZ archive data # MS Compress 4 string \x88\xf0\x27 MS Compress archive data # updated by Joerg Jenderek >9 string \0 >>0 string KWAJ >>>7 string \321\003 MS Compress archive data >>>>14 ulong >0 \b, original size: %ld bytes >>>>18 ubyte >0x65 >>>>>18 string x \b, was %.8s >>>>>(10.b-4) string x \b.%.3s # MP3 (archiver, not lossy audio compression) 0 string MP3\x1a MP3-Archiver archive data # ZET 0 string OZÝ ZET archive data # TSComp 0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data # ARQ 0 string gW\4\1 ARQ archive data # Squash 3 string OctSqu Squash archive data # Terse 0 string \5\1\1\0 Terse archive data # PUCrunch 0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data # UHarc 0 string UHA UHarc archive data # ABComp 0 string \2AB ABComp archive data 0 string \3AB2 ABComp archive data # CMP 0 string CO\0 CMP archive data # Splint 0 string \x93\xb9\x06 Splint archive data # InstallShield 0 string \x13\x5d\x65\x8c InstallShield Z archive Data # Gather 1 string GTH Gather archive data # BOA 0 string BOA BOA archive data # RAX 0 string ULEB\xa RAX archive data # Xtreme 0 string ULEB\0 Xtreme archive data # Pack Magic 0 string @â\1\0 Pack Magic archive data # BTS 0 belong&0xfeffffff 0x1a034465 BTS archive data # ELI 5750 0 string Ora\ ELI 5750 archive data # QFC 0 string \x1aFC\x1a QFC archive data 0 string \x1aQF\x1a QFC archive data # PRO-PACK 0 string RNC PRO-PACK archive data # 777 0 string 777 777 archive data # LZS221 0 string sTaC LZS221 archive data # HPA 0 string HPA HPA archive data # Arhangel 0 string LG Arhangel archive data # EXP1, uses bzip2 0 string 0123456789012345BZh EXP1 archive data # IMP 0 string IMP\xa IMP archive data # NRV 0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data # Squish 0 string \x73\xb2\x90\xf4 Squish archive data # Par 0 string PHILIPP Par archive data 0 string PAR Par archive data # HIT 0 string UB HIT archive data # SBX 0 belong&0xfffff000 0x53423000 SBX archive data # NaShrink 0 string NSK NaShrink archive data # SAPCAR 0 string #\ CAR\ archive\ header SAPCAR archive data 0 string CAR\ 2.00RG SAPCAR archive data # Disintegrator 0 string DST Disintegrator archive data # ASD 0 string ASD ASD archive data # InstallShield CAB 0 string ISc( InstallShield CAB # TOP4 0 string T4\x1a TOP4 archive data # BatComp left out: sig looks like COM executable # so TODO: get real 4dos batcomp file and find sig # BlakHole 0 string BH\5\7 BlakHole archive data # BIX 0 string BIX0 BIX archive data # ChiefLZA 0 string ChfLZ ChiefLZA archive data # Blink 0 string Blink Blink archive data # Logitech Compress 0 string \xda\xfa Logitech Compress archive data # ARS-Sfx (FIXME: really a SFX? then goto COM/EXE) 1 string (C)\ STEPANYUK ARS-Sfx archive data # AKT/AKT32 0 string AKT32 AKT32 archive data 0 string AKT AKT archive data # NPack 0 string MSTSM NPack archive data # PFT 0 string \0\x50\0\x14 PFT archive data # SemOne 0 string SEM SemOne archive data # PPMD 0 string \x8f\xaf\xac\x84 PPMD archive data # FIZ 0 string FIZ FIZ archive data # MSXiE 0 belong&0xfffff0f0 0x4d530000 MSXiE archive data # DeepFreezer 0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data # DC 0 string =2 byte x \b, version %i >3 byte x \b.%i # ZZip archiver (.zz) 0 string ZZ\ \0\0 ZZip archive data 0 string ZZ0 ZZip archive data # PAQ archiver (.paq) 0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data 0 string PAQ PAQ archive data >3 byte&0xf0 0x30 >>3 byte x (v%c) # JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP) 0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data 0 string JARCS JAR (ARJ Software, Inc.) archive data # ARJ archiver (jason@jarthur.Claremont.EDU) 0 leshort 0xea60 ARJ archive data !:mime application/x-arj >5 byte x \b, v%d, >8 byte &0x04 multi-volume, >8 byte &0x10 slash-switched, >8 byte &0x20 backup, >34 string x original name: %s, >7 byte 0 os: MS-DOS >7 byte 1 os: PRIMOS >7 byte 2 os: Unix >7 byte 3 os: Amiga >7 byte 4 os: Macintosh >7 byte 5 os: OS/2 >7 byte 6 os: Apple ][ GS >7 byte 7 os: Atari ST >7 byte 8 os: NeXT >7 byte 9 os: VAX/VMS >3 byte >0 %d] # [JW] idarc says this is also possible 2 leshort 0xea60 ARJ archive data # HA archiver (Greg Roelofs, newt@uchicago.edu) # This is a really bad format. A file containing HAWAII will match this... #0 string HA HA archive data, #>2 leshort =1 1 file, #>2 leshort >1 %u files, #>4 byte&0x0f =0 first is type CPY #>4 byte&0x0f =1 first is type ASC #>4 byte&0x0f =2 first is type HSC #>4 byte&0x0f =0x0e first is type DIR #>4 byte&0x0f =0x0f first is type SPECIAL # suggestion: at least identify small archives (<1024 files) 0 belong&0xffff00fc 0x48410000 HA archive data >2 leshort =1 1 file, >2 leshort >1 %u files, >4 byte&0x0f =0 first is type CPY >4 byte&0x0f =1 first is type ASC >4 byte&0x0f =2 first is type HSC >4 byte&0x0f =0x0e first is type DIR >4 byte&0x0f =0x0f first is type SPECIAL # HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz) 0 string HPAK HPACK archive data # JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net 0 string \351,\001JAM\ JAM archive, >7 string >\0 version %.4s >0x26 byte =0x27 - >>0x2b string >\0 label %.11s, >>0x27 lelong x serial %08x, >>0x36 string >\0 fstype %.8s # LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu) 2 string -lh0- LHarc 1.x/ARX archive data [lh0] !:mime application/x-lharc 2 string -lh1- LHarc 1.x/ARX archive data [lh1] !:mime application/x-lharc 2 string -lz4- LHarc 1.x archive data [lz4] !:mime application/x-lharc 2 string -lz5- LHarc 1.x archive data [lz5] !:mime application/x-lharc # [never seen any but the last; -lh4- reported in comp.compression:] 2 string -lzs- LHa/LZS archive data [lzs] !:mime application/x-lha 2 string -lh\40- LHa 2.x? archive data [lh ] !:mime application/x-lha 2 string -lhd- LHa 2.x? archive data [lhd] !:mime application/x-lha 2 string -lh2- LHa 2.x? archive data [lh2] !:mime application/x-lha 2 string -lh3- LHa 2.x? archive data [lh3] !:mime application/x-lha 2 string -lh4- LHa (2.x) archive data [lh4] !:mime application/x-lha 2 string -lh5- LHa (2.x) archive data [lh5] !:mime application/x-lha 2 string -lh6- LHa (2.x) archive data [lh6] !:mime application/x-lha 2 string -lh7- LHa (2.x)/LHark archive data [lh7] !:mime application/x-lha >20 byte x - header level %d # taken from idarc [JW] 2 string -lZ PUT archive data 2 string -lz LZS archive data 2 string -sw1- Swag archive data # RAR archiver (Greg Roelofs, newt@uchicago.edu) 0 string Rar! RAR archive data, !:mime application/x-rar >44 byte x v%0x, >10 byte >0 flags: >>10 byte &0x01 Archive volume, >>10 byte &0x02 Commented, >>10 byte &0x04 Locked, >>10 byte &0x08 Solid, >>10 byte &0x20 Authenticated, >35 byte 0 os: MS-DOS >35 byte 1 os: OS/2 >35 byte 2 os: Win32 >35 byte 3 os: Unix # some old version? idarc says: 0 string RE\x7e\x5e RAR archive data # SQUISH archiver (Greg Roelofs, newt@uchicago.edu) 0 string SQSH squished archive data (Acorn RISCOS) # UC2 archiver (Greg Roelofs, newt@uchicago.edu) # [JW] see exe section for self-extracting version 0 string UC2\x1a UC2 archive data # ZIP archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) 0 string PK\003\004 >4 byte 0x00 Zip archive data !:mime application/zip >4 byte 0x09 Zip archive data, at least v0.9 to extract !:mime application/zip >4 byte 0x0a Zip archive data, at least v1.0 to extract !:mime application/zip >4 byte 0x0b Zip archive data, at least v1.1 to extract !:mime application/zip >0x161 string WINZIP Zip archive data, WinZIP self-extracting !:mime application/zip >4 byte 0x14 >>30 ubelong !0x6d696d65 Zip archive data, at least v2.0 to extract !:mime application/zip # OpenOffice.org / KOffice / StarOffice documents # Listed here because they ARE zip files # # From: Abel Cheung >4 byte 0x14 >>30 string mimetype # KOffice (1.2 or above) formats >>>50 string vnd.kde. KOffice (>=1.2) >>>>58 string karbon Karbon document >>>>58 string kchart KChart document >>>>58 string kformula KFormula document >>>>58 string kivio Kivio document >>>>58 string kontour Kontour document >>>>58 string kpresenter KPresenter document >>>>58 string kspread KSpread document >>>>58 string kword KWord document # OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) >>>50 string vnd.sun.xml. OpenOffice.org 1.x >>>>62 string writer Writer >>>>>68 byte !0x2e document >>>>>68 string .template template >>>>>68 string .global global document >>>>62 string calc Calc >>>>>66 byte !0x2e spreadsheet >>>>>66 string .template template >>>>62 string draw Draw >>>>>66 byte !0x2e document >>>>>66 string .template template >>>>62 string impress Impress >>>>>69 byte !0x2e presentation >>>>>69 string .template template >>>>62 string math Math document >>>>62 string base Database file # OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) # http://lists.oasis-open.org/archives/office/200505/msg00006.html >>>50 string vnd.oasis.opendocument. OpenDocument >>>>73 string text >>>>>77 byte !0x2d Text !:mime application/vnd.oasis.opendocument.text >>>>>77 string -template Text Template >>>>>77 string -web HTML Document Template >>>>>77 string -master Master Document >>>>73 string graphics Drawing >>>>>81 string -template Template >>>>73 string presentation Presentation >>>>>85 string -template Template >>>>73 string spreadsheet Spreadsheet >>>>>84 string -template Template >>>>73 string chart Chart >>>>>78 string -template Template >>>>73 string formula Formula >>>>>80 string -template Template >>>>73 string database Database >>>>73 string image Image # Zoo archiver 20 lelong 0xfdc4a7dc Zoo archive data !:mime application/x-zoo >4 byte >48 \b, v%c. >>6 byte >47 \b%c >>>7 byte >47 \b%c >32 byte >0 \b, modify: v%d >>33 byte x \b.%d+ >42 lelong 0xfdc4a7dc \b, >>70 byte >0 extract: v%d >>>71 byte x \b.%d+ # Shell archives 10 string #\ This\ is\ a\ shell\ archive shell archive text !:mime application/octet-stream # # LBR. NB: May conflict with the questionable # "binary Computer Graphics Metafile" format. # 0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data # # PMA (CP/M derivative of LHA) # 2 string -pm0- PMarc archive data [pm0] 2 string -pm1- PMarc archive data [pm1] 2 string -pm2- PMarc archive data [pm2] 2 string -pms- PMarc SFX archive (CP/M, DOS) 5 string -pc1- PopCom compressed executable (CP/M) # From Rafael Laboissiere # The Project Revision Control System (see # http://prcs.sourceforge.net) generates a packaged project # file which is recognized by the following entry: 0 leshort 0xeb81 PRCS packaged project # Microsoft cabinets # by David Necas (Yeti) #0 string MSCF\0\0\0\0 Microsoft cabinet file data, #>25 byte x v%d #>24 byte x \b.%d # MPi: All CABs have version 1.3, so this is pointless. # Better magic in debian-additions. # GTKtalog catalogs # by David Necas (Yeti) 4 string gtktalog\ GTKtalog catalog data, >13 string 3 version 3 >>14 beshort 0x677a (gzipped) >>14 beshort !0x677a (not gzipped) >13 string >3 version %s ############################################################################ # Parity archive reconstruction file, the 'par' file format now used on Usenet. 0 string PAR\0 PARity archive data >48 leshort =0 - Index file >48 leshort >0 - file number %d # Felix von Leitner 0 string d8:announce BitTorrent file !:mime application/x-bittorrent # Atari MSA archive - Teemu Hukkanen 0 beshort 0x0e0f Atari MSA archive data >2 beshort x \b, %d sectors per track >4 beshort 0 \b, 1 sided >4 beshort 1 \b, 2 sided >6 beshort x \b, starting track: %d >8 beshort x \b, ending track: %d # Alternate ZIP string (amc@arwen.cs.berkeley.edu) 0 string PK00PK\003\004 Zip archive data # ACE archive (from http://www.wotsit.org/download.asp?f=ace) # by Stefan `Sec` Zehl 7 string **ACE** ACE archive data >15 byte >0 version %d >16 byte =0x00 \b, from MS-DOS >16 byte =0x01 \b, from OS/2 >16 byte =0x02 \b, from Win/32 >16 byte =0x03 \b, from Unix >16 byte =0x04 \b, from MacOS >16 byte =0x05 \b, from WinNT >16 byte =0x06 \b, from Primos >16 byte =0x07 \b, from AppleGS >16 byte =0x08 \b, from Atari >16 byte =0x09 \b, from Vax/VMS >16 byte =0x0A \b, from Amiga >16 byte =0x0B \b, from Next >14 byte x \b, version %d to extract >5 leshort &0x0080 \b, multiple volumes, >>17 byte x \b (part %d), >5 leshort &0x0002 \b, contains comment >5 leshort &0x0200 \b, sfx >5 leshort &0x0400 \b, small dictionary >5 leshort &0x0800 \b, multi-volume >5 leshort &0x1000 \b, contains AV-String >>30 string \x16*UNREGISTERED\x20VERSION* (unregistered) >5 leshort &0x2000 \b, with recovery record >5 leshort &0x4000 \b, locked >5 leshort &0x8000 \b, solid # Date in MS-DOS format (whatever that is) #>18 lelong x Created on # sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann # 0x1A string sfArk sfArk compressed Soundfont >0x15 string 2 >>0x1 string >\0 Version %s >>0x2A string >\0 : %s # DR-DOS 7.03 Packed File *.??_ 0 string Packed\ File\ Personal NetWare Packed File >12 string x \b, was "%.12s" # EET archive # From: Tilman Sauerbeck 0 belong 0x1ee7ff00 EET archive !:mime application/x-eet # rzip archives 0 string RZIP rzip compressed data >4 byte x - version %d >5 byte x \b.%d >6 belong x (%d bytes) # From: "Robert Dale" 0 belong 123 dar archive, >4 belong x label "%.8x >>8 belong x %.8x >>>12 beshort x %.4x" >14 byte 0x54 end slice >14 beshort 0x4e4e multi-part >14 beshort 0x4e53 multi-part, with -S # Symbian installation files # http://www.thouky.co.uk/software/psifs/sis.html # http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf 8 lelong 0x10000419 Symbian installation file !:mime application/vnd.symbian.install >4 lelong 0x1000006D (EPOC release 3/4/5) >4 lelong 0x10003A12 (EPOC release 6) 0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x) !:mime x-epoc/x-sisx-app # From "Nelson A. de Oliveira" 0 string MPQ\032 MoPaQ (MPQ) archive # From: Dirk Jagdmann # xar archive format: http://code.google.com/p/xar/ 0 string xar! xar archive >6 beshort x - version %ld # From: "Nelson A. de Oliveira" # .kgb 0 string KGB_arch KGB Archiver file >10 string x with compression level %.1s # xar (eXtensible ARchiver) archive # From: "David Remahl" 0 string xar! xar archive #>4 beshort x header size %d >6 beshort x version %d, #>8 quad x compressed TOC: %d, #>16 quad x uncompressed TOC: %d, >24 belong 0 no checksum >24 belong 1 SHA-1 checksum >24 belong 2 MD5 checksum #------------------------------------------------------------------------------ # asterix: file(1) magic for Aster*x; SunOS 5.5.1 gave the 4-character # strings as "long" - we assume they're just strings: # From: guy@netapp.com (Guy Harris) # 0 string *STA Aster*x >7 string WORD Words Document >7 string GRAP Graphic >7 string SPRE Spreadsheet >7 string MACR Macro 0 string 2278 Aster*x Version 2 >29 byte 0x36 Words Document >29 byte 0x35 Graphic >29 byte 0x32 Spreadsheet >29 byte 0x38 Macro #------------------------------------------------------------------------------ # att3b: file(1) magic for AT&T 3B machines # # The `versions' should be un-commented if they work for you. # (Was the problem just one of endianness?) # # 3B20 # # The 3B20 conflicts with SCCS. #0 beshort 0550 3b20 COFF executable #>12 belong >0 not stripped #>22 beshort >0 - version %ld #0 beshort 0551 3b20 COFF executable (TV) #>12 belong >0 not stripped #>22 beshort >0 - version %ld # # WE32K # 0 beshort 0560 WE32000 COFF >18 beshort ^00000020 object >18 beshort &00000020 executable >12 belong >0 not stripped >18 beshort ^00010000 N/A on 3b2/300 w/paging >18 beshort &00020000 32100 required >18 beshort &00040000 and MAU hardware required >20 beshort 0407 (impure) >20 beshort 0410 (pure) >20 beshort 0413 (demand paged) >20 beshort 0443 (target shared library) >22 beshort >0 - version %ld 0 beshort 0561 WE32000 COFF executable (TV) >12 belong >0 not stripped #>18 beshort &00020000 - 32100 required #>18 beshort &00040000 and MAU hardware required #>22 beshort >0 - version %ld # # core file for 3b2 0 string \000\004\036\212\200 3b2 core file >364 string >\0 of '%s' #------------------------------------------------------------------------------ # audio: file(1) magic for sound formats (see also "iff") # # Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com), # and others # # Sun/NeXT audio data 0 string .snd Sun/NeXT audio data: >12 belong 1 8-bit ISDN mu-law, !:mime audio/basic >12 belong 2 8-bit linear PCM [REF-PCM], !:mime audio/basic >12 belong 3 16-bit linear PCM, !:mime audio/basic >12 belong 4 24-bit linear PCM, !:mime audio/basic >12 belong 5 32-bit linear PCM, !:mime audio/basic >12 belong 6 32-bit IEEE floating point, !:mime audio/basic >12 belong 7 64-bit IEEE floating point, !:mime audio/basic >12 belong 8 Fragmented sample data, >12 belong 10 DSP program, >12 belong 11 8-bit fixed point, >12 belong 12 16-bit fixed point, >12 belong 13 24-bit fixed point, >12 belong 14 32-bit fixed point, >12 belong 18 16-bit linear with emphasis, >12 belong 19 16-bit linear compressed, >12 belong 20 16-bit linear with emphasis and compression, >12 belong 21 Music kit DSP commands, >12 belong 23 8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.), !:mime audio/x-adpcm >12 belong 24 compressed (8-bit CCITT G.722 ADPCM) >12 belong 25 compressed (3-bit CCITT G.723.3 ADPCM), >12 belong 26 compressed (5-bit CCITT G.723.5 ADPCM), >12 belong 27 8-bit A-law (CCITT G.711), >20 belong 1 mono, >20 belong 2 stereo, >20 belong 4 quad, >16 belong >0 %d Hz # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format # that uses little-endian encoding and has a different magic number 0 lelong 0x0064732E DEC audio data: >12 lelong 1 8-bit ISDN mu-law, !:mime audio/x-dec-basic >12 lelong 2 8-bit linear PCM [REF-PCM], !:mime audio/x-dec-basic >12 lelong 3 16-bit linear PCM, !:mime audio/x-dec-basic >12 lelong 4 24-bit linear PCM, !:mime audio/x-dec-basic >12 lelong 5 32-bit linear PCM, !:mime audio/x-dec-basic >12 lelong 6 32-bit IEEE floating point, !:mime audio/x-dec-basic >12 lelong 7 64-bit IEEE floating point, !:mime audio/x-dec-basic >12 belong 8 Fragmented sample data, >12 belong 10 DSP program, >12 belong 11 8-bit fixed point, >12 belong 12 16-bit fixed point, >12 belong 13 24-bit fixed point, >12 belong 14 32-bit fixed point, >12 belong 18 16-bit linear with emphasis, >12 belong 19 16-bit linear compressed, >12 belong 20 16-bit linear with emphasis and compression, >12 belong 21 Music kit DSP commands, >12 lelong 23 8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.), !:mime audio/x-dec-basic >12 belong 24 compressed (8-bit CCITT G.722 ADPCM) >12 belong 25 compressed (3-bit CCITT G.723.3 ADPCM), >12 belong 26 compressed (5-bit CCITT G.723.5 ADPCM), >12 belong 27 8-bit A-law (CCITT G.711), >20 lelong 1 mono, >20 lelong 2 stereo, >20 lelong 4 quad, >16 lelong >0 %d Hz # Creative Labs AUDIO stuff 0 string MThd Standard MIDI data !:mime audio/midi >8 beshort x (format %d) >10 beshort x using %d track >10 beshort >1 \bs >12 beshort&0x7fff x at 1/%d >12 beshort&0x8000 >0 SMPTE 0 string CTMF Creative Music (CMF) data !:mime audio/x-unknown 0 string SBI SoundBlaster instrument data !:mime audio/x-unknown 0 string Creative\ Voice\ File Creative Labs voice data !:mime audio/x-unknown # is this next line right? it came this way... >19 byte 0x1A >23 byte >0 - version %d >22 byte >0 \b.%d # first entry is also the string "NTRK" 0 belong 0x4e54524b MultiTrack sound data >4 belong x - version %ld # Extended MOD format (*.emd) (Greg Roelofs, newt@uchicago.edu); NOT TESTED # [based on posting 940824 by "Dirk/Elastik", husberg@lehtori.cc.tut.fi] 0 string EMOD Extended MOD sound data, >4 byte&0xf0 x version %d >4 byte&0x0f x \b.%d, >45 byte x %d instruments >83 byte 0 (module) >83 byte 1 (song) # Real Audio (Magic .ra\0375) 0 belong 0x2e7261fd RealAudio sound file !:mime audio/x-pn-realaudio 0 string .RMF RealMedia file !:mime application/vnd.rn-realmedia #video/x-pn-realvideo #video/vnd.rn-realvideo #application/vnd.rn-realmedia # sigh, there are many mimes for that but the above are the most common. # MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert@dialin.ind.net] # Oct 31, 1995 # fixed by 2003-06-24 # Too short... #0 string MTM MultiTracker Module sound file #0 string if Composer 669 Module sound data #0 string JN Composer 669 Module sound data (extended format) 0 string MAS_U ULT(imate) Module sound data #0 string FAR Module sound data #>4 string >\15 Title: "%s" 0x2c string SCRM ScreamTracker III Module sound data >0 string >\0 Title: "%s" # Gravis UltraSound patches # From 0 string GF1PATCH110\0ID#000002\0 GUS patch 0 string GF1PATCH100\0ID#000002\0 Old GUS patch # mime types according to http://www.geocities.com/nevilo/mod.htm: # audio/it .it # audio/x-zipped-it .itz # audio/xm fasttracker modules # audio/x-s3m screamtracker modules # audio/s3m screamtracker modules # audio/x-zipped-mod mdz # audio/mod mod # audio/x-mod All modules (mod, s3m, 669, mtm, med, xm, it, mdz, stm, itz, xmz, s3z) # # Taken from loader code from mikmod version 2.14 # by Steve McIntyre (stevem@chiark.greenend.org.uk) # added title printing on 2003-06-24 0 string MAS_UTrack_V00 >14 string >/0 ultratracker V1.%.1s module sound data !:mime audio/x-mod #audio/x-tracker-module 0 string UN05 MikMod UNI format module sound data 0 string Extended\ Module: Fasttracker II module sound data !:mime audio/x-mod #audio/x-tracker-module >17 string >\0 Title: "%s" 21 string/c =!SCREAM! Screamtracker 2 module sound data !:mime audio/x-mod #audio/x-screamtracker-module 21 string BMOD2STM Screamtracker 2 module sound data !:mime audio/x-mod #audio/x-screamtracker-module 1080 string M.K. 4-channel Protracker module sound data !:mime audio/x-mod #audio/x-protracker-module >0 string >\0 Title: "%s" 1080 string M!K! 4-channel Protracker module sound data !:mime audio/x-mod #audio/x-protracker-module >0 string >\0 Title: "%s" 1080 string FLT4 4-channel Startracker module sound data !:mime audio/x-mod #audio/x-startracker-module >0 string >\0 Title: "%s" 1080 string FLT8 8-channel Startracker module sound data !:mime audio/x-mod #audio/x-startracker-module >0 string >\0 Title: "%s" 1080 string 4CHN 4-channel Fasttracker module sound data !:mime audio/x-mod #audio/x-fasttracker-module >0 string >\0 Title: "%s" 1080 string 6CHN 6-channel Fasttracker module sound data !:mime audio/x-mod #audio/x-fasttracker-module >0 string >\0 Title: "%s" 1080 string 8CHN 8-channel Fasttracker module sound data !:mime audio/x-mod #audio/x-fasttracker-module >0 string >\0 Title: "%s" 1080 string CD81 8-channel Octalyser module sound data !:mime audio/x-mod #audio/x-octalysertracker-module >0 string >\0 Title: "%s" 1080 string OKTA 8-channel Octalyzer module sound data !:mime audio/x-mod #audio/x-octalysertracker-module >0 string >\0 Title: "%s" # Not good enough. #1082 string CH #>1080 string >/0 %.2s-channel Fasttracker "oktalyzer" module sound data 1080 string 16CN 16-channel Taketracker module sound data !:mime audio/x-mod #audio/x-taketracker-module >0 string >\0 Title: "%s" 1080 string 32CN 32-channel Taketracker module sound data !:mime audio/x-mod #audio/x-taketracker-module >0 string >\0 Title: "%s" # TOC sound files -Trevor Johnson # 0 string TOC TOC sound file # sidfiles # added name,author,(c) and new RSID type by 2003-06-24 0 string SIDPLAY\ INFOFILE Sidplay info file 0 string PSID PlaySID v2.2+ (AMIGA) sidtune >4 beshort >0 w/ header v%d, >14 beshort =1 single song, >14 beshort >1 %d songs, >16 beshort >0 default song: %d >0x16 string >\0 name: "%s" >0x36 string >\0 author: "%s" >0x56 string >\0 copyright: "%s" 0 string RSID RSID sidtune PlaySID compatible >4 beshort >0 w/ header v%d, >14 beshort =1 single song, >14 beshort >1 %d songs, >16 beshort >0 default song: %d >0x16 string >\0 name: "%s" >0x36 string >\0 author: "%s" >0x56 string >\0 copyright: "%s" # IRCAM # VAX and MIPS files are little-endian; Sun and NeXT are big-endian 0 belong 0x64a30100 IRCAM file (VAX) 0 belong 0x64a30200 IRCAM file (Sun) 0 belong 0x64a30300 IRCAM file (MIPS little-endian) 0 belong 0x64a30400 IRCAM file (NeXT) # NIST SPHERE 0 string NIST_1A\n\ \ \ 1024\n NIST SPHERE file # Sample Vision 0 string SOUND\ SAMPLE\ DATA\ Sample Vision file # Audio Visual Research 0 string 2BIT Audio Visual Research file, >12 beshort =0 mono, >12 beshort =-1 stereo, >14 beshort x %d bits >16 beshort =0 unsigned, >16 beshort =-1 signed, >22 belong&0x00ffffff x %d Hz, >18 beshort =0 no loop, >18 beshort =-1 loop, >21 ubyte <128 note %d, >22 byte =0 replay 5.485 KHz >22 byte =1 replay 8.084 KHz >22 byte =2 replay 10.971 Khz >22 byte =3 replay 16.168 Khz >22 byte =4 replay 21.942 KHz >22 byte =5 replay 32.336 KHz >22 byte =6 replay 43.885 KHz >22 byte =7 replay 47.261 KHz # SGI SoundTrack 0 string _SGI_SoundTrack SGI SoundTrack project file # ID3 version 2 tags 0 string ID3 Audio file with ID3 version 2 >3 byte x \b.%d >4 byte x \b.%d >>5 byte &0x80 \b, unsynchronized frames >>5 byte &0x40 \b, extended header >>5 byte &0x20 \b, experimental >>5 byte &0x10 \b, footer present >(6.I) indirect x \b, contains: # NSF (NES sound file) magic 0 string NESM\x1a NES Sound File >14 string >\0 ("%s" by >46 string >\0 %s, copyright >78 string >\0 %s), >5 byte x version %d, >6 byte x %d tracks, >122 byte&0x2 =1 dual PAL/NTSC >122 byte&0x1 =1 PAL >122 byte&0x1 =0 NTSC # Impulse tracker module (audio/x-it) 0 string IMPM Impulse Tracker module sound data - !:mime audio/x-mod >4 string >\0 "%s" >40 leshort !0 compatible w/ITv%x >42 leshort !0 created w/ITv%x # Imago Orpheus module (audio/x-imf) 60 string IM10 Imago Orpheus module sound data - >0 string >\0 "%s" # From # These are the /etc/magic entries to decode modules, instruments, and # samples in Impulse Tracker's native format. 0 string IMPS Impulse Tracker Sample >18 byte &2 16 bit >18 byte ^2 8 bit >18 byte &4 stereo >18 byte ^4 mono 0 string IMPI Impulse Tracker Instrument >28 leshort !0 ITv%x >30 byte !0 %d samples # Yamaha TX Wave: file(1) magic for Yamaha TX Wave audio files # From 0 string LM8953 Yamaha TX Wave >22 byte 0x49 looped >22 byte 0xC9 non-looped >23 byte 1 33kHz >23 byte 2 50kHz >23 byte 3 16kHz # scream tracker: file(1) magic for Scream Tracker sample files # # From 76 string SCRS Scream Tracker Sample >0 byte 1 sample >0 byte 2 adlib melody >0 byte >2 adlib drum >31 byte &2 stereo >31 byte ^2 mono >31 byte &4 16bit little endian >31 byte ^4 8bit >30 byte 0 unpacked >30 byte 1 packed # audio # From: Cory Dikkers 0 string MMD0 MED music file, version 0 0 string MMD1 OctaMED Pro music file, version 1 0 string MMD3 OctaMED Soundstudio music file, version 3 0 string OctaMEDCmpr OctaMED Soundstudio compressed file 0 string MED MED_Song 0 string SymM Symphonie SymMOD music file # 0 string THX AHX version >3 byte =0 1 module data >3 byte =1 2 module data # 0 string OKTASONG Oktalyzer module data # 0 string DIGI\ Booster\ module\0 %s >20 byte >0 %c >>21 byte >0 \b%c >>>22 byte >0 \b%c >>>>23 byte >0 \b%c >610 string >\0 \b, "%s" # 0 string DBM0 DIGI Booster Pro Module >4 byte >0 V%X. >>5 byte x \b%02X >16 string >\0 \b, "%s" # 0 string FTMN FaceTheMusic module >16 string >\0d \b, "%s" # From: 2003-06-24 0 string AMShdr\32 Velvet Studio AMS Module v2.2 0 string Extreme Extreme Tracker AMS Module v1.3 0 string DDMF Xtracker DMF Module >4 byte x v%i >0xD string >\0 Title: "%s" >0x2B string >\0 Composer: "%s" 0 string DSM\32 Dynamic Studio Module DSM 0 string SONG DigiTrekker DTM Module 0 string DMDL DigiTrakker MDL Module 0 string PSM\32 Protracker Studio PSM Module 44 string PTMF Poly Tracker PTM Module >0 string >\32 Title: "%s" 0 string MT20 MadTracker 2.0 Module MT2 0 string RAD\40by\40REALiTY!! RAD Adlib Tracker Module RAD 0 string RTMM RTM Module 0x426 string MaDoKaN96 XMS Adlib Module >0 string >\0 Composer: "%s" 0 string AMF AMF Module >4 string >\0 Title: "%s" 0 string MODINFO1 Open Cubic Player Module Inforation MDZ 0 string Extended\40Instrument: Fast Tracker II Instrument # From: Takeshi Hamasaki # NOA Nancy Codec file 0 string \210NOA\015\012\032 NOA Nancy Codec Movie file # Yamaha SMAF format 0 string MMMD Yamaha SMAF file # Sharp Jisaku Melody format for PDC 0 string \001Sharp\040JisakuMelody SHARP Cell-Phone ringing Melody >20 string Ver01.00 Ver. 1.00 >>32 byte x , %d tracks # Free lossless audio codec # From: Przemyslaw Augustyniak 0 string fLaC FLAC audio bitstream data !:mime audio/x-flac >4 byte&0x7f >0 \b, unknown version >4 byte&0x7f 0 \b # some common bits/sample values >>20 beshort&0x1f0 0x030 \b, 4 bit >>20 beshort&0x1f0 0x050 \b, 6 bit >>20 beshort&0x1f0 0x070 \b, 8 bit >>20 beshort&0x1f0 0x0b0 \b, 12 bit >>20 beshort&0x1f0 0x0f0 \b, 16 bit >>20 beshort&0x1f0 0x170 \b, 24 bit >>20 byte&0xe 0x0 \b, mono >>20 byte&0xe 0x2 \b, stereo >>20 byte&0xe 0x4 \b, 3 channels >>20 byte&0xe 0x6 \b, 4 channels >>20 byte&0xe 0x8 \b, 5 channels >>20 byte&0xe 0xa \b, 6 channels >>20 byte&0xe 0xc \b, 7 channels >>20 byte&0xe 0xe \b, 8 channels # some common sample rates >>17 belong&0xfffff0 0x0ac440 \b, 44.1 kHz >>17 belong&0xfffff0 0x0bb800 \b, 48 kHz >>17 belong&0xfffff0 0x07d000 \b, 32 kHz >>17 belong&0xfffff0 0x056220 \b, 22.05 kHz >>17 belong&0xfffff0 0x05dc00 \b, 24 kHz >>17 belong&0xfffff0 0x03e800 \b, 16 kHz >>17 belong&0xfffff0 0x02b110 \b, 11.025 kHz >>17 belong&0xfffff0 0x02ee00 \b, 12 kHz >>17 belong&0xfffff0 0x01f400 \b, 8 kHz >>17 belong&0xfffff0 0x177000 \b, 96 kHz >>17 belong&0xfffff0 0x0fa000 \b, 64 kHz >>21 byte&0xf >0 \b, >4G samples >>21 byte&0xf 0 \b >>>22 belong >0 \b, %u samples >>>22 belong 0 \b, length unknown # (ISDN) VBOX voice message file (Wolfram Kleff) 0 string VBOX VBOX voice message data # ReBorn Song Files (.rbs) # David J. Singer 8 string RB40 RBS Song file >29 string ReBorn created by ReBorn >37 string Propellerhead created by ReBirth # Synthesizer Generator and Kimwitu share their file format 0 string A#S#C#S#S#L#V#3 Synthesizer Generator or Kimwitu data # Kimwitu++ uses a slightly different magic 0 string A#S#C#S#S#L#HUB Kimwitu++ data # From "Simon Hosie 0 string TFMX-SONG TFMX module sound data # Monkey's Audio compressed audio format (.ape) # From danny.milo@gmx.net (Danny Milosavljevic) # New version from Abel Cheung 0 string MAC\040 Monkey's Audio compressed format >4 uleshort >0x0F8B version %d >>(0x08.l) uleshort =1000 with fast compression >>(0x08.l) uleshort =2000 with normal compression >>(0x08.l) uleshort =3000 with high compression >>(0x08.l) uleshort =4000 with extra high compression >>(0x08.l) uleshort =5000 with insane compression >>(0x08.l+18) uleshort =1 \b, mono >>(0x08.l+18) uleshort =2 \b, stereo >>(0x08.l+20) ulelong x \b, sample rate %d >4 uleshort <0x0F8C version %d >>6 uleshort =1000 with fast compression >>6 uleshort =2000 with normal compression >>6 uleshort =3000 with high compression >>6 uleshort =4000 with extra high compression >>6 uleshort =5000 with insane compression >>10 uleshort =1 \b, mono >>10 uleshort =2 \b, stereo >>12 ulelong x \b, sample rate %d # adlib sound files # From Gürkan Sengün , http://www.linuks.mine.nu 0 string RAWADATA RdosPlay RAW 1068 string RoR AMUSIC Adlib Tracker 0 string JCH EdLib 0 string mpu401tr MPU-401 Trakker 0 string SAdT Surprise! Adlib Tracker >4 byte x Version %d 0 string XAD! eXotic ADlib 0 string ofTAZ! eXtra Simple Music # Spectrum 128 tunes (.ay files). # From: Emanuel Haupt 0 string ZXAYEMUL Spectrum 128 tune 0 string \0BONK BONK, #>5 byte x version %d >14 byte x %d channel(s), >15 byte =1 lossless, >15 byte =0 lossy, >16 byte x mid-side 384 string LockStream LockStream Embedded file (mostly MP3 on old Nokia phones) # format VQF (proprietary codec for sound) # some infos on the header file available at : # http://www.twinvq.org/english/technology_format.html 0 string TWIN97012000 VQF data >27 short 0 \b, Mono >27 short 1 \b, Stereo >31 short >0 \b, %d kbit/s >35 short >0 \b, %d kHz # Nelson A. de Oliveira (naoliv@gmail.com) # .eqf 0 string Winamp\ EQ\ library\ file %s # it will match only versions like v. # Since I saw only eqf files with version v1.1 I think that it's OK >23 string x \b%.4s # .preset 0 string [Equalizer\ preset] XMMS equalizer preset # .m3u 0 search/1 #EXTM3U M3U playlist text # .pls 0 search/1 [playlist] PLS playlist text # licq.conf 1 string [licq] LICQ configuration file # Atari ST audio files by Dirk Jagdmann 0 string ICE! SNDH Atari ST music 0 string SC68\ Music-file\ /\ (c)\ (BeN)jami sc68 Atari ST music # musepak support From: "Jiri Pejchal" 0 string MP+ Musepack audio >3 byte 255 \b, SV pre8 >3 byte&0xF 0x6 \b, SV 6 >3 byte&0xF 0x8 \b, SV 8 >3 byte&0xF 0x7 \b, SV 7 >>3 byte&0xF0 0x0 \b.0 >>3 byte&0xF0 0x10 \b.1 >>3 byte&0xF0 240 \b.15 >>10 byte&0xF0 0x0 \b, no profile >>10 byte&0xF0 0x10 \b, profile 'Unstable/Experimental' >>10 byte&0xF0 0x50 \b, quality 0 >>10 byte&0xF0 0x60 \b, quality 1 >>10 byte&0xF0 0x70 \b, quality 2 (Telephone) >>10 byte&0xF0 0x80 \b, quality 3 (Thumb) >>10 byte&0xF0 0x90 \b, quality 4 (Radio) >>10 byte&0xF0 0xA0 \b, quality 5 (Standard) >>10 byte&0xF0 0xB0 \b, quality 6 (Xtreme) >>10 byte&0xF0 0xC0 \b, quality 7 (Insane) >>10 byte&0xF0 0xD0 \b, quality 8 (BrainDead) >>10 byte&0xF0 0xE0 \b, quality 9 >>10 byte&0xF0 0xF0 \b, quality 10 >>27 byte 0x0 \b, Buschmann 1.7.0-9, Klemm 0.90-1.05 >>27 byte 102 \b, Beta 1.02 >>27 byte 104 \b, Beta 1.04 >>27 byte 105 \b, Alpha 1.05 >>27 byte 106 \b, Beta 1.06 >>27 byte 110 \b, Release 1.1 >>27 byte 111 \b, Alpha 1.11 >>27 byte 112 \b, Beta 1.12 >>27 byte 113 \b, Alpha 1.13 >>27 byte 114 \b, Beta 1.14 >>27 byte 115 \b, Alpha 1.15 # IMY # from http://filext.com/detaillist.php?extdetail=IMY # http://cellphones.about.com/od/cellularfaqs/f/rf_imelody.htm # http://download.ncl.ie/doc/api/ie/ncl/media/music/IMelody.html # http://www.wx800.com/msg/download/irda/iMelody.pdf 0 string BEGIN:IMELODY iMelody Ringtone Format # From: "Mateus Caruccio" # guitar pro v3,4,5 from http://filext.com/file-extension/gp3 0 string \030FICHIER\ GUITAR\ PRO\ v3. Guitar Pro Ver. 3 Tablature # From: "Leslie P. Polzer" 60 string SONG SoundFX Module sound file # Type: Adaptive Multi-Rate Codec # URL: http://filext.com/detaillist.php?extdetail=AMR # From: Russell Coker 0 string #!AMR Adaptive Multi-Rate Codec (GSM telephony) #---------------------------------------------------------------- # basis: file(1) magic for BBx/Pro5-files # Oliver Dammer 2005/11/07 # http://www.basis.com business-basic-files. # 0 string \074\074bbx\076\076 BBx >7 string \000 indexed file >7 string \001 serial file >7 string \002 keyed file >>13 short 0 (sort) >7 string \004 program >>18 byte x (LEVEL %d) >>>23 string >\000 psaved >7 string \006 mkeyed file >>13 short 0 (sort) >>8 string \000 (mkey) #------------------------------------------------------------------------------ # bFLT: file(1) magic for BFLT uclinux binary files # # From Philippe De Muyter # 0 string bFLT BFLT executable >4 belong x - version %ld >4 belong 4 >>36 belong&0x1 0x1 ram >>36 belong&0x2 0x2 gotpic >>36 belong&0x4 0x4 gzip >>36 belong&0x8 0x8 gzdata #------------------------------------------------------------------------------ # blender: file(1) magic for Blender 3D related files # # Native format rule v1.2. For questions use the developers list # http://lists.blender.org/mailman/listinfo/bf-committers # GLOB chunk was moved near start and provides subversion info since 2.42 0 string =BLENDER Blender3D, >7 string =_ saved as 32-bits >>8 string =v little endian >>>9 byte x with version %c. >>>10 byte x \b%c >>>11 byte x \b%c >>>0x40 string =GLOB \b. >>>>0x58 leshort x \b%.4d >>8 string =V big endian >>>9 byte x with version %c. >>>10 byte x \b%c >>>11 byte x \b%c >>>0x40 string =GLOB \b. >>>>0x58 beshort x \b%.4d >7 string =- saved as 64-bits >>8 string =v little endian >>9 byte x with version %c. >>10 byte x \b%c >>11 byte x \b%c >>0x44 string =GLOB \b. >>>0x60 leshort x \b%.4d >>8 string =V big endian >>>9 byte x with version %c. >>>10 byte x \b%c >>>11 byte x \b%c >>>0x44 string =GLOB \b. >>>>0x60 beshort x \b%.4d # Scripts that run in the embeded Python interpreter 0 string #!BPY Blender3D BPython script #------------------------------------------------------------------------------ # blit: file(1) magic for 68K Blit stuff as seen from 680x0 machine # # Note that this 0407 conflicts with several other a.out formats... # # XXX - should this be redone with "be" and "le", so that it works on # little-endian machines as well? If so, what's the deal with # "VAX-order" and "VAX-order2"? # #0 long 0407 68K Blit (standalone) executable #0 short 0407 VAX-order2 68K Blit (standalone) executable 0 short 03401 VAX-order 68K Blit (standalone) executable 0 long 0406 68k Blit mpx/mux executable 0 short 0406 VAX-order2 68k Blit mpx/mux executable 0 short 03001 VAX-order 68k Blit mpx/mux executable # Need more values for WE32 DMD executables. # Note that 0520 is the same as COFF #0 short 0520 tty630 layers executable # # i80960 b.out objects and archives # 0 long 0x10d i960 b.out relocatable object >16 long >0 not stripped # # b.out archive (hp-rt on i960) 0 string =! b.out archive >8 string __.SYMDEF random library #------------------------------------------------------------------------------ # bsdi: file(1) magic for BSD/OS (from BSDI) objects # 0 lelong 0314 386 compact demand paged pure executable >16 lelong >0 not stripped >32 byte 0x6a (uses shared libs) 0 lelong 0407 386 executable >16 lelong >0 not stripped >32 byte 0x6a (uses shared libs) 0 lelong 0410 386 pure executable >16 lelong >0 not stripped >32 byte 0x6a (uses shared libs) 0 lelong 0413 386 demand paged pure executable >16 lelong >0 not stripped >32 byte 0x6a (uses shared libs) # same as in SunOS 4.x, except for static shared libraries 0 belong&077777777 0600413 sparc demand paged >0 byte &0x80 >>20 belong <4096 shared library >>20 belong =4096 dynamically linked executable >>20 belong >4096 dynamically linked executable >0 byte ^0x80 executable >16 belong >0 not stripped >36 belong 0xb4100001 (uses shared libs) 0 belong&077777777 0600410 sparc pure >0 byte &0x80 dynamically linked executable >0 byte ^0x80 executable >16 belong >0 not stripped >36 belong 0xb4100001 (uses shared libs) 0 belong&077777777 0600407 sparc >0 byte &0x80 dynamically linked executable >0 byte ^0x80 executable >16 belong >0 not stripped >36 belong 0xb4100001 (uses shared libs) #------------------------------------------------------------------------------ # BTSnoop: file(1) magic for BTSnoop files # # From 0 string btsnoop\0 BTSnoop >8 belong x version %d, >12 belong 1001 Unencapsulated HCI >12 belong 1002 HCI UART (H4) >12 belong 1003 HCI BCSP >12 belong 1004 HCI Serial (H5) >>12 belong x type %d #------------------------------------------------------------------------------ # c-lang: file(1) magic for C programs (or REXX) # # XPM icons (Greg Roelofs, newt@uchicago.edu) # if you uncomment "/*" for C/REXX below, also uncomment this entry #0 string /*\ XPM\ */ X pixmap image data #!:mime image/x-xpmi # 3DS (3d Studio files) Conflicts with diff output 0x3d '=' #16 beshort 0x3d3d image/x-3ds # this first will upset you if you're a PL/1 shop... # in which case rm it; ascmagic will catch real C programs #0 search/1 /* C or REXX program text #0 search/1 // C++ program text # From: Mikhail Teterin 0 string cscope cscope reference data >7 string x version %.2s # We skip the path here, because it is often long (so file will # truncate it) and mostly redundant. # The inverted index functionality was added some time betwen # versions 11 and 15, so look for -q if version is above 14: >7 string >14 >>10 search/100 \ -q\ with inverted index >10 search/100 \ -c\ text (non-compressed) #------------------------------------------------------------------------------ # c64: file(1) magic for various commodore 64 related files # # From: Dirk Jagdmann 0x16500 belong 0x12014100 D64 Image 0x16500 belong 0x12014180 D71 Image 0x61800 belong 0x28034400 D81 Image 0 string C64\40CARTRIDGE CCS C64 Emultar Cartridge Image 0 belong 0x43154164 X64 Image 0 string GCR-1541 GCR Image >8 byte x version: %i >9 byte x tracks: %i 9 string PSUR ARC archive (c64) 2 string -LH1- LHA archive (c64) 0 string C64File PC64 Emulator file >8 string >\0 "%s" 0 string C64Image PC64 Freezer Image 0 beshort 0x38CD C64 PCLink Image 0 string CBM\144\0\0 Power 64 C64 Emulator Snapshot 0 belong 0xFF424CFF WRAptor packer (c64) 0 string C64S\x20tape\x20file T64 tape Image >32 leshort x Version:0x%x >36 leshort !0 Entries:%i >40 string x Name:%.24s 0 string C64\x20tape\x20image\x20file\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0 T64 tape Image >32 leshort x Version:0x%x >36 leshort !0 Entries:%i >40 string x Name:%.24s 0 string C64S\x20tape\x20image\x20file\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0 T64 tape Image >32 leshort x Version:0x%x >36 leshort !0 Entries:%i >40 string x Name:%.24s #------------------------------------------------------------------------------ # autocad: file(1) magic for cad files # # AutoCAD DWG versions R13/R14 (www.autodesk.com) # Written December 01, 2003 by Lester Hightower # Based on the DWG File Format Specifications at http://www.opendwg.org/ 0 string \101\103\061\060\061 AutoCAD >5 string \062\000\000\000\000 DWG ver. R13 >5 string \064\000\000\000\000 DWG ver. R14 # Microstation DGN/CIT Files (www.bentley.com) # Last updated July 29, 2005 by Lester Hightower # DGN is the default file extension of Microstation/Intergraph CAD files. # CIT is the proprietary raster format (similar to TIFF) used to attach # raster underlays to Microstation DGN (vector) drawings. # # http://www.wotsit.org/search.asp # http://filext.com/detaillist.php?extdetail=DGN # http://filext.com/detaillist.php?extdetail=CIT # # http://www.bentley.com/products/default.cfm?objectid=97F351F5-9C35-4E5E-89C2 # 3F86C928&method=display&p_objectid=97F351F5-9C35-4E5E-89C280A93F86C928 # http://www.bentley.com/products/default.cfm?objectid=A5C2FD43-3AC9-4C71-B682 # 721C479F&method=display&p_objectid=A5C2FD43-3AC9-4C71-B682C7BE721C479F 0 string \010\011\376 Microstation >3 string \002 >>30 string \026\105 DGNFile >>30 string \034\105 DGNFile >>30 string \073\107 DGNFile >>30 string \073\110 DGNFile >>30 string \106\107 DGNFile >>30 string \110\103 DGNFile >>30 string \120\104 DGNFile >>30 string \172\104 DGNFile >>30 string \172\105 DGNFile >>30 string \172\106 DGNFile >>30 string \234\106 DGNFile >>30 string \273\105 DGNFile >>30 string \306\106 DGNFile >>30 string \310\104 DGNFile >>30 string \341\104 DGNFile >>30 string \372\103 DGNFile >>30 string \372\104 DGNFile >>30 string \372\106 DGNFile >>30 string \376\103 DGNFile >4 string \030\000\000 CITFile >4 string \030\000\003 CITFile # AutoCad, from Nahuel Greco # AutoCAD DWG versions R12/R13/R14 (www.autodesk.com) 0 string AC1012 AutoCad (release 12) 0 string AC1013 AutoCad (release 13) 0 string AC1014 AutoCad (release 14) # CAD: file(1) magic for computer aided design files # Phillip Griffith # AutoCAD magic taken from the Open Design Alliance's OpenDWG specifications. # 0 belong 0x08051700 Bentley/Intergraph MicroStation DGN cell library 0 belong 0x0809fe02 Bentley/Intergraph MicroStation DGN vector CAD 0 belong 0xc809fe02 Bentley/Intergraph MicroStation DGN vector CAD 0 beshort 0x0809 Bentley/Intergraph MicroStation >0x02 byte 0xfe >>0x04 beshort 0x1800 CIT raster CAD 0 string AC1012 AutoDesk AutoCAD R13 0 string AC1014 AutoDesk AutoCAD R14 0 string AC1015 AutoDesk AutoCAD R2000 #------------------------------------------------------------------------------ # Cafe Babes unite! # # Since Java bytecode and Mach-O fat-files have the same magic number, the test # must be performed in the same "magic" sequence to get both right. The long # at offset 4 in a mach-O fat file tells the number of architectures; the short at # offset 4 in a Java bytecode file is the JVM minor version and the # short at offset 6 is the JVM major version. Since there are only # only 18 labeled Mach-O architectures at current, and the first released # Java class format was version 43.0, we can safely choose any number # between 18 and 39 to test the number of architectures against # (and use as a hack). Let's not use 18, because the Mach-O people # might add another one or two as time goes by... # 0 belong 0xcafebabe !:mime application/x-java-applet >4 belong >30 compiled Java class data, >>6 beshort x version %d. >>4 beshort x \b%d # Which is which? #>>4 belong 0x032d (Java 1.0) #>>4 belong 0x032d (Java 1.1) >>4 belong 0x002e (Java 1.2) >>4 belong 0x002f (Java 1.3) >>4 belong 0x0030 (Java 1.4) >>4 belong 0x0031 (Java 1.5) >>4 belong 0x0032 (Java 1.6) 0 belong 0xcafebabe >4 belong 1 Mach-O fat file with 1 architecture >4 belong >1 >>4 belong <20 Mach-O fat file with %ld architectures 0 belong 0xcafed00d JAR compressed with pack200, >>5 byte x version %d. >>4 byte x \b%d !:mime application/x-java-pack200 #------------------------------------------------------------------------------ # CDDB: file(1) magic for CDDB(tm) format CD text data files # # From # # This is the /etc/magic entry to decode datafiles as used by # CDDB-enabled CD player applications. # 0 search/1/b #\040xmcd CDDB(tm) format CD text data #------------------------------------------------------------------------------ # chord: file(1) magic for Chord music sheet typesetting utility input files # # From Philippe De Muyter # File format is actually free, but many distributed files begin with `{title' # 0 string {title Chord text file #------------------------------------------------------------------------------ # cisco: file(1) magic for cisco Systems routers # # Most cisco file-formats are covered by the generic elf code # # Microcode files are non-ELF, 0x8501 conflicts with NetBSD/alpha. 0 belong&0xffffff00 0x85011400 cisco IOS microcode >7 string >\0 for '%s' 0 belong&0xffffff00 0x8501cb00 cisco IOS experimental microcode >7 string >\0 for '%s' #------------------------------------------------------------------------------ # citrus locale declaration # 0 string RuneCT Citrus locale declaration for LC_CTYPE #------------------------------------------------------------------------------ # clarion: file(1) magic for # Clarion Personal/Professional Developer # (v2 and above) # From: Julien Blache # Database files # signature 0 leshort 0x3343 Clarion Developer (v2 and above) data file # attributes >2 leshort &0x0001 \b, locked >2 leshort &0x0004 \b, encrypted >2 leshort &0x0008 \b, memo file exists >2 leshort &0x0010 \b, compressed >2 leshort &0x0040 \b, read only # number of records >5 lelong x \b, %ld records # Memo files 0 leshort 0x334d Clarion Developer (v2 and above) memo data # Key/Index files # No magic? :( # Help files 0 leshort 0x49e0 Clarion Developer (v2 and above) help data #------------------------------------------------------------------------------ # claris: file(1) magic for claris # "H. Nanosecond" # Claris Works a word processor, etc. # Version 3.0 # .pct claris works clip art files #0000000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 #* #0001000 #010 250 377 377 377 377 000 213 000 230 000 021 002 377 014 000 #null to byte 1000 octal 514 string \377\377\377\377\000 Claris clip art? >0 string \0\0\0\0\0\0\0\0\0\0\0\0\0 yes. 514 string \377\377\377\377\001 Claris clip art? >0 string \0\0\0\0\0\0\0\0\0\0\0\0\0 yes. # Claris works files # .cwk 0 string \002\000\210\003\102\117\102\117\000\001\206 Claris works document # .plt 0 string \020\341\000\000\010\010 Claris Works pallete files .plt # .msp a dictionary file I am not sure about this I have only one .msp file 0 string \002\271\262\000\040\002\000\164 Claris works dictionary # .usp are user dictionary bits # I am not sure about a magic header: #0000000 001 123 160 146 070 125 104 040 136 123 015 012 160 157 144 151 # soh S p f 8 U D sp ^ S cr nl p o d i #0000020 141 164 162 151 163 164 040 136 123 015 012 144 151 166 040 043 # a t r i s t sp ^ S cr nl d i v sp # # .mth Thesaurus # starts with \0 but no magic header # .chy Hyphenation file # I am not sure: 000 210 034 000 000 # other claris files #./windows/claris/useng.ndx: data #./windows/claris/xtndtran.l32: data #./windows/claris/xtndtran.lst: data #./windows/claris/clworks.lbl: data #./windows/claris/clworks.prf: data #./windows/claris/userd.spl: data #------------------------------------------------------------------------------ # clipper: file(1) magic for Intergraph (formerly Fairchild) Clipper. # # XXX - what byte order does the Clipper use? # # XXX - what's the "!" stuff: # # >18 short !074000,000000 C1 R1 # >18 short !074000,004000 C2 R1 # >18 short !074000,010000 C3 R1 # >18 short !074000,074000 TEST # # I shall assume it's ANDing the field with the first value and # comparing it with the second, and rewrite it as: # # >18 short&074000 000000 C1 R1 # >18 short&074000 004000 C2 R1 # >18 short&074000 010000 C3 R1 # >18 short&074000 074000 TEST # # as SVR3.1's "file" doesn't support anything of the "!074000,000000" # sort, nor does SunOS 4.x, so either it's something Intergraph added # in CLIX, or something AT&T added in SVR3.2 or later, or something # somebody else thought was a good idea; it's not documented in the # man page for this version of "magic", nor does it appear to be # implemented (at least not after I blew off the bogus code to turn # old-style "&"s into new-style "&"s, which just didn't work at all). # 0 short 0575 CLIPPER COFF executable (VAX #) >20 short 0407 (impure) >20 short 0410 (5.2 compatible) >20 short 0411 (pure) >20 short 0413 (demand paged) >20 short 0443 (target shared library) >12 long >0 not stripped >22 short >0 - version %ld 0 short 0577 CLIPPER COFF executable >18 short&074000 000000 C1 R1 >18 short&074000 004000 C2 R1 >18 short&074000 010000 C3 R1 >18 short&074000 074000 TEST >20 short 0407 (impure) >20 short 0410 (pure) >20 short 0411 (separate I&D) >20 short 0413 (paged) >20 short 0443 (target shared library) >12 long >0 not stripped >22 short >0 - version %ld >48 long&01 01 alignment trap enabled >52 byte 1 -Ctnc >52 byte 2 -Ctsw >52 byte 3 -Ctpw >52 byte 4 -Ctcb >53 byte 1 -Cdnc >53 byte 2 -Cdsw >53 byte 3 -Cdpw >53 byte 4 -Cdcb >54 byte 1 -Csnc >54 byte 2 -Cssw >54 byte 3 -Cspw >54 byte 4 -Cscb 4 string pipe CLIPPER instruction trace 4 string prof CLIPPER instruction profile #------------------------------------------------------------------------------ # commands: file(1) magic for various shells and interpreters # #0 string : shell archive or script for antique kernel text 0 string/b #!\ /bin/sh POSIX shell script text executable !:mime text/x-shellscript 0 string/b #!\ /bin/csh C shell script text executable !:mime text/x-shellscript # korn shell magic, sent by George Wu, gwu@clyde.att.com 0 string/b #!\ /bin/ksh Korn shell script text executable !:mime text/x-shellscript 0 string/b #!\ /bin/tcsh Tenex C shell script text executable !:mime text/x-shellscript 0 string/b #!\ /usr/local/tcsh Tenex C shell script text executable !:mime text/x-shellscript 0 string/b #!\ /usr/local/bin/tcsh Tenex C shell script text executable !:mime text/x-shellscript # # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson) 0 string/b #!\ /bin/zsh Paul Falstad's zsh script text executable !:mime text/x-shellscript 0 string/b #!\ /usr/bin/zsh Paul Falstad's zsh script text executable !:mime text/x-shellscript 0 string/b #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable !:mime text/x-shellscript 0 string/b #!\ /usr/local/bin/ash Neil Brown's ash script text executable !:mime text/x-shellscript 0 string/b #!\ /usr/local/bin/ae Neil Brown's ae script text executable !:mime text/x-shellscript 0 string/b #!\ /bin/nawk new awk script text executable !:mime text/x-nawk 0 string/b #!\ /usr/bin/nawk new awk script text executable !:mime text/x-nawk 0 string/b #!\ /usr/local/bin/nawk new awk script text executable !:mime text/x-nawk 0 string/b #!\ /bin/gawk GNU awk script text executable !:mime text/x-gawk 0 string/b #!\ /usr/bin/gawk GNU awk script text executable !:mime text/x-gawk 0 string/b #!\ /usr/local/bin/gawk GNU awk script text executable !:mime text/x-gawk # 0 string/b #!\ /bin/awk awk script text executable !:mime text/x-awk 0 string/b #!\ /usr/bin/awk awk script text executable !:mime text/x-awk # update to distinguish from *.vcf files # this is broken because postscript has /EBEGIN{ for example. #0 search/Bb BEGIN { awk script text # AT&T Bell Labs' Plan 9 shell 0 string/b #!\ /bin/rc Plan 9 rc shell script text executable # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de) 0 string/b #!\ /bin/bash Bourne-Again shell script text executable !:mime text/x-shellscript 0 string/b #!\ /usr/local/bin/bash Bourne-Again shell script text executable !:mime text/x-shellscript # using env 0 string #!/usr/bin/env a >15 string >\0 %s script text executable 0 string #!\ /usr/bin/env a >16 string >\0 %s script text executable # PHP scripts # Ulf Harnhammar 0 search/1/c =. 0 string $Suite TTCN Abstract Test Suite >&1 string $SuiteId >>&1 string >\n %s >&2 string $SuiteId >>&1 string >\n %s >&3 string $SuiteId >>&1 string >\n %s # MSC (message sequence charts) are a formal description technique, # described in ITU-T Z.120, mainly used for communication protocols. # Added by W. Borgert . 0 string mscdocument Message Sequence Chart (document) 0 string msc Message Sequence Chart (chart) 0 string submsc Message Sequence Chart (subchart) #------------------------------------------------------------------------------ # compress: file(1) magic for pure-compression formats (no archives) # # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. # # Formats for various forms of compressed data # Formats for "compress" proper have been moved into "compress.c", # because it tries to uncompress it to figure out what's inside. # standard unix compress 0 string \037\235 compress'd data !:mime application/x-compress !:apple LZIVZIVU >2 byte&0x80 >0 block compressed >2 byte&0x1f x %d bits # gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver) # Edited by Chris Chittleborough , March 2002 # * Original filename is only at offset 10 if "extra field" absent # * Produce shorter output - notably, only report compression methods # other than 8 ("deflate", the only method defined in RFC 1952). 0 string \037\213 gzip compressed data !:mime application/x-gzip >2 byte <8 \b, reserved method >2 byte >8 \b, unknown method >3 byte &0x01 \b, ASCII >3 byte &0x02 \b, has CRC >3 byte &0x04 \b, extra field >3 byte&0xC =0x08 >>10 string x \b, was "%s" >3 byte &0x10 \b, has comment >9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT) >9 byte =0x01 \b, from Amiga >9 byte =0x02 \b, from VMS >9 byte =0x03 \b, from Unix >9 byte =0x04 \b, from VM/CMS >9 byte =0x05 \b, from Atari >9 byte =0x06 \b, from HPFS filesystem (OS/2, NT) >9 byte =0x07 \b, from MacOS >9 byte =0x08 \b, from Z-System >9 byte =0x09 \b, from CP/M >9 byte =0x0A \b, from TOPS/20 >9 byte =0x0B \b, from NTFS filesystem (NT) >9 byte =0x0C \b, from QDOS >9 byte =0x0D \b, from Acorn RISCOS >3 byte &0x10 \b, comment >3 byte &0x20 \b, encrypted >4 ledate >0 \b, last modified: %s >8 byte 2 \b, max compression >8 byte 4 \b, max speed # packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis 0 string \037\036 packed data !:mime application/octet-stream >2 belong >1 \b, %d characters originally >2 belong =1 \b, %d character originally # # This magic number is byte-order-independent. 0 short 0x1f1f old packed data !:mime application/octet-stream # XXX - why *two* entries for "compacted data", one of which is # byte-order independent, and one of which is byte-order dependent? # 0 short 0x1fff compacted data !:mime application/octet-stream # This string is valid for SunOS (BE) and a matching "short" is listed # in the Ultrix (LE) magic file. 0 string \377\037 compacted data !:mime application/octet-stream 0 short 0145405 huf output !:mime application/octet-stream # bzip2 0 string BZh bzip2 compressed data !:mime application/x-bzip2 >3 byte >47 \b, block size = %c00k # lzip 0 string LZIP lzip compressed data !:mime application/x-lzip >4 byte x \b, version: %d # squeeze and crunch # Michael Haardt 0 beshort 0x76FF squeezed data, >4 string x original name %s 0 beshort 0x76FE crunched data, >2 string x original name %s 0 beshort 0x76FD LZH compressed data, >2 string x original name %s # Freeze 0 string \037\237 frozen file 2.1 0 string \037\236 frozen file 1.0 (or gzip 0.5) # SCO compress -H (LZH) 0 string \037\240 SCO compress -H (LZH) data # European GSM 06.10 is a provisional standard for full-rate speech # transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse # excitation/long term prediction) coding at 13 kbit/s. # # There's only a magic nibble (4 bits); that nibble repeats every 33 # bytes. This isn't suited for use, but maybe we can use it someday. # # This will cause very short GSM files to be declared as data and # mismatches to be declared as data too! #0 byte&0xF0 0xd0 data #>33 byte&0xF0 0xd0 #>66 byte&0xF0 0xd0 #>99 byte&0xF0 0xd0 #>132 byte&0xF0 0xd0 GSM 06.10 compressed audio # bzip a block-sorting file compressor # by Julian Seward and others # #0 string BZ bzip compressed data #>2 byte x \b, version: %c #>3 string =1 \b, compression block size 100k #>3 string =2 \b, compression block size 200k #>3 string =3 \b, compression block size 300k #>3 string =4 \b, compression block size 400k #>3 string =5 \b, compression block size 500k #>3 string =6 \b, compression block size 600k #>3 string =7 \b, compression block size 700k #>3 string =8 \b, compression block size 800k #>3 string =9 \b, compression block size 900k # lzop from 0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data >9 beshort <0x0940 >>9 byte&0xf0 =0x00 - version 0. >>9 beshort&0x0fff x \b%03x, >>13 byte 1 LZO1X-1, >>13 byte 2 LZO1X-1(15), >>13 byte 3 LZO1X-999, ## >>22 bedate >0 last modified: %s, >>14 byte =0x00 os: MS-DOS >>14 byte =0x01 os: Amiga >>14 byte =0x02 os: VMS >>14 byte =0x03 os: Unix >>14 byte =0x05 os: Atari >>14 byte =0x06 os: OS/2 >>14 byte =0x07 os: MacOS >>14 byte =0x0A os: Tops/20 >>14 byte =0x0B os: WinNT >>14 byte =0x0E os: Win32 >9 beshort >0x0939 >>9 byte&0xf0 =0x00 - version 0. >>9 byte&0xf0 =0x10 - version 1. >>9 byte&0xf0 =0x20 - version 2. >>9 beshort&0x0fff x \b%03x, >>15 byte 1 LZO1X-1, >>15 byte 2 LZO1X-1(15), >>15 byte 3 LZO1X-999, ## >>25 bedate >0 last modified: %s, >>17 byte =0x00 os: MS-DOS >>17 byte =0x01 os: Amiga >>17 byte =0x02 os: VMS >>17 byte =0x03 os: Unix >>17 byte =0x05 os: Atari >>17 byte =0x06 os: OS/2 >>17 byte =0x07 os: MacOS >>17 byte =0x0A os: Tops/20 >>17 byte =0x0B os: WinNT >>17 byte =0x0E os: Win32 # 4.3BSD-Quasijarus Strong Compression # http://minnie.tuhs.org/Quasijarus/compress.html 0 string \037\241 Quasijarus strong compressed data # From: Cory Dikkers 0 string XPKF Amiga xpkf.library compressed data 0 string PP11 Power Packer 1.1 compressed data 0 string PP20 Power Packer 2.0 compressed data, >4 belong 0x09090909 fast compression >4 belong 0x090A0A0A mediocre compression >4 belong 0x090A0B0B good compression >4 belong 0x090A0C0C very good compression >4 belong 0x090A0C0D best compression # 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at) # http://www.7-zip.org or DOC/7zFormat.txt # 0 string 7z\274\257\047\034 7-zip archive data, >6 byte x version %d >7 byte x \b.%d # Type: LZMA # URL: http://www.7-zip.org/sdk.html # From: Robert Millan and Reuben Thomas # Commented out because apparently not reliable (according to Debian # bug #364260) #0 string ]\000\000\200\000 LZMA compressed data # http://tukaani.org/xz/xz-file-format.txt 0 ustring \xFD7zXZ\x00 xz compressed data !:mime application/x-xz # AFX compressed files (Wolfram Kleff) 2 string -afx- AFX compressed file data # Supplementary magic data for the file(1) command to support # rzip(1). The format is described in magic(5). # # Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with # this file. # 0 string RZIP rzip compressed data >4 byte x - version %d >5 byte x \b.%d >6 belong x (%d bytes) # Type: XZ # URL: http://tukaani.org/xz/ 0 string \xfd\x37\x7a\x58\x5a\x00 XZ compressed data !:mime application/x-xz #------------------------------------------------------------------------------ # Console game magic # Toby Deshane # ines: file(1) magic for Marat's iNES Nintendo Entertainment System # ROM dump format 0 string NES\032 iNES ROM dump, >4 byte x %dx16k PRG >5 byte x \b, %dx8k CHR >6 byte&0x01 =0x1 \b, [Vert.] >6 byte&0x01 =0x0 \b, [Horiz.] >6 byte&0x02 =0x2 \b, [SRAM] >6 byte&0x04 =0x4 \b, [Trainer] >6 byte&0x04 =0x8 \b, [4-Scr] #------------------------------------------------------------------------------ # gameboy: file(1) magic for the Nintendo (Color) Gameboy raw ROM format # 0x104 belong 0xCEED6666 Gameboy ROM: >0x134 string >\0 "%.16s" >0x146 byte 0x03 \b,[SGB] >0x147 byte 0x00 \b, [ROM ONLY] >0x147 byte 0x01 \b, [ROM+MBC1] >0x147 byte 0x02 \b, [ROM+MBC1+RAM] >0x147 byte 0x03 \b, [ROM+MBC1+RAM+BATT] >0x147 byte 0x05 \b, [ROM+MBC2] >0x147 byte 0x06 \b, [ROM+MBC2+BATTERY] >0x147 byte 0x08 \b, [ROM+RAM] >0x147 byte 0x09 \b, [ROM+RAM+BATTERY] >0x147 byte 0x0B \b, [ROM+MMM01] >0x147 byte 0x0C \b, [ROM+MMM01+SRAM] >0x147 byte 0x0D \b, [ROM+MMM01+SRAM+BATT] >0x147 byte 0x0F \b, [ROM+MBC3+TIMER+BATT] >0x147 byte 0x10 \b, [ROM+MBC3+TIMER+RAM+BATT] >0x147 byte 0x11 \b, [ROM+MBC3] >0x147 byte 0x12 \b, [ROM+MBC3+RAM] >0x147 byte 0x13 \b, [ROM+MBC3+RAM+BATT] >0x147 byte 0x19 \b, [ROM+MBC5] >0x147 byte 0x1A \b, [ROM+MBC5+RAM] >0x147 byte 0x1B \b, [ROM+MBC5+RAM+BATT] >0x147 byte 0x1C \b, [ROM+MBC5+RUMBLE] >0x147 byte 0x1D \b, [ROM+MBC5+RUMBLE+SRAM] >0x147 byte 0x1E \b, [ROM+MBC5+RUMBLE+SRAM+BATT] >0x147 byte 0x1F \b, [Pocket Camera] >0x147 byte 0xFD \b, [Bandai TAMA5] >0x147 byte 0xFE \b, [Hudson HuC-3] >0x147 byte 0xFF \b, [Hudson HuC-1] >0x148 byte 0 \b, ROM: 256Kbit >0x148 byte 1 \b, ROM: 512Kbit >0x148 byte 2 \b, ROM: 1Mbit >0x148 byte 3 \b, ROM: 2Mbit >0x148 byte 4 \b, ROM: 4Mbit >0x148 byte 5 \b, ROM: 8Mbit >0x148 byte 6 \b, ROM: 16Mbit >0x148 byte 0x52 \b, ROM: 9Mbit >0x148 byte 0x53 \b, ROM: 10Mbit >0x148 byte 0x54 \b, ROM: 12Mbit >0x149 byte 1 \b, RAM: 16Kbit >0x149 byte 2 \b, RAM: 64Kbit >0x149 byte 3 \b, RAM: 128Kbit >0x149 byte 4 \b, RAM: 1Mbit #>0x14e long x \b, CRC: %x #------------------------------------------------------------------------------ # genesis: file(1) magic for the Sega MegaDrive/Genesis raw ROM format # 0x100 string SEGA Sega MegaDrive/Genesis raw ROM dump >0x120 string >\0 Name: "%.16s" >0x110 string >\0 %.16s >0x1B0 string RA with SRAM #------------------------------------------------------------------------------ # genesis: file(1) magic for the Super MegaDrive ROM dump format # 0x280 string EAGN Super MagicDrive ROM dump >0 byte x %dx16k blocks >2 byte 0 \b, last in series or standalone >2 byte >0 \b, split ROM >8 byte 0xAA >9 byte 0xBB #------------------------------------------------------------------------------ # genesis: file(1) alternate magic for the Super MegaDrive ROM dump format # 0x280 string EAMG Super MagicDrive ROM dump >0 byte x %dx16k blocks >2 byte x \b, last in series or standalone >8 byte 0xAA >9 byte 0xBB #------------------------------------------------------------------------------ # smsgg: file(1) magic for Sega Master System and Game Gear ROM dumps # # Does not detect all images. Very preliminary guesswork. Need more data # on format. # # FIXME: need a little more info...;P # #0 byte 0xF3 #>1 byte 0xED Sega Master System/Game Gear ROM dump #>1 byte 0x31 Sega Master System/Game Gear ROM dump #>1 byte 0xDB Sega Master System/Game Gear ROM dump #>1 byte 0xAF Sega Master System/Game Gear ROM dump #>1 byte 0xC3 Sega Master System/Game Gear ROM dump #------------------------------------------------------------------------------ # dreamcast: file(1) uncertain magic for the Sega Dreamcast VMU image format # 0 belong 0x21068028 Sega Dreamcast VMU game image 0 string LCDi Dream Animator file #------------------------------------------------------------------------------ # v64: file(1) uncertain magic for the V64 format N64 ROM dumps # 0 belong 0x37804012 V64 Nintendo 64 ROM dump # From: "Nelson A. de Oliveira" # Nintendo .nds 192 string \044\377\256Qi\232 Nintendo DS Game ROM Image # Nintendo .gba 0 string \056\000\000\352$\377\256Qi Nintendo Game Boy Advance ROM Image #------------------------------------------------------------------------------ # msx: file(1) magic for MSX game cartridge dumps # Too simple - MPi #0 beshort 0x4142 MSX game cartridge dump #------------------------------------------------------------------------------ # Sony Playstation executables (Adam Sjoegren ) : 0 string PS-X\ EXE Sony Playstation executable # Area: >113 string x (%s) #------------------------------------------------------------------------------ # Microsoft Xbox executables .xbe (Esa Hyytiä ) 0 string XBEH XBE, Microsoft Xbox executable # probabilistic checks whether signed or not >0x0004 ulelong =0x0 >>&2 ulelong =0x0 >>>&2 ulelong =0x0 \b, not signed >0x0004 ulelong >0 >>&2 ulelong >0 >>>&2 ulelong >0 \b, signed # expect base address of 0x10000 >0x0104 ulelong =0x10000 >>(0x0118-0x0FF60) ulelong&0x80000007 0x80000007 \b, all regions >>(0x0118-0x0FF60) ulelong&0x80000007 !0x80000007 >>>(0x0118-0x0FF60) ulelong >0 (regions: >>>>(0x0118-0x0FF60) ulelong &0x00000001 NA >>>>(0x0118-0x0FF60) ulelong &0x00000002 Japan >>>>(0x0118-0x0FF60) ulelong &0x00000004 Rest_of_World >>>>(0x0118-0x0FF60) ulelong &0x80000000 Manufacturer >>>(0x0118-0x0FF60) ulelong >0 \b) # -------------------------------- # Microsoft Xbox data file formats 0 string XIP0 XIP, Microsoft Xbox data 0 string XTF0 XTF, Microsoft Xbox data # Atari Lynx cartridge dump (EXE/BLL header) # From: "Stefan A. Haubenthal" 0 beshort 0x8008 Lynx cartridge, >2 beshort x RAM start $%04x >6 string BS93 # Opera file system that is used on the 3DO console # From: Serge van den Boom 0 string \x01ZZZZZ\x01 3DO "Opera" file system # From Gürkan Sengün , www.linuks.mine.nu 0 string GBS Nintendo Gameboy Music/Audio Data 12 string GameBoy\ Music\ Module Nintendo Gameboy Music Module # Playstations Patch Files from: From: Thomas Klausner 0 string PPF30 Playstation Patch File version 3.0 >5 byte 0 \b, PPF 1.0 patch >5 byte 1 \b, PPF 2.0 patch >5 byte 2 \b, PPF 3.0 patch >>56 byte 0 \b, Imagetype BIN (any) >>56 byte 1 \b, Imagetype GI (PrimoDVD) >>57 byte 0 \b, Blockcheck disabled >>57 byte 1 \b, Blockcheck enabled >>58 byte 0 \b, Undo data not available >>58 byte 1 \b, Undo data available >6 string x \b, description: %s 0 string PPF20 Playstation Patch File version 2.0 >5 byte 0 \b, PPF 1.0 patch >5 byte 1 \b, PPF 2.0 patch >>56 lelong >0 \b, size of file to patch %d >6 string x \b, description: %s 0 string PPF10 Playstation Patch File version 1.0 >5 byte 0 \b, Simple Encoding >6 string x \b, description: %s # From: Daniel Dawson # SNES9x .smv "movie" file format. 0 string SMV\x1A SNES9x input recording >0x4 lelong x \b, version %d # version 4 is latest so far >0x4 lelong <5 >>0x8 ledate x \b, recorded at %s >>0xc lelong >0 \b, rerecorded %d times >>0x10 lelong x \b, %d frames long >>0x14 byte >0 \b, data for controller(s): >>>0x14 byte &0x1 #1 >>>0x14 byte &0x2 #2 >>>0x14 byte &0x4 #3 >>>0x14 byte &0x8 #4 >>>0x14 byte &0x10 #5 >>0x15 byte ^0x1 \b, begins from snapshot >>0x15 byte &0x1 \b, begins from reset >>0x15 byte ^0x2 \b, NTSC standard >>0x15 byte &0x2 \b, PAL standard >>0x17 byte &0x1 \b, settings: # WIP1Timing not used as of version 4 >>>0x4 lelong <4 >>>>0x17 byte &0x2 WIP1Timing >>>0x17 byte &0x4 Left+Right >>>0x17 byte &0x8 VolumeEnvX >>>0x17 byte &0x10 FakeMute >>>0x17 byte &0x20 SyncSound # New flag as of version 4 >>>0x4 lelong >3 >>>>0x17 byte &0x80 NoCPUShutdown >>0x4 lelong <4 >>>0x18 lelong >0x23 >>>>0x20 leshort !0 >>>>>0x20 lestring16 x \b, metadata: "%s" >>0x4 lelong >3 >>>0x24 byte >0 \b, port 1: >>>>0x24 byte 1 joypad >>>>0x24 byte 2 mouse >>>>0x24 byte 3 SuperScope >>>>0x24 byte 4 Justifier >>>>0x24 byte 5 multitap >>>0x24 byte >0 \b, port 2: >>>>0x25 byte 1 joypad >>>>0x25 byte 2 mouse >>>>0x25 byte 3 SuperScope >>>>0x25 byte 4 Justifier >>>>0x25 byte 5 multitap >>>0x18 lelong >0x43 >>>>0x40 leshort !0 >>>>>0x40 lestring16 x \b, metadata: "%s" >>0x17 byte &0x40 \b, ROM: >>>(0x18.l-26) lelong x CRC32 0x%08x >>>(0x18.l-23) string x "%s" #------------------------------------------------------------------------------ # convex: file(1) magic for Convex boxes # # Convexes are big-endian. # # /*\ # * Below are the magic numbers and tests added for Convex. # * Added at beginning, because they are expected to be used most. # \*/ 0 belong 0507 Convex old-style object >16 belong >0 not stripped 0 belong 0513 Convex old-style demand paged executable >16 belong >0 not stripped 0 belong 0515 Convex old-style pre-paged executable >16 belong >0 not stripped 0 belong 0517 Convex old-style pre-paged, non-swapped executable >16 belong >0 not stripped 0 belong 0x011257 Core file # # The following are a series of dump format magic numbers. Each one # corresponds to a drastically different dump format. The first on is # the original dump format on a 4.1 BSD or earlier file system. The # second marks the change between the 4.1 file system and the 4.2 file # system. The Third marks the changing of the block size from 1K # to 2K to be compatible with an IDC file system. The fourth indicates # a dump that is dependent on Convex Storage Manager, because data in # secondary storage is not physically contained within the dump. # The restore program uses these number to determine how the data is # to be extracted. # 24 belong =60011 dump format, 4.1 BSD or earlier 24 belong =60012 dump format, 4.2 or 4.3 BSD without IDC 24 belong =60013 dump format, 4.2 or 4.3 BSD (IDC compatible) 24 belong =60014 dump format, Convex Storage Manager by-reference dump # # what follows is a bunch of bit-mask checks on the flags field of the opthdr. # If there is no `=' sign, assume just checking for whether the bit is set? # 0 belong 0601 Convex SOFF >88 belong&0x000f0000 =0x00000000 c1 >88 belong &0x00010000 c2 >88 belong &0x00020000 c2mp >88 belong &0x00040000 parallel >88 belong &0x00080000 intrinsic >88 belong &0x00000001 demand paged >88 belong &0x00000002 pre-paged >88 belong &0x00000004 non-swapped >88 belong &0x00000008 POSIX # >84 belong &0x80000000 executable >84 belong &0x40000000 object >84 belong&0x20000000 =0 not stripped >84 belong&0x18000000 =0x00000000 native fpmode >84 belong&0x18000000 =0x10000000 ieee fpmode >84 belong&0x18000000 =0x18000000 undefined fpmode # 0 belong 0605 Convex SOFF core # 0 belong 0607 Convex SOFF checkpoint >88 belong&0x000f0000 =0x00000000 c1 >88 belong &0x00010000 c2 >88 belong &0x00020000 c2mp >88 belong &0x00040000 parallel >88 belong &0x00080000 intrinsic >88 belong &0x00000008 POSIX # >84 belong&0x18000000 =0x00000000 native fpmode >84 belong&0x18000000 =0x10000000 ieee fpmode >84 belong&0x18000000 =0x18000000 undefined fpmode #------------------------------------------------------------------------------ # cracklib: file (1) magic for cracklib v2.7 0 lelong 0x70775631 Cracklib password index, little endian >4 long >0 (%i words) >4 long 0 ("64-bit") >>8 long >-1 (%i words) 0 belong 0x70775631 Cracklib password index, big endian >4 belong >-1 (%i words) # really bellong 0x0000000070775631 0 search/1 \0\0\0\0pwV1 Cracklib password index, big endian ("64-bit") >12 belong >0 (%i words) # ---------------------------------------------------------------------------- # ctags: file (1) magic for Exuberant Ctags files # From: Alexander Mai 0 search/1 =!_TAG Exuberant Ctags tag file text #------------------------------------------------------------------------------ # dact: file(1) magic for DACT compressed files # 0 long 0x444354C3 DACT compressed data >4 byte >-1 (version %i. >5 byte >-1 $BS%i. >6 byte >-1 $BS%i) >7 long >0 $BS, original size: %i bytes >15 long >30 $BS, block size: %i bytes #------------------------------------------------------------------------------ # database: file(1) magic for various databases # # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk) # # # GDBM magic numbers # Will be maintained as part of the GDBM distribution in the future. # 0 belong 0x13579ace GNU dbm 1.x or ndbm database, big endian !:mime application/x-gdbm 0 lelong 0x13579ace GNU dbm 1.x or ndbm database, little endian !:mime application/x-gdbm 0 string GDBM GNU dbm 2.x database !:mime application/x-gdbm # # Berkeley DB # # Ian Darwin's file /etc/magic files: big/little-endian version. # # Hash 1.85/1.86 databases store metadata in network byte order. # Btree 1.85/1.86 databases store the metadata in host byte order. # Hash and Btree 2.X and later databases store the metadata in host byte order. 0 long 0x00061561 Berkeley DB !:mime application/x-dbm >8 belong 4321 >>4 belong >2 1.86 >>4 belong <3 1.85 >>4 belong >0 (Hash, version %d, native byte-order) >8 belong 1234 >>4 belong >2 1.86 >>4 belong <3 1.85 >>4 belong >0 (Hash, version %d, little-endian) 0 belong 0x00061561 Berkeley DB >8 belong 4321 >>4 belong >2 1.86 >>4 belong <3 1.85 >>4 belong >0 (Hash, version %d, big-endian) >8 belong 1234 >>4 belong >2 1.86 >>4 belong <3 1.85 >>4 belong >0 (Hash, version %d, native byte-order) 0 long 0x00053162 Berkeley DB 1.85/1.86 >4 long >0 (Btree, version %d, native byte-order) 0 belong 0x00053162 Berkeley DB 1.85/1.86 >4 belong >0 (Btree, version %d, big-endian) 0 lelong 0x00053162 Berkeley DB 1.85/1.86 >4 lelong >0 (Btree, version %d, little-endian) 12 long 0x00061561 Berkeley DB >16 long >0 (Hash, version %d, native byte-order) 12 belong 0x00061561 Berkeley DB >16 belong >0 (Hash, version %d, big-endian) 12 lelong 0x00061561 Berkeley DB >16 lelong >0 (Hash, version %d, little-endian) 12 long 0x00053162 Berkeley DB >16 long >0 (Btree, version %d, native byte-order) 12 belong 0x00053162 Berkeley DB >16 belong >0 (Btree, version %d, big-endian) 12 lelong 0x00053162 Berkeley DB >16 lelong >0 (Btree, version %d, little-endian) 12 long 0x00042253 Berkeley DB >16 long >0 (Queue, version %d, native byte-order) 12 belong 0x00042253 Berkeley DB >16 belong >0 (Queue, version %d, big-endian) 12 lelong 0x00042253 Berkeley DB >16 lelong >0 (Queue, version %d, little-endian) # From Max Bowsher. 12 long 0x00040988 Berkeley DB >16 long >0 (Log, version %d, native byte-order) 12 belong 0x00040988 Berkeley DB >16 belong >0 (Log, version %d, big-endian) 12 lelong 0x00040988 Berkeley DB >16 lelong >0 (Log, version %d, little-endian) # # # Round Robin Database Tool by Tobias Oetiker 0 string RRD RRDTool DB >4 string x version %s #---------------------------------------------------------------------- # ROOT: file(1) magic for ROOT databases # 0 string root\0 ROOT file >4 belong x Version %d >33 belong x (Compression: %d) # XXX: Weak magic. # Alex Ott ## Paradox file formats #2 leshort 0x0800 Paradox #>0x39 byte 3 v. 3.0 #>0x39 byte 4 v. 3.5 #>0x39 byte 9 v. 4.x #>0x39 byte 10 v. 5.x #>0x39 byte 11 v. 5.x #>0x39 byte 12 v. 7.x #>>0x04 byte 0 indexed .DB data file #>>0x04 byte 1 primary index .PX file #>>0x04 byte 2 non-indexed .DB data file #>>0x04 byte 3 non-incrementing secondary index .Xnn file #>>0x04 byte 4 secondary index .Ynn file #>>0x04 byte 5 incrementing secondary index .Xnn file #>>0x04 byte 6 non-incrementing secondary index .XGn file #>>0x04 byte 7 secondary index .YGn file #>>>0x04 byte 8 incrementing secondary index .XGn file ## XBase database files #0 byte 0x02 #>8 leshort >0 #>>12 leshort 0 FoxBase #!:mime application/x-dbf #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x03 #!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 FoxBase+, FoxPro, dBaseIII+, dBaseIV, no memo #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x04 #!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 dBASE IV no memo file #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x05 #!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 dBASE V no memo file #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x30 #!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 Visual FoxPro #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x43 #!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 FlagShip with memo var size #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x7b #!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 dBASEIV with memo #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x83 #!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 FoxBase+, dBaseIII+ with memo #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x8b #!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 dBaseIV with memo #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0x8e #!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 dBaseIV with SQL Table #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0xb3 #!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 FlagShip with .dbt memo #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 byte 0xf5 #!:mime application/x-dbf #>8 leshort >0 #>>12 leshort 0 FoxPro with memo #>>>0x04 lelong 0 (no records) #>>>0x04 lelong >0 (%ld records) # #0 leshort 0x0006 DBase 3 index file # MS Access database 4 string Standard\ Jet\ DB Microsoft Access Database !:mime application/x-msaccess # TDB database from Samba et al - Martin Pool 0 string TDB\ file TDB database >32 lelong 0x2601196D version 6, little-endian >>36 lelong x hash size %d bytes # SE Linux policy database 0 lelong 0xf97cff8c SE Linux policy >16 lelong x v%d >20 lelong 1 MLS >24 lelong x %d symbols >28 lelong x %d ocons # ICE authority file data (Wolfram Kleff) 2 string ICE ICE authority data # X11 Xauthority file (Wolfram Kleff) 10 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 11 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 12 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 13 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 14 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 15 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 16 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 17 string MIT-MAGIC-COOKIE-1 X11 Xauthority data 18 string MIT-MAGIC-COOKIE-1 X11 Xauthority data # From: Maxime Henrion # PostgreSQL's custom dump format, Maxime Henrion 0 string PGDMP PostgreSQL custom database dump >5 byte x - v%d >6 byte x \b.%d >5 beshort <0x101 \b-0 >5 beshort >0x100 >>7 byte x \b-%d # Type: Advanced Data Format (ADF) database # URL: http://www.grc.nasa.gov/WWW/cgns/adf/ # From: Nicolas Chauvat 0 string @(#)ADF\ Database CGNS Advanced Data Format # Tokyo Cabinet magic data # http://tokyocabinet.sourceforge.net/index.html 0 string ToKyO\ CaBiNeT\n Tokyo Cabinet >14 string x \b (%s) >32 byte 0 \b, Hash !:mime application/x-tokyocabinet-hash >32 byte 1 \b, B+ tree !:mime application/x-tokyocabinet-btree >32 byte 2 \b, Fixed-length !:mime application/x-tokyocabinet-fixed >32 byte 3 \b, Table !:mime application/x-tokyocabinet-table >33 byte &1 \b, [open] >33 byte &2 \b, [fatal] >34 byte x \b, apow=%d >35 byte x \b, fpow=%d >36 byte &0x01 \b, [large] >36 byte &0x02 \b, [deflate] >36 byte &0x04 \b, [bzip] >36 byte &0x08 \b, [tcbs] >36 byte &0x10 \b, [excodec] >40 lequad x \b, bnum=%lld >48 lequad x \b, rnum=%lld >56 lequad x \b, fsiz=%lld #------------------------------------------------------------------------------ # diamond: file(1) magic for Diamond system # # ... diamond is a multi-media mail and electronic conferencing system.... # # XXX - I think it was either renamed Slate, or replaced by Slate.... # # The full deal is too long... #0 string \n Diamond Multimedia Document 0 string =\n\n________64E Alpha archive >22 string X -- out of date # # Alpha COFF Based Executables # The stripped stuff really needs to be an 8 byte (64 bit) compare, # but this works 0 leshort 0x183 COFF format alpha >22 leshort&020000 &010000 sharable library, >22 leshort&020000 ^010000 dynamically linked, >24 leshort 0410 pure >24 leshort 0413 demand paged >8 lelong >0 executable or object module, not stripped >8 lelong 0 >>12 lelong 0 executable or object module, stripped >>12 lelong >0 executable or object module, not stripped >27 byte >0 - version %d. >26 byte >0 %d- >28 leshort >0 %d # # The next is incomplete, we could tell more about this format, # but its not worth it. 0 leshort 0x188 Alpha compressed COFF 0 leshort 0x18f Alpha u-code object # # # Some other interesting Digital formats, 0 string \377\377\177 ddis/ddif 0 string \377\377\174 ddis/dots archive 0 string \377\377\176 ddis/dtif table data 0 string \033c\033 LN03 output 0 long 04553207 X image # 0 string =!!\n profiling data file # # Locale data tables (MIPS and Alpha). # 0 short 0x0501 locale data table >6 short 0x24 for MIPS >6 short 0x40 for Alpha # ATSC A/53 aka AC-3 aka Dolby Digital # from http://www.atsc.org/standards/a_52a.pdf # corrections, additions, etc. are always welcome! # # syncword 0 beshort 0x0b77 ATSC A/52 aka AC-3 aka Dolby Digital stream, # fscod >4 byte&0xc0 0x00 48 kHz, >4 byte&0xc0 0x40 44.1 kHz, >4 byte&0xc0 0x80 32 kHz, # is this one used for 96 kHz? >4 byte&0xc0 0xc0 reserved frequency, # >5 byte&7 = 0 \b, complete main (CM) >5 byte&7 = 1 \b, music and effects (ME) >5 byte&7 = 2 \b, visually impaired (VI) >5 byte&7 = 3 \b, hearing impaired (HI) >5 byte&7 = 4 \b, dialogue (D) >5 byte&7 = 5 \b, commentary (C) >5 byte&7 = 6 \b, emergency (E) # acmod >6 byte&0xe0 0x00 1+1 front, >6 byte&0xe0 0x20 1 front/0 rear, >6 byte&0xe0 0x40 2 front/0 rear, >6 byte&0xe0 0x60 3 front/0 rear, >6 byte&0xe0 0x80 2 front/1 rear, >6 byte&0xe0 0xa0 3 front/1 rear, >6 byte&0xe0 0xc0 2 front/2 rear, >6 byte&0xe0 0xe0 3 front/2 rear, # lfeon (these may be incorrect) >7 byte&0x40 0x00 LFE off, >7 byte&0x40 0x40 LFE on, # >4 byte&0x3e = 0x00 \b, 32 kbit/s >4 byte&0x3e = 0x02 \b, 40 kbit/s >4 byte&0x3e = 0x04 \b, 48 kbit/s >4 byte&0x3e = 0x06 \b, 56 kbit/s >4 byte&0x3e = 0x08 \b, 64 kbit/s >4 byte&0x3e = 0x0a \b, 80 kbit/s >4 byte&0x3e = 0x0c \b, 96 kbit/s >4 byte&0x3e = 0x0e \b, 112 kbit/s >4 byte&0x3e = 0x10 \b, 128 kbit/s >4 byte&0x3e = 0x12 \b, 160 kbit/s >4 byte&0x3e = 0x14 \b, 192 kbit/s >4 byte&0x3e = 0x16 \b, 224 kbit/s >4 byte&0x3e = 0x18 \b, 256 kbit/s >4 byte&0x3e = 0x1a \b, 320 kbit/s >4 byte&0x3e = 0x1c \b, 384 kbit/s >4 byte&0x3e = 0x1e \b, 448 kbit/s >4 byte&0x3e = 0x20 \b, 512 kbit/s >4 byte&0x3e = 0x22 \b, 576 kbit/s >4 byte&0x3e = 0x24 \b, 640 kbit/s # dsurmod (these may be incorrect) >6 beshort&0x0180 0x0000 Dolby Surround not indicated >6 beshort&0x0180 0x0080 not Dolby Surround encoded >6 beshort&0x0180 0x0100 Dolby Surround encoded >6 beshort&0x0180 0x0180 reserved Dolby Surround mode #------------------------------------------------------------------------------ # dump: file(1) magic for dump file format--for new and old dump filesystems # # We specify both byte orders in order to recognize byte-swapped dumps. # 24 belong 60012 new-fs dump file (big endian), >4 bedate x Previous dump %s, >8 bedate x This dump %s, >12 belong >0 Volume %ld, >692 belong 0 Level zero, type: >692 belong >0 Level %d, type: >0 belong 1 tape header, >0 belong 2 beginning of file record, >0 belong 3 map of inodes on tape, >0 belong 4 continuation of file record, >0 belong 5 end of volume, >0 belong 6 map of inodes deleted, >0 belong 7 end of medium (for floppy), >676 string >\0 Label %s, >696 string >\0 Filesystem %s, >760 string >\0 Device %s, >824 string >\0 Host %s, >888 belong >0 Flags %x 24 belong 60011 old-fs dump file (big endian), #>4 bedate x Previous dump %s, #>8 bedate x This dump %s, >12 belong >0 Volume %ld, >692 belong 0 Level zero, type: >692 belong >0 Level %d, type: >0 belong 1 tape header, >0 belong 2 beginning of file record, >0 belong 3 map of inodes on tape, >0 belong 4 continuation of file record, >0 belong 5 end of volume, >0 belong 6 map of inodes deleted, >0 belong 7 end of medium (for floppy), >676 string >\0 Label %s, >696 string >\0 Filesystem %s, >760 string >\0 Device %s, >824 string >\0 Host %s, >888 belong >0 Flags %x 24 lelong 60012 new-fs dump file (little endian), >4 ledate x This dump %s, >8 ledate x Previous dump %s, >12 lelong >0 Volume %ld, >692 lelong 0 Level zero, type: >692 lelong >0 Level %d, type: >0 lelong 1 tape header, >0 lelong 2 beginning of file record, >0 lelong 3 map of inodes on tape, >0 lelong 4 continuation of file record, >0 lelong 5 end of volume, >0 lelong 6 map of inodes deleted, >0 lelong 7 end of medium (for floppy), >676 string >\0 Label %s, >696 string >\0 Filesystem %s, >760 string >\0 Device %s, >824 string >\0 Host %s, >888 lelong >0 Flags %x 24 lelong 60011 old-fs dump file (little endian), #>4 ledate x Previous dump %s, #>8 ledate x This dump %s, >12 lelong >0 Volume %ld, >692 lelong 0 Level zero, type: >692 lelong >0 Level %d, type: >0 lelong 1 tape header, >0 lelong 2 beginning of file record, >0 lelong 3 map of inodes on tape, >0 lelong 4 continuation of file record, >0 lelong 5 end of volume, >0 lelong 6 map of inodes deleted, >0 lelong 7 end of medium (for floppy), >676 string >\0 Label %s, >696 string >\0 Filesystem %s, >760 string >\0 Device %s, >824 string >\0 Host %s, >888 lelong >0 Flags %x 18 leshort 60011 old-fs dump file (16-bit, assuming PDP-11 endianness), >2 medate x Previous dump %s, >6 medate x This dump %s, >10 leshort >0 Volume %ld, >0 leshort 1 tape header. >0 leshort 2 beginning of file record. >0 leshort 3 map of inodes on tape. >0 leshort 4 continuation of file record. >0 leshort 5 end of volume. >0 leshort 6 map of inodes deleted. >0 leshort 7 end of medium (for floppy). 24 belong 0x19540119 new-fs dump file (ufs2, big endian), >896 beqdate x Previous dump %s, >904 beqdate x This dump %s, >12 belong >0 Volume %ld, >692 belong 0 Level zero, type: >692 belong >0 Level %d, type: >0 belong 1 tape header, >0 belong 2 beginning of file record, >0 belong 3 map of inodes on tape, >0 belong 4 continuation of file record, >0 belong 5 end of volume, >0 belong 6 map of inodes deleted, >0 belong 7 end of medium (for floppy), >676 string >\0 Label %s, >696 string >\0 Filesystem %s, >760 string >\0 Device %s, >824 string >\0 Host %s, >888 belong >0 Flags %x 24 lelong 0x19540119 new-fs dump file (ufs2, little endian), >896 leqdate x This dump %s, >904 leqdate x Previous dump %s, >12 lelong >0 Volume %ld, >692 lelong 0 Level zero, type: >692 lelong >0 Level %d, type: >0 lelong 1 tape header, >0 lelong 2 beginning of file record, >0 lelong 3 map of inodes on tape, >0 lelong 4 continuation of file record, >0 lelong 5 end of volume, >0 lelong 6 map of inodes deleted, >0 lelong 7 end of medium (for floppy), >676 string >\0 Label %s, >696 string >\0 Filesystem %s, >760 string >\0 Device %s, >824 string >\0 Host %s, >888 lelong >0 Flags %x #------------------------------------------------------------------------------ # Dyadic: file(1) magic for Dyalog APL. # 0 byte 0xaa >1 byte <4 Dyalog APL >>1 byte 0x00 incomplete workspace >>1 byte 0x01 component file >>1 byte 0x02 external variable >>1 byte 0x03 workspace >>2 byte x version %d >>3 byte x .%d #------------------------------------------------------------------------------ # T602 editor documents # by David Necas 0 string @CT\ T602 document data, >4 string 0 Kamenicky >4 string 1 CP 852 >4 string 2 KOI8-CS >4 string >2 unknown encoding # Vi IMproved Encrypted file # by David Necas 0 string VimCrypt~ Vim encrypted file data # Vi IMproved Swap file # by Sven Wegener 0 string b0VIM\ Vim swap file >&0 string >\0 \b, version %s #------------------------------------------------------------------------------ # efi: file(1) magic for Universal EFI binaries 0 lelong 0x0ef1fab9 >4 lelong 1 Universal EFI binary with 1 architecture >>&0 lelong 7 \b, i386 >>&0 lelong 0x01000007 \b, x86_64 >4 lelong 2 Universal EFI binary with 2 architectures >>&0 lelong 7 \b, i386 >>&0 lelong 0x01000007 \b, x86_64 >>&20 lelong 7 \b, i386 >>&20 lelong 0x01000007 \b, x86_64 >4 lelong >2 Universal EFI binary with %ld architectures #------------------------------------------------------------------------------ # elf: file(1) magic for ELF executables # # We have to check the byte order flag to see what byte order all the # other stuff in the header is in. # # What're the correct byte orders for the nCUBE and the Fujitsu VPP500? # # Created by: unknown # Modified by (1): Daniel Quinlan # Modified by (2): Peter Tobias (core support) # Modified by (3): Christian 'Dr. Disk' Hechelmann (fix of core support) # Modified by (4): (VMS Itanium) # Modified by (5): Matthias Urlichs (Listing of many architectures) 0 string \177ELF ELF >4 byte 0 invalid class >4 byte 1 32-bit >4 byte 2 64-bit >5 byte 0 invalid byte order >5 byte 1 LSB >>16 leshort 0 no file type, !:strength *2 !:mime application/octet-stream >>16 leshort 1 relocatable, !:mime application/x-object >>16 leshort 2 executable, !:mime application/x-executable >>16 leshort 3 shared object, !:mime application/x-sharedlib >>16 leshort 4 core file !:mime application/x-coredump # Core file detection is not reliable. #>>>(0x38+0xcc) string >\0 of '%s' #>>>(0x38+0x10) lelong >0 (signal %d), >>16 leshort &0xff00 processor-specific, >>18 leshort 0 no machine, >>18 leshort 1 AT&T WE32100 - invalid byte order, >>18 leshort 2 SPARC - invalid byte order, >>18 leshort 3 Intel 80386, >>18 leshort 4 Motorola >>>36 lelong &0x01000000 68000 - invalid byte order, >>>36 lelong &0x00810000 CPU32 - invalid byte order, >>>36 lelong 0 68020 - invalid byte order, >>18 leshort 5 Motorola 88000 - invalid byte order, >>18 leshort 6 Intel 80486, >>18 leshort 7 Intel 80860, # The official e_machine number for MIPS is now #8, regardless of endianness. # The second number (#10) will be deprecated later. For now, we still # say something if #10 is encountered, but only gory details for #8. >>18 leshort 8 MIPS, >>>36 lelong &0x20 N32 >>18 leshort 10 MIPS, >>>36 lelong &0x20 N32 >>18 leshort 8 # only for 32-bit >>>4 byte 1 >>>>36 lelong&0xf0000000 0x00000000 MIPS-I >>>>36 lelong&0xf0000000 0x10000000 MIPS-II >>>>36 lelong&0xf0000000 0x20000000 MIPS-III >>>>36 lelong&0xf0000000 0x30000000 MIPS-IV >>>>36 lelong&0xf0000000 0x40000000 MIPS-V >>>>36 lelong&0xf0000000 0x50000000 MIPS32 >>>>36 lelong&0xf0000000 0x60000000 MIPS64 >>>>36 lelong&0xf0000000 0x70000000 MIPS32 rel2 >>>>36 lelong&0xf0000000 0x80000000 MIPS64 rel2 # only for 64-bit >>>4 byte 2 >>>>48 lelong&0xf0000000 0x00000000 MIPS-I >>>>48 lelong&0xf0000000 0x10000000 MIPS-II >>>>48 lelong&0xf0000000 0x20000000 MIPS-III >>>>48 lelong&0xf0000000 0x30000000 MIPS-IV >>>>48 lelong&0xf0000000 0x40000000 MIPS-V >>>>48 lelong&0xf0000000 0x50000000 MIPS32 >>>>48 lelong&0xf0000000 0x60000000 MIPS64 >>>>48 lelong&0xf0000000 0x70000000 MIPS32 rel2 >>>>48 lelong&0xf0000000 0x80000000 MIPS64 rel2 >>18 leshort 9 Amdahl - invalid byte order, >>18 leshort 10 MIPS (deprecated), >>18 leshort 11 RS6000 - invalid byte order, >>18 leshort 15 PA-RISC - invalid byte order, >>>50 leshort 0x0214 2.0 >>>48 leshort &0x0008 (LP64), >>18 leshort 16 nCUBE, >>18 leshort 17 Fujitsu VPP500, >>18 leshort 18 SPARC32PLUS - invalid byte order, >>18 leshort 20 PowerPC, >>18 leshort 22 IBM S/390, >>18 leshort 36 NEC V800, >>18 leshort 37 Fujitsu FR20, >>18 leshort 38 TRW RH-32, >>18 leshort 39 Motorola RCE, >>18 leshort 40 ARM, >>18 leshort 41 Alpha, >>18 leshort 0xa390 IBM S/390 (obsolete), >>18 leshort 42 Renesas SH, >>18 leshort 43 SPARC V9 - invalid byte order, >>18 leshort 44 Siemens Tricore Embedded Processor, >>18 leshort 45 Argonaut RISC Core, Argonaut Technologies Inc., >>18 leshort 46 Renesas H8/300, >>18 leshort 47 Renesas H8/300H, >>18 leshort 48 Renesas H8S, >>18 leshort 49 Renesas H8/500, >>18 leshort 50 IA-64, >>18 leshort 51 Stanford MIPS-X, >>18 leshort 52 Motorola Coldfire, >>18 leshort 53 Motorola M68HC12, >>18 leshort 54 Fujitsu MMA, >>18 leshort 55 Siemens PCP, >>18 leshort 56 Sony nCPU, >>18 leshort 57 Denso NDR1, >>18 leshort 58 Start*Core, >>18 leshort 59 Toyota ME16, >>18 leshort 60 ST100, >>18 leshort 61 Tinyj emb., >>18 leshort 62 x86-64, >>18 leshort 63 Sony DSP, >>18 leshort 66 FX66, >>18 leshort 67 ST9+ 8/16 bit, >>18 leshort 68 ST7 8 bit, >>18 leshort 69 MC68HC16, >>18 leshort 70 MC68HC11, >>18 leshort 71 MC68HC08, >>18 leshort 72 MC68HC05, >>18 leshort 73 SGI SVx, >>18 leshort 74 ST19 8 bit, >>18 leshort 75 Digital VAX, >>18 leshort 76 Axis cris, >>18 leshort 77 Infineon 32-bit embedded, >>18 leshort 78 Element 14 64-bit DSP, >>18 leshort 79 LSI Logic 16-bit DSP, >>18 leshort 80 MMIX, >>18 leshort 81 Harvard machine-independent, >>18 leshort 82 SiTera Prism, >>18 leshort 83 Atmel AVR 8-bit, >>18 leshort 84 Fujitsu FR30, >>18 leshort 85 Mitsubishi D10V, >>18 leshort 86 Mitsubishi D30V, >>18 leshort 87 NEC v850, >>18 leshort 88 Renesas M32R, >>18 leshort 89 Matsushita MN10300, >>18 leshort 90 Matsushita MN10200, >>18 leshort 91 picoJava, >>18 leshort 92 OpenRISC, >>18 leshort 93 ARC Cores Tangent-A5, >>18 leshort 94 Tensilica Xtensa, >>18 leshort 97 NatSemi 32k, >>18 leshort 106 Analog Devices Blackfin, >>18 leshort 113 Altera Nios II, >>18 leshort 0xae META, >>18 leshort 0x3426 OpenRISC (obsolete), >>18 leshort 0x8472 OpenRISC (obsolete), >>18 leshort 0x9026 Alpha (unofficial), >>20 lelong 0 invalid version >>20 lelong 1 version 1 >>36 lelong 1 MathCoPro/FPU/MAU Required >5 byte 2 MSB >>16 beshort 0 no file type, !:mime application/octet-stream >>16 beshort 1 relocatable, !:mime application/x-object >>16 beshort 2 executable, !:mime application/x-executable >>16 beshort 3 shared object, !:mime application/x-sharedlib >>16 beshort 4 core file, !:mime application/x-coredump #>>>(0x38+0xcc) string >\0 of '%s' #>>>(0x38+0x10) belong >0 (signal %d), >>16 beshort &0xff00 processor-specific, >>18 beshort 0 no machine, >>18 beshort 1 AT&T WE32100, >>18 beshort 2 SPARC, >>18 beshort 3 Intel 80386 - invalid byte order, >>18 beshort 4 Motorola >>>36 belong &0x01000000 68000, >>>36 belong &0x00810000 CPU32, >>>36 belong 0 68020, >>18 beshort 5 Motorola 88000, >>18 beshort 6 Intel 80486 - invalid byte order, >>18 beshort 7 Intel 80860, # only for MIPS - see comment in little-endian section above. >>18 beshort 8 MIPS, >>>36 belong &0x20 N32 >>18 beshort 10 MIPS, >>>36 belong &0x20 N32 >>18 beshort 8 # only for 32-bit >>>4 byte 1 >>>>36 belong&0xf0000000 0x00000000 MIPS-I >>>>36 belong&0xf0000000 0x10000000 MIPS-II >>>>36 belong&0xf0000000 0x20000000 MIPS-III >>>>36 belong&0xf0000000 0x30000000 MIPS-IV >>>>36 belong&0xf0000000 0x40000000 MIPS-V >>>>36 belong&0xf0000000 0x50000000 MIPS32 >>>>36 belong&0xf0000000 0x60000000 MIPS64 >>>>36 belong&0xf0000000 0x70000000 MIPS32 rel2 >>>>36 belong&0xf0000000 0x80000000 MIPS64 rel2 # only for 64-bit >>>4 byte 2 >>>>48 belong&0xf0000000 0x00000000 MIPS-I >>>>48 belong&0xf0000000 0x10000000 MIPS-II >>>>48 belong&0xf0000000 0x20000000 MIPS-III >>>>48 belong&0xf0000000 0x30000000 MIPS-IV >>>>48 belong&0xf0000000 0x40000000 MIPS-V >>>>48 belong&0xf0000000 0x50000000 MIPS32 >>>>48 belong&0xf0000000 0x60000000 MIPS64 >>>>48 belong&0xf0000000 0x70000000 MIPS32 rel2 >>>>48 belong&0xf0000000 0x80000000 MIPS64 rel2 >>18 beshort 9 Amdahl, >>18 beshort 10 MIPS (deprecated), >>18 beshort 11 RS6000, >>18 beshort 15 PA-RISC >>>50 beshort 0x0214 2.0 >>>48 beshort &0x0008 (LP64) >>18 beshort 16 nCUBE, >>18 beshort 17 Fujitsu VPP500, >>18 beshort 18 SPARC32PLUS, >>>36 belong&0xffff00 0x000100 V8+ Required, >>>36 belong&0xffff00 0x000200 Sun UltraSPARC1 Extensions Required, >>>36 belong&0xffff00 0x000400 HaL R1 Extensions Required, >>>36 belong&0xffff00 0x000800 Sun UltraSPARC3 Extensions Required, >>18 beshort 20 PowerPC or cisco 4500, >>18 beshort 21 64-bit PowerPC or cisco 7500, >>18 beshort 22 IBM S/390, >>18 beshort 23 Cell SPU, >>18 beshort 24 cisco SVIP, >>18 beshort 25 cisco 7200, >>18 beshort 36 NEC V800 or cisco 12000, >>18 beshort 37 Fujitsu FR20, >>18 beshort 38 TRW RH-32, >>18 beshort 39 Motorola RCE, >>18 beshort 40 ARM, >>18 beshort 41 Alpha, >>18 beshort 42 Renesas SH, >>18 beshort 43 SPARC V9, >>>48 belong&0xffff00 0x000200 Sun UltraSPARC1 Extensions Required, >>>48 belong&0xffff00 0x000400 HaL R1 Extensions Required, >>>48 belong&0xffff00 0x000800 Sun UltraSPARC3 Extensions Required, >>>48 belong&0x3 0 total store ordering, >>>48 belong&0x3 1 partial store ordering, >>>48 belong&0x3 2 relaxed memory ordering, >>18 beshort 44 Siemens Tricore Embedded Processor, >>18 beshort 45 Argonaut RISC Core, Argonaut Technologies Inc., >>18 beshort 46 Renesas H8/300, >>18 beshort 47 Renesas H8/300H, >>18 beshort 48 Renesas H8S, >>18 beshort 49 Renesas H8/500, >>18 beshort 50 IA-64, >>18 beshort 51 Stanford MIPS-X, >>18 beshort 52 Motorola Coldfire, >>18 beshort 53 Motorola M68HC12, >>18 beshort 73 Cray NV1, >>18 beshort 75 Digital VAX, >>18 beshort 88 Renesas M32R, >>18 leshort 92 OpenRISC, >>18 leshort 0x3426 OpenRISC (obsolete), >>18 leshort 0x8472 OpenRISC (obsolete), >>18 beshort 94 Tensilica Xtensa, >>18 beshort 97 NatSemi 32k, >>18 beshort 0x18ad AVR32 (unofficial), >>18 beshort 0x9026 Alpha (unofficial), >>18 beshort 0xa390 IBM S/390 (obsolete), >>20 belong 0 invalid version >>20 belong 1 version 1 >>36 belong 1 MathCoPro/FPU/MAU Required # Up to now only 0, 1 and 2 are defined; I've seen a file with 0x83, it seemed # like proper ELF, but extracting the string had bad results. >4 byte <0x80 >>8 string >\0 (%s) >8 string \0 >>7 byte 0 (SYSV) >>7 byte 1 (HP-UX) >>7 byte 2 (NetBSD) >>7 byte 3 (GNU/Linux) >>7 byte 4 (GNU/Hurd) >>7 byte 5 (86Open) >>7 byte 6 (Solaris) >>7 byte 7 (Monterey) >>7 byte 8 (IRIX) >>7 byte 9 (FreeBSD) >>7 byte 10 (Tru64) >>7 byte 11 (Novell Modesto) >>7 byte 12 (OpenBSD) >8 string \2 >>7 byte 13 (OpenVMS) >>7 byte 97 (ARM) >>7 byte 255 (embedded) #------------------------------------------------------------------------------ # encore: file(1) magic for Encore machines # # XXX - needs to have the byte order specified (NS32K was little-endian, # dunno whether they run the 88K in little-endian mode or not). # 0 short 0x154 Encore >20 short 0x107 executable >20 short 0x108 pure executable >20 short 0x10b demand-paged executable >20 short 0x10f unsupported executable >12 long >0 not stripped >22 short >0 - version %ld >22 short 0 - #>4 date x stamp %s 0 short 0x155 Encore unsupported executable >12 long >0 not stripped >22 short >0 - version %ld >22 short 0 - #>4 date x stamp %s #------------------------------------------------------------------------------ # EPOC : file(1) magic for EPOC documents [Psion Series 5/Osaris/Geofox 1] # Stefan Praszalowicz (hpicollo@worldnet.fr) # Useful information for improving this file can be found at: # http://software.frodo.looijaard.name/psiconv/formats/Index.html 0 lelong 0x10000037 >4 lelong 0x1000006D >>8 lelong 0x1000007F Psion Word >>8 lelong 0x10000088 Psion Sheet >>8 lelong 0x1000007D Psion Sketch >>8 lelong 0x10000085 Psion TextEd #------------------------------------------------------------------------------ # erlang: file(1) magic for Erlang JAM and BEAM files # URL: http://www.erlang.org/faq/x779.html#AEN812 # OTP R3-R4 0 string \0177BEAM! Old Erlang BEAM file >6 short >0 - version %d # OTP R5 and onwards 0 string FOR1 >8 string BEAM Erlang BEAM file # 4.2 version may have a copyright notice! 4 string Tue\ Jan\ 22\ 14:32:44\ MET\ 1991 Erlang JAM file - version 4.2 79 string Tue\ Jan\ 22\ 14:32:44\ MET\ 1991 Erlang JAM file - version 4.2 4 string 1.0\ Fri\ Feb\ 3\ 09:55:56\ MET\ 1995 Erlang JAM file - version 4.3 #------------------------------------------------------------------------------ # ESRI Shapefile format (.shp .shx .dbf=DBaseIII) # Based on info from # 0 belong 9994 ESRI Shapefile >4 belong =0 >8 belong =0 >12 belong =0 >16 belong =0 >20 belong =0 >28 lelong x version %d >24 belong x length %d >32 lelong =0 type Null Shape >32 lelong =1 type Point >32 lelong =3 type PolyLine >32 lelong =5 type Polygon >32 lelong =8 type MultiPoint >32 lelong =11 type PointZ >32 lelong =13 type PolyLineZ >32 lelong =15 type PolygonZ >32 lelong =18 type MultiPointZ >32 lelong =21 type PointM >32 lelong =23 type PolyLineM >32 lelong =25 type PolygonM >32 lelong =28 type MultiPointM >32 lelong =31 type MultiPatch #------------------------------------------------------------------------------ # fcs: file(1) magic for FCS (Flow Cytometry Standard) data files # From Roger Leigh 0 string FCS1.0 Flow Cytometry Standard (FCS) data, version 1.0 0 string FCS2.0 Flow Cytometry Standard (FCS) data, version 2.0 0 string FCS3.0 Flow Cytometry Standard (FCS) data, version 3.0 #------------------------------------------------------------------------------ # filesystems: file(1) magic for different filesystems # 0 string \366\366\366\366 PC formatted floppy with no filesystem # Sun disk labels # From /usr/include/sun/dklabel.h: 0774 beshort 0xdabe # modified by Joerg Jenderek, because original test # succeeds for Cabinet archive dao360.dl_ with negative blocks >0770 long >0 Sun disk label >>0 string x '%s >>>31 string >\0 \b%s >>>>63 string >\0 \b%s >>>>>95 string >\0 \b%s >>0 string x \b' >>0734 short >0 %d rpm, >>0736 short >0 %d phys cys, >>0740 short >0 %d alts/cyl, >>0746 short >0 %d interleave, >>0750 short >0 %d data cyls, >>0752 short >0 %d alt cyls, >>0754 short >0 %d heads/partition, >>0756 short >0 %d sectors/track, >>0764 long >0 start cyl %ld, >>0770 long x %ld blocks # Is there a boot block written 1 sector in? >512 belong&077777777 0600407 \b, boot block present # Joerg Jenderek: Smart Boot Manager backup file is 41 byte header + first sectors of disc # (http://btmgr.sourceforge.net/docs/user-guide-3.html) 0 string SBMBAKUP_ Smart Boot Manager backup file >9 string x \b, version %-5.5s >>14 string =_ >>>15 string x %-.1s >>>>16 string =_ \b. >>>>>17 string x \b%-.1s >>>>>>18 string =_ \b. >>>>>>>19 string x \b%-.1s >>>22 ubyte 0 >>>>21 ubyte x \b, from drive 0x%x >>>22 ubyte >0 >>>>21 string x \b, from drive %s # Joerg Jenderek # DOS Emulator image is 128 byte, null right padded header + harddisc image 0 string DOSEMU\0 >0x27E leshort 0xAA55 #offset is 128 >>19 ubyte 128 >>>(19.b-1) ubyte 0x0 DOS Emulator image >>>>7 ulelong >0 \b, %u heads >>>>11 ulelong >0 \b, %d sectors/track >>>>15 ulelong >0 \b, %d cylinders # updated by Joerg Jenderek at Sep 2007 # only for sector sizes with 512 or more Bytes 0x1FE leshort 0xAA55 x86 boot sector # to do also for sectors < than 512 Bytes and some other files, GRR #30 search/481 \x55\xAA x86 boot sector # not for BeOS floppy 1440k, MBRs #(11.s-2) uleshort 0xAA55 x86 boot sector >2 string OSBS \b, OS/BS MBR # J\xf6rg Jenderek >0x8C string Invalid\ partition\ table \b, MS-DOS MBR # dr-dos with some upper-, lowercase variants >0x9D string Invalid\ partition\ table$ >>181 string No\ Operating\ System$ >>>201 string Operating\ System\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03 >0x9D string Invalid\ partition\ table$ >>181 string No\ operating\ system$ >>>201 string Operating\ system\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03 >342 string Invalid\ partition\ table$ >>366 string No\ operating\ system$ >>>386 string Operating\ system\ load\ error$ \b, DR-DOS MBR, version 7.01 to 7.03 >295 string NEWLDR\0 >>302 string Bad\ PT\ $ >>>310 string No\ OS\ $ >>>>317 string OS\ load\ err$ >>>>>329 string Moved\ or\ missing\ IBMBIO.LDR\n\r >>>>>>358 string Press\ any\ key\ to\ continue.\n\r$ >>>>>>>387 string Copyright\ (c)\ 1984,1998 >>>>>>>>411 string Caldera\ Inc.\0 \b, DR-DOS MBR (IBMBIO.LDR) >0x10F string Ung\201ltige\ Partitionstabelle \b, MS-DOS MBR, german version 4.10.1998, 4.10.2222 >>0x1B8 ubelong >0 \b, Serial 0x%-.4x >0x8B string Ung\201ltige\ Partitionstabelle \b, MS-DOS MBR, german version 5.00 to 4.00.950 >271 string Invalid\ partition\ table\0 >>295 string Error\ loading\ operating\ system\0 >>>326 string Missing\ operating\ system\0 \b, mbr # >139 string Invalid\ partition\ table\0 >>163 string Error\ loading\ operating\ system\0 >>>194 string Missing\ operating\ system\0 \b, Microsoft Windows XP mbr # http://www.heise.de/ct/05/09/006/ page 184 #HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\DosDevices\?:=Serial4Bytes+8Bytes >>>>0x1B8 ulelong >0 \b,Serial 0x%-.4x >300 string Invalid\ partition\ table\0 >>324 string Error\ loading\ operating\ system\0 >>>355 string Missing\ operating\ system\0 \b, Microsoft Windows XP MBR #??>>>389 string Invalid\ system\ disk >>>>0x1B8 ulelong >0 \b, Serial 0x%-.4x >300 string Ung\201ltige\ Partitionstabelle #split string to avoid error: String too long >>328 string Fehler\ beim\ Laden\ >>>346 string des\ Betriebssystems >>>>366 string Betriebssystem\ nicht\ vorhanden \b, Microsoft Windows XP MBR (german) >>>>>0x1B8 ulelong >0 \b, Serial 0x%-.4x #>0x145 string Default:\ F \b, FREE-DOS MBR #>0x14B string Default:\ F \b, FREE-DOS 1.0 MBR >0x145 search/7 Default:\ F \b, FREE-DOS MBR #>>313 string F0\ .\ .\ . #>>>322 string disk\ 1 #>>>>382 string FAT3 >64 string no\ active\ partition\ found >>96 string read\ error\ while\ reading\ drive \b, FREE-DOS Beta 0.9 MBR # Ranish Partition Manager http://www.ranish.com/part/ >387 search/4 \0\ Error!\r >>378 search/7 Virus! >>>397 search/4 Booting\ >>>>408 search/4 HD1/\0 \b, Ranish MBR ( >>>>>416 string Writing\ changes... \b2.37 >>>>>>438 ubyte x \b,0x%x dots >>>>>>440 ubyte >0 \b,virus check >>>>>>441 ubyte >0 \b,partition %c #2.38,2.42,2.44 >>>>>416 string !Writing\ changes... \b >>>>>>418 ubyte 1 \bvirus check, >>>>>>419 ubyte x \b0x%x seconds >>>>>>420 ubyte&0x0F >0 \b,partition >>>>>>>420 ubyte&0x0F <5 \b %x >>>>>>>420 ubyte&0x0F 0Xf \b ask >>>>>420 ubyte x \b) # >271 string Operating\ system\ loading >>296 string error\r \b, SYSLINUX MBR (2.10) # http://www.acronis.de/ >362 string MBR\ Error\ \0\r >>376 string ress\ any\ key\ to\ >>>392 string boot\ from\ floppy...\0 \b, Acronis MBR # added by Joerg Jenderek # http://www.visopsys.org/ # http://partitionlogic.org.uk/ >309 string No\ bootable\ partition\ found\r >>339 string I/O\ Error\ reading\ boot\ sector\r \b, Visopsys MBR >349 string No\ bootable\ partition\ found\r >>379 string I/O\ Error\ reading\ boot\ sector\r \b, simple Visopsys MBR # bootloader, bootmanager >0x40 string SBML # label with 11 characters of FAT 12 bit filesystem >>43 string SMART\ BTMGR >>>430 string SBMK\ Bad!\r \b, Smart Boot Manager # OEM-ID not always "SBM" #>>>>3 strings SBM >>>>6 string >\0 \b, version %s >382 string XOSLLOADXCF \b, eXtended Operating System Loader >6 string LILO \b, LInux i386 boot LOader >>120 string LILO \b, version 22.3.4 SuSe >>172 string LILO \b, version 22.5.8 Debian # updated by Joerg Jenderek at Oct 2008 # variables according to grub-0.97/stage1/stage1.S or # http://www.gnu.org/software/grub/manual/grub.html#Embedded-data # usual values are marked with comments to get only informations of strange GRUB loaders >342 search/60 \0Geom\0 #>0 ulelong x %x=0x009048EB , 0x2a9048EB 0 >>0x41 ubyte <2 >>>0x3E ubyte >2 \b; GRand Unified Bootloader # 0x3 for 0.5.95,0.93,0.94,0.96 0x4 for 1.90 >>>>0x3E ubyte x \b, stage1 version 0x%x #If it is 0xFF, use a drive passed by BIOS >>>>0x40 ubyte <0xFF \b, boot drive 0x%x # in most case 0,1,0x2e for GRUB 0.5.95 >>>>0x41 ubyte >0 \b, LBA flag 0x%x >>>>0x42 uleshort <0x8000 \b, stage2 address 0x%x #>>>>0x42 uleshort =0x8000 \b, stage2 address 0x%x (usual) >>>>0x42 uleshort >0x8000 \b, stage2 address 0x%x #>>>>0x44 ulelong =1 \b, 1st sector stage2 0x%x (default) >>>>0x44 ulelong >1 \b, 1st sector stage2 0x%x >>>>0x48 uleshort <0x800 \b, stage2 segment 0x%x #>>>>0x48 uleshort =0x800 \b, stage2 segment 0x%x (usual) >>>>0x48 uleshort >0x800 \b, stage2 segment 0x%x >>>>402 string Geom\0Hard\ Disk\0Read\0\ Error\0 >>>>>394 string stage1 \b, GRUB version 0.5.95 >>>>382 string Geom\0Hard\ Disk\0Read\0\ Error\0 >>>>>376 string GRUB\ \0 \b, GRUB version 0.93 or 1.94 >>>>383 string Geom\0Hard\ Disk\0Read\0\ Error\0 >>>>>377 string GRUB\ \0 \b, GRUB version 0.94 >>>>385 string Geom\0Hard\ Disk\0Read\0\ Error\0 >>>>>379 string GRUB\ \0 \b, GRUB version 0.95 or 0.96 >>>>391 string Geom\0Hard\ Disk\0Read\0\ Error\0 >>>>>385 string GRUB\ \0 \b, GRUB version 0.97 #unkown version >>>343 string Geom\0Read\0\ Error\0 >>>>321 string Loading\ stage1.5 \b, GRUB version x.y >>>380 string Geom\0Hard\ Disk\0Read\0\ Error\0 >>>>374 string GRUB\ \0 \b, GRUB version n.m # http://syslinux.zytor.com/ >478 string Boot\ failed\r >>495 string LDLINUX\ SYS \b, SYSLINUX bootloader (1.62) >480 string Boot\ failed\r >>495 string LDLINUX\ SYS \b, SYSLINUX bootloader (2.06 or 2.11) >484 string Boot\ error\r \b, SYSLINUX bootloader (3.11) >395 string chksum\0\ ERROR!\0 \b, Gujin bootloader # http://www.bcdwb.de/bcdw/index_e.htm >3 string BCDL >>498 string BCDL\ \ \ \ BIN \b, Bootable CD Loader (1.50Z) # mbr partion table entries # OEM-ID does not contain MicroSoft,NEWLDR,DOS,SYSLINUX,or MTOOLs >3 string !MS >>3 string !SYSLINUX >>>3 string !MTOOL >>>>3 string !NEWLDR >>>>>5 string !DOS # not FAT (32 bit) >>>>>>82 string !FAT32 #not Linux kernel >>>>>>>514 string !HdrS #not BeOS >>>>>>>>422 string !Be\ Boot\ Loader # active flag 0 or 0x80 and type > 0 >>>>>>>>>446 ubyte <0x81 >>>>>>>>>>446 ubyte&0x7F 0 >>>>>>>>>>>450 ubyte >0 \b; partition 1: ID=0x%x >>>>>>>>>>>>446 ubyte 0x80 \b, active >>>>>>>>>>>>447 ubyte x \b, starthead %u #>>>>>>>>>>>>448 ubyte x \b, start C_S: 0x%x #>>>>>>>>>>>>448 ubeshort&1023 x \b, startcylinder? %d >>>>>>>>>>>>454 ulelong x \b, startsector %u >>>>>>>>>>>>458 ulelong x \b, %u sectors # >>>>>>>>>462 ubyte <0x81 >>>>>>>>>>462 ubyte&0x7F 0 >>>>>>>>>>>466 ubyte >0 \b; partition 2: ID=0x%x >>>>>>>>>>>>462 ubyte 0x80 \b, active >>>>>>>>>>>>463 ubyte x \b, starthead %u #>>>>>>>>>>>>464 ubyte x \b, start C_S: 0x%x #>>>>>>>>>>>>464 ubeshort&1023 x \b, startcylinder? %d >>>>>>>>>>>>470 ulelong x \b, startsector %u >>>>>>>>>>>>474 ulelong x \b, %u sectors # >>>>>>>>>478 ubyte <0x81 >>>>>>>>>>478 ubyte&0x7F 0 >>>>>>>>>>>482 ubyte >0 \b; partition 3: ID=0x%x >>>>>>>>>>>>478 ubyte 0x80 \b, active >>>>>>>>>>>>479 ubyte x \b, starthead %u #>>>>>>>>>>>>480 ubyte x \b, start C_S: 0x%x #>>>>>>>>>>>>481 ubyte x \b, start C2S: 0x%x #>>>>>>>>>>>>480 ubeshort&1023 x \b, startcylinder? %d >>>>>>>>>>>>486 ulelong x \b, startsector %u >>>>>>>>>>>>490 ulelong x \b, %u sectors # >>>>>>>>>494 ubyte <0x81 >>>>>>>>>>494 ubyte&0x7F 0 >>>>>>>>>>>498 ubyte >0 \b; partition 4: ID=0x%x >>>>>>>>>>>>494 ubyte 0x80 \b, active >>>>>>>>>>>>495 ubyte x \b, starthead %u #>>>>>>>>>>>>496 ubyte x \b, start C_S: 0x%x #>>>>>>>>>>>>496 ubeshort&1023 x \b, startcylinder? %d >>>>>>>>>>>>502 ulelong x \b, startsector %u >>>>>>>>>>>>506 ulelong x \b, %u sectors # mbr partion table entries end # http://www.acronis.de/ #FAT label=ACRONIS\ SZ #OEM-ID=BOOTWIZ0 >442 string Non-system\ disk,\ >>459 string press\ any\ key...\x7\0 \b, Acronis Startup Recovery Loader # DOS names like F11.SYS are 8 right space padded bytes+3 bytes >>>477 ubyte&0xDF >0 >>>>477 string x \b %-.3s >>>>>480 ubyte&0xDF >0 >>>>>>480 string x \b%-.5s >>>>485 ubyte&0xDF >0 >>>>>485 string x \b.%-.3s # >185 string FDBOOT\ Version\ >>204 string \rNo\ Systemdisk.\ >>>220 string Booting\ from\ harddisk.\n\r >>>245 string Cannot\ load\ from\ harddisk.\n\r >>>>273 string Insert\ Systemdisk\ >>>>>291 string and\ press\ any\ key.\n\r \b, FDBOOT harddisk Bootloader >>>>>>200 string >\0 \b, version %-3s >242 string Bootsector\ from\ C.H.\ Hochst\204 >>278 string No\ Systemdisk.\ >>>293 string Booting\ from\ harddisk.\n\r >>>441 string Cannot\ load\ from\ harddisk.\n\r >>>>469 string Insert\ Systemdisk\ >>>>>487 string and\ press\ any\ key.\n\r \b, WinImage harddisk Bootloader >>>>>>209 string >\0 \b, version %-4.4s >(1.b+2) ubyte 0xe >>(1.b+3) ubyte 0x1f >>>(1.b+4) ubyte 0xbe >>>>(1.b+5) ubyte 0x77 >>>>(1.b+6) ubyte 0x7c >>>>>(1.b+7) ubyte 0xac >>>>>>(1.b+8) ubyte 0x22 >>>>>>>(1.b+9) ubyte 0xc0 >>>>>>>>(1.b+10) ubyte 0x74 >>>>>>>>>(1.b+11) ubyte 0xb >>>>>>>>>>(1.b+12) ubyte 0x56 >>>>>>>>>>(1.b+13) ubyte 0xb4 \b, mkdosfs boot message display >214 string Please\ try\ to\ install\ FreeDOS\ \b, DOS Emulator boot message display #>>244 string from\ dosemu-freedos-*-bin.tgz\r #>>>170 string Sorry,\ could\ not\ load\ an\ #>>>>195 string operating\ system.\r\n # >103 string This\ is\ not\ a\ bootable\ disk.\ >>132 string Please\ insert\ a\ bootable\ >>>157 string floppy\ and\r\n >>>>169 string press\ any\ key\ to\ try\ again...\r \b, FREE-DOS message display # >66 string Solaris\ Boot\ Sector >>99 string Incomplete\ MDBoot\ load. >>>89 string Version \b, Sun Solaris Bootloader >>>>97 byte x version %c # >408 string OS/2\ !!\ SYS01475\r\0 >>429 string OS/2\ !!\ SYS02025\r\0 >>>450 string OS/2\ !!\ SYS02027\r\0 >>>469 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp bootloader # >409 string OS/2\ !!\ SYS01475\r\0 >>430 string OS/2\ !!\ SYS02025\r\0 >>>451 string OS/2\ !!\ SYS02027\r\0 >>>470 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp Bootloader >112 string This\ disk\ is\ not\ bootable\r >>142 string If\ you\ wish\ to\ make\ it\ bootable >>>176 string run\ the\ DOS\ program\ SYS\ >>>200 string after\ the\r >>>>216 string system\ has\ been\ loaded\r\n >>>>>242 string Please\ insert\ a\ DOS\ diskette\ >>>>>271 string into\r\n\ the\ drive\ and\ >>>>>>292 string strike\ any\ key...\0 \b, IBM OS/2 Warp message display # XP >430 string NTLDR\ is\ missing\xFF\r\n >>449 string Disk\ error\xFF\r\n >>>462 string Press\ any\ key\ to\ restart\r \b, Microsoft Windows XP Bootloader # DOS names like NTLDR,CMLDR,$LDR$ are 8 right space padded bytes+3 bytes >>>>417 ubyte&0xDF >0 >>>>>417 string x %-.5s >>>>>>422 ubyte&0xDF >0 >>>>>>>422 string x \b%-.3s >>>>>425 ubyte&0xDF >0 >>>>>>425 string >\ \b.%-.3s # >>>>371 ubyte >0x20 >>>>>368 ubyte&0xDF >0 >>>>>>368 string x %-.5s >>>>>>>373 ubyte&0xDF >0 >>>>>>>>373 string x \b%-.3s >>>>>>376 ubyte&0xDF >0 >>>>>>>376 string x \b.%-.3s # >430 string NTLDR\ nicht\ gefunden\xFF\r\n >>453 string Datentr\204gerfehler\xFF\r\n >>>473 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (german) >>>>417 ubyte&0xDF >0 >>>>>417 string x %-.5s >>>>>>422 ubyte&0xDF >0 >>>>>>>422 string x \b%-.3s >>>>>425 ubyte&0xDF >0 >>>>>>425 string >\ \b.%-.3s # offset variant >>>>379 string \0 >>>>>368 ubyte&0xDF >0 >>>>>>368 string x %-.5s >>>>>>>373 ubyte&0xDF >0 >>>>>>>>373 string x \b%-.3s # >430 string NTLDR\ fehlt\xFF\r\n >>444 string Datentr\204gerfehler\xFF\r\n >>>464 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (2.german) >>>>417 ubyte&0xDF >0 >>>>>417 string x %-.5s >>>>>>422 ubyte&0xDF >0 >>>>>>>422 string x \b%-.3s >>>>>425 ubyte&0xDF >0 >>>>>>425 string >\ \b.%-.3s # variant >>>>371 ubyte >0x20 >>>>>368 ubyte&0xDF >0 >>>>>>368 string x %-.5s >>>>>>>373 ubyte&0xDF >0 >>>>>>>>373 string x \b%-.3s >>>>>>376 ubyte&0xDF >0 >>>>>>>376 string x \b.%-.3s # >430 string NTLDR\ fehlt\xFF\r\n >>444 string Medienfehler\xFF\r\n >>>459 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (3.german) >>>>371 ubyte >0x20 >>>>>368 ubyte&0xDF >0 >>>>>>368 string x %-.5s >>>>>>>373 ubyte&0xDF >0 >>>>>>>>373 string x \b%-.3s >>>>>>376 ubyte&0xDF >0 >>>>>>>376 string x \b.%-.3s # variant >>>>417 ubyte&0xDF >0 >>>>>417 string x %-.5s >>>>>>422 ubyte&0xDF >0 >>>>>>>422 string x \b%-.3s >>>>>425 ubyte&0xDF >0 >>>>>>425 string >\ \b.%-.3s # >430 string Datentr\204ger\ entfernen\xFF\r\n >>454 string Medienfehler\xFF\r\n >>>469 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (4.german) >>>>379 string \0 >>>>>368 ubyte&0xDF >0 >>>>>>368 string x %-.5s >>>>>>>373 ubyte&0xDF >0 >>>>>>>>373 string x \b%-.3s >>>>>>376 ubyte&0xDF >0 >>>>>>>376 string x \b.%-.3s # variant >>>>417 ubyte&0xDF >0 >>>>>417 string x %-.5s >>>>>>422 ubyte&0xDF >0 >>>>>>>422 string x \b%-.3s >>>>>425 ubyte&0xDF >0 >>>>>>425 string >\ \b.%-.3s # #>3 string NTFS\ \ \ \ >389 string Fehler\ beim\ Lesen\ >>407 string des\ Datentr\204gers >>>426 string NTLDR\ fehlt >>>>440 string NTLDR\ ist\ komprimiert >>>>>464 string Neustart\ mit\ Strg+Alt+Entf\r \b, Microsoft Windows XP Bootloader NTFS (german) #>3 string NTFS\ \ \ \ >313 string A\ disk\ read\ error\ occurred.\r >>345 string A\ kernel\ file\ is\ missing\ >>>370 string from\ the\ disk.\r >>>>484 string NTLDR\ is\ compressed >>>>>429 string Insert\ a\ system\ diskette\ >>>>>>454 string and\ restart\r\nthe\ system.\r \b, Microsoft Windows XP Bootloader NTFS # DOS loader variants different languages,offsets >472 ubyte&0xDF >0 >>389 string Invalid\ system\ disk\xFF\r\n >>>411 string Disk\ I/O\ error >>>>428 string Replace\ the\ disk,\ and\ >>>>>455 string press\ any\ key \b, Microsoft Windows 98 Bootloader #IO.SYS >>>>>>472 ubyte&0xDF >0 >>>>>>>472 string x \b %-.2s >>>>>>>>474 ubyte&0xDF >0 >>>>>>>>>474 string x \b%-.5s >>>>>>>>>>479 ubyte&0xDF >0 >>>>>>>>>>>479 string x \b%-.1s >>>>>>>480 ubyte&0xDF >0 >>>>>>>>480 string x \b.%-.3s #MSDOS.SYS >>>>>>>483 ubyte&0xDF >0 \b+ >>>>>>>>483 string x \b%-.5s >>>>>>>>>488 ubyte&0xDF >0 >>>>>>>>>>488 string x \b%-.3s >>>>>>>>491 ubyte&0xDF >0 >>>>>>>>>491 string x \b.%-.3s # >>390 string Invalid\ system\ disk\xFF\r\n >>>412 string Disk\ I/O\ error\xFF\r\n >>>>429 string Replace\ the\ disk,\ and\ >>>>>451 string then\ press\ any\ key\r \b, Microsoft Windows 98 Bootloader >>388 string Ungueltiges\ System\ \xFF\r\n >>>410 string E/A-Fehler\ \ \ \ \xFF\r\n >>>>427 string Datentraeger\ wechseln\ und\ >>>>>453 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (german) #WINBOOT.SYS only not spaces (0xDF) >>>>>>497 ubyte&0xDF >0 >>>>>>>497 string x %-.5s >>>>>>>>502 ubyte&0xDF >0 >>>>>>>>>502 string x \b%-.1s >>>>>>>>>>503 ubyte&0xDF >0 >>>>>>>>>>>503 string x \b%-.1s >>>>>>>>>>>>504 ubyte&0xDF >0 >>>>>>>>>>>>>504 string x \b%-.1s >>>>>>505 ubyte&0xDF >0 >>>>>>>505 string x \b.%-.3s #IO.SYS >>>>>>472 ubyte&0xDF >0 or >>>>>>>472 string x \b %-.2s >>>>>>>>474 ubyte&0xDF >0 >>>>>>>>>474 string x \b%-.5s >>>>>>>>>>479 ubyte&0xDF >0 >>>>>>>>>>>479 string x \b%-.1s >>>>>>>480 ubyte&0xDF >0 >>>>>>>>480 string x \b.%-.3s #MSDOS.SYS >>>>>>>483 ubyte&0xDF >0 \b+ >>>>>>>>483 string x \b%-.5s >>>>>>>>>488 ubyte&0xDF >0 >>>>>>>>>>488 string x \b%-.3s >>>>>>>>491 ubyte&0xDF >0 >>>>>>>>>491 string x \b.%-.3s # >>390 string Ungueltiges\ System\ \xFF\r\n >>>412 string E/A-Fehler\ \ \ \ \xFF\r\n >>>>429 string Datentraeger\ wechseln\ und\ >>>>>455 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (German) #WINBOOT.SYS only not spaces (0xDF) >>>>>>497 ubyte&0xDF >0 >>>>>>>497 string x %-.7s >>>>>>>>504 ubyte&0xDF >0 >>>>>>>>>504 string x \b%-.1s >>>>>>505 ubyte&0xDF >0 >>>>>>>505 string x \b.%-.3s #IO.SYS >>>>>>472 ubyte&0xDF >0 or >>>>>>>472 string x \b %-.2s >>>>>>>>474 ubyte&0xDF >0 >>>>>>>>>474 string x \b%-.6s >>>>>>>480 ubyte&0xDF >0 >>>>>>>>480 string x \b.%-.3s #MSDOS.SYS >>>>>>>483 ubyte&0xDF >0 \b+ >>>>>>>>483 string x \b%-.5s >>>>>>>>>488 ubyte&0xDF >0 >>>>>>>>>>488 string x \b%-.3s >>>>>>>>491 ubyte&0xDF >0 >>>>>>>>>491 string x \b.%-.3s # >>389 string Ungueltiges\ System\ \xFF\r\n >>>411 string E/A-Fehler\ \ \ \ \xFF\r\n >>>>428 string Datentraeger\ wechseln\ und\ >>>>>454 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (GERMAN) # DOS names like IO.SYS,WINBOOT.SYS,MSDOS.SYS,WINBOOT.INI are 8 right space padded bytes+3 bytes >>>>>>472 string x %-.2s >>>>>>>474 ubyte&0xDF >0 >>>>>>>>474 string x \b%-.5s >>>>>>>>479 ubyte&0xDF >0 >>>>>>>>>479 string x \b%-.1s >>>>>>480 ubyte&0xDF >0 >>>>>>>480 string x \b.%-.3s >>>>>>483 ubyte&0xDF >0 \b+ >>>>>>>483 string x \b%-.5s >>>>>>>488 ubyte&0xDF >0 >>>>>>>>488 string x \b%-.2s >>>>>>>>490 ubyte&0xDF >0 >>>>>>>>>490 string x \b%-.1s >>>>>>>491 ubyte&0xDF >0 >>>>>>>>491 string x \b.%-.3s >479 ubyte&0xDF >0 >>416 string Kein\ System\ oder\ >>>433 string Laufwerksfehler >>>>450 string Wechseln\ und\ Taste\ dr\201cken \b, Microsoft DOS Bootloader (german) #IO.SYS >>>>>479 string x \b %-.2s >>>>>>481 ubyte&0xDF >0 >>>>>>>481 string x \b%-.6s >>>>>487 ubyte&0xDF >0 >>>>>>487 string x \b.%-.3s #MSDOS.SYS >>>>>>490 ubyte&0xDF >0 \b+ >>>>>>>490 string x \b%-.5s >>>>>>>>495 ubyte&0xDF >0 >>>>>>>>>495 string x \b%-.3s >>>>>>>498 ubyte&0xDF >0 >>>>>>>>498 string x \b.%-.3s # >376 search/41 Non-System\ disk\ or\ >>395 search/41 disk\ error\r >>>407 search/41 Replace\ and\ >>>>419 search/41 press\ \b, >>>>419 search/41 strike\ \b, old >>>>426 search/41 any\ key\ when\ ready\r MS or PC-DOS bootloader #449 Disk\ Boot\ failure\r MS 3.21 #466 Boot\ Failure\r MS 3.30 >>>>>468 search/18 \0 #IO.SYS,IBMBIO.COM >>>>>>&0 string x \b %-.2s >>>>>>>&-20 ubyte&0xDF >0 >>>>>>>>&-1 string x \b%-.4s >>>>>>>>>&-16 ubyte&0xDF >0 >>>>>>>>>>&-1 string x \b%-.2s >>>>>>&8 ubyte&0xDF >0 \b. >>>>>>>&-1 string x \b%-.3s #MSDOS.SYS,IBMDOS.COM >>>>>>&11 ubyte&0xDF >0 \b+ >>>>>>>&-1 string x \b%-.5s >>>>>>>>&-6 ubyte&0xDF >0 >>>>>>>>>&-1 string x \b%-.1s >>>>>>>>>>&-5 ubyte&0xDF >0 >>>>>>>>>>>&-1 string x \b%-.2s >>>>>>>&7 ubyte&0xDF >0 \b. >>>>>>>>&-1 string x \b%-.3s >441 string Cannot\ load\ from\ harddisk.\n\r >>469 string Insert\ Systemdisk\ >>>487 string and\ press\ any\ key.\n\r \b, MS (2.11) DOS bootloader #>43 string \224R-LOADER\ \ SYS =label >54 string SYS >>324 string VASKK >>>495 string NEWLDR\0 \b, DR-DOS Bootloader (LOADER.SYS) # >98 string Press\ a\ key\ to\ retry\0\r >>120 string Cannot\ find\ file\ \0\r >>>139 string Disk\ read\ error\0\r >>>>156 string Loading\ ...\0 \b, DR-DOS (3.41) Bootloader #DRBIOS.SYS >>>>>44 ubyte&0xDF >0 >>>>>>44 string x \b %-.6s >>>>>>>50 ubyte&0xDF >0 >>>>>>>>50 string x \b%-.2s >>>>>>52 ubyte&0xDF >0 >>>>>>>52 string x \b.%-.3s # >70 string IBMBIO\ \ COM >>472 string Cannot\ load\ DOS!\ >>>489 string Any\ key\ to\ retry \b, DR-DOS Bootloader >>471 string Cannot\ load\ DOS\ >>487 string press\ key\ to\ retry \b, Open-DOS Bootloader #?? >444 string KERNEL\ \ SYS >>314 string BOOT\ error! \b, FREE-DOS Bootloader >499 string KERNEL\ \ SYS >>305 string BOOT\ err!\0 \b, Free-DOS Bootloader >449 string KERNEL\ \ SYS >>319 string BOOT\ error! \b, FREE-DOS 0.5 Bootloader # >449 string Loading\ FreeDOS >>0x1AF ulelong >0 \b, FREE-DOS 0.95,1.0 Bootloader >>>497 ubyte&0xDF >0 >>>>497 string x \b %-.6s >>>>>503 ubyte&0xDF >0 >>>>>>503 string x \b%-.1s >>>>>>>504 ubyte&0xDF >0 >>>>>>>>504 string x \b%-.1s >>>>505 ubyte&0xDF >0 >>>>>505 string x \b.%-.3s # >331 string Error!.0 \b, FREE-DOS 1.0 bootloader # >125 string Loading\ FreeDOS...\r >>311 string BOOT\ error!\r \b, FREE-DOS bootloader >>>441 ubyte&0xDF >0 >>>>441 string x \b %-.6s >>>>>447 ubyte&0xDF >0 >>>>>>447 string x \b%-.1s >>>>>>>448 ubyte&0xDF >0 >>>>>>>>448 string x \b%-.1s >>>>449 ubyte&0xDF >0 >>>>>449 string x \b.%-.3s >124 string FreeDOS\0 >>331 string \ err\0 \b, FREE-DOS BETa 0.9 Bootloader # DOS names like KERNEL.SYS,KERNEL16.SYS,KERNEL32.SYS,METAKERN.SYS are 8 right space padded bytes+3 bytes >>>497 ubyte&0xDF >0 >>>>497 string x \b %-.6s >>>>>503 ubyte&0xDF >0 >>>>>>503 string x \b%-.1s >>>>>>>504 ubyte&0xDF >0 >>>>>>>>504 string x \b%-.1s >>>>505 ubyte&0xDF >0 >>>>>505 string x \b.%-.3s >>333 string \ err\0 \b, FREE-DOS BEta 0.9 Bootloader >>>497 ubyte&0xDF >0 >>>>497 string x \b %-.6s >>>>>503 ubyte&0xDF >0 >>>>>>503 string x \b%-.1s >>>>>>>504 ubyte&0xDF >0 >>>>>>>>504 string x \b%-.1s >>>>505 ubyte&0xDF >0 >>>>>505 string x \b.%-.3s >>334 string \ err\0 \b, FREE-DOS Beta 0.9 Bootloader >>>497 ubyte&0xDF >0 >>>>497 string x \b %-.6s >>>>>503 ubyte&0xDF >0 >>>>>>503 string x \b%-.1s >>>>>>>504 ubyte&0xDF >0 >>>>>>>>504 string x \b%-.1s >>>>505 ubyte&0xDF >0 >>>>>505 string x \b.%-.3s >336 string Error!\ >>343 string Hit\ a\ key\ to\ reboot. \b, FREE-DOS Beta 0.9sr1 Bootloader >>>497 ubyte&0xDF >0 >>>>497 string x \b %-.6s >>>>>503 ubyte&0xDF >0 >>>>>>503 string x \b%-.1s >>>>>>>504 ubyte&0xDF >0 >>>>>>>>504 string x \b%-.1s >>>>505 ubyte&0xDF >0 >>>>>505 string x \b.%-.3s # added by Joerg Jenderek # http://www.visopsys.org/ # http://partitionlogic.org.uk/ # OEM-ID=Visopsys >478 ulelong 0 >>(1.b+326) string I/O\ Error\ reading\ >>>(1.b+344) string Visopsys\ loader\r >>>>(1.b+361) string Press\ any\ key\ to\ continue.\r \b, Visopsys loader # http://alexfru.chat.ru/epm.html#bootprog >494 ubyte >0x4D >>495 string >E >>>495 string >>>3 string BootProg # It just looks for a program file name at the root directory # and loads corresponding file with following execution. # DOS names like STARTUP.BIN,STARTUPC.COM,STARTUPE.EXE are 8 right space padded bytes+3 bytes >>>>499 ubyte&0xDF >0 \b, COM/EXE Bootloader >>>>>499 string x \b %-.1s >>>>>>500 ubyte&0xDF >0 >>>>>>>500 string x \b%-.1s >>>>>>>>501 ubyte&0xDF >0 >>>>>>>>>501 string x \b%-.1s >>>>>>>>>>502 ubyte&0xDF >0 >>>>>>>>>>>502 string x \b%-.1s >>>>>>>>>>>>503 ubyte&0xDF >0 >>>>>>>>>>>>>503 string x \b%-.1s >>>>>>>>>>>>>>504 ubyte&0xDF >0 >>>>>>>>>>>>>>>504 string x \b%-.1s >>>>>>>>>>>>>>>>505 ubyte&0xDF >0 >>>>>>>>>>>>>>>>>505 string x \b%-.1s >>>>>>>>>>>>>>>>>>506 ubyte&0xDF >0 >>>>>>>>>>>>>>>>>>>506 string x \b%-.1s #name extension >>>>>507 ubyte&0xDF >0 \b. >>>>>>507 string x \b%-.1s >>>>>>>508 ubyte&0xDF >0 >>>>>>>>508 string x \b%-.1s >>>>>>>>>509 ubyte&0xDF >0 >>>>>>>>>>509 string x \b%-.1s #If the boot sector fails to read any other sector, #it prints a very short message ("RE") to the screen and hangs the computer. #If the boot sector fails to find needed program in the root directory, #it also hangs with another message ("NF"). >>>>>492 string RENF \b, FAT (12 bit) >>>>>495 string RENF \b, FAT (16 bit) # http://alexfru.chat.ru/epm.html#bootprog >494 ubyte >0x4D >>495 string >E >>>495 string >>>3 string BootProg # It just looks for a program file name at the root directory # and loads corresponding file with following execution. # DOS names like STARTUP.BIN,STARTUPC.COM,STARTUPE.EXE are 8 right space padded bytes+3 bytes >>>>499 ubyte&0xDF >0 \b, COM/EXE Bootloader >>>>>499 string x \b %-.1s >>>>>>500 ubyte&0xDF >0 >>>>>>>500 string x \b%-.1s >>>>>>>>501 ubyte&0xDF >0 >>>>>>>>>501 string x \b%-.1s >>>>>>>>>>502 ubyte&0xDF >0 >>>>>>>>>>>502 string x \b%-.1s >>>>>>>>>>>>503 ubyte&0xDF >0 >>>>>>>>>>>>>503 string x \b%-.1s >>>>>>>>>>>>>>504 ubyte&0xDF >0 >>>>>>>>>>>>>>>504 string x \b%-.1s >>>>>>>>>>>>>>>>505 ubyte&0xDF >0 >>>>>>>>>>>>>>>>>505 string x \b%-.1s >>>>>>>>>>>>>>>>>>506 ubyte&0xDF >0 >>>>>>>>>>>>>>>>>>>506 string x \b%-.1s #name extension >>>>>507 ubyte&0xDF >0 \b. >>>>>>507 string x \b%-.1s >>>>>>>508 ubyte&0xDF >0 >>>>>>>>508 string x \b%-.1s >>>>>>>>>509 ubyte&0xDF >0 >>>>>>>>>>509 string x \b%-.1s #If the boot sector fails to read any other sector, #it prints a very short message ("RE") to the screen and hangs the computer. #If the boot sector fails to find needed program in the root directory, #it also hangs with another message ("NF"). >>>>>492 string RENF \b, FAT (12 bit) >>>>>495 string RENF \b, FAT (16 bit) # x86 bootloader end # updated by Joerg Jenderek at Sep 2007 >3 ubyte 0 #no active flag >>446 ubyte 0 # partition 1 not empty >>>450 ubyte >0 # partitions 3,4 empty >>>>482 ubyte 0 >>>>>498 ubyte 0 # partition 2 ID=0,5,15 >>>>>>466 ubyte <0x10 >>>>>>>466 ubyte 0x05 \b, extended partition table >>>>>>>466 ubyte 0x0F \b, extended partition table (LBA) >>>>>>>466 ubyte 0x0 \b, extended partition table (last) # JuMP short bootcodeoffset NOP assembler instructions will usually be EB xx 90 # http://mirror.href.com/thestarman/asm/2bytejumps.htmm#FWD # older drives may use Near JuMP instruction E9 xx xx >0 lelong&0x009000EB 0x009000EB >0 lelong&0x000000E9 0x000000E9 # minimal short forward jump found 03cx?? # maximal short forward jump is 07fx >1 ubyte <0xff \b, code offset 0x%x # mtools-3.9.8/msdos.h # usual values are marked with comments to get only informations of strange FAT systems # valid sectorsize must be a power of 2 from 32 to 32768 >>11 uleshort&0x000f x >>>11 uleshort <32769 >>>>11 uleshort >31 >>>>>21 ubyte&0xf0 0xF0 >>>>>>3 string >\0 \b, OEM-ID "%8.8s" #http://mirror.href.com/thestarman/asm/debug/debug2.htm#IHC >>>>>>>8 string IHC \b cached by Windows 9M >>>>>>11 uleshort >512 \b, Bytes/sector %u #>>>>>>11 uleshort =512 \b, Bytes/sector %u=512 (usual) >>>>>>11 uleshort <512 \b, Bytes/sector %u >>>>>>13 ubyte >1 \b, sectors/cluster %u #>>>>>>13 ubyte =1 \b, sectors/cluster %u (usual on Floppies) >>>>>>14 uleshort >32 \b, reserved sectors %u #>>>>>>14 uleshort =32 \b, reserved sectors %u (usual Fat32) #>>>>>>14 uleshort >1 \b, reserved sectors %u #>>>>>>14 uleshort =1 \b, reserved sectors %u (usual FAT12,FAT16) >>>>>>14 uleshort <1 \b, reserved sectors %u >>>>>>16 ubyte >2 \b, FATs %u #>>>>>>16 ubyte =2 \b, FATs %u (usual) >>>>>>16 ubyte =1 \b, FAT %u >>>>>>16 ubyte >0 >>>>>>17 uleshort >0 \b, root entries %u #>>>>>>17 uleshort =0 \b, root entries %u=0 (usual Fat32) >>>>>>19 uleshort >0 \b, sectors %u (volumes <=32 MB) #>>>>>>19 uleshort =0 \b, sectors %u=0 (usual Fat32) >>>>>>21 ubyte >0xF0 \b, Media descriptor 0x%x #>>>>>>21 ubyte =0xF0 \b, Media descriptor 0x%x (usual floppy) >>>>>>21 ubyte <0xF0 \b, Media descriptor 0x%x >>>>>>22 uleshort >0 \b, sectors/FAT %u #>>>>>>22 uleshort =0 \b, sectors/FAT %u=0 (usual Fat32) >>>>>>26 ubyte >2 \b, heads %u #>>>>>>26 ubyte =2 \b, heads %u (usual floppy) >>>>>>26 ubyte =1 \b, heads %u #skip for Digital Research DOS (version 3.41) 1440 kB Bootdisk >>>>>>38 ubyte !0x70 >>>>>>>28 ulelong >0 \b, hidden sectors %u #>>>>>>>28 ulelong =0 \b, hidden sectors %u (usual floppy) >>>>>>>32 ulelong >0 \b, sectors %u (volumes > 32 MB) #>>>>>>>32 ulelong =0 \b, sectors %u (volumes > 32 MB) # FAT<32 specific >>>>>>82 string !FAT32 #>>>>>>>36 ubyte 0x80 \b, physical drive 0x%x=0x80 (usual harddisk) #>>>>>>>36 ubyte 0 \b, physical drive 0x%x=0 (usual floppy) >>>>>>>36 ubyte !0x80 >>>>>>>>36 ubyte !0 \b, physical drive 0x%x >>>>>>>37 ubyte >0 \b, reserved 0x%x #>>>>>>>37 ubyte =0 \b, reserved 0x%x >>>>>>>38 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x) >>>>>>>38 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x) >>>>>>>38 ubyte =0x29 >>>>>>>>39 ulelong x \b, serial number 0x%x >>>>>>>>43 string >>>>>>>43 string >NO\ NAME \b, label: "%11.11s" >>>>>>>>43 string =NO\ NAME \b, unlabeled >>>>>>>54 string FAT \b, FAT >>>>>>>>54 string FAT12 \b (12 bit) >>>>>>>>54 string FAT16 \b (16 bit) # FAT32 specific >>>>>>82 string FAT32 \b, FAT (32 bit) >>>>>>>36 ulelong x \b, sectors/FAT %u >>>>>>>40 uleshort >0 \b, extension flags %u #>>>>>>>40 uleshort =0 \b, extension flags %u >>>>>>>42 uleshort >0 \b, fsVersion %u #>>>>>>>42 uleshort =0 \b, fsVersion %u (usual) >>>>>>>44 ulelong >2 \b, rootdir cluster %u #>>>>>>>44 ulelong =2 \b, rootdir cluster %u #>>>>>>>44 ulelong =1 \b, rootdir cluster %u >>>>>>>48 uleshort >1 \b, infoSector %u #>>>>>>>48 uleshort =1 \b, infoSector %u (usual) >>>>>>>48 uleshort <1 \b, infoSector %u >>>>>>>50 uleshort >6 \b, Backup boot sector %u #>>>>>>>50 uleshort =6 \b, Backup boot sector %u (usual) >>>>>>>50 uleshort <6 \b, Backup boot sector %u >>>>>>>54 ulelong >0 \b, reserved1 0x%x >>>>>>>58 ulelong >0 \b, reserved2 0x%x >>>>>>>62 ulelong >0 \b, reserved3 0x%x # same structure as FAT1X >>>>>>>64 ubyte >0x80 \b, physical drive 0x%x #>>>>>>>64 ubyte =0x80 \b, physical drive 0x%x=80 (usual harddisk) >>>>>>>64 ubyte&0x7F >0 \b, physical drive 0x%x #>>>>>>>64 ubyte =0 \b, physical drive 0x%x=0 (usual floppy) >>>>>>>65 ubyte >0 \b, reserved 0x%x >>>>>>>66 ubyte >0x29 \b, dos < 4.0 BootSector (0x%x) >>>>>>>66 ubyte <0x29 \b, dos < 4.0 BootSector (0x%x) >>>>>>>66 ubyte =0x29 >>>>>>>>67 ulelong x \b, serial number 0x%x >>>>>>>>71 string >>>>>>71 string >NO\ NAME \b, label: "%11.11s" >>>>>>>71 string =NO\ NAME \b, unlabeled ### FATs end >0x200 lelong 0x82564557 \b, BSD disklabel # FATX 0 string FATX FATX filesystem data # Minix filesystems - Juan Cespedes 0x410 leshort 0x137f Minix filesystem 0x410 beshort 0x137f Minix filesystem (big endian) >0x402 beshort !0 \b, %d zones >0x1e string minix \b, bootable 0x410 leshort 0x138f Minix filesystem, 30 char names 0x410 leshort 0x2468 Minix filesystem, version 2 0x410 leshort 0x2478 Minix filesystem, version 2, 30 char names # romfs filesystems - Juan Cespedes 0 string -rom1fs- romfs filesystem, version 1 >8 belong x %d bytes, >16 string x named %s. # netboot image - Juan Cespedes 0 lelong 0x1b031336L Netboot image, >4 lelong&0xFFFFFF00 0 >>4 lelong&0x100 0x000 mode 2 >>4 lelong&0x100 0x100 mode 3 >4 lelong&0xFFFFFF00 !0 unknown mode 0x18b string OS/2 OS/2 Boot Manager # updated by Joerg Jenderek at Oct 2008!! # http://syslinux.zytor.com/iso.php 0 ulelong 0x7c40eafa isolinux Loader # http://syslinux.zytor.com/pxe.php 0 ulelong 0x007c05ea pxelinux Loader 0 ulelong 0x60669c66 pxelinux Loader # added by Joerg Jenderek # In the second sector (+0x200) are variables according to grub-0.97/stage2/asm.S or # grub-1.94/kern/i386/pc/startup.S # http://www.gnu.org/software/grub/manual/grub.html#Embedded-data # usual values are marked with comments to get only informations of strange GRUB loaders 0x200 uleshort 0x70EA # found only version 3.{1,2} >0x206 ubeshort >0x0300 # GRUB version (0.5.)95,0.93,0.94,0.96,0.97 > "00" >>0x212 ubyte >0x29 >>>0x213 ubyte >0x29 # not iso9660_stage1_5 #>>>0 ulelong&0x00BE5652 0x00BE5652 >>>>0x213 ubyte >0x29 GRand Unified Bootloader # config_file for stage1_5 is 0xffffffff + default "/boot/grub/stage2" >>>>0x217 ubyte 0xFF stage1_5 >>>>0x217 ubyte <0xFF stage2 >>>>0x206 ubyte x \b version %u >>>>0x207 ubyte x \b.%u # module_size for 1.94 >>>>0x208 ulelong <0xffffff \b, installed partition %u #>>>>0x208 ulelong =0xffffff \b, %u (default) >>>>0x208 ulelong >0xffffff \b, installed partition %u # GRUB 0.5.95 unofficial >>>>0x20C ulelong&0x2E300000 0x2E300000 # 0=stage2 1=ffs 2=e2fs 3=fat 4=minix 5=reiserfs >>>>>0x20C ubyte x \b, identifier 0x%x #>>>>>0x20D ubyte =0 \b, LBA flag 0x%x (default) >>>>>0x20D ubyte >0 \b, LBA flag 0x%x # GRUB version as string >>>>>0x20E string >\0 \b, GRUB version %-s # for stage1_5 is 0xffffffff + config_file "/boot/grub/stage2" default >>>>>>0x215 ulong 0xffffffff >>>>>>>0x219 string >\0 \b, configuration file %-s >>>>>>0x215 ulong !0xffffffff >>>>>>>0x215 string >\0 \b, configuration file %-s # newer GRUB versions >>>>0x20C ulelong&0x2E300000 !0x2E300000 ##>>>>>0x20C ulelong =0 \b, saved entry %d (usual) >>>>>0x20C ulelong >0 \b, saved entry %d # for 1.94 contains kernel image size # for 0.93,0.94,0.96,0.97 # 0=stage2 1=ffs 2=e2fs 3=fat 4=minix 5=reiserfs 6=vstafs 7=jfs 8=xfs 9=iso9660 a=ufs2 >>>>>0x210 ubyte x \b, identifier 0x%x # The flag for LBA forcing is in most cases 0 #>>>>>0x211 ubyte =0 \b, LBA flag 0x%x (default) >>>>>0x211 ubyte >0 \b, LBA flag 0x%x # GRUB version as string >>>>>0x212 string >\0 \b, GRUB version %-s # for stage1_5 is 0xffffffff + config_file "/boot/grub/stage2" default >>>>>0x217 ulong 0xffffffff >>>>>>0x21b string >\0 \b, configuration file %-s >>>>>0x217 ulong !0xffffffff >>>>>>0x217 string >\0 \b, configuration file %-s 9564 lelong 0x00011954 Unix Fast File system [v1] (little-endian), >8404 string x last mounted on %s, #>9504 ledate x last checked at %s, >8224 ledate x last written at %s, >8401 byte x clean flag %d, >8228 lelong x number of blocks %d, >8232 lelong x number of data blocks %d, >8236 lelong x number of cylinder groups %d, >8240 lelong x block size %d, >8244 lelong x fragment size %d, >8252 lelong x minimum percentage of free blocks %d, >8256 lelong x rotational delay %dms, >8260 lelong x disk rotational speed %drps, >8320 lelong 0 TIME optimization >8320 lelong 1 SPACE optimization 42332 lelong 0x19540119 Unix Fast File system [v2] (little-endian) >&-1164 string x last mounted on %s, >&-696 string >\0 volume name %s, >&-304 leqldate x last written at %s, >&-1167 byte x clean flag %d, >&-1168 byte x readonly flag %d, >&-296 lequad x number of blocks %lld, >&-288 lequad x number of data blocks %lld, >&-1332 lelong x number of cylinder groups %d, >&-1328 lelong x block size %d, >&-1324 lelong x fragment size %d, >&-180 lelong x average file size %d, >&-176 lelong x average number of files in dir %d, >&-272 lequad x pending blocks to free %lld, >&-264 lelong x pending inodes to free %ld, >&-664 lequad x system-wide uuid %0llx, >&-1316 lelong x minimum percentage of free blocks %d, >&-1248 lelong 0 TIME optimization >&-1248 lelong 1 SPACE optimization 66908 lelong 0x19540119 Unix Fast File system [v2] (little-endian) >&-1164 string x last mounted on %s, >&-696 string >\0 volume name %s, >&-304 leqldate x last written at %s, >&-1167 byte x clean flag %d, >&-1168 byte x readonly flag %d, >&-296 lequad x number of blocks %lld, >&-288 lequad x number of data blocks %lld, >&-1332 lelong x number of cylinder groups %d, >&-1328 lelong x block size %d, >&-1324 lelong x fragment size %d, >&-180 lelong x average file size %d, >&-176 lelong x average number of files in dir %d, >&-272 lequad x pending blocks to free %lld, >&-264 lelong x pending inodes to free %ld, >&-664 lequad x system-wide uuid %0llx, >&-1316 lelong x minimum percentage of free blocks %d, >&-1248 lelong 0 TIME optimization >&-1248 lelong 1 SPACE optimization 9564 belong 0x00011954 Unix Fast File system [v1] (big-endian), >7168 belong 0x4c41424c Apple UFS Volume >>7186 string x named %s, >>7176 belong x volume label version %d, >>7180 bedate x created on %s, >8404 string x last mounted on %s, #>9504 bedate x last checked at %s, >8224 bedate x last written at %s, >8401 byte x clean flag %d, >8228 belong x number of blocks %d, >8232 belong x number of data blocks %d, >8236 belong x number of cylinder groups %d, >8240 belong x block size %d, >8244 belong x fragment size %d, >8252 belong x minimum percentage of free blocks %d, >8256 belong x rotational delay %dms, >8260 belong x disk rotational speed %drps, >8320 belong 0 TIME optimization >8320 belong 1 SPACE optimization 42332 belong 0x19540119 Unix Fast File system [v2] (big-endian) >&-1164 string x last mounted on %s, >&-696 string >\0 volume name %s, >&-304 beqldate x last written at %s, >&-1167 byte x clean flag %d, >&-1168 byte x readonly flag %d, >&-296 bequad x number of blocks %lld, >&-288 bequad x number of data blocks %lld, >&-1332 belong x number of cylinder groups %d, >&-1328 belong x block size %d, >&-1324 belong x fragment size %d, >&-180 belong x average file size %d, >&-176 belong x average number of files in dir %d, >&-272 bequad x pending blocks to free %lld, >&-264 belong x pending inodes to free %ld, >&-664 bequad x system-wide uuid %0llx, >&-1316 belong x minimum percentage of free blocks %d, >&-1248 belong 0 TIME optimization >&-1248 belong 1 SPACE optimization 66908 belong 0x19540119 Unix Fast File system [v2] (big-endian) >&-1164 string x last mounted on %s, >&-696 string >\0 volume name %s, >&-304 beqldate x last written at %s, >&-1167 byte x clean flag %d, >&-1168 byte x readonly flag %d, >&-296 bequad x number of blocks %lld, >&-288 bequad x number of data blocks %lld, >&-1332 belong x number of cylinder groups %d, >&-1328 belong x block size %d, >&-1324 belong x fragment size %d, >&-180 belong x average file size %d, >&-176 belong x average number of files in dir %d, >&-272 bequad x pending blocks to free %lld, >&-264 belong x pending inodes to free %ld, >&-664 bequad x system-wide uuid %0llx, >&-1316 belong x minimum percentage of free blocks %d, >&-1248 belong 0 TIME optimization >&-1248 belong 1 SPACE optimization # ext2/ext3 filesystems - Andreas Dilger # ext4 filesystem - Eric Sandeen 0x438 leshort 0xEF53 Linux >0x44c lelong x rev %d >0x43e leshort x \b.%d # No journal? ext2 >0x45c lelong ^0x0000004 ext2 filesystem data >>0x43a leshort ^0x0000001 (mounted or unclean) # Has a journal? ext3 or ext4 >0x45c lelong &0x0000004 # and small INCOMPAT? >>0x460 lelong <0x0000040 # and small RO_COMPAT? >>>0x464 lelong <0x0000008 ext3 filesystem data # else large RO_COMPAT? >>>0x464 lelong >0x0000007 ext4 filesystem data # else large INCOMPAT? >>0x460 lelong >0x000003f ext4 filesystem data # General flags for any ext* fs >0x460 lelong &0x0000004 (needs journal recovery) >0x43a leshort &0x0000002 (errors) # INCOMPAT flags >0x460 lelong &0x0000001 (compressed) #>0x460 lelong &0x0000002 (filetype) #>0x460 lelong &0x0000010 (meta bg) >0x460 lelong &0x0000040 (extents) >0x460 lelong &0x0000080 (64bit) #>0x460 lelong &0x0000100 (mmp) #>0x460 lelong &0x0000200 (flex bg) # RO_INCOMPAT flags #>0x464 lelong &0x0000001 (sparse super) >0x464 lelong &0x0000002 (large files) >0x464 lelong &0x0000008 (huge files) #>0x464 lelong &0x0000010 (gdt checksum) #>0x464 lelong &0x0000020 (many subdirs) #>0x463 lelong &0x0000040 (extra isize) # SGI disk labels - Nathan Scott 0 belong 0x0BE5A941 SGI disk label (volume header) # SGI XFS filesystem - Nathan Scott 0 belong 0x58465342 SGI XFS filesystem data >0x4 belong x (blksz %d, >0x68 beshort x inosz %d, >0x64 beshort ^0x2004 v1 dirs) >0x64 beshort &0x2004 v2 dirs) ############################################################################ # Minix-ST kernel floppy 0x800 belong 0x46fc2700 Atari-ST Minix kernel image >19 string \240\5\371\5\0\011\0\2\0 \b, 720k floppy >19 string \320\2\370\5\0\011\0\1\0 \b, 360k floppy ############################################################################ # Hmmm, is this a better way of detecting _standard_ floppy images ? 19 string \320\2\360\3\0\011\0\1\0 DOS floppy 360k >0x1FE leshort 0xAA55 \b, x86 hard disk boot sector 19 string \240\5\371\3\0\011\0\2\0 DOS floppy 720k >0x1FE leshort 0xAA55 \b, x86 hard disk boot sector 19 string \100\013\360\011\0\022\0\2\0 DOS floppy 1440k >0x1FE leshort 0xAA55 \b, x86 hard disk boot sector 19 string \240\5\371\5\0\011\0\2\0 DOS floppy 720k, IBM >0x1FE leshort 0xAA55 \b, x86 hard disk boot sector 19 string \100\013\371\5\0\011\0\2\0 DOS floppy 1440k, mkdosfs >0x1FE leshort 0xAA55 \b, x86 hard disk boot sector 19 string \320\2\370\5\0\011\0\1\0 Atari-ST floppy 360k 19 string \240\5\371\5\0\011\0\2\0 Atari-ST floppy 720k # Valid media descriptor bytes for MS-DOS: # # Byte Capacity Media Size and Type # ------------------------------------------------- # # F0 2.88 MB 3.5-inch, 2-sided, 36-sector # F0 1.44 MB 3.5-inch, 2-sided, 18-sector # F9 720K 3.5-inch, 2-sided, 9-sector # F9 1.2 MB 5.25-inch, 2-sided, 15-sector # FD 360K 5.25-inch, 2-sided, 9-sector # FF 320K 5.25-inch, 2-sided, 8-sector # FC 180K 5.25-inch, 1-sided, 9-sector # FE 160K 5.25-inch, 1-sided, 8-sector # FE 250K 8-inch, 1-sided, single-density # FD 500K 8-inch, 2-sided, single-density # FE 1.2 MB 8-inch, 2-sided, double-density # F8 ----- Fixed disk # # FC xxxK Apricot 70x1x9 boot disk. # # Originally a bitmap: # xxxxxxx0 Not two sided # xxxxxxx1 Double sided # xxxxxx0x Not 8 SPT # xxxxxx1x 8 SPT # xxxxx0xx Not Removable drive # xxxxx1xx Removable drive # 11111xxx Must be one. # # But now it's rather random: # 111111xx Low density disk # 00 SS, Not 8 SPT # 01 DS, Not 8 SPT # 10 SS, 8 SPT # 11 DS, 8 SPT # # 11111001 Double density 3 floppy disk, high density 5 # 11110000 High density 3 floppy disk # 11111000 Hard disk any format # # CDROM Filesystems # Modified for UDF by gerardo.cacciari@gmail.com 32769 string CD001 !:mime application/x-iso9660-image >38913 string !NSR0 ISO 9660 CD-ROM filesystem data >38913 string NSR0 UDF filesystem data >>38917 string 1 (version 1.0) >>38917 string 2 (version 1.5) >>38917 string 3 (version 2.0) >>38917 byte >0x33 (unknown version, ID 0x%X) >>38917 byte <0x31 (unknown version, ID 0x%X) # "application id" which appears to be used as a volume label >32808 string >\0 '%s' >34816 string \000CD001\001EL\ TORITO\ SPECIFICATION (bootable) 37633 string CD001 ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors) !:mime application/x-iso9660-image 32776 string CDROM High Sierra CD-ROM filesystem data # cramfs filesystem - russell@coker.com.au 0 lelong 0x28cd3d45 Linux Compressed ROM File System data, little endian >4 lelong x size %lu >8 lelong &1 version #2 >8 lelong &2 sorted_dirs >8 lelong &4 hole_support >32 lelong x CRC 0x%x, >36 lelong x edition %lu, >40 lelong x %lu blocks, >44 lelong x %lu files 0 belong 0x28cd3d45 Linux Compressed ROM File System data, big endian >4 belong x size %lu >8 belong &1 version #2 >8 belong &2 sorted_dirs >8 belong &4 hole_support >32 belong x CRC 0x%x, >36 belong x edition %lu, >40 belong x %lu blocks, >44 belong x %lu files # reiserfs - russell@coker.com.au 0x10034 string ReIsErFs ReiserFS V3.5 0x10034 string ReIsEr2Fs ReiserFS V3.6 >0x1002c leshort x block size %d >0x10032 leshort &2 (mounted or unclean) >0x10000 lelong x num blocks %d >0x10040 lelong 1 tea hash >0x10040 lelong 2 yura hash >0x10040 lelong 3 r5 hash # JFFS - russell@coker.com.au 0 lelong 0x34383931 Linux Journalled Flash File system, little endian 0 belong 0x34383931 Linux Journalled Flash File system, big endian # EST flat binary format (which isn't, but anyway) # From: Mark Brown 0 string ESTFBINR EST flat binary # Aculab VoIP firmware # From: Mark Brown 0 string VoIP\ Startup\ and Aculab VoIP firmware >35 string x format %s # u-boot/PPCBoot image file # From: Mark Brown 0 belong 0x27051956 u-boot/PPCBoot image >4 string PPCBoot >>12 string x version %s # JFFS2 file system 0 leshort 0x1984 Linux old jffs2 filesystem data little endian 0 leshort 0x1985 Linux jffs2 filesystem data little endian # Squashfs 0 string sqsh Squashfs filesystem, big endian, >28 beshort x version %d. >30 beshort x \b%d, >28 beshort <3 >>8 belong x %d bytes, >28 beshort >2 >>63 bequad x %lld bytes, #>>67 belong x %d bytes, >4 belong x %d inodes, >28 beshort <2 >>32 beshort x blocksize: %d bytes, >28 beshort >1 >>51 belong x blocksize: %d bytes, >39 bedate x created: %s 0 string hsqs Squashfs filesystem, little endian, >28 leshort x version %d. >30 leshort x \b%d, >28 leshort <3 >>8 lelong x %d bytes, >28 leshort >2 >>63 lequad x %lld bytes, #>>63 lelong x %d bytes, >4 lelong x %d inodes, >28 leshort <2 >>32 leshort x blocksize: %d bytes, >28 leshort >1 >>51 lelong x blocksize: %d bytes, >39 ledate x created: %s 0 string td\000 floppy image data (TeleDisk) # AFS Dump Magic # From: Ty Sarna 0 string \x01\xb3\xa1\x13\x22 AFS Dump >&0 belong x (v%d) >>&0 byte 0x76 >>>&0 belong x Vol %d, >>>>&0 byte 0x6e >>>>>&0 string x %s >>>>>>&1 byte 0x74 >>>>>>>&0 beshort 2 >>>>>>>>&4 bedate x on: %s >>>>>>>>&0 bedate =0 full dump >>>>>>>>&0 bedate !0 incremental since: %s #---------------------------------------------------------- # VMS backup savesets - gerardo.cacciari@gmail.com # 4 string \x01\x00\x01\x00\x01\x00 >(0.s+16) string \x01\x01 >>&(&0.b+8) byte 0x42 OpenVMS backup saveset data >>>40 lelong x (block size %d, >>>49 string >\0 original name '%s', >>>2 short 1024 VAX generated) >>>2 short 2048 AXP generated) >>>2 short 4096 I64 generated) # Summary: Oracle Clustered Filesystem # Created by: Aaron Botsis 8 string OracleCFS Oracle Clustered Filesystem, >4 long x rev %d >0 long x \b.%d, >560 string x label: %.64s, >136 string x mountpoint: %.128s # Summary: Oracle ASM tagged volume # Created by: Aaron Botsis 32 string ORCLDISK Oracle ASM Volume, >40 string x Disk Name: %0.12s 32 string ORCLCLRD Oracle ASM Volume (cleared), >40 string x Disk Name: %0.12s # Oracle Clustered Filesystem - Aaron Botsis 8 string OracleCFS Oracle Clustered Filesystem, >4 long x rev %d >0 long x \b.%d, >560 string x label: %.64s, >136 string x mountpoint: %.128s # Oracle ASM tagged volume - Aaron Botsis 32 string ORCLDISK Oracle ASM Volume, >40 string x Disk Name: %0.12s 32 string ORCLCLRD Oracle ASM Volume (cleared), >40 string x Disk Name: %0.12s # Compaq/HP RILOE floppy image # From: Dirk Jagdmann 0 string CPQRFBLO Compaq/HP RILOE floppy image #------------------------------------------------------------------------------ # Files-11 On-Disk Structure (OpenVMS file system) - gerardo.cacciari@gmail.com # These bits come from LBN 1 (home block) of ODS-2 and ODS-5 volumes, which is # mapped to VBN 2 of [000000]INDEXF.SYS;1 # 1008 string DECFILE11B Files-11 On-Disk Structure >525 byte x Level %d >525 byte x (ODS-%d OpenVMS file system), >984 string x volume label is '%-12.12s' # From: Thomas Klausner # http://filext.com/file-extension/DAA # describes the daa file format. The magic would be: 0 string DAA\x0\x0\x0\x0\x0 PowerISO Direct-Access-Archive # From Albert Cahalan # really le32 operation,destination,payloadsize (but quite predictable) # 01 00 00 00 00 00 00 c0 00 02 00 00 0 string \1\0\0\0\0\0\0\300\0\2\0\0 Marvell Libertas firmware # From Eric Sandeen # GFS2 0x10000 belong 0x01161970 GFS2 Filesystem >0x10024 belong x (blocksize %d, >0x10060 string >\0 lockproto %s) # BTRFS 0x10040 string _BHRfS_M BTRFS Filesystem >0x1012b string >\0 (label "%s", >0x10090 lelong x sectorsize %d, >0x10094 lelong x nodesize %d, >0x10098 lelong x leafsize %d) # dvdisaster's .ecc # From: "Nelson A. de Oliveira" 0 string *dvdisaster* dvdisaster error correction file #------------------------------------------------------------------------------ # flash: file(1) magic for Macromedia Flash file format # # See # # http://www.macromedia.com/software/flash/open/ # 0 string FWS Macromedia Flash data, >3 byte x version %d !:mime application/x-shockwave-flash 0 string CWS Macromedia Flash data (compressed), !:mime application/x-shockwave-flash >3 byte x version %d # From: Cal Peake 0 string FLV Macromedia Flash Video !:mime video/x-flv # # From Dave Wilson 0 string AGD4\xbe\xb8\xbb\xcb\x00 Macromedia Freehand 9 Document #------------------------------------------------------------------------------ # fonts: file(1) magic for font data # 0 search/1 FONT ASCII vfont text 0 short 0436 Berkeley vfont data 0 short 017001 byte-swapped Berkeley vfont data # PostScript fonts (must precede "printer" entries), quinlan@yggdrasil.com 0 string %!PS-AdobeFont-1. PostScript Type 1 font text >20 string >\0 (%s) 6 string %!PS-AdobeFont-1. PostScript Type 1 font program data # X11 font files in SNF (Server Natural Format) format 0 belong 00000004 X11 SNF font data, MSB first 0 lelong 00000004 X11 SNF font data, LSB first # X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan@yggdrasil.com) 0 search/1 STARTFONT\ X11 BDF font text # X11 fonts, from Daniel Quinlan (quinlan@yggdrasil.com) # PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides) 0 string \001fcp X11 Portable Compiled Font data >12 byte 0x02 \b, LSB first >12 byte 0x0a \b, MSB first 0 string D1.0\015 X11 Speedo font data #------------------------------------------------------------------------------ # FIGlet fonts and controlfiles # From figmagic supplied with Figlet version 2.2 # "David E. O'Brien" 0 string flf FIGlet font >3 string >2a version %-2.2s 0 string flc FIGlet controlfile >3 string >2a version %-2.2s # libGrx graphics lib fonts, from Albert Cahalan (acahalan@cs.uml.edu) # Used with djgpp (DOS Gnu C++), sometimes Linux or Turbo C++ 0 belong 0x14025919 libGrx font data, >8 leshort x %dx >10 leshort x \b%d >40 string x %s # Misc. DOS VGA fonts, from Albert Cahalan (acahalan@cs.uml.edu) 0 belong 0xff464f4e DOS code page font data collection 7 belong 0x00454741 DOS code page font data 7 belong 0x00564944 DOS code page font data (from Linux?) 4098 string DOSFONT DOSFONT2 encrypted font data # downloadable fonts for browser (prints type) anthon@mnt.org 0 string PFR1 PFR1 font >102 string >0 \b: %s # True Type fonts 0 string \000\001\000\000\000 TrueType font data 0 string \007\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font 0 string \012\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font 0 string ttcf TrueType font collection data # Opentype font data from Avi Bercovich 0 string OTTO OpenType font data # Gürkan Sengün , www.linuks.mine.nu 0 string SplineFontDB: Spline Font Database >14 string x version %s # FORTRAN source 0 regex/100 \^[Cc][\ \t] FORTRAN program !:mime text/x-fortran #------------------------------------------------------------------------------ # frame: file(1) magic for FrameMaker files # # This stuff came on a FrameMaker demo tape, most of which is # copyright, but this file is "published" as witness the following: # # Note that this is the Framemaker Maker Interchange Format, not the # Normal format which would be application/vnd.framemaker. # 0 string \11 string 5.5 (5.5 >11 string 5.0 (5.0 >11 string 4.0 (4.0 >11 string 3.0 (3.0 >11 string 2.0 (2.0 >11 string 1.0 (1.0 >14 byte x %c) 0 string \9 string 4.0 (4.0) >9 string 3.0 (3.0) >9 string 2.0 (2.0) >9 string 1.0 (1.x) 0 search/1 \17 string 3.0 (3.0) >17 string 2.0 (2.0) >17 string 1.0 (1.x) 0 string \17 string 1.01 (%s) 0 string \10 string 3.0 (3.0 >10 string 2.0 (2.0 >10 string 1.0 (1.0 >13 byte x %c) # XXX - this book entry should be verified, if you find one, uncomment this #0 string \6 string 3.0 (3.0) #>6 string 2.0 (2.0) #>6 string 1.0 (1.0) 0 string \= 4096 (or >4095, same thing), then it's # an executable, and is dynamically-linked if the "has run-time # loader information" bit is set. # # On x86, NetBSD says: # # If it's neither pure nor demand-paged: # # if it has the "has run-time loader information" bit set, it's # a dynamically-linked executable; # # if it doesn't have that bit set, then: # # if it has the "is position-independent" bit set, it's # position-independent; # # if the entry point is non-zero, it's an executable, otherwise # it's an object file. # # If it's pure: # # if it has the "has run-time loader information" bit set, it's # a dynamically-linked executable, otherwise it's just an # executable. # # If it's demand-paged: # # if it has the "has run-time loader information" bit set, # then: # # if the entry point is < 4096, it's a shared library; # # if the entry point is = 4096 or > 4096 (i.e., >= 4096), # it's a dynamically-linked executable); # # if it doesn't have the "has run-time loader information" bit # set, then it's just an executable. # # (On non-x86, NetBSD does much the same thing, except that it uses # 8192 on 68K - except for "68k4k", which is presumably "68K with 4K # pages - SPARC, and MIPS, presumably because Sun-3's and Sun-4's # had 8K pages; dunno about MIPS.) # # I suspect the two will differ only in perverse and uninteresting cases # ("shared" libraries that aren't demand-paged and whose pages probably # won't actually be shared, executables with entry points <4096). # # I leave it to those more familiar with FreeBSD and NetBSD to figure out # what the right answer is (although using ">4095", FreeBSD-style, is # probably better than separately checking for "=4096" and ">4096", # NetBSD-style). (The old "netbsd" file analyzed FreeBSD demand paged # executables using the NetBSD technique.) # 0 lelong&0377777777 041400407 FreeBSD/i386 >20 lelong <4096 >>3 byte&0xC0 &0x80 shared library >>3 byte&0xC0 0x40 PIC object >>3 byte&0xC0 0x00 object >20 lelong >4095 >>3 byte&0x80 0x80 dynamically linked executable >>3 byte&0x80 0x00 executable >16 lelong >0 not stripped 0 lelong&0377777777 041400410 FreeBSD/i386 pure >20 lelong <4096 >>3 byte&0xC0 &0x80 shared library >>3 byte&0xC0 0x40 PIC object >>3 byte&0xC0 0x00 object >20 lelong >4095 >>3 byte&0x80 0x80 dynamically linked executable >>3 byte&0x80 0x00 executable >16 lelong >0 not stripped 0 lelong&0377777777 041400413 FreeBSD/i386 demand paged >20 lelong <4096 >>3 byte&0xC0 &0x80 shared library >>3 byte&0xC0 0x40 PIC object >>3 byte&0xC0 0x00 object >20 lelong >4095 >>3 byte&0x80 0x80 dynamically linked executable >>3 byte&0x80 0x00 executable >16 lelong >0 not stripped 0 lelong&0377777777 041400314 FreeBSD/i386 compact demand paged >20 lelong <4096 >>3 byte&0xC0 &0x80 shared library >>3 byte&0xC0 0x40 PIC object >>3 byte&0xC0 0x00 object >20 lelong >4095 >>3 byte&0x80 0x80 dynamically linked executable >>3 byte&0x80 0x00 executable >16 lelong >0 not stripped # XXX gross hack to identify core files # cores start with a struct tss; we take advantage of the following: # byte 7: highest byte of the kernel stack pointer, always 0xfe # 8/9: kernel (ring 0) ss value, always 0x0010 # 10 - 27: ring 1 and 2 ss/esp, unused, thus always 0 # 28: low order byte of the current PTD entry, always 0 since the # PTD is page-aligned # 7 string \357\020\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 FreeBSD/i386 a.out core file >1039 string >\0 from '%s' # /var/run/ld.so.hints # What are you laughing about? 0 lelong 011421044151 ld.so hints file (Little Endian >4 lelong >0 \b, version %d) >4 belong <1 \b) 0 belong 011421044151 ld.so hints file (Big Endian >4 belong >0 \b, version %d) >4 belong <1 \b) # # Files generated by FreeBSD scrshot(1)/vidcontrol(1) utilities # 0 string SCRSHOT_ scrshot(1) screenshot, >8 byte x version %d, >9 byte 2 %d bytes in header, >>10 byte x %d chars wide by >>11 byte x %d chars high #------------------------------------------------------------------------------ # fsav: file(1) magic for datafellows fsav virus definition files # Anthon van der Neut (anthon@mnt.org) # ftp://ftp.f-prot.com/pub/{macrdef2.zip,nomacro.def} 0 beshort 0x1575 fsav macro virus signatures >8 leshort >0 (%d- >11 byte >0 \b%02d- >10 byte >0 \b%02d) # ftp://ftp.f-prot.com/pub/sign.zip #10 ubyte <12 #>9 ubyte <32 #>>8 ubyte 0x0a #>>>12 ubyte 0x07 #>>>>11 uleshort >0 fsav DOS/Windows virus signatures (%d- #>>>>10 byte 0 \b01- #>>>>10 byte 1 \b02- #>>>>10 byte 2 \b03- #>>>>10 byte 3 \b04- #>>>>10 byte 4 \b05- #>>>>10 byte 5 \b06- #>>>>10 byte 6 \b07- #>>>>10 byte 7 \b08- #>>>>10 byte 8 \b09- #>>>>10 byte 9 \b10- #>>>>10 byte 10 \b11- #>>>>10 byte 11 \b12- #>>>>9 ubyte >0 \b%02d) # ftp://ftp.f-prot.com/pub/sign2.zip #0 ubyte 0x62 #>1 ubyte 0xF5 #>>2 ubyte 0x1 #>>>3 ubyte 0x1 #>>>>4 ubyte 0x0e #>>>>>13 ubyte >0 fsav virus signatures #>>>>>>11 ubyte x size 0x%02x #>>>>>>12 ubyte x \b%02x #>>>>>>13 ubyte x \b%02x bytes # Joerg Jenderek: joerg dot jenderek at web dot de # http://www.clamav.net/doc/latest/html/node45.html # .cvd files start with a 512 bytes colon separated header # ClamAV-VDB:buildDate:version:signaturesNumbers:functionalityLevelRequired:MD5:Signature:builder:buildTime # + gzipped tarball files 0 string ClamAV-VDB: >11 string >\0 Clam AntiVirus database %-.23s >>34 string : >>>35 string !: \b, version >>>>35 string x \b%-.1s >>>>>36 string !: >>>>>>36 string x \b%-.1s >>>>>>>37 string !: >>>>>>>>37 string x \b%-.1s >>>>>>>>>38 string !: >>>>>>>>>>38 string x \b%-.1s >512 string \037\213 \b, gzipped >769 string ustar\0 \b, tarred # Type: Grisoft AVG AntiVirus # From: David Newgas 0 string AVG7_ANTIVIRUS_VAULT_FILE AVG 7 Antivirus vault file data #------------------------------------------------------------------------------ # games: file(1) for games # Fabio Bonelli # Quake II - III data files 0 string IDP2 Quake II 3D Model file, >20 long x %lu skin(s), >8 long x (%lu x >12 long x %lu), >40 long x %lu frame(s), >16 long x Frame size %lu bytes, >24 long x %lu vertices/frame, >28 long x %lu texture coordinates, >32 long x %lu triangles/frame 0 string IBSP Quake >4 long 0x26 II Map file (BSP) >4 long 0x2E III Map file (BSP) 0 string IDS2 Quake II SP2 sprite file #--------------------------------------------------------------------------- # Doom and Quake # submitted by Nicolas Patrois 0 string \xcb\x1dBoom\xe6\xff\x03\x01 Boom or linuxdoom demo # some doom lmp files don't match, I've got one beginning with \x6d\x02\x01\x01 24 string LxD\ 203 Linuxdoom save >0 string x , name=%s >44 string x , world=%s # Quake 0 string PACK Quake I or II world or extension #0 string -1\x0a Quake I demo #>30 string x version %.4s #>61 string x level %s #0 string 5\x0a Quake I save # The levels # Quake 1 0 string 5\x0aIntroduction Quake I save: start Introduction 0 string 5\x0athe_Slipgate_Complex Quake I save: e1m1 The slipgate complex 0 string 5\x0aCastle_of_the_Damned Quake I save: e1m2 Castle of the damned 0 string 5\x0athe_Necropolis Quake I save: e1m3 The necropolis 0 string 5\x0athe_Grisly_Grotto Quake I save: e1m4 The grisly grotto 0 string 5\x0aZiggurat_Vertigo Quake I save: e1m8 Ziggurat vertigo (secret) 0 string 5\x0aGloom_Keep Quake I save: e1m5 Gloom keep 0 string 5\x0aThe_Door_To_Chthon Quake I save: e1m6 The door to Chthon 0 string 5\x0aThe_House_of_Chthon Quake I save: e1m7 The house of Chthon 0 string 5\x0athe_Installation Quake I save: e2m1 The installation 0 string 5\x0athe_Ogre_Citadel Quake I save: e2m2 The ogre citadel 0 string 5\x0athe_Crypt_of_Decay Quake I save: e2m3 The crypt of decay (dopefish lives!) 0 string 5\x0aUnderearth Quake I save: e2m7 Underearth (secret) 0 string 5\x0athe_Ebon_Fortress Quake I save: e2m4 The ebon fortress 0 string 5\x0athe_Wizard's_Manse Quake I save: e2m5 The wizard's manse 0 string 5\x0athe_Dismal_Oubliette Quake I save: e2m6 The dismal oubliette 0 string 5\x0aTermination_Central Quake I save: e3m1 Termination central 0 string 5\x0aVaults_of_Zin Quake I save: e3m2 Vaults of Zin 0 string 5\x0athe_Tomb_of_Terror Quake I save: e3m3 The tomb of terror 0 string 5\x0aSatan's_Dark_Delight Quake I save: e3m4 Satan's dark delight 0 string 5\x0athe_Haunted_Halls Quake I save: e3m7 The haunted halls (secret) 0 string 5\x0aWind_Tunnels Quake I save: e3m5 Wind tunnels 0 string 5\x0aChambers_of_Torment Quake I save: e3m6 Chambers of torment 0 string 5\x0athe_Sewage_System Quake I save: e4m1 The sewage system 0 string 5\x0aThe_Tower_of_Despair Quake I save: e4m2 The tower of despair 0 string 5\x0aThe_Elder_God_Shrine Quake I save: e4m3 The elder god shrine 0 string 5\x0athe_Palace_of_Hate Quake I save: e4m4 The palace of hate 0 string 5\x0aHell's_Atrium Quake I save: e4m5 Hell's atrium 0 string 5\x0athe_Nameless_City Quake I save: e4m8 The nameless city (secret) 0 string 5\x0aThe_Pain_Maze Quake I save: e4m6 The pain maze 0 string 5\x0aAzure_Agony Quake I save: e4m7 Azure agony 0 string 5\x0aShub-Niggurath's_Pit Quake I save: end Shub-Niggurath's pit # Quake DeathMatch levels 0 string 5\x0aPlace_of_Two_Deaths Quake I save: dm1 Place of two deaths 0 string 5\x0aClaustrophobopolis Quake I save: dm2 Claustrophobopolis 0 string 5\x0aThe_Abandoned_Base Quake I save: dm3 The abandoned base 0 string 5\x0aThe_Bad_Place Quake I save: dm4 The bad place 0 string 5\x0aThe_Cistern Quake I save: dm5 The cistern 0 string 5\x0aThe_Dark_Zone Quake I save: dm6 The dark zone # Scourge of Armagon 0 string 5\x0aCommand_HQ Quake I save: start Command HQ 0 string 5\x0aThe_Pumping_Station Quake I save: hip1m1 The pumping station 0 string 5\x0aStorage_Facility Quake I save: hip1m2 Storage facility 0 string 5\x0aMilitary_Complex Quake I save: hip1m5 Military complex (secret) 0 string 5\x0athe_Lost_Mine Quake I save: hip1m3 The lost mine 0 string 5\x0aResearch_Facility Quake I save: hip1m4 Research facility 0 string 5\x0aAncient_Realms Quake I save: hip2m1 Ancient realms 0 string 5\x0aThe_Gremlin's_Domain Quake I save: hip2m6 The gremlin's domain (secret) 0 string 5\x0aThe_Black_Cathedral Quake I save: hip2m2 The black cathedral 0 string 5\x0aThe_Catacombs Quake I save: hip2m3 The catacombs 0 string 5\x0athe_Crypt__ Quake I save: hip2m4 The crypt 0 string 5\x0aMortum's_Keep Quake I save: hip2m5 Mortum's keep 0 string 5\x0aTur_Torment Quake I save: hip3m1 Tur torment 0 string 5\x0aPandemonium Quake I save: hip3m2 Pandemonium 0 string 5\x0aLimbo Quake I save: hip3m3 Limbo 0 string 5\x0athe_Edge_of_Oblivion Quake I save: hipdm1 The edge of oblivion (secret) 0 string 5\x0aThe_Gauntlet Quake I save: hip3m4 The gauntlet 0 string 5\x0aArmagon's_Lair Quake I save: hipend Armagon's lair # Malice 0 string 5\x0aThe_Academy Quake I save: start The academy 0 string 5\x0aThe_Lab Quake I save: d1 The lab 0 string 5\x0aArea_33 Quake I save: d1b Area 33 0 string 5\x0aSECRET_MISSIONS Quake I save: d3b Secret missions 0 string 5\x0aThe_Hospital Quake I save: d10 The hospital (secret) 0 string 5\x0aThe_Genetics_Lab Quake I save: d11 The genetics lab (secret) 0 string 5\x0aBACK_2_MALICE Quake I save: d4b Back to Malice 0 string 5\x0aArea44 Quake I save: d1c Area 44 0 string 5\x0aTakahiro_Towers Quake I save: d2 Takahiro towers 0 string 5\x0aA_Rat's_Life Quake I save: d3 A rat's life 0 string 5\x0aInto_The_Flood Quake I save: d4 Into the flood 0 string 5\x0aThe_Flood Quake I save: d5 The flood 0 string 5\x0aNuclear_Plant Quake I save: d6 Nuclear plant 0 string 5\x0aThe_Incinerator_Plant Quake I save: d7 The incinerator plant 0 string 5\x0aThe_Foundry Quake I save: d7b The foundry 0 string 5\x0aThe_Underwater_Base Quake I save: d8 The underwater base 0 string 5\x0aTakahiro_Base Quake I save: d9 Takahiro base 0 string 5\x0aTakahiro_Laboratories Quake I save: d12 Takahiro laboratories 0 string 5\x0aStayin'_Alive Quake I save: d13 Stayin' alive 0 string 5\x0aB.O.S.S._HQ Quake I save: d14 B.O.S.S. HQ 0 string 5\x0aSHOWDOWN! Quake I save: d15 Showdown! # Malice DeathMatch levels 0 string 5\x0aThe_Seventh_Precinct Quake I save: ddm1 The seventh precinct 0 string 5\x0aSub_Station Quake I save: ddm2 Sub station 0 string 5\x0aCrazy_Eights! Quake I save: ddm3 Crazy eights! 0 string 5\x0aEast_Side_Invertationa Quake I save: ddm4 East side invertationa 0 string 5\x0aSlaughterhouse Quake I save: ddm5 Slaughterhouse 0 string 5\x0aDOMINO Quake I save: ddm6 Domino 0 string 5\x0aSANDRA'S_LADDER Quake I save: ddm7 Sandra's ladder 0 string MComprHD MAME CHD compressed hard disk image, >12 belong x version %lu # doom - submitted by Jon Dowland 0 string =IWAD doom main IWAD data >4 lelong x containing %d lumps 0 string =PWAD doom patch PWAD data >4 lelong x containing %d lumps # Summary: Warcraft 3 save # Extension: .w3g # Created by: "Nelson A. de Oliveira" 0 string Warcraft\ III\ recorded\ game %s # Summary: Warcraft 3 map # Extension: .w3m # Created by: "Nelson A. de Oliveira" 0 string HM3W Warcraft III map file # Summary: SGF Smart Game Format # Extension: .sgf # Reference: http://www.red-bean.com/sgf/ # Created by: Eduardo Sabbatella # Modified by (1): Abel Cheung (regex, more game format) # FIXME: Some games don't have GM (game type) 0 regex \\(;.*GM\\[[0-9]{1,2}\\] Smart Game Format >2 search/0x200 GM[ >>&0 string 1] (Go) >>&0 string 2] (Othello) >>&0 string 3] (chess) >>&0 string 4] (Gomoku+Renju) >>&0 string 5] (Nine Men's Morris) >>&0 string 6] (Backgammon) >>&0 string 7] (Chinese chess) >>&0 string 8] (Shogi) >>&0 string 9] (Lines of Action) >>&0 string 10] (Ataxx) >>&0 string 11] (Hex) >>&0 string 12] (Jungle) >>&0 string 13] (Neutron) >>&0 string 14] (Philosopher's Football) >>&0 string 15] (Quadrature) >>&0 string 16] (Trax) >>&0 string 17] (Tantrix) >>&0 string 18] (Amazons) >>&0 string 19] (Octi) >>&0 string 20] (Gess) >>&0 string 21] (Twixt) >>&0 string 22] (Zertz) >>&0 string 23] (Plateau) >>&0 string 24] (Yinsh) >>&0 string 25] (Punct) >>&0 string 26] (Gobblet) >>&0 string 27] (hive) >>&0 string 28] (Exxit) >>&0 string 29] (Hnefatal) >>&0 string 30] (Kuba) >>&0 string 31] (Tripples) >>&0 string 32] (Chase) >>&0 string 33] (Tumbling Down) >>&0 string 34] (Sahara) >>&0 string 35] (Byte) >>&0 string 36] (Focus) >>&0 string 37] (Dvonn) >>&0 string 38] (Tamsk) >>&0 string 39] (Gipf) >>&0 string 40] (Kropki) # Summary: Civilization 4 video # Extension: .bik # Created by: Abel Cheung 0 string BIKi Civilization 4 Video ############################################## # NetImmerse/Gamebryo game engine entries # Summary: Gamebryo game engine file # Extension: .nif, .kf # Created by: Abel Cheung 0 string Gamebryo\ File\ Format,\ Version\ Gamebryo game engine file >&0 regex [0-9a-z.]+ \b, version %s # Summary: Gamebryo game engine file # Extension: .kfm # Created by: Abel Cheung 0 string ;Gamebryo\ KFM\ File\ Version\ Gamebryo game engine animation File >&0 regex [0-9a-z.]+ \b, version %s # Summary: NetImmerse game engine file # Extension .nif # Created by: Abel Cheung 0 string NetImmerse\ File\ Format,\ Versio >&0 string n\ NetImmerse game engine file >>&0 regex [0-9a-z.]+ \b, version %s #------------------------------------------------------------------------------ # gcc: file(1) magic for GCC special files # 0 string gpch GCC precompiled header # The version field is annoying. It's 3 characters, not zero-terminated. >5 byte x (version %c >6 byte x \b%c >7 byte x \b%c) # 67 = 'C', 111 = 'o', 43 = '+', 79 = 'O' >4 byte 67 for C >4 byte 111 for Objective C >4 byte 43 for C++ >4 byte 79 for Objective C++ #------------------------------------------------------------------------------ # GEOS files (Vidar Madsen, vidar@gimp.org) # semi-commonly used in embedded and handheld systems. 0 belong 0xc745c153 GEOS >40 byte 1 executable >40 byte 2 VMFile >40 byte 3 binary >40 byte 4 directory label >40 byte <1 unknown >40 byte >4 unknown >4 string >\0 \b, name "%s" #>44 short x \b, version %d #>46 short x \b.%d #>48 short x \b, rev %d #>50 short x \b.%d #>52 short x \b, proto %d #>54 short x \br%d #>168 string >\0 \b, copyright "%s" #------------------------------------------------------------------------------ # GIMP Gradient: file(1) magic for the GIMP's gradient data files # by Federico Mena 0 string GIMP\ Gradient GIMP gradient data #------------------------------------------------------------------------------ # XCF: file(1) magic for the XCF image format used in the GIMP developed # by Spencer Kimball and Peter Mattis # ('Bucky' LaDieu, nega@vt.edu) 0 string gimp\ xcf GIMP XCF image data, >9 string file version 0, >9 string v version >>10 string >\0 %s, >14 belong x %lu x >18 belong x %lu, >22 belong 0 RGB Color >22 belong 1 Greyscale >22 belong 2 Indexed Color >22 belong >2 Unknown Image Type. #------------------------------------------------------------------------------ # XCF: file(1) magic for the patterns used in the GIMP, developed # by Spencer Kimball and Peter Mattis # ('Bucky' LaDieu, nega@vt.edu) 20 string GPAT GIMP pattern data, >24 string x %s #------------------------------------------------------------------------------ # XCF: file(1) magic for the brushes used in the GIMP, developed # by Spencer Kimball and Peter Mattis # ('Bucky' LaDieu, nega@vt.edu) 20 string GIMP GIMP brush data # GIMP Curves File # From: "Nelson A. de Oliveira" 0 string #\040GIMP\040Curves\040File GIMP curve file # GNOME keyring # Contributed by Josh Triplett # FIXME: Could be simplified if pstring supported two-byte counts 0 string GnomeKeyring\n\r\0\n GNOME keyring >&0 ubyte 0 \b, major version 0 >>&0 ubyte 0 \b, minor version 0 >>>&0 ubyte 0 \b, crypto type 0 (AEL) >>>&0 ubyte >0 \b, crypto type %hhu (unknown) >>>&1 ubyte 0 \b, hash type 0 (MD5) >>>&1 ubyte >0 \b, hash type %hhu (unknown) >>>&2 ubelong 0xFFFFFFFF \b, name NULL >>>&2 ubelong !0xFFFFFFFF >>>>&-4 ubelong >255 \b, name too long for file's pstring type >>>>&-4 ubelong <256 >>>>>&-1 pstring x \b, name "%s" >>>>>>&0 ubeqdate x \b, last modified %s >>>>>>&8 ubeqdate x \b, created %s >>>>>>&16 ubelong &1 >>>>>>>&0 ubelong x \b, locked if idle for %u seconds >>>>>>&16 ubelong ^1 \b, not locked if idle >>>>>>&24 ubelong x \b, hash iterations %u >>>>>>&28 ubequad x \b, salt %llu >>>>>>&52 ubelong x \b, %u item(s) #------------------------------------------------------------------------------ # gnu: file(1) magic for various GNU tools # # GNU nlsutils message catalog file format # 0 string \336\22\4\225 GNU message catalog (little endian), >4 lelong x revision %d, >8 lelong x %d messages 0 string \225\4\22\336 GNU message catalog (big endian), >4 belong x revision %d, >8 belong x %d messages # message catalogs, from Mitchum DSouza 0 string *nazgul* Nazgul style compiled message catalog >8 lelong >0 \b, version %ld # GnuPG # The format is very similar to pgp 0 string \001gpg GPG key trust database >4 byte x version %d # Note: magic.mime had 0x8501 for the next line instead of 0x8502 0 beshort 0x8502 GPG encrypted data !:mime text/PGP # encoding: data # This magic is not particularly good, as the keyrings don't have true # magic. Nevertheless, it covers many keyrings. 0 beshort 0x9901 GPG key public ring !:mime application/x-gnupg-keyring # Gnumeric spreadsheet # This entry is only semi-helpful, as Gnumeric compresses its files, so # they will ordinarily reported as "compressed", but at least -z helps 39 string = # gnu find magic 0 string \0LOCATE GNU findutils locate database data >7 string >\0 \b, format %s >7 string 02 \b (frcode) # Files produced by GNU gettext 0 long 0xDE120495 GNU-format message catalog data 0 long 0x950412DE GNU-format message catalog data #------------------------------------------------------------------------------ # gnumeric: file(1) magic for Gnumeric spreadsheet # This entry is only semi-helpful, as Gnumeric compresses its files, so # they will ordinarily reported as "compressed", but at least -z helps 39 string =39 byte >0 - version %c # ACE/gr ascii 0 string #\ xvgr\ parameter\ file ACE/gr ascii file 0 string #\ xmgr\ parameter\ file ACE/gr ascii file 0 string #\ ACE/gr\ parameter\ file ACE/gr ascii file # Grace projects 0 string #\ Grace\ project\ file Grace project file >23 string @version\ (version >>32 byte >0 %c >>33 string >\0 \b.%.2s >>35 string >\0 \b.%.2s) # ACE/gr fit description files 0 string #\ ACE/gr\ fit\ description\ ACE/gr fit description file # end of ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE #------------------------------------------------------------------------------ # graphviz: file(1) magic for http://www.graphviz.org/ # FIXME: These patterns match too generally. For example, the first # line matches a LaTeX file containing the word "graph" (with a { # following later) and the second line matches this file. #0 regex/100 [\r\n\t\ ]*graph[\r\n\t\ ]+.*\\{ graphviz graph text #!:mime text/vnd.graphviz #0 regex/100 [\r\n\t\ ]*digraph[\r\n\t\ ]+.*\\{ graphviz digraph text #!:mime text/vnd.graphviz #------------------------------------------------------------------------------ # gringotts: file(1) magic for Gringotts # http://devel.pluto.linux.it/projects/Gringotts/ # author: Germano Rizzo #GRG3????Y 0 string GRG Gringotts data file #file format 1 >3 string 1 v.1, MCRYPT S2K, SERPENT crypt, SHA-256 hash, ZLib lvl.9 #file format 2 >3 string 2 v.2, MCRYPT S2K, >>8 byte&0x70 0x00 RIJNDAEL-128 crypt, >>8 byte&0x70 0x10 SERPENT crypt, >>8 byte&0x70 0x20 TWOFISH crypt, >>8 byte&0x70 0x30 CAST-256 crypt, >>8 byte&0x70 0x40 SAFER+ crypt, >>8 byte&0x70 0x50 LOKI97 crypt, >>8 byte&0x70 0x60 3DES crypt, >>8 byte&0x70 0x70 RIJNDAEL-256 crypt, >>8 byte&0x08 0x00 SHA1 hash, >>8 byte&0x08 0x08 RIPEMD-160 hash, >>8 byte&0x04 0x00 ZLib >>8 byte&0x04 0x04 BZip2 >>8 byte&0x03 0x00 lvl.0 >>8 byte&0x03 0x01 lvl.3 >>8 byte&0x03 0x02 lvl.6 >>8 byte&0x03 0x03 lvl.9 #file format 3 >3 string 3 v.3, OpenPGP S2K, >>8 byte&0x70 0x00 RIJNDAEL-128 crypt, >>8 byte&0x70 0x10 SERPENT crypt, >>8 byte&0x70 0x20 TWOFISH crypt, >>8 byte&0x70 0x30 CAST-256 crypt, >>8 byte&0x70 0x40 SAFER+ crypt, >>8 byte&0x70 0x50 LOKI97 crypt, >>8 byte&0x70 0x60 3DES crypt, >>8 byte&0x70 0x70 RIJNDAEL-256 crypt, >>8 byte&0x08 0x00 SHA1 hash, >>8 byte&0x08 0x08 RIPEMD-160 hash, >>8 byte&0x04 0x00 ZLib >>8 byte&0x04 0x04 BZip2 >>8 byte&0x03 0x00 lvl.0 >>8 byte&0x03 0x01 lvl.3 >>8 byte&0x03 0x02 lvl.6 >>8 byte&0x03 0x03 lvl.9 #file format >3 >3 string >3 v.%.1s (unknown details) #------------------------------------------------------------------------------ # hitach-sh: file(1) magic for Hitachi Super-H # # Super-H COFF # 0 beshort 0x0500 Hitachi SH big-endian COFF >18 beshort&0x0002 =0x0000 object >18 beshort&0x0002 =0x0002 executable >18 beshort&0x0008 =0x0008 \b, stripped >18 beshort&0x0008 =0x0000 \b, not stripped # 0 leshort 0x0550 Hitachi SH little-endian COFF >18 leshort&0x0002 =0x0000 object >18 leshort&0x0002 =0x0002 executable >18 leshort&0x0008 =0x0008 \b, stripped >18 leshort&0x0008 =0x0000 \b, not stripped #------------------------------------------------------------------------------ # hp: file(1) magic for Hewlett Packard machines (see also "printer") # # XXX - somebody should figure out whether any byte order needs to be # applied to the "TML" stuff; I'm assuming the Apollo stuff is # big-endian as it was mostly 68K-based. # # I think the 500 series was the old stack-based machines, running a # UNIX environment atop the "SUN kernel"; dunno whether it was # big-endian or little-endian. # # Daniel Quinlan (quinlan@yggdrasil.com): hp200 machines are 68010 based; # hp300 are 68020+68881 based; hp400 are also 68k. The following basic # HP magic is useful for reference, but using "long" magic is a better # practice in order to avoid collisions. # # Guy Harris (guy@netapp.com): some additions to this list came from # HP-UX 10.0's "/usr/include/sys/unistd.h" (68030, 68040, PA-RISC 1.1, # 1.2, and 2.0). The 1.2 and 2.0 stuff isn't in the HP-UX 10.0 # "/etc/magic", though, except for the "archive file relocatable library" # stuff, and the 68030 and 68040 stuff isn't there at all - are they not # used in executables, or have they just not yet updated "/etc/magic" # completely? # # 0 beshort 200 hp200 (68010) BSD binary # 0 beshort 300 hp300 (68020+68881) BSD binary # 0 beshort 0x20c hp200/300 HP-UX binary # 0 beshort 0x20d hp400 (68030) HP-UX binary # 0 beshort 0x20e hp400 (68040?) HP-UX binary # 0 beshort 0x20b PA-RISC1.0 HP-UX binary # 0 beshort 0x210 PA-RISC1.1 HP-UX binary # 0 beshort 0x211 PA-RISC1.2 HP-UX binary # 0 beshort 0x214 PA-RISC2.0 HP-UX binary # # The "misc" stuff needs a byte order; the archives look suspiciously # like the old 177545 archives (0xff65 = 0177545). # #### Old Apollo stuff 0 beshort 0627 Apollo m68k COFF executable >18 beshort ^040000 not stripped >22 beshort >0 - version %ld 0 beshort 0624 apollo a88k COFF executable >18 beshort ^040000 not stripped >22 beshort >0 - version %ld 0 long 01203604016 TML 0123 byte-order format 0 long 01702407010 TML 1032 byte-order format 0 long 01003405017 TML 2301 byte-order format 0 long 01602007412 TML 3210 byte-order format #### PA-RISC 1.1 0 belong 0x02100106 PA-RISC1.1 relocatable object 0 belong 0x02100107 PA-RISC1.1 executable >168 belong &0x00000004 dynamically linked >(144) belong 0x054ef630 dynamically linked >96 belong >0 - not stripped 0 belong 0x02100108 PA-RISC1.1 shared executable >168 belong&0x4 0x4 dynamically linked >(144) belong 0x054ef630 dynamically linked >96 belong >0 - not stripped 0 belong 0x0210010b PA-RISC1.1 demand-load executable >168 belong&0x4 0x4 dynamically linked >(144) belong 0x054ef630 dynamically linked >96 belong >0 - not stripped 0 belong 0x0210010e PA-RISC1.1 shared library >96 belong >0 - not stripped 0 belong 0x0210010d PA-RISC1.1 dynamic load library >96 belong >0 - not stripped #### PA-RISC 2.0 0 belong 0x02140106 PA-RISC2.0 relocatable object 0 belong 0x02140107 PA-RISC2.0 executable >168 belong &0x00000004 dynamically linked >(144) belong 0x054ef630 dynamically linked >96 belong >0 - not stripped 0 belong 0x02140108 PA-RISC2.0 shared executable >168 belong &0x00000004 dynamically linked >(144) belong 0x054ef630 dynamically linked >96 belong >0 - not stripped 0 belong 0x0214010b PA-RISC2.0 demand-load executable >168 belong &0x00000004 dynamically linked >(144) belong 0x054ef630 dynamically linked >96 belong >0 - not stripped 0 belong 0x0214010e PA-RISC2.0 shared library >96 belong >0 - not stripped 0 belong 0x0214010d PA-RISC2.0 dynamic load library >96 belong >0 - not stripped #### 800 0 belong 0x020b0106 PA-RISC1.0 relocatable object 0 belong 0x020b0107 PA-RISC1.0 executable >168 belong&0x4 0x4 dynamically linked >(144) belong 0x054ef630 dynamically linked >96 belong >0 - not stripped 0 belong 0x020b0108 PA-RISC1.0 shared executable >168 belong&0x4 0x4 dynamically linked >(144) belong 0x054ef630 dynamically linked >96 belong >0 - not stripped 0 belong 0x020b010b PA-RISC1.0 demand-load executable >168 belong&0x4 0x4 dynamically linked >(144) belong 0x054ef630 dynamically linked >96 belong >0 - not stripped 0 belong 0x020b010e PA-RISC1.0 shared library >96 belong >0 - not stripped 0 belong 0x020b010d PA-RISC1.0 dynamic load library >96 belong >0 - not stripped 0 belong 0x213c6172 archive file >68 belong 0x020b0619 - PA-RISC1.0 relocatable library >68 belong 0x02100619 - PA-RISC1.1 relocatable library >68 belong 0x02110619 - PA-RISC1.2 relocatable library >68 belong 0x02140619 - PA-RISC2.0 relocatable library #### 500 0 long 0x02080106 HP s500 relocatable executable >16 long >0 - version %ld 0 long 0x02080107 HP s500 executable >16 long >0 - version %ld 0 long 0x02080108 HP s500 pure executable >16 long >0 - version %ld #### 200 0 belong 0x020c0108 HP s200 pure executable >4 beshort >0 - version %ld >8 belong &0x80000000 save fp regs >8 belong &0x40000000 dynamically linked >8 belong &0x20000000 debuggable >36 belong >0 not stripped 0 belong 0x020c0107 HP s200 executable >4 beshort >0 - version %ld >8 belong &0x80000000 save fp regs >8 belong &0x40000000 dynamically linked >8 belong &0x20000000 debuggable >36 belong >0 not stripped 0 belong 0x020c010b HP s200 demand-load executable >4 beshort >0 - version %ld >8 belong &0x80000000 save fp regs >8 belong &0x40000000 dynamically linked >8 belong &0x20000000 debuggable >36 belong >0 not stripped 0 belong 0x020c0106 HP s200 relocatable executable >4 beshort >0 - version %ld >6 beshort >0 - highwater %d >8 belong &0x80000000 save fp regs >8 belong &0x20000000 debuggable >8 belong &0x10000000 PIC 0 belong 0x020a0108 HP s200 (2.x release) pure executable >4 beshort >0 - version %ld >36 belong >0 not stripped 0 belong 0x020a0107 HP s200 (2.x release) executable >4 beshort >0 - version %ld >36 belong >0 not stripped 0 belong 0x020c010e HP s200 shared library >4 beshort >0 - version %ld >6 beshort >0 - highwater %d >36 belong >0 not stripped 0 belong 0x020c010d HP s200 dynamic load library >4 beshort >0 - version %ld >6 beshort >0 - highwater %d >36 belong >0 not stripped #### MISC 0 long 0x0000ff65 HP old archive 0 long 0x020aff65 HP s200 old archive 0 long 0x020cff65 HP s200 old archive 0 long 0x0208ff65 HP s500 old archive 0 long 0x015821a6 HP core file 0 long 0x4da7eee8 HP-WINDOWS font >8 byte >0 - version %ld 0 string Bitmapfile HP Bitmapfile 0 string IMGfile CIS compimg HP Bitmapfile # XXX - see "lif" #0 short 0x8000 lif file 0 long 0x020c010c compiled Lisp 0 string msgcat01 HP NLS message catalog, >8 long >0 %d messages # Summary: HP-48/49 calculator # Created by: phk@data.fls.dk # Modified by (1): AMAKAWA Shuhei # Modified by (2): Samuel Thibault (HP49 support) 0 string HPHP HP >4 string 48 48 binary >4 string 49 49 binary >7 byte >64 - Rev %c >8 leshort 0x2911 (ADR) >8 leshort 0x2933 (REAL) >8 leshort 0x2955 (LREAL) >8 leshort 0x2977 (COMPLX) >8 leshort 0x299d (LCOMPLX) >8 leshort 0x29bf (CHAR) >8 leshort 0x29e8 (ARRAY) >8 leshort 0x2a0a (LNKARRAY) >8 leshort 0x2a2c (STRING) >8 leshort 0x2a4e (HXS) >8 leshort 0x2a74 (LIST) >8 leshort 0x2a96 (DIR) >8 leshort 0x2ab8 (ALG) >8 leshort 0x2ada (UNIT) >8 leshort 0x2afc (TAGGED) >8 leshort 0x2b1e (GROB) >8 leshort 0x2b40 (LIB) >8 leshort 0x2b62 (BACKUP) >8 leshort 0x2b88 (LIBDATA) >8 leshort 0x2d9d (PROG) >8 leshort 0x2dcc (CODE) >8 leshort 0x2e48 (GNAME) >8 leshort 0x2e6d (LNAME) >8 leshort 0x2e92 (XLIB) 0 string %%HP: HP text >6 string T(0) - T(0) >6 string T(1) - T(1) >6 string T(2) - T(2) >6 string T(3) - T(3) >10 string A(D) A(D) >10 string A(R) A(R) >10 string A(G) A(G) >14 string F(.) F(.); >14 string F(,) F(,); # Summary: HP-38/39 calculator # Created by: Samuel Thibault 0 string HP3 >3 string 8 HP 38 >3 string 9 HP 39 >4 string Bin binary >4 string Asc ASCII >7 string A (Directory List) >7 string B (Zaplet) >7 string C (Note) >7 string D (Program) >7 string E (Variable) >7 string F (List) >7 string G (Matrix) >7 string H (Library) >7 string I (Target List) >7 string J (ASCII Vector specification) >7 string K (wildcard) # Summary: HP-38/39 calculator # Created by: Samuel Thibault 0 string HP3 >3 string 8 HP 38 >3 string 9 HP 39 >4 string Bin binary >4 string Asc ASCII >7 string A (Directory List) >7 string B (Zaplet) >7 string C (Note) >7 string D (Program) >7 string E (Variable) >7 string F (List) >7 string G (Matrix) >7 string H (Library) >7 string I (Target List) >7 string J (ASCII Vector specification) >7 string K (wildcard) # hpBSD magic numbers 0 beshort 200 hp200 (68010) BSD >2 beshort 0407 impure binary >2 beshort 0410 read-only binary >2 beshort 0413 demand paged binary 0 beshort 300 hp300 (68020+68881) BSD >2 beshort 0407 impure binary >2 beshort 0410 read-only binary >2 beshort 0413 demand paged binary # # From David Gero # HP-UX 10.20 core file format from /usr/include/sys/core.h # Unfortunately, HP-UX uses corehead blocks without specifying the order # There are four we care about: # CORE_KERNEL, which starts with the string "HP-UX" # CORE_EXEC, which contains the name of the command # CORE_PROC, which contains the signal number that caused the core dump # CORE_FORMAT, which contains the version of the core file format (== 1) # The only observed order in real core files is KERNEL, EXEC, FORMAT, PROC # but we include all 6 variations of the order of the first 3, and # assume that PROC will always be last # Order 1: KERNEL, EXEC, FORMAT, PROC 0x10 string HP-UX >0 belong 2 >>0xC belong 0x3C >>>0x4C belong 0x100 >>>>0x58 belong 0x44 >>>>>0xA0 belong 1 >>>>>>0xAC belong 4 >>>>>>>0xB0 belong 1 >>>>>>>>0xB4 belong 4 core file >>>>>>>>>0x90 string >\0 from '%s' >>>>>>>>>0xC4 belong 3 - received SIGQUIT >>>>>>>>>0xC4 belong 4 - received SIGILL >>>>>>>>>0xC4 belong 5 - received SIGTRAP >>>>>>>>>0xC4 belong 6 - received SIGABRT >>>>>>>>>0xC4 belong 7 - received SIGEMT >>>>>>>>>0xC4 belong 8 - received SIGFPE >>>>>>>>>0xC4 belong 10 - received SIGBUS >>>>>>>>>0xC4 belong 11 - received SIGSEGV >>>>>>>>>0xC4 belong 12 - received SIGSYS >>>>>>>>>0xC4 belong 33 - received SIGXCPU >>>>>>>>>0xC4 belong 34 - received SIGXFSZ # Order 2: KERNEL, FORMAT, EXEC, PROC >>>0x4C belong 1 >>>>0x58 belong 4 >>>>>0x5C belong 1 >>>>>>0x60 belong 0x100 >>>>>>>0x6C belong 0x44 >>>>>>>>0xB4 belong 4 core file >>>>>>>>>0xA4 string >\0 from '%s' >>>>>>>>>0xC4 belong 3 - received SIGQUIT >>>>>>>>>0xC4 belong 4 - received SIGILL >>>>>>>>>0xC4 belong 5 - received SIGTRAP >>>>>>>>>0xC4 belong 6 - received SIGABRT >>>>>>>>>0xC4 belong 7 - received SIGEMT >>>>>>>>>0xC4 belong 8 - received SIGFPE >>>>>>>>>0xC4 belong 10 - received SIGBUS >>>>>>>>>0xC4 belong 11 - received SIGSEGV >>>>>>>>>0xC4 belong 12 - received SIGSYS >>>>>>>>>0xC4 belong 33 - received SIGXCPU >>>>>>>>>0xC4 belong 34 - received SIGXFSZ # Order 3: FORMAT, KERNEL, EXEC, PROC 0x24 string HP-UX >0 belong 1 >>0xC belong 4 >>>0x10 belong 1 >>>>0x14 belong 2 >>>>>0x20 belong 0x3C >>>>>>0x60 belong 0x100 >>>>>>>0x6C belong 0x44 >>>>>>>>0xB4 belong 4 core file >>>>>>>>>0xA4 string >\0 from '%s' >>>>>>>>>0xC4 belong 3 - received SIGQUIT >>>>>>>>>0xC4 belong 4 - received SIGILL >>>>>>>>>0xC4 belong 5 - received SIGTRAP >>>>>>>>>0xC4 belong 6 - received SIGABRT >>>>>>>>>0xC4 belong 7 - received SIGEMT >>>>>>>>>0xC4 belong 8 - received SIGFPE >>>>>>>>>0xC4 belong 10 - received SIGBUS >>>>>>>>>0xC4 belong 11 - received SIGSEGV >>>>>>>>>0xC4 belong 12 - received SIGSYS >>>>>>>>>0xC4 belong 33 - received SIGXCPU >>>>>>>>>0xC4 belong 34 - received SIGXFSZ # Order 4: EXEC, KERNEL, FORMAT, PROC 0x64 string HP-UX >0 belong 0x100 >>0xC belong 0x44 >>>0x54 belong 2 >>>>0x60 belong 0x3C >>>>>0xA0 belong 1 >>>>>>0xAC belong 4 >>>>>>>0xB0 belong 1 >>>>>>>>0xB4 belong 4 core file >>>>>>>>>0x44 string >\0 from '%s' >>>>>>>>>0xC4 belong 3 - received SIGQUIT >>>>>>>>>0xC4 belong 4 - received SIGILL >>>>>>>>>0xC4 belong 5 - received SIGTRAP >>>>>>>>>0xC4 belong 6 - received SIGABRT >>>>>>>>>0xC4 belong 7 - received SIGEMT >>>>>>>>>0xC4 belong 8 - received SIGFPE >>>>>>>>>0xC4 belong 10 - received SIGBUS >>>>>>>>>0xC4 belong 11 - received SIGSEGV >>>>>>>>>0xC4 belong 12 - received SIGSYS >>>>>>>>>0xC4 belong 33 - received SIGXCPU >>>>>>>>>0xC4 belong 34 - received SIGXFSZ # Order 5: FORMAT, EXEC, KERNEL, PROC 0x78 string HP-UX >0 belong 1 >>0xC belong 4 >>>0x10 belong 1 >>>>0x14 belong 0x100 >>>>>0x20 belong 0x44 >>>>>>0x68 belong 2 >>>>>>>0x74 belong 0x3C >>>>>>>>0xB4 belong 4 core file >>>>>>>>>0x58 string >\0 from '%s' >>>>>>>>>0xC4 belong 3 - received SIGQUIT >>>>>>>>>0xC4 belong 4 - received SIGILL >>>>>>>>>0xC4 belong 5 - received SIGTRAP >>>>>>>>>0xC4 belong 6 - received SIGABRT >>>>>>>>>0xC4 belong 7 - received SIGEMT >>>>>>>>>0xC4 belong 8 - received SIGFPE >>>>>>>>>0xC4 belong 10 - received SIGBUS >>>>>>>>>0xC4 belong 11 - received SIGSEGV >>>>>>>>>0xC4 belong 12 - received SIGSYS >>>>>>>>>0xC4 belong 33 - received SIGXCPU >>>>>>>>>0xC4 belong 34 - received SIGXFSZ # Order 6: EXEC, FORMAT, KERNEL, PROC >0 belong 0x100 >>0xC belong 0x44 >>>0x54 belong 1 >>>>0x60 belong 4 >>>>>0x64 belong 1 >>>>>>0x68 belong 2 >>>>>>>0x74 belong 0x2C >>>>>>>>0xB4 belong 4 core file >>>>>>>>>0x44 string >\0 from '%s' >>>>>>>>>0xC4 belong 3 - received SIGQUIT >>>>>>>>>0xC4 belong 4 - received SIGILL >>>>>>>>>0xC4 belong 5 - received SIGTRAP >>>>>>>>>0xC4 belong 6 - received SIGABRT >>>>>>>>>0xC4 belong 7 - received SIGEMT >>>>>>>>>0xC4 belong 8 - received SIGFPE >>>>>>>>>0xC4 belong 10 - received SIGBUS >>>>>>>>>0xC4 belong 11 - received SIGSEGV >>>>>>>>>0xC4 belong 12 - received SIGSYS >>>>>>>>>0xC4 belong 33 - received SIGXCPU >>>>>>>>>0xC4 belong 34 - received SIGXFSZ #------------------------------------------------------------------------------ # human68k: file(1) magic for Human68k (X680x0 DOS) binary formats # Magic too short! #0 string HU Human68k #>68 string LZX LZX compressed #>>72 string >\0 (version %s) #>(8.L+74) string LZX LZX compressed #>>(8.L+78) string >\0 (version %s) #>60 belong >0 binded #>(8.L+66) string #HUPAIR hupair #>0 string HU X executable #>(8.L+74) string #LIBCV1 - linked PD LIBC ver 1 #>4 belong >0 - base address 0x%x #>28 belong >0 not stripped #>32 belong >0 with debug information #0 beshort 0x601a Human68k Z executable #0 beshort 0x6000 Human68k object file #0 belong 0xd1000000 Human68k ar binary archive #0 belong 0xd1010000 Human68k ar ascii archive #0 beshort 0x0068 Human68k lib archive #4 string LZX Human68k LZX compressed #>8 string >\0 (version %s) #>4 string LZX R executable #2 string #HUPAIR Human68k hupair R executable #------------------------------------------------------------------------------ # ibm370: file(1) magic for IBM 370 and compatibles. # # "ibm370" said that 0x15d == 0535 was "ibm 370 pure executable". # What the heck *is* "USS/370"? # AIX 4.1's "/etc/magic" has # # 0 short 0535 370 sysV executable # >12 long >0 not stripped # >22 short >0 - version %d # >30 long >0 - 5.2 format # 0 short 0530 370 sysV pure executable # >12 long >0 not stripped # >22 short >0 - version %d # >30 long >0 - 5.2 format # # instead of the "USS/370" versions of the same magic numbers. # 0 beshort 0537 370 XA sysV executable >12 belong >0 not stripped >22 beshort >0 - version %d >30 belong >0 - 5.2 format 0 beshort 0532 370 XA sysV pure executable >12 belong >0 not stripped >22 beshort >0 - version %d >30 belong >0 - 5.2 format 0 beshort 054001 370 sysV pure executable >12 belong >0 not stripped 0 beshort 055001 370 XA sysV pure executable >12 belong >0 not stripped 0 beshort 056401 370 sysV executable >12 belong >0 not stripped 0 beshort 057401 370 XA sysV executable >12 belong >0 not stripped 0 beshort 0531 SVR2 executable (Amdahl-UTS) >12 belong >0 not stripped >24 belong >0 - version %ld 0 beshort 0534 SVR2 pure executable (Amdahl-UTS) >12 belong >0 not stripped >24 belong >0 - version %ld 0 beshort 0530 SVR2 pure executable (USS/370) >12 belong >0 not stripped >24 belong >0 - version %ld 0 beshort 0535 SVR2 executable (USS/370) >12 belong >0 not stripped >24 belong >0 - version %ld #------------------------------------------------------------------------------ # ibm6000: file(1) magic for RS/6000 and the RT PC. # 0 beshort 0x01df executable (RISC System/6000 V3.1) or obj module >12 belong >0 not stripped # Breaks sun4 statically linked execs. #0 beshort 0x0103 executable (RT Version 2) or obj module #>2 byte 0x50 pure #>28 belong >0 not stripped #>6 beshort >0 - version %ld 0 beshort 0x0104 shared library 0 beshort 0x0105 ctab data 0 beshort 0xfe04 structured file 0 string 0xabcdef AIX message catalog 0 belong 0x000001f9 AIX compiled message catalog 0 string \ archive 0 string \ archive (big format) #------------------------------------------------------------------------------ # iff: file(1) magic for Interchange File Format (see also "audio" & "images") # # Daniel Quinlan (quinlan@yggdrasil.com) -- IFF was designed by Electronic # Arts for file interchange. It has also been used by Apple, SGI, and # especially Commodore-Amiga. # # IFF files begin with an 8 byte FORM header, followed by a 4 character # FORM type, which is followed by the first chunk in the FORM. 0 string FORM IFF data #>4 belong x \b, FORM is %d bytes long # audio formats >8 string AIFF \b, AIFF audio !:mime audio/x-aiff >8 string AIFC \b, AIFF-C compressed audio !:mime audio/x-aiff >8 string 8SVX \b, 8SVX 8-bit sampled sound voice !:mime audio/x-aiff >8 string 16SV \b, 16SV 16-bit sampled sound voice >8 string SAMP \b, SAMP sampled audio >8 string MAUD \b, MAUD MacroSystem audio >8 string SMUS \b, SMUS simple music >8 string CMUS \b, CMUS complex music # image formats >8 string ILBMBMHD \b, ILBM interleaved image >>20 beshort x \b, %d x >>22 beshort x %d >8 string RGBN \b, RGBN 12-bit RGB image >8 string RGB8 \b, RGB8 24-bit RGB image >8 string DEEP \b, DEEP TVPaint/XiPaint image >8 string DR2D \b, DR2D 2-D object >8 string TDDD \b, TDDD 3-D rendering >8 string LWOB \b, LWOB 3-D object >8 string LWO2 \b, LWO2 3-D object, v2 >8 string LWLO \b, LWLO 3-D layered object >8 string REAL \b, REAL Real3D rendering >8 string MC4D \b, MC4D MaxonCinema4D rendering >8 string ANIM \b, ANIM animation >8 string YAFA \b, YAFA animation >8 string SSA\ \b, SSA super smooth animation >8 string ACBM \b, ACBM continuous image >8 string FAXX \b, FAXX fax image # other formats >8 string FTXT \b, FTXT formatted text >8 string CTLG \b, CTLG message catalog >8 string PREF \b, PREF preferences >8 string DTYP \b, DTYP datatype description >8 string PTCH \b, PTCH binary patch >8 string AMFF \b, AMFF AmigaMetaFile format >8 string WZRD \b, WZRD StormWIZARD resource >8 string DOC\ \b, DOC desktop publishing document # These go at the end of the iff rules # # I don't see why these might collide with anything else. # # Interactive Fiction related formats # >8 string IFRS \b, Blorb Interactive Fiction >>24 string Exec with executable chunk >8 string IFZS \b, Z-machine or Glulx saved game file (Quetzal) #------------------------------------------------------------------------------ # images: file(1) magic for image formats (see also "iff", and "c-lang" for # XPM bitmaps) # # originally from jef@helios.ee.lbl.gov (Jef Poskanzer), # additions by janl@ifi.uio.no as well as others. Jan also suggested # merging several one- and two-line files into here. # # little magic: PCX (first byte is 0x0a) # Targa - matches `povray', `ppmtotga' and `xv' outputs # by Philippe De Muyter # at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11 # at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise # at 3, leshort Index is 0 for povray, ppmtotga and xv outputs # `xv' recognizes only a subset of the following (RGB with pixelsize = 24) # `tgatoppm' recognizes a superset (Index may be anything) 1 belong&0xfff7ffff 0x01010000 Targa image data - Map >2 byte&8 8 - RLE >12 leshort >0 %hd x >14 leshort >0 %hd 1 belong&0xfff7ffff 0x00020000 Targa image data - RGB >2 byte&8 8 - RLE >12 leshort >0 %hd x >14 leshort >0 %hd 1 belong&0xfff7ffff 0x00030000 Targa image data - Mono >2 byte&8 8 - RLE >12 leshort >0 %hd x >14 leshort >0 %hd # PBMPLUS images # The next byte following the magic is always whitespace. 0 search/1 P1 Netpbm PBM image text !:mime image/x-portable-bitmap 0 search/1 P2 Netpbm PGM image text !:mime image/x-portable-greymap 0 search/1 P3 Netpbm PPM image text !:mime image/x-portable-pixmap 0 string P4 Netpbm PBM "rawbits" image data !:mime image/x-portable-bitmap 0 string P5 Netpbm PGM "rawbits" image data !:mime image/x-portable-greymap 0 string P6 Netpbm PPM "rawbits" image data !:mime image/x-portable-pixmap 0 string P7 Netpbm PAM image file !:mime image/x-portable-pixmap # From: bryanh@giraffe-data.com (Bryan Henderson) 0 string \117\072 Solitaire Image Recorder format >4 string \013 MGI Type 11 >4 string \021 MGI Type 17 0 string .MDA MicroDesign data >21 byte 48 version 2 >21 byte 51 version 3 0 string .MDP MicroDesign page data >21 byte 48 version 2 >21 byte 51 version 3 # NIFF (Navy Interchange File Format, a modification of TIFF) images # [GRR: this *must* go before TIFF] 0 string IIN1 NIFF image data !:mime image/x-niff # Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com) # The second word of TIFF files is the TIFF version number, 42, which has # never changed. The TIFF specification recommends testing for it. 0 string MM\x00\x2a TIFF image data, big-endian !:mime image/tiff 0 string II\x2a\x00 TIFF image data, little-endian !:mime image/tiff # PNG [Portable Network Graphics, or "PNG's Not GIF"] images # (Greg Roelofs, newt@uchicago.edu) # (Albert Cahalan, acahalan@cs.uml.edu) # # 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ... # 0 string \x89PNG\x0d\x0a\x1a\x0a PNG image !:mime image/png >16 belong x \b, %ld x >20 belong x %ld, >24 byte x %d-bit >25 byte 0 grayscale, >25 byte 2 \b/color RGB, >25 byte 3 colormap, >25 byte 4 gray+alpha, >25 byte 6 \b/color RGBA, #>26 byte 0 deflate/32K, >28 byte 0 non-interlaced >28 byte 1 interlaced # possible GIF replacements; none yet released! # (Greg Roelofs, newt@uchicago.edu) # # GRR 950115: this was mine ("Zip GIF"): 0 string GIF94z ZIF image (GIF+deflate alpha) !:mime image/x-unknown # # GRR 950115: this is Jeremy Wohl's Free Graphics Format (better): # 0 string FGF95a FGF image (GIF+deflate beta) !:mime image/x-unknown # # GRR 950115: this is Thomas Boutell's Portable Bitmap Format proposal # (best; not yet implemented): # 0 string PBF PBF image (deflate compression) !:mime image/x-unknown # GIF 0 string GIF8 GIF image data !:mime image/gif !:apple 8BIMGIFf >4 string 7a \b, version 8%s, >4 string 9a \b, version 8%s, >6 leshort >0 %hd x >8 leshort >0 %hd #>10 byte &0x80 color mapped, #>10 byte&0x07 =0x00 2 colors #>10 byte&0x07 =0x01 4 colors #>10 byte&0x07 =0x02 8 colors #>10 byte&0x07 =0x03 16 colors #>10 byte&0x07 =0x04 32 colors #>10 byte&0x07 =0x05 64 colors #>10 byte&0x07 =0x06 128 colors #>10 byte&0x07 =0x07 256 colors # ITC (CMU WM) raster files. It is essentially a byte-reversed Sun raster, # 1 plane, no encoding. 0 string \361\0\100\273 CMU window manager raster image data >4 lelong >0 %d x >8 lelong >0 %d, >12 lelong >0 %d-bit # Magick Image File Format 0 string id=ImageMagick MIFF image data # Artisan 0 long 1123028772 Artisan image data >4 long 1 \b, rectangular 24-bit >4 long 2 \b, rectangular 8-bit with colormap >4 long 3 \b, rectangular 32-bit (24-bit with matte) # FIG (Facility for Interactive Generation of figures), an object-based format 0 search/1 #FIG FIG image text >5 string x \b, version %.3s # PHIGS 0 string ARF_BEGARF PHIGS clear text archive 0 string @(#)SunPHIGS SunPHIGS # version number follows, in the form m.n >40 string SunBin binary >32 string archive archive # GKS (Graphics Kernel System) 0 string GKSM GKS Metafile >24 string SunGKS \b, SunGKS # CGM image files 0 string BEGMF clear text Computer Graphics Metafile # MGR bitmaps (Michael Haardt, u31b3hs@pool.informatik.rwth-aachen.de) 0 string yz MGR bitmap, modern format, 8-bit aligned 0 string zz MGR bitmap, old format, 1-bit deep, 16-bit aligned 0 string xz MGR bitmap, old format, 1-bit deep, 32-bit aligned 0 string yx MGR bitmap, modern format, squeezed # Fuzzy Bitmap (FBM) images 0 string %bitmap\0 FBM image data >30 long 0x31 \b, mono >30 long 0x33 \b, color # facsimile data 1 string PC\ Research,\ Inc group 3 fax data >29 byte 0 \b, normal resolution (204x98 DPI) >29 byte 1 \b, fine resolution (204x196 DPI) # From: Herbert Rosmanith 0 string Sfff structured fax file # PC bitmaps (OS/2, Windows BMP files) (Greg Roelofs, newt@uchicago.edu) 0 string BM >14 leshort 12 PC bitmap, OS/2 1.x format !:mime image/x-ms-bmp >>18 leshort x \b, %d x >>20 leshort x %d >14 leshort 64 PC bitmap, OS/2 2.x format !:mime image/x-ms-bmp >>18 leshort x \b, %d x >>20 leshort x %d >14 leshort 40 PC bitmap, Windows 3.x format !:mime image/x-ms-bmp >>18 lelong x \b, %d x >>22 lelong x %d x >>28 leshort x %d >14 leshort 128 PC bitmap, Windows NT/2000 format !:mime image/x-ms-bmp >>18 lelong x \b, %d x >>22 lelong x %d x >>28 leshort x %d # Too simple - MPi #0 string IC PC icon data #0 string PI PC pointer image data #0 string CI PC color icon data #0 string CP PC color pointer image data # Conflicts with other entries [BABYL] #0 string BA PC bitmap array data # XPM icons (Greg Roelofs, newt@uchicago.edu) # note possible collision with C/REXX entry in c-lang; currently commented out 0 search/1 /*\ XPM\ */ X pixmap image text # Utah Raster Toolkit RLE images (janl@ifi.uio.no) 0 leshort 0xcc52 RLE image data, >6 leshort x %d x >8 leshort x %d >2 leshort >0 \b, lower left corner: %d >4 leshort >0 \b, lower right corner: %d >10 byte&0x1 =0x1 \b, clear first >10 byte&0x2 =0x2 \b, no background >10 byte&0x4 =0x4 \b, alpha channel >10 byte&0x8 =0x8 \b, comment >11 byte >0 \b, %d color channels >12 byte >0 \b, %d bits per pixel >13 byte >0 \b, %d color map channels # image file format (Robert Potter, potter@cs.rochester.edu) 0 string Imagefile\ version- iff image data # this adds the whole header (inc. version number), informative but longish >10 string >\0 %s # Sun raster images, from Daniel Quinlan (quinlan@yggdrasil.com) 0 belong 0x59a66a95 Sun raster image data >4 belong >0 \b, %d x >8 belong >0 %d, >12 belong >0 %d-bit, #>16 belong >0 %d bytes long, >20 belong 0 old format, #>20 belong 1 standard, >20 belong 2 compressed, >20 belong 3 RGB, >20 belong 4 TIFF, >20 belong 5 IFF, >20 belong 0xffff reserved for testing, >24 belong 0 no colormap >24 belong 1 RGB colormap >24 belong 2 raw colormap #>28 belong >0 colormap is %d bytes long # SGI image file format, from Daniel Quinlan (quinlan@yggdrasil.com) # # See # http://reality.sgi.com/grafica/sgiimage.html # 0 beshort 474 SGI image data #>2 byte 0 \b, verbatim >2 byte 1 \b, RLE #>3 byte 1 \b, normal precision >3 byte 2 \b, high precision >4 beshort x \b, %d-D >6 beshort x \b, %d x >8 beshort x %d >10 beshort x \b, %d channel >10 beshort !1 \bs >80 string >0 \b, "%s" 0 string IT01 FIT image data >4 belong x \b, %d x >8 belong x %d x >12 belong x %d # 0 string IT02 FIT image data >4 belong x \b, %d x >8 belong x %d x >12 belong x %d # 2048 string PCD_IPI Kodak Photo CD image pack file >0xe02 byte&0x03 0x00 , landscape mode >0xe02 byte&0x03 0x01 , portrait mode >0xe02 byte&0x03 0x02 , landscape mode >0xe02 byte&0x03 0x03 , portrait mode 0 string PCD_OPA Kodak Photo CD overview pack file # FITS format. Jeff Uphoff # FITS is the Flexible Image Transport System, the de facto standard for # data and image transfer, storage, etc., for the astronomical community. # (FITS floating point formats are big-endian.) 0 string SIMPLE\ \ = FITS image data >109 string 8 \b, 8-bit, character or unsigned binary integer >108 string 16 \b, 16-bit, two's complement binary integer >107 string \ 32 \b, 32-bit, two's complement binary integer >107 string -32 \b, 32-bit, floating point, single precision >107 string -64 \b, 64-bit, floating point, double precision # other images 0 string This\ is\ a\ BitMap\ file Lisp Machine bit-array-file # From SunOS 5.5.1 "/etc/magic" - appeared right before Sun raster image # stuff. # 0 beshort 0x1010 PEX Binary Archive # DICOM medical imaging data 128 string DICM DICOM medical imaging data !:mime application/dicom # XWD - X Window Dump file. # As described in /usr/X11R6/include/X11/XWDFile.h # used by the xwd program. # Bradford Castalia, idaeim, 1/01 4 belong 7 XWD X Window Dump image data >100 string >\0 \b, "%s" >16 belong x \b, %dx >20 belong x \b%dx >12 belong x \b%d # PDS - Planetary Data System # These files use Parameter Value Language in the header section. # Unfortunately, there is no certain magic, but the following # strings have been found to be most likely. 0 string NJPL1I00 PDS (JPL) image data 2 string NJPL1I PDS (JPL) image data 0 string CCSD3ZF PDS (CCSD) image data 2 string CCSD3Z PDS (CCSD) image data 0 string PDS_ PDS image data 0 string LBLSIZE= PDS (VICAR) image data # pM8x: ATARI STAD compressed bitmap format # # from Oskar Schirmer Feb 2, 2001 # p M 8 5/6 xx yy zz data... # Atari ST STAD bitmap is always 640x400, bytewise runlength compressed. # bytes either run horizontally (pM85) or vertically (pM86). yy is the # most frequent byte, xx and zz are runlength escape codes, where xx is # used for runs of yy. # 0 string pM85 Atari ST STAD bitmap image data (hor) >5 byte 0x00 (white background) >5 byte 0xFF (black background) 0 string pM86 Atari ST STAD bitmap image data (vert) >5 byte 0x00 (white background) >5 byte 0xFF (black background) # Gürkan Sengün , www.linuks.mine.nu # http://www.atarimax.com/jindroush.atari.org/afmtatr.html 0 leshort 0x0296 Atari ATR image # XXX: # This is bad magic 0x5249 == 'RI' conflicts with RIFF and other # magic. # SGI RICE image file #0 beshort 0x5249 RICE image #>2 beshort x v%d #>4 beshort x (%d x #>6 beshort x %d) #>8 beshort 0 8 bit #>8 beshort 1 10 bit #>8 beshort 2 12 bit #>8 beshort 3 13 bit #>10 beshort 0 4:2:2 #>10 beshort 1 4:2:2:4 #>10 beshort 2 4:4:4 #>10 beshort 3 4:4:4:4 #>12 beshort 1 RGB #>12 beshort 2 CCIR601 #>12 beshort 3 RP175 #>12 beshort 4 YUV #------------------------------------------------------------------------------ # # Marco Schmidt (marcoschmidt@users.sourceforge.net) -- an image file format # for the EPOC operating system, which is used with PDAs like those from Psion # # see http://huizen.dds.nl/~frodol/psiconv/html/Index.html for a description # of various EPOC file formats 0 string \x37\x00\x00\x10\x42\x00\x00\x10\x00\x00\x00\x00\x39\x64\x39\x47 EPOC MBM image file # PCX image files # From: Dan Fandrich 0 beshort 0x0a00 PCX ver. 2.5 image data 0 beshort 0x0a02 PCX ver. 2.8 image data, with palette 0 beshort 0x0a03 PCX ver. 2.8 image data, without palette 0 beshort 0x0a04 PCX for Windows image data 0 beshort 0x0a05 PCX ver. 3.0 image data >4 leshort x bounding box [%hd, >6 leshort x %hd] - >8 leshort x [%hd, >10 leshort x %hd], >65 byte >1 %d planes each of >3 byte x %hhd-bit >68 byte 0 image, >68 byte 1 colour, >68 byte 2 grayscale, >68 byte >2 image, >68 byte <0 image, >12 leshort >0 %hd x >>14 leshort x %hd dpi, >2 byte 0 uncompressed >2 byte 1 RLE compressed # Adobe Photoshop 0 string 8BPS Adobe Photoshop Image !:mime image/vnd.adobe.photoshop # XV thumbnail indicator (ThMO) 0 string P7\ 332 XV thumbnail image data # NITF is defined by United States MIL-STD-2500A 0 string NITF National Imagery Transmission Format >25 string >\0 dated %.14s # GEM Image: Version 1, Headerlen 8 (Wolfram Kleff) 0 belong 0x00010008 GEM Image data >12 beshort x %d x >14 beshort x %d, >4 beshort x %d planes, >8 beshort x %d x >10 beshort x %d pixelsize # GEM Metafile (Wolfram Kleff) 0 lelong 0x0018FFFF GEM Metafile data >4 leshort x version %d # # SMJPEG. A custom Motion JPEG format used by Loki Entertainment # Software Torbjorn Andersson . # 0 string \0\nSMJPEG SMJPEG >8 belong x %d.x data # According to the specification you could find any number of _TXT # headers here, but I can't think of any way of handling that. None of # the SMJPEG files I tried it on used this feature. Even if such a # file is encountered the output should still be reasonable. >16 string _SND \b, >>24 beshort >0 %d Hz >>26 byte 8 8-bit >>26 byte 16 16-bit >>28 string NONE uncompressed # >>28 string APCM ADPCM compressed >>27 byte 1 mono >>28 byte 2 stereo # Help! Isn't there any way to avoid writing this part twice? >>32 string _VID \b, # >>>48 string JFIF JPEG >>>40 belong >0 %d frames >>>44 beshort >0 (%d x >>>46 beshort >0 %d) >16 string _VID \b, # >>32 string JFIF JPEG >>24 belong >0 %d frames >>28 beshort >0 (%d x >>30 beshort >0 %d) 0 string Paint\ Shop\ Pro\ Image\ File Paint Shop Pro Image File # "thumbnail file" (icon) # descended from "xv", but in use by other applications as well (Wolfram Kleff) 0 string P7\ 332 XV "thumbnail file" (icon) data # taken from fkiss: ( ?) 0 string KiSS KISS/GS >4 byte 16 color >>5 byte x %d bit >>8 leshort x %d colors >>10 leshort x %d groups >4 byte 32 cell >>5 byte x %d bit >>8 leshort x %d x >>10 leshort x %d >>12 leshort x +%d >>14 leshort x +%d # Webshots (www.webshots.com), by John Harrison 0 string C\253\221g\230\0\0\0 Webshots Desktop .wbz file # Hercules DASD image files # From Jan Jaeger 0 string CKD_P370 Hercules CKD DASD image file >8 long x \b, %d heads per cylinder >12 long x \b, track size %d bytes >16 byte x \b, device type 33%2.2X 0 string CKD_C370 Hercules compressed CKD DASD image file >8 long x \b, %d heads per cylinder >12 long x \b, track size %d bytes >16 byte x \b, device type 33%2.2X 0 string CKD_S370 Hercules CKD DASD shadow file >8 long x \b, %d heads per cylinder >12 long x \b, track size %d bytes >16 byte x \b, device type 33%2.2X # Squeak images and programs - etoffi@softhome.net 0 string \146\031\0\0 Squeak image data 0 search/1 'From\040Squeak Squeak program text # partimage: file(1) magic for PartImage files (experimental, incomplete) # Author: Hans-Joachim Baader 0 string PaRtImAgE-VoLuMe PartImage >0x0020 string 0.6.1 file version %s >>0x0060 lelong >-1 volume %ld #>>0x0064 8 byte identifier #>>0x007c reserved >>0x0200 string >\0 type %s >>0x1400 string >\0 device %s, >>0x1600 string >\0 original filename %s, # Some fields omitted >>0x2744 lelong 0 not compressed >>0x2744 lelong 1 gzip compressed >>0x2744 lelong 2 bzip2 compressed >>0x2744 lelong >2 compressed with unknown algorithm >0x0020 string >0.6.1 file version %s >0x0020 string <0.6.1 file version %s # DCX is multi-page PCX, using a simple header of up to 1024 # offsets for the respective PCX components. # From: Joerg Wunsch 0 lelong 987654321 DCX multi-page PCX image data # Simon Walton # Kodak Cineon format for scanned negatives # http://www.kodak.com/US/en/motion/support/dlad/ 0 lelong 0xd75f2a80 Cineon image data >200 belong >0 \b, %ld x >204 belong >0 %ld # Bio-Rad .PIC is an image format used by microscope control systems # and related image processing software used by biologists. # From: Vebjorn Ljosa 54 leshort 12345 Bio-Rad .PIC Image File >0 leshort >0 %hd x >2 leshort >0 %hd, >4 leshort =1 1 image in file >4 leshort >1 %hd images in file # From Jan "Yenya" Kasprzak # The description of *.mrw format can be found at # http://www.dalibor.cz/minolta/raw_file_format.htm 0 string \000MRM Minolta Dimage camera raw image data # Summary: DjVu image / document # Extension: .djvu # Reference: http://djvu.org/docs/DjVu3Spec.djvu # Submitted by: Stephane Loeuillet # Modified by (1): Abel Cheung 0 string AT&TFORM !:mime image/vnd.djvu >12 string DJVM DjVu multiple page document >12 string DJVU DjVu image or single page document >12 string DJVI DjVu shared document >12 string THUM DjVu page thumbnails # From Marc Espie 0 lelong 20000630 OpenEXR image data # From: Tom Hilinski # http://www.unidata.ucar.edu/packages/netcdf/ 0 string CDF\001 NetCDF Data Format data #----------------------------------------------------------------------- # Hierarchical Data Format, used to facilitate scientific data exchange # specifications at http://hdf.ncsa.uiuc.edu/ 0 belong 0x0e031301 Hierarchical Data Format (version 4) data !:mime application/x-hdf 0 string \211HDF\r\n\032 Hierarchical Data Format (version 5) data !:mime application/x-hdf # From: Tobias Burnus # Xara (for a while: Corel Xara) is a graphic package, see # http://www.xara.com/ for Windows and as GPL application for Linux 0 string XARA\243\243 Xara graphics file # http://www.cartesianinc.com/Tech/ 0 string CPC\262 Cartesian Perceptual Compression image !:mime image/x-cpi # From Albert Cahalan # puredigital used it for the CVS disposable camcorder #8 lelong 4 ZBM bitmap image data #>4 leshort x %u x #>6 leshort x %u # From Albert Cahalan # uncompressed 5:6:5 HighColor image for OLPC XO firmware icons 0 string C565 OLPC firmware icon image data >4 leshort x %u x >6 leshort x %u # Applied Images - Image files from Cytovision # Gustavo Junior Alves 0 string \xce\xda\xde\xfa Cytovision Metaphases file 0 string \xed\xad\xef\xac Cytovision Karyotype file 0 string \x0b\x00\x03\x00 Cytovision FISH Probe file 0 string \xed\xfe\xda\xbe Cytovision FLEX file 0 string \xed\xab\xed\xfe Cytovision FLEX file 0 string \xad\xfd\xea\xad Cytovision RATS file # Wavelet Scalar Quantization format used in gray-scale fingerprint images # From Tano M Fotang 0 string \xff\xa0\xff\xa8\x00 Wavelet Scalar Quantization image data # JPEG 2000 Code Stream Bitmap # From Petr Splichal 0 string \xFF\x4F\xFF\x51\x00 JPEG-2000 Code Stream Bitmap data #------------------------------------------------------------------------------ # inform: file(1) magic for Inform interactive fiction language # URL: http://www.inform-fiction.org/ # From: Reuben Thomas 0 search/cB/100 constant\ story Inform source text #------------------------------------------------------------------------------ # intel: file(1) magic for x86 Unix # # Various flavors of x86 UNIX executable/object (other than Xenix, which # is in "microsoft"). DOS is in "msdos"; the ambitious soul can do # Windows as well. # # Windows NT belongs elsewhere, as you need x86 and MIPS and Alpha and # whatever comes next (HP-PA Hummingbird?). OS/2 may also go elsewhere # as well, if, as, and when IBM makes it portable. # # The `versions' should be un-commented if they work for you. # (Was the problem just one of endianness?) # 0 leshort 0502 basic-16 executable >12 lelong >0 not stripped #>22 leshort >0 - version %ld 0 leshort 0503 basic-16 executable (TV) >12 lelong >0 not stripped #>22 leshort >0 - version %ld 0 leshort 0510 x86 executable >12 lelong >0 not stripped 0 leshort 0511 x86 executable (TV) >12 lelong >0 not stripped 0 leshort =0512 iAPX 286 executable small model (COFF) >12 lelong >0 not stripped #>22 leshort >0 - version %ld 0 leshort =0522 iAPX 286 executable large model (COFF) >12 lelong >0 not stripped #>22 leshort >0 - version %ld # SGI labeled the next entry as "iAPX 386 executable" --Dan Quinlan 0 leshort =0514 80386 COFF executable >12 lelong >0 not stripped >22 leshort >0 - version %ld # rom: file(1) magic for BIOS ROM Extensions found in intel machines # mapped into memory between 0xC0000 and 0xFFFFF # From Gürkan Sengün , www.linuks.mine.nu 0 beshort 0x55AA BIOS (ia32) ROM Ext. >5 string USB USB >7 string LDR UNDI image >30 string IBM IBM comp. Video >26 string Adaptec Adaptec >28 string Adaptec Adaptec >42 string PROMISE Promise >2 byte x (%d*512) #------------------------------------------------------------------------------ # interleaf: file(1) magic for InterLeaf TPS: # 0 string =\210OPS Interleaf saved data 0 string =5 string ,\ Version\ = \b, version >>17 string >\0 %.3s #------------------------------------------------------------------------------ # island: file(1) magic for IslandWite/IslandDraw, from SunOS 5.5.1 # "/etc/magic": # From: guy@netapp.com (Guy Harris) # 4 string pgscriptver IslandWrite document 13 string DrawFile IslandDraw document #------------------------------------------------------------------------------ # ispell: file(1) magic for ispell # # Ispell 3.0 has a magic of 0x9601 and ispell 3.1 has 0x9602. This magic # will match 0x9600 through 0x9603 in *both* little endian and big endian. # (No other current magic entries collide.) # # Updated by Daniel Quinlan (quinlan@yggdrasil.com) # 0 leshort&0xFFFC 0x9600 little endian ispell >0 byte 0 hash file (?), >0 byte 1 3.0 hash file, >0 byte 2 3.1 hash file, >0 byte 3 hash file (?), >2 leshort 0x00 8-bit, no capitalization, 26 flags >2 leshort 0x01 7-bit, no capitalization, 26 flags >2 leshort 0x02 8-bit, capitalization, 26 flags >2 leshort 0x03 7-bit, capitalization, 26 flags >2 leshort 0x04 8-bit, no capitalization, 52 flags >2 leshort 0x05 7-bit, no capitalization, 52 flags >2 leshort 0x06 8-bit, capitalization, 52 flags >2 leshort 0x07 7-bit, capitalization, 52 flags >2 leshort 0x08 8-bit, no capitalization, 128 flags >2 leshort 0x09 7-bit, no capitalization, 128 flags >2 leshort 0x0A 8-bit, capitalization, 128 flags >2 leshort 0x0B 7-bit, capitalization, 128 flags >2 leshort 0x0C 8-bit, no capitalization, 256 flags >2 leshort 0x0D 7-bit, no capitalization, 256 flags >2 leshort 0x0E 8-bit, capitalization, 256 flags >2 leshort 0x0F 7-bit, capitalization, 256 flags >4 leshort >0 and %d string characters 0 beshort&0xFFFC 0x9600 big endian ispell >1 byte 0 hash file (?), >1 byte 1 3.0 hash file, >1 byte 2 3.1 hash file, >1 byte 3 hash file (?), >2 beshort 0x00 8-bit, no capitalization, 26 flags >2 beshort 0x01 7-bit, no capitalization, 26 flags >2 beshort 0x02 8-bit, capitalization, 26 flags >2 beshort 0x03 7-bit, capitalization, 26 flags >2 beshort 0x04 8-bit, no capitalization, 52 flags >2 beshort 0x05 7-bit, no capitalization, 52 flags >2 beshort 0x06 8-bit, capitalization, 52 flags >2 beshort 0x07 7-bit, capitalization, 52 flags >2 beshort 0x08 8-bit, no capitalization, 128 flags >2 beshort 0x09 7-bit, no capitalization, 128 flags >2 beshort 0x0A 8-bit, capitalization, 128 flags >2 beshort 0x0B 7-bit, capitalization, 128 flags >2 beshort 0x0C 8-bit, no capitalization, 256 flags >2 beshort 0x0D 7-bit, no capitalization, 256 flags >2 beshort 0x0E 8-bit, capitalization, 256 flags >2 beshort 0x0F 7-bit, capitalization, 256 flags >4 beshort >0 and %d string characters # ispell 4.0 hash files kromJx # Ispell 4.0 0 string ISPL ispell >4 long x hash file version %d, >8 long x lexletters %d, >12 long x lexsize %d, >16 long x hashsize %d, >20 long x stblsize %d #------------------------------------------------------------ # Java ByteCode and Mach-O binaries (e.g., Mac OS X) use the # same magic number, 0xcafebabe, so they are both handled # in the entry called "cafebabe". #------------------------------------------------------------ # Java serialization # From Martin Pool (m.pool@pharos.com.au) 0 beshort 0xaced Java serialization data >2 beshort >0x0004 \b, version %d 0 belong 0xfeedfeed Java KeyStore !:mime application/x-java-keystore 0 belong 0xcececece Java JCE KeyStore !:mime application/x-java-jce-keystore # Dalvik .dex format. http://retrodev.com/android/dexformat.html # From "Mike Fleming" 0 string dex\n >0 regex dex\n[0-9][0-9][0-9]\0 Dalvik dex file >4 string >000 version %s 0 string dey\n >0 regex dey\n[0-9][0-9][0-9]\0 Dalvik dex file (optimized for host) >4 string >000 version %s #------------------------------------------------------------------------------ # JPEG images # SunOS 5.5.1 had # # 0 string \377\330\377\340 JPEG file # 0 string \377\330\377\356 JPG file # # both of which turn into "JPEG image data" here. # 0 beshort 0xffd8 JPEG image data !:mime image/jpeg !:apple 8BIMJPEG !:strength +1 >6 string JFIF \b, JFIF standard # The following added by Erik Rossen 1999-09-06 # in a vain attempt to add image size reporting for JFIF. Note that these # tests are not fool-proof since some perfectly valid JPEGs are currently # impossible to specify in magic(4) format. # First, a little JFIF version info: >>11 byte x \b %d. >>12 byte x \b%02d # Next, the resolution or aspect ratio of the image: #>>13 byte 0 \b, aspect ratio #>>13 byte 1 \b, resolution (DPI) #>>13 byte 2 \b, resolution (DPCM) #>>4 beshort x \b, segment length %d # Next, show thumbnail info, if it exists: >>18 byte !0 \b, thumbnail %dx >>>19 byte x \b%d # EXIF moved down here to avoid reporting a bogus version number, # and EXIF version number printing added. # - Patrik R=E5dman >6 string Exif \b, EXIF standard # Look for EXIF IFD offset in IFD 0, and then look for EXIF version tag in EXIF IFD. # All possible combinations of entries have to be enumerated, since no looping # is possible. And both endians are possible... # The combinations included below are from real-world JPEGs. # Little-endian >>12 string II # IFD 0 Entry #5: >>>70 leshort 0x8769 # EXIF IFD Entry #1: >>>>(78.l+14) leshort 0x9000 >>>>>(78.l+23) byte x %c >>>>>(78.l+24) byte x \b.%c >>>>>(78.l+25) byte !0x30 \b%c # IFD 0 Entry #9: >>>118 leshort 0x8769 # EXIF IFD Entry #3: >>>>(126.l+38) leshort 0x9000 >>>>>(126.l+47) byte x %c >>>>>(126.l+48) byte x \b.%c >>>>>(126.l+49) byte !0x30 \b%c # IFD 0 Entry #10 >>>130 leshort 0x8769 # EXIF IFD Entry #3: >>>>(138.l+38) leshort 0x9000 >>>>>(138.l+47) byte x %c >>>>>(138.l+48) byte x \b.%c >>>>>(138.l+49) byte !0x30 \b%c # EXIF IFD Entry #4: >>>>(138.l+50) leshort 0x9000 >>>>>(138.l+59) byte x %c >>>>>(138.l+60) byte x \b.%c >>>>>(138.l+61) byte !0x30 \b%c # EXIF IFD Entry #5: >>>>(138.l+62) leshort 0x9000 >>>>>(138.l+71) byte x %c >>>>>(138.l+72) byte x \b.%c >>>>>(138.l+73) byte !0x30 \b%c # IFD 0 Entry #11 >>>142 leshort 0x8769 # EXIF IFD Entry #3: >>>>(150.l+38) leshort 0x9000 >>>>>(150.l+47) byte x %c >>>>>(150.l+48) byte x \b.%c >>>>>(150.l+49) byte !0x30 \b%c # EXIF IFD Entry #4: >>>>(150.l+50) leshort 0x9000 >>>>>(150.l+59) byte x %c >>>>>(150.l+60) byte x \b.%c >>>>>(150.l+61) byte !0x30 \b%c # EXIF IFD Entry #5: >>>>(150.l+62) leshort 0x9000 >>>>>(150.l+71) byte x %c >>>>>(150.l+72) byte x \b.%c >>>>>(150.l+73) byte !0x30 \b%c # Big-endian >>12 string MM # IFD 0 Entry #9: >>>118 beshort 0x8769 # EXIF IFD Entry #1: >>>>(126.L+14) beshort 0x9000 >>>>>(126.L+23) byte x %c >>>>>(126.L+24) byte x \b.%c >>>>>(126.L+25) byte !0x30 \b%c # EXIF IFD Entry #3: >>>>(126.L+38) beshort 0x9000 >>>>>(126.L+47) byte x %c >>>>>(126.L+48) byte x \b.%c >>>>>(126.L+49) byte !0x30 \b%c # IFD 0 Entry #10 >>>130 beshort 0x8769 # EXIF IFD Entry #3: >>>>(138.L+38) beshort 0x9000 >>>>>(138.L+47) byte x %c >>>>>(138.L+48) byte x \b.%c >>>>>(138.L+49) byte !0x30 \b%c # EXIF IFD Entry #5: >>>>(138.L+62) beshort 0x9000 >>>>>(138.L+71) byte x %c >>>>>(138.L+72) byte x \b.%c >>>>>(138.L+73) byte !0x30 \b%c # IFD 0 Entry #11 >>>142 beshort 0x8769 # EXIF IFD Entry #4: >>>>(150.L+50) beshort 0x9000 >>>>>(150.L+59) byte x %c >>>>>(150.L+60) byte x \b.%c >>>>>(150.L+61) byte !0x30 \b%c # Here things get sticky. We can do ONE MORE marker segment with # indirect addressing, and that's all. It would be great if we could # do pointer arithemetic like in an assembler language. Christos? # And if there was some sort of looping construct to do searches, plus a few # named accumulators, it would be even more effective... # At least we can show a comment if no other segments got inserted before: >(4.S+5) byte 0xFE >>(4.S+8) string >\0 \b, comment: "%s" # FIXME: When we can do non-byte counted strings, we can use that to get # the string's count, and fix Debian bug #283760 #>(4.S+5) byte 0xFE \b, comment #>>(4.S+6) beshort x \b length=%d #>>(4.S+8) string >\0 \b, "%s" # Or, we can show the encoding type (I've included only the three most common) # and image dimensions if we are lucky and the SOFn (image segment) is here: >(4.S+5) byte 0xC0 \b, baseline >>(4.S+6) byte x \b, precision %d >>(4.S+7) beshort x \b, %dx >>(4.S+9) beshort x \b%d >(4.S+5) byte 0xC1 \b, extended sequential >>(4.S+6) byte x \b, precision %d >>(4.S+7) beshort x \b, %dx >>(4.S+9) beshort x \b%d >(4.S+5) byte 0xC2 \b, progressive >>(4.S+6) byte x \b, precision %d >>(4.S+7) beshort x \b, %dx >>(4.S+9) beshort x \b%d # I've commented-out quantisation table reporting. I doubt anyone cares yet. #>(4.S+5) byte 0xDB \b, quantisation table #>>(4.S+6) beshort x \b length=%d #>14 beshort x \b, %d x #>16 beshort x \b %d # HSI is Handmade Software's proprietary JPEG encoding scheme 0 string hsi1 JPEG image data, HSI proprietary # From: David Santinoli 0 string \x00\x00\x00\x0C\x6A\x50\x20\x20\x0D\x0A\x87\x0A JPEG 2000 image data # Type: JPEG 2000 codesream # From: Mathieu Malaterre 0 belong 0xff4fff51 JPEG 2000 codestream 45 beshort 0xff52 #------------------------------------------------------------------------------ # karma: file(1) magic for Karma data files # # From 0 string KarmaRHD Version Karma Data Structure Version >16 belong x %lu #------------------------------------------------------------------------------ # kde: file(1) magic for KDE 0 string [KDE\ Desktop\ Entry] KDE desktop entry !:mime application/x-kdelnk 0 string #\ KDE\ Config\ File KDE config file !:mime application/x-kdelnk 0 string #\ xmcd xmcd database file for kscd !:mime text/x-xmcd #------------------------------------------------------------------------------ # Type: Google KML, formerly Keyhole Markup Language # Future development of this format has been handed # over to the Open Geospatial Consortium. # http://www.opengeospatial.org/standards/kml/ # From: Asbjoern Sloth Toennesen 0 string \20 search/400 \ xmlns= >>&0 regex ['"]http://earth.google.com/kml Google KML document !:mime application/vnd.google-earth.kml+xml >>>&1 string 2.0' \b, version 2.0 >>>&1 string 2.1' \b, version 2.1 >>>&1 string 2.2' \b, version 2.2 #------------------------------------------------------------------------------ # Type: OpenGIS KML, formerly Keyhole Markup Language # This standard is maintained by the # Open Geospatial Consortium. # http://www.opengeospatial.org/standards/kml/ # From: Asbjoern Sloth Toennesen >>&0 regex ['"]http://www.opengis.net/kml OpenGIS KML document !:mime application/vnd.google-earth.kml+xml >>>&1 string 2.2 \b, version 2.2 #------------------------------------------------------------------------------ # Type: Google KML Archive (ZIP based) # http://code.google.com/apis/kml/documentation/kml_tut.html # From: Asbjoern Sloth Toennesen 0 string PK\003\004 >4 byte 0x14 >>30 string doc.kml Compressed Google KML Document, including resources. !:mime application/vnd.google-earth.kmz #------------------------------------------------------------------------------ # DEC SRC Virtual Paper: Lectern files # Karl M. Hegbloom 0 string lect DEC SRC Virtual Paper Lectern file #------------------------------------------------------------------------------ # lex: file(1) magic for lex # # derived empirically, your offsets may vary! 0 search/100 yyprevious C program text (from lex) >3 search/1 >\0 for %s # C program text from GNU flex, from Daniel Quinlan 0 search/100 generated\ by\ flex C program text (from flex) # lex description file, from Daniel Quinlan 0 search/1 %{ lex description text #------------------------------------------------------------------------------ # lif: file(1) magic for lif # # (Daniel Quinlan ) # 0 beshort 0x8000 lif file #------------------------------------------------------------------------------ # linux: file(1) magic for Linux files # # Values for Linux/i386 binaries, from Daniel Quinlan # The following basic Linux magic is useful for reference, but using # "long" magic is a better practice in order to avoid collisions. # # 2 leshort 100 Linux/i386 # >0 leshort 0407 impure executable (OMAGIC) # >0 leshort 0410 pure executable (NMAGIC) # >0 leshort 0413 demand-paged executable (ZMAGIC) # >0 leshort 0314 demand-paged executable (QMAGIC) # 0 lelong 0x00640107 Linux/i386 impure executable (OMAGIC) >16 lelong 0 \b, stripped 0 lelong 0x00640108 Linux/i386 pure executable (NMAGIC) >16 lelong 0 \b, stripped 0 lelong 0x0064010b Linux/i386 demand-paged executable (ZMAGIC) >16 lelong 0 \b, stripped 0 lelong 0x006400cc Linux/i386 demand-paged executable (QMAGIC) >16 lelong 0 \b, stripped # 0 string \007\001\000 Linux/i386 object file >20 lelong >0x1020 \b, DLL library # Linux-8086 stuff: 0 string \01\03\020\04 Linux-8086 impure executable >28 long !0 not stripped 0 string \01\03\040\04 Linux-8086 executable >28 long !0 not stripped # 0 string \243\206\001\0 Linux-8086 object file # 0 string \01\03\020\20 Minix-386 impure executable >28 long !0 not stripped 0 string \01\03\040\20 Minix-386 executable >28 long !0 not stripped # core dump file, from Bill Reynolds 216 lelong 0421 Linux/i386 core file >220 string >\0 of '%s' >200 lelong >0 (signal %d) # # LILO boot/chain loaders, from Daniel Quinlan # this can be overridden by the DOS executable (COM) entry 2 string LILO Linux/i386 LILO boot/chain loader # # PSF fonts, from H. Peter Anvin 0 leshort 0x0436 Linux/i386 PC Screen Font data, >2 byte 0 256 characters, no directory, >2 byte 1 512 characters, no directory, >2 byte 2 256 characters, Unicode directory, >2 byte 3 512 characters, Unicode directory, >3 byte >0 8x%d # Linux swap file, from Daniel Quinlan 4086 string SWAP-SPACE Linux/i386 swap file # From: Jeff Bailey # Linux swap file with swsusp1 image, from Jeff Bailey 4076 string SWAPSPACE2S1SUSPEND Linux/i386 swap file (new style) with SWSUSP1 image # according to man page of mkswap (8) March 1999 4086 string SWAPSPACE2 Linux/i386 swap file (new style) >0x400 long x %d (4K pages) >0x404 long x size %d pages >>4086 string SWAPSPACE2 >>>1052 string >\0 Label %s # ECOFF magic for OSF/1 and Linux (only tested under Linux though) # # from Erik Troan (ewt@redhat.com) examining od dumps, so this # could be wrong # updated by David Mosberger (davidm@azstarnet.com) based on # GNU BFD and MIPS info found below. # 0 leshort 0x0183 ECOFF alpha >24 leshort 0407 executable >24 leshort 0410 pure >24 leshort 0413 demand paged >8 long >0 not stripped >8 long 0 stripped >23 leshort >0 - version %ld. # # Linux kernel boot images, from Albert Cahalan # and others such as Axel Kohlmeyer # and Nicols Lichtmaier # All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29 # Linux kernel boot images (i386 arch) (Wolfram Kleff) 514 string HdrS Linux kernel >510 leshort 0xAA55 x86 boot executable >>518 leshort >0x1ff >>>529 byte 0 zImage, >>>529 byte 1 bzImage, >>>(526.s+0x200) string >\0 version %s, >>498 leshort 1 RO-rootFS, >>498 leshort 0 RW-rootFS, >>508 leshort >0 root_dev 0x%X, >>502 leshort >0 swap_dev 0x%X, >>504 leshort >0 RAMdisksize %u KB, >>506 leshort 0xFFFF Normal VGA >>506 leshort 0xFFFE Extended VGA >>506 leshort 0xFFFD Prompt for Videomode >>506 leshort >0 Video mode %d # This also matches new kernels, which were caught above by "HdrS". 0 belong 0xb8c0078e Linux kernel >0x1e3 string Loading version 1.3.79 or older >0x1e9 string Loading from prehistoric times # System.map files - Nicols Lichtmaier 8 search/1 \ A\ _text Linux kernel symbol map text # LSM entries - Nicols Lichtmaier 0 search/1 Begin3 Linux Software Map entry text 0 search/1 Begin4 Linux Software Map entry text (new format) # From Matt Zimmerman, enhanced for v3 by Matthew Palmer 0 belong 0x4f4f4f4d User-mode Linux COW file >4 belong <3 \b, version %d >>8 string >\0 \b, backing file %s >4 belong >2 \b, version %d >>32 string >\0 \b, backing file %s ############################################################################ # Linux kernel versions 0 string \xb8\xc0\x07\x8e\xd8\xb8\x00\x90 Linux >497 leshort 0 x86 boot sector >>514 belong 0x8e of a kernel from the dawn of time! >>514 belong 0x908ed8b4 version 0.99-1.1.42 >>514 belong 0x908ed8b8 for memtest86 >497 leshort !0 x86 kernel >>504 leshort >0 RAMdisksize=%u KB >>502 leshort >0 swap=0x%X >>508 leshort >0 root=0x%X >>>498 leshort 1 \b-ro >>>498 leshort 0 \b-rw >>506 leshort 0xFFFF vga=normal >>506 leshort 0xFFFE vga=extended >>506 leshort 0xFFFD vga=ask >>506 leshort >0 vga=%d >>514 belong 0x908ed881 version 1.1.43-1.1.45 >>514 belong 0x15b281cd >>>0xa8e belong 0x55AA5a5a version 1.1.46-1.2.13,1.3.0 >>>0xa99 belong 0x55AA5a5a version 1.3.1,2 >>>0xaa3 belong 0x55AA5a5a version 1.3.3-1.3.30 >>>0xaa6 belong 0x55AA5a5a version 1.3.31-1.3.41 >>>0xb2b belong 0x55AA5a5a version 1.3.42-1.3.45 >>>0xaf7 belong 0x55AA5a5a version 1.3.46-1.3.72 >>514 string HdrS >>>518 leshort >0x1FF >>>>529 byte 0 \b, zImage >>>>529 byte 1 \b, bzImage >>>>(526.s+0x200) string >\0 \b, version %s # Linux boot sector thefts. 0 belong 0xb8c0078e Linux >0x1e6 belong 0x454c4b53 ELKS Kernel >0x1e6 belong !0x454c4b53 style boot sector ############################################################################ # Linux 8086 executable 0 lelong&0xFF0000FF 0xC30000E9 Linux-Dev86 executable, headerless >5 string . >>4 string >\0 \b, libc version %s 0 lelong&0xFF00FFFF 0x4000301 Linux-8086 executable >2 byte&0x01 !0 \b, unmapped zero page >2 byte&0x20 0 \b, impure >2 byte&0x20 !0 >>2 byte&0x10 !0 \b, A_EXEC >2 byte&0x02 !0 \b, A_PAL >2 byte&0x04 !0 \b, A_NSYM >2 byte&0x08 !0 \b, A_STAND >2 byte&0x40 !0 \b, A_PURE >2 byte&0x80 !0 \b, A_TOVLY >28 long !0 \b, not stripped >37 string . >>36 string >\0 \b, libc version %s # 0 lelong&0xFF00FFFF 0x10000301 ld86 I80386 executable # 0 lelong&0xFF00FFFF 0xB000301 ld86 M68K executable # 0 lelong&0xFF00FFFF 0xC000301 ld86 NS16K executable # 0 lelong&0xFF00FFFF 0x17000301 ld86 SPARC executable # SYSLINUX boot logo files (from 'ppmtolss16' sources) # http://syslinux.zytor.com/ # 0 lelong =0x1413f33d SYSLINUX' LSS16 image data >4 leshort x \b, width %d >6 leshort x \b, height %d 0 string OOOM User-Mode-Linux's Copy-On-Write disk image >4 belong x version %d # SE Linux policy database # From: Mike Frysinger 0 lelong 0xf97cff8c SE Linux policy >16 lelong x v%d >20 lelong 1 MLS >24 lelong x %d symbols >28 lelong x %d ocons # Linux Logical Volume Manager (LVM) # Emmanuel VARAGNAT # # System ID, UUID and volume group name are 128 bytes long # but they should never be full and initialized with zeros... # # LVM1 # 0x0 string HM\001 LVM1 (Linux Logical Volume Manager), version 1 >0x12c string >\0 , System ID: %s 0x0 string HM\002 LVM1 (Linux Logical Volume Manager), version 2 >0x12c string >\0 , System ID: %s # LVM2 # # It seems that the label header can be in one the four first sector # of the disk... (from _find_labeller in lib/label/label.c of LVM2) # # 0x200 seems to be the common case 0x218 string LVM2\ 001 LVM2 (Linux Logical Volume Manager) # read the offset to add to the start of the header, and the header # start in 0x200 >(0x214.l+0x200) string >\0 , UUID: %s 0x018 string LVM2\ 001 LVM2 (Linux Logical Volume Manager) >(0x014.l) string >\0 , UUID: %s 0x418 string LVM2\ 001 LVM2 (Linux Logical Volume Manager) >(0x414.l+0x400) string >\0 , UUID: %s 0x618 string LVM2\ 001 LVM2 (Linux Logical Volume Manager) >(0x614.l+0x600) string >\0 , UUID: %s # LVM snapshot # from Jason Farrel 0 string SnAp LVM Snapshot (CopyOnWrite store) >4 lelong !0 - valid, >4 lelong 0 - invalid, >8 lelong x version %d, >12 lelong x chunk_size %d # SE Linux policy database 0 lelong 0xf97cff8c SE Linux policy >16 lelong x v%d >20 lelong 1 MLS >24 lelong x %d symbols >28 lelong x %d ocons # LUKS: Linux Unified Key Setup, On-Disk Format, http://luks.endorphin.org/spec # Anthon van der Neut (anthon@mnt.org) 0 string LUKS\xba\xbe LUKS encrypted file, >6 beshort x ver %d >8 string x [%s, >40 string x %s, >72 string x %s] >168 string x UUID: %s # Summary: Xen saved domain file # Created by: Radek Vokal 0 string LinuxGuestRecord Xen saved domain >20 search/256 (name >>&1 string x (name %s) #------------------------------------------------------------------------------ # lisp: file(1) magic for lisp programs # # various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com) # updated by Joerg Jenderek # GRR: This lot is too weak #0 string ;; # windows INF files often begin with semicolon and use CRLF as line end # lisp files are mainly created on unix system with LF as line end #>2 search/4096 !\r Lisp/Scheme program text #>2 search/4096 \r Windows INF file 0 search/4096 (if\ Lisp/Scheme program text !:mime text/x-lisp 0 search/4096 (setq\ Lisp/Scheme program text !:mime text/x-lisp 0 search/4096 (defvar\ Lisp/Scheme program text !:mime text/x-lisp 0 search/4096 (defparam\ Lisp/Scheme program text !:mime text/x-lisp 0 search/4096 (defun\ Lisp/Scheme program text !:mime text/x-lisp 0 search/4096 (autoload\ Lisp/Scheme program text !:mime text/x-lisp 0 search/4096 (custom-set-variables\ Lisp/Scheme program text !:mime text/x-lisp # Emacs 18 - this is always correct, but not very magical. 0 string \012( Emacs v18 byte-compiled Lisp data !:mime application/x-elc # Emacs 19+ - ver. recognition added by Ian Springer # Also applies to XEmacs 19+ .elc files; could tell them apart with regexs # - Chris Chittleborough 0 string ;ELC >4 byte >18 >4 byte <32 Emacs/XEmacs v%d byte-compiled Lisp data !:mime application/x-elc # Files produced by CLISP Common Lisp From: Bruno Haible 0 string (SYSTEM::VERSION\040' CLISP byte-compiled Lisp program (pre 2004-03-27) 0 string (|SYSTEM|::|VERSION|\040' CLISP byte-compiled Lisp program text 0 long 0x70768BD2 CLISP memory image data 0 long 0xD28B7670 CLISP memory image data, other endian #.com and .bin for MIT scheme 0 string \372\372\372\372 MIT scheme (library?) # From: David Allouche 0 search/1 \ 0 string llvm LLVM byte-codes, uncompressed 0 string llvc0 LLVM byte-codes, null compression 0 string llvc1 LLVM byte-codes, gzip compression 0 string llvc2 LLVM byte-codes, bzip2 compression #------------------------------------------------------------------------------ # lua: file(1) magic for Lua scripting language # URL: http://www.lua.org/ # From: Reuben Thomas , Seo Sanghyeon # Lua scripts 0 search/1/b #!\ /usr/bin/lua Lua script text executable !:mime text/x-lua 0 search/1/b #!\ /usr/local/bin/lua Lua script text executable !:mime text/x-lua 0 search/1 #!/usr/bin/env\ lua Lua script text executable !:mime text/x-lua 0 search/1 #!\ /usr/bin/env\ lua Lua script text executable !:mime text/x-lua # Lua bytecode 0 string \033Lua Lua bytecode, >4 byte 0x50 version 5.0 >4 byte 0x51 version 5.1 #------------------------------------------------------------------------------ # luks: file(1) magic for Linux Unified Key Setup # URL: http://luks.endorphin.org/spec # From: Anthon van der Neut 0 string LUKS\xba\xbe LUKS encrypted file, >6 beshort x ver %d >8 string x [%s, >40 string x %s, >72 string x %s] >168 string x UUID: %s #------------------------------------------------------------ # Mach has two magic numbers, 0xcafebabe and 0xfeedface. # Unfortunately the first, cafebabe, is shared with # Java ByteCode, so they are both handled in the file "cafebabe". # The "feedface" ones are handled herein. #------------------------------------------------------------ 0 lelong&0xfffffffe 0xfeedface Mach-O >0 byte 0xcf 64-bit >12 lelong 1 object >12 lelong 2 executable >12 lelong 3 fixed virtual memory shared library >12 lelong 4 core >12 lelong 5 preload executable >12 lelong 6 dynamically linked shared library >12 lelong 7 dynamic linker >12 lelong 8 bundle >12 lelong 9 dynamically linked shared library stub >12 lelong >9 >>12 lelong x filetype=%ld >4 lelong <0 >>4 lelong x architecture=%ld >4 lelong 1 vax >4 lelong 2 romp >4 lelong 3 architecture=3 >4 lelong 4 ns32032 >4 lelong 5 ns32332 >4 lelong 6 m68k >4 lelong 7 i386 >4 lelong 8 mips >4 lelong 9 ns32532 >4 lelong 10 architecture=10 >4 lelong 11 hppa >4 lelong 12 acorn >4 lelong 13 m88k >4 lelong 14 sparc >4 lelong 15 i860-big >4 lelong 16 i860 >4 lelong 17 rs6000 >4 lelong 18 ppc >4 lelong 16777234 ppc64 >4 lelong >16777234 >>4 lelong x architecture=%ld # 0 belong&0xfffffffe 0xfeedface Mach-O >3 byte 0xcf 64-bit >12 belong 1 object >12 belong 2 executable >12 belong 3 fixed virtual memory shared library >12 belong 4 core >12 belong 5 preload executable >12 belong 6 dynamically linked shared library >12 belong 7 dynamic linker >12 belong 8 bundle >12 belong 9 dynamically linked shared library stub >12 belong >9 >>12 belong x filetype=%ld >4 belong <0 >>4 belong x architecture=%ld >4 belong 1 vax >4 belong 2 romp >4 belong 3 architecture=3 >4 belong 4 ns32032 >4 belong 5 ns32332 >4 belong 6 for m68k architecture # from NeXTstep 3.0 # i.e. mc680x0_all, ignore # >>8 belong 1 (mc68030) >>8 belong 2 (mc68040) >>8 belong 3 (mc68030 only) >4 belong 7 i386 >4 belong 8 mips >4 belong 9 ns32532 >4 belong 10 architecture=10 >4 belong 11 hppa >4 belong 12 acorn >4 belong 13 m88k >4 belong 14 sparc >4 belong 15 i860-big >4 belong 16 i860 >4 belong 17 rs6000 >4 belong 18 ppc >4 belong 16777234 ppc64 >4 belong >16777234 >>4 belong x architecture=%ld #------------------------------------------------------------------------------ # macintosh description # # BinHex is the Macintosh ASCII-encoded file format (see also "apple") # Daniel Quinlan, quinlan@yggdrasil.com 11 string must\ be\ converted\ with\ BinHex BinHex binary text !:mime application/mac-binhex40 >41 string x \b, version %.3s # Stuffit archives are the de facto standard of compression for Macintosh # files obtained from most archives. (franklsm@tuns.ca) 0 string SIT! StuffIt Archive (data) !:mime application/x-stuffit !:apple SIT!SIT! >2 string x : %s 0 string SITD StuffIt Deluxe (data) >2 string x : %s 0 string Seg StuffIt Deluxe Segment (data) >2 string x : %s # Newer StuffIt archives (grant@netbsd.org) 0 string StuffIt StuffIt Archive !:mime application/x-stuffit !:apple SIT!SIT! #>162 string >0 : %s # Macintosh Applications and Installation binaries (franklsm@tuns.ca) # GRR: Too weak #0 string APPL Macintosh Application (data) #>2 string x \b: %s # Macintosh System files (franklsm@tuns.ca) # GRR: Too weak #0 string zsys Macintosh System File (data) #0 string FNDR Macintosh Finder (data) #0 string libr Macintosh Library (data) #>2 string x : %s #0 string shlb Macintosh Shared Library (data) #>2 string x : %s #0 string cdev Macintosh Control Panel (data) #>2 string x : %s #0 string INIT Macintosh Extension (data) #>2 string x : %s #0 string FFIL Macintosh Truetype Font (data) #>2 string x : %s #0 string LWFN Macintosh Postscript Font (data) #>2 string x : %s # Additional Macintosh Files (franklsm@tuns.ca) # GRR: Too weak #0 string PACT Macintosh Compact Pro Archive (data) #>2 string x : %s #0 string ttro Macintosh TeachText File (data) #>2 string x : %s #0 string TEXT Macintosh TeachText File (data) #>2 string x : %s #0 string PDF Macintosh PDF File (data) #>2 string x : %s # MacBinary format (Eric Fischer, enf@pobox.com) # # Unfortunately MacBinary doesn't really have a magic number prior # to the MacBinary III format. The checksum is really the way to # do it, but the magic file format isn't up to the challenge. # # 0 byte 0 # 1 byte # filename length # 2 string # filename # 65 string # file type # 69 string # file creator # 73 byte # Finder flags # 74 byte 0 # 75 beshort # vertical posn in window # 77 beshort # horiz posn in window # 79 beshort # window or folder ID # 81 byte # protected? # 82 byte 0 # 83 belong # length of data segment # 87 belong # length of resource segment # 91 belong # file creation date # 95 belong # file modification date # 99 beshort # length of comment after resource # 101 byte # new Finder flags # 102 string mBIN # (only in MacBinary III) # 106 byte # char. code of file name # 107 byte # still more Finder flags # 116 belong # total file length # 120 beshort # length of add'l header # 122 byte 129 # for MacBinary II # 122 byte 130 # for MacBinary III # 123 byte 129 # minimum version that can read fmt # 124 beshort # checksum # # This attempts to use the version numbers as a magic number, requiring # that the first one be 0x80, 0x81, 0x82, or 0x83, and that the second # be 0x81. This works for the files I have, but maybe not for everyone's. # Unfortunately, this magic is quite weak - MPi #122 beshort&0xFCFF 0x8081 Macintosh MacBinary data # MacBinary I doesn't have the version number field at all, but MacBinary II # has been in use since 1987 so I hope there aren't many really old files # floating around that this will miss. The original spec calls for using # the nulls in 0, 74, and 82 as the magic number. # # Another possibility, that would also work for MacBinary I, is to use # the assumption that 65-72 will all be ASCII (0x20-0x7F), that 73 will # have bits 1 (changed), 2 (busy), 3 (bozo), and 6 (invisible) unset, # and that 74 will be 0. So something like # # 71 belong&0x80804EFF 0x00000000 Macintosh MacBinary data # # >73 byte&0x01 0x01 \b, inited # >73 byte&0x02 0x02 \b, changed # >73 byte&0x04 0x04 \b, busy # >73 byte&0x08 0x08 \b, bozo # >73 byte&0x10 0x10 \b, system # >73 byte&0x10 0x20 \b, bundle # >73 byte&0x10 0x40 \b, invisible # >73 byte&0x10 0x80 \b, locked #>65 string x \b, type "%4.4s" #>65 string 8BIM (PhotoShop) #>65 string ALB3 (PageMaker 3) #>65 string ALB4 (PageMaker 4) #>65 string ALT3 (PageMaker 3) #>65 string APPL (application) #>65 string AWWP (AppleWorks word processor) #>65 string CIRC (simulated circuit) #>65 string DRWG (MacDraw) #>65 string EPSF (Encapsulated PostScript) #>65 string FFIL (font suitcase) #>65 string FKEY (function key) #>65 string FNDR (Macintosh Finder) #>65 string GIFf (GIF image) #>65 string Gzip (GNU gzip) #>65 string INIT (system extension) #>65 string LIB\ (library) #>65 string LWFN (PostScript font) #>65 string MSBC (Microsoft BASIC) #>65 string PACT (Compact Pro archive) #>65 string PDF\ (Portable Document Format) #>65 string PICT (picture) #>65 string PNTG (MacPaint picture) #>65 string PREF (preferences) #>65 string PROJ (Think C project) #>65 string QPRJ (Think Pascal project) #>65 string SCFL (Defender scores) #>65 string SCRN (startup screen) #>65 string SITD (StuffIt Deluxe) #>65 string SPn3 (SuperPaint) #>65 string STAK (HyperCard stack) #>65 string Seg\ (StuffIt segment) #>65 string TARF (Unix tar archive) #>65 string TEXT (ASCII) #>65 string TIFF (TIFF image) #>65 string TOVF (Eudora table of contents) #>65 string WDBN (Microsoft Word word processor) #>65 string WORD (MacWrite word processor) #>65 string XLS\ (Microsoft Excel) #>65 string ZIVM (compress (.Z)) #>65 string ZSYS (Pre-System 7 system file) #>65 string acf3 (Aldus FreeHand) #>65 string cdev (control panel) #>65 string dfil (Desk Acessory suitcase) #>65 string libr (library) #>65 string nX^d (WriteNow word processor) #>65 string nX^w (WriteNow dictionary) #>65 string rsrc (resource) #>65 string scbk (Scrapbook) #>65 string shlb (shared library) #>65 string ttro (SimpleText read-only) #>65 string zsys (system file) #>69 string x \b, creator "%4.4s" # Somewhere, Apple has a repository of registered Creator IDs. These are # just the ones that I happened to have files from and was able to identify. #>69 string 8BIM (Adobe Photoshop) #>69 string ALD3 (PageMaker 3) #>69 string ALD4 (PageMaker 4) #>69 string ALFA (Alpha editor) #>69 string APLS (Apple Scanner) #>69 string APSC (Apple Scanner) #>69 string BRKL (Brickles) #>69 string BTFT (BitFont) #>69 string CCL2 (Common Lisp 2) #>69 string CCL\ (Common Lisp) #>69 string CDmo (The Talking Moose) #>69 string CPCT (Compact Pro) #>69 string CSOm (Eudora) #>69 string DMOV (Font/DA Mover) #>69 string DSIM (DigSim) #>69 string EDIT (Macintosh Edit) #>69 string ERIK (Macintosh Finder) #>69 string EXTR (self-extracting archive) #>69 string Gzip (GNU gzip) #>69 string KAHL (Think C) #>69 string LWFU (LaserWriter Utility) #>69 string LZIV (compress) #>69 string MACA (MacWrite) #>69 string MACS (Macintosh operating system) #>69 string MAcK (MacKnowledge terminal emulator) #>69 string MLND (Defender) #>69 string MPNT (MacPaint) #>69 string MSBB (Microsoft BASIC (binary)) #>69 string MSWD (Microsoft Word) #>69 string NCSA (NCSA Telnet) #>69 string PJMM (Think Pascal) #>69 string PSAL (Hunt the Wumpus) #>69 string PSI2 (Apple File Exchange) #>69 string R*ch (BBEdit) #>69 string RMKR (Resource Maker) #>69 string RSED (Resource Editor) #>69 string Rich (BBEdit) #>69 string SIT! (StuffIt) #>69 string SPNT (SuperPaint) #>69 string Unix (NeXT Mac filesystem) #>69 string VIM! (Vim editor) #>69 string WILD (HyperCard) #>69 string XCEL (Microsoft Excel) #>69 string aCa2 (Fontographer) #>69 string aca3 (Aldus FreeHand) #>69 string dosa (Macintosh MS-DOS file system) #>69 string movr (Font/DA Mover) #>69 string nX^n (WriteNow) #>69 string pdos (Apple ProDOS file system) #>69 string scbk (Scrapbook) #>69 string ttxt (SimpleText) #>69 string ufox (Foreign File Access) # Just in case... 102 string mBIN MacBinary III data with surprising version number # sas magic from Bruce Foster (bef@nwu.edu) # #0 string SAS SAS #>8 string x %s 0 string SAS SAS >24 string DATA data file >24 string CATALOG catalog >24 string INDEX data file index >24 string VIEW data view # sas 7+ magic from Reinhold Koch (reinhold.koch@roche.com) # 0x54 string SAS SAS 7+ >0x9C string DATA data file >0x9C string CATALOG catalog >0x9C string INDEX data file index >0x9C string VIEW data view # spss magic for SPSS system and portable files, # from Bruce Foster (bef@nwu.edu). 0 long 0xc1e2c3c9 SPSS Portable File >40 string x %s 0 string $FL2 SPSS System File >24 string x %s # Macintosh filesystem data # From "Tom N Harris" # Fixed HFS+ and Partition map magic: Ethan Benson # The MacOS epoch begins on 1 Jan 1904 instead of 1 Jan 1970, so these # entries depend on the data arithmetic added after v.35 # There's also some Pascal strings in here, ditto... # The boot block signature, according to IM:Files, is # "for HFS volumes, this field always contains the value 0x4C4B." # But if this is true for MFS or HFS+ volumes, I don't know. # Alternatively, the boot block is supposed to be zeroed if it's # unused, so a simply >0 should suffice. 0x400 beshort 0xD2D7 Macintosh MFS data >0 beshort 0x4C4B (bootable) >0x40a beshort &0x8000 (locked) >0x402 beldate-0x7C25B080 x created: %s, >0x406 beldate-0x7C25B080 >0 last backup: %s, >0x414 belong x block size: %d, >0x412 beshort x number of blocks: %d, >0x424 pstring x volume name: %s # "BD" is has many false positives #0x400 beshort 0x4244 Macintosh HFS data #>0 beshort 0x4C4B (bootable) #>0x40a beshort &0x8000 (locked) #>0x40a beshort ^0x0100 (mounted) #>0x40a beshort &0x0200 (spared blocks) #>0x40a beshort &0x0800 (unclean) #>0x47C beshort 0x482B (Embedded HFS+ Volume) #>0x402 beldate-0x7C25B080 x created: %s, #>0x406 beldate-0x7C25B080 x last modified: %s, #>0x440 beldate-0x7C25B080 >0 last backup: %s, #>0x414 belong x block size: %d, #>0x412 beshort x number of blocks: %d, #>0x424 pstring x volume name: %s 0x400 beshort 0x482B Macintosh HFS Extended >&0 beshort x version %d data >0 beshort 0x4C4B (bootable) >0x404 belong ^0x00000100 (mounted) >&2 belong &0x00000200 (spared blocks) >&2 belong &0x00000800 (unclean) >&2 belong &0x00008000 (locked) >&6 string x last mounted by: '%.4s', # really, that should be treated as a belong and we print a string # based on the value. TN1150 only mentions '8.10' for "MacOS 8.1" >&14 beldate-0x7C25B080 x created: %s, # only the creation date is local time, all other timestamps in HFS+ are UTC. >&18 bedate-0x7C25B080 x last modified: %s, >&22 bedate-0x7C25B080 >0 last backup: %s, >&26 bedate-0x7C25B080 >0 last checked: %s, >&38 belong x block size: %d, >&42 belong x number of blocks: %d, >&46 belong x free blocks: %d # I don't think this is really necessary since it doesn't do much and # anything with a valid driver descriptor will also have a valid # partition map #0 beshort 0x4552 Apple Device Driver data #>&24 beshort =1 \b, MacOS # Is that the partition type a cstring or a pstring? Well, IM says "strings # shorter than 32 bytes must be terminated with NULL" so I'll treat it as a # cstring. Of course, partitions can contain more than four entries, but # what're you gonna do? # GRR: This magic is too weak, it is just "PM" #0x200 beshort 0x504D Apple Partition data #>0x2 beshort x (block size: %d): #>0x230 string x first type: %s, #>0x210 string x name: %s, #>0x254 belong x number of blocks: %d, #>0x400 beshort 0x504D #>>0x430 string x second type: %s, #>>0x410 string x name: %s, #>>0x454 belong x number of blocks: %d, #>>0x600 beshort 0x504D #>>>0x630 string x third type: %s, #>>>0x610 string x name: %s, #>>>0x654 belong x number of blocks: %d, #>>0x800 beshort 0x504D #>>>0x830 string x fourth type: %s, #>>>0x810 string x name: %s, #>>>0x854 belong x number of blocks: %d, #>>>0xa00 beshort 0x504D #>>>>0xa30 string x fifth type: %s, #>>>>0xa10 string x name: %s, #>>>>0xa54 belong x number of blocks: %d #>>>0xc00 beshort 0x504D #>>>>0xc30 string x sixth type: %s, #>>>>0xc10 string x name: %s, #>>>>0xc54 belong x number of blocks: %d ## AFAIK, only the signature is different #0x200 beshort 0x5453 Apple Old Partition data #>0x2 beshort x block size: %d, #>0x230 string x first type: %s, #>0x210 string x name: %s, #>0x254 belong x number of blocks: %d, #>0x400 beshort 0x504D #>>0x430 string x second type: %s, #>>0x410 string x name: %s, #>>0x454 belong x number of blocks: %d, #>>0x800 beshort 0x504D #>>>0x830 string x third type: %s, #>>>0x810 string x name: %s, #>>>0x854 belong x number of blocks: %d, #>>>0xa00 beshort 0x504D #>>>>0xa30 string x fourth type: %s, #>>>>0xa10 string x name: %s, #>>>>0xa54 belong x number of blocks: %d # From: Remi Mommsen 0 string BOMStore Mac OS X bill of materials (BOM) file #------------------------------------------------------------------------------ # magic: file(1) magic for magic files # 0 string #\ Magic magic text file for file(1) cmd 0 lelong 0xF11E041C magic binary file for file(1) cmd >4 lelong x (version %d) (little endian) 0 belong 0xF11E041C magic binary file for file(1) cmd >4 belong x (version %d) (big endian) #------------------------------------------------------------------------------ # mail.news: file(1) magic for mail and news # # Unfortunately, saved netnews also has From line added in some news software. #0 string From mail text # There are tests to ascmagic.c to cope with mail and news. 0 string Relay-Version: old news text !:mime message/rfc822 0 string #!\ rnews batched news text !:mime message/rfc822 0 string N#!\ rnews mailed, batched news text !:mime message/rfc822 0 string Forward\ to mail forwarding text !:mime message/rfc822 0 string Pipe\ to mail piping text !:mime message/rfc822 0 string Return-Path: smtp mail text !:mime message/rfc822 0 string Path: news text !:mime message/news 0 string Xref: news text !:mime message/news 0 string From: news or mail text !:mime message/rfc822 0 string Article saved news text !:mime message/news 0 string BABYL Emacs RMAIL text 0 string Received: RFC 822 mail text !:mime message/rfc822 0 string MIME-Version: MIME entity text #0 string Content- MIME entity text # TNEF files... 0 lelong 0x223E9F78 Transport Neutral Encapsulation Format # From: Kevin Sullivan 0 string *mbx* MBX mail folder # From: Simon Matter 0 string \241\002\213\015skiplist\ file\0\0\0 Cyrus skiplist DB # JAM(mbp) Fidonet message area databases # JHR file 0 string JAM\0 JAM message area header file >12 leshort >0 (%d messages) # Squish Fidonet message area databases # SQD file (requires at least one message in the area) # XXX: Weak magic #256 leshort 0xAFAE4453 Squish message area data file #>4 leshort >0 (%d messages) #0 string \