Skip to content

Commit

Permalink
Merge branch 'fo40225-development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarsouza committed Jan 5, 2016
2 parents 6076f84 + d4a436e commit 99e6973
Show file tree
Hide file tree
Showing 9 changed files with 705 additions and 672 deletions.
20 changes: 10 additions & 10 deletions Setup/NuGet/Accord.Video.FFMPEG.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@
<file src="..\..\Release\net45\GPL\Accord.Video.FFMPEG.dll" target="lib\net45\Accord.Video.FFMPEG.dll" />
<file src="..\..\Release\net45\GPL\Accord.Video.FFMPEG.xml" target="lib\net45\Accord.Video.FFMPEG.xml" />

<file src="..\..\Externals\ffmpeg\bin\avcodec-53.dll" target="build\x86\avcodec-53.dll" />
<file src="..\..\Externals\ffmpeg\bin\avdevice-53.dll" target="build\x86\avdevice-53.dll" />
<file src="..\..\Externals\ffmpeg\bin\avformat-53.dll" target="build\x86\avformat-53.dll" />
<file src="..\..\Externals\ffmpeg\bin\avutil-51.dll" target="build\x86\avutil-51.dll" />
<file src="..\..\Externals\ffmpeg\bin\postproc-52.dll" target="build\x86\postproc-52.dll" />
<file src="..\..\Externals\ffmpeg\bin\swresample-0.dll" target="build\x86\swresample-0.dll" />
<file src="..\..\Externals\ffmpeg\bin\swscale-2.dll" target="build\x86\swscale-2.dll" />
<file src="..\..\Externals\ffmpeg\README.txt" target="build\x86\FFMPEG-README.txt" />
<file src="..\..\Externals\ffmpeg\bin\avcodec-53.dll" target="build\ffmpeg\x86\avcodec-53.dll" />
<file src="..\..\Externals\ffmpeg\bin\avdevice-53.dll" target="build\ffmpeg\x86\avdevice-53.dll" />
<file src="..\..\Externals\ffmpeg\bin\avformat-53.dll" target="build\ffmpeg\x86\avformat-53.dll" />
<file src="..\..\Externals\ffmpeg\bin\avutil-51.dll" target="build\ffmpeg\x86\avutil-51.dll" />
<file src="..\..\Externals\ffmpeg\bin\postproc-52.dll" target="build\ffmpeg\x86\postproc-52.dll" />
<file src="..\..\Externals\ffmpeg\bin\swresample-0.dll" target="build\ffmpeg\x86\swresample-0.dll" />
<file src="..\..\Externals\ffmpeg\bin\swscale-2.dll" target="build\ffmpeg\x86\swscale-2.dll" />
<file src="..\..\Externals\ffmpeg\README.txt" target="build\ffmpeg\FFMPEG-README.txt" />

<file src="..\..\Setup\Scripts\Accord.Video.FFMPEG.targets" target="build\Accord.Video.FFMPEG.targets" />

