New in version 1.0.
As noted in the introduction to the modeling package, it is now possible to create new models just by combining existing models using the arithmetic operators +, -, *, /, and **, as well as by model composition using | and concatenation (explained below) with &.
In discussing the compound model feature, it is useful to be clear about a few terms where there have been points of confusion:
The term “model” can refer either to a model class or a model instance.
A model class, by itself, cannot be used to perform any computation because most models, at least, have one or more parameters that must be specified before the model can be evaluated on some input data. However, we can still get some information about a model class from its representation. For example:
>>> from astropy.modeling.models import Gaussian1D
>>> Gaussian1D
<class 'astropy.modeling.functional_models.Gaussian1D'>
Name: Gaussian1D
Inputs: ('x',)
Outputs: ('y',)
Fittable parameters: ('amplitude', 'mean', 'stddev')
We can then create a model instance by passing in values for the three parameters:
>>> my_gaussian = Gaussian1D(amplitude=1.0, mean=0, stddev=0.2)
>>> my_gaussian
<Gaussian1D(amplitude=1.0, mean=0.0, stddev=0.2)>
We now have an instance of Gaussian1D with all its parameters (and in principle other details like fit constraints) filled in so that we can perform calculations with it as though it were a function:
>>> my_gaussian(0.2)
0.6065306597126334
In many cases this document just refers to “models”, where the class/instance distinction is either irrelevant or clear from context. But a distinction will be made where necessary.
A compound model can be created by combining two or more existing models– be they model instances or classes, and can be models that come with Astropy, user defined models, or other compound models–using Python expressions consisting of one or more of the supported binary operators.
In some places the term composite model is used interchangeably with compound model. This can be seen in the cases of the now deprecated SerialCompositeModel and SummedCompositeModel. However, this document uses the term composite model to refer only to the case of a compound model created from the functional composition of two or more models using the pipe operator | as explained below. This distinction is used consistently within this document, but it may be helpful to understand the distinction.
As discussed in the introduction to compound models, the only way, currently, to create compound models is to combine existing single models and/or compound models using expressions in Python with the binary operators +, -, *, /, **, |, and &, each of which is discussed in the following sections. The operands used in these expressions may be model classes, or model instances. In other words, any object for which either isinstance(obj, Model) or issubclass(obj, Model) is True.
We start by demonstrating how new compound model classes can be created by combining other classes. This is more advanced usage, but it’s useful to understand that this is what’s going on under the hood in the more basic usage of compound model instances.
When all models involved in the expression are classes, the result of the expression is, itself, a class (remember, classes in Python are themselves also objects just like strings and integers or model instances):
>>> TwoGaussians = Gaussian1D + Gaussian1D
>>> from astropy.modeling import Model
>>> isinstance(TwoGaussians, Model)
False
>>> issubclass(TwoGaussians, Model)
True
When we inspect the variable TwoGaussians by printing its representation at the command prompt we can get some more information about it:
>>> TwoGaussians
<class '__main__.CompoundModel...'>
Name: CompoundModel...
Inputs: ('x',)
Outputs: ('y',)
Fittable parameters: ('amplitude_0', 'mean_0', 'stddev_0', 'amplitude_1', 'mean_1', 'stddev_1')
Expression: [0] + [1]
Components:
[0]: <class 'astropy.modeling.functional_models.Gaussian1D'>
Name: Gaussian1D
Inputs: ('x',)
Outputs: ('y',)
Fittable parameters: ('amplitude', 'mean', 'stddev')
[1]: <class 'astropy.modeling.functional_models.Gaussian1D'>
Name: Gaussian1D
Inputs: ('x',)
Outputs: ('y',)
Fittable parameters: ('amplitude', 'mean', 'stddev')
There are a number of things to point out here: This model class has six fittable parameters. How parameters are handled is discussed further in the section on Parameters. We also see that there is a listing of the expression that was used to create this compound model, which in this case is summarized as [0] + [1]. The [0] and [1] refer to the first and second components of the model listed next (in this case both components are the Gaussian1D class).
Each component of a compound model is a single, non-compound model. This is the case even when including an existing compound model in a new expression. The existing compound model is not treated as a single model–instead the expression represented by that compound model is extended. An expression involving two or more compound models results in a new expression that is the concatenation of all involved models’ expressions:
>>> FourGaussians = TwoGaussians + TwoGaussians
>>> FourGaussians
<class '__main__.CompoundModel...'>
Name: CompoundModel...
Inputs: ('x',)
Outputs: ('y',)
Fittable parameters: ('amplitude_0', 'mean_0', 'stddev_0', ..., 'amplitude_3', 'mean_3', 'stddev_3')
Expression: [0] + [1] + [2] + [3]
Components:
[0]: <class 'astropy.modeling.functional_models.Gaussian1D'>
Name: Gaussian1D
Inputs: ('x',)
Outputs: ('y',)
Fittable parameters: ('amplitude', 'mean', 'stddev')
...
[3]: <class 'astropy.modeling.functional_models.Gaussian1D'>
Name: Gaussian1D
Inputs: ('x',)
Outputs: ('y',)
Fittable parameters: ('amplitude', 'mean', 'stddev')
In a future version it may be possible to “freeze” a compound model, so that from the user’s perspective it is treated as a single model. However, as this is the default behavior it is good to be aware of.
In the last two examples another notable feature of the generated compound model classes is that the class name, as displayed when printing the class at the command prompt, is not “TwoGaussians”, “FourGaussians”, etc. Instead it is a generated name consisting of “CompoundModel” followed by an essentially arbitrary integer that is chosen simply so that every compound model has a unique default name. This is a limitation at present, due to the limitation that it is not generally possible in Python when an object is created by an expression for it to “know” the name of the variable it will be assigned to, if any. It may be possible in the future to work around this in limited cases, but for now there are a couple workarounds for creating compound model classes with friendlier names. The first is to use the Model.rename class method on the result of the model expression:
>>> TwoGaussians = (Gaussian1D + Gaussian1D).rename('TwoGaussians')
>>> TwoGaussians
<class '__main__.TwoGaussians'>
Name: TwoGaussians (CompoundModel...)
...
This actually takes the generated compound model and creates a light subclass of it with the desired name. This does not impose any additional overhead. An alternative syntax, which is equivalent to what rename is doing, is to directly use the model expression as the base class of a new class:
>>> class TwoGaussians(Gaussian1D + Gaussian1D):
... """A superposition of two Gaussians."""
...
>>> TwoGaussians
<class '__main__.TwoGaussians'>
Name: TwoGaussians (CompoundModel...)
...
Because the result of the expression Gaussian1D + Gaussian1D is a class, it can be used directly in the standard class declaration syntax class ClassName(Base): as the base. This syntax also has the advantage of allowing a docstring to be assigned to the new class. In future versions it may be possible to customize other aspects of compound model classes in this way. Single model classes can also be given custom names by using rename, and model instances can be given names as well. This can be used to good effect, for example as shown in the section on Indexing and slicing.
So far we have seen how to create compound model classes from expressions involving other model classes. This is the most “generic” way to create new models from existing models. However, many may find it more useful most of the time, especially when providing an initial guess to a fitter, to create a new model from a combination of model instances with already defined parameter values. This can also be done and works mostly the same way:
>>> both_gaussians = Gaussian1D(1, 0, 0.2) + Gaussian1D(2.5, 0.5, 0.1)
>>> both_gaussians
<CompoundModel...(amplitude_0=1.0, mean_0=0.0, stddev_0=0.2, amplitude_1=2.5, mean_1=0.5, stddev_1=0.1)>
Unlike when a model was created from model classes, this expression does not directly return a new class; instead it creates a model instance that is ready to be used for evaluation:
>>> both_gaussians(0.2)
0.6343031510582392
This was found to be much more convenient and natural, in this case, than returning a class. It is worth understanding that the way this works under the hood is to create the compound class, and then immediately instantiate it with the already known parameter values. We can see this by checking the type of both_gaussians:
>>> type(both_gaussians)
<class '__main__.CompoundModel...'>
Name: CompoundModel...
Inputs: ('x',)
Outputs: ('y',)
Fittable parameters: ('amplitude_0', 'mean_0', 'stddev_0', 'amplitude_1', 'mean_1', 'stddev_1')
Expression: [0] + [1]
Components:
[0]: <Gaussian1D(amplitude=1.0, mean=0.0, stddev=0.2)>
[1]: <Gaussian1D(amplitude=2.5, mean=0.5, stddev=0.1)>
It is also possible, and sometimes useful, to make a compound model from a combination of classes and instances in the same expression:
>>> from astropy.modeling.models import Linear1D, Sine1D
>>> MyModel = Linear1D + Sine1D(amplitude=1, frequency=1)
>>> MyModel
<class '__main__.CompoundModel...'>
Name: CompoundModel...
Inputs: ('x',)
Outputs: ('y',)
Fittable parameters: ('slope_0', 'intercept_0', 'amplitude_1', 'frequency_1')
Expression: [0] + [1]
Components:
[0]: <class 'astropy.modeling.functional_models.Linear1D'>
Name: Linear1D
Inputs: ('x',)
Outputs: ('y',)
Fittable parameters: ('slope', 'intercept')
[1]: <Sine1D(amplitude=1.0, frequency=1.0)>
In this case the result is always a class. However (and this is not immediately obvious by the representation) the difference is that the amplitude and frequency parameters for the Sine1D part of the model are “baked into” the class as default values for those parameters. So it is possible to instantiate one of these models by specifying just the slope and intercept parameters for the Linear1D part of the model:
>>> my_model = MyModel(1, 0)
>>> my_model(0.25) # doctest +FLOAT_CMP
1.25
This does not prevent the other parameters from being overridden, however:
>>> my_model = MyModel(slope_0=1, intercept_0=0, frequency_1=2)
>>> my_model(0.125) # doctest +FLOAT_CMP
1.125
In fact, this is currently the only way to use a polynomial model in a compound model, because the design of the polynomial models is currently such that they must be instantiated in order to specify their polynomial degree. Because the polynomials are already designed so that their coefficients all default to zero, this “limitation” should not have any practical drawbacks.
Note
There is currently a caveat in the example of combining model classes and instances, which is that the parameter values of model instances are only treated as defaults if the expression is written in such a way that all model instances are to the right of all model classes. This limitation will be lifted in a later version–in particular, Python 3 offers a lot more flexibility with respect to how function arguments are handled.
Compound models can be created from expressions that include any number of the arithmetic operators +, -, *, /, and **, which have the same meanings as they do for other numeric objects in Python.
Note
In the case of division / always means floating point division–integer division and the // operator is not supported for models).
As demonstrated in previous examples, for models that have a single output the result of evaluating a model like A + B is to evaluate A and B separately on the given input, and then return the sum of the outputs of A and B. This requires that A and B take the same number of inputs and both have a single output.
It is also possible to use arithmetic operators between models with multiple outputs. Again, the number of inputs must be the same between the models, as must be the number of outputs. In this case the operator is applied to the operators element-wise, similarly to how arithmetic operators work on two Numpy arrays.
The sixth binary operator that can be used to create compound models is the composition operator, also known as the “pipe” operator | (not to be confused with the boolean “or” operator that this implements for Python numeric objects). A model created with the composition operator like M = F | G, when evaluated, is equivalent to evaluating .
Note
The fact that the | operator has the opposite sense as the functional composition operator is sometimes a point of confusion. This is in part because there is no operator symbol supported in Python that corresponds well to this. The | operator should instead be read like the pipe operator of UNIX shell syntax: It chains together models by piping the output of the left-hand operand to the input of the right-hand operand, forming a “pipeline” of models, or transformations.
This has different requirements on the inputs/outputs of its operands than do the arithmetic operators. For composition all that is required is that the left-hand model has the same number of outputs as the right-hand model has inputs.
For simple functional models this is exactly the same as functional composition, except for the aforementioned caveat about ordering. For example:
import numpy as np
from astropy.modeling.models import Redshift, Gaussian1D
class RedshiftedGaussian(Redshift | Gaussian1D(1, 0.75, 0.1)):
"""Evaluates a Gaussian with optional redshift applied to the input."""
x = np.linspace(0, 1.2, 100)
g0 = RedshiftedGaussian(z_0=0)
plt.figure(figsize=(8, 3))
plt.plot(x, g0(x), 'g--', lw=2, label='$z=0$')
for z in (0.2, 0.4, 0.6):
g = RedshiftedGaussian(z_0=z)
plt.plot(x, g(x), color=plt.cm.OrRd(z), lw=2,
label='$z={0}$'.format(z))
plt.xlabel('Energy')
plt.ylabel('Flux')
plt.legend()
(Source code, png, hires.png, pdf)
When working with models with multiple inputs and outputs the same idea applies. If each input is thought of as a coordinate axis, then this defines a pipeline of transformations for the coordinates on each axis (though it does not necessarily guarantee that these transformations are separable). For example:
import numpy as np
from astropy.modeling.models import Rotation2D, Gaussian2D
class RotatedGaussian(Rotation2D | Gaussian2D(1, 0, 0, 0.1, 0.3)):
"""A Gaussian2D composed with a coordinate rotation."""
x, y = np.mgrid[-1:1:0.01, -1:1:0.01]
plt.figure(figsize=(8, 2.5))
for idx, theta in enumerate((0, 45, 90)):
g = RotatedGaussian(theta)
plt.subplot(1, 3, idx + 1)
plt.imshow(g(x, y), origin='lower')
plt.xticks([])
plt.yticks([])
plt.title('Rotated $ {0}^\circ $'.format(theta))
(Source code, png, hires.png, pdf)
Note
The above example is a bit contrived in that Gaussian2D already supports an optional rotation parameter. However, this demonstrates how coordinate rotation could be added to arbitrary models.
Normally it is not possible to compose, say, a model with two outputs and a function of only one input:
>>> from astropy.modeling.models import Rotation2D
>>> Rotation2D | Gaussian1D
Traceback (most recent call last):
...
ModelDefinitionError: Unsupported operands for |: Rotation2D (n_inputs=2, n_outputs=2) and Gaussian1D (n_inputs=1, n_outputs=1); n_outputs for the left-hand model must match n_inputs for the right-hand model.
However, as we will see in the next section, Model concatenation, provides a means of creating models that apply transformations to only some of the outputs from a model, especially when used in concert with mappings.
The concatenation operator &, sometimes also referred to as a “join”, combines two models into a single, fully separable transformation. That is, it makes a new model that takes the inputs to the left-hand model, concatenated with the inputs to the right-hand model, and returns a tuple consisting of the two models’ outputs concatenated together, without mixing in any way. In other words, it simply evaluates the two models in parallel–it can be thought of as something like a tuple of models. For example, given two coordinate axes, we can scale each coordinate by a different factor by concatenating two Scale models:
>>> from astropy.modeling.models import Scale
>>> separate_scales = Scale(factor=1.2) & Scale(factor=3.4)
>>> separate_scales(1, 2)
(1.2, 6.8)
We can also combine concatenation with composition to build chains of transformations that use both “1D” and “2D” models on two (or more) coordinate axes:
>>> scale_and_rotate = ((Scale(factor=1.2) & Scale(factor=3.4)) |
... Rotation2D(90))
>>> scale_and_rotate.n_inputs
2
>>> scale_and_rotate.n_outputs
2
>>> scale_and_rotate(1, 2)
(-6.8, 1.2)
This is of course equivalent to an AffineTransformation2D with the appropriate transformation matrix:
>>> from numpy import allclose
>>> from astropy.modeling.models import AffineTransformation2D
>>> affine = AffineTransformation2D(matrix=[[0, -3.4], [1.2, 0]])
>>> # May be small numerical differences due to different implementations
>>> allclose(scale_and_rotate(1, 2), affine(1, 2))
True
As seen in some of the previous examples in this document, when creating a compound model each component of the model is assigned an integer index starting from zero. These indices are assigned simply by reading the expression that defined the model, from left to right, regardless of the order of operations. For example:
>>> from astropy.modeling.models import Const1D
>>> A = Const1D.rename('A')
>>> B = Const1D.rename('B')
>>> C = Const1D.rename('C')
>>> M = A + B * C
>>> M
<class '__main__.CompoundModel...'>
Name: CompoundModel...
...
Expression: [0] + [1] * [2]
Components:
[0]: <class '__main__.A'>
Name: A (Const1D)
...
[1]: <class '__main__.B'>
Name: B (Const1D)
...
[2]: <class '__main__.C'>
Name: C (Const1D)
...
In this example the expression is evaluated (B * C) + A–that is, the multiplication is evaluated before the addition per usual arithmetic rules. However, the components of this model are simply read off left to right from the expression A + B * C, with A -> 0, B -> 1, C -> 2. If we had instead defined M = C * B + A then the indices would be reversed (though the expression is mathematically equivalent). This convention is chosen for simplicity–given the list of components it is not necessary to jump around when mentally mapping them to the expression.
We can pull out each individual component of the compound model M by using indexing notation on it. Following from the above example, M[1] should return the model B:
>>> M[1]
<class '__main__.B'>
Name: B (Const1D)
Inputs: ('x',)
Outputs: ('y',)
Fittable parameters: ('amplitude',)
We can also take a slice of the compound model. This returns a new compound model that evaluates the subexpression involving the models selected by the slice. This follows the same semantics as slicing a list or array in Python. The start point is inclusive and the end point is exclusive. So a slice like M[1:3] (or just M[1:]) selects models B and C (and all operators between them). So the resulting model evaluates just the subexpression B * C:
>>> M[1:]
<class 'astropy.modeling.utils.CompoundModel...'>
Name: CompoundModel...
Inputs: ('x',)
Outputs: ('y',)
Fittable parameters: ('amplitude_1', 'amplitude_2')
Expression: [0] * [1]
Components:
[0]: <class '__main__.B'>
Name: B (Const1D)
...
[1]: <class '__main__.C'>
Name: C (Const1D)
...
The new compound model for the subexpression can be instantiated and evaluated like any other:
>>> m = M[1:](2, 3)
>>> m
<CompoundModel...(amplitude_1=2.0, amplitude_2=3.0)>
>>> m(0)
6.0
Although the model M was composed entirely of Const1D models in this example, it was useful to give each component a unique name (A, B, C) in order to differentiate between them. This can also be used for indexing and slicing:
>>> M['B']
<class '__main__.B'>
Name: B (Const1D)
Inputs: ('x',)
Outputs: ('y',)
Fittable parameters: ('amplitude',)
In this case M['B'] is equivalent to M[1]. But by using the name we do not have to worry about what index that component is in (this becomes especially useful when combining multiple compound models). A current limitation, however, is that each component of a compound model must have a unique name–if some components have duplicate names then they can only be accessed by their integer index. This may improve in a future release.
Slicing also works with names. When using names the start and end points are both inclusive:
>>> M['B':'C']
<class 'astropy.modeling.utils.CompoundModel...'>
...
Expression: [0] * [1]
Components:
[0]: <class '__main__.B'>
Name: B (Const1D)
...
[1]: <class '__main__.C'>
Name: C (Const1D)
...
So in this case M['B':'C'] is equivalent to M[1:3].
All of the above applies equally well to compound models composed of model instances. Individual model instances can be given a name by passing in the name= argument when instantiating them. These names are used in the same was as class names were in the class-based examples:
>>> a = Const1D(amplitude=1, name='A')
>>> b = Const1D(amplitude=2, name='B')
>>> c = Const1D(amplitude=3, name='C')
>>> m = a + b * c
Because this model is composed entirely of constants it doesn’t matter what input we pass in, so 0 is used without loss of generality:
>>> m(0)
7.0
>>> m[1:](0) # b * c
6.0
>>> m['A':'B'](0) # a + b
3.0
>>> m['B':'C'](0) # b * c, again
6.0
A question that frequently comes up when first encountering compound models is how exactly all the parameters are dealt with. By now we’ve seen a few examples that give some hints, but a more detailed explanation is in order. This is also one of the biggest areas for possible improvements–the current behavior is meant to be practical, but is not ideal. (Some possible improvements include being able to rename parameters, and providing a means of narrowing down the number of parameters in a compound model.)
As explained in the general documentation for model parameters, every model has an attribute called param_names that contains a tuple of all the model’s adjustable parameters. These names are given in a canonical order that also corresponds to the order in which the parameters should be specified when instantiating the model.
The simple scheme used currently for naming parameters in a compound model is this: The param_names from each component model are concatenated with each other in order from left to right as explained in the section on Indexing and slicing. However, each parameter name is appended with _<#>, where <#> is the index of the component model that parameter belongs to. For example:
>>> Gaussian1D.param_names
('amplitude', 'mean', 'stddev')
>>> (Gaussian1D + Gaussian1D).param_names
('amplitude_0', 'mean_0', 'stddev_0', 'amplitude_1', 'mean_1', 'stddev_1')
For consistency’s sake, this scheme is followed even if not all of the components have overlapping parameter names:
>>> from astropy.modeling.models import Redshift
>>> (Redshift | (Gaussian1D + Gaussian1D)).param_names
('z_0', 'amplitude_1', 'mean_1', 'stddev_1', 'amplitude_2', 'mean_2',
'stddev_2')
On some level a scheme like this is necessary in order for the compound model to maintain some consistency with other models with respect to the interface to its parameters. However, if one gets lost it is also possible to take advantage of indexing to make things easier. When returning a single component from a compound model the parameters associated with that component are accessible through their original names, but are still tied back to the compound model:
>>> a = Gaussian1D(1, 0, 0.2, name='A')
>>> b = Gaussian1D(2.5, 0.5, 0.1, name='B')
>>> m.amplitude_0
Parameter('amplitude_0', value=1.0)
is equivalent to:
>>> m['A'].amplitude
Parameter('amplitude', value=1.0)
You can think of these both as different “views” of the same parameter. Updating one updates the other:
>>> m.amplitude_0 = 42
>>> m['A'].amplitude
Parameter('amplitude', value=42.0)
>>> m['A'].amplitude = 99
>>> m.amplitude_0
Parameter('amplitude_0', value=99.0)
Note, however, that the original Gaussian1D instance a has not been updated:
>>> a.amplitude
Parameter('amplitude', value=1.0)
This is because currently, when a compound model is created, copies are made of the original models.
We have seen in some previous examples how models can be chained together to form a “pipeline” of transformations by using model composition and concatenation. To aid the creation of more complex chains of transformations (for example for a WCS transformation) a new class of “mapping” models is provided.
Mapping models do not (currently) take any parameters, nor do they perform any numeric operation. They are for use solely with the concatenation (&) and composition (|) operators, and can be used to control how the inputs and outputs of models are ordered, and how outputs from one model are mapped to inputs of another model in a composition.
Currently there are only two mapping models: Identity, and (the somewhat generically named) Mapping.
The Identity mapping simply passes one or more inputs through, unchanged. It must be instantiated with an integer specifying the number of inputs/outputs it accepts. This can be used to trivially expand the “dimensionality” of a model in terms of the number of inputs it accepts. In the section on concatenation we saw an example like:
>>> m = (Scale(1.2) & Scale(3.4)) | Rotation2D(90)
where two coordinate inputs are scaled individually and then rotated into each other. However, say we wanted to scale only one of those coordinates. It would be fine to simply use Scale(1) for one them, or any other model that is effectively a no-op. But that also adds unnecessary computational overhead, so we might as well simply specify that that coordinate is not to be scaled or transformed in any way. This is a good use case for Identity:
>>> from astropy.modeling.models import Identity
>>> m = Scale(1.2) & Identity(1)
>>> m(1, 2)
(1.2, 2.0)
This scales the first input, and passes the second one through unchanged. We can use this to build up more complicated steps in a many-axis WCS transformation. If for example we had 3 axes and only wanted to scale the first one:
>>> m = Scale(1.2) & Identity(2)
>>> m(1, 2, 3)
(1.2, 2.0, 3.0)
(Naturally, the last example could also be written out Scale(1.2) & Identity(1) & Identity(1).)
The Mapping model is similar in that it does not modify any of its inputs. However, it is more general in that it allows inputs to be duplicated, reordered, or even dropped outright. It is instantiated with a single argument: a tuple, the number of items of which correspond to the number of outputs the Mapping should produce. A 1-tuple means that whatever inputs come in to the Mapping, only one will be output. And so on for 2-tuple or higher (though the length of the tuple cannot be greater than the number of inputs–it will not pull values out of thin air). The elements of this mapping are integers corresponding to the indices of the inputs. For example, a mapping of Mapping((0,)) is equivalent to Identity(1)–it simply takes the first (0-th) input and returns it:
>>> from astropy.modeling.models import Mapping
>>> m = Mapping((0,))
>>> m(1.0)
1.0
Likewise Mapping((0, 1)) is equivalent to Identity(2), and so on. However, Mapping also allows outputs to be reordered arbitrarily:
>>> m = Mapping((1, 0))
>>> m(1.0, 2.0)
(2.0, 1.0)
>>> m = Mapping((1, 0, 2))
>>> m(1.0, 2.0, 3.0)
(2.0, 1.0, 3.0)
Outputs may also be dropped:
>>> m = Mapping((1,))
>>> m(1.0, 2.0)
2.0
>>> m = Mapping((0, 2))
>>> m(1.0, 2.0, 3.0)
(1.0, 3.0)
Or duplicated:
>>> m = Mapping((0, 0))
>>> m(1.0)
(1.0, 1.0)
>>> m = Mapping((0, 1, 1, 2))
>>> m(1.0, 2.0, 3.0)
(1.0, 2.0, 2.0, 3.0)
A complicated example that performs multiple transformations, some separable, some not, on three coordinate axes might look something like:
>>> from astropy.modeling.models import Polynomial1D as Poly1D
>>> from astropy.modeling.models import Polynomial2D as Poly2D
>>> m = ((Poly1D(3, c0=1, c3=1) & Identity(1) & Poly1D(2, c2=1)) |
... Mapping((0, 2, 1)) |
... (Poly2D(4, c0_0=1, c1_1=1, c2_2=2) & Gaussian1D(1, 0, 4)))
...
>>> m(2, 3, 4)
(41617.0, 0.7548396019890073)
This expression takes three inputs: , , and . It first takes and . Then it remaps the axes so that and are passed in to the Polynomial2D to evaluate , while simultaneously evaluating a Gaussian on . The end result is a reduction down to two coordinates. You can confirm for yourself that the result is correct.
This opens up the possibility of essentially arbitrarily complex transformation graphs. Currently the tools do not exist to make it easy to navigate and reason about highly complex compound models that use these mappings, but that is a possible enhancement for future versions.


