[mlpack-svn] master: Add connection traits class. (1fa6670)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Wed Dec 31 15:59:05 EST 2014
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/c935252ea3134025d7d0df05afa4a1501dad4d59...8c13d5c6d16fadd1fe4dfb2230adfaa0268e95dd
>---------------------------------------------------------------
commit 1fa6670385bbb7ae346146bffe1812016af581b0
Author: Marcus Edel <marcus.edel at fu-berlin.de>
Date: Wed Dec 31 21:56:41 2014 +0100
Add connection traits class.
>---------------------------------------------------------------
1fa6670385bbb7ae346146bffe1812016af581b0
.../methods/ann/connections/connection_traits.hpp | 39 ++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/src/mlpack/methods/ann/connections/connection_traits.hpp b/src/mlpack/methods/ann/connections/connection_traits.hpp
new file mode 100644
index 0000000..63cda3d
--- /dev/null
+++ b/src/mlpack/methods/ann/connections/connection_traits.hpp
@@ -0,0 +1,39 @@
+/**
+ * @file connection_traits.hpp
+ * @author Marcus Edel
+ *
+ * ConnectionTraits class, a template class to get information about various
+ * layers.
+ */
+#ifndef __MLPACK_METHOS_ANN_CONNECTIONS_CONNECTION_TRAITS_HPP
+#define __MLPACK_METHOS_ANN_CONNECTIONS_CONNECTION_TRAITS_HPP
+
+namespace mlpack {
+namespace ann {
+
+/**
+ * This is a template class that can provide information about various
+ * connections. By default, this class will provide the weakest possible
+ * assumptions on connection, and each connection should override values as
+ * necessary. If a connection doesn't need to override a value, then there's no
+ * need to write a ConnectionTraits specialization for that class.
+ */
+template<typename ConnectionType>
+class ConnectionTraits
+{
+ public:
+ /**
+ * This is true if the connection is a self connection.
+ */
+ static const bool IsSelfConnection = false;
+
+ /**
+ * This is true if the connection is a fullself connection.
+ */
+ static const bool IsFullselfConnection = false;
+};
+
+}; // namespace ann
+}; // namespace mlpack
+
+#endif
More information about the mlpack-svn
mailing list