Index: head/science/Makefile =================================================================== --- head/science/Makefile (revision 467500) +++ head/science/Makefile (revision 467501) @@ -1,226 +1,227 @@ # $FreeBSD$ # COMMENT = Scientific ports SUBDIR += 2d-rewriter SUBDIR += ALPSCore SUBDIR += InsightToolkit SUBDIR += MOOSE-neural-simulator SUBDIR += PETSc SUBDIR += R-cran-AMORE SUBDIR += R-cran-DCluster SUBDIR += R-cran-Epi SUBDIR += R-cran-bayesm SUBDIR += R-cran-cmprsk SUBDIR += R-cran-e1071 SUBDIR += R-cran-eco SUBDIR += R-cran-epicalc SUBDIR += R-cran-etm SUBDIR += R-cran-fastICA SUBDIR += R-cran-kernlab SUBDIR += R-cran-snow SUBDIR += R-cran-som SUBDIR += R-cran-udunits2 SUBDIR += afni SUBDIR += aircraft-datcom SUBDIR += avogadro SUBDIR += bddsolve SUBDIR += bft SUBDIR += bodr SUBDIR += brian SUBDIR += buddy SUBDIR += cdcl SUBDIR += cdf SUBDIR += cdo SUBDIR += cgnslib SUBDIR += cgribex SUBDIR += checkmol SUBDIR += chemical-mime-data SUBDIR += chemps2 SUBDIR += chemtool SUBDIR += chemtool-devel SUBDIR += clhep SUBDIR += colt SUBDIR += crf++ SUBDIR += dcl SUBDIR += devisor SUBDIR += dkh SUBDIR += dlpoly-classic SUBDIR += ecs SUBDIR += epte SUBDIR += erd SUBDIR += fastcap SUBDIR += fasthenry SUBDIR += fisicalab + SUBDIR += fsom SUBDIR += fvcom SUBDIR += fvcom-mpi SUBDIR += fvm SUBDIR += gchemutils SUBDIR += gdma SUBDIR += getdp SUBDIR += ghemical SUBDIR += ghmm SUBDIR += gnudatalanguage SUBDIR += gramps SUBDIR += grib_api SUBDIR += gromacs SUBDIR += gsmc SUBDIR += gtamsanalyzer SUBDIR += gwyddion SUBDIR += h5utils SUBDIR += harminv SUBDIR += hdf SUBDIR += hdf5 SUBDIR += hdf5-18 SUBDIR += hs-bio SUBDIR += hypre SUBDIR += iboview SUBDIR += isaac-cfd SUBDIR += jstrack SUBDIR += kalzium SUBDIR += kalzium-kde4 SUBDIR += kst2 SUBDIR += lamprop SUBDIR += libaec SUBDIR += libcint SUBDIR += libctl SUBDIR += libefp SUBDIR += libgeodecomp SUBDIR += libghemical SUBDIR += libint SUBDIR += libkml SUBDIR += liblinear SUBDIR += liboglappth SUBDIR += libquantum SUBDIR += libsvm SUBDIR += libsvm-python SUBDIR += libxc SUBDIR += linsmith SUBDIR += massxpert SUBDIR += mbdyn SUBDIR += mcstas SUBDIR += mcstas-comps SUBDIR += mcxtrace SUBDIR += medit SUBDIR += meep SUBDIR += mei SUBDIR += metaf2xml SUBDIR += minc2 SUBDIR += mol2ps SUBDIR += mpb SUBDIR += mpqc SUBDIR += mpqc-mpich SUBDIR += ncs SUBDIR += netcdf SUBDIR += netcdf-cxx SUBDIR += netcdf-fortran SUBDIR += nifticlib SUBDIR += openbabel SUBDIR += openkim SUBDIR += orthanc SUBDIR += orthanc-dicomweb SUBDIR += orthanc-postgresql SUBDIR += orthanc-webviewer SUBDIR += p5-Algorithm-SVMLight SUBDIR += p5-Chemistry-3DBuilder SUBDIR += p5-Chemistry-Bond-Find SUBDIR += p5-Chemistry-Canonicalize SUBDIR += p5-Chemistry-Elements SUBDIR += p5-Chemistry-File-MDLMol SUBDIR += p5-Chemistry-File-Mopac SUBDIR += p5-Chemistry-File-PDB SUBDIR += p5-Chemistry-File-SLN SUBDIR += p5-Chemistry-File-SMARTS SUBDIR += p5-Chemistry-File-SMILES SUBDIR += p5-Chemistry-File-VRML SUBDIR += p5-Chemistry-File-XYZ SUBDIR += p5-Chemistry-FormulaPattern SUBDIR += p5-Chemistry-InternalCoords SUBDIR += p5-Chemistry-Isotope SUBDIR += p5-Chemistry-MacroMol SUBDIR += p5-Chemistry-MidasPattern SUBDIR += p5-Chemistry-Mok SUBDIR += p5-Chemistry-Mol SUBDIR += p5-Chemistry-Pattern SUBDIR += p5-Chemistry-Reaction SUBDIR += p5-Chemistry-Ring SUBDIR += p5-Geo-BUFR SUBDIR += p5-Geo-Coordinates-Converter SUBDIR += p5-Geo-Coordinates-Converter-iArea SUBDIR += p5-Geo-ReadGRIB SUBDIR += p5-Geo-WebService-Elevation-USGS SUBDIR += p5-Mcstas-Tools SUBDIR += p5-PerlMol SUBDIR += p5-Physics-Unit SUBDIR += paje SUBDIR += paraview SUBDIR += pcmsolver SUBDIR += pnetcdf SUBDIR += psychopy SUBDIR += pulseview SUBDIR += py-DendroPy SUBDIR += py-OpenFermion SUBDIR += py-cdo SUBDIR += py-coards SUBDIR += py-h5py SUBDIR += py-hcluster SUBDIR += py-mdp SUBDIR += py-mlpy SUBDIR += py-netCDF4 SUBDIR += py-obspy SUBDIR += py-openpiv SUBDIR += py-paida SUBDIR += py-pupynere SUBDIR += py-pyaixi SUBDIR += py-pydicom SUBDIR += py-pymol SUBDIR += py-pyosf SUBDIR += py-pysal SUBDIR += py-pyteomics SUBDIR += py-pyteomics.biolccc SUBDIR += py-qspin SUBDIR += py-quantities SUBDIR += py-scikit-fuzzy SUBDIR += py-scikit-learn SUBDIR += py-scikit-sparse SUBDIR += py-scimath SUBDIR += py-scipy SUBDIR += py-scoria SUBDIR += py-tensorflow SUBDIR += py-veusz SUBDIR += py-ws2300 SUBDIR += pybrain SUBDIR += pycdf SUBDIR += pynn SUBDIR += qcl SUBDIR += qtresistors SUBDIR += rdkit SUBDIR += rubygem-ai4r SUBDIR += rubygem-cdo SUBDIR += rubygem-rgeo SUBDIR += rubygem-rgeo-geojson SUBDIR += rubygem-rgeo-proj4 SUBDIR += rubygem-rgeo-shapefile SUBDIR += rubygem-ruby-dcl SUBDIR += rubygem-ruby-netcdf SUBDIR += sigrok-cli SUBDIR += sigrok-firmware SUBDIR += sigrok-firmware-fx2lafw SUBDIR += sigrok-firmware-utils SUBDIR += silo SUBDIR += simlib SUBDIR += simsmith SUBDIR += step SUBDIR += step-kde4 SUBDIR += svmlight SUBDIR += szip SUBDIR += tfel SUBDIR += udunits SUBDIR += v_sim SUBDIR += vmd SUBDIR += voro++ SUBDIR += xfce4-equake-plugin SUBDIR += xmakemol .include Index: head/science/fsom/Makefile =================================================================== --- head/science/fsom/Makefile (nonexistent) +++ head/science/fsom/Makefile (revision 467501) @@ -0,0 +1,26 @@ +# $FreeBSD$ + +PORTNAME= fsom +DISTVERSION= g20151117 +CATEGORIES= science + +MAINTAINER= jwb@FreeBSD.org +COMMENT= Tiny C library for managing SOM (Self-Organizing Maps) neural networks + +LICENSE= GPLv3 + +USE_GITHUB= yes +GH_ACCOUNT= ekg +GH_TAGNAME= 56695e1611d824cda97f08e932d25d08419170cd + +INSTALL_TARGET= install-strip + +PLIST_FILES= bin/fsom \ + include/fsom/convert.h \ + include/fsom/fsom.h \ + include/fsom/split.h \ + lib/libfsom.a + +MAKEFILE= ${FILESDIR}/Makefile + +.include Property changes on: head/science/fsom/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/science/fsom/distinfo =================================================================== --- head/science/fsom/distinfo (nonexistent) +++ head/science/fsom/distinfo (revision 467501) @@ -0,0 +1,3 @@ +TIMESTAMP = 1523601004 +SHA256 (ekg-fsom-g20151117-56695e1611d824cda97f08e932d25d08419170cd_GH0.tar.gz) = 1ba3360985be781bb9f79d974705c86e7bb0719cb83638955e113b5dd83ec8dd +SIZE (ekg-fsom-g20151117-56695e1611d824cda97f08e932d25d08419170cd_GH0.tar.gz) = 9771 Property changes on: head/science/fsom/distinfo ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/science/fsom/files/Makefile =================================================================== --- head/science/fsom/files/Makefile (nonexistent) +++ head/science/fsom/files/Makefile (revision 467501) @@ -0,0 +1,52 @@ + +# Use ?= to allow overriding from the env or command-line, e.g. +# +# make CXXFLAGS="-O3 -fPIC" install +# +# Package managers will override many of these variables automatically, so +# this is aimed at making it easy to create packages (Debian packages, +# FreeBSD ports, MacPorts, pkgsrc, etc.) + +CXX ?= g++ +CXXFLAGS ?= -w -O3 -pipe -fomit-frame-pointer -ffast-math +AR ?= ar +MKDIR ?= mkdir +STRIP ?= strip +DESTDIR ?= stage +PREFIX ?= /usr/local + +BIN = fsom +LIB = libfsom.a +OBJS = fsom.o split.o +MAIN = main.o + +all: ${BIN} ${LIB} + +${BIN}: ${OBJS} ${MAIN} + ${CXX} -o fsom ${OBJS} ${MAIN} -lm + +${LIB}: ${OBJS} + ${AR} -rs ${LIB} ${OBJS} + +fsom.o: fsom.c + ${CXX} ${CXXFLAGS} -c fsom.c + +split.o: split.cpp + ${CXX} ${CXXFLAGS} -c split.cpp + +main.o: main.cpp + ${CXX} ${CXXFLAGS} -c main.cpp + +install: all + ${MKDIR} -p ${DESTDIR}${PREFIX}/bin + ${MKDIR} -p ${DESTDIR}${PREFIX}/include/fsom + ${MKDIR} -p ${DESTDIR}${PREFIX}/lib + ${INSTALL} ${BIN} ${DESTDIR}${PREFIX}/bin + ${INSTALL} *.h ${DESTDIR}${PREFIX}/include/fsom + ${INSTALL} ${LIB} ${DESTDIR}${PREFIX}/lib + +install-strip: install + ${STRIP} ${DESTDIR}${PREFIX}/bin/${BIN} + +clean: + rm -rf *.o ${BIN} ${LIB} ${DESTDIR} Property changes on: head/science/fsom/files/Makefile ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/science/fsom/files/patch-fsom.c =================================================================== --- head/science/fsom/files/patch-fsom.c (nonexistent) +++ head/science/fsom/files/patch-fsom.c (revision 467501) @@ -0,0 +1,26 @@ +--- fsom.c.orig 2015-11-21 16:35:06 UTC ++++ fsom.c +@@ -31,6 +31,10 @@ + #define M_E 2.7182818284590452354 + #endif + ++#ifndef ABS ++#define ABS(x) ((x) < 0 ? -(x) : (x)) ++#endif ++ + /** + * \brief Create a new synapsis between two neurons + * \param input_neuron Input neuron for the synapsis +@@ -591,10 +595,10 @@ som_train_iteration ( som_network_t *net + som_neuron_t *neuron; + for ( i=0; i < net->output_layer->neurons_rows; ++i ) + { +- dist_i = abs( x - i ); ++ dist_i = ABS( x - i ); + for ( j=0; j < net->output_layer->neurons_cols; ++j ) + { +- dist = pow( dist_i + abs ( y - j ), 4 ); ++ dist = pow( dist_i + ABS ( y - j ), 4 ); + inv_dist = (1.0 / ((double) dist + 1)) * l_rate; + neuron = net->output_layer->neurons[i][j]; + for ( k=0; k < net->input_layer->neurons_count; ++k ) Property changes on: head/science/fsom/files/patch-fsom.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/science/fsom/pkg-descr =================================================================== --- head/science/fsom/pkg-descr (nonexistent) +++ head/science/fsom/pkg-descr (revision 467501) @@ -0,0 +1,6 @@ +FSOM is a tiny C library for managing SOM (Self-Organizing Maps) neural +networks, a type of artificial neural network (ANN) that is trained using +unsupervised learning to produce a low-dimensional (typically two-dimensional), +discretized representation of the input space of the training samples. + +WWW: https://github.com/ekg/fsom Property changes on: head/science/fsom/pkg-descr ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property