Coming off of fresh quarter final wins, Bboy Cloud and Bboy Neguin go toe-to-toe in this semi-final round to have a stab at becoming the Red Bull BC One 2009 champion!


Reports calls without argument clauses referring to methods with an empty parameter clause.
The convention is that a method should have parentheses if it has side effects. While it is possible to leave out argument clauses in method calls (to adapt the uniform access principle for Java), it is recommended for users to add one empty argument clause when the invoked method represents more than a property.
The quick-fix adds an empty argument clause.
Example:
def test(): Int = ???
test
After the quick-fixes are applied:
def test(): Int = ???
test()


Keynote Speakers
Kate Chapman
Kate Chapman is the Chairperson of the OpenStreetMap Foundation. She is recognized as a leader in the domains of open-source geospatial technology and community mapping, and an advocate for open imagery as a public good. Over the past 15 years she’s worked on geospatial problems of all kinds, including tracking malaria outbreaks, mapping private residences for emergency response, and even analyzing imaginary items used in geospatial games. Currently, Kate works as a Principal at Cascadia Technical Mentorship providing advice to non-profits on technology and organizational management.
Dr. Lee Schwartz
Lee Schwartz is the Geographer of the Department of State and the Director of its Office of the Geographer and Global Issues. Dr. Schwartz directs research and analysis on global issues primarily related to complex humanitarian emergencies and has coordinated related fieldwork and applied geography projects overseas – with an emphasis on Geographic Information Systems (GIS) and Remote Sensing information coordination, as well as Participatory Mapping. He is a recipient of the State Department’s Christopher Award for Outstanding Achievement in Global Affairs, the AAG’s Anderson Medal of Honor in Applied Geography and the AGS’s Cullum Medal for the advancement of geographical science.
Prof. Taichi Furuhashi
Taichi Furuhashi is passionate about mapping, connecting local communities with maps and sharing knowledge to empower people. As you know, Huge Earthquake and Tsunami destroyed a lot of cities and local communities in East Japan area in 2011. They are trying to make more resilient society with Mapping, Panorama/VR and Drone technology. Taichi is a professor of Aoyamagakuin University and President of CrisisMappers Japan.


 That's a BIG DEAL. But it does not have to be.