</files>
</package>
3 changes: 1 addition & 2 deletions Sources/Accord.MachineLearning/Clustering/KMeans/KMeans.cs
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,7 @@ private void ComputeInformation(double[][] data, int[] labels)
/// </summary>
///
/// <param name="data">The data where to compute the algorithm.</param>
/// <param name="weights">The weight to consider for each data sample.
/// This is used in weighted K-Means</param>
/// <param name="weights">The weight to consider for each data sample. This is used in weighted K-Means</param>
/// <param name="weightSum">The total sum of the weights in <paramref name="weights"/>.</param>
///
protected virtual int[] Compute(double[][] data, double[] weights, double weightSum)
Expand Down
34 changes: 21 additions & 13 deletions Sources/Accord.Math/Formats/Base/MatrixFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace Accord.Math
/// Defines how matrices are formatted and displayed, depending on the
/// chosen format representation.
/// </summary>
///
///
public class MatrixFormatter : ICustomFormatter
{

Expand All @@ -50,7 +50,7 @@ public class MatrixFormatter : ICustomFormatter
/// formatted as specified by <paramref name="format"/> and
/// <paramref name="formatProvider"/>.
/// </returns>
///
///
public string Format(string format, object arg, IFormatProvider formatProvider)
{
IMatrixFormatProvider provider = formatProvider as IMatrixFormatProvider;
Expand All @@ -75,7 +75,7 @@ public string Format(string format, object arg, IFormatProvider formatProvider)
/// <summary>
/// Converts a jagged or multidimensional array into a <a cref="System.String">System.String</a> representation.
/// </summary>
///
///
public static string Format(string format, Array matrix, IMatrixFormatProvider formatProvider)
{
// Initial argument checking
Expand Down Expand Up @@ -178,8 +178,9 @@ public static string Format(string format, Array matrix, IMatrixFormatProvider f
private static bool parseOptions(string format, out string newline, out string elementFormat)
{
// "{0,g}" -> multiline with system new line character and number format g
// "{0:Mn,g}" -> multiline with \n new line character and number format g
// "{0:Mnr,g}" -> multiline with \n\r new line character and number format g
// "{0:Mr,g}" -> multiline with \r new line character (old Mac) and number format g
// "{0:Mn,g}" -> multiline with \n new line character (Unix-like) and number format g
// "{0:Mrn,g}" -> multiline with \r\n new line character (Windows) and number format g
// "{0:Ms,g}" -> single line and number format g

if (String.IsNullOrEmpty(format))
Expand All @@ -197,12 +198,16 @@ private static bool parseOptions(string format, out string newline, out string e

switch (options[0])
{
case "Mr":
newline = "\r";
return true;

case "Mn":
newline = "\n";
return true;

case "Mnr":
newline = "\n\r";
case "Mrn":
newline = "\r\n";
return true;

case "Ms":
Expand All @@ -221,12 +226,15 @@ private static bool parseOptions(string format, out string newline, out string e
elementFormat = options[1];

switch (options[0])
{
{
case "Mr":
newline = "\r"; break;

case "Mn":
newline = "\n"; break;

case "Mnr":
newline = "\n\r"; break;
case "Mrn":
newline = "\r\n"; break;

case "Ms":
newline = String.Empty; break;
Expand Down Expand Up @@ -277,7 +285,7 @@ private static string handleOtherFormats(string format, object arg, IFormatProvi
/// <summary>
/// Converts a matrix represented in a System.String into a jagged array.
/// </summary>
///
///
public static double[][] ParseJagged(string str, IMatrixFormatProvider provider)
{
// remove excess spaces
Expand Down Expand Up @@ -328,12 +336,12 @@ public static double[][] ParseJagged(string str, IMatrixFormatProvider provider)
/// <summary>
/// Converts a matrix represented in a System.String into a multi-dimensional array.
/// </summary>
///
///
public static double[,] ParseMultidimensional(string str, IMatrixFormatProvider provider)
{
return Matrix.ToMatrix(ParseJagged(str, provider));
}

#endregion


Expand Down
18 changes: 7 additions & 11 deletions Sources/Extras/Accord.Video.FFMPEG.GPL/Video.FFMPEG.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,14 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalOptions>/ignore:4248 %(AdditionalOptions)</AdditionalOptions>
<DelayLoadDLLs>avcodec-53.dll;avformat-53.dll;avutil-51.dll;swscale-2.dll;</DelayLoadDLLs>
</Link>
<Xdcmake>
<DocumentLibraryDependencies>false</DocumentLibraryDependencies>
</Xdcmake>
<PostBuildEvent>
<Command>sn -Ra "$(TargetPath)" "$(ProjectDir)Accord.snk"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
Expand All @@ -97,27 +101,18 @@
<GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<PostBuildEvent>
<Command>sn -Ra "$(TargetPath)" "$(ProjectDir)Accord.snk"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='NET40|Win32'">
<ClCompile>
<GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<PostBuildEvent>
<Command>sn -Ra "$(TargetPath)" "$(ProjectDir)Accord.snk"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='NET45|Win32'">
<ClCompile>
<GenerateXMLDocumentationFiles>true</GenerateXMLDocumentationFiles>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<PostBuildEvent>
<Command>sn -Ra "$(TargetPath)" "$(ProjectDir)Accord.snk"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<Reference Include="System">
Expand All @@ -135,10 +130,11 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="AssemblyInfo.cpp" />
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="Stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='NET35|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='NET40|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='NET35|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='NET40|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='NET45|Win32'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="VideoCodec.cpp" />
Expand Down
Loading

0 comments on commit 99e6973

Please sign in to comment.