For our assignment we need to write code for a neural network. The way I planned to do it was to write a Node
class, which is a node within the network; a Layer
class, which is a layer of nodes and a NeuralNet
class, which is a network of layers.
I'm having a lot of trouble understanding the way Java is designed to work for imports. To me it seems that it should be a simple matter to include my Node
class in my Layer
class, and my Layer
class in my NeuralNet
class, however Java doesn't like importing from the default package.
What I have read suggests that anything you import needs to be in a package and packages have their own subdirectory. Because of the way I plan to structure my classes, this leaves me with what seems to me, an unwieldy and unnecessarily complex directory structure ie.
neuralpkg.layerpkg.nodepkg.Node
Can someone explain to me whether this is the only way to implement the structure that I want or whether there is some much, much simpler way that I've missed?
For what its worth I'd have no trouble writing this in C/C++, but attempting to import in a similar style has only given me heartache.