Date of incorporation : 2012-10-10
place of incorp : Singapore
No of employees : 100
Business Address : #19-24 King Cross Road Singapore
Industry : Technology Start up
Business Premises: Owned (fully paid)
Main operating account bank: OCBC
| 2013 | 2014 | |
|---|---|---|
| Is your Financials audited? | Yes | Yes |
| Qualified/ Unqualified | Unqualified | Unqualified |
| Auditors name | E&Y | E&Y |
| - Annual sales turnover | 4,350 | 6,000 |
| - Gross Profit | 435 | 1,500 |
| - Net profit before tax | 131 | 480 |
| - Cash balance | 1,000 | 2,000 |
| - Total Assets | 3,850 | 6,000 |
| - Liabilities/ Borrowings | 500 | 800 |
| - Networth | 3,350 | 5,200 |
| Ratios | ||
| Gross margin (%) | 10% | 25% |
| Net profit margin before tax (%) | 3% | 8% |
| Current ratio (x) | 1.23 | 1.46 |
| D/E (x) | 0.15 | 0.15 |
| - Name (according to passport/ID) | Shubham Goyal | |
| - Functionality | CTO | |
| - Age | 21 | |
| - Nationality | Indian | |
| - Annual Income | 7900 | |
| - Owned properties (without mortgage) | Yes | |
| - Estimated Total Properties value | USD1000000 |


