CorTeX Core ABI 7
ToolTech Software · C++ library reference
Loading...
Searching...
No Matches
ctxOutputImpl.h
Go to the documentation of this file.
1//*****************************************************************************
2// File : ctxOutputImpl.h
3// Description : Declaration of generic output classes
4// Author : Anders Modén
5// Product : CorTeX 2.0.1
6//
7// Copyright © 2015- Anders Modén, Sweden
8//
9// NOTE: CorTeX is a software development kit (SDK)
10// for neural networks and genetic programming.
11// Licensed by Anders Modén.
12//
13//
14// Revision History...
15//
16// Who Date Description
17//
18// AMO 150708 Created file (1.0.0)
19//
20//******************************************************************************
21#ifndef __CTX_OUTPUT_IMPL_H__
22#define __CTX_OUTPUT_IMPL_H__
23
24#include "ctxOutput.h"
25
26// ------------------------ ctxDummyOutput ----------------------------
27
29{
30public:
31
32 CTX_EXPORT virtual gzFloat getExpectedValue(ctxContext *context, gzUInt32 index, gzUInt32 sample) { return (gzFloat)gzRandom(); }
33
34 CTX_EXPORT virtual gzUInt32 getResultSize() { return m_propertyResultSize; }
35
36 CTX_EXPORT virtual gzUInt32 getResults() { return m_propertyResults; }
37
38 GZ_PROPERTY_EXPORT(gzUInt32, ResultSize, CTX_EXPORT);
39 GZ_PROPERTY_EXPORT(gzUInt32, Results, CTX_EXPORT);
40
41};
42
43GZ_DECLARE_REFPTR(ctxDummyOutput);
44
45// ------------------------ ctxMNISTOutput ----------------------------
46
48{
49public:
50
51 CTX_EXPORT ctxMNISTOutput(const gzString &file_url);
52
53 CTX_EXPORT virtual gzFloat getExpectedValue(ctxContext *context,gzUInt32 index, gzUInt32 currentSample) override;
54
55 CTX_EXPORT virtual gzUInt32 getResultSize() override;
56
57 CTX_EXPORT virtual gzUInt32 getResults() override ;
58
59private:
60
61 gzUInt32 m_count;
62 gzArray<gzUByte> m_data;
63};
64
65GZ_DECLARE_REFPTR(ctxMNISTOutput);
66
67#endif //__CTX_OUTPUT_IMPL_H__
virtual gzUInt32 getResultSize()
virtual gzFloat getExpectedValue(ctxContext *context, gzUInt32 index, gzUInt32 sample)
virtual gzUInt32 getResults()
virtual gzUInt32 getResults() override
virtual gzUInt32 getResultSize() override
ctxMNISTOutput(const gzString &file_url)
virtual gzFloat getExpectedValue(ctxContext *context, gzUInt32 index, gzUInt32 currentSample) override
#define CTX_EXPORT
Definition ctxBase.h:68