[gecode-users] Scheduling A Propagator After Backtrack
Christian Schulte
cschulte at kth.se
Wed Apr 20 16:35:48 CEST 2016
No, you need to keep advisor and council: they will not take much memory, it’s really the sets that eat memory. That might mean that you have to take out the integer set information from your advisors (you do not say so but that is my guess here). Subscriptions by propagators also take memory!
Then you need to check the flag when an advisor is run. That should work.
Cheers
Christian
--
Christian Schulte, www.gecode.org/~schulte
Professor of Computer Science, KTH, <mailto:cschulte at kth.se> cschulte at kth.se
Expert Researcher, SICS, <mailto:cschulte at sics.se> cschulte at sics.se
From: Yunus Acikoz [mailto:yunusacikoz at gmail.com]
Sent: Wednesday, April 20, 2016 09:52
To: Christian Schulte
Cc: users at gecode.org
Subject: Re: [gecode-users] Scheduling A Propagator After Backtrack
Using a flag is a good idea, but without initializing the council and the advisors, there's nothing to run the propagator if I understood correctly. Am I right?
How about subscribing the propagator to views in the beginning and then canceling the subscription once the advisors are initialized in the first call of propagate()? To be honest, it doesn't sound very wise to me but just an idea.
About the previous domain thing: I need to know which values are removed from my integer views to use them in a labeling algorithm. That was the only way I could think of.
Cheers,
Yunus Acikoz
On Wed, Apr 20, 2016 at 10:33 AM, Christian Schulte <cschulte at kth.se> wrote:
Hi Yunus,
The point is: you cannot schedule a propagator during copying (the system will crash).
Copying lazily is normally an excellent idea, many Gecode propagators do it. One way to do it is to use a flag whether the propagator has been run. When you clone the propagator you set it to false and in the propagate() function you can check whether you have run the propagator.
Would that do for you?
Storing the whole previous domain sounds very excessive to me, though and integer sets are definitely not an efficient data structure for that purpose. Maybe you could also start thinking about maintaining less information?
Hope that helps.
Cheers
Christian
--
Christian Schulte, www.gecode.org/~schulte
Professor of Computer Science, KTH, cschulte at kth.se
Expert Researcher, SICS, cschulte at sics.se
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf Of Yunus Acikoz
Sent: Wednesday, April 20, 2016 09:11
To: users at gecode.org
Subject: [gecode-users] Scheduling A Propagator After Backtrack
Hi,
I would like to know if it's possible to schedule a custom propagator such that it is immediately propagated after backtracking. I mean something like executing the code below in the copy function of the propagator:
auto copy_propagator = new(home)AdvisedPropagator(home, share, *this);
Gecode::Int::IntView::schedule(home, *copy_propagator, Gecode::Int::ME_INT_DOM);
So the newly generated copy of the propagator (without its council being copied) is scheduled to be run when the search engine turns back to that node. Does it make sense at all?
I use advisors and they consume too much memory. Each advisor holds the previous state of the domain of its subscribed view as an IntSet, an unsigned short index and an enum to keep info about which variable array it belongs to.
I want to initialize advisors lazily, so that they are only created when the propagator is actually used. I thought maybe I could do it in "propagate" function with an initial propagation.
Thanks in advance,
Cheers,
Yunus Acikoz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20160420/8da981bb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4623 bytes
Desc: not available
URL: <http://www.gecode.org/pipermail/users/attachments/20160420/8da981bb/attachment.bin>
More information about the users
mailing list


A few general patterns are evident in this dataset. Firstly, 2013 and 2014 had lower minimum temperatures than did 2012 and 2015. Also, in complement with the maximum temperature data, the lower temperatures occur in Northern Iowa while the higher temperatures occur in Southern Iowa with Central Iowa falling in between. Remember however that these are simply the minimum temperatures. Compare this data with that of Iowa's maximum temperatures for a better idea of overall temperature patterns throughout the state. A look at meteorological data and other information on the national and continental climate might help to explain these observations. A future study could look into whether or not these locations and temperature patterns are applicable only to this time period or if these observations are a part of a larger pattern. Compare these patterns with those of the other map groups in this lab. More general observations about the meaning of all of these datasets together can be found on the Lab 3 page.


{% extends "base.html" %} {% block content %} {% from "_formhelpers.html" import bs_render_field %}
This is a "QR code". You can use an application on your phone, like Google Authenticator or Authy, to scan the code. Once that's done, you should see a 6 digit number that changes every 30 seconds.
Enter that number here, and press Submit:


The action part of a breakpoint spec supplies information to the debugger as to what should be done when the breakpoint is activated. This is achieved by setting the three so called debugger action variables. These are listed below, together with their most important values.
show
variable prescribes how the debugged goal should
be displayed:
command
variable prescribes what the debugger should do:
ask
proceed
flit
mode
variable prescribes in what mode the debugger should
continue the execution:
trace
debug
zip
off
For example, the breakpoint below specifies that whenever the Exit
port of foo/2
is reached, no trace message should be
output, no interaction should take place and the debugger should be
switched off.
| ?- add_breakpoint([pred(foo/2),port(exit)]- [show(silent),command(proceed),mode(off)], _).
Here, the action part consists of three actions, setting the three
action variables. This breakpoint spec can be simplified by
omitting the wrappers around the variable values, as the sets of
possible values of the variables are all disjoint. If we use
spy/2
, the pred
wrapper goes away, too, resulting in a
much more concise, equivalent formulation of the above breakpoint:
| ?- spy(foo/2,exit-[silent,proceed,off]).
Let us now revisit the process of breakpoint selection. When the debugger arrives at a port it first initializes the action variables according to the current debugging and leashing modes, as shown below:
debugging leashing | Action variables mode mode | show command mode --------------------------------|------------------------------- trace at leashed port | print ask trace | trace at unleashed port | print proceed trace | debug - | silent proceed debug | zip - | silent flit zip
It then considers each breakpoint, most recent first, until it
finds a breakpoint whose test part succeeds. If such a
breakpoint is found, its action part is evaluated, normally
changing the action variable settings. A failure of the action part is
ignored, in the sense that the breakpoint is still treated as the
selected one. However, as a side-effect, a procedure box
will always be built in such cases. More precisely, the failure of the
action part causes the flit
command value to be changed to
proceed
, all other command values being left unchanged. This is
to facilitate the creation of breakpoints that stop at non-Call
ports (see below for an example).
If no applicable breakpoint is found, the action variables remain unchanged.
The debugger then executes the actions specified by the action variables. This process, referred to as the action execution, means the following:
mode
action variable.
show
variable.
command
variable.
Specifically, if command
is ask
, the user is prompted
for a debugger command, which in turn is converted to new assignments to
the action variables. The debugger will then repeat the action execution
process, described above. For example, the `c' (creep) interactive
command is converted to [silent,proceed,trace]
, the `d'
(display) command to [display,ask]
(when command is ask
,
the mode is irrelevant), etc.
The default values of the action variables correspond to the standard debugger behavior described in Basic Debug. For example, when an unleashed port is reached in trace mode, a trace message is printed and the execution proceeds in trace mode, without stopping. In zip mode, no trace message is shown, and execution continues in zip mode, without building procedure boxes at Call ports.
Note that a spypoint action part that is empty ([]
or not
present) is actually treated as [print,ask]
. Again, this is the
standard behavior of spypoints, as described in Basic Debug.
If an action part is nonempty, but it does not set the action variables, the only effect it will have is to hide the remaining older spypoints, as the debugger will behave in the standard way, according to the debugging mode. Still, such breakpoints may be useful if they have side-effects, for example:
| ?- spy(foo/2, -[parent_pred(P), goal(G), true(format('~q called from:~w~n',[G,P]))]). % The debugger will first zip -- showing spypoints (zip) % Conditional spypoint for user:foo/2 added, BID=1 true % zip | ?- foo(3,X). foo(2,_701) called from:bar/3 foo(1,_1108) called from:bar/3 foo(0,_1109) called from:bar/3 foo(1,_702) called from:bar/3 X = 2 ? ; no
This spypoint produces some output at ports of foo/2
,
but otherwise will not influence the debugger. Notice that a
breakpoint spec with an empty test part can be written
-
Actions.
Let us look at some simple examples of what other effects can be achieved by appropriate action variable settings:
| ?- spy(foo/2, -[print,proceed]).
This is an example of an unleashed spypoint: it will print a
trace message passing each port of foo/2
, but will not stop
there. Note that because of the proceed
command a procedure
box will be built, even in zip mode, and so the debugger will be
activated at non-Call ports of foo/2
.
The next example is a variant of the above:
| ?- spy(foo/2, -[print,flit]).
This will print a trace message at the Call port of foo/2
and will then continue the execution in the current debugging mode,
without building a procedure box for this call. This means that
the debugger will not be able to notice any other ports of
foo/2
.
Now let us address the task of stopping at a specific non-Call
port of a predicate. For this to work in zip mode, one
has to ensure that a procedure box is built at the Call
port. In the following example, the first spypoint causes a
box to be built for each call of foo/2
, while the second one
makes the debugger stop when the Fail port of foo/2
is
reached.
| ?- spy(foo/2, call-proceed), spy(foo/2, fail). % Conditional spypoint for user:foo/2 added, BID=1 % Conditional spypoint for user:foo/2 added, BID=2
You can achieve the same effect with a single spypoint, by putting
the fail
condition (which is a shortcut for port(fail)
) in
the action part, rather than in the test part.
| ?- spy(foo/2, -[fail,print,ask]).
Here, when the execution reaches the Call port of foo/2
,
the test part (which contains the pred(foo/2)
condition only)
succeeds, so the breakpoint is found applicable. However, the
action part fails at the Call port. This has a side-effect
in zip mode, as the default flit
command value is changed
to proceed
. In other modes the action variables are
unaffected. The net result is that a procedure box is always built
for foo/2
, which means that the debugger will actually reach the
Fail port of this predicate. When this happens, the action
part succeeds, and executing the actions print,ask
will cause the
debugger to stop.
Note that we have to explicitly mention the print,ask
actions
here, because the action part is otherwise nonempty (contains the
fail
condition). It is only the empty or missing action part,
which is replaced by the default [print,ask]
. If you want to
include a condition in the action part, you have to explicitly mention
all action variable settings you need.
To make this simpler, the debugger handles breakpoint condition
macros, which expand to other conditions. For example leash
is a
macro that expands to [print,ask]
. Consequently, the last example
can be simplified to:
| ?- spy(foo/2, -[fail,leash]).
Similarly, the macro unleash
expands to [print,proceed]
,
while hide
to [silent,proceed]
.
We now briefly describe further possible settings to the action variables.
The mode
variable can be assigned the values
skip(
Inv)
and qskip(
Inv)
, meaning skipping and
quasi-skipping until a port is reached whose invocation number is
less or equal to Inv. When the debugger arrives at this port
it sets the mode
variable to trace
.
It may be surprising that skip(...)
is a mode, rather than a
command. This is because commands are executed and immediately
forgotten, but skipping has a lasting effect: the program is to be
run with no debugging until a specific point, without creating new
procedure boxes, and ignoring the existing ones in the meantime.
Here is an example using the skip
mode:
| ?- spy(foo/2,call-[print,proceed,inv(Inv),skip(Inv)]).
This breakpoint will be found applicable at Call ports of
foo/2
. It will print a trace message there and will skip over to
the Exit or Fail port without stopping. Notice that the number of
the current invocation is obtained in the action part, using the
inv
condition with a variable argument. A variant of
this example follows:
| ?- spy(foo/2,-[silent,proceed, ( call -> inv(Inv), skip(Inv) ; true )]).
This spypoint makes foo/2
invisible in the output of the
debugger: at all ports we silently proceed (i.e. display nothing
and do not stop). Furthermore, at the Call port we perform a
skip, so neither foo/2
itself, nor any predicate called
within it will be shown by the debugger.
Notice the use of the true/0
test in the above conditional! This
is a breakpoint test that always succeeds. The debugger also
recognizes false
as a test that always fails. Note that while
false
and fail
are synonyms as built-in predicates,
they are completely different as breakpoint conditions: the latter
is a shortcut for port(fail)
.
The show
variable has four additional value patterns. Setting it
to display
, write
, or write_term(
Options)
will result in the debugged goal G being shown using
display(
G)
, writeq(
G)
, or
write_term(
G,
Options)
, respectively. The fourth
pattern, Method-
Sel, can be used for replacing the
goal in the trace message by one of its subterms, the one
pointed to by the selector Sel.
For example, the following spypoint instructs the debugger to stop
at each port of foo/2
, and to only display the first
argument of foo/2
in the trace message, instead of the
complete goal.
| ?- spy(foo/2, -[print-[1],ask]). % Conditional spypoint for user:foo/2 added, BID=1 | ?- foo(5,X). * 1 1 Call: ^1 5 ?
The command
variable has several further value patterns. The
variable can be set to proceed(
OldGoal,
NewGoal)
. At a
Call port this instructs the debugger to first build a
procedure box for the current goal, then to unify it
with OldGoal and finally execute NewGoal in its place (cf.
the `u' (unify) interactive debugger command). At non-Call
ports this command first goes back to the Call port (cf.
the `r' (retry) command), and then does the above activities.
A variant of the proceed/2
command is
flit(
OldGoal,
NewGoal)
. This has the same effect,
except for not building a procedure box for OldGoal.
We now just briefly list further command values (for the details, see
Action Variables). Setting command
to
exception(
E)
will raise an exception E, abort
will abort the execution. The values retry(
Inv)
,
reexit(
Inv)
, redo(
Inv)
, fail(
Inv)
will cause the debugger to go back to an earlier Call, Exit, Redo, or
Fail port with invocation number Inv (cf. the `j'
(jump) interactive debugger command).
Sometimes it may be useful to access the value of an action
variable. This can be done with the get
condition: e.g.
get(mode(M))
will unify M
with the current execution
mode. The get(...)
wrapper can be omitted in the test part,
but not in the action part (since there a mode(M)
action will
set, rather than read, the mode action variable). For example:
| ?- spy(foo/2, mode(trace)-show(print-[1])).
This spypoint will be found applicable only in trace mode
(and will cause the first argument of foo/2
to appear in
the trace message). (The mode
and show
wrappers can also
be omitted in the above example, they are used only to help with interpreting
the breakpoint spec.)


My To-Do List
The different routes I have set up will allow me to manage a basic To-Do list. I will be able to view all entries by status, view specific entries by id, and add, modify, and remove entries.
Get Requests:
Show all entriesShow all open entries
Show all completed entries


Graph Suite¶
Contains all functionality needed to plot functions easily. Uses pyplot from matplotlib.
IntervalPlot3D – takes a function in R3, an x domain, and a y domain, and plots the function at all points on those domains.
barGraph – takes some data points and plots them as a series of bars, with optionally specifiable tick labels.
plot2D – takes a set of data with two columns and plots the data, where markers for the data set can be specified.
plotmult2D – takes two data sets and plots each, where each data set is like the input for plot2D.
-
graph_suite.
IntervalPlot3D
(function, x_domain, y_domain, xlabel='', ylabel='', zlabel='', title='', fontsize=30)¶ Plots a function over a given domain, allowing the user to provide labels for the axes.
Requires a user to provide a function, and x_domain, and a y_domain. Keyword args:
The three labels for the axesxlabelylabelzlabeltitle - The title of the chartfontsize - Override the default font size, which is 14
-
graph_suite.
barGraph
(data, ylabel='', title='', xticklabels=None)¶ Displays all of the data points in data as a series of bars.
Optionally a user can provide a label for the y-axis, a title, and tick labels for the bars.
-
graph_suite.
plot2D
(data, xtitle='', ytitle='', title='', marker='b-', fontsize=30)¶ Takes two columns for data, and plots it.
- Keyword arguments (optional):
- axes titlesplot titlemarker (uses pyplot’s standard markers)
-
graph_suite.
plotmult2D
(data1, data2, xtitle='', ytitle='', title='', marker1='b-', marker2='r^', fontsize=30)¶ Similar to plot2D, but plots 2 data sets.
Takes two datasets, each consisting of two columns.
- Keyword arguments (optional):
- axes labelsplot titlemarkers


Who are we?
We are a team of computer science students and physics students from St Aidan's College (really, we're not from Trevs).
We wanted to create a game that incorporated the theme of 'Breaking Boundaries' as well as being educational.


Trace claims, quotes, and media back to the original context — CWI Library can help you find original sources. So can Google Scholar! For photos, try Tin Eye's Reverse Image Search!
CRAAP test criteria
Currency
Relevance
Authority
Accuracy
Purpose
Blakeslee, S. (2004). The CRAAP test.
Not a "Test"—It's Guidelines
The CRAAP criteria help you decide where to place your trust. They're not a simple litmus test.
Currency
When was this source published?
The timeframe of some information is crucial.
Relevance
Why is this right for this assignment?
Are its approach and depth suitable for your purposes?
Authority
Who wrote this?
Do they have appropriate expertise on this subject?
Accuracy
How does this source support its claims?
Can you check where the authors got their facts & examples?
Purpose
Why was this written?
Is the author trying to benefit personally from this?
CRAAP test criteria
Currency
Relevance
Authority
Accuracy
Purpose
Blakeslee, S. (2004). The CRAAP test.
Map Your Research Process
Take two minutes to write an overview of how and where you research things.


{% for candidate in candidates %} {{candidate.name}} delete star edit {{candidate.cid}} {% empty %}
{{candidate.cid}}
Looks like you have no candidates! Create a new candidate to begin.


This syllabus is subject to change based on specific class needs, especially the schedule. Significant deviations will be discussed in class.
Data structures continues the study of abstraction and programming through a focused study of data structures, algorithms, and abstract data types. The primary focus of this course is the design and development of algorithms and programs using data abstraction and information hiding via abstract data types ADTs. Data abstraction is absolutely fundamental to good programming practice and the management of large scale problems and data sets. This course is designed to round out a student’s understanding of basic computer science concepts while strengthening the program design and development skills through continued use of a test-driven design methodology.
It is imperative that programmers and program designers be able to determine which of the many solutions available is the best for their specific task. Throughout the course, students will focus on to making solid quantitative and qualitative judgments about program efficiency and overall program design choices. Gone are the days when “it works” is a good enough assessment for the quality of a program.
Students will explore the ideas and concepts brought up in class and homework assignments during the weekly lab session. In addition to hands on exercises, lab sessions will be used to explore current, relevant research in computer science.
We will focus on chapter 5 and beyond from the text. This includes, but is not limited to:
The course textbook will be:
Other sources will be posted on this webpage as needed.
This course utilizes the Code::Blocks ide and the GNU compiler for C++ development.
All programs written in this course are required to compile and run on a server running Ubuntu 16.04.3. All students will have access to the departmental server and thereby the above development tools. While development is not required in this environment, failure to properly port a program to the required environment could result in your program not compiling correctly at the time of grading. All software for this course is available free of charge and can be found on the web if students wish to install it on their personal machines.
Late assignments: In general, late assignments will not be accepted. Exceptions may be made only for situations beyond your control. If you feel your reason is justified, schedule a meeting with the instructor to plead your case.
Academic dishonesty: Monmouth College’s official policy on academic dishonesty can be found here. You are responsible for reading and complying with that policy.
In this course, any violation of the academic honesty policy will have varying consequences depending on the severity of the infraction as judged by the instructor. Minimally, a violation will result in an “F” or 0 points on the assignment in question. Additionally, the student’s course grade may be lowered by one letter grade. In severe cases, the student will be assigned a course grade of “F” and dismissed from the class. All cases of academic dishonesty must be reported to the Associate Dean who may decide to recommend further action to the Admissions and Academic Status Committee, including suspension or dismissal. It is assumed that students will educate themselves regarding what is considered to be academic dishonesty, so excuses or claims of ignorance will not mitigate the consequences of any violations
Collaboration: We encourage you to make use of the resources available to you – it is fine to seek help from a friend, tutor, instructor, internet, etc. However, copying of answers and any act worthy of the label of “cheating” is never permissible! It is understandable that when you work with a partner or a group that the resultant product is often extremely similar. This is acceptable but be prepared to be asked to defend your collaborations to the instructor. You should always be able to reproduce an answer on your own, and if you cannot you likely do not really know the material.
One way to collaborate effectively is to avoid taking careful notes during a collaboration session. Discuss the material and sketch out possible solutions on a whiteboard. When you have finished, take a break and then write up your solutions without any help from notes or pictures from the study session. This not only helps avoid violations of academic dishonesty, it also improves your retention of the material!
When assignments are meant to be done in groups, you will be directed to turn in one set of solutions per group. Otherwise, each student must turn in an assignment representing their own work.
Electronic devices: Do not use your phone or other devices in class except where necessary. Any computer or tablet usage should be related to the course. If a device is not being used for Zoom or Socrative it should be put away and turned on silent. Other usage is rude and distracting to others.
General expectations: In short, I expect you to be respectful of others and take responsibility for your own learning. You are here to learn, so work hard and be professional.
Just attending class is not sufficient to truly learn the material. Read the text, use the resources available at Monmouth College, and go beyond the material.
If you miss class, you are responsible for everything covered on that day. College is, in some sense, your job. Take pride in creating quality work. Staple your assignments, label problems, and present your answers neatly and orderly.
Your job is to convince me that you have learned the material – show your work! Even if you do not know a particular answer, guide me through your thought process.
The course workload is as follows:
| Category | Number Of Assignments |
|---|---|
| Labs | 10 |
| Homework | 8–10 |
| Projects | 2 |
| Exams | 7 |
Homework assignments will always either precede a lab to prepare for it or follow a lab to complete it. Students are also encouraged to look at the textbook’s review questions, since the solutions are available online. There will be no dedicated midterm or final exam, but 7 exams spaced throughout the semester. Each exam will focus primarily, but not necessarily exclusively, on the material covered since the previous exam. The final exam will include a small number of cumulative questions, and I reserve the right to include at most one cumulative question on each of the other exams.
The weekly workload for this course will vary by student but on average should be about 13 hours per week. The follow tables provides a rough estimate of the distribution of this time over different course components for a 16 week semester.
| Category | Total Time | Time/Week (Hours) |
|---|---|---|
| Lectures+Labs | 4 | |
| Homework | 48 | 3 |
| Exam Study | 16 | 1 |
| Projects | 48 | 3 |
| Reading+Unstructured Study | 2 | |
| 13 |
Lab and homework assignments are graded on a simple 3 point scale. Grades are marked with, in decreasing order, a check-plus, check, or check-minus. Your final grade for these two assignment categories is then based off the respective averages and determined by the following chart. Notice this chart lists the minimum average needed to achieve a particular letter grade.
| Assignment Avg. (min) | Letter Grade |
|---|---|
| 2.8 | A |
| 2.75 | A- |
| 2.5 | B+ |
| 2.25 | B |
| 2 | B- |
| 1.75 | C+ |
| 1.5 | C |
| 1 | C- |
| 0.75 | D |
| 0.5 | F |
Your final grade is based on a weighted average of particular assignment categories. You can estimate your current grade based on your scores and these weights. You may always visit the instructor outside of class to discuss your current standing.
| category | weight |
|---|---|
| exams | 45% |
| projects | 25% |
| homework | 12.5% |
| labs | 12.5% |
| participation | 5% |
This courses uses a standard grading scale. Assignments and final grades will not be curved except in rare cases when its deemed necessary by the instructor. Percentage grades translate to letter grades as follows:
| Score | Grade |
|---|---|
| 94–100 | A |
| 90–93 | A- |
| 88–89 | B+ |
| 82–87 | B |
| 80–81 | B- |
| 78–79 | C+ |
| 72–77 | C |
| 70–71 | C- |
| 68–69 | D+ |
| 62–67 | D |
| 60–61 | D- |
| 0–59 | F |
You are always welcome to challenge a grade that you feel is unfair or calculated incorrectly. Mistakes made in your favor will never be corrected to lower your grade. Mistakes made not in your favor will be corrected. Basically, after the initial grading your score can only go up as the result of a challenge*.
The following tentative calendar should give you a feel for how work is distributed throughout the semester. Assignments and events are listed in the week they are due or when they occur. This calendar is subject to change based on the circumstances of the course.
| date | topic | Assignment |
|---|---|---|
| Wed 08/23 | Intro | Using VNC, Code::Blocks, COMP161 BigO Notes |
| Thu 08/24 | Logarithms (notes) | Lab/HW 1 assigned |
| Fri 08/25 | Review C++ Fundamentals and Big O | COMP161 C++ Notes I, COMP161 C++ Notes II |
| Mon 08/28 | Analyzing Simple Recursion (notes) | Read Ch. 7 |
| Wed 08/30 | Palindromes and Binary Search | |
| Thu 08/31 | Recursion to Iteration | HW 1 due, Lab/HW 2 AND HW 3 |
| Fri 09/01 | Review | |
| Mon 09/04 | Exam 1 | |
| Wed 09/06 | Structural Recursion and Iteration (notes) | |
| Thu 09/07 | Recursion for intToStr | HW 2 AND 3 due, Lab 3 |
| Fri 09/08 | Analyzing Sorting | Read Ch. 10 |
| Mon 09/11 | Divide and Conquer Sorting (Mergesort) | |
| Wed 09/13 | Quicksort | |
| Thu 09/14 | Tracing Sorting and Searching | Lab/HW 4 (Solutions) |
| Fri 09/15 | ||
| Mon 09/18 | Collections: Stacks and Queues | Read 5.1-5.3 |
| Wed 09/20 | Exam 2 | |
| Thu 09/21 | Using Stacks and Queues | Lab/HW 5 |
| Fri 09/22 | Collections: Maps and Sets | Read 5.4-5.5 |
| Mon 09/25 | Traversing Collections (notes) | Read 5.6 |
| Wed 09/27 | Designing Classes | Read 6.1 |
| Thu 09/28 | Map Inversion | Lab/HW 6 |
| Fri 09/29 | ||
| Mon 10/02 | ||
| Wed 10/04 | Exam 3 | Solutions |
| Thu 10/05 | Stacks Using Vectors | Lab/HW 7 |
| Fri 10/06 | Overloading Operators | Read 6.1 |
| Mon 10/09 | Exam 4 (take-home) | |
| (10/11–10/15) | (Fall Break) | (Fall Break) |
| Mon 10/16 | Exceptions and Exception handling (notes) | |
| Wed 10/18 | Handling Input: Tokenizing | Read 6.4 |
| Thu 10/19 | Reverse Polish Notation Calculator | Project 1 out |
| Fri 10/20 | Pointers | |
| Mon 10/23 | Read 11.1-11.2 | |
| Wed 10/25 | Arrays and Pointer Arithmetic | Read 11.3-11.4 |
| Thu 10/26 | Free Lab for Project 1 | |
| Fri 10/27 | C-style Strings | |
| Mon 10/30 | Dynamic Memory, Linked Lists | Read 12.1-12.2 |
| Wed 11/01 | Traversing Linked Lists, Arrays vs. Linked Lists | |
| Thu 11/02 | Array comparison | Lab 8 |
| Fri 11/03 | Freeing Memory, Destructors | Exam 5 (take-home), Read 12.3 |
| Mon 11/06 | DoubleStack | Read 12.4-12.5 |
| Wed 11/08 | ||
| Thu 11/09 | Better Arrays and Vectors | Lab 9/HW 7 |
| Fri 11/10 | Copying Objects | Read 12.7 |
| Mon 11/13 | Dynamic-array Stack Analysis, Templates | Read 12.8, 14.1-14.2 |
| Wed 11/15 | Implementing Queues | Read 14.3 |
| Thu 11/16 | Project 2 out, Exam 6 out | |
| Fri 11/17 | Implementing Vectors | Labp2 due, Read 14.4-14.5 |
| Mon 11/20 | Debugging in CodeBlocks; Maps with Vectors | Exam 6 due 11/21, Read 15.1 |
| (11/22–11/26) | (Thanksgiving Break) | (Thanksgiving Break) |
| Mon 11/27 | Hashing | Read 15.2-15.4 |
| Wed 11/29 | Hash Table Load Factor; Intro to Tree | Read 16.1-16.2 |
| Thu 11/30 | Free lab for Project 2 | |
| Fri 12/01 | Implementing BSTs | Project 2 Due |
| Mon 12/04 | Tree Traversals, Balanced Trees | Read 16.3, “HW” 8 out |
| Wed 12/06 | Tree Rotations, Review | |
| Fri 12/08 6:30 PM | (Final) Exam 7 (Solutions) | |
| Wed 12/13 | “HW” 8 due |
The Teaching and Learning Center offers FREE resources to assist Monmouth College students with their academic success. Programs include Supplemental Instruction for difficult classes, Drop-In and appointment tutoring, and individual Academic Coaching. The TLC is here to help students excel academically. TLC services are not just for struggling students, but can assist all students to get better grades, practice stronger study skills, and manage time. The TLC is located on the 2nd floor of Poling Hall.
Disability Support Services: If you have a disability or had academic accommodations in high school or another college, you may be eligible for academic accommodations at Monmouth College under the Americans with Disabilities Act (ADA). Monmouth College is committed to equal educational access. Students with disabilities can apply for accommodations at the Teaching and Learning Center.


Enable JavaScript
and try again
Loading
Create account
Log in
You will only be able to reset your password if you provide an e-mail address,
and make the reset request from a device you've signed in with before!
So, choose a password you will remember, or store it somewhere safe.
Remember me
Forgot password?
Send reset e-mail
New user?
Create an account
Already registered?
Log in


|
Neonode zForce(TM) SDK
|
Macros | |
| #define | EMUTEXNOTINITIALIZED 500 |
| Mutex not initialized. | |
| #define | EMUTEXINITIALIZATIONFAILED 501 |
| Mutex Initialization failed. | |
| #define | EMUTEXLOCKFAILED 502 |
| Mutex Lock failed. | |
| #define | EMUTEXUNLOCKFAILED 503 |
| Mutex Unlock failed. | |
| #define | EMUTEXDESTROYFAILED 504 |
| Mutex Destroy failed. | |
| #define | EBADMUTEX 505 |
| Bad Mutex Pointer. | |
| #define | ESEMAPHORENOTINITIALIZED 506 |
| Semaphore not initialized. | |
| #define | ESEMAPHOREINITIALIZATIONFAILED 507 |
| Semaphore Initialization failed. | |
| #define | ESEMAPHOREWAITFAILED 508 |
| Wait for Semaphore failed. | |
| #define | ESEMAPHOREINCREMENTFAILED 509 |
| Increment Semaphore failed. | |
| #define | ESEMAPHOREDESTROYFAILED 510 |
| Destroy Semaphore failed. | |
| #define | EBADSEMAPHORE 511 |
| Bad Semaphore Pointer. | |
| #define | ESEMAPHOREWAITTIMEDOUT 512 |
| Semaphore Wait timed out. | |
500 - 599 Mutex and Semaphore Errors.


PE Supervisor App-B
Exit
Bulk:
Employee:
Operation (manual)
Select Operation (for bulk)
Operation:
Layer:
Scan date:
Send to server
Normal
Flag no
Info
PE Supervisor App-B
Exit
Bulk:
Employee:
Operation
Select Operation
Scan date:
Hours
Minutes
Send to server
Normal
Flag no
Info
PE Supervisor App-B
Exit
© 2015 -
Matteo Mattei
Production Efficiency App B - Version
Normal
Flag no
Info
Insert the line ID


Harry Styles pokes fun at former One Direction band mate on US TV
Harry Styles poked fun at his former One Direction bandmate Zayn Malik during an appearance on US TV.
Styles had the rare honour of being both the host and musical guest on long-running comedy sketch show Saturday Night Live.
During his opening monologue, the 25-year-old, seated at a piano, recalled his time in One Direction alongside Niall Horan, Liam Payne, Louis Tomlinson and Malik.
However, when it came to remembering the latter’s name, he got him mixed up with a former Beatle.
“I love those guys,” he said of One Direction. “They’re my brothers. Niall, Louis, Liam and, erm, Ringo.”
Malik departed the band in 2015, a year before they went on indefinite hiatus.
Referencing the band’s X Factor roots, Styles added: “I’m just so grateful Simon Cowell grew us in those test tubes.”
For the first of his two musical performances on the night, Styles, wearing a sequined outfit, performed a stripped back version of his latest single Lights Up, which will feature on his forthcoming album Fine Line.
He later performed another track from the album, Watermelon Sugar.
Both were well received by the audience inside Studio 8H, where SNL has been filmed since its inception in 1975.
Styles, wearing pink and blue nail varnish on his fingernails, said he was excited to show off his comedic skills before appearing in his first sketch of the night, poking fun at the shortage of chicken sandwiches at US fast food outlet Popeyes.
He also played a hapless airplane pilot in a sketch where he and his co-pilot mistakenly broadcast a smutty conversation to stunned passengers.
The final sketch had Styles as one half of a wildly inappropriate musical act at the funeral of an elderly woman.
SNL’s opening segment poked fun at this week’s impeachment hearings investigating Donald Trump, and featured Mad Men star Jon Hamm.
Next week, SNL will be hosted by actor Will Ferrell, while the musical guest will be singer-songwriter King Princess.


Guide to Copenhagens Community Dinners 2019
Copenhagen is buzzing with cultural centers and community cafes where people gather to socialize and events are held to raise awareness of community projects. Folkekøkken or community kitchen are community dinners held with a purpose of providing a family style affordable meal to bring people in the community together. The prominence is given to making folkekøkken accessible to everyone and almost always meals are prepared with environment in mind with a vegetarian and vegan option available. Additionally some kitchen are donation based and for some you are welcome to join in for the meal preparation in exchange for a free meal, you can always reach out to organizers for the details.
Here are some of the current community kitchens, please make sure to check via the link provided for specific dates of each dinner.
Kraftwerket’s Vegan Folkekøkken ( Valby )
KraftWerket is a youth club and culture house in Valby and it hosts a community dinner every Tuesday at 18:00. The dinner costs only 25kr, cash only and is almost always Vegan.
Address: Valgårdsvej 2, Copenhagen 2500
Kafa-X Folkekøkken ( Nørrebro )
Kafa-X is a food club made up of volunteers that host a community dinner every Tuesday at 19:00. The dinner is donation based with a suggested donation of 20kr, for those that would like to eat for free you can contact the organizers and show up early and help with the preparation.
Address: Korsgade 19, Copenhagen 2200
BUMZEN Community Kitchen ( Nørrebro )
Bumzen is a community kitchen that host a dinner every Wednesdays with door opening at 18:00 and food served at 19:00. The dinner is donation based and is almost always Vegan.
Address: Baldersgade 20, Copenhagen 2200
facebook.com/bumzencommunitykitchen
Kapelvej 44 ( Nørrebro )
Kapelvej44 is a local culture house that host community dinners on Tuesdays from 17:00 until 20:00. The dinner is 50 kr for adults and 25 kr for kids and always include a vegetarian option.
Address: Kapelvej 44, Copenhagen 2200
Absalon Kirke ( Vesterbro )
Absalon is a old church converted into a community venue that hosts community dinners daily. The dinner is hosted at 18:00 and the tickets go on sale at 17:00. The cost is 50 krona, and you can buy the tickets on the spot. Make sure to arrive close to 17:00 since they often sell out fast. The only exception is Fridays where tickets are 100kr and include desert and can be purchase ahead of time through the billeto link on their page. Mondays and Wednesdays the dinners are vegetarian.
Address: Sønder Blvd. 73, Copenhagen 1720
OneBowl ( Nordvest )
One Bowl is Copenhagens first “Pay as you feel” community restaurant run by volunteers aiming to provide good food and open to everyone. This mean there are no set prices and rather a suggested donation amount for each menu. The menu is vegan and plant based. You can find out about opening hours on their site.
Address: Borups Alle 205, Copenhagen 2400
Glad Dinner at KU.BE ( Frederiksberg )
KU.BE is a culture house in Frederiksberg hosting community dinners every Wednesday at 17:30. The tickets cost 79 kr for adults and 49 kr for kids under 8 years. They can be bought at the door or reserved beforehand by calling.
Address: Dirch Passers Allé 4, 2000 Frederiksberg


黒の手番です。32 はどう動かしますか？
Unlimited
pips Black=168 White=164
(CorrectAnswer= 0/0, ErrorScore= 0)
1. Bar/22 24/22 eq:-0.090 47.17% (G:11.30% B:0.41%) 52.83% (G:11.79% B:0.41%) 2. Bar/23 24/21 eq:-0.167 (-0.077) 46.18% (G:10.87% B:0.45%) 53.82% (G:14.83% B:0.55%) 3. Bar/23 13/10 eq:-0.171 (-0.082) 46.21% (G:11.82% B:0.46%) 53.79% (G:15.78% B:0.74%) 4. Bar/22 13/11 eq:-0.178 (-0.089) 46.11% (G:11.24% B:0.45%) 53.89% (G:15.54% B:0.64%) 5. Bar/20 eq:-0.193 (-0.103) 45.92% (G:10.79% B:0.47%) 54.08% (G:15.83% B:0.57%)


Flags of the WorldAdapted from Johan Sundström's flags of the world exhibit, with images from famfamfam.com. Here is the Exhibit JSON data file. Using Exhibit, you can make this map with just the few simple files you see in this directory. Could you have built the same map with as little effort using anything else? |
|


Guillaume Gomez
Oscillator
ON/OFF
Type
sine
square
sawtooth
triangle
LFO
gain
LFO frequency
Analyser


Pilgrim of Darkness:
A while back, I saw someone with an awesome bow!
He was a disreputable looking fellow, looked somewhat like a thief!
I spoke with him briefly... He was looking for something quite valuable!
"Where did he go?"


|
PerceptualColor
|
A color display widget. More...
#include <colorpatch.h>
Public Slots | |
| void | resetColor () |
| Reset the color() property. More... | |
| void | setColor (const QColor &newColor) |
| Set the color() property. More... | |
Signals | |
| void | colorChanged (const QColor &newColor) |
| Signal for color() property. More... | |
Public Member Functions | |
| ColorPatch (QWidget *parent=nullptr) | |
| Constructor. More... | |
| virtual | ~ColorPatch () override |
| Destructor. More... | |
| QColor | color () const |
| virtual QSize | minimumSizeHint () const override |
| Provide the minimum size hint. More... | |
| virtual QSize | sizeHint () const override |
| Provide the size hint. More... | |
Protected Member Functions | |
| virtual void | paintEvent (QPaintEvent *event) override |
| Handle paint events. More... | |
Properties | |
| QColor | color |
| The color that is displayed. More... | |
Private Attributes | |
| QBrush | m_brush |
| QColor | m_color |
A color display widget.
This widget simply displays a color.
Definition at line 38 of file colorpatch.h.
|
explicit |
Constructor.
Definition at line 38 of file colorpatch.cpp.
|
overridevirtual |
Destructor.
Definition at line 48 of file colorpatch.cpp.
| QColor PerceptualColor::ColorPatch::color | ( | ) | const |
|
signal |
Signal for color() property.
|
overridevirtual |
Provide the minimum size hint.
Reimplemented from base class.
Definition at line 113 of file colorpatch.cpp.
|
overrideprotectedvirtual |
Handle paint events.
Just draw the frame inherited from QFrame, than paint a rectangle with the current color above.
Definition at line 57 of file colorpatch.cpp.
|
slot |
Reset the color() property.
Definition at line 134 of file colorpatch.cpp.
|
slot |
Set the color() property.
Definition at line 124 of file colorpatch.cpp.
|
overridevirtual |
Provide the size hint.
Reimplemented from base class.
Definition at line 100 of file colorpatch.cpp.
|
private |
Definition at line 72 of file colorpatch.h.
|
private |
Definition at line 73 of file colorpatch.h.
|
readwrite |
The color that is displayed.
Default value is an invalid color.
If the color is invalid, nothing is displayed.
Definition at line 48 of file colorpatch.h.


'Almost perfect' - Former West Brom ace delivers verdict on Albion's promotion prospects
The Baggies moved back to the top of the Sky Bet Championship table last night with a 2-0 victory at Stoke City
by Chris WatsonDon Goodman believes his old club West Bromwich Albion will take some stopping in the Sky Bet Championship this season.
Albion returned to the top of the table last night courtesy of a 2-0 victory at rock bottom Stoke City .
Matt Phillips gave Slaven Bilic 's men an early lead, and substitute Hal Robson-Kanu added a second from the penalty spot after the break.
The result took the Baggies two points clear of closest challengers Preston North End, Leeds United and Swansea City - with almost a third of the campaign gone.
West Brom latest
This is your round up of all things West Brom; the one-stop shop that will keep you updated on the latest goings on at the club and beyond.
Transfers, injuries, match-days and managers, we’ve got you covered.
We’ll be bringing the very latest on the Baggies throughout the week and around the clock.
Make sure you keep yourself updated with our handy daily catch up...
Must reads...
- 'It wasn’t like we were living on the edge' - every word from Slaven Bilic after Stoke City victory
- 'Gutless, spineless, pathetic ' - Stoke City fans not holding back after defeat to West Brom
- 'Better than Messi' - West Brom fans calling for same thing from Slaven Bilic after Stoke City win
- 'Taunting' - The Stoke City verdict as West Brom increase Potters' relegation worries
- 'Greedy' - what Slaven Bilic said after West Brom's victory over Stoke City
- '12th man' - the verdict West Brom fans will absolutely love
- West Brom hero reveals what he's done since retiring and rates Slaven Bilic's start
- West Brom move back to the top of the Championship with comfortable Stoke City win
For all your latest WBA news, opinion, analysis and transfer gossip, click here
You can follow our West Brom reporter Joseph Chapman on Twitter, and his email address is<EMAIL_ADDRESS>Goodman, who scored 63 goals in 181 appearances for West Brom between 1987 and 1991, was co-commentator for the Stoke game on Sky Sports.
Asked if he thought his former team would take some stopping now, the 53-year-old replied: "Well, yes.
"You would suggest that anyone that finishes above them would be automatically promoted, you really would.
"(It was) an outstanding, almost perfect away display (against Stoke).
"They controlled the game pretty much from start to finish.
"They defended well and got a clean sheet, which will be very pleasing for Slaven Bilic.
"They're back on top."
Albion - unbeaten in five games since suffering their solitary league defeat this term at Leeds - are back in action on Saturday when they visit Hull City.


In the 2000s we went from documenting every single class of our software to not at all. It was an attempt to increase the delivery pace, keeping the team away from tasks that, eventually, have to be remade once the software changes. As a side effect, scaling the team became a problem. The most notable one is the lack of autonomy from its members. Not only newcomers need special attention to get familiarized with the basics of their software (like building and running it), but they would still ask several questions until they understand how it works and how it solves the problem it was designed for.
It is a known fact that designing new software requires meticulous planning, strict alignment between team members and keep them focused on the defined goal. Reducing the scope of your documentation to the software architecture might be a good starting point, as you probably don’t need to document every single class of your software to give them enough direction when they are coding. It relieves teams from frequently asked questions and forcing its members to stick with previous definitions unless a big change is necessary, and will let them focus on the business side of their projects.
Unlike the lack of autonomy, lack of accountability plays a non-neglectable indirect impact on team performance. Let us assume that in a Software Development team we are going to face only three types of issues: bugs, business-related issues and architecture issues. While Developers are accountable for solving bugs, and Product Owners for business-related issues, even on teams where there’s a dedicated Software Architect nobody responds for the architectural problems the team faces. On first glance, it seems unfair to blame him for a problem that was introduced collectively by a multitude of reasons that happened together.
In reality, once the team starts documenting their learnings and architectural decisions they will become more accountable from their architectural decisions. By being fully aware of the technical decisions made in the past and understanding the expected positive outcome it introduced, teams can be accountable for architecture issues on the software, erasing the grey zone between Architecture Decisions and Business Decisions.
Documenting for your different audiences
Documentation is a tool to transfer knowledge, to keep the team on the same page regarding what problem the software solves, how those problems were solved, what were the technical decisions that should be followed widely during the development, and how one can run the software and see it in action. Having long essays written in an MS Word document or a Wiki page is not enough to efficiently convey the information to the team members.
On his talk Visualising The Software Architecture, Simon Brown stressed that “as your software have different audiences with different needs”. He means that you need different tools to cover how the different layers of our software work. Thus, along with his iconic C4Model - which will be discussed later - I have adopted a couple of simple-yet-powerful guidelines that helped me to contextualize whoever is maintaining our source code.
The Source Code Guideline
For the sake of productivity, the documentation should be started with the Source Code Guideline, which covers the basics concepts a developer might need to understand how the project source code is structured. A basic version of this document should answer the following questions a developer might have - although it can be enhanced with more topics whenever needed:
- How to run the software locally?
- How to run all automated tests locally?
- How to package the software?
- How to deploy the software?
- How to edit the software?
Bear in mind that long lists of commands can lead to reproducibility issues. So try to keep it as neat as possible, automating it before documenting it.
Here you can find a sample document that answers these questions with topics, making them easy to read.
The Architecture Decisions Guideline
Next comes the Architecture Decisions Guideline, which complies of everything that might affect the daily routine of any contributor to your software. It should be straightforward and concise, not only pointing the exact direction one has to follow to contribute to the software, but also introducing them lessons learnt from the past and decision taken to avoid possible issues. It may contain:
- An analytical list of problems, techniques and methodologies that should be avoided on the project.
- A detailed process of how issues should be fixed and how new features should be introduced in the software. Make sure to state the tools involved in this process - e.g. Git branches.
- A brief explanation of how new releases are rolled out to production.
- An explanation of how quality is enforced before a release is closed.
- What coding principles shall be applied otherwise the proposed modifications might be denied.
When to compose this document is a complex topic. Synergic teams are constantly aligned and might be on the same page right from the conception of the software, which would allow the team to postpone the document creation to a future moment. It’s desirable, though, to have it finished once the first stable version of the software is released. Its existence will be the backbone of any code review that might happen in the future. It will ensure that the quality the code base achieved will last long enough so developers can move to the next project with peace of mind.
Here you can find a sample document that exemplifies how it can be composed. This one, though, is a bit denser than the previous one as it was based on a previously written document taken from a previous customer.
The C4Model
C4Model is probably the most pragmatic documentation model I’ve come across. Simon came with the idea to represent the different layers of software with diagrams. When he conceived it, he wanted us to experience a model that worked like maps: by zooming out you get more context you dive into more details, but when you zoom out to better understand in which context the software is running on. According to the way he conceives it, any software can be described in four main layers, each of which is represented by one diagram:
- System Context Diagram - Shows the software in question in the centre, identifying who works with it and what it depends on.
- Containers Diagram - Illustrates the overall shape of the architecture and a few technology choices.
- Components Diagram - Explains the logical components and their interactions within the component.
- Code Diagrams - Explains component implementations in detail.
The first three diagrams are his creations, all of which adopts simplistic notations to demonstrate how a particular piece of the system is working.  It is there in the case you have a specific need where documenting the source code itself is mandatory task.
C4Model is well documented on its website, with several years spent polishing it to reach this level of simplicity and organization. The beauty behind these diagrams lies in the fact we can pick our target audience, allowing us to choose when and who should be involved in the documentation process.


{% extends "layout-chs.html" %} {% block page_title %} File abridged accounts with Companies House {% endblock %} {% block content %} {% include "includes/phase_banner_beta.html" %} Back File abridged accounts with Companies House Before you start You'll need: your email address and password you used to sign up for the Companies House online service the authentication code Companies House sent you If you’re filing for the first time You can register online. You’ll need your email address and create a password. Once registered, we’ll post an authentication code to your registered office. If your company already has a code, a reminder will be sent. Allow up to 5 days for delivery of your code. For security reasons your code can’t be provided by email or over the phone. on the Companies House website {% endblock %}
You'll need:
You can register online. You’ll need your email address and create a password.
Once registered, we’ll post an authentication code to your registered office. If your company already has a code, a reminder will be sent.
Allow up to 5 days for delivery of your code.
For security reasons your code can’t be provided by email or over the phone.


NormalBayesClassifier Bayes classifier for normally distributed data
Normal Bayes Classifier
This simple classification model assumes that feature vectors from
each class are normally distributed (though, not necessarily
independently distributed). So, the whole data distribution function
is assumed to be a Gaussian mixture, one component per class. Using
the training data the algorithm estimates mean vectors and covariance
matrices for every class, and then it uses them for prediction.
References
[Fukunaga90]:
K. Fukunaga. "Introduction to Statistical Pattern Recognition", 2e.
New York: Academic Press, 1990.
|
|
addlistener |
Add listener for event. |
|
|
calcError |
Computes error on the training or test dataset |
|
|
clear |
Clears the algorithm state |
|
|
delete |
Destructor |
|
|
empty |
Returns true if the algorithm is empty |
|
|
eq |
== (EQ) Test handle equality. |
|
|
findobj |
Find objects matching specified conditions. |
|
|
findprop |
Find property of MATLAB handle object. |
|
|
ge |
>= (GE) Greater than or equal relation for handles. |
|
|
getDefaultName |
Returns the algorithm string identifier |
|
|
getVarCount |
Returns the number of variables in training samples |
|
|
gt |
> (GT) Greater than relation for handles. |
|
|
isClassifier |
Returns true if the model is a classifier |
|
|
isTrained |
Returns true if the model is trained |
| Sealed
|
isvalid |
Test handle validity. |
|
|
le |
<= (LE) Less than or equal relation for handles. |
|
|
load |
Loads algorithm from a file or a string |
|
|
lt |
< (LT) Less than relation for handles. |
|
|
ne |
~= (NE) Not equal relation for handles. |
|
|
notify |
Notify listeners of event. |
|
|
predict |
Predicts responses for input samples |
|
|
predictProb |
Predicts the response for sample(s) |
|
|
save |
Saves the algorithm parameters to a file or a string |
|
|
train |
Trains the statistical model |